diff --git a/.DS_Store b/.DS_Store index bf2fa0c..c6affb0 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/countries.js b/countries.js deleted file mode 100644 index c4a445d..0000000 --- a/countries.js +++ /dev/null @@ -1,253 +0,0 @@ -const countryCodes = { - "AF": "Afghanistan", - "AL": "Albania", - "DZ": "Algeria", - "AS": "American Samoa", - "AD": "Andorra", - "AO": "Angola", - "AI": "Anguilla", - "AQ": "Antarctica", - "AG": "Antigua and Barbuda", - "AR": "Argentina", - "AM": "Armenia", - "AW": "Aruba", - "AU": "Australia", - "AT": "Austria", - "AZ": "Azerbaijan", - "BS": "Bahamas (the)", - "BH": "Bahrain", - "BD": "Bangladesh", - "BB": "Barbados", - "BY": "Belarus", - "BE": "Belgium", - "BZ": "Belize", - "BJ": "Benin", - "BM": "Bermuda", - "BT": "Bhutan", - "BO": "Bolivia (Plurinational State of)", - "BQ": "Bonaire, Sint Eustatius and Saba", - "BA": "Bosnia and Herzegovina", - "BW": "Botswana", - "BV": "Bouvet Island", - "BR": "Brazil", - "IO": "British Indian Ocean Territory (the)", - "BN": "Brunei Darussalam", - "BG": "Bulgaria", - "BF": "Burkina Faso", - "BI": "Burundi", - "CV": "Cabo Verde", - "KH": "Cambodia", - "CM": "Cameroon", - "CA": "Canada", - "KY": "Cayman Islands (the)", - "CF": "Central African Republic (the)", - "TD": "Chad", - "CL": "Chile", - "CN": "China", - "CX": "Christmas Island", - "CC": "Cocos (Keeling) Islands (the)", - "CO": "Colombia", - "KM": "Comoros (the)", - "CD": "Congo (the Democratic Republic of the)", - "CG": "Congo (the)", - "CK": "Cook Islands (the)", - "CR": "Costa Rica", - "HR": "Croatia", - "CU": "Cuba", - "CW": "Curaçao", - "CY": "Cyprus", - "CZ": "Czechia", - "CI": "Côte d'Ivoire", - "DK": "Denmark", - "DJ": "Djibouti", - "DM": "Dominica", - "DO": "Dominican Republic (the)", - "EC": "Ecuador", - "EG": "Egypt", - "SV": "El Salvador", - "GQ": "Equatorial Guinea", - "ER": "Eritrea", - "EE": "Estonia", - "SZ": "Eswatini", - "ET": "Ethiopia", - "FK": "Falkland Islands (the) [Malvinas]", - "FO": "Faroe Islands (the)", - "FJ": "Fiji", - "FI": "Finland", - "FR": "France", - "GF": "French Guiana", - "PF": "French Polynesia", - "TF": "French Southern Territories (the)", - "GA": "Gabon", - "GM": "Gambia (the)", - "GE": "Georgia", - "DE": "Germany", - "GH": "Ghana", - "GI": "Gibraltar", - "GR": "Greece", - "GL": "Greenland", - "GD": "Grenada", - "GP": "Guadeloupe", - "GU": "Guam", - "GT": "Guatemala", - "GG": "Guernsey", - "GN": "Guinea", - "GW": "Guinea-Bissau", - "GY": "Guyana", - "HT": "Haiti", - "HM": "Heard Island and McDonald Islands", - "VA": "Holy See (the)", - "HN": "Honduras", - "HK": "Hong Kong", - "HU": "Hungary", - "IS": "Iceland", - "IN": "India", - "ID": "Indonesia", - "IR": "Iran (Islamic Republic of)", - "IQ": "Iraq", - "IE": "Ireland", - "IM": "Isle of Man", - "IL": "Israel", - "IT": "Italy", - "JM": "Jamaica", - "JP": "Japan", - "JE": "Jersey", - "JO": "Jordan", - "KZ": "Kazakhstan", - "KE": "Kenya", - "KI": "Kiribati", - "KP": "Korea (the Democratic People's Republic of)", - "KR": "Korea (the Republic of)", - "KW": "Kuwait", - "KG": "Kyrgyzstan", - "LA": "Lao People's Democratic Republic (the)", - "LV": "Latvia", - "LB": "Lebanon", - "LS": "Lesotho", - "LR": "Liberia", - "LY": "Libya", - "LI": "Liechtenstein", - "LT": "Lithuania", - "LU": "Luxembourg", - "MO": "Macao", - "MG": "Madagascar", - "MW": "Malawi", - "MY": "Malaysia", - "MV": "Maldives", - "ML": "Mali", - "MT": "Malta", - "MH": "Marshall Islands (the)", - "MQ": "Martinique", - "MR": "Mauritania", - "MU": "Mauritius", - "YT": "Mayotte", - "MX": "Mexico", - "FM": "Micronesia (Federated States of)", - "MD": "Moldova (the Republic of)", - "MC": "Monaco", - "MN": "Mongolia", - "ME": "Montenegro", - "MS": "Montserrat", - "MA": "Morocco", - "MZ": "Mozambique", - "MM": "Myanmar", - "NA": "Namibia", - "NR": "Nauru", - "NP": "Nepal", - "NL": "Netherlands (the)", - "NC": "New Caledonia", - "NZ": "New Zealand", - "NI": "Nicaragua", - "NE": "Niger (the)", - "NG": "Nigeria", - "NU": "Niue", - "NF": "Norfolk Island", - "MP": "Northern Mariana Islands (the)", - "NO": "Norway", - "OM": "Oman", - "PK": "Pakistan", - "PW": "Palau", - "PS": "Palestine, State of", - "PA": "Panama", - "PG": "Papua New Guinea", - "PY": "Paraguay", - "PE": "Peru", - "PH": "Philippines (the)", - "PN": "Pitcairn", - "PL": "Poland", - "PT": "Portugal", - "PR": "Puerto Rico", - "QA": "Qatar", - "MK": "Republic of North Macedonia", - "RO": "Romania", - "RU": "Russian Federation (the)", - "RW": "Rwanda", - "RE": "Réunion", - "BL": "Saint Barthélemy", - "SH": "Saint Helena, Ascension and Tristan da Cunha", - "KN": "Saint Kitts and Nevis", - "LC": "Saint Lucia", - "MF": "Saint Martin (French part)", - "PM": "Saint Pierre and Miquelon", - "VC": "Saint Vincent and the Grenadines", - "WS": "Samoa", - "SM": "San Marino", - "ST": "Sao Tome and Principe", - "SA": "Saudi Arabia", - "SN": "Senegal", - "RS": "Serbia", - "SC": "Seychelles", - "SL": "Sierra Leone", - "SG": "Singapore", - "SX": "Sint Maarten (Dutch part)", - "SK": "Slovakia", - "SI": "Slovenia", - "SB": "Solomon Islands", - "SO": "Somalia", - "ZA": "South Africa", - "GS": "South Georgia and the South Sandwich Islands", - "SS": "South Sudan", - "ES": "Spain", - "LK": "Sri Lanka", - "SD": "Sudan (the)", - "SR": "Suriname", - "SJ": "Svalbard and Jan Mayen", - "SE": "Sweden", - "CH": "Switzerland", - "SY": "Syrian Arab Republic", - "TW": "Taiwan", - "TJ": "Tajikistan", - "TZ": "Tanzania, United Republic of", - "TH": "Thailand", - "TL": "Timor-Leste", - "TG": "Togo", - "TK": "Tokelau", - "TO": "Tonga", - "TT": "Trinidad and Tobago", - "TN": "Tunisia", - "TR": "Turkey", - "TM": "Turkmenistan", - "TC": "Turks and Caicos Islands (the)", - "TV": "Tuvalu", - "UG": "Uganda", - "UA": "Ukraine", - "AE": "United Arab Emirates (the)", - "GB": "United Kingdom of Great Britain and Northern Ireland (the)", - "UM": "United States Minor Outlying Islands (the)", - "US": "United States of America (the)", - "UY": "Uruguay", - "UZ": "Uzbekistan", - "VU": "Vanuatu", - "VE": "Venezuela (Bolivarian Republic of)", - "VN": "Viet Nam", - "VG": "Virgin Islands (British)", - "VI": "Virgin Islands (U.S.)", - "WF": "Wallis and Futuna", - "EH": "Western Sahara", - "YE": "Yemen", - "ZM": "Zambia", - "ZW": "Zimbabwe", - "AX": "Åland Islands" -}; - - export default countryCodes; \ No newline at end of file diff --git a/index.html b/index.html index b5a6cfe..9f188d3 100644 --- a/index.html +++ b/index.html @@ -34,13 +34,13 @@

About our project

Security Breach Incidents Database

-
+
- uek + uek

What is a Cyberattack?

-

Here you can learn more about Cyberttacks

+

Here you can learn more about Cyberattacks

Learn more
@@ -62,7 +62,7 @@

About the Project

- +

Data Simulation with Mockaroo:

@@ -81,15 +81,14 @@

Contribution to Cybersecurity:

-
-
-

Table

- - - +
+

Table

+
+ + @@ -106,18 +105,19 @@

Table

- - - - - -
Breach ID Breach Date Company Name Investigation Status Breach Location Breach Country
-
+ + + + +
+
-
+
+
+
diff --git a/index_Stare_06.01.html b/index_Stare_06.01.html deleted file mode 100644 index 0c93d72..0000000 --- a/index_Stare_06.01.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - Document - - - - - - - - - - - - - - - -
-

Security Breach Incidents Database

-

This website contains information related to different security breaches.

- -
-
-
-

About our project

-

Security Breach Incidents Database

-
-
-
-
-
- uek -
-

What is a Cyberattack?

-

Here you can learn more about Cyberttacks

- Learn more -
-
-
-
-
-
- -
- - - -

About the Project

-
-

This project aims to analyze cybersecurity statistics to identify trends and patterns.

-
-
-
- -
- - - - -

Data Simulation with Mockaroo:

-
-

The database includes key fields such as breach_id, breach_date, company_name, industry, employee_count, affected_customers, and more. By utilizing a mockaroo file with realistic data, the project facilitates the development and testing of security breach incident tracking systems

-
-
-
- -
- - - -

Contribution to Cybersecurity:

-
-

This initiative is designed to enhance cybersecurity efforts by providing a valuable resource for understanding trends, evaluating risks, and implementing proactive measures within various industries.

-
-
-
-
- -
-
-
-

Table

- - - - - - - - - - - - - - - - - - - - - - - -
Breach IDBreach DateCompany NameEmployee CountAffected CustomersData TypeData StolenAttack TypeAttack VectorResponse TimeResponse CostNotification MethodInvestigation StatusBreach LocationBreach Country
-
- - -
-
-
- -
-
-
-
-

Graphs

-
- - -
-
- -
-

Breach types

-

This pie chart represents the distribution or proportion of different breach types (e.g., phishing, ransomware).

- - Enlarge -
-
-
- - -
-
- -
-

Breaches across industry

-

This chart compares breaches across different industries. Each bar represents an industry, and segments within the bar represent different breach types within that industry. It helps visualize the composition of breaches within various industries.

- - Read More -
-
-
- - -
-
-
-
-

Map

-

This map-based visualization shows the geographical locations where breaches occurred. It uses markers or other representations to indicate breach locations across different countries or regions, providing a spatial understanding of breach occurrences.

- - Read More -
-
-
- - -
-
-
- -
-
-

About us

-

Our team

-
-
- - -
-
- - - - -
-
-

Jakub Cieplak

-

Team Leader, role in the project: distribution of tasks, creating charts using ChartJS

-
-
-
- - -
-
- - - - -
-
-

Karol Kwarciak

-

Mockaroo Expert, role in the project: creating diagrams on Mockaroo, took care of Fetch API, mental support

-
-
-
- - -
-
- - - - -
-
-

Szymon Kujawski

-

Web Developer, role in the project: creating an html wireframe, implementing the Bootstrap5 framework

-
-
-
-
-
- -
-
-

Our University

-

We study here

-
-
-
-
- - uek -
-

Uniwersytet Ekonomiczny w Krakowie

-

We study Applied Informatics here!

- UEK Website -
-
-
-
-
- -
-

© 2024 Cybersecurity Statistics Analysis Project

-
- - - diff --git a/index_moj.html b/index_moj.html deleted file mode 100644 index 2183e14..0000000 --- a/index_moj.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - Document - - - - - - - - - - - - - -
-

Security Breach Incidents Database

-

This website contains information related to different security breaches.

- -
- -
-
-

About our project

-

Security Breach Incidents Database

-
-
-
- -
-
- -
- - - -

About the Project

-
-

This project aims to analyze cybersecurity statistics to identify trends and patterns.

-
-
- -
- - - - -

Data Simulation with Mockaroo:

-
-

The database includes key fields such as breach_id, breach_date, company_name, industry, employee_count, affected_customers, and more. By utilizing a mockaroo file with realistic data, the project facilitates the development and testing of security breach incident tracking systems

-
-
- -
- - - -

Contribution to Cybersecurity:

-
-

This initiative is designed to enhance cybersecurity efforts by providing a valuable resource for understanding trends, evaluating risks, and implementing proactive measures within various industries.

-
-
-
-
- -
-
-
-

Table

- - - - - - - - - - - - - - - - - - - - - - - -
Breach IDBreach DateCompany NameEmployee CountAffected CustomersData TypeData StolenAttack TypeAttack VectorResponse TimeResponse CostNotification MethodInvestigation StatusBreach LocationBreach Country
-
- - -
- -
-
- - -
-
-
-

Work

-

Lorem ipsum dolor sit amet.

-

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Illum alias voluptate cupiditate distinctio in provident.

-



- Button -
-
-

Work

-

Lorem ipsum dolor sit amet.

-

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Illum alias voluptate cupiditate distinctio in provident.

-



- Button -
-
-
-
- - - -
-
-

About us

-

Our team

-
-
- - -
-
- - - - -
-
-

Jakub Cieplak

-

Team Leader

-
-
-
- - -
-
- - - - -
-
-

Karol Kwarciak

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores laborum nemo libero ex, sapiente et?

-
-
-
- - -
-
- - - - -
-
-

Szymon Kujawski

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores laborum nemo libero ex, sapiente et?

-
-
-
-
-
- -
-
-

Our University

-

We study here

-
-
-
-
- - uek -
-

Uniwersytet Ekonomiczny w Krakowie

-

We study Applied Informatics here!

- UEK Website -
-
-
-
-
- -
-

© 2024 Cybersecurity Statistics Analysis Project

-
- - \ No newline at end of file diff --git a/index_stare.html b/index_stare.html deleted file mode 100644 index 742cb1b..0000000 --- a/index_stare.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Security Breach Incidents Database - - - - - - -
-

Security Breach Incidents Database

-
-
-
-

About the Project

-

This project aims to analyze cybersecurity statistics to identify trends and patterns.

-
-
-

Statistics

-

Here we will present our analysis of various cybersecurity statistics.

-
-
-

Project Objective:

-

The "Security Breach Incidents Database" project aims to create a comprehensive repository of security breaches, featuring crucial details for analysis and research.

-
-
-

Data Simulation with Mockaroo:

-

The database includes key fields such as breach_id, breach_date, company_name, industry, employee_count, affected_customers, and more. By utilizing a mockaroo file with realistic data, the project facilitates the development and testing of security breach incident tracking systems

-
-
-

Contribution to Cybersecurity:

-

This initiative is designed to enhance cybersecurity efforts by providing a valuable resource for understanding trends, evaluating risks, and implementing proactive measures within various industries.

-
-
-
-

© 2022 Cybersecurity Statistics Analysis Project

-
- - diff --git a/index_stare_05.01.html b/index_stare_05.01.html deleted file mode 100644 index a717283..0000000 --- a/index_stare_05.01.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - Document - - - - - - - - - - -
-

Security Breach Incidents Database

-

This website contains information related to different security breaches.

- -
- -
-
-

About our project

-

Security Breach Incidents Database

-
-
-
- -
-
- -
- - - -

About the Project

-
-

This project aims to analyze cybersecurity statistics to identify trends and patterns.

-
-
- -
- - - - -

Data Simulation with Mockaroo:

-
-

The database includes key fields such as breach_id, breach_date, company_name, industry, employee_count, affected_customers, and more. By utilizing a mockaroo file with realistic data, the project facilitates the development and testing of security breach incident tracking systems

-
-
- -
- - - -

Contribution to Cybersecurity:

-
-

This initiative is designed to enhance cybersecurity efforts by providing a valuable resource for understanding trends, evaluating risks, and implementing proactive measures within various industries.

-
-
-
-
- -
-
-

Część Właściwa

-

We focus on ergonomics and meeting you where you work.
It's only a keystroke away

-
-
-
-
-
-

Work

-

Lorem ipsum dolor sit amet.

-

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Illum alias voluptate cupiditate distinctio in provident.

-



- Button -
-
-

Work

-

Lorem ipsum dolor sit amet.

-

Lorem, ipsum dolor sit amet consectetur adipisicing elit. Illum alias voluptate cupiditate distinctio in provident.

-



- Button -
-
-
-
- - - -
-
-

About us

-

Our team

-
-
- - -
-
- - - - -
-
-

Jakub Cieplak

-

Team Leader

-
-
-
- - -
-
- - - - -
-
-

Karol Kwarciak

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores laborum nemo libero ex, sapiente et?

-
-
-
- - -
-
- - - - -
-
-

Szymon Kujawski

-

Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores laborum nemo libero ex, sapiente et?

-
-
-
-
-
- -
-
-

Our University

-

We study here

-
-
-
-
- - uek -
-

Uniwersytet Ekonomiczny w Krakowie

-

We study Applied Informatics here!

- UEK Website -
-
-
-
-
- -
-

© 2022 Cybersecurity Statistics Analysis Project

-
- - diff --git a/node_modules/.bin/npm b/node_modules/.bin/npm deleted file mode 120000 index e804334..0000000 --- a/node_modules/.bin/npm +++ /dev/null @@ -1 +0,0 @@ -../npm/bin/npm-cli.js \ No newline at end of file diff --git a/node_modules/.bin/npx b/node_modules/.bin/npx deleted file mode 120000 index 6040b47..0000000 --- a/node_modules/.bin/npx +++ /dev/null @@ -1 +0,0 @@ -../npm/bin/npx-cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index c8288fd..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,2764 +0,0 @@ -{ - "name": "EWD", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/country-list": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/country-list/-/country-list-2.3.0.tgz", - "integrity": "sha512-qZk66RlmQm7fQjMYWku1AyjlKPogjPEorAZJG88owPExoPV8EsyCcuFLvO2afTXHEhi9liVOoyd+5A6ZS5QwaA==" - }, - "node_modules/install": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/install/-/install-0.13.0.tgz", - "integrity": "sha512-zDml/jzr2PKU9I8J/xyZBQn8rPCAY//UOYNmR01XwNwyfhEWObo2SWfSl1+0tm1u6PhxLwDnfsT/6jB7OUxqFA==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/iso-3166-1-alpha-2": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/iso-3166-1-alpha-2/-/iso-3166-1-alpha-2-1.0.1.tgz", - "integrity": "sha512-hehv4FOIieRgJ4+AOdRptTB0wD6nSX85O731hGin0ZbLCyeQ+rVMtvUPBnsnjJCDgG5jCRtU4wGHXE85lSJk9Q==", - "dependencies": { - "mout": "^1.2.3" - } - }, - "node_modules/mout": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/mout/-/mout-1.2.4.tgz", - "integrity": "sha512-mZb9uOruMWgn/fw28DG4/yE3Kehfk1zKCLhuDU2O3vlKdnBBr4XaOCqVTflJ5aODavGUPqFHZgrFX3NJVuxGhQ==" - }, - "node_modules/npm": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.5.tgz", - "integrity": "sha512-lXdZ7titEN8CH5YJk9C/aYRU9JeDxQ4d8rwIIDsvH3SMjLjHTukB2CFstMiB30zXs4vCrPN2WH6cDq1yHBeJAw==", - "bundleDependencies": [ - "@isaacs/string-locale-compare", - "@npmcli/arborist", - "@npmcli/config", - "@npmcli/fs", - "@npmcli/map-workspaces", - "@npmcli/package-json", - "@npmcli/promise-spawn", - "@npmcli/run-script", - "@sigstore/tuf", - "abbrev", - "archy", - "cacache", - "chalk", - "ci-info", - "cli-columns", - "cli-table3", - "columnify", - "fastest-levenshtein", - "fs-minipass", - "glob", - "graceful-fs", - "hosted-git-info", - "ini", - "init-package-json", - "is-cidr", - "json-parse-even-better-errors", - "libnpmaccess", - "libnpmdiff", - "libnpmexec", - "libnpmfund", - "libnpmhook", - "libnpmorg", - "libnpmpack", - "libnpmpublish", - "libnpmsearch", - "libnpmteam", - "libnpmversion", - "make-fetch-happen", - "minimatch", - "minipass", - "minipass-pipeline", - "ms", - "node-gyp", - "nopt", - "normalize-package-data", - "npm-audit-report", - "npm-install-checks", - "npm-package-arg", - "npm-pick-manifest", - "npm-profile", - "npm-registry-fetch", - "npm-user-validate", - "npmlog", - "p-map", - "pacote", - "parse-conflict-json", - "proc-log", - "qrcode-terminal", - "read", - "semver", - "spdx-expression-parse", - "ssri", - "strip-ansi", - "supports-color", - "tar", - "text-table", - "tiny-relative-date", - "treeverse", - "validate-npm-package-name", - "which", - "write-file-atomic" - ], - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/arborist": "^7.2.1", - "@npmcli/config": "^8.0.2", - "@npmcli/fs": "^3.1.0", - "@npmcli/map-workspaces": "^3.0.4", - "@npmcli/package-json": "^5.0.0", - "@npmcli/promise-spawn": "^7.0.0", - "@npmcli/run-script": "^7.0.2", - "@sigstore/tuf": "^2.2.0", - "abbrev": "^2.0.0", - "archy": "~1.0.0", - "cacache": "^18.0.1", - "chalk": "^5.3.0", - "ci-info": "^4.0.0", - "cli-columns": "^4.0.0", - "cli-table3": "^0.6.3", - "columnify": "^1.6.0", - "fastest-levenshtein": "^1.0.16", - "fs-minipass": "^3.0.3", - "glob": "^10.3.10", - "graceful-fs": "^4.2.11", - "hosted-git-info": "^7.0.1", - "ini": "^4.1.1", - "init-package-json": "^6.0.0", - "is-cidr": "^5.0.3", - "json-parse-even-better-errors": "^3.0.1", - "libnpmaccess": "^8.0.1", - "libnpmdiff": "^6.0.3", - "libnpmexec": "^7.0.4", - "libnpmfund": "^5.0.1", - "libnpmhook": "^10.0.0", - "libnpmorg": "^6.0.1", - "libnpmpack": "^6.0.3", - "libnpmpublish": "^9.0.2", - "libnpmsearch": "^7.0.0", - "libnpmteam": "^6.0.0", - "libnpmversion": "^5.0.1", - "make-fetch-happen": "^13.0.0", - "minimatch": "^9.0.3", - "minipass": "^7.0.4", - "minipass-pipeline": "^1.2.4", - "ms": "^2.1.2", - "node-gyp": "^10.0.1", - "nopt": "^7.2.0", - "normalize-package-data": "^6.0.0", - "npm-audit-report": "^5.0.0", - "npm-install-checks": "^6.3.0", - "npm-package-arg": "^11.0.1", - "npm-pick-manifest": "^9.0.0", - "npm-profile": "^9.0.0", - "npm-registry-fetch": "^16.1.0", - "npm-user-validate": "^2.0.0", - "npmlog": "^7.0.1", - "p-map": "^4.0.0", - "pacote": "^17.0.5", - "parse-conflict-json": "^3.0.1", - "proc-log": "^3.0.0", - "qrcode-terminal": "^0.12.0", - "read": "^2.1.0", - "semver": "^7.5.4", - "spdx-expression-parse": "^3.0.1", - "ssri": "^10.0.5", - "strip-ansi": "^7.1.0", - "supports-color": "^9.4.0", - "tar": "^6.2.0", - "text-table": "~0.2.0", - "tiny-relative-date": "^1.3.0", - "treeverse": "^3.0.0", - "validate-npm-package-name": "^5.0.0", - "which": "^4.0.0", - "write-file-atomic": "^5.0.1" - }, - "bin": { - "npm": "bin/npm-cli.js", - "npx": "bin/npx-cli.js" - }, - "engines": { - "node": "^18.17.0 || >=20.5.0" - } - }, - "node_modules/npm/node_modules/@colors/colors": { - "version": "1.5.0", - "inBundle": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/npm/node_modules/@isaacs/cliui": { - "version": "8.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm/node_modules/@isaacs/string-locale-compare": { - "version": "1.1.0", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/@npmcli/agent": { - "version": "2.2.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "agent-base": "^7.1.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.1", - "lru-cache": "^10.0.1", - "socks-proxy-agent": "^8.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.2.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^3.1.0", - "@npmcli/installed-package-contents": "^2.0.2", - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/metavuln-calculator": "^7.0.0", - "@npmcli/name-from-folder": "^2.0.0", - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.0.0", - "@npmcli/query": "^3.0.1", - "@npmcli/run-script": "^7.0.2", - "bin-links": "^4.0.1", - "cacache": "^18.0.0", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^7.0.1", - "json-parse-even-better-errors": "^3.0.0", - "json-stringify-nice": "^1.1.4", - "minimatch": "^9.0.0", - "nopt": "^7.0.0", - "npm-install-checks": "^6.2.0", - "npm-package-arg": "^11.0.1", - "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^16.0.0", - "npmlog": "^7.0.1", - "pacote": "^17.0.4", - "parse-conflict-json": "^3.0.0", - "proc-log": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.2", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.7", - "ssri": "^10.0.5", - "treeverse": "^3.0.0", - "walk-up-path": "^3.0.1" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/config": { - "version": "8.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/map-workspaces": "^3.0.2", - "ci-info": "^4.0.0", - "ini": "^4.1.0", - "nopt": "^7.0.0", - "proc-log": "^3.0.0", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.5", - "walk-up-path": "^3.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/disparity-colors": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "ansi-styles": "^4.3.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles": { - "version": "4.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/npm/node_modules/@npmcli/fs": { - "version": "3.1.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/git": { - "version": "5.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/promise-spawn": "^7.0.0", - "lru-cache": "^10.0.1", - "npm-pick-manifest": "^9.0.0", - "proc-log": "^3.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^4.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/installed-package-contents": { - "version": "2.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "bin": { - "installed-package-contents": "lib/index.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/map-workspaces": { - "version": "3.0.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/name-from-folder": "^2.0.0", - "glob": "^10.2.2", - "minimatch": "^9.0.0", - "read-package-json-fast": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/metavuln-calculator": { - "version": "7.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "cacache": "^18.0.0", - "json-parse-even-better-errors": "^3.0.0", - "pacote": "^17.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/name-from-folder": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/node-gyp": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/package-json": { - "version": "5.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/git": "^5.0.0", - "glob": "^10.2.2", - "hosted-git-info": "^7.0.0", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/promise-spawn": { - "version": "7.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "which": "^4.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/query": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@npmcli/run-script": { - "version": "7.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^7.0.0", - "node-gyp": "^10.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^4.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "inBundle": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/npm/node_modules/@sigstore/bundle": { - "version": "2.1.0", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/protobuf-specs": { - "version": "0.2.1", - "inBundle": true, - "license": "Apache-2.0", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/sign": { - "version": "2.2.0", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.1.0", - "@sigstore/protobuf-specs": "^0.2.1", - "make-fetch-happen": "^13.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@sigstore/tuf": { - "version": "2.2.0", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1", - "tuf-js": "^2.1.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@tufjs/canonical-json": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/@tufjs/models": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.3" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/abbrev": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/abort-controller": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, - "node_modules/npm/node_modules/agent-base": { - "version": "7.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/npm/node_modules/aggregate-error": { - "version": "3.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/ansi-regex": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/npm/node_modules/ansi-styles": { - "version": "6.2.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/npm/node_modules/aproba": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/archy": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/are-we-there-yet": { - "version": "4.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^4.1.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/balanced-match": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/base64-js": { - "version": "1.5.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/bin-links": { - "version": "4.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "cmd-shim": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "read-cmd-shim": "^4.0.0", - "write-file-atomic": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/binary-extensions": { - "version": "2.2.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/brace-expansion": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/npm/node_modules/buffer": { - "version": "6.0.3", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/npm/node_modules/builtins": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/npm/node_modules/cacache": { - "version": "18.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^3.1.0", - "fs-minipass": "^3.0.0", - "glob": "^10.2.2", - "lru-cache": "^10.0.1", - "minipass": "^7.0.3", - "minipass-collect": "^2.0.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/chalk": { - "version": "5.3.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/npm/node_modules/chownr": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/ci-info": { - "version": "4.0.0", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/cidr-regex": { - "version": "4.0.3", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "ip-regex": "^5.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/npm/node_modules/clean-stack": { - "version": "2.2.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/npm/node_modules/cli-columns": { - "version": "4.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/cli-table3": { - "version": "0.6.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.2.0" - }, - "engines": { - "node": "10.* || >= 12.*" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - } - }, - "node_modules/npm/node_modules/clone": { - "version": "1.0.4", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/npm/node_modules/cmd-shim": { - "version": "6.0.2", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/color-convert": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/npm/node_modules/color-name": { - "version": "1.1.4", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/color-support": { - "version": "1.1.3", - "inBundle": true, - "license": "ISC", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/npm/node_modules/columnify": { - "version": "1.6.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "strip-ansi": "^6.0.1", - "wcwidth": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/npm/node_modules/columnify/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/columnify/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/common-ancestor-path": { - "version": "1.0.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/console-control-strings": { - "version": "1.1.0", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/cross-spawn": { - "version": "7.0.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/cssesc": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm/node_modules/debug": { - "version": "4.3.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/npm/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/defaults": { - "version": "1.0.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "clone": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm/node_modules/delegates": { - "version": "1.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/diff": { - "version": "5.1.0", - "inBundle": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/npm/node_modules/eastasianwidth": { - "version": "0.2.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/emoji-regex": { - "version": "8.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/encoding": { - "version": "0.1.13", - "inBundle": true, - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/npm/node_modules/env-paths": { - "version": "2.2.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/npm/node_modules/err-code": { - "version": "2.0.3", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/event-target-shim": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/npm/node_modules/events": { - "version": "3.3.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/npm/node_modules/exponential-backoff": { - "version": "3.1.1", - "inBundle": true, - "license": "Apache-2.0" - }, - "node_modules/npm/node_modules/fastest-levenshtein": { - "version": "1.0.16", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 4.9.1" - } - }, - "node_modules/npm/node_modules/foreground-child": { - "version": "3.1.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/fs-minipass": { - "version": "3.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/function-bind": { - "version": "1.1.2", - "inBundle": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/npm/node_modules/gauge": { - "version": "5.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^4.0.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/gauge/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/gauge/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/glob": { - "version": "10.3.10", - "inBundle": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/graceful-fs": { - "version": "4.2.11", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/has-unicode": { - "version": "2.0.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/hasown": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/npm/node_modules/hosted-git-info": { - "version": "7.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/http-cache-semantics": { - "version": "4.1.1", - "inBundle": true, - "license": "BSD-2-Clause" - }, - "node_modules/npm/node_modules/http-proxy-agent": { - "version": "7.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/npm/node_modules/https-proxy-agent": { - "version": "7.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/npm/node_modules/iconv-lite": { - "version": "0.6.3", - "inBundle": true, - "license": "MIT", - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm/node_modules/ieee754": { - "version": "1.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "BSD-3-Clause" - }, - "node_modules/npm/node_modules/ignore-walk": { - "version": "6.0.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minimatch": "^9.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/imurmurhash": { - "version": "0.1.4", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/npm/node_modules/indent-string": { - "version": "4.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/ini": { - "version": "4.1.1", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/init-package-json": { - "version": "6.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-package-arg": "^11.0.0", - "promzard": "^1.0.0", - "read": "^2.0.0", - "read-package-json": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^5.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/ip": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/ip-regex": { - "version": "5.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm/node_modules/is-cidr": { - "version": "5.0.3", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "cidr-regex": "4.0.3" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/npm/node_modules/is-core-module": { - "version": "2.13.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/npm/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/is-lambda": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/isexe": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/jackspeak": { - "version": "2.3.6", - "inBundle": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/npm/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/json-stringify-nice": { - "version": "1.1.4", - "inBundle": true, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/jsonparse": { - "version": "1.3.1", - "engines": [ - "node >= 0.2.0" - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/just-diff": { - "version": "6.0.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/just-diff-apply": { - "version": "5.5.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/libnpmaccess": { - "version": "8.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-package-arg": "^11.0.1", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmdiff": { - "version": "6.0.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/disparity-colors": "^3.0.0", - "@npmcli/installed-package-contents": "^2.0.2", - "binary-extensions": "^2.2.0", - "diff": "^5.1.0", - "minimatch": "^9.0.0", - "npm-package-arg": "^11.0.1", - "pacote": "^17.0.4", - "tar": "^6.2.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmexec": { - "version": "7.0.5", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/run-script": "^7.0.2", - "ci-info": "^4.0.0", - "npm-package-arg": "^11.0.1", - "npmlog": "^7.0.1", - "pacote": "^17.0.4", - "proc-log": "^3.0.0", - "read": "^2.0.0", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.7", - "walk-up-path": "^3.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/arborist": "^7.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmhook": { - "version": "10.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmorg": { - "version": "6.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmpack": { - "version": "6.0.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/run-script": "^7.0.2", - "npm-package-arg": "^11.0.1", - "pacote": "^17.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmpublish": { - "version": "9.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "ci-info": "^4.0.0", - "normalize-package-data": "^6.0.0", - "npm-package-arg": "^11.0.1", - "npm-registry-fetch": "^16.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.7", - "sigstore": "^2.1.0", - "ssri": "^10.0.5" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmsearch": { - "version": "7.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmteam": { - "version": "6.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/libnpmversion": { - "version": "5.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/git": "^5.0.3", - "@npmcli/run-script": "^7.0.2", - "json-parse-even-better-errors": "^3.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/lru-cache": { - "version": "10.1.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/npm/node_modules/make-fetch-happen": { - "version": "13.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/agent": "^2.0.0", - "cacache": "^18.0.0", - "http-cache-semantics": "^4.1.1", - "is-lambda": "^1.0.1", - "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "ssri": "^10.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/minimatch": { - "version": "9.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/minipass": { - "version": "7.0.4", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/npm/node_modules/minipass-collect": { - "version": "2.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/npm/node_modules/minipass-fetch": { - "version": "3.0.4", - "inBundle": true, - "license": "MIT", - "dependencies": { - "minipass": "^7.0.3", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "optionalDependencies": { - "encoding": "^0.1.13" - } - }, - "node_modules/npm/node_modules/minipass-flush": { - "version": "1.0.5", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/minipass-flush/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minipass-json-stream": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" - } - }, - "node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minipass-pipeline": { - "version": "1.2.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minipass-sized": { - "version": "1.0.3", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minipass-sized/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/minizlib": { - "version": "2.1.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/mkdirp": { - "version": "1.0.4", - "inBundle": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/ms": { - "version": "2.1.3", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/mute-stream": { - "version": "1.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/negotiator": { - "version": "0.6.3", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/npm/node_modules/node-gyp": { - "version": "10.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "env-paths": "^2.2.0", - "exponential-backoff": "^3.1.1", - "glob": "^10.3.10", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^13.0.0", - "nopt": "^7.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^4.0.0" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/nopt": { - "version": "7.2.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "abbrev": "^2.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/normalize-package-data": { - "version": "6.0.0", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^7.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-audit-report": { - "version": "5.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-bundled": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-install-checks": { - "version": "6.3.0", - "inBundle": true, - "license": "BSD-2-Clause", - "dependencies": { - "semver": "^7.1.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-normalize-package-bin": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-package-arg": { - "version": "11.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "hosted-git-info": "^7.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.5", - "validate-npm-package-name": "^5.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-packlist": { - "version": "8.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "ignore-walk": "^6.0.4" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-pick-manifest": { - "version": "9.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-install-checks": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "npm-package-arg": "^11.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-profile": { - "version": "9.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "npm-registry-fetch": "^16.0.0", - "proc-log": "^3.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-registry-fetch": { - "version": "16.1.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "make-fetch-happen": "^13.0.0", - "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^11.0.0", - "proc-log": "^3.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npm-user-validate": { - "version": "2.0.0", - "inBundle": true, - "license": "BSD-2-Clause", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/npmlog": { - "version": "7.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^4.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^5.0.0", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/p-map": { - "version": "4.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm/node_modules/pacote": { - "version": "17.0.5", - "inBundle": true, - "license": "ISC", - "dependencies": { - "@npmcli/git": "^5.0.0", - "@npmcli/installed-package-contents": "^2.0.1", - "@npmcli/promise-spawn": "^7.0.0", - "@npmcli/run-script": "^7.0.0", - "cacache": "^18.0.0", - "fs-minipass": "^3.0.0", - "minipass": "^7.0.2", - "npm-package-arg": "^11.0.0", - "npm-packlist": "^8.0.0", - "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^16.0.0", - "proc-log": "^3.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^7.0.0", - "read-package-json-fast": "^3.0.0", - "sigstore": "^2.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "lib/bin.js" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/parse-conflict-json": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "just-diff": "^6.0.0", - "just-diff-apply": "^5.2.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/path-key": { - "version": "3.1.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/path-scurry": { - "version": "1.10.1", - "inBundle": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/postcss-selector-parser": { - "version": "6.0.13", - "inBundle": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm/node_modules/proc-log": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/process": { - "version": "0.11.10", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/npm/node_modules/promise-all-reject-late": { - "version": "1.0.1", - "inBundle": true, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/promise-call-limit": { - "version": "1.0.2", - "inBundle": true, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/promise-inflight": { - "version": "1.0.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/promise-retry": { - "version": "2.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/promzard": { - "version": "1.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "read": "^2.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/qrcode-terminal": { - "version": "0.12.0", - "inBundle": true, - "bin": { - "qrcode-terminal": "bin/qrcode-terminal.js" - } - }, - "node_modules/npm/node_modules/read": { - "version": "2.1.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "mute-stream": "~1.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/read-cmd-shim": { - "version": "4.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/read-package-json": { - "version": "7.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "glob": "^10.2.2", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/read-package-json-fast": { - "version": "3.0.2", - "inBundle": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/readable-stream": { - "version": "4.4.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/npm/node_modules/retry": { - "version": "0.12.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/npm/node_modules/safe-buffer": { - "version": "5.2.1", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/safer-buffer": { - "version": "2.1.2", - "inBundle": true, - "license": "MIT", - "optional": true - }, - "node_modules/npm/node_modules/semver": { - "version": "7.5.4", - "inBundle": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/set-blocking": { - "version": "2.0.0", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/shebang-command": { - "version": "2.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/shebang-regex": { - "version": "3.0.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/signal-exit": { - "version": "4.1.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/npm/node_modules/sigstore": { - "version": "2.1.0", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/bundle": "^2.1.0", - "@sigstore/protobuf-specs": "^0.2.1", - "@sigstore/sign": "^2.1.0", - "@sigstore/tuf": "^2.1.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/smart-buffer": { - "version": "4.2.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/npm/node_modules/socks": { - "version": "2.7.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/npm/node_modules/socks-proxy-agent": { - "version": "8.0.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "socks": "^2.7.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/npm/node_modules/spdx-correct": { - "version": "3.2.0", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/npm/node_modules/spdx-exceptions": { - "version": "2.3.0", - "inBundle": true, - "license": "CC-BY-3.0" - }, - "node_modules/npm/node_modules/spdx-expression-parse": { - "version": "3.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/npm/node_modules/spdx-license-ids": { - "version": "3.0.16", - "inBundle": true, - "license": "CC0-1.0" - }, - "node_modules/npm/node_modules/ssri": { - "version": "10.0.5", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/string_decoder": { - "version": "1.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/npm/node_modules/string-width": { - "version": "4.2.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "inBundle": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/string-width/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/strip-ansi": { - "version": "7.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/npm/node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/supports-color": { - "version": "9.4.0", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/npm/node_modules/tar": { - "version": "6.2.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/npm/node_modules/tar/node_modules/fs-minipass": { - "version": "2.1.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/npm/node_modules/tar/node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "inBundle": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/tar/node_modules/minipass": { - "version": "5.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/text-table": { - "version": "0.2.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/tiny-relative-date": { - "version": "1.3.0", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/treeverse": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/tuf-js": { - "version": "2.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "@tufjs/models": "2.0.0", - "debug": "^4.3.4", - "make-fetch-happen": "^13.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/unique-filename": { - "version": "3.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "unique-slug": "^4.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/unique-slug": { - "version": "4.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/util-deprecate": { - "version": "1.0.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/validate-npm-package-license": { - "version": "3.0.4", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/npm/node_modules/validate-npm-package-name": { - "version": "5.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "builtins": "^5.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/walk-up-path": { - "version": "3.0.1", - "inBundle": true, - "license": "ISC" - }, - "node_modules/npm/node_modules/wcwidth": { - "version": "1.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "defaults": "^1.0.3" - } - }, - "node_modules/npm/node_modules/which": { - "version": "4.0.0", - "inBundle": true, - "license": "ISC", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/which/node_modules/isexe": { - "version": "3.1.1", - "inBundle": true, - "license": "ISC", - "engines": { - "node": ">=16" - } - }, - "node_modules/npm/node_modules/wide-align": { - "version": "1.1.5", - "inBundle": true, - "license": "ISC", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/npm/node_modules/wrap-ansi": { - "version": "8.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/npm/node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "9.2.2", - "inBundle": true, - "license": "MIT" - }, - "node_modules/npm/node_modules/wrap-ansi/node_modules/string-width": { - "version": "5.1.2", - "inBundle": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm/node_modules/write-file-atomic": { - "version": "5.0.1", - "inBundle": true, - "license": "ISC", - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/npm/node_modules/yallist": { - "version": "4.0.0", - "inBundle": true, - "license": "ISC" - } - } -} diff --git a/node_modules/country-list/LICENSE b/node_modules/country-list/LICENSE deleted file mode 100644 index d1744a2..0000000 --- a/node_modules/country-list/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Fannar Snær Harðarson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/country-list/README.md b/node_modules/country-list/README.md deleted file mode 100644 index b9c8ef7..0000000 --- a/node_modules/country-list/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# country-list - -[![Build Status](https://travis-ci.com/fannarsh/country-list.svg?branch=master)](https://travis-ci.com/fannarsh/country-list) [![Coverage Status](https://coveralls.io/repos/github/fannarsh/country-list/badge.svg?branch=master)](https://coveralls.io/github/fannarsh/country-list?branch=master) - -Maps ISO 3166-1-alpha-2 codes to English country names and vice versa. - -Uses data from https://www.iso.org/iso-3166-country-codes.html - -[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) - -### Looking for Version 1 -You can find version 1.* of country-list [here](https://github.com/fannarsh/country-list/tree/1.x). - -## Example - -``` js -const { getCode, getName } = require('country-list'); - -console.log(getName('IS')); // Iceland -console.log(getCode('Iceland')); // IS -console.log(getCode('Nowhere-to-be-found-land')); // undefined -``` - -And how to change the name of a country -``` js -const { overwrite, getName } = require('country-list'); -overwrite([{ - code: 'TW', - name: 'Taiwan' -}]) - -console.log(getName('TW')); // Taiwan -``` - -## Methods - -Usage: - -``` js -const countryList = require('country-list'); -``` -All input is case-insensitive. - -### overwrite(countries) - -Expects an array of country objects containing `code` and `name` properties. -``` js -[{ - code: 'TW', - name: 'Taiwan' -}] -``` - -### getName(code) - -Expects a two-digit country code. -Returns the name for that country. -If not found, it returns `undefined`. - -### getCode(name) - -Expects the English country name. -Returns the code for that country. -If not found, it returns `undefined`. - -### getNames() - -Returns an array of all country names. - -### getCodes() - -Returns an array of all country codes. - -### getNameList() - -Returns a key-value object of all countries using the name as key. - -### getCodeList() - -Returns a key-value object of all countries using the code as key. - -### getData() - -Returns an array of all country information, in the same format as it gets imported. - -## Install - -``` cli -npm install country-list -``` - -## Related Projects - - [datasets/country-list](https://github.com/datasets/country-list) - - [srcagency/iso-3166-1-codes](https://github.com/srcagency/iso-3166-1-codes) - - [olahol/iso-3166-2.js](https://github.com/olahol/iso-3166-2.js) - -## License - -MIT - -## Source - - [ISO (International Organization for Standardization)](https://www.iso.org/iso-3166-country-codes.html) ->ISO makes the list of alpha-2 country codes available for internal use and non-commercial purposes free of charge. diff --git a/node_modules/country-list/country-list.js b/node_modules/country-list/country-list.js deleted file mode 100644 index 12018c4..0000000 --- a/node_modules/country-list/country-list.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -var data = require('./data.json') - -/** Precompute name and code lookups. */ -var nameMap = {} -var codeMap = {} -data.forEach(mapCodeAndName) - -function mapCodeAndName (country) { - nameMap[country.name.toLowerCase()] = country.code - codeMap[country.code.toLowerCase()] = country.name -} - -exports.overwrite = function overwrite (countries) { - if (!countries || !countries.length) return - countries.forEach(function (country) { - var foundIndex = data.findIndex(function (item) { - return item.code === country.code - }) - data[foundIndex] = country - mapCodeAndName(country) - }) -} - -exports.getCode = function getCode (name) { - return nameMap[name.toLowerCase()] -} - -exports.getName = function getName (code) { - return codeMap[code.toLowerCase()] -} - -exports.getNames = function getNames () { - return data.map(function (country) { - return country.name - }) -} - -exports.getCodes = function getCodes () { - return data.map(function (country) { - return country.code - }) -} - -exports.getCodeList = function getCodeList () { - return codeMap -} - -exports.getNameList = function getNameList () { - return nameMap -} - -exports.getData = function getData () { - return data -} diff --git a/node_modules/country-list/data.json b/node_modules/country-list/data.json deleted file mode 100644 index db27588..0000000 --- a/node_modules/country-list/data.json +++ /dev/null @@ -1,251 +0,0 @@ -[ - { "code": "AD", "name": "Andorra" }, - { "code": "AE", "name": "United Arab Emirates" }, - { "code": "AF", "name": "Afghanistan" }, - { "code": "AG", "name": "Antigua and Barbuda" }, - { "code": "AI", "name": "Anguilla" }, - { "code": "AL", "name": "Albania" }, - { "code": "AM", "name": "Armenia" }, - { "code": "AO", "name": "Angola" }, - { "code": "AQ", "name": "Antarctica" }, - { "code": "AR", "name": "Argentina" }, - { "code": "AS", "name": "American Samoa" }, - { "code": "AT", "name": "Austria" }, - { "code": "AU", "name": "Australia" }, - { "code": "AW", "name": "Aruba" }, - { "code": "AX", "name": "Åland Islands" }, - { "code": "AZ", "name": "Azerbaijan" }, - { "code": "BA", "name": "Bosnia and Herzegovina" }, - { "code": "BB", "name": "Barbados" }, - { "code": "BD", "name": "Bangladesh" }, - { "code": "BE", "name": "Belgium" }, - { "code": "BF", "name": "Burkina Faso" }, - { "code": "BG", "name": "Bulgaria" }, - { "code": "BH", "name": "Bahrain" }, - { "code": "BI", "name": "Burundi" }, - { "code": "BJ", "name": "Benin" }, - { "code": "BL", "name": "Saint Barthélemy" }, - { "code": "BM", "name": "Bermuda" }, - { "code": "BN", "name": "Brunei Darussalam" }, - { "code": "BO", "name": "Bolivia, Plurinational State of" }, - { "code": "BQ", "name": "Bonaire, Sint Eustatius and Saba" }, - { "code": "BR", "name": "Brazil" }, - { "code": "BS", "name": "Bahamas" }, - { "code": "BT", "name": "Bhutan" }, - { "code": "BV", "name": "Bouvet Island" }, - { "code": "BW", "name": "Botswana" }, - { "code": "BY", "name": "Belarus" }, - { "code": "BZ", "name": "Belize" }, - { "code": "CA", "name": "Canada" }, - { "code": "CC", "name": "Cocos (Keeling) Islands" }, - { "code": "CD", "name": "Congo, Democratic Republic of the" }, - { "code": "CF", "name": "Central African Republic" }, - { "code": "CG", "name": "Congo" }, - { "code": "CH", "name": "Switzerland" }, - { "code": "CI", "name": "Côte d'Ivoire" }, - { "code": "CK", "name": "Cook Islands" }, - { "code": "CL", "name": "Chile" }, - { "code": "CM", "name": "Cameroon" }, - { "code": "CN", "name": "China" }, - { "code": "CO", "name": "Colombia" }, - { "code": "CR", "name": "Costa Rica" }, - { "code": "CU", "name": "Cuba" }, - { "code": "CV", "name": "Cabo Verde" }, - { "code": "CW", "name": "Curaçao" }, - { "code": "CX", "name": "Christmas Island" }, - { "code": "CY", "name": "Cyprus" }, - { "code": "CZ", "name": "Czechia" }, - { "code": "DE", "name": "Germany" }, - { "code": "DJ", "name": "Djibouti" }, - { "code": "DK", "name": "Denmark" }, - { "code": "DM", "name": "Dominica" }, - { "code": "DO", "name": "Dominican Republic" }, - { "code": "DZ", "name": "Algeria" }, - { "code": "EC", "name": "Ecuador" }, - { "code": "EE", "name": "Estonia" }, - { "code": "EG", "name": "Egypt" }, - { "code": "EH", "name": "Western Sahara" }, - { "code": "ER", "name": "Eritrea" }, - { "code": "ES", "name": "Spain" }, - { "code": "ET", "name": "Ethiopia" }, - { "code": "FI", "name": "Finland" }, - { "code": "FJ", "name": "Fiji" }, - { "code": "FK", "name": "Falkland Islands (Malvinas)" }, - { "code": "FM", "name": "Micronesia, Federated States of" }, - { "code": "FO", "name": "Faroe Islands" }, - { "code": "FR", "name": "France" }, - { "code": "GA", "name": "Gabon" }, - { "code": "GB", "name": "United Kingdom of Great Britain and Northern Ireland" }, - { "code": "GD", "name": "Grenada" }, - { "code": "GE", "name": "Georgia" }, - { "code": "GF", "name": "French Guiana" }, - { "code": "GG", "name": "Guernsey" }, - { "code": "GH", "name": "Ghana" }, - { "code": "GI", "name": "Gibraltar" }, - { "code": "GL", "name": "Greenland" }, - { "code": "GM", "name": "Gambia" }, - { "code": "GN", "name": "Guinea" }, - { "code": "GP", "name": "Guadeloupe" }, - { "code": "GQ", "name": "Equatorial Guinea" }, - { "code": "GR", "name": "Greece" }, - { "code": "GS", "name": "South Georgia and the South Sandwich Islands" }, - { "code": "GT", "name": "Guatemala" }, - { "code": "GU", "name": "Guam" }, - { "code": "GW", "name": "Guinea-Bissau" }, - { "code": "GY", "name": "Guyana" }, - { "code": "HK", "name": "Hong Kong" }, - { "code": "HM", "name": "Heard Island and McDonald Islands" }, - { "code": "HN", "name": "Honduras" }, - { "code": "HR", "name": "Croatia" }, - { "code": "HT", "name": "Haiti" }, - { "code": "HU", "name": "Hungary" }, - { "code": "ID", "name": "Indonesia" }, - { "code": "IE", "name": "Ireland" }, - { "code": "IL", "name": "Israel" }, - { "code": "IM", "name": "Isle of Man" }, - { "code": "IN", "name": "India" }, - { "code": "IO", "name": "British Indian Ocean Territory" }, - { "code": "IQ", "name": "Iraq" }, - { "code": "IR", "name": "Iran, Islamic Republic of" }, - { "code": "IS", "name": "Iceland" }, - { "code": "IT", "name": "Italy" }, - { "code": "JE", "name": "Jersey" }, - { "code": "JM", "name": "Jamaica" }, - { "code": "JO", "name": "Jordan" }, - { "code": "JP", "name": "Japan" }, - { "code": "KE", "name": "Kenya" }, - { "code": "KG", "name": "Kyrgyzstan" }, - { "code": "KH", "name": "Cambodia" }, - { "code": "KI", "name": "Kiribati" }, - { "code": "KM", "name": "Comoros" }, - { "code": "KN", "name": "Saint Kitts and Nevis" }, - { "code": "KP", "name": "Korea, Democratic People's Republic of" }, - { "code": "KR", "name": "Korea, Republic of" }, - { "code": "KW", "name": "Kuwait" }, - { "code": "KY", "name": "Cayman Islands" }, - { "code": "KZ", "name": "Kazakhstan" }, - { "code": "LA", "name": "Lao People's Democratic Republic" }, - { "code": "LB", "name": "Lebanon" }, - { "code": "LC", "name": "Saint Lucia" }, - { "code": "LI", "name": "Liechtenstein" }, - { "code": "LK", "name": "Sri Lanka" }, - { "code": "LR", "name": "Liberia" }, - { "code": "LS", "name": "Lesotho" }, - { "code": "LT", "name": "Lithuania" }, - { "code": "LU", "name": "Luxembourg" }, - { "code": "LV", "name": "Latvia" }, - { "code": "LY", "name": "Libya" }, - { "code": "MA", "name": "Morocco" }, - { "code": "MC", "name": "Monaco" }, - { "code": "MD", "name": "Moldova, Republic of" }, - { "code": "ME", "name": "Montenegro" }, - { "code": "MF", "name": "Saint Martin, (French part)" }, - { "code": "MG", "name": "Madagascar" }, - { "code": "MH", "name": "Marshall Islands" }, - { "code": "MK", "name": "North Macedonia" }, - { "code": "ML", "name": "Mali" }, - { "code": "MM", "name": "Myanmar" }, - { "code": "MN", "name": "Mongolia" }, - { "code": "MO", "name": "Macao" }, - { "code": "MP", "name": "Northern Mariana Islands" }, - { "code": "MQ", "name": "Martinique" }, - { "code": "MR", "name": "Mauritania" }, - { "code": "MS", "name": "Montserrat" }, - { "code": "MT", "name": "Malta" }, - { "code": "MU", "name": "Mauritius" }, - { "code": "MV", "name": "Maldives" }, - { "code": "MW", "name": "Malawi" }, - { "code": "MX", "name": "Mexico" }, - { "code": "MY", "name": "Malaysia" }, - { "code": "MZ", "name": "Mozambique" }, - { "code": "NA", "name": "Namibia" }, - { "code": "NC", "name": "New Caledonia" }, - { "code": "NE", "name": "Niger" }, - { "code": "NF", "name": "Norfolk Island" }, - { "code": "NG", "name": "Nigeria" }, - { "code": "NI", "name": "Nicaragua" }, - { "code": "NL", "name": "Netherlands" }, - { "code": "NO", "name": "Norway" }, - { "code": "NP", "name": "Nepal" }, - { "code": "NR", "name": "Nauru" }, - { "code": "NU", "name": "Niue" }, - { "code": "NZ", "name": "New Zealand" }, - { "code": "OM", "name": "Oman" }, - { "code": "PA", "name": "Panama" }, - { "code": "PE", "name": "Peru" }, - { "code": "PF", "name": "French Polynesia" }, - { "code": "PG", "name": "Papua New Guinea" }, - { "code": "PH", "name": "Philippines" }, - { "code": "PK", "name": "Pakistan" }, - { "code": "PL", "name": "Poland" }, - { "code": "PM", "name": "Saint Pierre and Miquelon" }, - { "code": "PN", "name": "Pitcairn" }, - { "code": "PR", "name": "Puerto Rico" }, - { "code": "PS", "name": "Palestine, State of" }, - { "code": "PT", "name": "Portugal" }, - { "code": "PW", "name": "Palau" }, - { "code": "PY", "name": "Paraguay" }, - { "code": "QA", "name": "Qatar" }, - { "code": "RE", "name": "Réunion" }, - { "code": "RO", "name": "Romania" }, - { "code": "RS", "name": "Serbia" }, - { "code": "RU", "name": "Russian Federation" }, - { "code": "RW", "name": "Rwanda" }, - { "code": "SA", "name": "Saudi Arabia" }, - { "code": "SB", "name": "Solomon Islands" }, - { "code": "SC", "name": "Seychelles" }, - { "code": "SD", "name": "Sudan" }, - { "code": "SE", "name": "Sweden" }, - { "code": "SG", "name": "Singapore" }, - { "code": "SH", "name": "Saint Helena, Ascension and Tristan da Cunha" }, - { "code": "SI", "name": "Slovenia" }, - { "code": "SJ", "name": "Svalbard and Jan Mayen" }, - { "code": "SK", "name": "Slovakia" }, - { "code": "SL", "name": "Sierra Leone" }, - { "code": "SM", "name": "San Marino" }, - { "code": "SN", "name": "Senegal" }, - { "code": "SO", "name": "Somalia" }, - { "code": "SR", "name": "Suriname" }, - { "code": "SS", "name": "South Sudan" }, - { "code": "ST", "name": "Sao Tome and Principe" }, - { "code": "SV", "name": "El Salvador" }, - { "code": "SX", "name": "Sint Maarten, (Dutch part)" }, - { "code": "SY", "name": "Syrian Arab Republic" }, - { "code": "SZ", "name": "Eswatini" }, - { "code": "TC", "name": "Turks and Caicos Islands" }, - { "code": "TD", "name": "Chad" }, - { "code": "TF", "name": "French Southern Territories" }, - { "code": "TG", "name": "Togo" }, - { "code": "TH", "name": "Thailand" }, - { "code": "TJ", "name": "Tajikistan" }, - { "code": "TK", "name": "Tokelau" }, - { "code": "TL", "name": "Timor-Leste" }, - { "code": "TM", "name": "Turkmenistan" }, - { "code": "TN", "name": "Tunisia" }, - { "code": "TO", "name": "Tonga" }, - { "code": "TR", "name": "Türkiye" }, - { "code": "TT", "name": "Trinidad and Tobago" }, - { "code": "TV", "name": "Tuvalu" }, - { "code": "TW", "name": "Taiwan, Province of China" }, - { "code": "TZ", "name": "Tanzania, United Republic of" }, - { "code": "UA", "name": "Ukraine" }, - { "code": "UG", "name": "Uganda" }, - { "code": "UM", "name": "United States Minor Outlying Islands" }, - { "code": "US", "name": "United States of America" }, - { "code": "UY", "name": "Uruguay" }, - { "code": "UZ", "name": "Uzbekistan" }, - { "code": "VA", "name": "Holy See" }, - { "code": "VC", "name": "Saint Vincent and the Grenadines" }, - { "code": "VE", "name": "Venezuela, Bolivarian Republic of" }, - { "code": "VG", "name": "Virgin Islands, British" }, - { "code": "VI", "name": "Virgin Islands, U.S." }, - { "code": "VN", "name": "Viet Nam" }, - { "code": "VU", "name": "Vanuatu" }, - { "code": "WF", "name": "Wallis and Futuna" }, - { "code": "WS", "name": "Samoa" }, - { "code": "YE", "name": "Yemen" }, - { "code": "YT", "name": "Mayotte" }, - { "code": "ZA", "name": "South Africa" }, - { "code": "ZM", "name": "Zambia" }, - { "code": "ZW", "name": "Zimbabwe" } -] diff --git a/node_modules/country-list/package.json b/node_modules/country-list/package.json deleted file mode 100644 index 0582aad..0000000 --- a/node_modules/country-list/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "country-list", - "version": "2.3.0", - "description": "Maps ISO 3166-1-alpha-2 codes to English country names and vice versa.", - "main": "country-list.js", - "files": [ - "data.json" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^13.1.0", - "tap": "^14.6.1" - }, - "scripts": { - "pretest": "standard", - "test": "tap test/*.js --100" - }, - "repository": { - "type": "git", - "url": "git://github.com/fannarsh/country-list.git" - }, - "keywords": [ - "country", - "countries", - "ISO 3166-1-alpha-2", - "ISO 3166-1" - ], - "author": "Fannar Snær ", - "contributors": [ - "Eiríkur Heiðar Nilsson ", - "intpp at newageio", - "Jonathan Plugaru ", - "Camilo Sampedro ", - "Bogdan Chadkin " - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/fannarsh/country-list/issues" - }, - "homepage": "https://github.com/fannarsh/country-list" -} diff --git a/node_modules/install/.travis.yml b/node_modules/install/.travis.yml deleted file mode 100644 index 566a824..0000000 --- a/node_modules/install/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -sudo: false -node_js: - - "12" - - "11" - - "10" - - "9" - - "8" - - "7" - - "6" - - "5" - - "4" diff --git a/node_modules/install/LICENSE b/node_modules/install/LICENSE deleted file mode 100644 index ad7986c..0000000 --- a/node_modules/install/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Benjamin Newman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/install/README.md b/node_modules/install/README.md deleted file mode 100644 index abbaadb..0000000 --- a/node_modules/install/README.md +++ /dev/null @@ -1,123 +0,0 @@ -# install [![Build Status](https://travis-ci.org/benjamn/install.svg?branch=master)](https://travis-ci.org/benjamn/install) [![Greenkeeper badge](https://badges.greenkeeper.io/benjamn/install.svg)](https://greenkeeper.io/) - -The [CommonJS module syntax](http://wiki.commonjs.org/wiki/Modules/1.1) is one of the most widely accepted conventions in the JavaScript ecosystem. Everyone seems to agree that `require` and `exports` are a reasonable way of expressing module dependencies and interfaces, and the tools for managing modular code are getting better all the time. - -Much less of a consensus has developed around the best way to deliver CommonJS modules to a web browser, where the synchronous semantics of `require` pose a non-trivial implementation challenge. This module loader contributes to that confusion, yet also demonstrates that an amply-featured module loader need not stretch into the hundreds or thousands of lines. - -Installation ---- -From NPM: - - npm install install - -From GitHub: - - cd path/to/node_modules - git clone git://github.com/benjamn/install.git - cd install - npm install . - -Usage ---- - -The first step is to create an `install` function by calling the -`makeInstaller` method. Note that all of the options described below are -optional: - -```js -var install = require("install").makeInstaller({ - // Optional list of file extensions to be appended to required module - // identifiers if they do not exactly match an installed module. - extensions: [".js", ".json"], - - // If defined, the options.fallback function will be called when no - // installed module is found for a required module identifier. Often - // options.fallback will be implemented in terms of the native Node - // require function, which has the ability to load binary modules. - fallback, - - // Boolean flag indicating whether the installed code will be running in - // a web browser. - browser, - - // List of fields to look for in package.json files to determine the - // main entry module of the package. The first field listed here whose - // value is a string will be used to resolve the entry module. Defaults - // to just ["main"], or ["browser", "main"] if options.browser is true. - mainFields: ["browser", "main"], -}); -``` - -The second step is to install some modules by passing a nested tree of -objects and functions to the `install` function: - -```js -var require = install({ - "main.js"(require, exports, module) { - // On the client, the "assert" module should be install-ed just like - // any other module. On the server, since "assert" is a built-in Node - // module, it may make sense to let the options.fallback function - // handle such requirements. Both ways work equally well. - var assert = require("assert"); - - assert.strictEqual( - // This require function uses the same lookup rules as Node, so it - // will find "package" in the "node_modules" directory below. - require("package").name, - "/node_modules/package/entry.js" - ); - - exports.name = module.id; - }, - - node_modules: { - package: { - // If package.json is not defined, a module called "index.js" will - // be used as the main entry point for the package. Otherwise the - // exports.main property will identify the entry point. - "package.json"(require, exports, module) { - exports.name = "package"; - exports.version = "0.1.0"; - exports.main = "entry.js"; - }, - - "entry.js"(require, exports, module) { - exports.name = module.id; - } - } - } -}); -``` - -Note that the `install` function merely installs modules without -evaluating them, so the third and final step is to `require` any entry -point modules that you wish to evaluate: - -```js -console.log(require("./main").name); -// => "/main.js" -``` - -This is the "root" `require` function returned by the `install` -function. If you're using the `install` package in a CommonJS environment -like Node, be careful that you don't overwrite the `require` function -provided by that system. - -If you need to change the behavior of the `module` object that each module -function receives as its third parameter, the shared `Module` constructor -is exposed as a property of the `install` function returned by the -`makeInstaller` factory: - -```js -var install = makeInstaller(options); -var proto = install.Module.prototype; - -// Wrap all Module.prototype.require calls with some sort of logging. -proto.require = wrapWithLogging(proto.require); - -// Add a new method available to all modules via module.newMethod(...). -proto.newMethod = function () {...}; -``` - -Many more examples of how to use the `install` package can be found in the -[tests](https://github.com/benjamn/install/blob/master/test/run.js). diff --git a/node_modules/install/install.js b/node_modules/install/install.js deleted file mode 100644 index 895678c..0000000 --- a/node_modules/install/install.js +++ /dev/null @@ -1,556 +0,0 @@ -makeInstaller = function (options) { - "use strict"; - - options = options || {}; - - // These file extensions will be appended to required module identifiers - // if they do not exactly match an installed module. - var defaultExtensions = options.extensions || [".js", ".json"]; - - // If defined, the options.fallback function will be called when no - // installed module is found for a required module identifier. Often - // options.fallback will be implemented in terms of the native Node - // require function, which has the ability to load binary modules. - var fallback = options.fallback; - - // List of fields to look for in package.json files to determine the - // main entry module of the package. The first field listed here whose - // value is a string will be used to resolve the entry module. - var mainFields = options.mainFields || - // If options.mainFields is absent and options.browser is truthy, - // package resolution will prefer the "browser" field of package.json - // files to the "main" field. Note that this only supports - // string-valued "browser" fields for now, though in the future it - // might make sense to support the object version, a la browserify. - (options.browser ? ["browser", "main"] : ["main"]); - - var hasOwn = {}.hasOwnProperty; - function strictHasOwn(obj, key) { - return isObject(obj) && isString(key) && hasOwn.call(obj, key); - } - - // Cache for looking up File objects given absolute module identifiers. - // Invariants: - // filesByModuleId[module.id] === fileAppendId(root, module.id) - // filesByModuleId[module.id].module === module - var filesByModuleId = {}; - - // The file object representing the root directory of the installed - // module tree. - var root = new File("/", new File("/..")); - var rootRequire = makeRequire(root); - - // Merges the given tree of directories and module factory functions - // into the tree of installed modules and returns a require function - // that behaves as if called from a module in the root directory. - function install(tree, options) { - if (isObject(tree)) { - fileMergeContents(root, tree, options); - } - return rootRequire; - } - - // Replace this function to enable Module.prototype.prefetch. - install.fetch = function (ids) { - throw new Error("fetch not implemented"); - }; - - // This constructor will be used to instantiate the module objects - // passed to module factory functions (i.e. the third argument after - // require and exports), and is exposed as install.Module in case the - // caller of makeInstaller wishes to modify Module.prototype. - function Module(id) { - this.id = id; - - // The Node implementation of module.children unfortunately includes - // only those child modules that were imported for the first time by - // this parent module (i.e., child.parent === this). - this.children = []; - - // This object is an install.js extension that includes all child - // modules imported by this module, even if this module is not the - // first to import them. - this.childrenById = {}; - } - - // Used to keep module.prefetch promise resolutions well-ordered. - var lastPrefetchPromise; - - // May be shared by multiple sequential calls to module.prefetch. - // Initialized to {} only when necessary. - var missing; - - Module.prototype.prefetch = function (id) { - var module = this; - var parentFile = getOwn(filesByModuleId, module.id); - - lastPrefetchPromise = lastPrefetchPromise || Promise.resolve(); - var previousPromise = lastPrefetchPromise; - - function walk(module) { - var file = getOwn(filesByModuleId, module.id); - if (fileIsDynamic(file) && ! file.pending) { - file.pending = true; - missing = missing || {}; - - // These are the data that will be exposed to the install.fetch - // callback, so it's worth documenting each item with a comment. - missing[module.id] = { - // The CommonJS module object that will be exposed to this - // dynamic module when it is evaluated. Note that install.fetch - // could decide to populate module.exports directly, instead of - // fetching anything. In that case, install.fetch should omit - // this module from the tree that it produces. - module: file.module, - // List of module identifier strings imported by this module. - // Note that the missing object already contains all available - // dependencies (including transitive dependencies), so - // install.fetch should not need to traverse these dependencies - // in most cases; however, they may be useful for other reasons. - // Though the strings are unique, note that two different - // strings could resolve to the same module. - deps: Object.keys(file.deps), - // The options (if any) that were passed as the second argument - // to the install(tree, options) function when this stub was - // first registered. Typically contains options.extensions, but - // could contain any information appropriate for the entire tree - // as originally installed. These options will be automatically - // inherited by the newly fetched modules, so install.fetch - // should not need to modify them. - options: file.options, - // Any stub data included in the array notation from the - // original entry for this dynamic module. Typically contains - // "main" and/or "browser" fields for package.json files, and is - // otherwise undefined. - stub: file.stub - }; - - each(file.deps, function (parentId, id) { - fileResolve(file, id); - }); - - each(module.childrenById, walk); - } - } - - return lastPrefetchPromise = new Promise(function (resolve) { - var absChildId = module.resolve(id); - each(module.childrenById, walk); - resolve(absChildId); - - }).then(function (absChildId) { - // Grab the current missing object and fetch its contents. - var toBeFetched = missing; - missing = null; - - function clearPending() { - if (toBeFetched) { - Object.keys(toBeFetched).forEach(function (id) { - getOwn(filesByModuleId, id).pending = false; - }); - } - } - - return new Promise(function (resolve) { - // The install.fetch function takes an object mapping missing - // dynamic module identifiers to options objects, and should - // return a Promise that resolves to a module tree that can be - // installed. As an optimization, if there were no missing dynamic - // modules, then we can skip calling install.fetch entirely. - resolve(toBeFetched && install.fetch(toBeFetched)); - - }).then(function (tree) { - function both() { - install(tree); - clearPending(); - return absChildId; - } - - // Although we want multiple install.fetch calls to run in - // parallel, it is important that the promises returned by - // module.prefetch are resolved in the same order as the original - // calls to module.prefetch, because previous fetches may include - // modules assumed to exist by more recent module.prefetch calls. - // Whether previousPromise was resolved or rejected, carry on with - // the installation regardless. - return previousPromise.then(both, both); - - }, function (error) { - // Fixes https://github.com/meteor/meteor/issues/10182. - clearPending(); - throw error; - }); - }); - }; - - install.Module = Module; - - function getOwn(obj, key) { - return strictHasOwn(obj, key) && obj[key]; - } - - function isObject(value) { - return value !== null && typeof value === "object"; - } - - function isFunction(value) { - return typeof value === "function"; - } - - function isString(value) { - return typeof value === "string"; - } - - function makeMissingError(id) { - return new Error("Cannot find module '" + id + "'"); - } - - Module.prototype.resolve = function (id) { - var file = fileResolve(filesByModuleId[this.id], id); - if (file) return file.module.id; - var error = makeMissingError(id); - if (fallback && isFunction(fallback.resolve)) { - return fallback.resolve(id, this.id, error); - } - throw error; - }; - - Module.prototype.require = function require(id) { - var result = fileResolve(filesByModuleId[this.id], id); - if (result) { - return fileEvaluate(result, this); - } - - var error = makeMissingError(id); - - if (isFunction(fallback)) { - return fallback( - id, // The missing module identifier. - this.id, // ID of the parent module. - error // The error we would have thrown. - ); - } - - throw error; - }; - - function makeRequire(file) { - var module = file.module; - - function require(id) { - return module.require(id); - } - - require.extensions = fileGetExtensions(file).slice(0); - - require.resolve = function resolve(id) { - return module.resolve(id); - }; - - return require; - } - - // File objects represent either directories or modules that have been - // installed. When a `File` respresents a directory, its `.contents` - // property is an object containing the names of the files (or - // directories) that it contains. When a `File` represents a module, its - // `.contents` property is a function that can be invoked with the - // appropriate `(require, exports, module)` arguments to evaluate the - // module. If the `.contents` property is a string, that string will be - // resolved as a module identifier, and the exports of the resulting - // module will provide the exports of the original file. The `.parent` - // property of a File is either a directory `File` or `null`. Note that - // a child may claim another `File` as its parent even if the parent - // does not have an entry for that child in its `.contents` object. - // This is important for implementing anonymous files, and preventing - // child modules from using `../relative/identifier` syntax to examine - // unrelated modules. - function File(moduleId, parent) { - var file = this; - - // Link to the parent file. - file.parent = parent = parent || null; - - // The module object for this File, which will eventually boast an - // .exports property when/if the file is evaluated. - file.module = new Module(moduleId); - filesByModuleId[moduleId] = file; - - // The .contents of the file can be either (1) an object, if the file - // represents a directory containing other files; (2) a factory - // function, if the file represents a module that can be imported; (3) - // a string, if the file is an alias for another file; or (4) null, if - // the file's contents are not (yet) available. - file.contents = null; - - // Set of module identifiers imported by this module. Note that this - // set is not necessarily complete, so don't rely on it unless you - // know what you're doing. - file.deps = {}; - } - - function fileEvaluate(file, parentModule) { - var module = file.module; - if (! strictHasOwn(module, "exports")) { - var contents = file.contents; - if (! contents) { - // If this file was installed with array notation, and the array - // contained one or more objects but no functions, then the combined - // properties of the objects are treated as a temporary stub for - // file.module.exports. This is particularly important for partial - // package.json modules, so that the resolution logic can know the - // value of the "main" and/or "browser" fields, at least, even if - // the rest of the package.json file is not (yet) available. - if (file.stub) { - return file.stub; - } - - throw makeMissingError(module.id); - } - - if (parentModule) { - module.parent = parentModule; - var children = parentModule.children; - if (Array.isArray(children)) { - children.push(module); - } - } - - contents( - makeRequire(file), - // If the file had a .stub, reuse the same object for exports. - module.exports = file.stub || {}, - module, - file.module.id, - file.parent.module.id - ); - - module.loaded = true; - } - - // The module.runModuleSetters method will be deprecated in favor of - // just module.runSetters: https://github.com/benjamn/reify/pull/160 - var runSetters = module.runSetters || module.runModuleSetters; - if (isFunction(runSetters)) { - runSetters.call(module); - } - - return module.exports; - } - - function fileIsDirectory(file) { - return file && isObject(file.contents); - } - - function fileIsDynamic(file) { - return file && file.contents === null; - } - - function fileMergeContents(file, contents, options) { - if (Array.isArray(contents)) { - contents.forEach(function (item) { - if (isString(item)) { - file.deps[item] = file.module.id; - } else if (isFunction(item)) { - contents = item; - } else if (isObject(item)) { - file.stub = file.stub || {}; - each(item, function (value, key) { - file.stub[key] = value; - }); - } - }); - - if (! isFunction(contents)) { - // If the array did not contain a function, merge nothing. - contents = null; - } - - } else if (! isFunction(contents) && - ! isString(contents) && - ! isObject(contents)) { - // If contents is neither an array nor a function nor a string nor - // an object, just give up and merge nothing. - contents = null; - } - - if (contents) { - file.contents = file.contents || (isObject(contents) ? {} : contents); - if (isObject(contents) && fileIsDirectory(file)) { - each(contents, function (value, key) { - if (key === "..") { - child = file.parent; - - } else { - var child = getOwn(file.contents, key); - - if (! child) { - child = file.contents[key] = new File( - file.module.id.replace(/\/*$/, "/") + key, - file - ); - - child.options = options; - } - } - - fileMergeContents(child, value, options); - }); - } - } - } - - function each(obj, callback, context) { - Object.keys(obj).forEach(function (key) { - callback.call(this, obj[key], key); - }, context); - } - - function fileGetExtensions(file) { - return file.options - && file.options.extensions - || defaultExtensions; - } - - function fileAppendIdPart(file, part, extensions) { - // Always append relative to a directory. - while (file && ! fileIsDirectory(file)) { - file = file.parent; - } - - if (! file || ! part || part === ".") { - return file; - } - - if (part === "..") { - return file.parent; - } - - var exactChild = getOwn(file.contents, part); - - // Only consider multiple file extensions if this part is the last - // part of a module identifier and not equal to `.` or `..`, and there - // was no exact match or the exact match was a directory. - if (extensions && (! exactChild || fileIsDirectory(exactChild))) { - for (var e = 0; e < extensions.length; ++e) { - var child = getOwn(file.contents, part + extensions[e]); - if (child && ! fileIsDirectory(child)) { - return child; - } - } - } - - return exactChild; - } - - function fileAppendId(file, id, extensions) { - var parts = id.split("/"); - - // Use `Array.prototype.every` to terminate iteration early if - // `fileAppendIdPart` returns a falsy value. - parts.every(function (part, i) { - return file = i < parts.length - 1 - ? fileAppendIdPart(file, part) - : fileAppendIdPart(file, part, extensions); - }); - - return file; - } - - function recordChild(parentModule, childFile) { - var childModule = childFile && childFile.module; - if (parentModule && childModule) { - parentModule.childrenById[childModule.id] = childModule; - } - } - - function fileResolve(file, id, parentModule, seenDirFiles) { - var parentModule = parentModule || file.module; - var extensions = fileGetExtensions(file); - - file = - // Absolute module identifiers (i.e. those that begin with a `/` - // character) are interpreted relative to the root directory, which - // is a slight deviation from Node, which has access to the entire - // file system. - id.charAt(0) === "/" ? fileAppendId(root, id, extensions) : - // Relative module identifiers are interpreted relative to the - // current file, naturally. - id.charAt(0) === "." ? fileAppendId(file, id, extensions) : - // Top-level module identifiers are interpreted as referring to - // packages in `node_modules` directories. - nodeModulesLookup(file, id, extensions); - - // If the identifier resolves to a directory, we use the same logic as - // Node to find an `index.js` or `package.json` file to evaluate. - while (fileIsDirectory(file)) { - seenDirFiles = seenDirFiles || []; - - // If the "main" field of a `package.json` file resolves to a - // directory we've already considered, then we should not attempt to - // read the same `package.json` file again. Using an array as a set - // is acceptable here because the number of directories to consider - // is rarely greater than 1 or 2. Also, using indexOf allows us to - // store File objects instead of strings. - if (seenDirFiles.indexOf(file) < 0) { - seenDirFiles.push(file); - - var pkgJsonFile = fileAppendIdPart(file, "package.json"); - var pkg = pkgJsonFile && fileEvaluate(pkgJsonFile, parentModule); - var mainFile, resolved = pkg && mainFields.some(function (name) { - var main = pkg[name]; - if (isString(main)) { - // The "main" field of package.json does not have to begin - // with ./ to be considered relative, so first we try - // simply appending it to the directory path before - // falling back to a full fileResolve, which might return - // a package from a node_modules directory. - return mainFile = fileAppendId(file, main, extensions) || - fileResolve(file, main, parentModule, seenDirFiles); - } - }); - - if (resolved && mainFile) { - file = mainFile; - recordChild(parentModule, pkgJsonFile); - // The fileAppendId call above may have returned a directory, - // so continue the loop to make sure we resolve it to a - // non-directory file. - continue; - } - } - - // If we didn't find a `package.json` file, or it didn't have a - // resolvable `.main` property, the only possibility left to - // consider is that this directory contains an `index.js` module. - // This assignment almost always terminates the while loop, because - // there's very little chance `fileIsDirectory(file)` will be true - // for `fileAppendIdPart(file, "index", extensions)`. However, in - // principle it is remotely possible that a file called `index.js` - // could be a directory instead of a file. - file = fileAppendIdPart(file, "index", extensions); - } - - if (file && isString(file.contents)) { - file = fileResolve(file, file.contents, parentModule, seenDirFiles); - } - - recordChild(parentModule, file); - - return file; - }; - - function nodeModulesLookup(file, id, extensions) { - for (var resolved; file && ! resolved; file = file.parent) { - resolved = fileIsDirectory(file) && - fileAppendId(file, "node_modules/" + id, extensions); - } - return resolved; - } - - return install; -}; - -if (typeof exports === "object") { - exports.makeInstaller = makeInstaller; -} diff --git a/node_modules/install/install.min.js b/node_modules/install/install.min.js deleted file mode 100644 index 0109a4c..0000000 --- a/node_modules/install/install.min.js +++ /dev/null @@ -1 +0,0 @@ -makeInstaller=function(n){"use strict";var t=(n=n||{}).extensions||[".js",".json"],e=n.fallback,r=n.mainFields||(n.browser?["browser","main"]:["main"]),o={}.hasOwnProperty;function i(n,t){return p(n)&&m(t)&&o.call(n,t)}var u,s,c={},f=new w("/",new w("/..")),l=b(f);function a(n,t){return p(n)&&function n(t,e,r){Array.isArray(e)?(e.forEach(function(n){m(n)?t.deps[n]=t.module.id:v(n)?e=n:p(n)&&(t.stub=t.stub||{},k(n,function(n,e){t.stub[e]=n}))}),v(e)||(e=null)):v(e)||m(e)||p(e)||(e=null);e&&(t.contents=t.contents||(p(e)?{}:e),p(e)&&j(t)&&k(e,function(e,o){if(".."===o)i=t.parent;else{var i=h(t.contents,o);i||((i=t.contents[o]=new w(t.module.id.replace(/\/*$/,"/")+o,t)).options=r)}n(i,e,r)}))}(f,n,t),l}function d(n){this.id=n,this.children=[],this.childrenById={}}function h(n,t){return i(n,t)&&n[t]}function p(n){return null!==n&&"object"==typeof n}function v(n){return"function"==typeof n}function m(n){return"string"==typeof n}function y(n){return new Error("Cannot find module '"+n+"'")}function b(n){var t=n.module;function e(n){return t.require(n)}return e.extensions=g(n).slice(0),e.resolve=function(n){return t.resolve(n)},e}function w(n,t){this.parent=t=t||null,this.module=new d(n),c[n]=this,this.contents=null,this.deps={}}function x(n,t){var e=n.module;if(!i(e,"exports")){var r=n.contents;if(!r){if(n.stub)return n.stub;throw y(e.id)}if(t){e.parent=t;var o=t.children;Array.isArray(o)&&o.push(e)}r(b(n),e.exports=n.stub||{},e,n.module.id,n.parent.module.id),e.loaded=!0}var u=e.runSetters||e.runModuleSetters;return v(u)&&u.call(e),e.exports}function j(n){return n&&p(n.contents)}function k(n,t,e){Object.keys(n).forEach(function(e){t.call(this,n[e],e)},e)}function g(n){return n.options&&n.options.extensions||t}function I(n,t,e){for(;n&&!j(n);)n=n.parent;if(!n||!t||"."===t)return n;if(".."===t)return n.parent;var r=h(n.contents,t);if(e&&(!r||j(r)))for(var o=0;o= 0.10" - } -} diff --git a/node_modules/install/scripts/docs.sh b/node_modules/install/scripts/docs.sh deleted file mode 100755 index 4fe073d..0000000 --- a/node_modules/install/scripts/docs.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -cd $(dirname $0)/.. -docco install.js -cd docs -mv install.html index.html -cd .. diff --git a/node_modules/install/scripts/prepublish.sh b/node_modules/install/scripts/prepublish.sh deleted file mode 100755 index a8da219..0000000 --- a/node_modules/install/scripts/prepublish.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -cd $(dirname $0)/.. - -terser install.js -c -m > install.min.js diff --git a/node_modules/iso-3166-1-alpha-2/LICENSE b/node_modules/iso-3166-1-alpha-2/LICENSE deleted file mode 100644 index 7ee5b46..0000000 --- a/node_modules/iso-3166-1-alpha-2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Georg Zoeller - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/iso-3166-1-alpha-2/README.md b/node_modules/iso-3166-1-alpha-2/README.md deleted file mode 100644 index 78d79f8..0000000 --- a/node_modules/iso-3166-1-alpha-2/README.md +++ /dev/null @@ -1,36 +0,0 @@ -#Iso-3155-1-alpha-2 [![](https://travis-ci.org/georgzoeller/iso-3166-1-alpha-2.svg?branch=master)](https://travis-ci.org/georgzoeller/iso-3166-1-alpha-2) [![](https://img.shields.io/npm/v/iso-3166-1-alpha-2.svg?style=flat)](https://www.npmjs.com/package/iso-3166-1-alpha-2) - - -Simple lookup interface for iso country codes to countries and reverse. - - -The only dependency is mout, so this module works both in node and in the browser(ify). - -## Installation - - npm install iso-3166-1-alpha-2 - -## Usage - - var iso3311a2 = require('./iso-3166-1-alpha-2') - - // Lookup country by code - console.log iso3311a2.getCountry("DE") // "Germany" - - // Lookup code by country - console.log iso3311a2.getCode("Germany") // "DE" - - // Get array of all country codes - console.log iso3311a2.getCodes() // ["AF","AX","AL",...] - - // Get array of all country names - console.log iso3311a2.getCountries() // ["Afghanistan","Åland Islands","Albania",...] - - // Get Object with code (key) to country (value) mappings - console.log iso3311a2.getData() // { "AF" : "Afghanistan", .... } - - -## Documentation - - Docco annotated source is found here: (docs/index.html) - diff --git a/node_modules/iso-3166-1-alpha-2/docs/docco.css b/node_modules/iso-3166-1-alpha-2/docs/docco.css deleted file mode 100644 index 5d17d5b..0000000 --- a/node_modules/iso-3166-1-alpha-2/docs/docco.css +++ /dev/null @@ -1,506 +0,0 @@ -/*--------------------- Typography ----------------------------*/ - -@font-face { - font-family: 'aller-light'; - src: url('public/fonts/aller-light.eot'); - src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'), - url('public/fonts/aller-light.woff') format('woff'), - url('public/fonts/aller-light.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'aller-bold'; - src: url('public/fonts/aller-bold.eot'); - src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'), - url('public/fonts/aller-bold.woff') format('woff'), - url('public/fonts/aller-bold.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'novecento-bold'; - src: url('public/fonts/novecento-bold.eot'); - src: url('public/fonts/novecento-bold.eot?#iefix') format('embedded-opentype'), - url('public/fonts/novecento-bold.woff') format('woff'), - url('public/fonts/novecento-bold.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -/*--------------------- Layout ----------------------------*/ -html { height: 100%; } -body { - font-family: "aller-light"; - font-size: 14px; - line-height: 18px; - color: #30404f; - margin: 0; padding: 0; - height:100%; -} -#container { min-height: 100%; } - -a { - color: #000; -} - -b, strong { - font-weight: normal; - font-family: "aller-bold"; -} - -p { - margin: 15px 0 0px; -} - .annotation ul, .annotation ol { - margin: 25px 0; - } - .annotation ul li, .annotation ol li { - font-size: 14px; - line-height: 18px; - margin: 10px 0; - } - -h1, h2, h3, h4, h5, h6 { - color: #112233; - line-height: 1em; - font-weight: normal; - font-family: "novecento-bold"; - text-transform: uppercase; - margin: 30px 0 15px 0; -} - -h1 { - margin-top: 40px; -} - -hr { - border: 0; - background: 1px #ddd; - height: 1px; - margin: 20px 0; -} - -pre, tt, code { - font-size: 12px; line-height: 16px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; -} - .annotation pre { - display: block; - margin: 0; - padding: 7px 10px; - background: #fcfcfc; - -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); - -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); - box-shadow: inset 0 0 10px rgba(0,0,0,0.1); - overflow-x: auto; - } - .annotation pre code { - border: 0; - padding: 0; - background: transparent; - } - - -blockquote { - border-left: 5px solid #ccc; - margin: 0; - padding: 1px 0 1px 1em; -} - .sections blockquote p { - font-family: Menlo, Consolas, Monaco, monospace; - font-size: 12px; line-height: 16px; - color: #999; - margin: 10px 0 0; - white-space: pre-wrap; - } - -ul.sections { - list-style: none; - padding:0 0 5px 0;; - margin:0; -} - -/* - Force border-box so that % widths fit the parent - container without overlap because of margin/padding. - - More Info : http://www.quirksmode.org/css/box.html -*/ -ul.sections > li > div { - -moz-box-sizing: border-box; /* firefox */ - -ms-box-sizing: border-box; /* ie */ - -webkit-box-sizing: border-box; /* webkit */ - -khtml-box-sizing: border-box; /* konqueror */ - box-sizing: border-box; /* css3 */ -} - - -/*---------------------- Jump Page -----------------------------*/ -#jump_to, #jump_page { - margin: 0; - background: white; - -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; - -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; - font: 16px Arial; - cursor: pointer; - text-align: right; - list-style: none; -} - -#jump_to a { - text-decoration: none; -} - -#jump_to a.large { - display: none; -} -#jump_to a.small { - font-size: 22px; - font-weight: bold; - color: #676767; -} - -#jump_to, #jump_wrapper { - position: fixed; - right: 0; top: 0; - padding: 10px 15px; - margin:0; -} - -#jump_wrapper { - display: none; - padding:0; -} - -#jump_to:hover #jump_wrapper { - display: block; -} - -#jump_page { - padding: 5px 0 3px; - margin: 0 0 25px 25px; -} - -#jump_page .source { - display: block; - padding: 15px; - text-decoration: none; - border-top: 1px solid #eee; -} - -#jump_page .source:hover { - background: #f5f5ff; -} - -#jump_page .source:first-child { -} - -/*---------------------- Low resolutions (> 320px) ---------------------*/ -@media only screen and (min-width: 320px) { - .pilwrap { display: none; } - - ul.sections > li > div { - display: block; - padding:5px 10px 0 10px; - } - - ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { - padding-left: 30px; - } - - ul.sections > li > div.content { - overflow-x:auto; - -webkit-box-shadow: inset 0 0 5px #e5e5ee; - box-shadow: inset 0 0 5px #e5e5ee; - border: 1px solid #dedede; - margin:5px 10px 5px 10px; - padding-bottom: 5px; - } - - ul.sections > li > div.annotation pre { - margin: 7px 0 7px; - padding-left: 15px; - } - - ul.sections > li > div.annotation p tt, .annotation code { - background: #f8f8ff; - border: 1px solid #dedede; - font-size: 12px; - padding: 0 0.2em; - } -} - -/*---------------------- (> 481px) ---------------------*/ -@media only screen and (min-width: 481px) { - #container { - position: relative; - } - body { - background-color: #F5F5FF; - font-size: 15px; - line-height: 21px; - } - pre, tt, code { - line-height: 18px; - } - p, ul, ol { - margin: 0 0 15px; - } - - - #jump_to { - padding: 5px 10px; - } - #jump_wrapper { - padding: 0; - } - #jump_to, #jump_page { - font: 10px Arial; - text-transform: uppercase; - } - #jump_page .source { - padding: 5px 10px; - } - #jump_to a.large { - display: inline-block; - } - #jump_to a.small { - display: none; - } - - - - #background { - position: absolute; - top: 0; bottom: 0; - width: 350px; - background: #fff; - border-right: 1px solid #e5e5ee; - z-index: -1; - } - - ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { - padding-left: 40px; - } - - ul.sections > li { - white-space: nowrap; - } - - ul.sections > li > div { - display: inline-block; - } - - ul.sections > li > div.annotation { - max-width: 350px; - min-width: 350px; - min-height: 5px; - padding: 13px; - overflow-x: hidden; - white-space: normal; - vertical-align: top; - text-align: left; - } - ul.sections > li > div.annotation pre { - margin: 15px 0 15px; - padding-left: 15px; - } - - ul.sections > li > div.content { - padding: 13px; - vertical-align: top; - border: none; - -webkit-box-shadow: none; - box-shadow: none; - } - - .pilwrap { - position: relative; - display: inline; - } - - .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - } - .for-h1 .pilcrow { - top: 47px; - } - .for-h2 .pilcrow, .for-h3 .pilcrow, .for-h4 .pilcrow { - top: 35px; - } - - ul.sections > li > div.annotation:hover .pilcrow { - opacity: 1; - } -} - -/*---------------------- (> 1025px) ---------------------*/ -@media only screen and (min-width: 1025px) { - - body { - font-size: 16px; - line-height: 24px; - } - - #background { - width: 525px; - } - ul.sections > li > div.annotation { - max-width: 525px; - min-width: 525px; - padding: 10px 25px 1px 50px; - } - ul.sections > li > div.content { - padding: 9px 15px 16px 25px; - } -} - -/*---------------------- Syntax Highlighting -----------------------------*/ - -td.linenos { background-color: #f0f0f0; padding-right: 10px; } -span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } -/* - -github.com style (c) Vasily Polovnyov - -*/ - -pre code { - display: block; padding: 0.5em; - color: #000; - background: #f8f8ff -} - -pre .hljs-comment, -pre .hljs-template_comment, -pre .hljs-diff .hljs-header, -pre .hljs-javadoc { - color: #408080; - font-style: italic -} - -pre .hljs-keyword, -pre .hljs-assignment, -pre .hljs-literal, -pre .hljs-css .hljs-rule .hljs-keyword, -pre .hljs-winutils, -pre .hljs-javascript .hljs-title, -pre .hljs-lisp .hljs-title, -pre .hljs-subst { - color: #954121; - /*font-weight: bold*/ -} - -pre .hljs-number, -pre .hljs-hexcolor { - color: #40a070 -} - -pre .hljs-string, -pre .hljs-tag .hljs-value, -pre .hljs-phpdoc, -pre .hljs-tex .hljs-formula { - color: #219161; -} - -pre .hljs-title, -pre .hljs-id { - color: #19469D; -} -pre .hljs-params { - color: #00F; -} - -pre .hljs-javascript .hljs-title, -pre .hljs-lisp .hljs-title, -pre .hljs-subst { - font-weight: normal -} - -pre .hljs-class .hljs-title, -pre .hljs-haskell .hljs-label, -pre .hljs-tex .hljs-command { - color: #458; - font-weight: bold -} - -pre .hljs-tag, -pre .hljs-tag .hljs-title, -pre .hljs-rules .hljs-property, -pre .hljs-django .hljs-tag .hljs-keyword { - color: #000080; - font-weight: normal -} - -pre .hljs-attribute, -pre .hljs-variable, -pre .hljs-instancevar, -pre .hljs-lisp .hljs-body { - color: #008080 -} - -pre .hljs-regexp { - color: #B68 -} - -pre .hljs-class { - color: #458; - font-weight: bold -} - -pre .hljs-symbol, -pre .hljs-ruby .hljs-symbol .hljs-string, -pre .hljs-ruby .hljs-symbol .hljs-keyword, -pre .hljs-ruby .hljs-symbol .hljs-keymethods, -pre .hljs-lisp .hljs-keyword, -pre .hljs-tex .hljs-special, -pre .hljs-input_number { - color: #990073 -} - -pre .hljs-builtin, -pre .hljs-constructor, -pre .hljs-built_in, -pre .hljs-lisp .hljs-title { - color: #0086b3 -} - -pre .hljs-preprocessor, -pre .hljs-pi, -pre .hljs-doctype, -pre .hljs-shebang, -pre .hljs-cdata { - color: #999; - font-weight: bold -} - -pre .hljs-deletion { - background: #fdd -} - -pre .hljs-addition { - background: #dfd -} - -pre .hljs-diff .hljs-change { - background: #0086b3 -} - -pre .hljs-chunk { - color: #aaa -} - -pre .hljs-tex .hljs-formula { - opacity: 0.5; -} diff --git a/node_modules/iso-3166-1-alpha-2/docs/index.html b/node_modules/iso-3166-1-alpha-2/docs/index.html deleted file mode 100644 index 5d75f67..0000000 --- a/node_modules/iso-3166-1-alpha-2/docs/index.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - index.coffee - - - - - -
-
- -
    - -
  • -
    -

    index.coffee

    -
    -
  • - - - -
  • -
    - -
    - -
    - -
    - -
    mout = require 'mout/object'
    - -
  • - - -
  • -
    - -
    - -
    -

    Implements iso 3166-1-alpha-2 lookup

    - -
    - -
    class Iso31661a2
    -
    -    constructor: ->
    - -
  • - - -
  • -
    - -
    - -
    -

    Given an iso country code, returns an english country name

    - -
    - -
        getCountry: (code) ->
    -        Iso31661a2::countries[code]
    - -
  • - - -
  • -
    - -
    - -
    -

    Given an english country name, returns an iso code

    - -
    - -
        getCode: (country) ->
    -        ret = null
    -        if country?
    -            ret = Object.keys(Iso31661a2::countries)[idx] if mout.values(Iso31661a2::countries).indexOf(country) != -1
    -        ret
    - -
  • - - -
  • -
    - -
    - -
    -

    Returns a list of all english country names

    - -
    - -
        getCountries: ->
    -        mout.values Iso31661a2::countries
    - -
  • - - -
  • -
    - -
    - -
    -

    Returns a list of all iso country codes

    - -
    - -
        getCodes: ->
    -        Object.keys(Iso31661a2::countries)
    - -
  • - - -
  • -
    - -
    - -
    -

    Get the internal list of countries and region codes

    - -
    - -
        getData: ->
    -        Iso31661a2::countries
    - -
  • - - -
  • -
    - -
    - -
    -

    the actual list data

    - -
    - -
        Iso31661a2::countries =
    -        AF: "Afghanistan"
    -        AX: "Åland Islands"
    -        AL: "Albania"
    -        DZ: "Algeria"
    -        AS: "American Samoa"
    -        AD: "Andorra"
    -        AO: "Angola"
    -        AI: "Anguilla"
    -        AQ: "Antarctica"
    -        AG: "Antigua and Barbuda"
    -        AR: "Argentina"
    -        AM: "Armenia"
    -        AW: "Aruba"
    -        AU: "Australia"
    -        AT: "Austria"
    -        AZ: "Azerbaijan"
    -        BS: "Bahamas"
    -        BH: "Bahrain"
    -        BD: "Bangladesh"
    -        BB: "Barbados"
    -        BY: "Belarus"
    -        BE: "Belgium"
    -        BZ: "Belize"
    -        BJ: "Benin"
    -        BM: "Bermuda"
    -        BT: "Bhutan"
    -        BO: "Bolivia, Plurinational State of"
    -        BQ: "Bonaire, Sint Eustatius and Saba"
    -        BA: "Bosnia and Herzegovina"
    -        BW: "Botswana"
    -        BV: "Bouvet Island"
    -        BR: "Brazil"
    -        IO: "British Indian Ocean Territory"
    -        BN: "Brunei Darussalam"
    -        BG: "Bulgaria"
    -        BF: "Burkina Faso"
    -        BI: "Burundi"
    -        KH: "Cambodia"
    -        CM: "Cameroon"
    -        CA: "Canada"
    -        CV: "Cape Verde"
    -        KY: "Cayman Islands"
    -        CF: "Central African Republic"
    -        TD: "Chad"
    -        CL: "Chile"
    -        CN: "China"
    -        CX: "Christmas Island"
    -        CC: "Cocos (Keeling) Islands"
    -        CO: "Colombia"
    -        KM: "Comoros"
    -        CG: "Congo"
    -        CD: "Congo, the Democratic Republic of the"
    -        CK: "Cook Islands"
    -        CR: "Costa Rica"
    -        CI: "Côte d'Ivoire"
    -        HR: "Croatia"
    -        CU: "Cuba"
    -        CW: "Curaçao"
    -        CY: "Cyprus"
    -        CZ: "Czech Republic"
    -        DK: "Denmark"
    -        DJ: "Djibouti"
    -        DM: "Dominica"
    -        DO: "Dominican Republic"
    -        EC: "Ecuador"
    -        EG: "Egypt"
    -        SV: "El Salvador"
    -        GQ: "Equatorial Guinea"
    -        ER: "Eritrea"
    -        EE: "Estonia"
    -        ET: "Ethiopia"
    -        FK: "Falkland Islands (Malvinas)"
    -        FO: "Faroe Islands"
    -        FJ: "Fiji"
    -        FI: "Finland"
    -        FR: "France"
    -        GF: "French Guiana"
    -        PF: "French Polynesia"
    -        TF: "French Southern Territories"
    -        GA: "Gabon"
    -        GM: "Gambia"
    -        GE: "Georgia"
    -        DE: "Germany"
    -        GH: "Ghana"
    -        GI: "Gibraltar"
    -        GR: "Greece"
    -        GL: "Greenland"
    -        GD: "Grenada"
    -        GP: "Guadeloupe"
    -        GU: "Guam"
    -        GT: "Guatemala"
    -        GG: "Guernsey"
    -        GN: "Guinea"
    -        GW: "Guinea-Bissau"
    -        GY: "Guyana"
    -        HT: "Haiti"
    -        HM: "Heard Island and McDonald Mcdonald Islands"
    -        VA: "Holy See (Vatican City State)"
    -        HN: "Honduras"
    -        HK: "Hong Kong"
    -        HU: "Hungary"
    -        IS: "Iceland"
    -        IN: "India"
    -        ID: "Indonesia"
    -        IR: "Iran, Islamic Republic of"
    -        IQ: "Iraq"
    -        IE: "Ireland"
    -        IM: "Isle of Man"
    -        IL: "Israel"
    -        IT: "Italy"
    -        JM: "Jamaica"
    -        JP: "Japan"
    -        JE: "Jersey"
    -        JO: "Jordan"
    -        KZ: "Kazakhstan"
    -        KE: "Kenya"
    -        KI: "Kiribati"
    -        KP: "Korea, Democratic People's Republic of"
    -        KR: "Korea, Republic of"
    -        KW: "Kuwait"
    -        KG: "Kyrgyzstan"
    -        LA: "Lao People's Democratic Republic"
    -        LV: "Latvia"
    -        LB: "Lebanon"
    -        LS: "Lesotho"
    -        LR: "Liberia"
    -        LY: "Libya"
    -        LI: "Liechtenstein"
    -        LT: "Lithuania"
    -        LU: "Luxembourg"
    -        MO: "Macao"
    -        MK: "Macedonia, the Former Yugoslav Republic of"
    -        MG: "Madagascar"
    -        MW: "Malawi"
    -        MY: "Malaysia"
    -        MV: "Maldives"
    -        ML: "Mali"
    -        MT: "Malta"
    -        MH: "Marshall Islands"
    -        MQ: "Martinique"
    -        MR: "Mauritania"
    -        MU: "Mauritius"
    -        YT: "Mayotte"
    -        MX: "Mexico"
    -        FM: "Micronesia, Federated States of"
    -        MD: "Moldova, Republic of"
    -        MC: "Monaco"
    -        MN: "Mongolia"
    -        ME: "Montenegro"
    -        MS: "Montserrat"
    -        MA: "Morocco"
    -        MZ: "Mozambique"
    -        MM: "Myanmar"
    -        NA: "Namibia"
    -        NR: "Nauru"
    -        NP: "Nepal"
    -        NL: "Netherlands"
    -        NC: "New Caledonia"
    -        NZ: "New Zealand"
    -        NI: "Nicaragua"
    -        NE: "Niger"
    -        NG: "Nigeria"
    -        NU: "Niue"
    -        NF: "Norfolk Island"
    -        MP: "Northern Mariana Islands"
    -        NO: "Norway"
    -        OM: "Oman"
    -        PK: "Pakistan"
    -        PW: "Palau"
    -        PS: "Palestine, State of"
    -        PA: "Panama"
    -        PG: "Papua New Guinea"
    -        PY: "Paraguay"
    -        PE: "Peru"
    -        PH: "Philippines"
    -        PN: "Pitcairn"
    -        PL: "Poland"
    -        PT: "Portugal"
    -        PR: "Puerto Rico"
    -        QA: "Qatar"
    -        RE: "Réunion"
    -        RO: "Romania"
    -        RU: "Russian Federation"
    -        RW: "Rwanda"
    -        BL: "Saint Barthélemy"
    -        SH: "Saint Helena, Ascension and Tristan da Cunha"
    -        KN: "Saint Kitts and Nevis"
    -        LC: "Saint Lucia"
    -        MF: "Saint Martin (French part)"
    -        PM: "Saint Pierre and Miquelon"
    -        VC: "Saint Vincent and the Grenadines"
    -        WS: "Samoa"
    -        SM: "San Marino"
    -        ST: "Sao Tome and Principe"
    -        SA: "Saudi Arabia"
    -        SN: "Senegal"
    -        RS: "Serbia"
    -        SC: "Seychelles"
    -        SL: "Sierra Leone"
    -        SG: "Singapore"
    -        SX: "Sint Maarten (Dutch part)"
    -        SK: "Slovakia"
    -        SI: "Slovenia"
    -        SB: "Solomon Islands"
    -        SO: "Somalia"
    -        ZA: "South Africa"
    -        GS: "South Georgia and the South Sandwich Islands"
    -        SS: "South Sudan"
    -        ES: "Spain"
    -        LK: "Sri Lanka"
    -        SD: "Sudan"
    -        SR: "Suriname"
    -        SJ: "Svalbard and Jan Mayen"
    -        SZ: "Swaziland"
    -        SE: "Sweden"
    -        CH: "Switzerland"
    -        SY: "Syrian Arab Republic"
    -        TW: "Taiwan, Province of China"
    -        TJ: "Tajikistan"
    -        TZ: "Tanzania, United Republic of"
    -        TH: "Thailand"
    -        TL: "Timor-Leste"
    -        TG: "Togo"
    -        TK: "Tokelau"
    -        TO: "Tonga"
    -        TT: "Trinidad and Tobago"
    -        TN: "Tunisia"
    -        TR: "Turkey"
    -        TM: "Turkmenistan"
    -        TC: "Turks and Caicos Islands"
    -        TV: "Tuvalu"
    -        UG: "Uganda"
    -        UA: "Ukraine"
    -        AE: "United Arab Emirates"
    -        GB: "United Kingdom"
    -        US: "United States"
    -        UM: "United States Minor Outlying Islands"
    -        UY: "Uruguay"
    -        UZ: "Uzbekistan"
    -        VU: "Vanuatu"
    -        VE: "Venezuela, Bolivarian Republic of"
    -        VN: "Viet Nam"
    -        VG: "Virgin Islands, British"
    -        VI: "Virgin Islands, U.S."
    -        WF: "Wallis and Futuna"
    -        EH: "Western Sahara"
    -        YE: "Yemen"
    -        ZM: "Zambia"
    -        ZW: "Zimbabwe"
    -
    -singleton = null
    - -
  • - - -
  • -
    - -
    - -
    -

    returns a singleton

    - -
    - -
    module.exports = ->
    -    singleton ?= new Iso31661a2()
    - -
  • - -
-
- - diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.eot b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.eot deleted file mode 100644 index 1b32532..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.eot and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.ttf b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.ttf deleted file mode 100644 index dc4cc9c..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.ttf and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.woff b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.woff deleted file mode 100644 index fa16fd0..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-bold.woff and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.eot b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.eot deleted file mode 100644 index 40bd654..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.eot and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.ttf b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.ttf deleted file mode 100644 index c2c7290..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.ttf and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.woff b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.woff deleted file mode 100644 index 81a09d1..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/aller-light.woff and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.eot b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.eot deleted file mode 100644 index 98a9a7f..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.eot and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.ttf b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.ttf deleted file mode 100644 index 2af39b0..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.ttf and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.woff b/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.woff deleted file mode 100644 index de558b5..0000000 Binary files a/node_modules/iso-3166-1-alpha-2/docs/public/fonts/novecento-bold.woff and /dev/null differ diff --git a/node_modules/iso-3166-1-alpha-2/docs/public/stylesheets/normalize.css b/node_modules/iso-3166-1-alpha-2/docs/public/stylesheets/normalize.css deleted file mode 100644 index 4e86a59..0000000 --- a/node_modules/iso-3166-1-alpha-2/docs/public/stylesheets/normalize.css +++ /dev/null @@ -1,375 +0,0 @@ -/*! normalize.css v2.0.1 | MIT License | git.io/normalize */ - -/* ========================================================================== - HTML5 display definitions - ========================================================================== */ - -/* - * Corrects `block` display not defined in IE 8/9. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -nav, -section, -summary { - display: block; -} - -/* - * Corrects `inline-block` display not defined in IE 8/9. - */ - -audio, -canvas, -video { - display: inline-block; -} - -/* - * Prevents modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/* - * Addresses styling for `hidden` attribute not present in IE 8/9. - */ - -[hidden] { - display: none; -} - -/* ========================================================================== - Base - ========================================================================== */ - -/* - * 1. Sets default font family to sans-serif. - * 2. Prevents iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ - -ms-text-size-adjust: 100%; /* 2 */ -} - -/* - * Removes default margin. - */ - -body { - margin: 0; -} - -/* ========================================================================== - Links - ========================================================================== */ - -/* - * Addresses `outline` inconsistency between Chrome and other browsers. - */ - -a:focus { - outline: thin dotted; -} - -/* - * Improves readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* ========================================================================== - Typography - ========================================================================== */ - -/* - * Addresses `h1` font sizes within `section` and `article` in Firefox 4+, - * Safari 5, and Chrome. - */ - -h1 { - font-size: 2em; -} - -/* - * Addresses styling not present in IE 8/9, Safari 5, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/* - * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/* - * Addresses styling not present in Safari 5 and Chrome. - */ - -dfn { - font-style: italic; -} - -/* - * Addresses styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - - -/* - * Corrects font family set oddly in Safari 5 and Chrome. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - font-size: 1em; -} - -/* - * Improves readability of pre-formatted text in all browsers. - */ - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -/* - * Sets consistent quote types. - */ - -q { - quotes: "\201C" "\201D" "\2018" "\2019"; -} - -/* - * Addresses inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/* - * Prevents `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - Embedded content - ========================================================================== */ - -/* - * Removes border when inside `a` element in IE 8/9. - */ - -img { - border: 0; -} - -/* - * Corrects overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - Figures - ========================================================================== */ - -/* - * Addresses margin not present in IE 8/9 and Safari 5. - */ - -figure { - margin: 0; -} - -/* ========================================================================== - Forms - ========================================================================== */ - -/* - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/* - * 1. Corrects color not being inherited in IE 8/9. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/* - * 1. Corrects font family not being inherited in all browsers. - * 2. Corrects font size not being inherited in all browsers. - * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome - */ - -button, -input, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 2 */ - margin: 0; /* 3 */ -} - -/* - * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -button, -input { - line-height: normal; -} - -/* - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Corrects inability to style clickable `input` types in iOS. - * 3. Improves usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/* - * Re-set default cursor for disabled elements. - */ - -button[disabled], -input[disabled] { - cursor: default; -} - -/* - * 1. Addresses box sizing set to `content-box` in IE 8/9. - * 2. Removes excess padding in IE 8/9. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/* - * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/* - * Removes inner padding and search cancel button in Safari 5 and Chrome - * on OS X. - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* - * Removes inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/* - * 1. Removes default vertical scrollbar in IE 8/9. - * 2. Improves readability and alignment in all browsers. - */ - -textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ -} - -/* ========================================================================== - Tables - ========================================================================== */ - -/* - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/node_modules/iso-3166-1-alpha-2/index.coffee b/node_modules/iso-3166-1-alpha-2/index.coffee deleted file mode 100644 index 6104e6a..0000000 --- a/node_modules/iso-3166-1-alpha-2/index.coffee +++ /dev/null @@ -1,292 +0,0 @@ -mout = require 'mout/object' - -# Implements iso 3166-1-alpha-2 lookup -class Iso31661a2 - - constructor: -> - - # Given an iso country code, returns an english country name - getCountry: (code) -> - Iso31661a2::countries[code] - - # Given an english country name, returns an iso code - getCode: (country) -> - ret = null - if country? - idx = mout.values(Iso31661a2::countries).indexOf(country) - ret = Object.keys(Iso31661a2::countries)[idx] if idx != -1 - ret - - # Returns a list of all english country names - getCountries: -> - mout.values Iso31661a2::countries - - # Returns a list of all iso country codes - getCodes: -> - Object.keys(Iso31661a2::countries) - - # Get the internal list of countries and region codes - getData: -> - Iso31661a2::countries - - # the actual list data - Iso31661a2::countries = - AF: "Afghanistan" - AX: "Åland Islands" - AL: "Albania" - DZ: "Algeria" - AS: "American Samoa" - AD: "Andorra" - AO: "Angola" - AI: "Anguilla" - AQ: "Antarctica" - AG: "Antigua and Barbuda" - AR: "Argentina" - AM: "Armenia" - AW: "Aruba" - AU: "Australia" - AT: "Austria" - AZ: "Azerbaijan" - BS: "Bahamas" - BH: "Bahrain" - BD: "Bangladesh" - BB: "Barbados" - BY: "Belarus" - BE: "Belgium" - BZ: "Belize" - BJ: "Benin" - BM: "Bermuda" - BT: "Bhutan" - BO: "Bolivia, Plurinational State of" - BQ: "Bonaire, Sint Eustatius and Saba" - BA: "Bosnia and Herzegovina" - BW: "Botswana" - BV: "Bouvet Island" - BR: "Brazil" - IO: "British Indian Ocean Territory" - BN: "Brunei Darussalam" - BG: "Bulgaria" - BF: "Burkina Faso" - BI: "Burundi" - KH: "Cambodia" - CM: "Cameroon" - CA: "Canada" - CV: "Cape Verde" - KY: "Cayman Islands" - CF: "Central African Republic" - TD: "Chad" - CL: "Chile" - CN: "China" - CX: "Christmas Island" - CC: "Cocos (Keeling) Islands" - CO: "Colombia" - KM: "Comoros" - CG: "Congo" - CD: "Congo, the Democratic Republic of the" - CK: "Cook Islands" - CR: "Costa Rica" - CI: "Côte d'Ivoire" - HR: "Croatia" - CU: "Cuba" - CW: "Curaçao" - CY: "Cyprus" - CZ: "Czech Republic" - DK: "Denmark" - DJ: "Djibouti" - DM: "Dominica" - DO: "Dominican Republic" - EC: "Ecuador" - EG: "Egypt" - SV: "El Salvador" - GQ: "Equatorial Guinea" - ER: "Eritrea" - EE: "Estonia" - ET: "Ethiopia" - FK: "Falkland Islands (Malvinas)" - FO: "Faroe Islands" - FJ: "Fiji" - FI: "Finland" - FR: "France" - GF: "French Guiana" - PF: "French Polynesia" - TF: "French Southern Territories" - GA: "Gabon" - GM: "Gambia" - GE: "Georgia" - DE: "Germany" - GH: "Ghana" - GI: "Gibraltar" - GR: "Greece" - GL: "Greenland" - GD: "Grenada" - GP: "Guadeloupe" - GU: "Guam" - GT: "Guatemala" - GG: "Guernsey" - GN: "Guinea" - GW: "Guinea-Bissau" - GY: "Guyana" - HT: "Haiti" - HM: "Heard Island and McDonald Mcdonald Islands" - VA: "Holy See (Vatican City State)" - HN: "Honduras" - HK: "Hong Kong" - HU: "Hungary" - IS: "Iceland" - IN: "India" - ID: "Indonesia" - IR: "Iran, Islamic Republic of" - IQ: "Iraq" - IE: "Ireland" - IM: "Isle of Man" - IL: "Israel" - IT: "Italy" - JM: "Jamaica" - JP: "Japan" - JE: "Jersey" - JO: "Jordan" - KZ: "Kazakhstan" - KE: "Kenya" - KI: "Kiribati" - XK: "Kosovo" - KP: "Korea, Democratic People's Republic of" - KR: "Korea, Republic of" - KW: "Kuwait" - KG: "Kyrgyzstan" - LA: "Lao People's Democratic Republic" - LV: "Latvia" - LB: "Lebanon" - LS: "Lesotho" - LR: "Liberia" - LY: "Libya" - LI: "Liechtenstein" - LT: "Lithuania" - LU: "Luxembourg" - MO: "Macao" - MK: "Macedonia, the Former Yugoslav Republic of" - MG: "Madagascar" - MW: "Malawi" - MY: "Malaysia" - MV: "Maldives" - ML: "Mali" - MT: "Malta" - MH: "Marshall Islands" - MQ: "Martinique" - MR: "Mauritania" - MU: "Mauritius" - YT: "Mayotte" - MX: "Mexico" - FM: "Micronesia, Federated States of" - MD: "Moldova, Republic of" - MC: "Monaco" - MN: "Mongolia" - ME: "Montenegro" - MS: "Montserrat" - MA: "Morocco" - MZ: "Mozambique" - MM: "Myanmar" - NA: "Namibia" - NR: "Nauru" - NP: "Nepal" - NL: "Netherlands" - AN: "Netherlands Antilles" - NC: "New Caledonia" - NZ: "New Zealand" - NI: "Nicaragua" - NE: "Niger" - NG: "Nigeria" - NU: "Niue" - NF: "Norfolk Island" - MP: "Northern Mariana Islands" - NO: "Norway" - OM: "Oman" - PK: "Pakistan" - PW: "Palau" - PS: "Palestine, State of" - PA: "Panama" - PG: "Papua New Guinea" - PY: "Paraguay" - PE: "Peru" - PH: "Philippines" - PN: "Pitcairn" - PL: "Poland" - PT: "Portugal" - PR: "Puerto Rico" - QA: "Qatar" - RE: "Réunion" - RO: "Romania" - RU: "Russian Federation" - RW: "Rwanda" - BL: "Saint Barthélemy" - SH: "Saint Helena, Ascension and Tristan da Cunha" - KN: "Saint Kitts and Nevis" - LC: "Saint Lucia" - MF: "Saint Martin (French part)" - PM: "Saint Pierre and Miquelon" - VC: "Saint Vincent and the Grenadines" - WS: "Samoa" - SM: "San Marino" - ST: "Sao Tome and Principe" - SA: "Saudi Arabia" - SN: "Senegal" - RS: "Serbia" - SC: "Seychelles" - SL: "Sierra Leone" - SG: "Singapore" - SX: "Sint Maarten (Dutch part)" - SK: "Slovakia" - SI: "Slovenia" - SB: "Solomon Islands" - SO: "Somalia" - ZA: "South Africa" - GS: "South Georgia and the South Sandwich Islands" - SS: "South Sudan" - ES: "Spain" - LK: "Sri Lanka" - SD: "Sudan" - SR: "Suriname" - SJ: "Svalbard and Jan Mayen" - SZ: "Swaziland" - SE: "Sweden" - CH: "Switzerland" - SY: "Syrian Arab Republic" - TW: "Taiwan, Province of China" - TJ: "Tajikistan" - TZ: "Tanzania, United Republic of" - TH: "Thailand" - TL: "Timor-Leste" - TG: "Togo" - TK: "Tokelau" - TO: "Tonga" - TT: "Trinidad and Tobago" - TN: "Tunisia" - TR: "Turkey" - TM: "Turkmenistan" - TC: "Turks and Caicos Islands" - TV: "Tuvalu" - UG: "Uganda" - UA: "Ukraine" - AE: "United Arab Emirates" - GB: "United Kingdom" - US: "United States" - UM: "United States Minor Outlying Islands" - UY: "Uruguay" - UZ: "Uzbekistan" - VU: "Vanuatu" - VE: "Venezuela, Bolivarian Republic of" - VN: "Viet Nam" - VG: "Virgin Islands, British" - VI: "Virgin Islands, U.S." - WF: "Wallis and Futuna" - EH: "Western Sahara" - YE: "Yemen" - ZM: "Zambia" - ZW: "Zimbabwe" - -singleton = null - -# returns a singleton -module.exports = (-> - singleton ?= new Iso31661a2() -)() - diff --git a/node_modules/iso-3166-1-alpha-2/index.js b/node_modules/iso-3166-1-alpha-2/index.js deleted file mode 100644 index 7574195..0000000 --- a/node_modules/iso-3166-1-alpha-2/index.js +++ /dev/null @@ -1,301 +0,0 @@ -(function() { - var Iso31661a2, mout, singleton; - - mout = require('mout/object'); - - Iso31661a2 = (function() { - function Iso31661a2() {} - - Iso31661a2.prototype.getCountry = function(code) { - return Iso31661a2.prototype.countries[code]; - }; - - Iso31661a2.prototype.getCode = function(country) { - var idx, ret; - ret = null; - if (country != null) { - idx = mout.values(Iso31661a2.prototype.countries).indexOf(country); - if (idx !== -1) { - ret = Object.keys(Iso31661a2.prototype.countries)[idx]; - } - } - return ret; - }; - - Iso31661a2.prototype.getCountries = function() { - return mout.values(Iso31661a2.prototype.countries); - }; - - Iso31661a2.prototype.getCodes = function() { - return Object.keys(Iso31661a2.prototype.countries); - }; - - Iso31661a2.prototype.getData = function() { - return Iso31661a2.prototype.countries; - }; - - Iso31661a2.prototype.countries = { - AF: "Afghanistan", - AX: "Åland Islands", - AL: "Albania", - DZ: "Algeria", - AS: "American Samoa", - AD: "Andorra", - AO: "Angola", - AI: "Anguilla", - AQ: "Antarctica", - AG: "Antigua and Barbuda", - AR: "Argentina", - AM: "Armenia", - AW: "Aruba", - AU: "Australia", - AT: "Austria", - AZ: "Azerbaijan", - BS: "Bahamas", - BH: "Bahrain", - BD: "Bangladesh", - BB: "Barbados", - BY: "Belarus", - BE: "Belgium", - BZ: "Belize", - BJ: "Benin", - BM: "Bermuda", - BT: "Bhutan", - BO: "Bolivia, Plurinational State of", - BQ: "Bonaire, Sint Eustatius and Saba", - BA: "Bosnia and Herzegovina", - BW: "Botswana", - BV: "Bouvet Island", - BR: "Brazil", - IO: "British Indian Ocean Territory", - BN: "Brunei Darussalam", - BG: "Bulgaria", - BF: "Burkina Faso", - BI: "Burundi", - KH: "Cambodia", - CM: "Cameroon", - CA: "Canada", - CV: "Cape Verde", - KY: "Cayman Islands", - CF: "Central African Republic", - TD: "Chad", - CL: "Chile", - CN: "China", - CX: "Christmas Island", - CC: "Cocos (Keeling) Islands", - CO: "Colombia", - KM: "Comoros", - CG: "Congo", - CD: "Congo, the Democratic Republic of the", - CK: "Cook Islands", - CR: "Costa Rica", - CI: "Côte d'Ivoire", - HR: "Croatia", - CU: "Cuba", - CW: "Curaçao", - CY: "Cyprus", - CZ: "Czech Republic", - DK: "Denmark", - DJ: "Djibouti", - DM: "Dominica", - DO: "Dominican Republic", - EC: "Ecuador", - EG: "Egypt", - SV: "El Salvador", - GQ: "Equatorial Guinea", - ER: "Eritrea", - EE: "Estonia", - ET: "Ethiopia", - FK: "Falkland Islands (Malvinas)", - FO: "Faroe Islands", - FJ: "Fiji", - FI: "Finland", - FR: "France", - GF: "French Guiana", - PF: "French Polynesia", - TF: "French Southern Territories", - GA: "Gabon", - GM: "Gambia", - GE: "Georgia", - DE: "Germany", - GH: "Ghana", - GI: "Gibraltar", - GR: "Greece", - GL: "Greenland", - GD: "Grenada", - GP: "Guadeloupe", - GU: "Guam", - GT: "Guatemala", - GG: "Guernsey", - GN: "Guinea", - GW: "Guinea-Bissau", - GY: "Guyana", - HT: "Haiti", - HM: "Heard Island and McDonald Mcdonald Islands", - VA: "Holy See (Vatican City State)", - HN: "Honduras", - HK: "Hong Kong", - HU: "Hungary", - IS: "Iceland", - IN: "India", - ID: "Indonesia", - IR: "Iran, Islamic Republic of", - IQ: "Iraq", - IE: "Ireland", - IM: "Isle of Man", - IL: "Israel", - IT: "Italy", - JM: "Jamaica", - JP: "Japan", - JE: "Jersey", - JO: "Jordan", - KZ: "Kazakhstan", - KE: "Kenya", - KI: "Kiribati", - XK: "Kosovo", - KP: "Korea, Democratic People's Republic of", - KR: "Korea, Republic of", - KW: "Kuwait", - KG: "Kyrgyzstan", - LA: "Lao People's Democratic Republic", - LV: "Latvia", - LB: "Lebanon", - LS: "Lesotho", - LR: "Liberia", - LY: "Libya", - LI: "Liechtenstein", - LT: "Lithuania", - LU: "Luxembourg", - MO: "Macao", - MK: "Macedonia, the Former Yugoslav Republic of", - MG: "Madagascar", - MW: "Malawi", - MY: "Malaysia", - MV: "Maldives", - ML: "Mali", - MT: "Malta", - MH: "Marshall Islands", - MQ: "Martinique", - MR: "Mauritania", - MU: "Mauritius", - YT: "Mayotte", - MX: "Mexico", - FM: "Micronesia, Federated States of", - MD: "Moldova, Republic of", - MC: "Monaco", - MN: "Mongolia", - ME: "Montenegro", - MS: "Montserrat", - MA: "Morocco", - MZ: "Mozambique", - MM: "Myanmar", - NA: "Namibia", - NR: "Nauru", - NP: "Nepal", - NL: "Netherlands", - AN: "Netherlands Antilles", - NC: "New Caledonia", - NZ: "New Zealand", - NI: "Nicaragua", - NE: "Niger", - NG: "Nigeria", - NU: "Niue", - NF: "Norfolk Island", - MP: "Northern Mariana Islands", - NO: "Norway", - OM: "Oman", - PK: "Pakistan", - PW: "Palau", - PS: "Palestine, State of", - PA: "Panama", - PG: "Papua New Guinea", - PY: "Paraguay", - PE: "Peru", - PH: "Philippines", - PN: "Pitcairn", - PL: "Poland", - PT: "Portugal", - PR: "Puerto Rico", - QA: "Qatar", - RE: "Réunion", - RO: "Romania", - RU: "Russian Federation", - RW: "Rwanda", - BL: "Saint Barthélemy", - SH: "Saint Helena, Ascension and Tristan da Cunha", - KN: "Saint Kitts and Nevis", - LC: "Saint Lucia", - MF: "Saint Martin (French part)", - PM: "Saint Pierre and Miquelon", - VC: "Saint Vincent and the Grenadines", - WS: "Samoa", - SM: "San Marino", - ST: "Sao Tome and Principe", - SA: "Saudi Arabia", - SN: "Senegal", - RS: "Serbia", - SC: "Seychelles", - SL: "Sierra Leone", - SG: "Singapore", - SX: "Sint Maarten (Dutch part)", - SK: "Slovakia", - SI: "Slovenia", - SB: "Solomon Islands", - SO: "Somalia", - ZA: "South Africa", - GS: "South Georgia and the South Sandwich Islands", - SS: "South Sudan", - ES: "Spain", - LK: "Sri Lanka", - SD: "Sudan", - SR: "Suriname", - SJ: "Svalbard and Jan Mayen", - SZ: "Swaziland", - SE: "Sweden", - CH: "Switzerland", - SY: "Syrian Arab Republic", - TW: "Taiwan, Province of China", - TJ: "Tajikistan", - TZ: "Tanzania, United Republic of", - TH: "Thailand", - TL: "Timor-Leste", - TG: "Togo", - TK: "Tokelau", - TO: "Tonga", - TT: "Trinidad and Tobago", - TN: "Tunisia", - TR: "Turkey", - TM: "Turkmenistan", - TC: "Turks and Caicos Islands", - TV: "Tuvalu", - UG: "Uganda", - UA: "Ukraine", - AE: "United Arab Emirates", - GB: "United Kingdom", - US: "United States", - UM: "United States Minor Outlying Islands", - UY: "Uruguay", - UZ: "Uzbekistan", - VU: "Vanuatu", - VE: "Venezuela, Bolivarian Republic of", - VN: "Viet Nam", - VG: "Virgin Islands, British", - VI: "Virgin Islands, U.S.", - WF: "Wallis and Futuna", - EH: "Western Sahara", - YE: "Yemen", - ZM: "Zambia", - ZW: "Zimbabwe" - }; - - return Iso31661a2; - - })(); - - singleton = null; - - module.exports = (function() { - return singleton != null ? singleton : singleton = new Iso31661a2(); - })(); - -}).call(this); diff --git a/node_modules/iso-3166-1-alpha-2/package.json b/node_modules/iso-3166-1-alpha-2/package.json deleted file mode 100644 index 53b163b..0000000 --- a/node_modules/iso-3166-1-alpha-2/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "iso-3166-1-alpha-2", - "version": "1.0.1", - "description": "Simple module providing ISO-3166-1-alpha-2 country code to english country name lookup and reverse lookup", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "iso-3166-1-alpha-2", - "iso-3166-1", - "country", - "country code", - "countries", - "name" - ], - "author": "Georg Zoeller", - "license": "MIT", - "dependencies": { - "mout": "^1.2.3" - }, - "homepage": "https://github.com/georgzoeller/iso-3166-1-alpha-2", - "bugs": { - "url": "https://github.com/georgzoeller/iso-3166-1-alpha-2/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/georgzoeller/iso-3166-1-alpha-2.git" - } -} diff --git a/node_modules/mout/.editorconfig b/node_modules/mout/.editorconfig deleted file mode 100644 index faaf0d3..0000000 --- a/node_modules/mout/.editorconfig +++ /dev/null @@ -1,20 +0,0 @@ -; EditorConfig is awesome: http://EditorConfig.org - -; top-most EditorConfig file -root = true - -; base rules -[*] -end_of_line = lf -insert_final_newline = false -indent_style = space -indent_size = 4 -charset = utf-8 -trim_trailing_whitespace = true - -; The default indent on package.json is 2 spaces, better to keep it so we can -; use `npm install --save` and other features that rewrites the package.json -; file automatically -[{bower,package}.json] -indent_style = space -indent_size = 2 diff --git a/node_modules/mout/.jshintrc b/node_modules/mout/.jshintrc deleted file mode 100644 index bbdb29c..0000000 --- a/node_modules/mout/.jshintrc +++ /dev/null @@ -1,69 +0,0 @@ -{ - // Settings - "passfail" : false, // Stop on first error. - "maxerr" : 50, // Maximum error before stopping. - - - // Predefined globals whom JSHint will ignore. - "browser" : true, // Standard browser globals e.g. `window`, `document`. - "couch" : false, - "dojo" : false, - "jquery" : true, - "mootools" : false, - "node" : false, - "prototypejs" : false, - "rhino" : false, - "wsh" : false, - - // Custom globals. - "predef" : [ - "define", - "require" - ], - - - // Development. - "debug" : false, // Allow debugger statements e.g. browser breakpoints. - "devel" : false, // Allow developments statements e.g. `console.log();`. - - - // EcmaScript 5. - "es5" : false, // Allow EcmaScript 5 syntax. - "globalstrict" : false, // Allow global "use strict" (also enables 'strict'). - "strict" : false, // Require `use strict` pragma in every file. - - - // The Good Parts. - "asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). - "bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). - "boss" : true, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. - "curly" : false, // Require {} for every new block or scope. - "eqeqeq" : true, // Require triple equals i.e. `===`. - "eqnull" : true, // Tolerate use of `== null`. - "evil" : false, // Tolerate use of `eval`. - "expr" : false, // Tolerate `ExpressionStatement` as Programs. - "forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. - "immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` - "latedef" : false, // Prohibit variable use before definition. - "laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. - "loopfunc" : false, // Allow functions to be defined within loops. - "noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. - "regexdash" : true, // Tolerate unescaped last dash i.e. `[-...]`. - "regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. - "scripturl" : false, // Tolerate script-targeted URLs. - "shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. - "supernew" : false, // Tolerate `new function () { ... };` and `new Object;`. - "undef" : false, // Require all non-global variables be declared before they are used. - - - // Personal styling prefrences. - "newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. - "noempty" : true, // Prohipit use of empty blocks. - "nomen" : false, // Prohibit use of initial or trailing underbars in names. - "nonew" : true, // Prohibit use of constructors for side-effects. - "onevar" : false, // Allow only one `var` statement per function. - "plusplus" : false, // Prohibit use of `++` & `--`. - "sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. - "trailing" : true, // Prohibit trailing whitespaces. - "white" : false // Check against strict whitespace and indentation rules. -} diff --git a/node_modules/mout/.travis.yml b/node_modules/mout/.travis.yml deleted file mode 100644 index 98ee5dd..0000000 --- a/node_modules/mout/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ - language: node_js - node_js: - - "8.0" # current - - "6.0" # stable - script: - - "npm test --coverage" - - "jshint src" - notifications: - irc: - channels: - - "irc.freenode.org#moutjs" - on_success: change - on_failure: always - use_notice: true - skip_join: true - git: - depth: 10 diff --git a/node_modules/mout/CHANGELOG.md b/node_modules/mout/CHANGELOG.md deleted file mode 100644 index 3045cdf..0000000 --- a/node_modules/mout/CHANGELOG.md +++ /dev/null @@ -1,209 +0,0 @@ -mout changelog -============== -v1.1.1 (2019/04/18) --------------------- - - fixed `object/get` throwing an exception for null or undefined input objects - -v1.1.0 (2017/10/04) --------------------- - - update dependencies - - optimize `function/bind` - - optimize `lang/kindOf` - -v0.12.0 (2016/03/03) --------------------- - - add `array/indicesOf` - - add `function/memoize` - - add `array/reverse` - - add `math/overflow` - - fix `query/getQuery` - - fix `object/deepMatches` - - optimize `function/partial` - - updates license - - -v0.11.0 (2014/11/17) --------------------- - - - add `array/take`; - - remove unused variable from `date/totalDaysInMonth`; - - fix case insensitive RegExp cloning on `lang/clone`; - - -v0.10.0 (2014/09/02) --------------------- - - - add `array/equals`; - - add `array/groupBy`; - - add `array/last`; - - add `function/wrap`; - - add `lang/GLOBAL`; - - add `lang/isPrimitive`; - - add `number/MAX_SAFE_INTEGER`; - - add `object/omit`; - - add `object/result`; - - add `object/result`; - - add `random/randString`; - - change `lang/isEmpty` behavior to return `true` for any value that isn't - a collection. - - fix `array/findLastIndex` to stop at zero index; - - improve `function/partial` to accept placeholders; - - improve `math.norm` behavior for values outside the range and for cases - where `val === min === max`; - - improve `object/get` behavior to return properties from any value that is - not `null` or `undefined`; - - move `object/deepEquals` to `lang/deepEquals` (improving the behavior); - - -v0.9.1 (2014/04/08) -------------------- - - - fix `array/slice` behavior when start and end are higher than length. - - -v0.9.0 (2014/02/04) -------------------- - - - add `date/quarter`; - - add `function/constant`; - - add `random/randBool`; - - add un-padded 12-hour (`%l`) to `date/strftime`; - - fix `array/slice` on IE < 9 by using a custom implementation. - - fix `object/forIn` iteration for IE < 9 constructor property; - - improve `lang/inheritPrototype` by returning the `prototype`; - - improve `string/removeNonWord` to cover more chars; - - improve `string/repeat` performance; - - improve `string/unescapeHtml` by accepting leading zeros for `'`; - - -v0.8.0 (2013/11/22) -------------------- - - - add `array/findLast`. - - add `array/findLastIndex`. - - add `array/slice` and use it internally. - - add `array/sortBy` - - add `function/awaitDelay`. - - add `function/identity` - - add `number/isNaN`. - - add `number/nth`. - - add `number/ordinal`. - - allows nested replacement patterns in `string/interpolate`. - - change `function/makeIterator_` behavior (uses `identity` by default). - - simplify `string/escapeRegExp`. - - support custom equality on `array/compare`. - - -v0.7.1 (2013/09/18) -------------------- - - - fix `null` value handling in object/get. - - -v0.7.0 (2013/09/05) -------------------- - - - add bower ignores. - - add german translation for date localization. - - alias `function` package as `fn` since "function" is a reserved keyword. - - allow second argument on `array/pick`. - - improve `string/makePath` to not remove "//" after protocol. - - make sure methods inside `number` package works with mixed types. - - support arrays on `queryString/encode`. - - support multiple values for same property on `queryString/decode`. - - add `cancel()` method to `throttled/debounced` functions. - - add `function/times`. - - add `lang/toNumber`. - - add `string/insert`. - - add `super_` to constructor on `lang/inheritPrototype`. - - -v0.6.0 (2013/05/22) -------------------- - - - add optional delimeter to `string/unCamelCase` - - allow custom char on `number/pad` - - allow underscore characters in `string/removeNonWord` - - accept `level` on `array/flatten` instead of a flag - - convert underscores to camelCase in `string/camelCase` - - remove `create()` from number/currencyFormat - - add `date/dayOfTheYear` - - add `date/diff` - - add `date/isSame` - - add `date/startOf` - - add `date/strftime` - - add `date/timezoneAbbr` - - add `date/timezoneOffset` - - add `date/totalDaysInYear` - - add `date/weekOfTheYear` - - add `function/timeout` - - add `object/bindAll` - - add `object/functions` - - add `time/convert` - - -v0.5.0 (2013/04/04) -------------------- - - - add `array/collect` - - add `callback` parameter to `object/equals` and `object/deepEquals` to allow - custom compare operations. - - normalize behavior in `array/*` methods to treat `null` values as empty - arrays when reading from array - - add `date/parseIso` - - add `date/isLeapYear` - - add `date/totalDaysInMonth` - - add `object/deepMatches` - - change `function/makeIterator_` to use `deepMatches` (affects nearly all - iteration methods) - - add `thisObj` parameter to `array/min` and `array/max` - - -v0.4.0 (2013/02/26) -------------------- - - - add `object/equals` - - add `object/deepEquals` - - add `object/matches`. - - add `lang/is` and `lang/isnt`. - - add `lang/isInteger`. - - add `array/findIndex`. - - add shorthand syntax to `array/*`, `object/*` and `collection/*` methods. - - improve `number/sign` behavior when value is NaN or +0 or -0. - - improve `lang/isNaN` to actually check if value *is not a number* without - coercing value; so `[]`, `""`, `null` and `"12"` are considered NaN (#39). - - improve `string/contains` to match ES6 behavior (add fromIndex argument). - - -v0.3.0 (2013/02/01) -------------------- - - - add `lang/clone`. - - add `lang/toString`. - - add `string/replace`. - - add `string/WHITE_SPACES` - - rename `function/curry` to `function/partial`. - - allow custom chars in `string/trim`, `ltrim`, and `rtrim`. - - convert values to strings in the `string/*` functions. - - -v0.2.0 (2013/01/13) -------------------- - - - fix bug in `math/ceil` for negative radixes. - - change `object/deepFillIn` and `object/deepMixIn` to recurse only if both - existing and new values are plain objects. Will not recurse into arrays - or objects not created by the Object constructor. - - add `lang/isPlainObject` to check if a file is a valid object and is created - by the Object constructor - - change `lang/clone` behavior when dealing with custom types (avoid cloning - it by default) and add second argument to allow custom behavior if needed. - - rename `lang/clone` to `lang/deepClone`. - - add VERSION property to index.js - - simplify `math/floor`, `math/round`, `math/ceil` and `math/countSteps`. - - -v0.1.0 (2013/01/09) -------------------- - -- Rename project from "amd-utils" to "mout" diff --git a/node_modules/mout/CONTRIBUTING.md b/node_modules/mout/CONTRIBUTING.md deleted file mode 100644 index 65d9add..0000000 --- a/node_modules/mout/CONTRIBUTING.md +++ /dev/null @@ -1,61 +0,0 @@ -# Contributing - -Fork the repo at https://github.com/mout/mout - - > "Write clearly, don't be too clever" - The Elements of Programming Style - -Avoid unnamed functions and follow the other modules structure. By only using named functions it will be easier to extract the code from the AMD module if needed and it will also give better error messages, JavaScript minifiers like [Google Closure Compiler](http://code.google.com/closure/compiler/) and [UglifyJS](https://github.com/mishoo/UglifyJS) will make sure code is as small/optimized as possible. - - > "Make it clear before you make it faster." - The Elements of Programming Style - -Be sure to always create tests for each proposed module. Features will only be merged if they contain proper tests and documentation. - - > "Good code is its own best documentation." - Steve McConnell - -We should do a code review before merging to make sure names makes sense and implementation is as good as possible. - -Try to split your pull requests into logical groups, the smaller the easier to be reviewed/merged. - - - -## Tests & Code Coverage ## - -Tests can be found inside the `tests` folder, to execute them in the browser open the `tests/runner.html`. The same tests also work on node.js by running `npm test`. - -We should have tests for all methods and ensure we have a high code coverage through our continuous integration server ([travis](https://travis-ci.org/mout/mout)). When you ask for a pull request Travis will automatically run the tests on node.js and check the code coverage as well. - -We run `node build pkg` automatically before any `npm test`, so specs and packages should always be in sync. (will avoid human mistakes) - -To check code coverage run `npm test --coverage`, it will generate the reports inside the `coverage` folder and also log the results. Please note that node.js doesn't execute all code branches since we have some conditionals that are only met on old JavaScript engines (eg. IE 7-8), so we will never have 100% code coverage (but should be close to it). - - - -## Build Script ## - -The [build script](https://github.com/mout/mout/wiki/Build-Script) can be extremely helpful and can avoid human mistakes, use it. - - - -## Admins / Pull Requests ## - -Even if you are an admin (have commit rights) please do pull requests when adding new features or changing current behavior, that way we can review the work and discuss. Feel free to push changes that doesn't affect behavior without asking for a pull request (readme, changelog, build script, typos, refactoring, ...). - - - -## Large changes ## - -If you are proposing some major change, please create an issue to discuss it first. (maybe it's outside the scope of the project) - - - -## Questions / IRC / Wiki / Issue Tracker ## - -When in doubt ask someone on IRC to help you ([#moutjs on irc.freenode.net](http://webchat.freenode.net/?channels=moutjs)) or create a [new issue](http://github.com/mout/mout/issues). - -The [project wiki](https://github.com/mout/mout/wiki) can also be a good resource of information. - - ---- - -Check the [contributors list at github](https://github.com/mout/mout/contributors). - diff --git a/node_modules/mout/LICENSE.md b/node_modules/mout/LICENSE.md deleted file mode 100644 index e9ccc2b..0000000 --- a/node_modules/mout/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) -## Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/mout/README.md b/node_modules/mout/README.md deleted file mode 100644 index 06b853d..0000000 --- a/node_modules/mout/README.md +++ /dev/null @@ -1,65 +0,0 @@ -![mout](http://moutjs.com/logo.png "Modular JavaScript Utilties") - -http://moutjs.com/ - -[![Build Status](https://travis-ci.org/mout/mout.svg?branch=master)](https://travis-ci.org/mout/mout) -[![Downloads](https://img.shields.io/npm/dm/mout.svg)](https://www.npmjs.com/package/mout) -[![Version](https://img.shields.io/npm/v/mout.svg)](https://www.npmjs.com/package/mout) - -All code is library agnostic and consist mostly of helper methods that aren't -directly related with the DOM, the purpose of this library isn't to replace -Dojo, jQuery, YUI, Mootools, etc, but to provide modular solutions for common -problems that aren't solved by most of them. Consider it as a crossbrowser -JavaScript standard library. - - - -## Main goals ## - - - increase code reuse; - - be clear (code should be clean/readable); - - be easy to debug; - - be easy to maintain; - - follow best practices; - - follow standards when possible; - - **don't convert JavaScript into another language!** - - be compatible with other frameworks; - - be modular; - - have unit tests for all modules; - - work on multiple environments (IE7+, modern browsers, node.js); - - - -## What shouldn't be here ## - - - UI components; - - CSS selector engine; - - Event system - pub/sub; - - Template engine; - - Anything that isn't generic enough to be on a standard library; - - Anything that could be a separate library and/or isn't a modular utility... - - - -## API Documentation ## - -Online documentation can be found at http://moutjs.com/ or inside the -`doc` folder. - - - -## FAQ / Wiki / IRC ## - -For more info about project structure, design decisions, tips, how to -contribute, build system, etc, please check the [project -wiki](https://github.com/mout/mout/wiki). - -We also have an IRC channel [#moutjs on -irc.freenode.net](http://webchat.freenode.net/?channels=moutjs) - - - -## License ## - -Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). - diff --git a/node_modules/mout/array.js b/node_modules/mout/array.js deleted file mode 100644 index 5bc7dfa..0000000 --- a/node_modules/mout/array.js +++ /dev/null @@ -1,57 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'equals' : require('./array/equals'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'findLast' : require('./array/findLast'), - 'findLastIndex' : require('./array/findLastIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'groupBy' : require('./array/groupBy'), - 'indexOf' : require('./array/indexOf'), - 'indicesOf' : require('./array/indicesOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'last' : require('./array/last'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'repeat' : require('./array/repeat'), - 'reverse' : require('./array/reverse'), - 'shuffle' : require('./array/shuffle'), - 'slice' : require('./array/slice'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'sortBy' : require('./array/sortBy'), - 'split' : require('./array/split'), - 'take' : require('./array/take'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - - diff --git a/node_modules/mout/array/append.js b/node_modules/mout/array/append.js deleted file mode 100644 index bf74037..0000000 --- a/node_modules/mout/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - module.exports = append; - diff --git a/node_modules/mout/array/collect.js b/node_modules/mout/array/collect.js deleted file mode 100644 index 5863749..0000000 --- a/node_modules/mout/array/collect.js +++ /dev/null @@ -1,27 +0,0 @@ -var append = require('./append'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - module.exports = collect; - - diff --git a/node_modules/mout/array/combine.js b/node_modules/mout/array/combine.js deleted file mode 100644 index d66e621..0000000 --- a/node_modules/mout/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - module.exports = combine; - diff --git a/node_modules/mout/array/compact.js b/node_modules/mout/array/compact.js deleted file mode 100644 index 74c176e..0000000 --- a/node_modules/mout/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -var filter = require('./filter'); - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - module.exports = compact; - diff --git a/node_modules/mout/array/contains.js b/node_modules/mout/array/contains.js deleted file mode 100644 index 92bb6ad..0000000 --- a/node_modules/mout/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - module.exports = contains; - diff --git a/node_modules/mout/array/difference.js b/node_modules/mout/array/difference.js deleted file mode 100644 index ca57524..0000000 --- a/node_modules/mout/array/difference.js +++ /dev/null @@ -1,23 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var some = require('./some'); -var contains = require('./contains'); -var slice = require('./slice'); - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = slice(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = difference; - - diff --git a/node_modules/mout/array/equals.js b/node_modules/mout/array/equals.js deleted file mode 100644 index 1a20430..0000000 --- a/node_modules/mout/array/equals.js +++ /dev/null @@ -1,30 +0,0 @@ -var is = require('../lang/is'); -var isArray = require('../lang/isArray'); -var every = require('./every'); - - /** - * Compares if both arrays have the same elements - */ - function equals(a, b, callback){ - callback = callback || is; - - if (!isArray(a) || !isArray(b)) { - return callback(a, b); - } - - if (a.length !== b.length) { - return false; - } - - return every(a, makeCompare(callback), b); - } - - function makeCompare(callback) { - return function(value, i) { - return i in this && callback(value, this[i]); - }; - } - - module.exports = equals; - - diff --git a/node_modules/mout/array/every.js b/node_modules/mout/array/every.js deleted file mode 100644 index ac59883..0000000 --- a/node_modules/mout/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - module.exports = every; - diff --git a/node_modules/mout/array/filter.js b/node_modules/mout/array/filter.js deleted file mode 100644 index f0e7419..0000000 --- a/node_modules/mout/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = filter; - - diff --git a/node_modules/mout/array/find.js b/node_modules/mout/array/find.js deleted file mode 100644 index b4a7313..0000000 --- a/node_modules/mout/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -var findIndex = require('./findIndex'); - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = find; - - diff --git a/node_modules/mout/array/findIndex.js b/node_modules/mout/array/findIndex.js deleted file mode 100644 index 53f22a5..0000000 --- a/node_modules/mout/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - module.exports = findIndex; - diff --git a/node_modules/mout/array/findLast.js b/node_modules/mout/array/findLast.js deleted file mode 100644 index 84ba4bf..0000000 --- a/node_modules/mout/array/findLast.js +++ /dev/null @@ -1,13 +0,0 @@ -var findLastIndex = require('./findLastIndex'); - - /** - * Returns last item that matches criteria - */ - function findLast(arr, iterator, thisObj){ - var idx = findLastIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - module.exports = findLast; - - diff --git a/node_modules/mout/array/findLastIndex.js b/node_modules/mout/array/findLastIndex.js deleted file mode 100644 index b8330f2..0000000 --- a/node_modules/mout/array/findLastIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns the index of the last item that matches criteria - */ - function findLastIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var n = arr.length; - while (--n >= 0) { - if (iterator(arr[n], n, arr)) { - return n; - } - } - - return -1; - } - - module.exports = findLastIndex; - - diff --git a/node_modules/mout/array/flatten.js b/node_modules/mout/array/flatten.js deleted file mode 100644 index 3aad385..0000000 --- a/node_modules/mout/array/flatten.js +++ /dev/null @@ -1,45 +0,0 @@ -var isArray = require('../lang/isArray'); -var append = require('./append'); - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If level is specified, it will only flatten up to that level. - */ - function flatten(arr, level) { - if (arr == null) { - return []; - } - - level = level == null ? -1 : level; - return flattenTo(arr, [], level); - } - - module.exports = flatten; - - - diff --git a/node_modules/mout/array/forEach.js b/node_modules/mout/array/forEach.js deleted file mode 100644 index 268e506..0000000 --- a/node_modules/mout/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - module.exports = forEach; - - diff --git a/node_modules/mout/array/groupBy.js b/node_modules/mout/array/groupBy.js deleted file mode 100644 index af6f434..0000000 --- a/node_modules/mout/array/groupBy.js +++ /dev/null @@ -1,30 +0,0 @@ -var forEach = require('../array/forEach'); -var identity = require('../function/identity'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Bucket the array values. - */ - function groupBy(arr, categorize, thisObj) { - if (categorize) { - categorize = makeIterator(categorize, thisObj); - } else { - // Default to identity function. - categorize = identity; - } - - var buckets = {}; - forEach(arr, function(element) { - var bucket = categorize(element); - if (!(bucket in buckets)) { - buckets[bucket] = []; - } - - buckets[bucket].push(element); - }); - - return buckets; - } - - module.exports = groupBy; - diff --git a/node_modules/mout/array/indexOf.js b/node_modules/mout/array/indexOf.js deleted file mode 100644 index 6a9ac83..0000000 --- a/node_modules/mout/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - module.exports = indexOf; - diff --git a/node_modules/mout/array/indicesOf.js b/node_modules/mout/array/indicesOf.js deleted file mode 100644 index 46d656e..0000000 --- a/node_modules/mout/array/indicesOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array indicesOf - */ - function indicesOf(arr, item, fromIndex) { - var results = []; - if (arr == null) { - return results; - } - - fromIndex = typeof fromIndex === 'number' ? fromIndex : 0; - - var length = arr.length; - var cursor = fromIndex >= 0 ? fromIndex : length + fromIndex; - - while (cursor < length) { - if (arr[cursor] === item) { - results.push(cursor); - } - cursor++; - } - - return results; - } - - module.exports = indicesOf; - diff --git a/node_modules/mout/array/insert.js b/node_modules/mout/array/insert.js deleted file mode 100644 index 20bd442..0000000 --- a/node_modules/mout/array/insert.js +++ /dev/null @@ -1,15 +0,0 @@ -var difference = require('./difference'); -var slice = require('./slice'); - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(slice(arguments, 1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - module.exports = insert; - diff --git a/node_modules/mout/array/intersection.js b/node_modules/mout/array/intersection.js deleted file mode 100644 index 34957ab..0000000 --- a/node_modules/mout/array/intersection.js +++ /dev/null @@ -1,24 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var every = require('./every'); -var contains = require('./contains'); -var slice = require('./slice'); - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = slice(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - module.exports = intersection; - - diff --git a/node_modules/mout/array/invoke.js b/node_modules/mout/array/invoke.js deleted file mode 100644 index 32ec584..0000000 --- a/node_modules/mout/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -var slice = require('./slice'); - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = slice(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - module.exports = invoke; - diff --git a/node_modules/mout/array/join.js b/node_modules/mout/array/join.js deleted file mode 100644 index 71d8bd2..0000000 --- a/node_modules/mout/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -var filter = require('./filter'); - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - module.exports = join; - diff --git a/node_modules/mout/array/last.js b/node_modules/mout/array/last.js deleted file mode 100644 index d80ab2b..0000000 --- a/node_modules/mout/array/last.js +++ /dev/null @@ -1,16 +0,0 @@ - - - /** - * Returns last element of array. - */ - function last(arr){ - if (arr == null || arr.length < 1) { - return undefined; - } - - return arr[arr.length - 1]; - } - - module.exports = last; - - diff --git a/node_modules/mout/array/lastIndexOf.js b/node_modules/mout/array/lastIndexOf.js deleted file mode 100644 index ee44a25..0000000 --- a/node_modules/mout/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - module.exports = lastIndexOf; - diff --git a/node_modules/mout/array/map.js b/node_modules/mout/array/map.js deleted file mode 100644 index 7b7fb33..0000000 --- a/node_modules/mout/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - module.exports = map; - diff --git a/node_modules/mout/array/max.js b/node_modules/mout/array/max.js deleted file mode 100644 index 0b8f259..0000000 --- a/node_modules/mout/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = max; - - diff --git a/node_modules/mout/array/min.js b/node_modules/mout/array/min.js deleted file mode 100644 index ed6cc6a..0000000 --- a/node_modules/mout/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - module.exports = min; - - diff --git a/node_modules/mout/array/pick.js b/node_modules/mout/array/pick.js deleted file mode 100644 index 6408678..0000000 --- a/node_modules/mout/array/pick.js +++ /dev/null @@ -1,31 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Remove random item(s) from the Array and return it. - * Returns an Array of items if [nItems] is provided or a single item if - * it isn't specified. - */ - function pick(arr, nItems){ - if (nItems != null) { - var result = []; - if (nItems > 0 && arr && arr.length) { - nItems = nItems > arr.length? arr.length : nItems; - while (nItems--) { - result.push( pickOne(arr) ); - } - } - return result; - } - return (arr && arr.length)? pickOne(arr) : void(0); - } - - - function pickOne(arr){ - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - - module.exports = pick; - - diff --git a/node_modules/mout/array/pluck.js b/node_modules/mout/array/pluck.js deleted file mode 100644 index fef4043..0000000 --- a/node_modules/mout/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - module.exports = pluck; - - diff --git a/node_modules/mout/array/range.js b/node_modules/mout/array/range.js deleted file mode 100644 index 31d3c77..0000000 --- a/node_modules/mout/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - module.exports = range; - - diff --git a/node_modules/mout/array/reduce.js b/node_modules/mout/array/reduce.js deleted file mode 100644 index 827f428..0000000 --- a/node_modules/mout/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ - - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - module.exports = reduce; - diff --git a/node_modules/mout/array/reduceRight.js b/node_modules/mout/array/reduceRight.js deleted file mode 100644 index e36fd4a..0000000 --- a/node_modules/mout/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ - - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - module.exports = reduceRight; - diff --git a/node_modules/mout/array/reject.js b/node_modules/mout/array/reject.js deleted file mode 100644 index 0cfc8b1..0000000 --- a/node_modules/mout/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - module.exports = reject; - diff --git a/node_modules/mout/array/remove.js b/node_modules/mout/array/remove.js deleted file mode 100644 index aa6517d..0000000 --- a/node_modules/mout/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - module.exports = remove; - diff --git a/node_modules/mout/array/removeAll.js b/node_modules/mout/array/removeAll.js deleted file mode 100644 index d5f7f3b..0000000 --- a/node_modules/mout/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -var indexOf = require('./indexOf'); - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - module.exports = removeAll; - diff --git a/node_modules/mout/array/repeat.js b/node_modules/mout/array/repeat.js deleted file mode 100644 index b22d2b0..0000000 --- a/node_modules/mout/array/repeat.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Create an array of size N and fill with a value. - * This function will throw an exception in case - * you pass a negative number. - */ - function repeat(n, value) { - var arr = new Array(n); - return arr.fill(value); - } - - module.exports = repeat; - diff --git a/node_modules/mout/array/reverse.js b/node_modules/mout/array/reverse.js deleted file mode 100644 index a35cc1a..0000000 --- a/node_modules/mout/array/reverse.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a copy of the array in reversed order. - */ - function reverse(array) { - var copy = array.slice(); - copy.reverse(); - return copy; - } - - module.exports = reverse; - - diff --git a/node_modules/mout/array/shuffle.js b/node_modules/mout/array/shuffle.js deleted file mode 100644 index 9cd1fb5..0000000 --- a/node_modules/mout/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -var randInt = require('../random/randInt'); - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - module.exports = shuffle; - diff --git a/node_modules/mout/array/slice.js b/node_modules/mout/array/slice.js deleted file mode 100644 index 0a4d5cf..0000000 --- a/node_modules/mout/array/slice.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Create slice of source array or array-like object - */ - function slice(arr, start, end){ - var len = arr.length; - - if (start == null) { - start = 0; - } else if (start < 0) { - start = Math.max(len + start, 0); - } else { - start = Math.min(start, len); - } - - if (end == null) { - end = len; - } else if (end < 0) { - end = Math.max(len + end, 0); - } else { - end = Math.min(end, len); - } - - var result = []; - while (start < end) { - result.push(arr[start++]); - } - - return result; - } - - module.exports = slice; - - diff --git a/node_modules/mout/array/some.js b/node_modules/mout/array/some.js deleted file mode 100644 index 8d17772..0000000 --- a/node_modules/mout/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -var makeIterator = require('../function/makeIterator_'); - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - module.exports = some; - diff --git a/node_modules/mout/array/sort.js b/node_modules/mout/array/sort.js deleted file mode 100644 index 7807339..0000000 --- a/node_modules/mout/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ - - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - module.exports = mergeSort; - - diff --git a/node_modules/mout/array/sortBy.js b/node_modules/mout/array/sortBy.js deleted file mode 100644 index b84544c..0000000 --- a/node_modules/mout/array/sortBy.js +++ /dev/null @@ -1,19 +0,0 @@ -var sort = require('./sort'); -var makeIterator = require('../function/makeIterator_'); - - /* - * Sort array by the result of the callback - */ - function sortBy(arr, callback, context){ - callback = makeIterator(callback, context); - - return sort(arr, function(a, b) { - a = callback(a); - b = callback(b); - return (a < b) ? -1 : ((a > b) ? 1 : 0); - }); - } - - module.exports = sortBy; - - diff --git a/node_modules/mout/array/split.js b/node_modules/mout/array/split.js deleted file mode 100644 index 4f3ba50..0000000 --- a/node_modules/mout/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ - - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - module.exports = split; - diff --git a/node_modules/mout/array/take.js b/node_modules/mout/array/take.js deleted file mode 100644 index bd8eb07..0000000 --- a/node_modules/mout/array/take.js +++ /dev/null @@ -1,24 +0,0 @@ - - - /** - * Iterates over a callback a set amount of times - * returning the results - */ - function take(n, callback, thisObj){ - var i = -1; - var arr = []; - if( !thisObj ){ - while(++i < n){ - arr[i] = callback(i, n); - } - } else { - while(++i < n){ - arr[i] = callback.call(thisObj, i, n); - } - } - return arr; - } - - module.exports = take; - - diff --git a/node_modules/mout/array/toLookup.js b/node_modules/mout/array/toLookup.js deleted file mode 100644 index ce4c55d..0000000 --- a/node_modules/mout/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - module.exports = toLookup; - diff --git a/node_modules/mout/array/union.js b/node_modules/mout/array/union.js deleted file mode 100644 index f1334a9..0000000 --- a/node_modules/mout/array/union.js +++ /dev/null @@ -1,19 +0,0 @@ -var unique = require('./unique'); -var append = require('./append'); - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - module.exports = union; - - diff --git a/node_modules/mout/array/unique.js b/node_modules/mout/array/unique.js deleted file mode 100644 index 5db2510..0000000 --- a/node_modules/mout/array/unique.js +++ /dev/null @@ -1,25 +0,0 @@ -var filter = require('./filter'); - - /** - * @return {array} Array of unique items - */ - function unique(arr, compare){ - compare = compare || isEqual; - return filter(arr, function(item, i, arr){ - var n = arr.length; - while (++i < n) { - if ( compare(item, arr[i]) ) { - return false; - } - } - return true; - }); - } - - function isEqual(a, b){ - return a === b; - } - - module.exports = unique; - - diff --git a/node_modules/mout/array/xor.js b/node_modules/mout/array/xor.js deleted file mode 100644 index c125a99..0000000 --- a/node_modules/mout/array/xor.js +++ /dev/null @@ -1,26 +0,0 @@ -var unique = require('./unique'); -var filter = require('./filter'); -var contains = require('./contains'); - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - module.exports = xor; - - diff --git a/node_modules/mout/array/zip.js b/node_modules/mout/array/zip.js deleted file mode 100644 index 8bce9c0..0000000 --- a/node_modules/mout/array/zip.js +++ /dev/null @@ -1,28 +0,0 @@ -var max = require('./max'); -var map = require('./map'); - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1; - while (++i < len) { - // jshint loopfunc: true - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - module.exports = zip; - - diff --git a/node_modules/mout/collection.js b/node_modules/mout/collection.js deleted file mode 100644 index d5cf6ca..0000000 --- a/node_modules/mout/collection.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - - diff --git a/node_modules/mout/collection/contains.js b/node_modules/mout/collection/contains.js deleted file mode 100644 index a73f994..0000000 --- a/node_modules/mout/collection/contains.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrContains = require('../array/contains'); -var objContains = require('../object/contains'); - - /** - */ - module.exports = make(arrContains, objContains); - - diff --git a/node_modules/mout/collection/every.js b/node_modules/mout/collection/every.js deleted file mode 100644 index 300e03c..0000000 --- a/node_modules/mout/collection/every.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrEvery = require('../array/every'); -var objEvery = require('../object/every'); - - /** - */ - module.exports = make(arrEvery, objEvery); - - diff --git a/node_modules/mout/collection/filter.js b/node_modules/mout/collection/filter.js deleted file mode 100644 index 3875700..0000000 --- a/node_modules/mout/collection/filter.js +++ /dev/null @@ -1,23 +0,0 @@ -var forEach = require('./forEach'); -var makeIterator = require('../function/makeIterator_'); - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - module.exports = filter; - - diff --git a/node_modules/mout/collection/find.js b/node_modules/mout/collection/find.js deleted file mode 100644 index 14317e6..0000000 --- a/node_modules/mout/collection/find.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrFind = require('../array/find'); -var objFind = require('../object/find'); - - /** - * Find value that returns true on iterator check. - */ - module.exports = make(arrFind, objFind); - - diff --git a/node_modules/mout/collection/forEach.js b/node_modules/mout/collection/forEach.js deleted file mode 100644 index 6e28dcb..0000000 --- a/node_modules/mout/collection/forEach.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrForEach = require('../array/forEach'); -var objForEach = require('../object/forOwn'); - - /** - */ - module.exports = make(arrForEach, objForEach); - - diff --git a/node_modules/mout/collection/make_.js b/node_modules/mout/collection/make_.js deleted file mode 100644 index 4fb8a81..0000000 --- a/node_modules/mout/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -var slice = require('../array/slice'); - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = slice(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - module.exports = makeCollectionMethod; - - diff --git a/node_modules/mout/collection/map.js b/node_modules/mout/collection/map.js deleted file mode 100644 index fc157f5..0000000 --- a/node_modules/mout/collection/map.js +++ /dev/null @@ -1,23 +0,0 @@ -var isObject = require('../lang/isObject'); -var values = require('../object/values'); -var arrMap = require('../array/map'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - module.exports = map; - - diff --git a/node_modules/mout/collection/max.js b/node_modules/mout/collection/max.js deleted file mode 100644 index a8490e7..0000000 --- a/node_modules/mout/collection/max.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMax = require('../array/max'); -var objMax = require('../object/max'); - - /** - * Get maximum value inside collection - */ - module.exports = make(arrMax, objMax); - - diff --git a/node_modules/mout/collection/min.js b/node_modules/mout/collection/min.js deleted file mode 100644 index 51d9f14..0000000 --- a/node_modules/mout/collection/min.js +++ /dev/null @@ -1,10 +0,0 @@ -var make = require('./make_'); -var arrMin = require('../array/min'); -var objMin = require('../object/min'); - - /** - * Get minimum value inside collection. - */ - module.exports = make(arrMin, objMin); - - diff --git a/node_modules/mout/collection/pluck.js b/node_modules/mout/collection/pluck.js deleted file mode 100644 index 9b28377..0000000 --- a/node_modules/mout/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -var map = require('./map'); - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - module.exports = pluck; - - diff --git a/node_modules/mout/collection/reduce.js b/node_modules/mout/collection/reduce.js deleted file mode 100644 index 4c07573..0000000 --- a/node_modules/mout/collection/reduce.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrReduce = require('../array/reduce'); -var objReduce = require('../object/reduce'); - - /** - */ - module.exports = make(arrReduce, objReduce); - - diff --git a/node_modules/mout/collection/reject.js b/node_modules/mout/collection/reject.js deleted file mode 100644 index 2a92e3b..0000000 --- a/node_modules/mout/collection/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/mout/collection/size.js b/node_modules/mout/collection/size.js deleted file mode 100644 index 244e33e..0000000 --- a/node_modules/mout/collection/size.js +++ /dev/null @@ -1,19 +0,0 @@ -var isArray = require('../lang/isArray'); -var objSize = require('../object/size'); - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - module.exports = size; - - diff --git a/node_modules/mout/collection/some.js b/node_modules/mout/collection/some.js deleted file mode 100644 index 48fd252..0000000 --- a/node_modules/mout/collection/some.js +++ /dev/null @@ -1,9 +0,0 @@ -var make = require('./make_'); -var arrSome = require('../array/some'); -var objSome = require('../object/some'); - - /** - */ - module.exports = make(arrSome, objSome); - - diff --git a/node_modules/mout/date.js b/node_modules/mout/date.js deleted file mode 100644 index 9c2efe9..0000000 --- a/node_modules/mout/date.js +++ /dev/null @@ -1,22 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'quarter' : require('./date/quarter'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - - diff --git a/node_modules/mout/date/dayOfTheYear.js b/node_modules/mout/date/dayOfTheYear.js deleted file mode 100644 index 85905c5..0000000 --- a/node_modules/mout/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - module.exports = dayOfTheYear; - - diff --git a/node_modules/mout/date/diff.js b/node_modules/mout/date/diff.js deleted file mode 100644 index 1131cdc..0000000 --- a/node_modules/mout/date/diff.js +++ /dev/null @@ -1,130 +0,0 @@ -var totalDaysInMonth = require('./totalDaysInMonth'); -var totalDaysInYear = require('./totalDaysInYear'); -var convert = require('../time/convert'); - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - module.exports = diff; - - diff --git a/node_modules/mout/date/i18n/de-DE.js b/node_modules/mout/date/i18n/de-DE.js deleted file mode 100644 index b3ab620..0000000 --- a/node_modules/mout/date/i18n/de-DE.js +++ /dev/null @@ -1,61 +0,0 @@ - - // de-DE (German) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Januar", - "Februar", - "März", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" - ], - - "months_abbr" : [ - "Jan", - "Febr", - "März", - "Apr", - "Mai", - "Juni", - "Juli", - "Aug", - "Sept", - "Okt", - "Nov", - "Dez" - ], - - "days" : [ - "Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag" - ], - - "days_abbr" : [ - "So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa" - ] - }; - diff --git a/node_modules/mout/date/i18n/en-US.js b/node_modules/mout/date/i18n/en-US.js deleted file mode 100644 index f9526ce..0000000 --- a/node_modules/mout/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ - - // en-US (English, United States) - module.exports = { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; - diff --git a/node_modules/mout/date/i18n/pt-BR.js b/node_modules/mout/date/i18n/pt-BR.js deleted file mode 100644 index 71ebadb..0000000 --- a/node_modules/mout/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ - - // pt-BR (Brazillian Portuguese) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; - diff --git a/node_modules/mout/date/i18n/ru.js b/node_modules/mout/date/i18n/ru.js deleted file mode 100644 index 6c1a6ca..0000000 --- a/node_modules/mout/date/i18n/ru.js +++ /dev/null @@ -1,61 +0,0 @@ - - // ru (Russian) - module.exports = { - "am" : "", - "pm" : "", - - "x": "%d.%m.%Y", - "X": "%H:%M:%S", - "c": "%a, %e %b %Y г., %H:%M", - - "months" : [ - "Январь", - "Февраль", - "Март", - "Апрель", - "Май", - "Июнь", - "Июль", - "Август", - "Сентябрь", - "Октябрь", - "Ноябрь", - "Декабрь" - ], - - "months_abbr" : [ - "Янв.", - "Февр.", - "Март", - "Апр.", - "Май", - "Июнь", - "Июль", - "Авг.", - "Сент.", - "Окт.", - "Нояб.", - "Дек." - ], - - "days" : [ - "Воскресенье", - "Понедельник", - "Вторник", - "Среда", - "Четверг", - "Пятница", - "Суббота" - ], - - "days_abbr" : [ - "Вс", - "Пн", - "Вт", - "Ср", - "Чт", - "Пт", - "Сб" - ] - }; - diff --git a/node_modules/mout/date/i18n_.js b/node_modules/mout/date/i18n_.js deleted file mode 100644 index 723fc10..0000000 --- a/node_modules/mout/date/i18n_.js +++ /dev/null @@ -1,14 +0,0 @@ -var mixIn = require('../object/mixIn'); -var enUS = require('./i18n/en-US'); - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - module.exports = activeLocale; - - diff --git a/node_modules/mout/date/isLeapYear.js b/node_modules/mout/date/isLeapYear.js deleted file mode 100644 index 4212870..0000000 --- a/node_modules/mout/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -var isDate = require('../lang/isDate'); - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - module.exports = isLeapYear; - - diff --git a/node_modules/mout/date/isSame.js b/node_modules/mout/date/isSame.js deleted file mode 100644 index 4097d29..0000000 --- a/node_modules/mout/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -var startOf = require('./startOf'); - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - module.exports = isSame; - - diff --git a/node_modules/mout/date/parseIso.js b/node_modules/mout/date/parseIso.js deleted file mode 100644 index 40a70a8..0000000 --- a/node_modules/mout/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -var some = require('../array/some'); - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else { - match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - module.exports = parseISO8601; - - diff --git a/node_modules/mout/date/quarter.js b/node_modules/mout/date/quarter.js deleted file mode 100644 index 8f61076..0000000 --- a/node_modules/mout/date/quarter.js +++ /dev/null @@ -1,16 +0,0 @@ - - - /** - * gets date quarter - */ - function quarter(date){ - var month = date.getMonth(); - if (month < 3) return 1; - if (month < 6) return 2; - if (month < 9) return 3; - return 4; - } - - module.exports = quarter; - - diff --git a/node_modules/mout/date/startOf.js b/node_modules/mout/date/startOf.js deleted file mode 100644 index 072bc0e..0000000 --- a/node_modules/mout/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -var clone = require('../lang/clone'); - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - module.exports = startOf; - - diff --git a/node_modules/mout/date/strftime.js b/node_modules/mout/date/strftime.js deleted file mode 100644 index 5e56633..0000000 --- a/node_modules/mout/date/strftime.js +++ /dev/null @@ -1,121 +0,0 @@ -var pad = require('../number/pad'); -var lpad = require('../string/lpad'); -var i18n = require('./i18n_'); -var dayOfTheYear = require('./dayOfTheYear'); -var timezoneOffset = require('./timezoneOffset'); -var timezoneAbbr = require('./timezoneAbbr'); -var weekOfTheYear = require('./weekOfTheYear'); - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'l': - return lpad(date.getHours() % 12, 2); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - module.exports = strftime; - - diff --git a/node_modules/mout/date/timezoneAbbr.js b/node_modules/mout/date/timezoneAbbr.js deleted file mode 100644 index b100687..0000000 --- a/node_modules/mout/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -var timezoneOffset = require('./timezoneOffset'); - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - module.exports = timezoneAbbr; - - diff --git a/node_modules/mout/date/timezoneOffset.js b/node_modules/mout/date/timezoneOffset.js deleted file mode 100644 index 9492dce..0000000 --- a/node_modules/mout/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -var pad = require('../number/pad'); - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - module.exports = timezoneOffset; - - diff --git a/node_modules/mout/date/totalDaysInMonth.js b/node_modules/mout/date/totalDaysInMonth.js deleted file mode 100644 index e5d5390..0000000 --- a/node_modules/mout/date/totalDaysInMonth.js +++ /dev/null @@ -1,23 +0,0 @@ -var isDate = require('../lang/isDate'); -var isLeapYear = require('./isLeapYear'); - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - monthIndex = fullYear.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - module.exports = totalDaysInMonth; - - diff --git a/node_modules/mout/date/totalDaysInYear.js b/node_modules/mout/date/totalDaysInYear.js deleted file mode 100644 index b4b7e9b..0000000 --- a/node_modules/mout/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -var isLeapYear = require('./isLeapYear'); - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - module.exports = totalDaysInYear; - - diff --git a/node_modules/mout/date/weekOfTheYear.js b/node_modules/mout/date/weekOfTheYear.js deleted file mode 100644 index dd51b7f..0000000 --- a/node_modules/mout/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -var dayOfTheYear = require('./dayOfTheYear'); - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - module.exports = weekOfTheYear; - - diff --git a/node_modules/mout/doc/array.md b/node_modules/mout/doc/array.md deleted file mode 100644 index 864dd39..0000000 --- a/node_modules/mout/doc/array.md +++ /dev/null @@ -1,1003 +0,0 @@ -# array # - -Array utilities. - - - - -## append(arr1, arr2):Array - -Appends an array to the end of the other. -The first array will be modified and will contain the appended items. - -See: [`union()`](#union), [`combine()`](#combine) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -append(foo, bar); // ['a', 'b', 'b', 'd'] -``` - - - -## collect(arr, callback, [thisObj]):Array - -Maps the items in `arr` and concatenates the resulting arrays. - -See: [`map()`](#map) - -```js -collect([1, 2, 3], function(val) { - return [val, val % 2]; -}); // [1, 1, 2, 0, 3, 1]; - -collect(['a', 'bb', ''], function(val) { - return val.split(''); -}); // ['a', 'b', 'b'] -``` - -It also supports a shorthand syntax: - -```js -var items = [{ a: [1] }, { b: 'foo' }, { a: [2, 3] }]; -collect(items, 'a'); // [1, 2, 3]; -``` - - - -## combine(arr1, arr2):Array - -Combines an array with all the items of another. -The first array will be modified and will contain the combined items. -Does not allow duplicates and is case and type sensitive. - -See: [`union()`](#union), [`append()`](#append) - -```js -var foo = ['a', 'b'], - bar = ['b', 'd']; - -combine(foo, bar); // ['a', 'b', 'd'] -``` - - - -## compact(arr):Array - -Returns a new Array without any `null` or `undefined` values. Note that it will -keep empty strings and other falsy values (simillar to Ruby Array#compact). - -```js -var arr = [0, 1, null, false, '', 'foo', undefined, 'bar']; -compact(arr); // [0, 1, false, '', 'foo', 'bar']; -``` - - - -## contains(arr, value):Boolean - -Checks if Array contains value. Alias to `indexOf(arr, val) !== -1`. - -```js -var arr = [1, 2, 3]; -contains(arr, 2); // true -contains(arr, 'foo'); // false -``` - - - -## difference(...arrs):Array - -Return a new Array with elements that aren't present in the other Arrays -besides the first one. - -Works like [Python set#difference](http://docs.python.org/library/stdtypes.html#set.difference). - -It will remove duplicates. - -See: [`xor()`](#xor), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -difference(a, b); // ['a', 'b'] -``` - - -## equals(a, b, [compare]):Boolean - -Checks if both arrays are equal. - -```js -equals([1, 2], [1, 2]); // true -equals([2, 4], [1, 2]); // false -``` - -By default it uses the [lang/is](lang.html#is) as the `compare` function but -you can pass a custom function to change the behavior. - -```js -function loose(a, b) { - return a == b; -} -equals(['1', 2], [1, 2], loose); // true -``` - -See: [object/equals](object.html#equals), [lang/deepEquals](lang.html#deepEquals) - - - -## every(arr, callback, [thisObj]):Array - -Crossbrowser `Array.every()`. - -Tests whether all elements in the array pass the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -every(items, isString); // false -every(items, isFunction); // false -every(items, function(val, key, arr){ - return val != null; -}); // true -``` - -more info at [MDN Array#every](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:true}, {id:8, active:true}]; -// all items with `id === 8` -every(items, {id:8}); // false -// `active` is truthy on all items -every(items, 'active'); // true -``` - - - -## filter(arr, callback, [thisObj]):Array - -Crossbrowser `Array.filter()`. - -Creates a new array with all elements that pass the callback test. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var nums = [1, 2, 3, 4, 5, 6]; -var oddNumbers = filter(nums, function(val, key, arr){ - return (val % 2) !== 0; -}); -// > [1, 3, 5] -``` - -more info at [MDN Array#filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) - -Filter also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// filter item that matches all properties/values pairs -filter(users, {name:'john', beard:false}); -// > [{name:'john', surnname:'connor', beard:false}] -// items where 'beard' is a truthy value -filter(users, 'beard'); -// > [{name:'john', surnname:'doe', beard:true}] -``` - -See [`reject()`](#reject) - - - -## find(arr, callback, [thisObj]):* - -Loops through all the items in the Array and returns the first one that passes -a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -find(arr, isString); // "foo" -find(arr, isNumber); // 123 -find(arr, isObject); // {a:'b'} -``` - -Find also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// first item that matches all properties/values pairs -find(users, {name:'john'}); // {name:'john', surnname:'connor', beard:false} -// first item where 'beard' is a truthy value -find(users, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [findIndex()](#findIndex), [findLast()](#findLast), -[findLastIndex()](#findLastIndex) - - - -## findLast(arr, callback, [thisObj]):* - -Loops through all the items in the Array (starting from last item) and returns -the first one that passes a truth test (callback). - -```js -var arr = [123, {a:'b'}, 'foo', 'bar']; -findLast(arr, isString); // "bar" -findLast(arr, isNumber); // 123 -findLast(arr, isObject); // {a:'b'} -``` - -`findLast` also supports shorthand notation: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true} -]; -// last item that matches all properties/values pairs -findLast(users, {name:'john'}); // {name:'john', surnname:'doe', beard:true} -// last item where 'beard' is a truthy value -findLast(users, 'beard'); // {name:'john', surnname:'doe', beard:true} -``` - -See: [find()](#find), [findIndex()](#findIndex), -[findLastIndex()](#findLastIndex) - - - -## findIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array and returns the index of the first one -that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findIndex(arr, isString); // 2 -findIndex(arr, isNumber); // 0 -findIndex(arr, isObject); // 1 -findIndex(arr, isRegExp); // -1 -``` - -`findIndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findIndex(pets, { pet: 'dog' }); // 0 -findIndex(pets, { name: 'Maggie' }); // 1 -``` - -See: [find()](#find), [findLastIndex()](#findLastIndex) - - - -## findLastIndex(arr, iterator, [thisObj]):Number - -Loops through the items in the Array on the reverse order and returns the index -of the first one that passes a truth test (callback). - -Returns `-1` if no item was found that passes the truth test. - -```js -var arr = [1, { a: 1 }, 'foo', 'bar']; -findLastIndex(arr, isString); // 3 -findLastIndex(arr, isNumber); // 0 -findLastIndex(arr, isObject); // 1 -findLastIndex(arr, isRegExp); // -1 -``` - -`findLastndex` also supports shorthand notation: - -```js -var pets = [ - { pet: 'dog', name: 'Sam' }, - { pet: 'dog', name: 'Maggie' } -]; - -findLastIndex(pets, { pet: 'dog' }); // 1 -findLastIndex(pets, { name: 'Sam' }); // 0 -``` - -See: [find()](#find), [findIndex()](#findIndex) - - - -## flatten(arr, [level]):Array - -Recursively flattens an array. A new array containing all the elements is -returned. If `level` is specified, it will only flatten up to that level. -Note that arrays within objects will not be flattened. - -### Example - -```js -flatten([1, [2], [3, [4, 5]]]); -// > [1, 2, 3, 4, 5] -flatten([1, [2], [3, [4, 5]]], 1); -// > [1, 2, 3, [4, 5]] -``` - -See: [`object/flatten()`](./object.html#flatten) - - -## forEach(arr, callback, [thisObj]):void - -Crossbrowser `Array.forEach()`. - -It allows exiting the iteration early by returning `false` on the callback. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = ['foo', 'bar', 'lorem', 'ipsum']; -forEach(items, function(val, key, arr){ - console.log(key +' : '+ val); - if (val === 'lorem') { - // stop iteration (break) - return false; - } -}); -``` - -more info at [MDN Array#forEach](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/forEach) - - - -## groupBy(arr, [categorize=identity], [thisObj]):Object - -Groups array elements by the `key` returned from the `categorize` function. - -It will use the [function/identity](function.html#identity) as the default -`categorize` function. - -```js -var items = ['lorem', 'ipsum', 'foo', 'bar', 'baz']; -groupBy(items, function(val) { return val.length }); -// > {'3': ['foo', 'bar', 'baz'], '5': ['lorem', 'ipsum']} -``` - - - -## indexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.indexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#indexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf) - - - - -## indicesOf(arr, item, [fromIndex]):Number - -Returns an array of indices where `item` is found in the array. - -Like `array/indexOf` it does loop over sparse items in the array. The optional -`fromIndex` parameter can limit the scope, the same way as it does in indexOf. - -```js -var items = ['lorem', 'ipsum', 'foo', 'ipsum', 'ipsum']; - -indicesOf(items, 'ipsum'); -// > [1, 3, 4] - -indicesOf(items, 'ipsum', 1); -// > [3, 4] -``` - - - - - -## insert(arr, ...items):Number - -Push items into array only if they aren't contained by it. Returns the new -`length` of the array. - -See: [`remove()`](#remove), [`removeAll()`](#removeAll), -[`contains()`](#contains) - -```js -var arr = ['a', 'b']; -insert(arr, 'a'); // 2 : ['a', 'b'] -insert(arr, 'c'); // 3 : ['a', 'b', 'c'] -insert(arr, 1, 2, 'b'); // 5 : ['a', 'b', 'c', 1, 2] -``` - - - -## intersection(...arrs):Array - -Return a new Array with elements common to all Arrays. - -Similar to Python set#intersection and underscore.js intersection. - -It will remove duplicates. - -See: [`difference()`](#difference), [`xor()`](#xor) - -```js -var a = ['a', 'b', 1], - b = ['c', 1], - c = [1, 2, 3]; -intersection(a, b, c); // [1] -``` - - - -## invoke(arr, methodName[, ...args]):Array - -Call `methodName` on each item of the array passing custom arguments if needed. - -```js -invoke([[3,2,1], [9,5,2]], 'sort'); // [[1,2,3], [2,5,9]] -``` - - - -## join(arr, [separator]):String - -Joins the strings in `arr`, inserting `separator` between each value. - -This ignores null values and empty strings that are in the array. `separator` -defaults to an empty string. This will convert all non-string objects in the -array to a string. - -### Example - -```js -join(['a', 'b', 'c']); // 'abc' -join(['foo', 'bar'], ', '); // 'foo, bar' -join([null, 'foo', '', 'bar', undefined], ':'); // 'foo:bar' -``` - - -## last(arr):* - -Returns the last element of an array without modifying the array. - - -```js -last( [1, 2, 3, 4] ) // > 4 -last( ['foo', 'bar'] ) // > 'bar' -``` - - -## lastIndexOf(arr, item, [fromIndex]):Number - -Crossbrowser `Array.lastIndexOf()`. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#lastIndexOf](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - - - -## map(arr, callback, [thisObj]]):Array - -Crossbrowser `Array.map()`. - -Creates a new array with the results of calling a provided function on every -element in this array. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -See: [`collect()`](#collect) - -```js -var nums = [1,2,3,4]; -var double = map(nums, function(val, key, arr){ - return val * 2; -}); -// > [2, 4, 6, 8] -``` - -more info at [MDN Array#map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) - -It also supports a shorthand notation which can be used to achieve same result -as [`array/pluck`](#pluck): - -```js -var src = ['lorem', 'ipsum', 'foo', 'amet']; -// grab the "length" property of all items -var lengths = map(src, 'length'); // [5, 5, 3, 4] -``` - - - -## max(arr, [iterator], [thisObj]):* - -Returns maximum value inside array or use a custom iterator to define how items -should be compared. - -See: [`min()`](#min) - -```js -max([10, 2, 7]); // 10 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - -It also supports a shorthand notation: - -```js -max(['foo', 'lorem', 'amet'], 'length'); // "lorem" -``` - - - -## min(arr, [iterator], [thisObj]):* - -Returns minimum value inside array or use a custom iterator to define how items -should be compared. - -See: [`max()`](#max) - -```js -min([10, 2, 7]); // 2 -min(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'foo' -``` - -It also supports a shorthand notation: - -```js -min(['foo', 'lorem', 'amet'], 'length'); // "foo" -``` - - - -## pick(arr, [nItems]):* - -Gets random item(s) and removes it from the original array. - -If `nItems` is specified it will return a new Array contained the *picked* -items otherwise it returns a single item. - -See: [`random/choice()`](./random.html#choice) - -### Example: - -```js -var arr = [1, 2, 3, 4, 5, 6]; -var item1 = pick(arr); // 4 -var item2 = pick(arr); // 1 -var items = pick(arr, 2); // [5, 2] -console.log(arr); // [3, 6] -``` - - - -## pluck(arr, propName):Array - -Extract a list of property values. - -See: [`function/prop()`](function.html#prop) - -```js -var users = [{name : 'John', age: 21}, {name: 'Jane', age : 27}]; -var names = pluck(users, 'name'); // ["John", "Jane"] -var ages = pluck(users, 'age'); // [21, 27] -``` - - - -## range([start], stop[, step]):Array - -Creates a new Array with all the values inside the range. Works similarly to -Python#range or PHP#range. - -### Arguments - - 1. `[start]` (Number) : Range start. Default is `0`. - 2. `stop` (Number) : Range limit. - 3. `[step]` (Number) : Step size. Default is `1`. - -### Example - -```js -range(5); // [0, 1, 2, 3, 4, 5] -range(0, 5); // [0, 1, 2, 3, 4, 5] -range(0, 5, 2); // [0, 2, 4] -range(20, 40, 5); // [20, 25, 30, 35, 40] -``` - - - -## reduce(arr, fn):* - -Crossbrowser `Array.reduce()`. - -Apply a function against an accumulator and each value of the array (from -left-to-right) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduce](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce) - - - -## reduceRight(arr, fn):* - -Crossbrowser `Array.reduceRight()`. - -Apply a function simultaneously against two values of the array (from -right-to-left) as to reduce it to a single value. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -more info at [MDN Array#reduceRight](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight) - - - -## reject(arr, fn, thisObj):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var numbers = [1, 2, 3, 4, 5, 6]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4, 6] -``` - -It also supports a shorthand syntax: - -```js -var users = [ - {name:'john', surname:'connor', beard:false}, - {name:'john', surname:'doe', beard:true}, - {name:'jane', surname:'doe', beard:false} -]; -// reject items that matches all properties/values pairs -reject(arr, {name:'john'}); -// > [{name:'jane', surnname:'doe', beard:false}] -// reject items where 'beard' is a truthy value -filter(arr, 'beard'); -// > [{name:'john', surnname:'connor', beard:false}, -// {name:'jane', surname:'doe', beard:false}] -``` - - - -## remove(arr, item):void - -Remove a single item from the array. - -IMPORTANT: it won't remove duplicates, just a single item. - -### Example - -```js -var foo = [1, 2, 3, 4]; -remove(foo, 2); -console.log(foo); // [1, 3, 4] -``` - - - -## removeAll(arr, item):void - -Remove all instances of an item from the array. - -### Example - -```js -var foo = [1, 2, 3, 4, 2, 2]; -removeAll(foo, 2); -console.log(foo); // [1, 3, 4]; -``` - -## reverse(arr):void - -Returns a copy of the array with all elements in reversed order. - -### Example - -```js -var foo = [1, 2, 3, 4, 5]; -var bar = reverse(foo); -console.log(bar); // [5, 4, 3, 2, 1]; - -console.log(foo); // [1, 2, 3, 4, 5]; -``` - - - - -## shuffle(arr):Array - -Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle. - -### Example - -```js -var arr = ['a', 'b', 'c', 'd', 'e']; -shuffle(arr); // ['b', 'd', 'e', 'c', 'a'] -``` - - - -## slice(arr, [start], [end]):Array - -Returns a new array containing the items from `arr` from the start index to the -end index. - -If `start` is omitted, it will start at `0`. If `end` is omitted, it will used -the last index of the array. If `start` or `end` is negative, it is used as an -offset from the end of the array. - -It will also convert array-like objects to arrays. - -### Example - -```js -slice([1, 2, 3, 4], 1, 2); // [2, 3] -slice([1, 2, 3], 1); // [2, 3] -slice([1, 2, 3]); // [1, 2, 3] -slice({ length: 2, 0: 'a', 1: 'b' }); // ['a', 'b'] -slice([1, 2, 3], 0, -1); // [1, 2] -slice([1, 2, 3], -2); // [2, 3] -``` - - - -## some(arr, callback, [thisObj]):Array - -Crossbrowser `Array.some()`. - -Tests whether some element in the array passes the test implemented by the provided function. - -It differs from ES5 since it will also loop over sparse items in the array to -normalize the behavior across browsers (avoid inconsistencies). - -```js -var items = [1, 'foo', 'bar']; -some(items, isString); // true -some(items, isFunction); // false -``` - -more info at [MDN Array#some](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some) - -It also supports a shorthand syntax: - -```js -var items = [{id:1, active:true}, {id:3, active:false}, {id:8, active:false}]; -// at least one item with `id === 8` -some(items, {id:8}); // true -// `active` is truthy on at least one item -some(items, 'active'); // true -``` - -see also: [`object/matches`](object.html#matches) - - - -## sort(arr, [compareFn]):Array - -Returns a sorted Array using the [Merge Sort](http://en.wikipedia.org/wiki/Merge_sort) algorithm (stable sort). - -The `Array.prototype.sort` browser implementations differ since the sorting algorithm isn't described in the ES spec - [in V8 it isn't stable](http://code.google.com/p/v8/issues/detail?id=90) and [on Firefox it is stable](https://bugzilla.mozilla.org/show_bug.cgi?id=224128) - so this function doesn't use the browser native implementation and is recommended in cases where a stable sort is required (items should preserve same order if already sorted). - -**Important:** It does logical comparisson by default (greater/less than) and -not a string comparisson like the native `Array#sort`. - -### compareFn - -If `compareFn` is supplied elements are sorted based on the value returned by -the `compareFn`. - - - If `compareFn(a, b)` is less than `0`, sort `a` to a lower index than `b`. - - If `compareFn(a, b)` returns `0`, leave `a` and `b` unchanged with respect - to each other, but sorted with respect to all different elements. - - If `compareFn(a, b)` is greater than `0`, sort `b` to a lower index than - `a`. - -See: [`sortBy`](#sortBy) - -### Example - -```js -sort([187, 23, 47, 987, 12, 59, 0]); // [0, 12, 23, 47, 59, 187, 987] -sort(['a', 'z', 'c', 'beta', 'b']); // ['a', 'b', 'beta', 'c', 'z'] - -// ['sit', 'amet', 'lorem', 'ipsum'] -sort(['lorem', 'ipsum', 'sit', 'amet'], function(a, b){ - // sort by length, items with same length - // will keep the relative order (stable) - return a.length - b.length; -}); - -// [4, 3, 2, 1] -sort([2, 3, 1, 4], function(a, b){ - // reverse sort - return b - a; -}); -``` - - - -## sortBy(arr, callback, [context]):Array - -Returns an array sorted by the result of the callback. - -The callback is called for each item that is to be sorted, and the -results of the callback are used to sort the array. The callback -is called with the item as the first parameter, optionally with -the provided context. - -It also supports a shorthand notation which can be used to sort by a property -name. - -See: [`sort`](#sort) - -```js -// Returns [{ a: 1 }, { a: 2 }, { a: 3 }] -sortBy([{ a: 1 }, { a: 3 }, { a: 2 }], - function(item) { return item.a; }); - -// Same as above, using shorthand notation -sortBy([{ a: 1 }, { a: 3 }, { a: 2 }], 'a'); -``` - - - -## split(arr, [segments]):Array - -Splits an array into a fixed number of segments. - -The number of segments is specified by `segments` and defaults to 2. If the -array cannot be evenly split, the first segments will contain the extra items. -If `arr` is empty, an empty array is returned. If `arr.length` is less than -`segments`, then the resulting array will have `arr.length` number of -single-element arrays. - -### Example -```js -split([1, 2, 3, 4, 5], 3) // [ [1, 2], [3, 4], [5] ] -split([1, 2, 3, 4, 5]) // [ [1, 2, 3], [4, 5] ] -split([]) // [] -split([1, 2], 3) // [ [1], [2] ] -``` - - - -## take(times, callback, [thisObj]):Array - -Builds a new array based on the returned values from the given `callback`. - -```js -take(4, function(i, total) { - return i / total; -}); -// > [0, 0.25, 0.5, 0.75] -``` - -see: [function/times](../function.html#times) - - - -## toLookup(arr, key):Object - -Create an object that indexes the items in the array by a key. If `key` is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise `key` specifies the property on each value to use as the key. - -### Example - -```js -var foo = [{ name: 'a', thing: 1 }, { name: 'b', thing: 2 }]; -// { a: { name: 'a', thing: 1 }, b: { name: 'b', thing: 2 } } -toLookup(foo, 'name'); -// same as above -toLookup(foo, function (value) { return value.name; }); -``` - - - -## union(...arrs):Array - -Concat multiple arrays removing duplicates. - -```js -var a = ['a', 'b'], - b = ['c', 'a'], - c = [1, 'b', 2, 3, 'a']; - -//note that unique remove from begin to end -union(a, b, c); // ['c', 1, 'b', 2, 3, 'a'] -``` - - - -## unique(arr, [compare]):Array - -Return a new Array of unique items. - -**IMPORTANT:** duplicates are removed starting from begining of array. - -```js -var arr = [1, 2, 3, 4, 2, 2, 4]; -var foo = unique(arr); -console.log(foo); -// > [1, 3, 2, 4]; - -// you also have the option to set a custom compare function -var users = [{name: 'john'}, {name: 'paul'}, {name: 'john'}]; -var uniqueNames = unique(arr, function(a, b){ - return a.name === b.name; -}); -console.log(uniqueNames); -// > [{name: 'paul'}, {name: 'john'}] -``` - - - -## xor(arr1, arr2):Array - -Exclusive OR. Returns items that are present in a single array. - -Works like [Python set#symmetric_difference](http://docs.python.org/library/stdtypes.html#set.symmetric_difference) renamed for brevity. - -It will remove duplicates. - -See: [`difference()`](#difference), [`intersection()`](#intersection) - -```js -var a = ['a', 'b', 1]; -var b = ['c', 1]; -xor(a, b); // ['a', 'b', 'c'] -``` - - - -## zip(...arrs):Array - -Groups the elements of each array at their corresponding indexes. - -Useful for separate data sources that are coordinated through matching array -indexes. For a matrix of nested arrays, `zip.apply(...)` can transpose the -matrix in a similar fashion. - -```js -// [['moe', 30, true], ['larry', 40, false], ['curly', 50, false]] -zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]); -``` - - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/mout/doc/collection.md b/node_modules/mout/doc/collection.md deleted file mode 100644 index 2ffcab1..0000000 --- a/node_modules/mout/doc/collection.md +++ /dev/null @@ -1,233 +0,0 @@ -# collection # - -Methods for dealing with collections (Array or Objects). - - - -## contains(list, value):Boolean - -Checks if collection contains value. - -```js -contains({a: 1, b: 2, c: 'bar'}, 2); // true -contains([1, 2, 3], 'foo'); // false -``` - -See: [array/contains](array.html#contains), [object/contains](object.html#contains) - - - -## every(list, callback, [thisObj]):Boolean - -Tests whether all values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - -See: [array/every](array.html#every), [object/every](object.html#every) - - - -## filter(list, callback, [thisObj]):Array - -Filter collection properties. - -See: [array/filter](array.html#filter), [object/filter](object.html#filter) - - - -## find(list, callback, [thisObj]):* - -Loops through all the values in the collection and returns the first one that -passes a truth test (callback). - -**Important:** loop order over objects properties isn't guaranteed to be the -same on all environments. - -```js -find({a: 'foo', b: 12}, isString); // 'foo' -find(['foo', 12], isNumber); // 12 -``` - -See: [array/find](array.html#find), [object/find](object.html#find) - - - -## forEach(list, callback, [thisObj]) - -Loop through all values of the collection. - -See: [array/forEach](array.html#forEach), [object/forOwn](object.html#forOwn) - - - -## map(list, callback, [thisObj]):Array - -Returns a new collection where the properties values are the result of calling -the callback for each property in the original collection. - -See: [array/map](array.html#map), [object/map](object.html#map) - - - -## max(list, [iterator]):* - -Returns maximum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`min()`](#min), [array/max](array.html#max), [object/max](object.html#max) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max(['foo', 'lorem', 'amet'], function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(list, [iterator]):* - -Returns minimum value inside collection or use a custom iterator to define how -items should be compared. - -See: [`max()`](#max), [array/min](array.html#min), [object/min](object.html#min) - -```js -min([10, 2, 7]); // 2 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## pluck(list, propName):Array - -Extract a list of property values. - -```js -var users = [ - { - name : 'John', - age : 21 - }, - { - name : 'Jane', - age : 27 - } -]; - -pluck(users, 'name'); // ["John", "Jane"] -pluck(users, 'age'); // [21, 27] - -users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // ['John', 'Mary'] -``` - -See: [array/pluck](array.html#pluck), [object/pluck](object.html#pluck) - - - -## reduce(list, callback, initial, [thisObj]):* - -Apply a function against an accumulator and each value in the collection as to -reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - -See: [array/reduce](array.html#reduce), [object/reduce](object.html#reduce) - - - -## reject(list, fn, [thisObj]):Array - -Creates a new array with all the elements that do **not** pass the truth test. -Opposite of [`filter()`](#filter). - -### Example - -```js -var numbers = [1, 2, 3, 4, 5]; -reject(numbers, function(x) { return (x % 2) !== 0; }); // [2, 4] - -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // [2, 4] -``` - -See: [array/reject](array.html#reject), [object/reject](object.html#reject) - - - -## size(list):Number - -Returns the number of values in the collection. - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -size([1,2,3]); // 3 -size(null); // 0 -``` - -See: [object/size](object.html#size) - - - -## some(list, callback, [thisObj]):Boolean - -Tests whether any values in the collection pass the test implemented by the -provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -some(obj, isString); // true -some([1, 2, 3], isNumber) // true -some([1, 2, 3], isString) // false -``` - -See: [array/some](array.html#some), [object/some](object.html#some) - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/date.md b/node_modules/mout/doc/date.md deleted file mode 100644 index e140399..0000000 --- a/node_modules/mout/doc/date.md +++ /dev/null @@ -1,307 +0,0 @@ -# date # - -Date utilities. - - -## dayOfTheYear(date):Number - -How many days elapsed since begining of the year (following gregorian -calendar). - -```js -// Jan 1st -dayOfTheYear(new Date(2013, 0, 1)); // 1 -// Dec 31th -dayOfTheYear(new Date(2013, 11, 31)); // 364 -``` - - - -## diff(date1, date2, [unitName]):Number - -Calculate the difference between dates (range). - -The returned value is always positive. The default `unitName` is `"ms"`. - -Available units: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`, -`millisecond`. - -See: [`time/convert()`](time.html#convert) - -```js -var d1 = new Date(2012, 4, 5); -var d2 = new Date(2013, 4, 8); -diff(d1, d2); // 31795200000 -diff(d1, d2, 'hour'); // 8832 -diff(d1, d2, 'week'); // 52.57142857142857 -diff(d1, d2, 'month'); // 12.096774193548388 -diff(d1, d2, 'year'); // 1.0082191780821919 -``` - - - -## isLeapYear(fullYear|date):Boolean - -Checks if it's a [leap year](http://en.wikipedia.org/wiki/Leap_year) according -to the Gregorian calendar. - -see: [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -isLeapYear(2012); // true -isLeapYear(2013); // false -isLeapYear(new Date(2012, 2, 28)); // true -``` - - -## isSame(date1, date2[, period]):Boolean - -Check if both dates are the "same". - -You can pass an optional *period* used to set the comparisson precision. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -var date1 = new Date(2013, 1, 3); -var date2 = new Date(2013, 2, 9); -isSame(date1, date2); // false -isSame(date1, date2, 'day'); // false -isSame(date1, date2, 'month'); // false -isSame(date1, date2, 'year'); // true -``` - - - -## parseIso(str):Number - -Parses an [ISO8601](http://en.wikipedia.org/wiki/Iso8601) date and returns the -number of milliseconds since January 1, 1970, 00:00:00 UTC, or `NaN` if it is -not a valid ISO8601 date. - -This parses *all* ISO8601 dates, including dates without times, [ordinal -dates](https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates), and the compact -representation (omitting delimeters). The only exception is [ISO week -dates](https://en.wikipedia.org/wiki/ISO_week_date), which are not parsed. - -If no time zone offset is specified, it assumes UTC time. - -```js -// Jan 01, 1970 00:00 GMT -parseIso('1970-01-01T00:00:00') // 0 -parseIso('1970-001') // 0 -parseIso('1970-01-01') // 0 -parseIso('19700101T000000.00') // 0 -parseIso('1970-01-01T02:00+02:00') // 0 - -// Jan 02, 2000 20:10 GMT+04:00 -parseIso('2000-01-02T20:10+04:00') // 946829400000 -``` - - -## quarter(date):Number - -Get a number between 1 to 4 that represents the quarter of the year. - -```js -quarter(new Date(2013, 1, 19)); // 1 -quarter(new Date(2013, 4, 12)); // 2 -quarter(new Date(2013, 7, 25)); // 3 -quarter(new Date(2013, 10, 8)); // 4 -``` - - -## startOf(date, period):Date - -Get a new Date at the start of the period. - -Available periods: `year`, `month`, `week`, `day`, `hour`, `minute`, `second`. - -```js -// Apr 05 2013 11:27:43 -var date = new Date(2013, 3, 5, 11, 27, 43, 123); -startOf(date, 'year'); // Jan 01 2013 00:00:00 -startOf(date, 'month'); // Apr 01 2013 00:00:00 -startOf(date, 'day'); // Apr 05 2013 00:00:00 -startOf(date, 'hour'); // Apr 05 2013 11:00:00 -``` - - - -## strftime(date, format, [l10n]):String - -Format date based on strftime format. - -Replaced tokens: - -
-
%a
locale's abbreviated weekday name.
-
%A
locale's full weekday name.
-
%b
locale's abbreviated month name.
-
%B
locale's full month name.
-
%c
locale's appropriate date and time representation.
-
%C
century number (the year divided by 100 and truncated -to an integer) as a decimal number [00..99].
-
%d
day of the month as a decimal number [01..31].
-
%D
same as %m/%d/%y.
-
%e
day of the month as a decimal number [1..31]; -a single digit is preceded by a space.
-
%F
The ISO 8601 date format (%Y-%m-%d)
-
%h
same as %b.
-
%H
hour (24-hour clock) as a decimal number [00..23].
-
%I
hour (12-hour clock) as a decimal number [01..12].
-
%j
day of the year as a decimal number [001..366].
-
%l
hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank
-
%L
zero-padded milliseconds [000..999]
-
%m
month as a decimal number [01..12].
-
%M
minute as a decimal number [00..59].
-
%n
newline character.
-
%p
locale's equivalent of either "am" or "pm"
-
%P
locale's equivalent of either "AM" or "PM"
-
%r
time in a.m. and -p.m. notation; in the POSIX locale this is equivalent to %I:%M:%S %p.
-
%R
time in 24 hour notation (%H:%M).
-
%s
seconds since Epoch (1970-01-01 00:00:00 UTC)
-
%S
second as a decimal number [00..60].
-
%t
tab character.
-
%T
time (%H:%M:%S).
-
%u
weekday as a decimal number [1..7], with 1 representing -Monday.
-
%U
week number of the year (Sunday as the first day of -the week) as a decimal number [00..53].
-
%V
week number of the year (Monday as the first day of the -week) as a decimal number [01..53]. If the week containing 1 January has -four or more days in the new year, then it is considered week 1. Otherwise, -it is the last week of the previous year, and the next week is week 1.
-
%w
weekday as a decimal number [0..6], with 0 representing -Sunday.
-
%W
week number of the year (Monday as the first day of -the week) as a decimal number [00..53]. All days in a new year preceding -the first Monday are considered to be in week 0.
-
%x
locale's appropriate date representation.
-
%X
locale's appropriate time representation.
-
%y
year without century as a decimal number [00..99].
-
%Y
year with century as a decimal number.
-
%Z
timezone name or abbreviation, or by no bytes -if no timezone information exists.
-
%%
is replaced by %.
-
- -```js -var date = new Date(2013, 3, 8, 9, 2, 4); -strftime(date, '%Y-%m-%d'); // "2013-04-08" -strftime(date, '%R'); // "09:02" -strftime(date, '%Y-%m-%dT%H:%M:%S%z'); // "2013-04-08T09:02:04+0000" -``` - -You can also set a custom locale: - -```js -var ptBr = require('mout/date/i18n/pt-BR'); -strftime(date, '%a, %d %b', ptBr); // 'Seg, 08 Abr' -strftime(date, '%A, %d %B', ptBr); // 'Segunda, 08 Abril' -``` - -To set it globally: - -```js -require('mout/date/i18n_').set( customLocaleData ); -``` - -See [date/i18n](https://github.com/mout/mout/tree/master/src/date/i18n) -for localization examples. - - - -## timezoneAbbr(date):String - -Return timezone abbreviation or similar data. - -The result will vary based on the OS/browser since some environments doesn't -provide enough info about the current locale. - -```js -// IE 7-8 -timezoneAbbr(new Date()); // "-0500" -// Chrome, FF, V8 -timezoneAbbr(new Date()); // "EST" -``` - - - -## timezoneOffset(date):String - -Return time zone as hour and minute offset from UTC (e.g. +0900). - -It's important to note that JavaScript Date object will use the system locale -info to determinate the [timezone -offset](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset) -and that daylight saving time affects the result. - -```js -// if system locale is EST -timezoneOffset(new Date()); // -0500 -``` - - - -## totalDaysInMonth(fullYear, monthIndex):Number - -Returns the amount of days in the month taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear) - -```js -totalDaysInMonth(2008, 1); // 29 (leap year) -totalDaysInMonth(2009, 1); // 28 - -// you can also pass a Date object as single argument -totalDaysInMonth( new Date(2013, 0, 1) ); // 31 -``` - - -## totalDaysInYear(fullYear):Number - -Returns the amount of days in the year taking into consideration leap years -(following Gregorian calendar). - -see: [`isLeapYear()`](#isLeapYear), [`totalDaysInMonth()`](#totalDaysInMonth) - -```js -totalDaysInYear(2008); // 366 (leap year) -totalDaysInYear(2009); // 365 - -// you can also pass a Date object as single argument -totalDaysInYear( new Date(2013, 0, 1) ); // 365 -``` - - - -## weekOfTheYear(date, [firstDayOfWeek]):Number - -Returns how many weeks elapsed since start of the year (`0..53`). - -`firstDayOfWeek` can be `0` (Sunday) or `1` (Monday). By default weeks start at -Sunday. - -It will return `0` if `date` is before the first `firstDayOfWeek` of the year. - -```js -// Tue Jan 01 2013 -weekOfTheYear( new Date(2013,0,1) ); // 0 -// Wed Jan 09 2013 -weekOfTheYear( new Date(2013,0,9) ); // 1 -// Sun Jan 01 2012 -weekOfTheYear( new Date(2012,0,1) ); // 1 -// Mon Jan 09 2012 -weekOfTheYear( new Date(2012,0,9) ); // 2 -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/mout/doc/function.md b/node_modules/mout/doc/function.md deleted file mode 100644 index 1425cb3..0000000 --- a/node_modules/mout/doc/function.md +++ /dev/null @@ -1,310 +0,0 @@ -# function # - -Function*(al)* utilities. - -## after(fn, n):Function - -This creates a function that will only call `fn` if it was called `n` or more times. - - -```js -function onLoaded() { - console.log('all images loaded'); -} - -var imagePaths = ['1.jpg', '2.jpg', '3.jpg']; -var callback = after(onLoaded, imagePaths.length); - -forEach(imagePaths, function(path) { - asyncLoad(path, callback); -}); -``` - -## awaitDelay(fn, delay):Function - -Returns a function that ensures that `fn` is only called *after* `delay` -milliseconds have elapsed. When the returned function is called before the -delay has elapsed, it will wait until the delay has elapsed and then call `fn`. -When the returned function is called after the delay has elapsed, it will call -`fn` after the next "tick" (it will always be called asynchronously). The -context and arguments that the returned function is called in are applied to -`fn`. - -In the below example `onLoaded` will not be executed before a 1000 millisecond -delay. Even if `loadImages` loads and calls `callback` earlier. However, say -the images take 1500 milliseconds to load, it will trigger `onLoaded` -immediately. - -```js -var callback = awaitDelay(onLoaded, 1000); -loadImages(callback); -function onLoaded(){ - console.log('loaded'); -} -``` - -You can also cancel de delayed call by simply using the native `clearTimeout` -method (like a regular `setTimeout` call). - -```js -var timeoutId = callback(); -// onLoaded won't be called since it was canceled before the 1000ms delay -clearTimeout(timeoutId); -``` - -### Arguments: - - 1. `fn` (Function) : Target Function - 2. `delay` (Number) : Delay of execution in milliseconds - -See: [`debounce()`](#debounce) - - - -## bind(fn, context, [...args]):Function - -Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `context` (Object) : Execution context (object used as `this`) - 3. `[...args]` (*) : Arguments (0...n arguments) - -See: [`partial()`](#partial), [object/bindAll](./object.html#bindAll) - - - -## compose(...fn):Function - -Returns the composition of a list of functions, where each function consumes -the return value of the function that follows. In math terms, composing the -functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - -```js -function add2(x) { return x + 2 } -function multi2(x) { return x * 2 } -map([1, 2, 3], compose(add2, multi2)); // [4, 6, 8] - -//same as -map([1, 2, 3], function(x){ - return add2( multi2(x) ); -}); -``` - - - -## constant(value):Function - -Returns a new function that will always return `value` when called. - -```js -var f = constant('foo'); -f(); // 'foo' - -// Provided arguments are ignored; value is always returned -f(1); // 'foo' - -f = constant({ foo: 'bar' }); -f(); // { foo: 'bar' } -``` - - - -## debounce(fn, delay[, isAsap]):Function - -Creates a function that will delay the execution of `fn` until after `delay` -milliseconds have elapsed since the last time it was invoked. - -Subsequent calls to the debounced function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = debounce(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a debounced-function call and `X` is the actual -callback execution: - - Default - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - - Debounced with `isAsap == true`: - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X - -You also have the option to cancel the debounced call if it didn't happen yet: - -```js -lazyRedraw(); -// lazyRedraw won't be called since `cancel` was called before the `delay` -lazyRedraw.cancel(); -``` - -See: [`throttle()`](#throttle) - - -## func(name):Function - -Returns a function that calls a method with given `name` on supplied object. -Useful for iteration methods like `array/map` and `array/forEach`. - -See: [`prop()`](#prop) - -```js -// will call the method `getName()` for each `user` -var names = map(users, func('getName')); -``` - - - -## identity(val):* - -Returns the first argument provided to it. - -```js -identity(3); // 3 -identity(1,2,3); // 1 -identity('foo'); // "foo" -``` - - - -## partial(fn, [...args]):Function - -Return a partially applied function supplying default arguments. - -This method is similar to [`bind`](#bind), except it does not alter the this -binding. - -### Arguments - - 1. `fn` (Function) : Target Function - 2. `[...args]` (*) : Arguments (0...n arguments) - -See: [`bind()`](#bind) - -```js -function add(a, b){ return a + b } -var add10 = partial(add, 10); -console.log( add10(2) ); // 12 -``` - - - -## prop(name):Function - -Returns a function that gets a property with given `name` from supplied object. -Useful for using in conjunction with `array/map` and/or for creating getters. - -See: [`array/pluck()`](array.html#pluck) - -```js -var users = [{name:"John", age:21}, {name:"Jane", age:25}]; -// ["John", "Jane"] -var names = map(users, prop('name')); -``` - - - -## series(...fn):Function - -Returns a function that will execute all the supplied functions in order and -passing the same parameters to all of them. Useful for combining multiple -`array/forEach` into a single one and/or for debugging. - -```js -// call `console.log()` and `doStuff()` for each item item in the array -forEach(arr, series(console.log, doStuff)); -``` - - - -## throttle(fn, interval):Function - -Creates a function that, when executed, will only call the `fn` function at -most once per every `interval` milliseconds. - -If the throttled function is invoked more than once during the wait timeout, -`fn` will also be called on the trailing edge of the timeout. - -Subsequent calls to the throttled function will return the result of the last -`fn` call. - -```js -// sometimes less is more -var lazyRedraw = throttle(redraw, 300); -foo.on.resize.add(lazyRedraw); -``` - -In this visualization, `|` is a throttled-function call and `X` is the actual -`fn` execution: - - ||||||||||||||||||||||||| (pause) ||||||||||||||||||||||||| - X X X X X X X X X X X X - -You also have the option to cancel the throttled call if it didn't happen yet: - -```js -lazyRedraw(); -setTimeout(function(){ - lazyRedraw(); - // lazyRedraw will be called only once since `cancel` was called before - // the `interval` for 2nd call completed - lazyRedraw.cancel(); -}, 250); -``` - -See: [`debounce()`](#debounce) - - -## timeout(fn, millis, context, [...args]):Number - -Functions as a wrapper for `setTimeout`. Calls a the function `fn` after a given delay `millis` in milliseconds. -The function is called within the specified context. The return value can be used to clear the timeout using `clearTimeout`. - -```js -var id = timeout(doStuff, 300, this); - -clearTimeout(id); -``` - -## times(n, callback, [context]):void - -Iterates over a callback `n` times. - -### Arguments - - 1. `n` (Number) : Number of iterations - 2. `callback` (Function) : Closure executed for every iteration - 3. `context` (Object) : Execution context (object used as `this`) - -```js -var output = ''; -times(5, function(i) { - output += i.toString(); -}); -// output: 01234 -``` - -## wrap(fn, wrapper):Function - -Wraps the first `fn` inside of the `wrapper` function, passing it as the first argument. This allows the `wrapper` to execute code before and after the `fn` runs, adjust the arguments, and execute it conditionally. - -```js -var hello = function(name) { return "hello: " + name; }; -hello = wrap(hello, function(func) { - return "before, " + func("moe") + ", after"; -}); -hello(); -// output: 'before, hello: moe, after' -``` - -See: [`partial()`](#partial) -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/lang.md b/node_modules/mout/doc/lang.md deleted file mode 100644 index 9324968..0000000 --- a/node_modules/mout/doc/lang.md +++ /dev/null @@ -1,516 +0,0 @@ -# lang # - -Language Utilities. Easier inheritance, scope handling, type checks. - - - -## clone(val):* - -Clone native types like Object, Array, RegExp, Date and primitives. - -This method will not clone values that are referenced within `val`. It will -only copy the value reference to the new value. If the value is not a plain -object but is an object, it will return the value unchanged. - -### Example - -```js -var a = { foo: 'bar' }; -var b = clone(a); -console.log(a === b); // false -console.log(a.foo === b.foo); // true - -var c = [1, 2, 3]; -var d = clone(b); -console.log(c === d); // false -console.log(c); // [1, 2, 3] -``` - -See: [`deepClone()`](#deepClone) - - - -## createObject(parent, [props]):Object - -Create Object using prototypal inheritance and setting custom properties. - -Mix between [Douglas Crockford Prototypal Inheritance](http://javascript.crockford.com/prototypal.html) and [`object/mixIn`](./object.html#mixIn). - -### Arguments - - 1. `parent` (Object) : Parent Object - 2. `[props]` (Object) : Object properties - -### Example - -```js -var base = { - trace : function(){ - console.log(this.name); - } -}; - -var myObject = createObject(base, { - name : 'Lorem Ipsum' -}); - -myObject.trace(); // "Lorem Ipsum" -``` - - - -## ctorApply(constructor, args):Object - -Do `Function.prototype.apply()` on a constructor while maintaining prototype -chain. - -```js -function Person(name, surname) { - this.name = name; - this.surname = surname; -} - -Person.prototype.walk = function(){ - console.log(this.name +' is walking'); -}; - -var args = ['John', 'Doe']; - -// "similar" effect as calling `new Person("John", "Doe")` -var john = ctorApply(Person, args); -john.walk(); // "John is walking" -``` - - - -## deepClone(val, [instanceClone]):* - -Deep clone native types like Object, Array, RegExp, Date and primitives. - -The `instanceClone` function will be invoked to clone objects that are not -"plain" objects (as defined by [`isPlainObject`](#isPlainObject)) if it is -provided. If `instanceClone` is not specified, it will not attempt to clone -non-plain objects, and will copy the object reference. - -### Example - -```js -var a = {foo:'bar', obj: {a:1, b:2}}; -var b = deepClone(a); // {foo:'bar', obj: {a:1, b:2}} -console.log( a === b ); // false -console.log( a.obj === b.obj ); // false - -var c = [1, 2, [3, 4]]; -var d = deepClone(c); // [1, 2, [3, 4]] -var e = c.concat(); // [1, 2, [3, 4]] - -console.log( c[2] === d[2] ); // false -// concat doesn't do a deep clone, arrays are passed by reference -console.log( e[2] === d[2] ); // true - -function Custom() { } -function cloneCustom(x) { return new Custom(); } -var f = { test: new Custom() }; -var g = deepClone(f, cloneCustom); -g.test === f.test // false, since new Custom instance will be created -``` - -See: [`clone()`](#clone) - - - -## deepEquals(a, b, [callback]):Boolean - -Recursively tests whether two values contains the same keys and values. - -`callback` specifies the equality comparison function used to compare -non-object values. It defaults to using the [`is()`](#is) function. - -If the values are both an object or array, it will recurse into both values, -checking if their keys/values are equal. It will only check the keys and values -contained by the objects; it will not check the objects' prototypes. If either -of the values are not objects, they will be checked using the `callback` -function. - -Example: - -```js -deepEquals({ a: 1 }, { a: 1 }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 1 } }); // true -deepEquals({ value: { a: 1 } }, { value: { a: 2 } }); // false -deepEquals({ value: { a: 1 } }, { value: { a: 1, b: 2 } }); // false -deepEquals({}, null); // false -deepEquals(null, null); // true -deepEquals( - { a: { b: 1 } }, - { a: { b: '1' } }, - function(a, b) { return a == b; }); // true -``` - -See: [object/equals](object.html#equals), [array/equals](array.html#equals) - - - -## defaults(val, ...defaults):void - -Return first value that isn't `null` or `undefined`. - - function doSomethingAwesome(foo, bar) { - // default arguments - foo = defaults(foo, 'lorem'); - bar = defaults(bar, 123); - // ... - } - - - -## GLOBAL:Object - -Reference to the global context (`window` inside a browser, `global` on -node.js). Works on ES3 and ES5 strict-mode. - - - -## inheritPrototype(childCtor, parentCtor):Object - -Inherit the prototype methods from one constructor into another. - -Similar to [node.js util/inherits](http://nodejs.org/docs/latest/api/util.html#util_util_inherits_constructor_superconstructor). - -It returns the the `childCtor.prototype` for convenience. - -```js -function Foo(name){ - this.name = name; -} -Foo.prototype = { - getName : function(){ - return this.name; - } -}; - -function Bar(name){ - Foo.call(this, name); -} -//should be called before calling constructor -var proto = inheritPrototype(Bar, Foo); - -// for convenience we return the new prototype object -console.log(proto === Bar.prototype); // true - -var myObj = new Bar('lorem ipsum'); -myObj.getName(); // "lorem ipsum" - -console.log(myObj instanceof Foo); // true - -// you also have access to the "super" constructor -console.log(Bar.super_ === Foo); // true -``` - - -## is(x, y):Boolean - -Check if both values are identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -is(NaN, NaN); // true -is(-0, +0); // false -is('a', 'b'); // false -``` - -See: [`isnt()`](#isnt) - - - -## isnt(x, y):Boolean - -Check if both values are not identical/egal. - -```js -// wtfjs -NaN === NaN; // false --0 === +0; // true - -isnt(NaN, NaN); // false -isnt(-0, +0); // true -isnt('a', 'b'); // true -``` - -See: [`is()`](#is) - - - - -## isArguments(val):Boolean - -If value is an "Arguments" object. - - - -## isArray(val):Boolean - -If value is an Array. Uses native ES5 `Array.isArray()` if available. - - - -## isBoolean(val):Boolean - -If value is a Boolean. - - - -## isDate(val):Boolean - -If value is a Date. - - - -## isEmpty(val):Boolean - -Checks if Array/Object/String is empty. - -Will return `true` for any object that doesn't contain enumerable properties -and also to any type of value that isn't considered a collection (boolean, -null, undefined, function, etc). - -```js -isEmpty(''); // true -isEmpty('bar'); // false -isEmpty([]); // true -isEmpty([1, 2]); // false -isEmpty({}); // true -isEmpty({a:1, b:2}); // false -// null, undefined, booleans, numbers are considered as "empty" values -isEmpty(null); // true -isEmpty(undefined); // true -isEmpty(123); // true -isEmpty(true); // true -``` - - -## isFinite(val):Boolean - -Checks if value is Finite. - -**IMPORTANT:** This is not the same as native `isFinite`, which will return -`true` for values that can be coerced into finite numbers. See -http://es5.github.com/#x15.1.2.5. - -```js -isFinite(123); // true -isFinite(Infinity); // false - -// this is different than native behavior -isFinite(''); // false -isFinite(true); // false -isFinite([]); // false -isFinite(null); // false -``` - - -## isFunction(val):Boolean - -If value is a Function. - - - -## isKind(val, kind):Boolean - -If value is of "kind". (used internally by some of the *isSomething* checks). - -Favor the other methods since strings are commonly mistyped and also because -some "kinds" can only be accurately checked by using other methods (e.g. -`Arguments`), some of the other checks are also faster. - -```js -isKind([1,2], 'Array'); // true -isKind(3, 'Array'); // false -isKind(3, 'Number'); // true -``` - -See: [`kindOf()`](#kindOf) - - - -## isInteger(val):Boolean - -Check if value is an integer. - -```js -isInteger(123); // true -isInteger(123.45); // false -isInteger({}); // false -isInteger('foo'); // false -isInteger('123'); // false -``` - - - -## isNaN(val):Boolean - -Check if value is not a number. - -It doesn't coerce value into number before doing the check, giving better -results than native `isNaN`. Returns `true` for everything besides numeric -values. - -**IMPORTANT:** behavior is very different than the native `isNaN` and way more -useful!!! See: http://es5.github.io/#x15.1.2.4 - -```js -isNaN(123); // false - -isNaN(NaN); // true -isNaN({}); // true -isNaN(undefined); // true -isNaN([4,5]); // true - -// these are all "false" on native isNaN and main reason why this module exists -isNaN(''); // true -isNaN(null); // true -isNaN(true); // true -isNaN(false); // true -isNaN("123"); // true -isNaN([]); // true -isNaN([5]); // true -``` - - - -## isNull(val):Boolean - -If value is `null`. - - - -## isNumber(val):Boolean - -If value is a Number. - - - -## isObject(val):Boolean - -If value is an Object. - - - -## isPlainObject(val):Boolean - -If the value is an Object created by the Object constructor. - - - -## isRegExp(val):Boolean - -If value is a RegExp. - - - -## isString(val):Boolean - -If value is a String. - - - -## isUndefined(val):Boolean - -If value is `undefined`. - - - -## kindOf(val):String - -Gets kind of value (e.g. "String", "Number", "RegExp", "Null", "Date"). -Used internally by `isKind()` and most of the other *isSomething* checks. - -```js -kindOf([1,2]); // "Array" -kindOf('foo'); // "String" -kindOf(3); // "Number" -``` - -See: [`isKind()`](#isKind) - - -## toArray(val):Array - -Convert array-like object into Array or wrap value into Array. - -```js -toArray({ - "0" : "foo", - "1" : "bar", - "length" : 2 -}); // ["foo", "bar"] - -function foo(){ - return toArray(arguments); -} -foo("lorem", 123); // ["lorem", 123] - -toArray("lorem ipsum"); // ["lorem ipsum"] -toArray(window); // [window] -toArray({foo:"bar", lorem:123}); // [{foo:"bar", lorem:123}] -``` - -See: object/values() - - - -## toNumber(val):Number - -Convert value into number. - -```js -// numeric values are typecasted as Number -toNumber('123'); // 123 -toNumber(-567); // -567 - -// falsy values returns zero -toNumber(''); // 0 -toNumber(null); // 0 -toNumber(undefined); // 0 -toNumber(false); // 0 - -// non-numeric values returns NaN -toNumber('asd'); // NaN -toNumber({}); // NaN -toNumber([]); // NaN - -// Date objects return milliseconds since epoch -toNumber(new Date(1985, 6, 23)); // 490935600000 -``` - - - -## toString(val):String - -Convert any value to its string representation. - -Will return an empty string for `undefined` or `null`, otherwise will convert -the value to its string representation. - -```js -// null and undefined are converted into empty strings -toString(null); // "" -toString(undefined); // "" - -toString(1); // "1" -toString([1,2,3]); // "1,2,3" -toString(false); // "false" - -// uses `val.toString()` to convert value -toString({toString:funtion(){ return 'foo'; }}); // "foo" -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/math.md b/node_modules/mout/doc/math.md deleted file mode 100644 index d9d2410..0000000 --- a/node_modules/mout/doc/math.md +++ /dev/null @@ -1,316 +0,0 @@ -# math # - -Math utilities. - - -## ceil(val[, step]):Number - -Round value up to full steps. Similar to `Math.ceil()` but can round value -to an arbitrary *radix*. - - ceil(7.2); // 8 - ceil(7.8); // 8 - ceil(7, 5); // 10 - ceil(11, 5); // 15 - ceil(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`floor()`](#floor), [`countSteps()`](#countSteps) - - - -## clamp(val, min, max):Number - -Clamps value inside range. - -`clamp()` is extremely useful in cases where you need to limit a value inside -a certain range. So instead of doing a complex `if/else` to filter/process the -value you can restrict it to always be inside the desired range: - - clamp(-5, 0, 10); // 0 - clamp(7, 1, 10); // 7 - clamp(8, 1, 10); // 8 - clamp(10, 1, 10); // 10 - clamp(11, 1, 10); // 10 - -If the value is smaller than `min` it returns the `min`, if `val` is higher -than `max` it returns `max`. - -### Common use cases - -Any situation where you need to limit a number inside a range like: slider -position, image galleries (so user can't skip to an image that doesn't -exist), drag and drop, scroll boundaries, etc. - -See: [`loop()`](#loop) - - - - -## countSteps(val, step[, overflow]):Number - -Count number of full steps. - -### Arguments: - - 1. `val` (Number) : Value. - 2. `step` (Number) : Step size. - 3. `[overflow]` (Number) : Maximum number of steps, nSteps will loop if -`>=` than overflow. - - -Count steps is very useful for cases where you need to know how many "full -steps" the number *completed*. Think of it as a division that only returns -integers and ignore remainders. - - countSteps(3, 5); // 0 - countSteps(6, 5); // 1 - countSteps(12, 5); // 2 - countSteps(18, 5); // 3 - countSteps(21, 5); // 4 - -You can also set an `overflow` which will reset the *counter* before reaching -this number. - - countSteps(3, 5, 3); // 0 - countSteps(6, 5, 3); // 1 - countSteps(12, 5, 3); // 2 - countSteps(18, 5, 3); // 0 - countSteps(21, 5, 3); // 1 - -### Common use cases - -#### How many items fit inside an area: - - var containerWidth = 100; - var itemWidth = 8; - var howManyFit = countSteps(containerWidth, itemWidth); // 12 - -#### Split value into different scales or convert value from one scale to another - -From [mout/time/parseMs](time.html#parseMs): - - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - // {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} - parseMs(2348765454); - - - -## floor(val[, step]):Number - -Round value down to full steps. Similar to `Math.floor()` but can round value -to an arbitrary *radix*. (formerly `snap`) - - floor(7.2); // 7 - floor(7.8); // 7 - floor(7, 5); // 5 - floor(11, 5); // 10 - floor(15, 5); // 15 - -### Common use cases - -Round values by increments of 5/10/1000/etc. - -See: [`round()`](#round), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - - -## inRange(val, min, max[, threshold]):Boolean - -Checks if value is inside the range. - - inRange(-6, 1, 10); // false - inRange( 5, 1, 10); // true - inRange(12, 1, 10); // false - -The threshold can be useful when you want granular control of what should match -and/or the precision could change at runtime or by some configuration option, -avoids the clutter of adding/subtracting the `threshold` from `mix` and `max`. - - inRange(12, 1, 10, 2); // true - inRange(13, 1, 10, 2); // false - -### Common use cases - -Anything that needs to check if value is inside a range, be it collision -detection, limiting interaction by mouse position, ignoring parts of the logic -that shouldn't happen if value isn't valid, simplify `if/else` conditions, -making code more readable, etc... - - - - -## isNear(val, target, threshold):Boolean - -Check if value is close to target. - -Similar to `inRange()` but used to check if value is close to a certain value -or match the desired value. Basically to simplify `if/else` conditions and to -make code clearer. - - isNear( 10.2, 10, 0.5); // true - isNear( 10.5, 10, 0.5); // true - isNear(10.51, 10, 0.5); // false - -### Common use cases - -Games where a certain action should happen if an *actor* is close to a target, -gravity fields, any numeric check that has some tolerance. - - - - -## lerp(ratio, start, end):Number - -Linear interpolation. - - lerp(0.5, 0, 10); // 5 - lerp(0.75, 0, 10); // 7.5 - -### Common use cases - -Linear interpolation is commonly used to create animations of elements moving -from one point to another, where you simply update the current ratio (which in -this case represents time) and get back the position of the element at that -"frame". - -The core idea of `lerp` is that you are using a number that goes from `0` to -`1` to specify a ratio inside that scale. This concept can be applied to -convert numbers from different scales easily. - -See: [`map()`](#map), [`norm()`](#norm) - - - - -## loop(val, min, max):Number - -Loops value inside range. Will return `min` if `val > max` and `max` if `val -< min`, otherwise it returns `val`. - - loop(-1, 0, 10); // 10 - loop( 1, 0, 10); // 1 - loop( 5, 0, 10); // 5 - loop( 9, 0, 10); // 9 - loop(10, 0, 10); // 10 - loop(11, 0, 10); // 0 - -Similar to [`clamp()`](#clamp) but *loops* the value inside the range when an -overflow occurs. - -### Common use cases - -Image galleries, infinite scroll, any kind of logic that requires that the -first item should be displayed after the last one or the last one should be -displayed after first if going on the opposite direction. - -See: [`clamp()`](#clamp) - - - - -## map(val, min1, max1, min2, max2):Number - -Maps a number from one scale to another. - - map(3, 0, 4, -1, 1) // 0.5 - map(3, 0, 10, 0, 100) // 30 - -### Common use cases - -Very useful to convert values from/to multiple scales. - -Let's suppose we have a slider that needs to go from `2000` to `5000` and that slider -has `300px` of width, here is how we would translate the knob position into the -current value: - - var knobX = 123; - var sliderWid = 300; - var minVal = 2000; - var maxVal = 5000; - - var curVal = map(knobX, 0, sliderWid, minVal, maxVal); // 3230 - -See: [`lerp()`](#lerp), [`norm()`](#norm) - - - - -## norm(val, min, max):Number - -Gets normalized ratio of value inside range. - -If `val < min` or `val > max` it will throw a `RangeError` since we can't -normalize the value. - - norm(50, 0, 100); // 0.5 - norm(75, 0, 100); // 0.75 - norm(100, 0, 100); // 1 - norm(-50, 0, 100); // RangeError: value (-50) must be between 0 and 100 - -### Common use cases - -Convert values between scales, used by [`map()`](#map) internally. Direct -opposite of [`lerp()`](#lerp). - -See: [`lerp()`](#lerp), [`map()`](#map) - - -## overflow(val[, min], max):Number - -Wraps number within [min, max). When no `min` is given, the value `0` is assumed. -A number larger or equal `max` loops around and starts over at `min`. For positive numbers larger -or equal max this method behaves identical to the modulo operator. -Numbers smaller than min loop around and start over at `max`. - - overflow(13, 5, 10); // 8 - overflow(3, 5, 10); // 8 - overflow(23, 5); // 3 - overflow(-10, -7, -1); // -4 - -See: [`loop()`](#loop) - - -## round(val[, step]):Number - -Round value to full steps. Similar to `Math.round()` but allow setting an -arbitrary *radix*. - - // default - round(0.22); // 0 - round(0.49); // 0 - round(0.51); // 1 - - // custom radix - round(0.22, 0.5); // 0 - round(0.49, 0.5); // 0.5 - round(0.51, 0.5); // 0.5 - round(0.74, 0.5); // 0.5 - round(0.75, 0.5); // 1 - round(1.24, 0.5); // 1 - round(1.25, 0.5); // 1.5 - round(1.74, 0.5); // 1.5 - -### Common use cases - -Round values by increments of 0.5/5/10/1000/etc. - -See: [`floor()`](#floor), [`ceil()`](#ceil), [`countSteps()`](#countSteps) - - -------------------------------------------------------------------------------- - -For more usage more info check the specs and source code. - diff --git a/node_modules/mout/doc/number.md b/node_modules/mout/doc/number.md deleted file mode 100644 index 78e9c07..0000000 --- a/node_modules/mout/doc/number.md +++ /dev/null @@ -1,279 +0,0 @@ -# number # - -Number utilities. - - -## abbreviate(val[, nDecimalDigits, dictionary]):String - -Abbreviate number to thousands (K), millions (M) or billions (B). - -The default value for `nDecimalDigits` is `1`. - -### Example - - abbreviate(123456); // "123.5K" - abbreviate(12345678); // "12.3M" - abbreviate(1234567890); // "1.2B" - -You can set the amount of decimal digits (default is `1`): - - abbreviate(543); // "0.5K" - abbreviate(543, 1); // "0.5K" - abbreviate(543, 2); // "0.54K" - abbreviate(543, 3); // "0.543K" - -You can customize the abbreviation by passing a custom "dictionary": - - var _ptbrDict = { - thousand: ' mil', - million: ' Mi', - billion: ' Bi' - }; - function customAbbr(val) { - return abbreviate(val, 1, _ptbrDict); - } - - customAbbr(123456); // "123.5 mil" - customAbbr(12345678); // "12.3 Mi" - customAbbr(1234567890); // "1.2 Bi" - - - -## currencyFormat(val[, nDecimalDigits, decimalSeparator, thousandsSeparator]):String - -Format a number as currency. - -### Example: - - currencyFormat(1000); // "1,000.00" - currencyFormat(1000, 1); // "1,000.0" - currencyFormat(1000, 2, ',', '.'); // "1.000,00" - - - -## enforcePrecision(val, nDecimalDigits):Number - -Enforce a specific amount of decimal digits and also fix floating point -rounding issues. - -### Example: - -```js -enforcePrecision(0.615, 2); // 0.62 -enforcePrecision(0.625, 2); // 0.63 -//floating point rounding "error" (rounds to odd number) -+(0.615).toFixed(2); // 0.61 -+(0.625).toFixed(2); // 0.63 -``` - - -## isNaN(val):Boolean - -ES6 `Number.isNaN()`, checks if supplied value is `NaN`. - -```js -// only returns `true` for `NaN` -isNaN(NaN); // true -isNaN(0 / 0); // true - -// everything else is `false` -isNaN(true); // false -isNaN(123); // false -isNaN('asd'); // false -isNaN('NaN'); // false -``` - - -## MAX_INT:Number - -Maximum 32-bit signed integer value. `Math.pow(2, 31) - 1` - -### Example: - -```js -console.log( MAX_INT ); // 2147483647 -``` - - -## MAX_SAFE_INTEGER:Number - -Maximum safe integer. `Math.pow(2,53) − 1` - - -## MAX_UINT:Number - -Maximum 32-bit unsigned integer value. `Math.pow(2, 32) - 1` - -### Example: - -```js -console.log( MAX_UINT ); // 4294967295 -``` - - -## MIN_INT:Number - -Minimum 32-bit signed integer value. `Math.pow(2, 31) * -1`. - -### Example: - -```js -console.log( MIN_INT ); // -2147483648 -``` - - -## nth(n):String - -Returns the "nth" of number. (`"st"`, `"nd"`, `"rd"`, `"th"`) - -```js -nth(1); // "st" -nth(2); // "nd" -nth(12); // "th" -nth(22); // "nd" -nth(23); // "rd" -nth(34); // "th" -``` - -See: [`ordinal()`](#ordinal) - - - -## ordinal(n):String - -Converts number into ordinal form (1st, 2nd, 3rd, 4th, ...) - -```js -ordinal(1); // "1st" -ordinal(2); // "2nd" -ordinal(3); // "3rd" -ordinal(14); // "14th" -ordinal(21); // "21st" -``` - -See: [`nth()`](#nth) - - - -## pad(n, minLength[, char]):String - -Add padding zeros if `n.length` < `minLength`. - -### Example: - -```js -pad(1, 5); // "00001" -pad(12, 5); // "00012" -pad(123, 5); // "00123" -pad(1234, 5); // "01234" -pad(12345, 5); // "12345" -pad(123456, 5); // "123456" - -// you can also specify the "char" used for padding -pad(12, 5, '_'); // "___12" -``` - -see: [string/lpad](./string.html#lpad) - - - -## rol(val, shift):Number - -Bitwise circular shift left. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## ror(val, shift):Number - -Bitwise circular shift right. - -More info at [Wikipedia#Circular_shift](http://en.wikipedia.org/wiki/Circular_shift) - - - -## sign(val):Number - -Returns `-1` if value is negative, `0` if the value is `0` and `1` if value is positive. Useful for -multiplications. - -```js -sign(-123); // -1 -sign(123); // 1 -sign(0); // 0 -``` - - - -## toInt(val):Number - -"Convert" value into an 32-bit integer. Works like `Math.floor` if `val > 0` and -`Math.ceil` if `val < 0`. - -**IMPORTANT:** val will wrap at [number/MIN_INT](#MIN_INT) and -[number/MAX_INT](#MAX_INT). - -Created because most people don't know bitwise operations and also because this -feature is commonly needed. - -[Perf tests](http://jsperf.com/vs-vs-parseint-bitwise-operators/7) - -### Example: - -```js -toInt(1.25); // 1 -toInt(0.75); // 0 -toInt(-0.55); // 0 -toInt(-5.0001) // -5 -``` - - - -## toUInt(val):Number - -"Convert" value into an 32-bit unsigned integer. - -Works like AS3#uint(). - -**IMPORTANT:** val will wrap at 2^32. - -### Example: - -```js -toUInt(1.25); // 1 -toUInt(0.75); // 0 -toUInt(-0.55); // 0 -toUInt(-5.0001); // 4294967291 -toUInt(Math.pow(2,32) - 0.5); // 4294967295 -toUInt(Math.pow(2,32) + 0.5); // 0 -``` - - -## toUInt31(val):Number - -"Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - -Useful since all bitwise operators besides `>>>` treat numbers as signed -integers. - -**IMPORTANT:** val will wrap at 2^31 and negative numbers will be treated as -`zero`. - -### Example: - -```js -toUInt31(1.25); // 1 -toUInt31(0.75); // 0 -toUInt31(-0.55); // 0 -toUInt31(-5.0001); // 0 -toUInt31(Math.pow(2,31) - 0.5); // 21474836470 -toUInt31(Math.pow(2,31) + 0.5); // 0 -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... - diff --git a/node_modules/mout/doc/object.md b/node_modules/mout/doc/object.md deleted file mode 100644 index 348f96a..0000000 --- a/node_modules/mout/doc/object.md +++ /dev/null @@ -1,812 +0,0 @@ -# object # - -Object utilities. - - - -## bindAll(obj, [...methodNames]):void - -Bind methods of the target object to always execute on its own context -(ovewritting the original function). - -See: [function/bind](./function.html#bind) - -```js -var view = { - name: 'Lorem Ipsum', - logNameOnClick: function() { - console.log(this.name); - } -}; - -// binds all methods by default -bindAll(view); -jQuery('#docs').on('click', view.logNameOnClick); -``` - -You can also specify the list of methods that you want to bind (in case you -just want to bind a few of them). - -```js -// only the listed methods will be bound to `obj` context -bindAll(obj, 'logNameOnClick', 'doAwesomeStuffOnDrag'); -``` - - - -## contains(obj, value):Boolean - -Similar to [Array/contains](array.html#contains). Checks if Object contains -value. - -```js -var obj = { - a: 1, - b: 2, - c: 'bar' -}; -contains(obj, 2); // true -contains(obj, 'foo'); // false -``` - - - -## deepFillIn(target, ...objects):Object - -Fill missing properties recursively. - -It's different from `deepMixIn` since it won't override any existing property. -It's also different from `merge` since it won't clone child objects during the -process. - -It returns the target object and mutates it in place. - -See: [`fillIn()`](#fillIn), [`deepMixIn()`](#deepMixIn), [`merge()`](#merge) - -```js -var base = { - foo : { - bar : 123 - }, - lorem : 'ipsum' -}; -var options = deepFillIn({foo : { baz : 45 }, lorem : 'amet'}, base); -// > {foo: {bar:123, baz : 45}, lorem : 'amet'} -``` - - - -## deepMatches(target, pattern):Boolean - -Recursively checks if object contains all properties/value pairs. When both -the target and pattern values are arrays, it checks that the target value -contain matches for all the items in the pattern array (independent of order). - -```js -var john = { - name: 'John', - age: 22, - pets: [ - { type: 'cat', name: 'Grumpy Cat' }, - { type: 'dog', name: 'Hawk' } - ] -}; - -deepMatches(john, { name: 'John' }); // true -deepMatches(john, { age: 21 }); // false -deepMatches(john, { pets: [ { type: 'cat' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hawk' } ] }); // true -deepMatches(john, { pets: [ { name: 'Hairball' } ] }); // false -``` - -See [`matches()`](#matches) - - - -## deepMixIn(target, ...objects):Object - -Mixes objects into the target object, recursively mixing existing child objects -as well. - -It will only recursively mix objects if both (existing and new) values are -plain objects. - -Returns the target object. Like [`merge()`](#merge), but mutates the target -object, and does not clone child objects. - -```js -var target = { - foo: { - name: "foo", - id: 1 - } -}; - -deepMixIn(target, { foo: { id: 2 } }); -console.log(target); // { foo: { name: "foo", id: 2 } } -``` - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## equals(a, b, [callback]):Boolean - -Tests whether two objects contain the same keys and values. - -`callback` specifies the equality comparison function used to compare the -values. It defaults to using [lang/is](lang.html#is). - -It will only check the keys and values contained by the objects; it will not -check the objects' prototypes. If either of the values are not objects, they -will be compared using the `callback` function. - -```js -equals({}, {}); // true -equals({ a: 1 }, { a: 1 }); // true -equals({ a: 1 }, { a: 2 }); // false -equals({ a: 1, b: 2 }, { a: 1 }); // false -equals({ a: 1 }, { a: 1, b: 2 }); // false -equals(null, null); // true -equals(null, {}); // false -equals({ a: 1 }, { a: '1' }, function(a, b) { return a == b; }); // true -``` - -See: [array/equals](array.html#equals), [lang/deepEquals](lang.html#deepEquals) - - -## every(obj, callback, [thisObj]):Boolean - -Similar to [Array/every](array.html#every). Tests whether all properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -every(obj, isNumber); // false -``` - - - -## fillIn(obj, ...default):Object - -Fill in missing properties in object with values from the *defaults* objects. - - var base = { - foo : 'bar', - num : 123 - }; - - fillIn({foo:'ipsum'}, base); // {foo:'ipsum', num:123} - -PS: it allows merging multiple objects at once, the first ones will take -precedence. - -See: [`mixIn()`](#mixIn), [`merge()`](#merge), [`deepFillIn()`](#deepFillIn) - - - -## filter(obj, callback, [thisObj]) - -Returns a new object containing all properties where `callback` returns true, -similar to Array/filter. It does not use properties from the object's -prototype. - -Callback receives the same arguments as `forOwn()`. - -See: [`forOwn()`](#forOwn), [`forIn()`](#forIn), [`pick()`](#pick) - -```js -var obj = { - foo: 'value', - bar: 'bar value' -}; - -// returns { bar: 'bar value' } -filter(obj, function(v) { return v.length > 5; }); - -// returns { foo: 'value' } -filter(obj, function(v, k) { return k === 'foo'; }); -``` - - - -## find(obj, callback, [thisObj]) - -Loops through all the properties in the Object and returns the first one that -passes a truth test (callback), similar to [Array/find](array.html#find). -Unlike Array/find, order of iteration is not guaranteed. - -```js -var obj = { - a: 'foo', - b: 12 -}; - -find(obj, isString); // 'foo' -find(obj, isNumber); // 12 -``` - - - -## flatten(object, [level]):Object - -Recursively flattens an object. A new object containing all the values is -returned. If `level` is specified, it will only flatten up to that level. -Note that objects within arrays will not be flattened. - -### Example - -```js -flatten({ a: 1, b: { c: 2, d: { e: 3 } } }); -// > { a: 1, 'b.c': 2, 'b.d.e': 3 } -flatten({ a: 1, b: { c: 2, d: { e: 3 } } }, 1); -// > { a: 1, 'b.c': 2, 'b.d': { e: 3 } } -``` - -See: [`array/flatten()`](./array.html#flatten) - - -## forIn(obj, callback[, thisObj]) - -Iterate over all properties of an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -It **will** iterate over inherited (enumerable) properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forIn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 7 -console.log(keys); // ['foo', 'bar', 'lorem'] -``` - - - -## forOwn(obj, callback[, thisObj]) - -Iterate over all own properties from an Object, similar to -[Array/forEach](array.html#forEach). - -It [avoids don't enum bug on IE](https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug). -Notice that it **won't** iterate over properties from the prototype. - -It allows exiting the iteration early by returning `false` on the callback. - -See: [`forIn()`](#forIn), [`keys()`](#keys), [`values()`](#values) - -### Callback arguments - -Callback will receive the following arguments: - - 1. Property Value (*) - 2. Key name (String) - 3. Target object (Object) - -### Example - -```js -function Foo(){ - this.foo = 1; - this.bar = 2; -} - -// will be ignored -Foo.prototype.lorem = 4; - -var obj = new Foo(); - -var result = 0; -var keys = []; - -forOwn(obj, function(val, key, o){ - result += val; - keys.push(key); -}); - -console.log(result); // 3 -console.log(keys); // ['foo', 'bar'] -``` - - - -## functions(obj):Array - -Returns a sorted list of all enumerable properties that have function values -(including inherited properties). - -```js -var obj = { - foo : function(){}, - bar : 'baz' -}; -functions(obj); // ['foo'] -``` - - - -## get(obj, propName):* - -Returns nested property value. Will return `undefined` if property doesn't -exist or if the object is null or undefined. - -See: [`set()`](#set), [`namespace()`](#namespace), [`has()`](#has) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -get(lorem, 'ipsum.dolor.sit'); // "amet" -get(lorem, 'foo.bar'); // undefined -get(undefined, 'foo.bar'); // undefined -``` - - - -## has(obj, propName):Boolean - -Checks if object contains a child property. Useful for cases where you need to -check if an object contain a *nested* property. It will get properties -inherited by the prototype. - -see: [`hasOwn()`](#hasOwn), [`get()`](#get) - -```js -var a = { - b : { - c : 123 - } - }; - -has(a, 'b.c'); // true -has(a, 'foo.c'); // false -``` - -### Common use case - -```js -if( has(a, 'foo.c') ){ // false - // ... -} - -if( a.foo.c ){ // ReferenceError: `foo` is not defined - // ... -} -``` - - - -## hasOwn(obj, propName):Boolean - -Safer `Object.hasOwnProperty`. Returns a boolean indicating whether the object -has the specified property. - -see: [`has()`](#has) - -```js -var obj = { - foo: 1, - hasOwnProperty : 'bar' -}; - -obj.hasOwnProperty('foo'); // ERROR! hasOwnProperty is not a function - -hasOwn(obj, 'foo'); // true -hasOwn(obj, 'hasOwnProperty'); // true -hasOwn(obj, 'toString'); // false -``` - - - -## keys(obj):Array - -Returns an array of all own enumerable properties found upon a given object. -It will use the native `Object.keys` if present. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`values()`](#values) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -keys(obj); // ['foo', 'bar', 'lorem'] -``` - - - -## map(obj, callback, [thisObj]):Object - -Returns a new object where the property values are the result of calling the -callback for each property in the original object, similar to Array/map. - -The callback function receives the same arguments as in `forOwn()`. - -See: [`forOwn()`](#forOwn) - -```js -var obj = { foo: 1, bar: 2 }, - data = { foo: 0, bar: 1 }; - -map(obj, function(v) { return v + 1; }); // { foo: 2, bar: 3 } -map(obj, function(v, k) { return k; }); // { foo: "foo", bar: "bar" } -map(obj, function(v, k) { return this[k]; }, data); // { foo: 0, bar: 1 } -``` - - - -## matches(obj, props):Boolean - -Checks if object contains all properties/values pairs. Useful for validation -and filtering. - -```js -var john = {age:25, hair:'long', beard:true}; -var mark = {age:27, hair:'short', beard:false}; -var hippie = {hair:'long', beard:true}; -matches(john, hippie); // true -matches(mark, hippie); // false -``` - -See [`deepMatches()`](#deepMatches) - - - -## merge(...objects):Object - -Deep merges objects. Note that objects and properties will be cloned during the -process to avoid undesired side effects. It return a new object and won't -affect source objects. - -```js -var obj1 = {a: {b: 1, c: 1, d: {e: 1, f: 1}}}; -var obj2 = {a: {b: 2, d : {f : 'yeah'} }}; - -merge(obj1, obj2); // {a: {b : 2, c : 1, d : {e : 1, f : 'yeah'}}} -``` - -See: [`deepMixIn()`](#deepMixIn), [`deepFillIn()`](#deepFillIn) - - - -## max(obj[, iterator]):* - -Returns maximum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/max](array.html#max). - -See: [`min()`](#min) - -```js -max({a: 100, b: 2, c: 1, d: 3, e: 200}); // 200 -max({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'lorem' -``` - - - -## min(obj[, iterator]):* - -Returns minimum value inside object or use a custom iterator to define how -items should be compared. Similar to [Array/min](array.html#min). - -See: [`max()`](#max) - -```js -min({a: 100, b: 2, c: 1, d: 3, e: 200}); // 1 -min({a: 'foo', b: 'lorem', c: 'amet'}, function(val){ - return val.length; -}); // 'foo' -``` - - - -## mixIn(target, ...objects):Object - -Combine properties from all the objects into first one. - -This method affects target object in place, if you want to create a new Object -pass an empty object as first parameter. - -### Arguments - - 1. `target` (Object) : Target Object. - 2. `...objects` (...Object) : Objects to be combined (0...n objects). - -### Example - -```js -var a = {foo: "bar"}; -var b = {lorem: 123}; - -mixIn({}, a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar"} - -mixIn(a, b); // {foo: "bar", lorem: 123} -console.log(a); // {foo: "bar", lorem: 123} -``` - -See: [`fillIn()`](#fillIn), [`merge()`](#merge) - - - - -## namespace(obj, propName):Object - -Creates an empty object inside namespace if not existent. Will return created -object or existing object. - -See: [`get()`](#get), [`set()`](#set) - -```js -var obj = {}; -namespace(obj, 'foo.bar'); // {} -console.log(obj); // {foo:{bar:{}}} -``` - - -## omit(obj, ...keys):Object - -Return a copy of the object without the blacklisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -omit(user, keys); // {lastName : 'Doe', gender : 'male'} - -// or multiple arguments -omit(user, 'firstName', 'lastName'); // {dob : '1985/07/23', gender : 'male'} -``` - - - -## pick(obj, ...keys):Object - -Return a copy of the object that contains only the whitelisted keys. - -See: [`filter()`](#filter) - -```js -var user = { - firstName : 'John', - lastName : 'Doe', - dob : '1985/07/23', - gender : 'male' -}; - -// can pass an array of keys as second argument -var keys = ['firstName', 'dob'] -pick(user, keys); // {firstName:"John", dob: "1985/07/23"} - -// or multiple arguments -pick(user, 'firstName', 'lastName'); // {firstName:"John", lastName: "Doe"} -``` - - - -## pluck(obj, propName):Object - -Extract an object containing property values with keys as they appear in the -passed object. - -```js -var users = { - first: { - name : 'John', - age : 21 - }, - second: { - name : 'Mary', - age : 25 - } -}; - -pluck(users, 'name'); // {first: 'John', second: 'Mary'} ); -pluck(users, 'age'); // {first: 21, second: 25} ); -``` - - - -## reduce(obj, callback, initial, [thisObj]):* - -Similar to [Array/reduce](array.html#reduce). - -Apply a function against an accumulator and each property of the object (order -is undefined) as to reduce it to a single value. - -```js -var obj = {a: 1, b: 2, c: 3, d: 4}; - -function sum(prev, cur, key, list) { - compare1.push(prev); - return prev + cur; -} - -reduce(obj, sum); // 10 -``` - - - -## reject(obj, callback, thisObj):Object - -Returns a new object containing all properties where `callback` returns true, -similar to [Array/reject](array.html#reject). It does not use properties from -the object's prototype. Opposite of [`filter()`](#filter). - -See [`filter()`](#filter) - -### Example - -```js -var obj = {a: 1, b: 2, c: 3, d: 4, e: 5}; -reject(obj, function(x) { return (x % 2) !== 0; }); // {b: 2, d: 4} -``` - - - -## values(obj):Array - -Returns an array of all own enumerable properties values found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -values(obj); // [1, 2, 3] -``` - - - -## set(obj, propName, value) - -Sets a nested property value. - -See: [`get()`](#get), [`namespace()`](#namespace) - -```js -var obj = {}; -set(obj, 'foo.bar', 123); -console.log(obj.foo.bar); // 123 -console.log(obj); // {foo:{bar:123}} -``` - - - -## size(obj):Number - -Returns the count of own enumerable properties found upon a given object. - -PS: it won't return properties from the prototype. - -See: [`forOwn()`](#forOwn), [`keys()`](#keys) - -```js -var obj = { - foo : 1, - bar : 2, - lorem : 3 -}; -size(obj); // 3 -``` - - - -## some(obj, callback, [thisObj]):Boolean - -Similar to [Array/some](array.html#some). Tests whether any properties in the -object pass the test implemented by the provided callback. - -```js -var obj = { - a: 1, - b: 2, - c: 3, - d: 'string' -}; - -some(obj, isNumber); // true -``` - - - -## unset(obj, propName):Boolean - -Delete object property if existent and returns a boolean indicating succes. It -will also return `true` if property doesn't exist. - -Some properties can't be deleted, to understand why [check this -article](http://perfectionkills.com/understanding-delete/). - -See: [`set()`](#set) - -```js -var lorem = { - ipsum : { - dolor : { - sit : 'amet' - } - } - }; - -unset(lorem, 'ipsum.dolor.sit'); // true -console.log(lorem.ipsum.dolor); // {} -unset(lorem, 'foo.bar'); // true -``` - - - -## result(object, property):Mixed - -Evaluates an objects property and returns result. - -```js -var person = { - name: 'john', - - mood: function() { - // some dynamic calculated property. - return 'happy'; - } -}; - -var name = result(person, 'name'), // john - mood = result(person, 'mood'); // happy -``` diff --git a/node_modules/mout/doc/queryString.md b/node_modules/mout/doc/queryString.md deleted file mode 100644 index 1be3c10..0000000 --- a/node_modules/mout/doc/queryString.md +++ /dev/null @@ -1,115 +0,0 @@ -# queryString # - -Utilities for query string manipulation. - - - -## contains(url, paramName):Boolen - -Checks if query string contains parameter. - -### Arguments: - - 1. `url` (String) : URL or query string. - 2. `paramName` (String) : Parameter name. - -### Example: - -```js -var url = 'example.com/?lorem=ipsum'; -contains(url, 'lorem'); // true -contains(url, 'foo'); //false -``` - - - -## decode(queryStr[, shouldTypecast]):Object - -Parses query string and creates an object of keys => vals. - -Will typecast value with [`string/typecast`](string.html#typecast) by default -and decode string parameters using `decodeURIComponent()`. - -```js -var query = '?foo=bar&lorem=123'; -decode(query); // {foo: "bar", lorem: 123} -decode(query, false); // {foo: "bar", lorem: "123"} -``` - - -## encode(obj):String - -Encode object into a query string. - -Will encode parameters with `encodeURIComponent()`. - -```js -encode({foo: "bar", lorem: 123}); // "?foo=bar&lorem=123" -``` - - -## getParam(url, param[, shouldTypecast]):* - -Get query parameter value. - -Will typecast value with [`string/typecast`](string.html#typecast) by default. - -See: [`setParam()`](#setParam) - -### Arguments: - - 1. `url` (String) : Url. - 2. `param` (String) : Parameter name. - 3. `[shouldTypecast]` (Boolean) : If it should typecast value. - -### Example: - -```js -var url = 'example.com/?foo=bar&lorem=123&ipsum=false'; -getParam(url, 'dolor'); // "amet" -getParam(url, 'lorem'); // 123 -getParam(url, 'lorem', false); // "123" -``` - - -## parse(url[, shouldTypecast]):Object - -Parses URL, extracts query string and decodes it. - -It will typecast all properties of the query object unless second argument is -`false`. - -Alias to: `decode(getQuery(url))`. - -```js -var url = 'example.com/?lorem=ipsum&a=123'; -parse(url); // {lorem: "ipsum", a: 123} -parse(url, false); // {lorem: "ipsum", a: "123"} -``` - - -## getQuery(url):String - -Gets full query as string with all special chars decoded. - -```js -getQuery('example.com/?lorem=ipsum'); // "?lorem=ipsum" -``` - - -## setParam(url, paramName, value):String - -Add new query string parameter to URL or update existing value. - -See: [`getParam()`](#getParam) - -```js -setParam('?foo=bar&lorem=0', 'lorem', 'ipsum'); // '?foo=bar&lorem=ipsum' -setParam('?lorem=1', 'foo', 123); // '?lorem=1&foo=123' -``` - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/random.md b/node_modules/mout/doc/random.md deleted file mode 100644 index 0d24dc3..0000000 --- a/node_modules/mout/doc/random.md +++ /dev/null @@ -1,256 +0,0 @@ -# random # - -Pseudo-random generators. - -mout uses `Math.random` by default on all the pseudo-random generators, if -you need a seeded random or a better algorithm see the [`random()`](#random) -documentation for instructions. - - - -## choice(...items):* - -Returns a random element from the supplied arguments or from an array if single -argument is an array. - -### Example: - -```js -choice(1, 2, 3, 4, 5); // 3 - -var arr = ['lorem', 'ipsum', 'dolor']; -choice(arr); // 'dolor' -``` - - - -## guid():String - -Generates a pseudo-random [Globally Unique Identifier](http://en.wikipedia.org/wiki/Globally_unique_identifier) (v4). - -Since the total number of GUIDs is 2122 the chance of generating the -same value twice is negligible. - -**Important:** this method uses `Math.random` by default so the UUID isn't -*safe* (sequence of outputs can be predicted in some cases), check the -[`random()`](#random) documentation for more info on how to replace the default -PRNG if you need extra safety or need *seeded* results. - -See: [`randHex()`](#randHex), [`random()`](#random) - -### Example: - -```js -guid(); // 830e9f50-ac7f-4369-a14f-ed0e62b2fa0b -guid(); // 5de3d09b-e79c-4727-932b-48c49228d508 -``` - - - -## rand([min], [max]):Number - -Gets a random number inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -rand(); // 448740433.55274725 -rand(); // -31797596.097682 -rand(0, 10); // 7.369723 -rand(0, 10); // 5.987042 -``` - -See: [`random()`](#random) - - - -## randBit():Number - -Returns a random "bit" (0 or 1). Useful for addition/subtraction. - -It's slightly faster than `choice(0, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randBit(); // 1 -randBit(); // 0 - -//same effect as -choice(0, 1); -``` - - -## randBool():Boolean - -Returns a random Boolean (`true` or `false`). - -Since this is very common it makes sense to abstract it into a discrete method. - -### Example: - -```js -randBool(); // true -randBool(); // false -``` - - - -## randHex([size]):String - -Returns a random hexadecimal string. - -The default `size` is `6`. - -### Example: - -```js -randHex(); // "dd8575" -randHex(); // "e6baeb" -randHex(2); // "a2" -randHex(30); // "effd7e2ad9a4a3067e30525fab983a" -``` - - - -## randInt([min], [max]):Number - -Gets a random integer inside range or snap to min/max values. - -### Arguments: - - 1. `[min]` (Number) : Minimum value. Defaults to `number/MIN_INT`. - 2. `[max]` (Number) : Maximum value. Defaults to `number/MAX_INT`. - - -### Example: - -```js -randInt(); // 448740433 -randInt(); // -31797596 -randInt(0, 10); // 7 -randInt(0, 10); // 5 -``` - - - -## randSign():Number - -Returns a random "sign" (-1 or 1). Useful for multiplications. - -It's slightly faster than `choice(-1, 1)` since implementation is simpler (not -that it will make a huge difference in most cases). - -See: [`choice()`](#choice) - -### Example: - -```js -randSign(); // -1 -randSign(); // 1 - -//same effect as -choice(-1, 1); -``` - - - -## random():Number - -Returns a random number between `0` and `1`. Same as `Math.random()`. - -```js -random(); // 0.35435103671625257 -random(); // 0.8768321881070733 -``` - -**Important:** No methods inside mout should call `Math.random()` -directly, they all use `random/random` as a proxy, that way we can -inject/replace the pseudo-random number generator if needed (ie. in case we -need a seeded random or a better algorithm than the native one). - -### Replacing the PRNG - -In some cases we might need better/different algorithms than the one provided -by `Math.random` (ie. safer, seeded). - -Because of licensing issues, file size limitations and different needs we -decided to **not** implement a custom PRNG and instead provide a easy way to -override the default behavior. - [issue #99](https://github.com/millermedeiros/amd-utils/issues/99) - -If you are using mout with a loader that supports the [AMD map -config](https://github.com/amdjs/amdjs-api/wiki/Common-Config), such as -[RequireJS](http://requirejs.org/), you can use it to replace the PRNG -(recommended approach): - -```js -requirejs.config({ - map : { - // all modules will load "my_custom_prng" instead of - // "mout/random/random" - '*' : { - 'mout/random/random' : 'my_custom_prng' - } - } -}); -``` - -You also have the option to override `random.get` in case you are using -mout on node.js or with a loader which doesn't support the map config: - -```js -// replace the PRNG -var n = 0; -random.get = function(){ - return ++n % 2? 0 : 1; // not so random :P -}; -random(); // 0 -random(); // 1 -random(); // 0 -random(); // 1 -``` - -See this [detailed explanation about PRNG in -JavaScript](https://github.com/nquinlan/better-random-numbers-for-javascript-mirror) -to understand the issues with the native `Math.random` and also for a list of -algorithms that could be used instead. - - - -## randString([length, dictionary]):String - -Returns a random string. - -By default returns string containing alphanumeric characters (lowercase and uppercase) with a length of 8. - -### Arguments: - - 1. `[length]` (number) : Length of the string to return. Defaults to 8. - 2. `[dictionary]` (string) : A string containing all characters used as a dictionary for the random string construction. Defaults to alphanumeric characters (lowercase and uppercase). - -### Example: - -```js -randString(); // returns a string with length 8. -randString(12); // returns a string of length 12. -randString(-1); // returns a string of length 8. -randString(null, 'pew!'); // returns a random string of length 8 composed of 'p', 'e', 'w' and '!'. -randString(10, '0'); // always returns '0's of length 10. -randString(rand(8, 10)); // returns a random string with length between 8 and 10. -``` - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/string.md b/node_modules/mout/doc/string.md deleted file mode 100644 index 004f1ab..0000000 --- a/node_modules/mout/doc/string.md +++ /dev/null @@ -1,642 +0,0 @@ -# string # - -String utilities. - - -## camelCase(str):String - -Convert string to "camelCase" text. - -See: [`pascalCase()`](#pascalCase), [`unCamelCase()`](#unCamelCase) - -### Example - -```js -camelCase('lorem-ipsum-dolor'); // "loremIpsumDolor" -camelCase('lorem ipsum dolor'); // "loremIpsumDolor" -``` - - - -## contains(str, substring, [fromIndex]):Boolean - -Checks if string contains the given substring. - -See: [`startsWith()`](#startsWith), [`endsWith()`](#endsWith) - -### Example - -```js -contains('lorem', 'or'); // true -contains('lorem', 'bar'); // false -``` - - - -## crop(str, maxChars, [append]):String - -Truncate string at full words. Alias to `truncate(str, maxChars, append, true);`. - -See: [`truncate()`](#truncate) - -### Example - -```js -crop('lorem ipsum dolor', 10); // "lorem..." -crop('lorem ipsum dolor', 10, '+'); // "lorem+" -``` - - - -## endsWith(str, suffix):Boolean - -Checks if string ends with specified suffix. - -See: [`startsWith()`](#startsWith), [`contains()`](#contains) - -### Example - -```js -endsWith('lorem ipsum', 'lorem'); // false -endsWith('lorem ipsum', 'ipsum'); // true -``` - - - -## escapeHtml(str):String - -Escapes the following special characters for use in HTML: - -* `&` becomes `&` -* `<` becomes `<` -* `>` becomes `>` -* `'` becomes `'` -* `"` becomes `"` - -No other characters are escaped. To HTML-escape other characters as well, use a third-party library like [_he_](http://mths.be/he). - -See: [`unescapeHtml()`](#unescapeHtml) - -### Example - -```js -escapeHtml('lorem & "ipsum"'); // "lorem &amp; &quot;ipsum&quot;" -``` - - - -## escapeRegExp(str):String - -Escape special chars to be used as literals in RegExp constructors. - -### Example - -```js -str = escapeRegExp('[lorem.ipsum]'); // "\\[lorem\\.ipsum\\]" -reg = new RegExp(str); // /\[lorem\.ipsum\]/ -``` - - - -## escapeUnicode(str[, shouldEscapePrintable]):String - -Unicode escape chars. - -It will only escape non-printable ASCII chars unless `shouldEscapePrintable` is -set to `true`. - -See: [`unescapeUnicode()`](#unescapeUnicode) - -```js -escapeUnicode('føo bår'); -// > "f\u00f8o b\u00e5r" -escapeUnicode('føo bår', true); -// > "\u0066\u00f8\u006f\u0020\u0062\u00e5\u0072" -``` - - - -## hyphenate(str):String - -Replaces spaces with hyphens, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`underscore()`](#underscore), -[`unhyphenate`](#unhyphenate) - -```js -hyphenate(' %# lorem ipsum ? $ dolor'); // "lorem-ipsum-dolor" -hyphenate('spéçïãl çhârs'); // "special-chars" -hyphenate('loremIpsum'); // "lorem-ipsum" -``` - - - -## insert(str, index, partial):String - -Inserts a `partial` before the given `index` in the provided `str`. -If the index is larger than the length of the string the partial is appended at the end. -A negative index is treated as `length - index` where `length` is the length or the string. - -```js -insert('this is a sentence', 10, 'sample '); // "this is a sample sentence" -insert('foo', 100, 'bar'); // "foobar" -insert('image.png', -4, '-large'); // "image-large.png" -``` - -## interpolate(str, replacements[, syntax]):String - -String interpolation. Format/replace tokens with object properties. - -```js -var tmpl = 'Hello {{name}}!'; -interpolate(tmpl, {name: 'World'}); // "Hello World!" -interpolate(tmpl, {name: 'Lorem Ipsum'}); // "Hello Lorem Ipsum!" - -tmpl = 'Hello {{name.first}}!'; -interpolate(tmpl, {name: {first: 'Lorem'}}); // "Hello Lorem!" -``` - -It uses a mustache-like syntax by default but you can set your own format if -needed. You can also use Arrays for the replacements (since Arrays are -objects as well): - -```js -// matches everything inside "${}" -var syntax = /\$\{([^}]+)\}/g; -var tmpl = "Hello ${0}!"; -interpolate(tmpl, ['Foo Bar'], syntax); // "Hello Foo Bar!" -``` - - - -## lowerCase(str):String - -"Safer" `String.toLowerCase()`. (Used internally) - -### Example - -```js -(null).toLowerCase(); // Error! -(undefined).toLowerCase(); // Error! -lowerCase(null); // "" -lowerCase(undefined); // "" -``` - - - -## lpad(str, minLength[, char]):String - -Pad string from left with `char` if its' length is smaller than `minLen`. - -See: [`rpad()`](#rpad) - -### Example - -```js -lpad('a', 5); // " a" -lpad('a', 5, '-'); // "----a" -lpad('abc', 3, '-'); // "abc" -lpad('abc', 4, '-'); // "-abc" -``` - - - -## ltrim(str, [chars]):String - -Remove chars or white-spaces from beginning of string. - -`chars` is an array of chars to remove from the beginning of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`rtrim()`](#rtrim), [`trim()`](#trim) - -### Example - -```js -ltrim(' lorem ipsum '); // "lorem ipsum " -ltrim('--lorem ipsum--', ['-']); // "lorem ipsum--" -``` - - - -## makePath(...args):String - -Group arguments as path segments, if any of the args is `null` or `undefined` -it will be ignored from resulting path. It will also remove duplicate "/". - -See: [`array/join()`](array.html#join) - -### Example - -```js -makePath('lorem', 'ipsum', null, 'dolor'); // "lorem/ipsum/dolor" -makePath('foo///bar/'); // "foo/bar/" -``` - - - -## normalizeLineBreaks(str, [lineBreak]):String - -Normalize line breaks to a single format. Defaults to Unix `\n`. - -It handles DOS (`\r\n`), Mac (`\r`) and Unix (`\n`) formats. - -### Example - -```js -// "foo\nbar\nlorem\nipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum'); - -// "foo\rbar\rlorem\ripsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', '\r'); - -// "foo bar lorem ipsum" -normalizeLineBreaks('foo\nbar\r\nlorem\ripsum', ' '); -``` - - - -## pascalCase(str):String - -Convert string to "PascalCase" text. - -See: [`camelCase()`](#camelCase) - -### Example - -```js -pascalCase('lorem-ipsum-dolor'); // "LoremIpsumDolor" -pascalCase('lorem ipsum dolor'); // "LoremIpsumDolor" -``` - - - -## properCase(str):String - -UPPERCASE first char of each word, lowercase other chars. - -### Example - -```js -properCase('loRem iPSum'); // "Lorem Ipsum" -``` - - - -## removeNonASCII(str):String - -Remove [non-printable ASCII -chars](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters). - -### Example - -```js -removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'); // "lorem-ipsum" -``` - - - -## removeNonWord(str):String - -Remove non-word chars. - -### Example - -```js -var str = 'lorem ~!@#$%^&*()_+`-={}[]|\\:";\'/?><., ipsum'; -removeNonWord(str); // "lorem - ipsum" -``` - - - -## repeat(str, n):String - -Repeat string n-times. - -### Example - -```js -repeat('a', 3); // "aaa" -repeat('bc', 2); // "bcbc" -repeat('a', 0); // "" -``` - - - -## replace(str, search, replacements):String - -Replace string(s) with the replacement(s) in the source. - -`search` and `replacements` can be an array, or a single item. For every item -in `search`, it will call `str.replace` with the search item and the matching -replacement in `replacements`. If `replacements` only contains one replacement, -it will be used for all the searches, otherwise it will use the replacement at -the same index as the search. - -### Example - -```js -replace('foo bar', 'foo', 'test'); // "test bar" -replace('test 1 2', ['1', '2'], 'n'); // "test n n" -replace('test 1 2', ['1', '2'], ['one', 'two']); // "test one two" -replace('123abc', [/\d/g, /[a-z]/g], ['0', '.']); // "000..." -``` - - - -## replaceAccents(str):String - -Replaces all accented chars with regular ones. - -**Important:** Only covers **Basic Latin** and **Latin-1** unicode chars. - -### Example - -```js -replaceAccents('spéçïãl çhârs'); // "special chars" -``` - - - -## rpad(str, minLength[, char]):String - -Pad string from right with `char` if its' length is smaller than `minLen`. - -See: [`lpad()`](#lpad) - -### Example - -```js -rpad('a', 5); // "a " -rpad('a', 5, '-'); // "a----" -rpad('abc', 3, '-'); // "abc" -rpad('abc', 4, '-'); // "abc-" -``` - - - -## rtrim(str, [chars]):String - -Remove chars or white-spaces from end of string. - -`chars` is an array of chars to remove from the end of the string. If -`chars` is not specified, Unicode whitespace chars will be used instead. - -See: [`trim()`](#trim), [`ltrim()`](#ltrim) - -### Example - -```js -rtrim(' lorem ipsum '); // " lorem ipsum" -rtrim('--lorem ipsum--', ['-']); // "--lorem ipsum" -``` - - - -## sentenceCase(str):String - -UPPERCASE first char of each sentence and lowercase other chars. - -### Example - -```js -var str = 'Lorem IpSum DoLOr. maeCeNnas Ullamcor.'; -sentenceCase(str); // "Lorem ipsum dolor. Maecennas ullamcor." -``` - - - -## stripHtmlTags(str):String - -Remove HTML/XML tags from string. - -### Example - -```js -var str = '

lorem ipsum

'; -stripHtmlTags(str); // "lorem ipsum" -``` - - - -## startsWith(str, prefix):Boolean - -Checks if string starts with specified prefix. - -See: [`endsWith()`](#endsWith), [`contains()`](#contains) - -### Example - -```js -startsWith('lorem ipsum', 'lorem'); // true -startsWith('lorem ipsum', 'ipsum'); // false -``` - - - -## slugify(str[, delimiter]):String - -Convert to lower case, remove accents, remove non-word chars and replace spaces -with the delimiter. The default delimiter is a hyphen. - -Note that this does not split camelCase text. - -See: [`hyphenate()`](#hyphenate) and [`underscore()`](#underscore) - -### Example - -```js -var str = 'loremIpsum dolor spéçïãl chârs'; -slugify(str); // "loremipsum-dolor-special-chars" -slugify(str, '_'); // "loremipsum_dolor_special_chars" -``` - -## stripMargin(str[, marginChar]):String - -Strip leading characters followed by 'marginChar' from every line in a String. -The default margin character is a pipe. - -### Example - -```js -var str = 'this\n'; -str += ' |is a formatted\n'; -str += ' |string'; - - -stripMargin(str); //"this\nis a formatted\nstring" -stripMargin("this\n___#works\n___#too", '#'); //"this\nworks\ntoo" - -``` - - -## trim(str, [chars]):String - -Remove chars or white-spaces from beginning and end of string. - -`chars` is an array of chars to remove from the beginning and end of the -string. If `chars` is not specified, Unicode whitespace chars will be used -instead. - -See: [`rtrim()`](#rtrim), [`ltrim()`](#ltrim) - -### Example - -```js -trim(' lorem ipsum '); // "lorem ipsum" -trim('-+-lorem ipsum-+-', ['-', '+']); // "lorem ipsum" -``` - - - -## truncate(str, maxChars, [append], [onlyFullWords]):String - -Limit number of chars. Returned string `length` will be `<= maxChars`. - -See: [`crop()`](#crop) - -### Arguments - - 1. `str` (String) : String - 2. `maxChars` (Number) : Maximum number of characters including `append.length`. - 3. `[append]` (String) : Value that should be added to the end of string. - Defaults to "...". - 4. `[onlyFullWords]` (Boolean) : If it shouldn't break words. Default is - `false`. (favor [`crop()`](#crop) since code will be clearer). - -### Example - -```js -truncate('lorem ipsum dolor', 11); // "lorem ip..." -truncate('lorem ipsum dolor', 11, '+'); // "lorem ipsu+" -truncate('lorem ipsum dolor', 11, null, true); // "lorem..." -``` - - - -## typecast(str):* - -Parses string and convert it into a native value. - -### Example - -```js -typecast('lorem ipsum'); // "lorem ipsum" -typecast('123'); // 123 -typecast('123.45'); // 123.45 -typecast('false'); // false -typecast('true'); // true -typecast('null'); // null -typecast('undefined'); // undefined -``` - - - -## unCamelCase(str, [delimiter]):String - -Add the delimiter between camelCase text and convert first char of each word to -lower case. - -The delimiter defaults to a space character. - -See: [`camelCase()`][#camelCase] - -### Example - -```js -unCamelCase('loremIpsumDolor'); // "lorem ipsum dolor" -unCamelCase('loremIpsumDolor', '-'); // "lorem-ipsum-color" -``` - - -## underscore(str):String - -Replaces spaces with underscores, split camelCase text, remove non-word chars, -remove accents and convert to lower case. - -See: [`slugify()`](#slugify), [`hyphenate()`](#hyphenate) - -```js -underscore(' %# lorem ipsum ? $ dolor'); // "lorem_ipsum_dolor" -underscore('spéçïãl çhârs'); // "special_chars" -underscore('loremIpsum'); // "lorem_ipsum" -``` - - - -## unescapeHtml(str):String - -Unescapes the following HTML character references back into the raw symbol they map to: - -* `&` becomes `&` -* `<` becomes `<` -* `>` becomes `>` -* `'` becomes `'` -* `"` becomes `"` - -No other HTML character references are unescaped. To HTML-unescape other entities as well, use a third-party library like [_he_](http://mths.be/he). - - -See: [`escapeHtml()`](#escapeHtml) - -### Example - -```js -unescapeHtml('lorem &amp; &quot;ipsum&quot;'); // 'lorem & "ipsum"' -``` - - - -## unescapeUnicode(str):String - -Unescapes unicode char sequences. - -See: [`escapeUnicode()`](#escapeUnicode) - -```js -unescapeUnicode('\\u0066\\u00f8\\u006f\\u0020\\u0062\\u00e5\\u0072'); -// > 'føo bår' -``` - - - -## unhyphenate(str):String - -Replaces hyphens with spaces. (only hyphens between word chars) - -See : [`hyphenate()`](#hyphenate) - -### Example - -```js -unhyphenate('lorem-ipsum-dolor'); // "lorem ipsum dolor" -``` - - -## upperCase(str):String - -"Safer" `String.toUpperCase()`. (Used internally) - -### Example - -```js -(null).toUpperCase(); // Error! -(undefined).toUpperCase(); // Error! -upperCase(null); // "" -upperCase(undefined); // "" -``` - - - -## WHITE_SPACES:Array - -Constant array of all [Unicode white-space -characters](http://en.wikipedia.org/wiki/Whitespace_character). - - - -------------------------------------------------------------------------------- - -For more usage examples check specs inside `/tests` folder. Unit tests are the -best documentation you can get... diff --git a/node_modules/mout/doc/time.md b/node_modules/mout/doc/time.md deleted file mode 100644 index 628c2a9..0000000 --- a/node_modules/mout/doc/time.md +++ /dev/null @@ -1,64 +0,0 @@ -# time # - -Utilities for time manipulation. - - -## convert(value, sourceUnit, [destinationUnit]):Number - -Converts time between units. - -Available units: `millisecond`, `second`, `minute`, `hour`, `day`, `week`. -Abbreviations: `ms`, `s`, `m`, `h`, `d`, `w`. - -We do **not** support year and month as a time unit since their values are not -fixed. - -The default `destinationUnit` is `ms`. - -```js -convert(1, 'minute'); // 60000 -convert(2.5, 's', 'ms'); // 2500 -convert(2, 'm', 's'); // 120 -convert(500, 'ms', 's'); // 0.5 -``` - - - -## now():Number - -Returns the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. -Uses `Date.now()` if available. - -### Example - -```js -now(); // 1335449614650 -``` - - - -## parseMs(ms):Object - -Parse timestamp (milliseconds) into an object `{milliseconds:number, -seconds:number, minutes:number, hours:number, days:number}`. - -### Example - -```js -// {days:27, hours:4, minutes:26, seconds:5, milliseconds:454} -parseMs(2348765454); -``` - - - -## toTimeString(ms):String - -Convert timestamp (milliseconds) into a time string in the format "[H:]MM:SS". - -### Example - -```js -toTimeString(12513); // "00:12" -toTimeString(951233); // "15:51" -toTimeString(8765235); // "2:26:05" -``` diff --git a/node_modules/mout/function.js b/node_modules/mout/function.js deleted file mode 100644 index 1065230..0000000 --- a/node_modules/mout/function.js +++ /dev/null @@ -1,25 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'after' : require('./function/after'), - 'awaitDelay' : require('./function/awaitDelay'), - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'constant' : require('./function/constant'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'identity' : require('./function/identity'), - 'makeIterator_' : require('./function/makeIterator_'), - 'memoize' : require('./function/memoize'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout'), - 'times' : require('./function/times'), - 'wrap' : require('./function/wrap') -}; - - diff --git a/node_modules/mout/function/after.js b/node_modules/mout/function/after.js deleted file mode 100644 index 828bdd6..0000000 --- a/node_modules/mout/function/after.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Calls closure only after callback is called x times - */ - function after(closure, times){ - return function () { - if (--times <= 0) closure(); - }; - } - - module.exports = after; - - diff --git a/node_modules/mout/function/awaitDelay.js b/node_modules/mout/function/awaitDelay.js deleted file mode 100644 index 8c9b1a3..0000000 --- a/node_modules/mout/function/awaitDelay.js +++ /dev/null @@ -1,22 +0,0 @@ -var now = require('../time/now'); -var timeout = require('./timeout'); -var append = require('../array/append'); - - /** - * Ensure a minimum delay for callbacks - */ - function awaitDelay( callback, delay ){ - var baseTime = now() + delay; - return function() { - // ensure all browsers will execute it asynchronously (avoid hard - // to catch errors) not using "0" because of old browsers and also - // since new browsers increase the value to be at least "4" - // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout - var ms = Math.max(baseTime - now(), 4); - return timeout.apply(this, append([callback, ms, this], arguments)); - }; - } - - module.exports = awaitDelay; - - diff --git a/node_modules/mout/function/bind.js b/node_modules/mout/function/bind.js deleted file mode 100644 index c6c4719..0000000 --- a/node_modules/mout/function/bind.js +++ /dev/null @@ -1,19 +0,0 @@ -var slice = require('../array/slice'); - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - module.exports = bind; - - diff --git a/node_modules/mout/function/compose.js b/node_modules/mout/function/compose.js deleted file mode 100644 index 8cd5c5f..0000000 --- a/node_modules/mout/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - module.exports = compose; - - diff --git a/node_modules/mout/function/constant.js b/node_modules/mout/function/constant.js deleted file mode 100644 index ab932d9..0000000 --- a/node_modules/mout/function/constant.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a new function that will return the value - */ - function constant(value){ - return function() { - return value; - }; - } - - module.exports = constant; - - diff --git a/node_modules/mout/function/debounce.js b/node_modules/mout/function/debounce.js deleted file mode 100644 index 7f6f302..0000000 --- a/node_modules/mout/function/debounce.js +++ /dev/null @@ -1,32 +0,0 @@ - - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - debounced.cancel = function(){ - clearTimeout(timeout); - }; - return debounced; - } - - module.exports = debounce; - - diff --git a/node_modules/mout/function/func.js b/node_modules/mout/function/func.js deleted file mode 100644 index b81bf0a..0000000 --- a/node_modules/mout/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - module.exports = func; - - diff --git a/node_modules/mout/function/identity.js b/node_modules/mout/function/identity.js deleted file mode 100644 index d07b01a..0000000 --- a/node_modules/mout/function/identity.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Returns the first argument provided to it. - */ - function identity(val){ - return val; - } - - module.exports = identity; - - diff --git a/node_modules/mout/function/makeIterator_.js b/node_modules/mout/function/makeIterator_.js deleted file mode 100644 index 20cc0e7..0000000 --- a/node_modules/mout/function/makeIterator_.js +++ /dev/null @@ -1,34 +0,0 @@ -var identity = require('./identity'); -var prop = require('./prop'); -var deepMatches = require('../object/deepMatches'); - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - if (src == null) { - return identity; - } - switch(typeof src) { - case 'function': - // function is the first to improve perf (most common case) - // also avoid using `Function#call` if not needed, which boosts - // perf a lot in some cases - return (typeof thisObj !== 'undefined')? function(val, i, arr){ - return src.call(thisObj, val, i, arr); - } : src; - case 'object': - return function(val){ - return deepMatches(val, src); - }; - case 'string': - case 'number': - return prop(src); - } - } - - module.exports = makeIterator; - - diff --git a/node_modules/mout/function/memoize.js b/node_modules/mout/function/memoize.js deleted file mode 100644 index 0ea4433..0000000 --- a/node_modules/mout/function/memoize.js +++ /dev/null @@ -1,40 +0,0 @@ -var isFunction = require('../lang/isFunction'); -var hasOwn = require('../object/hasOwn'); - - /** - * Creates a function that memoizes the result of `fn`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `fn` is invoked with the `this` binding of the memoized - * function. Modified from lodash. - * - * @param {Function} fn Function to have its output memoized. - * @param {Function} context Function to resolve the cache key. - * @return {Function} Returns the new memoized function. - */ - function memoize(fn, resolver) { - if (!isFunction(fn) || (resolver && !isFunction(resolver))) { - throw new TypeError('Expected a function'); - } - - var memoized = function() { - var cache = memoized.cache, - key = resolver ? resolver.apply(this, arguments) : arguments[0]; - - if (hasOwn(cache, key)) { - return cache[key]; - } - var result = fn.apply(this, arguments); - cache[key] = result; - return result; - }; - - memoized.cache = {}; - - return memoized; - } - - module.exports = memoize; - - diff --git a/node_modules/mout/function/partial.js b/node_modules/mout/function/partial.js deleted file mode 100644 index fbebb2d..0000000 --- a/node_modules/mout/function/partial.js +++ /dev/null @@ -1,31 +0,0 @@ -var indexOf = require('../array/indexOf'); -var slice = require('../array/slice'); -var take = require('../array/take'); - - var _ = {}; - - /** - * Creates a partially applied function. - */ - function partial(f) { - var as = slice(arguments, 1); - var has_ = indexOf(as, _) !== -1; - - return function() { - var rest = slice(arguments); - - // Don't waste time checking for placeholders if there aren't any. - var args = has_ ? take(as.length, function(i) { - var a = as[i]; - return a === _ ? rest.shift() : a; - }) : as; - - return f.apply(this, rest.length ? args.concat(rest) : args); - }; - } - - partial._ = _; - - module.exports = partial; - - diff --git a/node_modules/mout/function/prop.js b/node_modules/mout/function/prop.js deleted file mode 100644 index 734acb7..0000000 --- a/node_modules/mout/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - module.exports = prop; - - diff --git a/node_modules/mout/function/series.js b/node_modules/mout/function/series.js deleted file mode 100644 index 25159c2..0000000 --- a/node_modules/mout/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ - - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - module.exports = series; - - diff --git a/node_modules/mout/function/throttle.js b/node_modules/mout/function/throttle.js deleted file mode 100644 index 0a5e161..0000000 --- a/node_modules/mout/function/throttle.js +++ /dev/null @@ -1,33 +0,0 @@ -var now = require('../time/now'); - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - diff, prevCall = 0; - function delayed(){ - prevCall = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - diff = delay - (now() - prevCall); - if (diff <= 0) { - clearTimeout(timeout); - delayed(); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - throttled.cancel = function(){ - clearTimeout(timeout); - }; - return throttled; - } - - module.exports = throttle; - - diff --git a/node_modules/mout/function/timeout.js b/node_modules/mout/function/timeout.js deleted file mode 100644 index 509dd68..0000000 --- a/node_modules/mout/function/timeout.js +++ /dev/null @@ -1,17 +0,0 @@ -var slice = require('../array/slice'); - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - module.exports = timeout; - - diff --git a/node_modules/mout/function/times.js b/node_modules/mout/function/times.js deleted file mode 100644 index 04a11c2..0000000 --- a/node_modules/mout/function/times.js +++ /dev/null @@ -1,17 +0,0 @@ - - - /** - * Iterates over a callback a set amount of times - */ - function times(n, callback, thisObj){ - var i = -1; - while (++i < n) { - if ( callback.call(thisObj, i) === false ) { - break; - } - } - } - - module.exports = times; - - diff --git a/node_modules/mout/function/wrap.js b/node_modules/mout/function/wrap.js deleted file mode 100644 index 82d77ff..0000000 --- a/node_modules/mout/function/wrap.js +++ /dev/null @@ -1,14 +0,0 @@ -var partial = require('./partial'); - - /** - * Returns the first function passed as an argument to the second, - * allowing you to adjust arguments, run code before and after, and - * conditionally execute the original function. - */ - function wrap(fn, wrapper){ - return partial(wrapper, fn); - } - - module.exports = wrap; - - diff --git a/node_modules/mout/index.js b/node_modules/mout/index.js deleted file mode 100644 index 7c47774..0000000 --- a/node_modules/mout/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/**@license - * mout v1.2.4 | http://moutjs.com | MIT license - */ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'VERSION' : '1.2.4', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time'), - 'fn' : require('./function') -}; - - diff --git a/node_modules/mout/lang.js b/node_modules/mout/lang.js deleted file mode 100644 index 150007f..0000000 --- a/node_modules/mout/lang.js +++ /dev/null @@ -1,40 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'GLOBAL' : require('./lang/GLOBAL'), - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'deepEquals' : require('./lang/deepEquals'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isPrimitive' : require('./lang/isPrimitive'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toNumber' : require('./lang/toNumber'), - 'toString' : require('./lang/toString') -}; - - diff --git a/node_modules/mout/lang/GLOBAL.js b/node_modules/mout/lang/GLOBAL.js deleted file mode 100644 index 4d759ba..0000000 --- a/node_modules/mout/lang/GLOBAL.js +++ /dev/null @@ -1,7 +0,0 @@ - - - // Reference to the global context (works on ES3 and ES5-strict mode) - //jshint -W061, -W064 - module.exports = Function('return this')(); - - diff --git a/node_modules/mout/lang/clone.js b/node_modules/mout/lang/clone.js deleted file mode 100644 index e515487..0000000 --- a/node_modules/mout/lang/clone.js +++ /dev/null @@ -1,49 +0,0 @@ -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); -var mixIn = require('../object/mixIn'); - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignoreCase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - module.exports = clone; - - diff --git a/node_modules/mout/lang/createObject.js b/node_modules/mout/lang/createObject.js deleted file mode 100644 index bbc14c1..0000000 --- a/node_modules/mout/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -var mixIn = require('../object/mixIn'); - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - module.exports = createObject; - - diff --git a/node_modules/mout/lang/ctorApply.js b/node_modules/mout/lang/ctorApply.js deleted file mode 100644 index 077cde4..0000000 --- a/node_modules/mout/lang/ctorApply.js +++ /dev/null @@ -1,15 +0,0 @@ - - - var bind = Function.prototype.bind; - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - var Bound = bind.bind(ctor, undefined).apply(undefined, args); - return new Bound(); - } - - module.exports = ctorApply; - - diff --git a/node_modules/mout/lang/deepClone.js b/node_modules/mout/lang/deepClone.js deleted file mode 100644 index 25fd95f..0000000 --- a/node_modules/mout/lang/deepClone.js +++ /dev/null @@ -1,48 +0,0 @@ -var clone = require('./clone'); -var forOwn = require('../object/forOwn'); -var kindOf = require('./kindOf'); -var isPlainObject = require('./isPlainObject'); - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - module.exports = deepClone; - - - diff --git a/node_modules/mout/lang/deepEquals.js b/node_modules/mout/lang/deepEquals.js deleted file mode 100644 index bf2b90d..0000000 --- a/node_modules/mout/lang/deepEquals.js +++ /dev/null @@ -1,30 +0,0 @@ -var is = require('./is'); -var isObject = require('./isObject'); -var isArray = require('./isArray'); -var objEquals = require('../object/equals'); -var arrEquals = require('../array/equals'); - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || is; - - var bothObjects = isObject(a) && isObject(b); - var bothArrays = !bothObjects && isArray(a) && isArray(b); - - if (!bothObjects && !bothArrays) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - var method = bothObjects ? objEquals : arrEquals; - return method(a, b, compare); - } - - module.exports = deepEquals; - - diff --git a/node_modules/mout/lang/defaults.js b/node_modules/mout/lang/defaults.js deleted file mode 100644 index 1111b2e..0000000 --- a/node_modules/mout/lang/defaults.js +++ /dev/null @@ -1,17 +0,0 @@ -var toArray = require('./toArray'); -var find = require('../array/find'); - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - module.exports = defaults; - - diff --git a/node_modules/mout/lang/inheritPrototype.js b/node_modules/mout/lang/inheritPrototype.js deleted file mode 100644 index 1c9da1f..0000000 --- a/node_modules/mout/lang/inheritPrototype.js +++ /dev/null @@ -1,18 +0,0 @@ -var createObject = require('./createObject'); - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - child.super_ = parent; - return p; - } - - module.exports = inheritPrototype; - diff --git a/node_modules/mout/lang/is.js b/node_modules/mout/lang/is.js deleted file mode 100644 index 4a83573..0000000 --- a/node_modules/mout/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - module.exports = is; - - diff --git a/node_modules/mout/lang/isArguments.js b/node_modules/mout/lang/isArguments.js deleted file mode 100644 index f7b08ba..0000000 --- a/node_modules/mout/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -var isKind = require('./isKind'); - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - module.exports = isArgs; - diff --git a/node_modules/mout/lang/isArray.js b/node_modules/mout/lang/isArray.js deleted file mode 100644 index 262ee40..0000000 --- a/node_modules/mout/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - module.exports = isArray; - diff --git a/node_modules/mout/lang/isBoolean.js b/node_modules/mout/lang/isBoolean.js deleted file mode 100644 index 86557cb..0000000 --- a/node_modules/mout/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - module.exports = isBoolean; - diff --git a/node_modules/mout/lang/isDate.js b/node_modules/mout/lang/isDate.js deleted file mode 100644 index 4a5130f..0000000 --- a/node_modules/mout/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - module.exports = isDate; - diff --git a/node_modules/mout/lang/isEmpty.js b/node_modules/mout/lang/isEmpty.js deleted file mode 100644 index c7854c6..0000000 --- a/node_modules/mout/lang/isEmpty.js +++ /dev/null @@ -1,24 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('./isArray'); - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return true; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return true; - } - } - - module.exports = isEmpty; - - diff --git a/node_modules/mout/lang/isFinite.js b/node_modules/mout/lang/isFinite.js deleted file mode 100644 index 812e317..0000000 --- a/node_modules/mout/lang/isFinite.js +++ /dev/null @@ -1,20 +0,0 @@ -var isNumber = require('./isNumber'); -var GLOBAL = require('./GLOBAL'); - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = GLOBAL.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = GLOBAL.isFinite( val ); - } - return is; - } - - module.exports = isFinite; - - diff --git a/node_modules/mout/lang/isFunction.js b/node_modules/mout/lang/isFunction.js deleted file mode 100644 index 216879f..0000000 --- a/node_modules/mout/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - module.exports = isFunction; - diff --git a/node_modules/mout/lang/isInteger.js b/node_modules/mout/lang/isInteger.js deleted file mode 100644 index 29f95d9..0000000 --- a/node_modules/mout/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -var isNumber = require('./isNumber'); - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - module.exports = isInteger; - - diff --git a/node_modules/mout/lang/isKind.js b/node_modules/mout/lang/isKind.js deleted file mode 100644 index 02301e0..0000000 --- a/node_modules/mout/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -var kindOf = require('./kindOf'); - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - module.exports = isKind; - diff --git a/node_modules/mout/lang/isNaN.js b/node_modules/mout/lang/isNaN.js deleted file mode 100644 index b1018ec..0000000 --- a/node_modules/mout/lang/isNaN.js +++ /dev/null @@ -1,16 +0,0 @@ -var isNumber = require('./isNumber'); -var $isNaN = require('../number/isNaN'); - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || $isNaN(Number(val)); - } - - module.exports = isNaN; - - diff --git a/node_modules/mout/lang/isNull.js b/node_modules/mout/lang/isNull.js deleted file mode 100644 index 6252f9e..0000000 --- a/node_modules/mout/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - */ - function isNull(val){ - return val === null; - } - module.exports = isNull; - - diff --git a/node_modules/mout/lang/isNumber.js b/node_modules/mout/lang/isNumber.js deleted file mode 100644 index 126c1cc..0000000 --- a/node_modules/mout/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - module.exports = isNumber; - diff --git a/node_modules/mout/lang/isObject.js b/node_modules/mout/lang/isObject.js deleted file mode 100644 index 7350c89..0000000 --- a/node_modules/mout/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - module.exports = isObject; - diff --git a/node_modules/mout/lang/isPlainObject.js b/node_modules/mout/lang/isPlainObject.js deleted file mode 100644 index b81342e..0000000 --- a/node_modules/mout/lang/isPlainObject.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value && typeof value === 'object' && - value.constructor === Object); - } - - module.exports = isPlainObject; - - diff --git a/node_modules/mout/lang/isPrimitive.js b/node_modules/mout/lang/isPrimitive.js deleted file mode 100644 index e255475..0000000 --- a/node_modules/mout/lang/isPrimitive.js +++ /dev/null @@ -1,21 +0,0 @@ - - - /** - * Checks if the object is a primitive - */ - function isPrimitive(value) { - // Using switch fallthrough because it's simple to read and is - // generally fast: http://jsperf.com/testing-value-is-primitive/5 - switch (typeof value) { - case "string": - case "number": - case "boolean": - return true; - } - - return value == null; - } - - module.exports = isPrimitive; - - diff --git a/node_modules/mout/lang/isRegExp.js b/node_modules/mout/lang/isRegExp.js deleted file mode 100644 index fc5459a..0000000 --- a/node_modules/mout/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - module.exports = isRegExp; - diff --git a/node_modules/mout/lang/isString.js b/node_modules/mout/lang/isString.js deleted file mode 100644 index f890658..0000000 --- a/node_modules/mout/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -var isKind = require('./isKind'); - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - module.exports = isString; - diff --git a/node_modules/mout/lang/isUndefined.js b/node_modules/mout/lang/isUndefined.js deleted file mode 100644 index fb2261d..0000000 --- a/node_modules/mout/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ - - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - module.exports = isUndef; - diff --git a/node_modules/mout/lang/isnt.js b/node_modules/mout/lang/isnt.js deleted file mode 100644 index 9dad58c..0000000 --- a/node_modules/mout/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -var is = require('./is'); - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - module.exports = isnt; - - diff --git a/node_modules/mout/lang/kindOf.js b/node_modules/mout/lang/kindOf.js deleted file mode 100644 index c3d43ba..0000000 --- a/node_modules/mout/lang/kindOf.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - return Object.prototype.toString.call(val).slice(8, -1); - } - module.exports = kindOf; - diff --git a/node_modules/mout/lang/toArray.js b/node_modules/mout/lang/toArray.js deleted file mode 100644 index 1f3a2b6..0000000 --- a/node_modules/mout/lang/toArray.js +++ /dev/null @@ -1,30 +0,0 @@ -var kindOf = require('./kindOf'); -var GLOBAL = require('./GLOBAL'); - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === GLOBAL ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - module.exports = toArray; - diff --git a/node_modules/mout/lang/toNumber.js b/node_modules/mout/lang/toNumber.js deleted file mode 100644 index 8b6df34..0000000 --- a/node_modules/mout/lang/toNumber.js +++ /dev/null @@ -1,20 +0,0 @@ -var isArray = require('./isArray'); - - /** - * covert value into number if numeric - */ - function toNumber(val){ - // numberic values should come first because of -0 - if (typeof val === 'number') return val; - // we want all falsy values (besides -0) to return zero to avoid - // headaches - if (!val) return 0; - if (typeof val === 'string') return parseFloat(val); - // arrays are edge cases. `Number([4]) === 4` - if (isArray(val)) return NaN; - return Number(val); - } - - module.exports = toNumber; - - diff --git a/node_modules/mout/lang/toString.js b/node_modules/mout/lang/toString.js deleted file mode 100644 index ae5c2b0..0000000 --- a/node_modules/mout/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - module.exports = toString; - - diff --git a/node_modules/mout/math.js b/node_modules/mout/math.js deleted file mode 100644 index bd3ec5a..0000000 --- a/node_modules/mout/math.js +++ /dev/null @@ -1,20 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'overflow' : require('./math/overflow'), - 'round' : require('./math/round') -}; - - diff --git a/node_modules/mout/math/ceil.js b/node_modules/mout/math/ceil.js deleted file mode 100644 index a279e15..0000000 --- a/node_modules/mout/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - module.exports = ceil; - diff --git a/node_modules/mout/math/clamp.js b/node_modules/mout/math/clamp.js deleted file mode 100644 index e929a9a..0000000 --- a/node_modules/mout/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - module.exports = clamp; - diff --git a/node_modules/mout/math/countSteps.js b/node_modules/mout/math/countSteps.js deleted file mode 100644 index 60ac90c..0000000 --- a/node_modules/mout/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ - - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - module.exports = countSteps; - diff --git a/node_modules/mout/math/floor.js b/node_modules/mout/math/floor.js deleted file mode 100644 index 9de5053..0000000 --- a/node_modules/mout/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - module.exports = floor; - diff --git a/node_modules/mout/math/inRange.js b/node_modules/mout/math/inRange.js deleted file mode 100644 index 763218f..0000000 --- a/node_modules/mout/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - module.exports = inRange; - diff --git a/node_modules/mout/math/isNear.js b/node_modules/mout/math/isNear.js deleted file mode 100644 index 45486b6..0000000 --- a/node_modules/mout/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ - - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - module.exports = isNear; - diff --git a/node_modules/mout/math/lerp.js b/node_modules/mout/math/lerp.js deleted file mode 100644 index 111e271..0000000 --- a/node_modules/mout/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ - - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - module.exports = lerp; - diff --git a/node_modules/mout/math/loop.js b/node_modules/mout/math/loop.js deleted file mode 100644 index 35207c1..0000000 --- a/node_modules/mout/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - module.exports = loop; - diff --git a/node_modules/mout/math/map.js b/node_modules/mout/math/map.js deleted file mode 100644 index 96c4b78..0000000 --- a/node_modules/mout/math/map.js +++ /dev/null @@ -1,11 +0,0 @@ -var lerp = require('./lerp'); -var norm = require('./norm'); - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - module.exports = map; - diff --git a/node_modules/mout/math/norm.js b/node_modules/mout/math/norm.js deleted file mode 100644 index 8ee53d8..0000000 --- a/node_modules/mout/math/norm.js +++ /dev/null @@ -1,13 +0,0 @@ - - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - if (val < min || val > max) { - throw new RangeError('value (' + val + ') must be between ' + min + ' and ' + max); - } - - return val === max ? 1 : (val - min) / (max - min); - } - module.exports = norm; - diff --git a/node_modules/mout/math/overflow.js b/node_modules/mout/math/overflow.js deleted file mode 100644 index af4950c..0000000 --- a/node_modules/mout/math/overflow.js +++ /dev/null @@ -1,23 +0,0 @@ - - - /** - * Wraps number within bounds both positive and negative - */ - function overflow(number, min, max){ - if ( max === undefined ) { - max = min; - min = 0; - } - - var difference = max - min; - - if ( number < min ) { - number += difference * ( ~~( ( min - number ) / difference ) + 1 ); - } - - return min + ( number - min ) % difference; - } - - module.exports = overflow; - - diff --git a/node_modules/mout/math/round.js b/node_modules/mout/math/round.js deleted file mode 100644 index d108e6c..0000000 --- a/node_modules/mout/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - module.exports = round; - - diff --git a/node_modules/mout/number.js b/node_modules/mout/number.js deleted file mode 100644 index ba7034a..0000000 --- a/node_modules/mout/number.js +++ /dev/null @@ -1,25 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_SAFE_INTEGER' : require('./number/MAX_SAFE_INTEGER'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'isNaN' : require('./number/isNaN'), - 'nth' : require('./number/nth'), - 'ordinal' : require('./number/ordinal'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - - diff --git a/node_modules/mout/number/MAX_INT.js b/node_modules/mout/number/MAX_INT.js deleted file mode 100644 index 1d6f0e4..0000000 --- a/node_modules/mout/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ - - module.exports = 2147483647; - diff --git a/node_modules/mout/number/MAX_SAFE_INTEGER.js b/node_modules/mout/number/MAX_SAFE_INTEGER.js deleted file mode 100644 index b13e538..0000000 --- a/node_modules/mout/number/MAX_SAFE_INTEGER.js +++ /dev/null @@ -1,7 +0,0 @@ - - - // maximum safe integer (Math.pow(2, 53) - 1) - // see: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer - module.exports = 9007199254740991; - - diff --git a/node_modules/mout/number/MAX_UINT.js b/node_modules/mout/number/MAX_UINT.js deleted file mode 100644 index 700da0f..0000000 --- a/node_modules/mout/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ - - module.exports = 4294967295; - diff --git a/node_modules/mout/number/MIN_INT.js b/node_modules/mout/number/MIN_INT.js deleted file mode 100644 index b34ab2c..0000000 --- a/node_modules/mout/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ - - module.exports = -2147483648; - diff --git a/node_modules/mout/number/abbreviate.js b/node_modules/mout/number/abbreviate.js deleted file mode 100644 index a5061c9..0000000 --- a/node_modules/mout/number/abbreviate.js +++ /dev/null @@ -1,43 +0,0 @@ -var enforcePrecision = require('./enforcePrecision'); - var _defaultDict = { - thousand: "K", - million: "M", - billion: "B", - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict) { - nDecimals = nDecimals != null ? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - var negative = false; - - if (val < 0) { - val = -val; - negative = true; - } - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000 ? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000 ? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - if (negative) { - str = "-" + str; - } - - return str; - } - - module.exports = abbreviateNumber; - diff --git a/node_modules/mout/number/currencyFormat.js b/node_modules/mout/number/currencyFormat.js deleted file mode 100644 index c85a668..0000000 --- a/node_modules/mout/number/currencyFormat.js +++ /dev/null @@ -1,27 +0,0 @@ -var toNumber = require('../lang/toNumber'); - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - val = toNumber(val); - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - module.exports = currencyFormat; - - diff --git a/node_modules/mout/number/enforcePrecision.js b/node_modules/mout/number/enforcePrecision.js deleted file mode 100644 index 3d3b2d4..0000000 --- a/node_modules/mout/number/enforcePrecision.js +++ /dev/null @@ -1,12 +0,0 @@ -var toNumber = require('../lang/toNumber'); - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - */ - function enforcePrecision(val, nDecimalDigits){ - val = toNumber(val); - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - module.exports = enforcePrecision; - diff --git a/node_modules/mout/number/isNaN.js b/node_modules/mout/number/isNaN.js deleted file mode 100644 index 3799f3b..0000000 --- a/node_modules/mout/number/isNaN.js +++ /dev/null @@ -1,14 +0,0 @@ - - - /** - * ES6 Number.isNaN - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN - */ - function isNaN(val){ - // jshint eqeqeq:false - return typeof val === 'number' && val != val; - } - - module.exports = isNaN; - - diff --git a/node_modules/mout/number/nth.js b/node_modules/mout/number/nth.js deleted file mode 100644 index 43ffb21..0000000 --- a/node_modules/mout/number/nth.js +++ /dev/null @@ -1,25 +0,0 @@ - - - /** - * Returns "nth" of number (1 = "st", 2 = "nd", 3 = "rd", 4..10 = "th", ...) - */ - function nth(i) { - var t = (i % 100); - if (t >= 10 && t <= 20) { - return 'th'; - } - switch(i % 10) { - case 1: - return 'st'; - case 2: - return 'nd'; - case 3: - return 'rd'; - default: - return 'th'; - } - } - - module.exports = nth; - - diff --git a/node_modules/mout/number/ordinal.js b/node_modules/mout/number/ordinal.js deleted file mode 100644 index 939a0fa..0000000 --- a/node_modules/mout/number/ordinal.js +++ /dev/null @@ -1,14 +0,0 @@ -var toInt = require('./toInt'); -var nth = require('./nth'); - - /** - * converts number into ordinal form (1st, 2nd, 3rd, 4th, ...) - */ - function ordinal(n){ - n = toInt(n); - return n + nth(n); - } - - module.exports = ordinal; - - diff --git a/node_modules/mout/number/pad.js b/node_modules/mout/number/pad.js deleted file mode 100644 index 1f83af4..0000000 --- a/node_modules/mout/number/pad.js +++ /dev/null @@ -1,14 +0,0 @@ -var lpad = require('../string/lpad'); -var toNumber = require('../lang/toNumber'); - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - n = toNumber(n); - return lpad(''+ n, minLength, char || '0'); - } - - module.exports = pad; - - diff --git a/node_modules/mout/number/rol.js b/node_modules/mout/number/rol.js deleted file mode 100644 index ecd58da..0000000 --- a/node_modules/mout/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - module.exports = rol; - diff --git a/node_modules/mout/number/ror.js b/node_modules/mout/number/ror.js deleted file mode 100644 index 2eda81d..0000000 --- a/node_modules/mout/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ - - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - module.exports = ror; - diff --git a/node_modules/mout/number/sign.js b/node_modules/mout/number/sign.js deleted file mode 100644 index 7f9a1e2..0000000 --- a/node_modules/mout/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -var toNumber = require('../lang/toNumber'); - - /** - * Get sign of the value. - */ - function sign(val) { - var num = toNumber(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - module.exports = sign; - - diff --git a/node_modules/mout/number/toInt.js b/node_modules/mout/number/toInt.js deleted file mode 100644 index 72fd7de..0000000 --- a/node_modules/mout/number/toInt.js +++ /dev/null @@ -1,17 +0,0 @@ - - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return ~~val; - } - - module.exports = toInt; - - diff --git a/node_modules/mout/number/toUInt.js b/node_modules/mout/number/toUInt.js deleted file mode 100644 index d279656..0000000 --- a/node_modules/mout/number/toUInt.js +++ /dev/null @@ -1,15 +0,0 @@ - - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return val >>> 0; - } - - module.exports = toUInt; - - diff --git a/node_modules/mout/number/toUInt31.js b/node_modules/mout/number/toUInt31.js deleted file mode 100644 index 6cd3bb5..0000000 --- a/node_modules/mout/number/toUInt31.js +++ /dev/null @@ -1,15 +0,0 @@ -var MAX_INT = require('./MAX_INT'); - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - module.exports = toUInt31; - - diff --git a/node_modules/mout/object.js b/node_modules/mout/object.js deleted file mode 100644 index ee1e94e..0000000 --- a/node_modules/mout/object.js +++ /dev/null @@ -1,44 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'flatten' : require('./object/flatten'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'omit' : require('./object/omit'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'result' : require('./object/result'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - - diff --git a/node_modules/mout/object/bindAll.js b/node_modules/mout/object/bindAll.js deleted file mode 100644 index c8a2034..0000000 --- a/node_modules/mout/object/bindAll.js +++ /dev/null @@ -1,19 +0,0 @@ -var functions = require('./functions'); -var bind = require('../function/bind'); -var forEach = require('../array/forEach'); -var slice = require('../array/slice'); - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - slice(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - module.exports = bindAll; - - diff --git a/node_modules/mout/object/contains.js b/node_modules/mout/object/contains.js deleted file mode 100644 index 8076e2c..0000000 --- a/node_modules/mout/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -var some = require('./some'); - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - module.exports = contains; - - diff --git a/node_modules/mout/object/deepFillIn.js b/node_modules/mout/object/deepFillIn.js deleted file mode 100644 index 6568ea8..0000000 --- a/node_modules/mout/object/deepFillIn.js +++ /dev/null @@ -1,33 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - // jshint loopfunc: true - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) && - isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - module.exports = deepFillIn; - - diff --git a/node_modules/mout/object/deepMatches.js b/node_modules/mout/object/deepMatches.js deleted file mode 100644 index 4beaf57..0000000 --- a/node_modules/mout/object/deepMatches.js +++ /dev/null @@ -1,56 +0,0 @@ -var forOwn = require('./forOwn'); -var isArray = require('../lang/isArray'); - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object' && - pattern && typeof pattern === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - module.exports = deepMatches; - - diff --git a/node_modules/mout/object/deepMixIn.js b/node_modules/mout/object/deepMixIn.js deleted file mode 100644 index a97e98d..0000000 --- a/node_modules/mout/object/deepMixIn.js +++ /dev/null @@ -1,34 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - module.exports = deepMixIn; - - diff --git a/node_modules/mout/object/equals.js b/node_modules/mout/object/equals.js deleted file mode 100644 index 7c89ab8..0000000 --- a/node_modules/mout/object/equals.js +++ /dev/null @@ -1,33 +0,0 @@ -var hasOwn = require('./hasOwn'); -var every = require('./every'); -var isObject = require('../lang/isObject'); -var is = require('../lang/is'); - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || is; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - module.exports = equals; - diff --git a/node_modules/mout/object/every.js b/node_modules/mout/object/every.js deleted file mode 100644 index 01106e5..0000000 --- a/node_modules/mout/object/every.js +++ /dev/null @@ -1,23 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - module.exports = every; - - diff --git a/node_modules/mout/object/fillIn.js b/node_modules/mout/object/fillIn.js deleted file mode 100644 index 4010e28..0000000 --- a/node_modules/mout/object/fillIn.js +++ /dev/null @@ -1,21 +0,0 @@ -var forEach = require('../array/forEach'); -var slice = require('../array/slice'); -var forOwn = require('./forOwn'); - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(slice(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - module.exports = fillIn; - - diff --git a/node_modules/mout/object/filter.js b/node_modules/mout/object/filter.js deleted file mode 100644 index 3a83a92..0000000 --- a/node_modules/mout/object/filter.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - module.exports = filterValues; - diff --git a/node_modules/mout/object/find.js b/node_modules/mout/object/find.js deleted file mode 100644 index d39c070..0000000 --- a/node_modules/mout/object/find.js +++ /dev/null @@ -1,21 +0,0 @@ -var some = require('./some'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - module.exports = find; - - diff --git a/node_modules/mout/object/flatten.js b/node_modules/mout/object/flatten.js deleted file mode 100644 index a356f15..0000000 --- a/node_modules/mout/object/flatten.js +++ /dev/null @@ -1,38 +0,0 @@ -var forOwn = require('./forOwn'); -var isPlainObject = require('../lang/isPlainObject'); - - /* - * Helper function to flatten to a destination object. - * Used to remove the need to create intermediate objects while flattening. - */ - function flattenTo(obj, result, prefix, level) { - forOwn(obj, function (value, key) { - var nestedPrefix = prefix ? prefix + '.' + key : key; - - if (level !== 0 && isPlainObject(value)) { - flattenTo(value, result, nestedPrefix, level - 1); - } else { - result[nestedPrefix] = value; - } - }); - - return result; - } - - /** - * Recursively flattens an object. - * A new object containing all the elements is returned. - * If level is specified, it will only flatten up to that level. - */ - function flatten(obj, level) { - if (obj == null) { - return {}; - } - - level = level == null ? -1 : level; - return flattenTo(obj, {}, '', level); - } - - module.exports = flatten; - - diff --git a/node_modules/mout/object/forIn.js b/node_modules/mout/object/forIn.js deleted file mode 100644 index 7fe96ce..0000000 --- a/node_modules/mout/object/forIn.js +++ /dev/null @@ -1,76 +0,0 @@ -var hasOwn = require('./hasOwn'); - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - - if (_hasDontEnumBug) { - var ctor = obj.constructor, - isProto = !!ctor && obj === ctor.prototype; - - while (key = _dontEnums[i++]) { - // For constructor, if it is a prototype object the constructor - // is always non-enumerable unless defined otherwise (and - // enumerated above). For non-prototype objects, it will have - // to be defined on this object, since it cannot be defined on - // any prototype objects. - // - // For other [[DontEnum]] properties, check if the value is - // different than Object prototype value. - if ( - (key !== 'constructor' || - (!isProto && hasOwn(obj, key))) && - obj[key] !== Object.prototype[key] - ) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - module.exports = forIn; - - diff --git a/node_modules/mout/object/forOwn.js b/node_modules/mout/object/forOwn.js deleted file mode 100644 index 5f2dfbf..0000000 --- a/node_modules/mout/object/forOwn.js +++ /dev/null @@ -1,19 +0,0 @@ -var hasOwn = require('./hasOwn'); -var forIn = require('./forIn'); - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - module.exports = forOwn; - - diff --git a/node_modules/mout/object/functions.js b/node_modules/mout/object/functions.js deleted file mode 100644 index f571797..0000000 --- a/node_modules/mout/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -var forIn = require('./forIn'); - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - module.exports = functions; - - diff --git a/node_modules/mout/object/get.js b/node_modules/mout/object/get.js deleted file mode 100644 index 46b6ed6..0000000 --- a/node_modules/mout/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -var isPrimitive = require('../lang/isPrimitive'); - - /** - * get "nested" object property - */ - function get(obj, prop){ - if (!obj) return; - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - if (obj == null) return; - } - - return obj[last]; - } - - module.exports = get; - - diff --git a/node_modules/mout/object/has.js b/node_modules/mout/object/has.js deleted file mode 100644 index ca9f228..0000000 --- a/node_modules/mout/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -var get = require('./get'); - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - module.exports = has; - - - diff --git a/node_modules/mout/object/hasOwn.js b/node_modules/mout/object/hasOwn.js deleted file mode 100644 index 7e3c82a..0000000 --- a/node_modules/mout/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ - - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - module.exports = hasOwn; - - diff --git a/node_modules/mout/object/keys.js b/node_modules/mout/object/keys.js deleted file mode 100644 index dd2f4f5..0000000 --- a/node_modules/mout/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - module.exports = keys; - - diff --git a/node_modules/mout/object/map.js b/node_modules/mout/object/map.js deleted file mode 100644 index dd449a7..0000000 --- a/node_modules/mout/object/map.js +++ /dev/null @@ -1,18 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - module.exports = mapValues; - diff --git a/node_modules/mout/object/matches.js b/node_modules/mout/object/matches.js deleted file mode 100644 index 6074faa..0000000 --- a/node_modules/mout/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - module.exports = matches; - - diff --git a/node_modules/mout/object/max.js b/node_modules/mout/object/max.js deleted file mode 100644 index 3e8e92c..0000000 --- a/node_modules/mout/object/max.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMax = require('../array/max'); -var values = require('./values'); - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - module.exports = max; - diff --git a/node_modules/mout/object/merge.js b/node_modules/mout/object/merge.js deleted file mode 100644 index 6961f60..0000000 --- a/node_modules/mout/object/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var hasOwn = require('./hasOwn'); -var deepClone = require('../lang/deepClone'); -var isObject = require('../lang/isObject'); - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - module.exports = merge; - - diff --git a/node_modules/mout/object/min.js b/node_modules/mout/object/min.js deleted file mode 100644 index e1e6697..0000000 --- a/node_modules/mout/object/min.js +++ /dev/null @@ -1,12 +0,0 @@ -var arrMin = require('../array/min'); -var values = require('./values'); - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - module.exports = min; - diff --git a/node_modules/mout/object/mixIn.js b/node_modules/mout/object/mixIn.js deleted file mode 100644 index 55ec8fd..0000000 --- a/node_modules/mout/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - module.exports = mixIn; - diff --git a/node_modules/mout/object/namespace.js b/node_modules/mout/object/namespace.js deleted file mode 100644 index c6e79f6..0000000 --- a/node_modules/mout/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -var forEach = require('../array/forEach'); - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - module.exports = namespace; - - diff --git a/node_modules/mout/object/omit.js b/node_modules/mout/object/omit.js deleted file mode 100644 index 7a5ef05..0000000 --- a/node_modules/mout/object/omit.js +++ /dev/null @@ -1,21 +0,0 @@ -var slice = require('../array/slice'); -var contains = require('../array/contains'); - - /** - * Return a copy of the object, filtered to only contain properties except the blacklisted keys. - */ - function omit(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), - out = {}; - - for (var property in obj) { - if (obj.hasOwnProperty(property) && !contains(keys, property)) { - out[property] = obj[property]; - } - } - return out; - } - - module.exports = omit; - - diff --git a/node_modules/mout/object/pick.js b/node_modules/mout/object/pick.js deleted file mode 100644 index da5a564..0000000 --- a/node_modules/mout/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -var slice = require('../array/slice'); - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - module.exports = pick; - - diff --git a/node_modules/mout/object/pluck.js b/node_modules/mout/object/pluck.js deleted file mode 100644 index e844df4..0000000 --- a/node_modules/mout/object/pluck.js +++ /dev/null @@ -1,13 +0,0 @@ -var map = require('./map'); -var prop = require('../function/prop'); - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - module.exports = pluck; - - diff --git a/node_modules/mout/object/reduce.js b/node_modules/mout/object/reduce.js deleted file mode 100644 index 6f19a3a..0000000 --- a/node_modules/mout/object/reduce.js +++ /dev/null @@ -1,29 +0,0 @@ -var forOwn = require('./forOwn'); -var size = require('./size'); - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - module.exports = reduce; - - diff --git a/node_modules/mout/object/reject.js b/node_modules/mout/object/reject.js deleted file mode 100644 index 7464379..0000000 --- a/node_modules/mout/object/reject.js +++ /dev/null @@ -1,16 +0,0 @@ -var filter = require('./filter'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - module.exports = reject; - - diff --git a/node_modules/mout/object/result.js b/node_modules/mout/object/result.js deleted file mode 100644 index 0efdd41..0000000 --- a/node_modules/mout/object/result.js +++ /dev/null @@ -1,14 +0,0 @@ -var isFunction = require('../lang/isFunction'); - - function result(obj, prop) { - var property = obj[prop]; - - if(property === undefined) { - return; - } - - return isFunction(property) ? property.call(obj) : property; - } - - module.exports = result; - diff --git a/node_modules/mout/object/set.js b/node_modules/mout/object/set.js deleted file mode 100644 index f8562ea..0000000 --- a/node_modules/mout/object/set.js +++ /dev/null @@ -1,22 +0,0 @@ -var namespace = require('./namespace'); - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var stringifiedProp = prop.toString(); - // prototype pollution mitigation - if(stringifiedProp.includes('__proto__') || stringifiedProp.includes('prototype') || stringifiedProp.includes('constructor')) { - return false; - } - var parts = (/^(.+)\.(.+)$/).exec(stringifiedProp); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[stringifiedProp] = val; - } - } - - module.exports = set; - - diff --git a/node_modules/mout/object/size.js b/node_modules/mout/object/size.js deleted file mode 100644 index 9788595..0000000 --- a/node_modules/mout/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - module.exports = size; - - diff --git a/node_modules/mout/object/some.js b/node_modules/mout/object/some.js deleted file mode 100644 index 384c6f3..0000000 --- a/node_modules/mout/object/some.js +++ /dev/null @@ -1,21 +0,0 @@ -var forOwn = require('./forOwn'); -var makeIterator = require('../function/makeIterator_'); - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - module.exports = some; - - diff --git a/node_modules/mout/object/unset.js b/node_modules/mout/object/unset.js deleted file mode 100644 index 343bca0..0000000 --- a/node_modules/mout/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -var has = require('./has'); - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - module.exports = unset; - - diff --git a/node_modules/mout/object/values.js b/node_modules/mout/object/values.js deleted file mode 100644 index 265a693..0000000 --- a/node_modules/mout/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -var forOwn = require('./forOwn'); - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - module.exports = values; - - diff --git a/node_modules/mout/package.json b/node_modules/mout/package.json deleted file mode 100644 index d828084..0000000 --- a/node_modules/mout/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "mout", - "description": "Modular Utilities", - "version": "1.2.4", - "homepage": "http://moutjs.com/", - "author": "Miller Medeiros (http://blog.millermedeiros.com)", - "contributors": [ - "Adam Nowotny", - "André Cruz ", - "Conrad Zimmerman (http://www.conradz.com)", - "Friedemann Altrock ", - "Igor Almeida ", - "Jarrod Overson (http://jarrodoverson.com)", - "Mathias Paumgarten ", - "Zach Shipley" - ], - "keywords": [ - "utilities", - "functional", - "amd-utils", - "stdlib" - ], - "repository": { - "type": "git", - "url": "git://github.com/mout/mout.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/mout/mout/issues/" - }, - "main": "./index.js", - "scripts": { - "pretest": "node build pkg", - "test": "istanbul test tests/runner.js --hook-run-in-context" - }, - "directories": { - "doc": "./doc" - }, - "devDependencies": { - "commander": "~2.16.0", - "handlebars": "~4.7.7", - "istanbul": "~0.4.5", - "jasmine-node": "^1.15.0", - "jshint": "~2.9.5", - "mdoc": "~0.5.3", - "nodefy": "~0.2.2", - "regenerate": "~1.4.0", - "requirejs": "~2.3.5", - "rimraf": "~2.6.2", - "rocambole": "~0.7.0" - }, - "testling": { - "preprocess": "node build testling", - "browsers": { - "ie": [ - 7, - 8, - 9, - 10 - ], - "firefox": [ - 17, - "nightly" - ], - "chrome": [ - 23, - "canary" - ], - "opera": [ - 12, - "next" - ], - "safari": [ - 5.1, - 6 - ], - "iphone": [ - 6 - ], - "ipad": [ - 6 - ] - }, - "scripts": [ - "tests/lib/jasmine/jasmine.js", - "tests/lib/jasmine/jasmine.async.js", - "tests/lib/jasmine/jasmine-tap.js", - "tests/lib/requirejs/require.js", - "tests/testling/src.js", - "tests/testling/specs.js", - "tests/runner.js" - ] - } -} \ No newline at end of file diff --git a/node_modules/mout/queryString.js b/node_modules/mout/queryString.js deleted file mode 100644 index 22685a7..0000000 --- a/node_modules/mout/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - - diff --git a/node_modules/mout/queryString/contains.js b/node_modules/mout/queryString/contains.js deleted file mode 100644 index da678cf..0000000 --- a/node_modules/mout/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -var getQuery = require('./getQuery'); - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - module.exports = contains; - diff --git a/node_modules/mout/queryString/decode.js b/node_modules/mout/queryString/decode.js deleted file mode 100644 index c1b2cab..0000000 --- a/node_modules/mout/queryString/decode.js +++ /dev/null @@ -1,36 +0,0 @@ -var typecast = require('../string/typecast'); -var isArray = require('../lang/isArray'); -var hasOwn = require('../object/hasOwn'); - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - reg = /([^=]+)=(.+)/, - i = -1, - obj = {}, - equalIndex, cur, pValue, pName; - - while ((cur = queryArr[++i])) { - equalIndex = cur.indexOf('='); - pName = cur.substring(0, equalIndex); - pValue = decodeURIComponent(cur.substring(equalIndex + 1)); - if (shouldTypecast !== false) { - pValue = typecast(pValue); - } - if (hasOwn(obj, pName)){ - if(isArray(obj[pName])){ - obj[pName].push(pValue); - } else { - obj[pName] = [obj[pName], pValue]; - } - } else { - obj[pName] = pValue; - } - } - return obj; - } - - module.exports = decode; - diff --git a/node_modules/mout/queryString/encode.js b/node_modules/mout/queryString/encode.js deleted file mode 100644 index 3a4fd0a..0000000 --- a/node_modules/mout/queryString/encode.js +++ /dev/null @@ -1,27 +0,0 @@ -var forOwn = require('../object/forOwn'); -var isArray = require('../lang/isArray'); -var forEach = require('../array/forEach'); - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = [], - arrValues, reg; - forOwn(obj, function (val, key) { - if (isArray(val)) { - arrValues = key + '='; - reg = new RegExp('&'+key+'+=$'); - forEach(val, function (aValue) { - arrValues += encodeURIComponent(aValue) + '&' + key + '='; - }); - query.push(arrValues.replace(reg, '')); - } else { - query.push(key + '=' + encodeURIComponent(val)); - } - }); - return (query.length) ? '?' + query.join('&') : ''; - } - - module.exports = encode; - diff --git a/node_modules/mout/queryString/getParam.js b/node_modules/mout/queryString/getParam.js deleted file mode 100644 index f149c3e..0000000 --- a/node_modules/mout/queryString/getParam.js +++ /dev/null @@ -1,15 +0,0 @@ -var typecast = require('../string/typecast'); -var getQuery = require('./getQuery'); - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - module.exports = getParam; - diff --git a/node_modules/mout/queryString/getQuery.js b/node_modules/mout/queryString/getQuery.js deleted file mode 100644 index 9d4402e..0000000 --- a/node_modules/mout/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ - - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : ''; - } - - module.exports = getQuery; - diff --git a/node_modules/mout/queryString/parse.js b/node_modules/mout/queryString/parse.js deleted file mode 100644 index 532906c..0000000 --- a/node_modules/mout/queryString/parse.js +++ /dev/null @@ -1,13 +0,0 @@ -var decode = require('./decode'); -var getQuery = require('./getQuery'); - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - module.exports = parse; - - diff --git a/node_modules/mout/queryString/setParam.js b/node_modules/mout/queryString/setParam.js deleted file mode 100644 index 052a9ba..0000000 --- a/node_modules/mout/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ - - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - module.exports = setParam; - - diff --git a/node_modules/mout/random.js b/node_modules/mout/random.js deleted file mode 100644 index a924a10..0000000 --- a/node_modules/mout/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randBool' : require('./random/randBool'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'randString' : require('./random/randString'), - 'random' : require('./random/random') -}; - - diff --git a/node_modules/mout/random/choice.js b/node_modules/mout/random/choice.js deleted file mode 100644 index 51aa82a..0000000 --- a/node_modules/mout/random/choice.js +++ /dev/null @@ -1,15 +0,0 @@ -var randInt = require('./randInt'); -var isArray = require('../lang/isArray'); - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - module.exports = choice; - - diff --git a/node_modules/mout/random/guid.js b/node_modules/mout/random/guid.js deleted file mode 100644 index 41f6edd..0000000 --- a/node_modules/mout/random/guid.js +++ /dev/null @@ -1,24 +0,0 @@ -var randHex = require('./randHex'); -var choice = require('./choice'); - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - module.exports = guid; - diff --git a/node_modules/mout/random/rand.js b/node_modules/mout/random/rand.js deleted file mode 100644 index 782dec8..0000000 --- a/node_modules/mout/random/rand.js +++ /dev/null @@ -1,15 +0,0 @@ -var random = require('./random'); -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - module.exports = rand; - diff --git a/node_modules/mout/random/randBit.js b/node_modules/mout/random/randBit.js deleted file mode 100644 index 04f7aa5..0000000 --- a/node_modules/mout/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -var randBool = require('./randBool'); - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return randBool()? 1 : 0; - } - - module.exports = randomBit; - diff --git a/node_modules/mout/random/randBool.js b/node_modules/mout/random/randBool.js deleted file mode 100644 index d3d35cb..0000000 --- a/node_modules/mout/random/randBool.js +++ /dev/null @@ -1,12 +0,0 @@ -var random = require('./random'); - - /** - * returns a random boolean value (true or false) - */ - function randBool(){ - return random() >= 0.5; - } - - module.exports = randBool; - - diff --git a/node_modules/mout/random/randHex.js b/node_modules/mout/random/randHex.js deleted file mode 100644 index d8d711c..0000000 --- a/node_modules/mout/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -var choice = require('./choice'); - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - module.exports = randHex; - - diff --git a/node_modules/mout/random/randInt.js b/node_modules/mout/random/randInt.js deleted file mode 100644 index e237d96..0000000 --- a/node_modules/mout/random/randInt.js +++ /dev/null @@ -1,18 +0,0 @@ -var MIN_INT = require('../number/MIN_INT'); -var MAX_INT = require('../number/MAX_INT'); -var rand = require('./rand'); - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - module.exports = randInt; - diff --git a/node_modules/mout/random/randSign.js b/node_modules/mout/random/randSign.js deleted file mode 100644 index 75a1a51..0000000 --- a/node_modules/mout/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -var randBool = require('./randBool'); - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return randBool()? 1 : -1; - } - - module.exports = randomSign; - diff --git a/node_modules/mout/random/randString.js b/node_modules/mout/random/randString.js deleted file mode 100644 index e3c3597..0000000 --- a/node_modules/mout/random/randString.js +++ /dev/null @@ -1,27 +0,0 @@ -var isNumber = require('../lang/isNumber'); -var isString = require('../lang/isString'); -var randInt = require('./randInt'); - - var defaultDictionary = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - function randomString(length, dictionary) { - if(!isNumber(length) || length <= 0) { - length = 8; - } - - if(!isString(dictionary) || dictionary.length < 1) { - dictionary = defaultDictionary; - } - - var result = '', - domain = dictionary.length - 1; - - while(length--) { - result += dictionary[randInt(0, domain)]; - } - - return result; - } - - module.exports = randomString; - diff --git a/node_modules/mout/random/random.js b/node_modules/mout/random/random.js deleted file mode 100644 index 670a3cc..0000000 --- a/node_modules/mout/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - module.exports = random; - - diff --git a/node_modules/mout/src/array.js b/node_modules/mout/src/array.js deleted file mode 100644 index 489b8fc..0000000 --- a/node_modules/mout/src/array.js +++ /dev/null @@ -1,57 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'append' : require('./array/append'), - 'collect' : require('./array/collect'), - 'combine' : require('./array/combine'), - 'compact' : require('./array/compact'), - 'contains' : require('./array/contains'), - 'difference' : require('./array/difference'), - 'equals' : require('./array/equals'), - 'every' : require('./array/every'), - 'filter' : require('./array/filter'), - 'find' : require('./array/find'), - 'findIndex' : require('./array/findIndex'), - 'findLast' : require('./array/findLast'), - 'findLastIndex' : require('./array/findLastIndex'), - 'flatten' : require('./array/flatten'), - 'forEach' : require('./array/forEach'), - 'groupBy' : require('./array/groupBy'), - 'indexOf' : require('./array/indexOf'), - 'indicesOf' : require('./array/indicesOf'), - 'insert' : require('./array/insert'), - 'intersection' : require('./array/intersection'), - 'invoke' : require('./array/invoke'), - 'join' : require('./array/join'), - 'last' : require('./array/last'), - 'lastIndexOf' : require('./array/lastIndexOf'), - 'map' : require('./array/map'), - 'max' : require('./array/max'), - 'min' : require('./array/min'), - 'pick' : require('./array/pick'), - 'pluck' : require('./array/pluck'), - 'range' : require('./array/range'), - 'reduce' : require('./array/reduce'), - 'reduceRight' : require('./array/reduceRight'), - 'reject' : require('./array/reject'), - 'remove' : require('./array/remove'), - 'removeAll' : require('./array/removeAll'), - 'repeat' : require('./array/repeat'), - 'reverse' : require('./array/reverse'), - 'shuffle' : require('./array/shuffle'), - 'slice' : require('./array/slice'), - 'some' : require('./array/some'), - 'sort' : require('./array/sort'), - 'sortBy' : require('./array/sortBy'), - 'split' : require('./array/split'), - 'take' : require('./array/take'), - 'toLookup' : require('./array/toLookup'), - 'union' : require('./array/union'), - 'unique' : require('./array/unique'), - 'xor' : require('./array/xor'), - 'zip' : require('./array/zip') -}; - -}); diff --git a/node_modules/mout/src/array/append.js b/node_modules/mout/src/array/append.js deleted file mode 100644 index 549d875..0000000 --- a/node_modules/mout/src/array/append.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function () { - - /** - * Appends an array to the end of another. - * The first array will be modified. - */ - function append(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var pad = arr1.length, - i = -1, - len = arr2.length; - while (++i < len) { - arr1[pad + i] = arr2[i]; - } - return arr1; - } - return append; -}); diff --git a/node_modules/mout/src/array/collect.js b/node_modules/mout/src/array/collect.js deleted file mode 100644 index 8f60cda..0000000 --- a/node_modules/mout/src/array/collect.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./append', '../function/makeIterator_'], function (append, makeIterator) { - - /** - * Maps the items in the array and concatenates the result arrays. - */ - function collect(arr, callback, thisObj){ - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - var value = callback(arr[i], i, arr); - if (value != null) { - append(results, value); - } - } - - return results; - } - - return collect; - -}); diff --git a/node_modules/mout/src/array/combine.js b/node_modules/mout/src/array/combine.js deleted file mode 100644 index 22efb86..0000000 --- a/node_modules/mout/src/array/combine.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * Combines an array with all the items of another. - * Does not allow duplicates and is case and type sensitive. - */ - function combine(arr1, arr2) { - if (arr2 == null) { - return arr1; - } - - var i = -1, len = arr2.length; - while (++i < len) { - if (indexOf(arr1, arr2[i]) === -1) { - arr1.push(arr2[i]); - } - } - - return arr1; - } - return combine; -}); diff --git a/node_modules/mout/src/array/compact.js b/node_modules/mout/src/array/compact.js deleted file mode 100644 index 02a8109..0000000 --- a/node_modules/mout/src/array/compact.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./filter'], function (filter) { - - /** - * Remove all null/undefined items from array. - */ - function compact(arr) { - return filter(arr, function(val){ - return (val != null); - }); - } - - return compact; -}); diff --git a/node_modules/mout/src/array/contains.js b/node_modules/mout/src/array/contains.js deleted file mode 100644 index fca4f7c..0000000 --- a/node_modules/mout/src/array/contains.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./indexOf'], function (indexOf) { - - /** - * If array contains values. - */ - function contains(arr, val) { - return indexOf(arr, val) !== -1; - } - return contains; -}); diff --git a/node_modules/mout/src/array/difference.js b/node_modules/mout/src/array/difference.js deleted file mode 100644 index 0d52c25..0000000 --- a/node_modules/mout/src/array/difference.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./unique', './filter', './some', './contains', './slice'], function (unique, filter, some, contains, slice) { - - - /** - * Return a new Array with elements that aren't present in the other Arrays. - */ - function difference(arr) { - var arrs = slice(arguments, 1), - result = filter(unique(arr), function(needle){ - return !some(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return difference; - -}); diff --git a/node_modules/mout/src/array/equals.js b/node_modules/mout/src/array/equals.js deleted file mode 100644 index 0e3e148..0000000 --- a/node_modules/mout/src/array/equals.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/is', '../lang/isArray', './every'], function(is, isArray, every) { - - /** - * Compares if both arrays have the same elements - */ - function equals(a, b, callback){ - callback = callback || is; - - if (!isArray(a) || !isArray(b)) { - return callback(a, b); - } - - if (a.length !== b.length) { - return false; - } - - return every(a, makeCompare(callback), b); - } - - function makeCompare(callback) { - return function(value, i) { - return i in this && callback(value, this[i]); - }; - } - - return equals; - -}); diff --git a/node_modules/mout/src/array/every.js b/node_modules/mout/src/array/every.js deleted file mode 100644 index 78ba46d..0000000 --- a/node_modules/mout/src/array/every.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array every - */ - function every(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (!callback(arr[i], i, arr) ) { - result = false; - break; - } - } - - return result; - } - - return every; -}); diff --git a/node_modules/mout/src/array/filter.js b/node_modules/mout/src/array/filter.js deleted file mode 100644 index 38add18..0000000 --- a/node_modules/mout/src/array/filter.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array filter - */ - function filter(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return filter; - -}); diff --git a/node_modules/mout/src/array/find.js b/node_modules/mout/src/array/find.js deleted file mode 100644 index 3957dcd..0000000 --- a/node_modules/mout/src/array/find.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findIndex'], function (findIndex) { - - /** - * Returns first item that matches criteria - */ - function find(arr, iterator, thisObj){ - var idx = findIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return find; - -}); diff --git a/node_modules/mout/src/array/findIndex.js b/node_modules/mout/src/array/findIndex.js deleted file mode 100644 index 59dfeeb..0000000 --- a/node_modules/mout/src/array/findIndex.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the first item that matches criteria - */ - function findIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (iterator(arr[i], i, arr)) { - return i; - } - } - - return -1; - } - - return findIndex; -}); diff --git a/node_modules/mout/src/array/findLast.js b/node_modules/mout/src/array/findLast.js deleted file mode 100644 index 9308fa6..0000000 --- a/node_modules/mout/src/array/findLast.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./findLastIndex'], function (findLastIndex) { - - /** - * Returns last item that matches criteria - */ - function findLast(arr, iterator, thisObj){ - var idx = findLastIndex(arr, iterator, thisObj); - return idx >= 0? arr[idx] : void(0); - } - - return findLast; - -}); diff --git a/node_modules/mout/src/array/findLastIndex.js b/node_modules/mout/src/array/findLastIndex.js deleted file mode 100644 index 45f266e..0000000 --- a/node_modules/mout/src/array/findLastIndex.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Returns the index of the last item that matches criteria - */ - function findLastIndex(arr, iterator, thisObj){ - iterator = makeIterator(iterator, thisObj); - if (arr == null) { - return -1; - } - - var n = arr.length; - while (--n >= 0) { - if (iterator(arr[n], n, arr)) { - return n; - } - } - - return -1; - } - - return findLastIndex; - -}); diff --git a/node_modules/mout/src/array/flatten.js b/node_modules/mout/src/array/flatten.js deleted file mode 100644 index 3035b33..0000000 --- a/node_modules/mout/src/array/flatten.js +++ /dev/null @@ -1,44 +0,0 @@ -define(['../lang/isArray', './append'], function (isArray, append) { - - /* - * Helper function to flatten to a destination array. - * Used to remove the need to create intermediate arrays while flattening. - */ - function flattenTo(arr, result, level) { - if (level === 0) { - append(result, arr); - return result; - } - - var value, - i = -1, - len = arr.length; - while (++i < len) { - value = arr[i]; - if (isArray(value)) { - flattenTo(value, result, level - 1); - } else { - result.push(value); - } - } - return result; - } - - /** - * Recursively flattens an array. - * A new array containing all the elements is returned. - * If level is specified, it will only flatten up to that level. - */ - function flatten(arr, level) { - if (arr == null) { - return []; - } - - level = level == null ? -1 : level; - return flattenTo(arr, [], level); - } - - return flatten; - -}); - diff --git a/node_modules/mout/src/array/forEach.js b/node_modules/mout/src/array/forEach.js deleted file mode 100644 index 0e04586..0000000 --- a/node_modules/mout/src/array/forEach.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Array forEach - */ - function forEach(arr, callback, thisObj) { - if (arr == null) { - return; - } - var i = -1, - len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback.call(thisObj, arr[i], i, arr) === false ) { - break; - } - } - } - - return forEach; - -}); diff --git a/node_modules/mout/src/array/groupBy.js b/node_modules/mout/src/array/groupBy.js deleted file mode 100644 index 47906be..0000000 --- a/node_modules/mout/src/array/groupBy.js +++ /dev/null @@ -1,32 +0,0 @@ -define([ - '../array/forEach', - '../function/identity', - '../function/makeIterator_' -], function(forEach, identity, makeIterator) { - - /** - * Bucket the array values. - */ - function groupBy(arr, categorize, thisObj) { - if (categorize) { - categorize = makeIterator(categorize, thisObj); - } else { - // Default to identity function. - categorize = identity; - } - - var buckets = {}; - forEach(arr, function(element) { - var bucket = categorize(element); - if (!(bucket in buckets)) { - buckets[bucket] = []; - } - - buckets[bucket].push(element); - }); - - return buckets; - } - - return groupBy; -}); diff --git a/node_modules/mout/src/array/indexOf.js b/node_modules/mout/src/array/indexOf.js deleted file mode 100644 index 0e75f99..0000000 --- a/node_modules/mout/src/array/indexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array.indexOf - */ - function indexOf(arr, item, fromIndex) { - fromIndex = fromIndex || 0; - if (arr == null) { - return -1; - } - - var len = arr.length, - i = fromIndex < 0 ? len + fromIndex : fromIndex; - while (i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[i] === item) { - return i; - } - - i++; - } - - return -1; - } - - return indexOf; -}); diff --git a/node_modules/mout/src/array/indicesOf.js b/node_modules/mout/src/array/indicesOf.js deleted file mode 100644 index c17006b..0000000 --- a/node_modules/mout/src/array/indicesOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array indicesOf - */ - function indicesOf(arr, item, fromIndex) { - var results = []; - if (arr == null) { - return results; - } - - fromIndex = typeof fromIndex === 'number' ? fromIndex : 0; - - var length = arr.length; - var cursor = fromIndex >= 0 ? fromIndex : length + fromIndex; - - while (cursor < length) { - if (arr[cursor] === item) { - results.push(cursor); - } - cursor++; - } - - return results; - } - - return indicesOf; -}); diff --git a/node_modules/mout/src/array/insert.js b/node_modules/mout/src/array/insert.js deleted file mode 100644 index a3d7196..0000000 --- a/node_modules/mout/src/array/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./difference', './slice'], function (difference, slice) { - - /** - * Insert item into array if not already present. - */ - function insert(arr, rest_items) { - var diff = difference(slice(arguments, 1), arr); - if (diff.length) { - Array.prototype.push.apply(arr, diff); - } - return arr.length; - } - return insert; -}); diff --git a/node_modules/mout/src/array/intersection.js b/node_modules/mout/src/array/intersection.js deleted file mode 100644 index 8d0baa4..0000000 --- a/node_modules/mout/src/array/intersection.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./unique', './filter', './every', './contains', './slice'], function (unique, filter, every, contains, slice) { - - - /** - * Return a new Array with elements common to all Arrays. - * - based on underscore.js implementation - */ - function intersection(arr) { - var arrs = slice(arguments, 1), - result = filter(unique(arr), function(needle){ - return every(arrs, function(haystack){ - return contains(haystack, needle); - }); - }); - return result; - } - - return intersection; - -}); diff --git a/node_modules/mout/src/array/invoke.js b/node_modules/mout/src/array/invoke.js deleted file mode 100644 index 860d72a..0000000 --- a/node_modules/mout/src/array/invoke.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./slice'], function (slice) { - - /** - * Call `methodName` on each item of the array passing custom arguments if - * needed. - */ - function invoke(arr, methodName, var_args){ - if (arr == null) { - return arr; - } - - var args = slice(arguments, 2); - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - value[methodName].apply(value, args); - } - - return arr; - } - - return invoke; -}); diff --git a/node_modules/mout/src/array/join.js b/node_modules/mout/src/array/join.js deleted file mode 100644 index 2c618d2..0000000 --- a/node_modules/mout/src/array/join.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./filter'], function(filter) { - - function isValidString(val) { - return (val != null && val !== ''); - } - - /** - * Joins strings with the specified separator inserted between each value. - * Null values and empty strings will be excluded. - */ - function join(items, separator) { - separator = separator || ''; - return filter(items, isValidString).join(separator); - } - - return join; -}); diff --git a/node_modules/mout/src/array/last.js b/node_modules/mout/src/array/last.js deleted file mode 100644 index 2c85296..0000000 --- a/node_modules/mout/src/array/last.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function () { - - /** - * Returns last element of array. - */ - function last(arr){ - if (arr == null || arr.length < 1) { - return undefined; - } - - return arr[arr.length - 1]; - } - - return last; - -}); diff --git a/node_modules/mout/src/array/lastIndexOf.js b/node_modules/mout/src/array/lastIndexOf.js deleted file mode 100644 index 931235f..0000000 --- a/node_modules/mout/src/array/lastIndexOf.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Array lastIndexOf - */ - function lastIndexOf(arr, item, fromIndex) { - if (arr == null) { - return -1; - } - - var len = arr.length; - fromIndex = (fromIndex == null || fromIndex >= len)? len - 1 : fromIndex; - fromIndex = (fromIndex < 0)? len + fromIndex : fromIndex; - - while (fromIndex >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if (arr[fromIndex] === item) { - return fromIndex; - } - fromIndex--; - } - - return -1; - } - - return lastIndexOf; -}); diff --git a/node_modules/mout/src/array/map.js b/node_modules/mout/src/array/map.js deleted file mode 100644 index 14377ab..0000000 --- a/node_modules/mout/src/array/map.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array map - */ - function map(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null){ - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - results[i] = callback(arr[i], i, arr); - } - - return results; - } - - return map; -}); diff --git a/node_modules/mout/src/array/max.js b/node_modules/mout/src/array/max.js deleted file mode 100644 index d0628f0..0000000 --- a/node_modules/mout/src/array/max.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Return maximum value inside array - */ - function max(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return Infinity; - } else if (arr.length && !iterator) { - return Math.max.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = -Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp > compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return max; - -}); diff --git a/node_modules/mout/src/array/min.js b/node_modules/mout/src/array/min.js deleted file mode 100644 index 07a0c71..0000000 --- a/node_modules/mout/src/array/min.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Return minimum value inside array - */ - function min(arr, iterator, thisObj){ - if (arr == null || !arr.length) { - return -Infinity; - } else if (arr.length && !iterator) { - return Math.min.apply(Math, arr); - } else { - iterator = makeIterator(iterator, thisObj); - var result, - compare = Infinity, - value, - temp; - - var i = -1, len = arr.length; - while (++i < len) { - value = arr[i]; - temp = iterator(value, i, arr); - if (temp < compare) { - compare = temp; - result = value; - } - } - - return result; - } - } - - return min; - -}); diff --git a/node_modules/mout/src/array/pick.js b/node_modules/mout/src/array/pick.js deleted file mode 100644 index dc5b222..0000000 --- a/node_modules/mout/src/array/pick.js +++ /dev/null @@ -1,31 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Remove random item(s) from the Array and return it. - * Returns an Array of items if [nItems] is provided or a single item if - * it isn't specified. - */ - function pick(arr, nItems){ - if (nItems != null) { - var result = []; - if (nItems > 0 && arr && arr.length) { - nItems = nItems > arr.length? arr.length : nItems; - while (nItems--) { - result.push( pickOne(arr) ); - } - } - return result; - } - return (arr && arr.length)? pickOne(arr) : void(0); - } - - - function pickOne(arr){ - var idx = randInt(0, arr.length - 1); - return arr.splice(idx, 1)[0]; - } - - - return pick; - -}); diff --git a/node_modules/mout/src/array/pluck.js b/node_modules/mout/src/array/pluck.js deleted file mode 100644 index c908856..0000000 --- a/node_modules/mout/src/array/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(arr, propName){ - return map(arr, propName); - } - - return pluck; - -}); diff --git a/node_modules/mout/src/array/range.js b/node_modules/mout/src/array/range.js deleted file mode 100644 index 148ebf9..0000000 --- a/node_modules/mout/src/array/range.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../math/countSteps'], function (countSteps) { - - /** - * Returns an Array of numbers inside range. - */ - function range(start, stop, step) { - if (stop == null) { - stop = start; - start = 0; - } - step = step || 1; - - var result = [], - nSteps = countSteps(stop - start, step), - i = start; - - while (i <= stop) { - result.push(i); - i += step; - } - - return result; - } - - return range; - -}); diff --git a/node_modules/mout/src/array/reduce.js b/node_modules/mout/src/array/reduce.js deleted file mode 100644 index 5f97ae8..0000000 --- a/node_modules/mout/src/array/reduce.js +++ /dev/null @@ -1,33 +0,0 @@ -define(function () { - - /** - * Array reduce - */ - function reduce(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2, - result = initVal; - - if (arr == null || !arr.length) { - if (!hasInit) { - throw new Error('reduce of empty array with no initial value'); - } else { - return initVal; - } - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!hasInit) { - result = arr[i]; - hasInit = true; - } else { - result = fn(result, arr[i], i, arr); - } - } - - return result; - } - - return reduce; -}); diff --git a/node_modules/mout/src/array/reduceRight.js b/node_modules/mout/src/array/reduceRight.js deleted file mode 100644 index ddae0e7..0000000 --- a/node_modules/mout/src/array/reduceRight.js +++ /dev/null @@ -1,34 +0,0 @@ -define(function () { - - /** - * Array reduceRight - */ - function reduceRight(arr, fn, initVal) { - // check for args.length since initVal might be "undefined" see #gh-57 - var hasInit = arguments.length > 2; - - if (arr == null || !arr.length) { - if (hasInit) { - return initVal; - } else { - throw new Error('reduce of empty array with no initial value'); - } - } - - var i = arr.length, result = initVal, value; - while (--i >= 0) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - value = arr[i]; - if (!hasInit) { - result = value; - hasInit = true; - } else { - result = fn(result, value, i, arr); - } - } - return result; - } - - return reduceRight; -}); diff --git a/node_modules/mout/src/array/reject.js b/node_modules/mout/src/array/reject.js deleted file mode 100644 index cad4038..0000000 --- a/node_modules/mout/src/array/reject.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['../function/makeIterator_'], function(makeIterator) { - - /** - * Array reject - */ - function reject(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var results = []; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length, value; - while (++i < len) { - value = arr[i]; - if (!callback(value, i, arr)) { - results.push(value); - } - } - - return results; - } - - return reject; -}); diff --git a/node_modules/mout/src/array/remove.js b/node_modules/mout/src/array/remove.js deleted file mode 100644 index dec9134..0000000 --- a/node_modules/mout/src/array/remove.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove a single item from the array. - * (it won't remove duplicates, just a single item) - */ - function remove(arr, item){ - var idx = indexOf(arr, item); - if (idx !== -1) arr.splice(idx, 1); - } - - return remove; -}); diff --git a/node_modules/mout/src/array/removeAll.js b/node_modules/mout/src/array/removeAll.js deleted file mode 100644 index e81022b..0000000 --- a/node_modules/mout/src/array/removeAll.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./indexOf'], function(indexOf){ - - /** - * Remove all instances of an item from array. - */ - function removeAll(arr, item){ - var idx = indexOf(arr, item); - while (idx !== -1) { - arr.splice(idx, 1); - idx = indexOf(arr, item, idx); - } - } - - return removeAll; -}); diff --git a/node_modules/mout/src/array/repeat.js b/node_modules/mout/src/array/repeat.js deleted file mode 100644 index 5ac3c3e..0000000 --- a/node_modules/mout/src/array/repeat.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function() { - - /** - * Create an array of size N and fill with a value. - * This function will throw an exception in case - * you pass a negative number. - */ - function repeat(n, value) { - var arr = new Array(n); - return arr.fill(value); - } - - return repeat; -}); diff --git a/node_modules/mout/src/array/reverse.js b/node_modules/mout/src/array/reverse.js deleted file mode 100644 index b970427..0000000 --- a/node_modules/mout/src/array/reverse.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a copy of the array in reversed order. - */ - function reverse(array) { - var copy = array.slice(); - copy.reverse(); - return copy; - } - - return reverse; - -}); diff --git a/node_modules/mout/src/array/shuffle.js b/node_modules/mout/src/array/shuffle.js deleted file mode 100644 index 1965b66..0000000 --- a/node_modules/mout/src/array/shuffle.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../random/randInt'], function (randInt) { - - /** - * Shuffle array items. - */ - function shuffle(arr) { - var results = [], - rnd; - if (arr == null) { - return results; - } - - var i = -1, len = arr.length; - while (++i < len) { - if (!i) { - results[0] = arr[0]; - } else { - rnd = randInt(0, i); - results[i] = results[rnd]; - results[rnd] = arr[i]; - } - } - - return results; - } - - return shuffle; -}); diff --git a/node_modules/mout/src/array/slice.js b/node_modules/mout/src/array/slice.js deleted file mode 100644 index 994caba..0000000 --- a/node_modules/mout/src/array/slice.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function () { - - /** - * Create slice of source array or array-like object - */ - function slice(arr, start, end){ - var len = arr.length; - - if (start == null) { - start = 0; - } else if (start < 0) { - start = Math.max(len + start, 0); - } else { - start = Math.min(start, len); - } - - if (end == null) { - end = len; - } else if (end < 0) { - end = Math.max(len + end, 0); - } else { - end = Math.min(end, len); - } - - var result = []; - while (start < end) { - result.push(arr[start++]); - } - - return result; - } - - return slice; - -}); diff --git a/node_modules/mout/src/array/some.js b/node_modules/mout/src/array/some.js deleted file mode 100644 index e46a978..0000000 --- a/node_modules/mout/src/array/some.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../function/makeIterator_'], function (makeIterator) { - - /** - * Array some - */ - function some(arr, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length; - while (++i < len) { - // we iterate over sparse items since there is no way to make it - // work properly on IE 7-8. see #64 - if ( callback(arr[i], i, arr) ) { - result = true; - break; - } - } - - return result; - } - - return some; -}); diff --git a/node_modules/mout/src/array/sort.js b/node_modules/mout/src/array/sort.js deleted file mode 100644 index 4c19404..0000000 --- a/node_modules/mout/src/array/sort.js +++ /dev/null @@ -1,55 +0,0 @@ -define(function () { - - /** - * Merge sort (http://en.wikipedia.org/wiki/Merge_sort) - */ - function mergeSort(arr, compareFn) { - if (arr == null) { - return []; - } else if (arr.length < 2) { - return arr; - } - - if (compareFn == null) { - compareFn = defaultCompare; - } - - var mid, left, right; - - mid = ~~(arr.length / 2); - left = mergeSort( arr.slice(0, mid), compareFn ); - right = mergeSort( arr.slice(mid, arr.length), compareFn ); - - return merge(left, right, compareFn); - } - - function defaultCompare(a, b) { - return a < b ? -1 : (a > b? 1 : 0); - } - - function merge(left, right, compareFn) { - var result = []; - - while (left.length && right.length) { - if (compareFn(left[0], right[0]) <= 0) { - // if 0 it should preserve same order (stable) - result.push(left.shift()); - } else { - result.push(right.shift()); - } - } - - if (left.length) { - result.push.apply(result, left); - } - - if (right.length) { - result.push.apply(result, right); - } - - return result; - } - - return mergeSort; - -}); diff --git a/node_modules/mout/src/array/sortBy.js b/node_modules/mout/src/array/sortBy.js deleted file mode 100644 index 2797194..0000000 --- a/node_modules/mout/src/array/sortBy.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./sort', '../function/makeIterator_'], function (sort, makeIterator) { - - /* - * Sort array by the result of the callback - */ - function sortBy(arr, callback, context){ - callback = makeIterator(callback, context); - - return sort(arr, function(a, b) { - a = callback(a); - b = callback(b); - return (a < b) ? -1 : ((a > b) ? 1 : 0); - }); - } - - return sortBy; - -}); diff --git a/node_modules/mout/src/array/split.js b/node_modules/mout/src/array/split.js deleted file mode 100644 index a17275e..0000000 --- a/node_modules/mout/src/array/split.js +++ /dev/null @@ -1,35 +0,0 @@ -define(function() { - - /** - * Split array into a fixed number of segments. - */ - function split(array, segments) { - segments = segments || 2; - var results = []; - if (array == null) { - return results; - } - - var minLength = Math.floor(array.length / segments), - remainder = array.length % segments, - i = 0, - len = array.length, - segmentIndex = 0, - segmentLength; - - while (i < len) { - segmentLength = minLength; - if (segmentIndex < remainder) { - segmentLength++; - } - - results.push(array.slice(i, i + segmentLength)); - - segmentIndex++; - i += segmentLength; - } - - return results; - } - return split; -}); diff --git a/node_modules/mout/src/array/take.js b/node_modules/mout/src/array/take.js deleted file mode 100644 index 74b8241..0000000 --- a/node_modules/mout/src/array/take.js +++ /dev/null @@ -1,24 +0,0 @@ -define(function () { - - /** - * Iterates over a callback a set amount of times - * returning the results - */ - function take(n, callback, thisObj){ - var i = -1; - var arr = []; - if( !thisObj ){ - while(++i < n){ - arr[i] = callback(i, n); - } - } else { - while(++i < n){ - arr[i] = callback.call(thisObj, i, n); - } - } - return arr; - } - - return take; - -}); diff --git a/node_modules/mout/src/array/toLookup.js b/node_modules/mout/src/array/toLookup.js deleted file mode 100644 index aac8fd1..0000000 --- a/node_modules/mout/src/array/toLookup.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - /** - * Creates an object that holds a lookup for the objects in the array. - */ - function toLookup(arr, key) { - var result = {}; - if (arr == null) { - return result; - } - - var i = -1, len = arr.length, value; - if (isFunction(key)) { - while (++i < len) { - value = arr[i]; - result[key(value)] = value; - } - } else { - while (++i < len) { - value = arr[i]; - result[value[key]] = value; - } - } - - return result; - } - return toLookup; -}); diff --git a/node_modules/mout/src/array/union.js b/node_modules/mout/src/array/union.js deleted file mode 100644 index 5f9922e..0000000 --- a/node_modules/mout/src/array/union.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./unique', './append'], function (unique, append) { - - /** - * Concat multiple arrays and remove duplicates - */ - function union(arrs) { - var results = []; - var i = -1, len = arguments.length; - while (++i < len) { - append(results, arguments[i]); - } - - return unique(results); - } - - return union; - -}); diff --git a/node_modules/mout/src/array/unique.js b/node_modules/mout/src/array/unique.js deleted file mode 100644 index c4a011a..0000000 --- a/node_modules/mout/src/array/unique.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['./filter'], function(filter){ - - /** - * @return {array} Array of unique items - */ - function unique(arr, compare){ - compare = compare || isEqual; - return filter(arr, function(item, i, arr){ - var n = arr.length; - while (++i < n) { - if ( compare(item, arr[i]) ) { - return false; - } - } - return true; - }); - } - - function isEqual(a, b){ - return a === b; - } - - return unique; -}); - diff --git a/node_modules/mout/src/array/xor.js b/node_modules/mout/src/array/xor.js deleted file mode 100644 index 7df89d9..0000000 --- a/node_modules/mout/src/array/xor.js +++ /dev/null @@ -1,24 +0,0 @@ -define(['./unique', './filter', './contains'], function (unique, filter, contains) { - - - /** - * Exclusive OR. Returns items that are present in a single array. - * - like ptyhon's `symmetric_difference` - */ - function xor(arr1, arr2) { - arr1 = unique(arr1); - arr2 = unique(arr2); - - var a1 = filter(arr1, function(item){ - return !contains(arr2, item); - }), - a2 = filter(arr2, function(item){ - return !contains(arr1, item); - }); - - return a1.concat(a2); - } - - return xor; - -}); diff --git a/node_modules/mout/src/array/zip.js b/node_modules/mout/src/array/zip.js deleted file mode 100644 index bd0dbb8..0000000 --- a/node_modules/mout/src/array/zip.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['./max', './map'], function (max, map) { - - function getLength(arr) { - return arr == null ? 0 : arr.length; - } - - /** - * Merges together the values of each of the arrays with the values at the - * corresponding position. - */ - function zip(arr){ - var len = arr ? max(map(arguments, getLength)) : 0, - results = [], - i = -1; - while (++i < len) { - // jshint loopfunc: true - results.push(map(arguments, function(item) { - return item == null ? undefined : item[i]; - })); - } - - return results; - } - - return zip; - -}); diff --git a/node_modules/mout/src/collection.js b/node_modules/mout/src/collection.js deleted file mode 100644 index 386e6da..0000000 --- a/node_modules/mout/src/collection.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./collection/contains'), - 'every' : require('./collection/every'), - 'filter' : require('./collection/filter'), - 'find' : require('./collection/find'), - 'forEach' : require('./collection/forEach'), - 'make_' : require('./collection/make_'), - 'map' : require('./collection/map'), - 'max' : require('./collection/max'), - 'min' : require('./collection/min'), - 'pluck' : require('./collection/pluck'), - 'reduce' : require('./collection/reduce'), - 'reject' : require('./collection/reject'), - 'size' : require('./collection/size'), - 'some' : require('./collection/some') -}; - -}); diff --git a/node_modules/mout/src/collection/contains.js b/node_modules/mout/src/collection/contains.js deleted file mode 100644 index 192167e..0000000 --- a/node_modules/mout/src/collection/contains.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/contains', '../object/contains'], function (make, arrContains, objContains) { - - /** - */ - return make(arrContains, objContains); - -}); diff --git a/node_modules/mout/src/collection/every.js b/node_modules/mout/src/collection/every.js deleted file mode 100644 index 6317f50..0000000 --- a/node_modules/mout/src/collection/every.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/every', '../object/every'], function (make, arrEvery, objEvery) { - - /** - */ - return make(arrEvery, objEvery); - -}); diff --git a/node_modules/mout/src/collection/filter.js b/node_modules/mout/src/collection/filter.js deleted file mode 100644 index 4e7fadc..0000000 --- a/node_modules/mout/src/collection/filter.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forEach', '../function/makeIterator_'], function (forEach, makeIterator) { - - /** - * filter collection values, returns array. - */ - function filter(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - var results = []; - if (!list) { - return results; - } - forEach(list, function(value, index, list) { - if (iterator(value, index, list)) { - results[results.length] = value; - } - }); - return results; - } - - return filter; - -}); diff --git a/node_modules/mout/src/collection/find.js b/node_modules/mout/src/collection/find.js deleted file mode 100644 index 681f941..0000000 --- a/node_modules/mout/src/collection/find.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/find', '../object/find'], function(make, arrFind, objFind) { - - /** - * Find value that returns true on iterator check. - */ - return make(arrFind, objFind); - -}); diff --git a/node_modules/mout/src/collection/forEach.js b/node_modules/mout/src/collection/forEach.js deleted file mode 100644 index 3b39d3e..0000000 --- a/node_modules/mout/src/collection/forEach.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/forEach', '../object/forOwn'], function (make, arrForEach, objForEach) { - - /** - */ - return make(arrForEach, objForEach); - -}); diff --git a/node_modules/mout/src/collection/make_.js b/node_modules/mout/src/collection/make_.js deleted file mode 100644 index 290a651..0000000 --- a/node_modules/mout/src/collection/make_.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/slice'], function(slice){ - - /** - * internal method used to create other collection modules. - */ - function makeCollectionMethod(arrMethod, objMethod, defaultReturn) { - return function(){ - var args = slice(arguments); - if (args[0] == null) { - return defaultReturn; - } - // array-like is treated as array - return (typeof args[0].length === 'number')? arrMethod.apply(null, args) : objMethod.apply(null, args); - }; - } - - return makeCollectionMethod; - -}); diff --git a/node_modules/mout/src/collection/map.js b/node_modules/mout/src/collection/map.js deleted file mode 100644 index 96e2498..0000000 --- a/node_modules/mout/src/collection/map.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isObject', '../object/values', '../array/map', '../function/makeIterator_'], function (isObject, values, arrMap, makeIterator) { - - /** - * Map collection values, returns Array. - */ - function map(list, callback, thisObj) { - callback = makeIterator(callback, thisObj); - // list.length to check array-like object, if not array-like - // we simply map all the object values - if( isObject(list) && list.length == null ){ - list = values(list); - } - return arrMap(list, function (val, key, list) { - return callback(val, key, list); - }); - } - - return map; - -}); diff --git a/node_modules/mout/src/collection/max.js b/node_modules/mout/src/collection/max.js deleted file mode 100644 index de9a6da..0000000 --- a/node_modules/mout/src/collection/max.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/max', '../object/max'], function (make, arrMax, objMax) { - - /** - * Get maximum value inside collection - */ - return make(arrMax, objMax); - -}); diff --git a/node_modules/mout/src/collection/min.js b/node_modules/mout/src/collection/min.js deleted file mode 100644 index f0c239a..0000000 --- a/node_modules/mout/src/collection/min.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./make_', '../array/min', '../object/min'], function (make, arrMin, objMin) { - - /** - * Get minimum value inside collection. - */ - return make(arrMin, objMin); - -}); diff --git a/node_modules/mout/src/collection/pluck.js b/node_modules/mout/src/collection/pluck.js deleted file mode 100644 index ef784a7..0000000 --- a/node_modules/mout/src/collection/pluck.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./map'], function (map) { - - /** - * Extract a list of property values. - */ - function pluck(list, key) { - return map(list, function(value) { - return value[key]; - }); - } - - return pluck; - -}); diff --git a/node_modules/mout/src/collection/reduce.js b/node_modules/mout/src/collection/reduce.js deleted file mode 100644 index bd05d43..0000000 --- a/node_modules/mout/src/collection/reduce.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/reduce', '../object/reduce'], function (make, arrReduce, objReduce) { - - /** - */ - return make(arrReduce, objReduce); - -}); diff --git a/node_modules/mout/src/collection/reject.js b/node_modules/mout/src/collection/reject.js deleted file mode 100644 index 581adfd..0000000 --- a/node_modules/mout/src/collection/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Inverse or collection/filter - */ - function reject(list, iterator, thisObj) { - iterator = makeIterator(iterator, thisObj); - return filter(list, function(value, index, list) { - return !iterator(value, index, list); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/mout/src/collection/size.js b/node_modules/mout/src/collection/size.js deleted file mode 100644 index 4e5ab41..0000000 --- a/node_modules/mout/src/collection/size.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/isArray', '../object/size'], function (isArray, objSize) { - - /** - * Get collection size - */ - function size(list) { - if (!list) { - return 0; - } - if (isArray(list)) { - return list.length; - } - return objSize(list); - } - - return size; - -}); diff --git a/node_modules/mout/src/collection/some.js b/node_modules/mout/src/collection/some.js deleted file mode 100644 index c0aebee..0000000 --- a/node_modules/mout/src/collection/some.js +++ /dev/null @@ -1,7 +0,0 @@ -define(['./make_', '../array/some', '../object/some'], function (make, arrSome, objSome) { - - /** - */ - return make(arrSome, objSome); - -}); diff --git a/node_modules/mout/src/date.js b/node_modules/mout/src/date.js deleted file mode 100644 index b3038ee..0000000 --- a/node_modules/mout/src/date.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'dayOfTheYear' : require('./date/dayOfTheYear'), - 'diff' : require('./date/diff'), - 'i18n_' : require('./date/i18n_'), - 'isLeapYear' : require('./date/isLeapYear'), - 'isSame' : require('./date/isSame'), - 'parseIso' : require('./date/parseIso'), - 'quarter' : require('./date/quarter'), - 'startOf' : require('./date/startOf'), - 'strftime' : require('./date/strftime'), - 'timezoneAbbr' : require('./date/timezoneAbbr'), - 'timezoneOffset' : require('./date/timezoneOffset'), - 'totalDaysInMonth' : require('./date/totalDaysInMonth'), - 'totalDaysInYear' : require('./date/totalDaysInYear'), - 'weekOfTheYear' : require('./date/weekOfTheYear') -}; - -}); diff --git a/node_modules/mout/src/date/dayOfTheYear.js b/node_modules/mout/src/date/dayOfTheYear.js deleted file mode 100644 index dc77ae1..0000000 --- a/node_modules/mout/src/date/dayOfTheYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * return the day of the year (1..366) - */ - function dayOfTheYear(date){ - return (Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) - - Date.UTC(date.getFullYear(), 0, 1)) / 86400000 + 1; - } - - return dayOfTheYear; - -}); diff --git a/node_modules/mout/src/date/diff.js b/node_modules/mout/src/date/diff.js deleted file mode 100644 index 667165f..0000000 --- a/node_modules/mout/src/date/diff.js +++ /dev/null @@ -1,128 +0,0 @@ -define(['./totalDaysInMonth', './totalDaysInYear', '../time/convert'], function(totalDaysInMonth, totalDaysInYear, convert){ - - /** - * calculate the difference between dates (range) - */ - function diff(start, end, unitName){ - // sort the dates to make it easier to process (specially year/month) - if (start > end) { - var swap = start; - start = end; - end = swap; - } - - var output; - - if (unitName === 'month') { - output = getMonthsDiff(start, end); - } else if (unitName === 'year'){ - output = getYearsDiff(start, end); - } else if (unitName != null) { - if (unitName === 'day') { - // ignore timezone difference because of daylight savings time - start = toUtc(start); - end = toUtc(end); - } - output = convert(end - start, 'ms', unitName); - } else { - output = end - start; - } - - return output; - } - - - function toUtc(d){ - // we ignore timezone differences on purpose because of daylight - // savings time, otherwise it would return fractional days/weeks even - // if a full day elapsed. eg: - // Wed Feb 12 2014 00:00:00 GMT-0200 (BRST) - // Sun Feb 16 2014 00:00:00 GMT-0300 (BRT) - // diff should be 4 days and not 4.041666666666667 - return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), - d.getHours(), d.getMinutes(), d.getSeconds(), - d.getMilliseconds()); - } - - - function getMonthsDiff(start, end){ - return getElapsedMonths(start, end) + - getElapsedYears(start, end) * 12 + - getFractionalMonth(start, end); - } - - - function getYearsDiff(start, end){ - var elapsedYears = getElapsedYears(start, end); - return elapsedYears + getFractionalYear(start, end, elapsedYears); - } - - - function getElapsedMonths(start, end){ - var monthDiff = end.getMonth() - start.getMonth(); - if (monthDiff < 0) { - monthDiff += 12; - } - // less than a full month - if (start.getDate() > end.getDate()) { - monthDiff -= 1; - } - return monthDiff; - } - - - function getElapsedYears(start, end){ - var yearDiff = end.getFullYear() - start.getFullYear(); - // less than a full year - if (start.getMonth() > end.getMonth()) { - yearDiff -= 1; - } - return yearDiff; - } - - - function getFractionalMonth(start, end){ - var fractionalDiff = 0; - var startDay = start.getDate(); - var endDay = end.getDate(); - - if (startDay !== endDay) { - var startTotalDays = totalDaysInMonth(start); - var endTotalDays = totalDaysInMonth(end); - var totalDays; - var daysElapsed; - - if (startDay > endDay) { - // eg: Jan 29 - Feb 27 (29 days elapsed but not a full month) - var baseDay = startTotalDays - startDay; - daysElapsed = endDay + baseDay; - // total days should be relative to 1st day of next month if - // startDay > endTotalDays - totalDays = (startDay > endTotalDays)? - endTotalDays + baseDay + 1 : startDay + baseDay; - } else { - // fractional is only based on endMonth eg: Jan 12 - Feb 18 - // (6 fractional days, 28 days until next full month) - daysElapsed = endDay - startDay; - totalDays = endTotalDays; - } - - fractionalDiff = daysElapsed / totalDays; - } - - return fractionalDiff; - } - - - function getFractionalYear(start, end, elapsedYears){ - var base = elapsedYears? - new Date(end.getFullYear(), start.getMonth(), start.getDate()) : - start; - var elapsedDays = diff(base, end, 'day'); - return elapsedDays / totalDaysInYear(end); - } - - - return diff; - -}); diff --git a/node_modules/mout/src/date/i18n/de-DE.js b/node_modules/mout/src/date/i18n/de-DE.js deleted file mode 100644 index 46f5c6a..0000000 --- a/node_modules/mout/src/date/i18n/de-DE.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // de-DE (German) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Januar", - "Februar", - "März", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember" - ], - - "months_abbr" : [ - "Jan", - "Febr", - "März", - "Apr", - "Mai", - "Juni", - "Juli", - "Aug", - "Sept", - "Okt", - "Nov", - "Dez" - ], - - "days" : [ - "Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag" - ], - - "days_abbr" : [ - "So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa" - ] - }; -}); diff --git a/node_modules/mout/src/date/i18n/en-US.js b/node_modules/mout/src/date/i18n/en-US.js deleted file mode 100644 index 5e640c2..0000000 --- a/node_modules/mout/src/date/i18n/en-US.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // en-US (English, United States) - return { - "am" : "AM", - "pm" : "PM", - - "x": "%m/%d/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %I:%M:%S %p %Z", - - "months" : [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ], - - "months_abbr" : [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - - "days" : [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ], - - "days_abbr" : [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat" - ] - }; -}); diff --git a/node_modules/mout/src/date/i18n/pt-BR.js b/node_modules/mout/src/date/i18n/pt-BR.js deleted file mode 100644 index 47256dd..0000000 --- a/node_modules/mout/src/date/i18n/pt-BR.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // pt-BR (Brazillian Portuguese) - return { - "am" : "", - "pm" : "", - - "x": "%d/%m/%y", - "X": "%H:%M:%S", - "c": "%a %d %b %Y %H:%M:%S %Z", - - "months" : [ - "Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro" - ], - - "months_abbr" : [ - "Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez" - ], - - "days" : [ - "Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sábado" - ], - - "days_abbr" : [ - "Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sáb" - ] - }; -}); diff --git a/node_modules/mout/src/date/i18n/ru.js b/node_modules/mout/src/date/i18n/ru.js deleted file mode 100644 index 89f0d06..0000000 --- a/node_modules/mout/src/date/i18n/ru.js +++ /dev/null @@ -1,61 +0,0 @@ -define(function(){ - // ru (Russian) - return { - "am" : "", - "pm" : "", - - "x": "%d.%m.%Y", - "X": "%H:%M:%S", - "c": "%a, %e %b %Y г., %H:%M", - - "months" : [ - "Январь", - "Февраль", - "Март", - "Апрель", - "Май", - "Июнь", - "Июль", - "Август", - "Сентябрь", - "Октябрь", - "Ноябрь", - "Декабрь" - ], - - "months_abbr" : [ - "Янв.", - "Февр.", - "Март", - "Апр.", - "Май", - "Июнь", - "Июль", - "Авг.", - "Сент.", - "Окт.", - "Нояб.", - "Дек." - ], - - "days" : [ - "Воскресенье", - "Понедельник", - "Вторник", - "Среда", - "Четверг", - "Пятница", - "Суббота" - ], - - "days_abbr" : [ - "Вс", - "Пн", - "Вт", - "Ср", - "Чт", - "Пт", - "Сб" - ] - }; -}); diff --git a/node_modules/mout/src/date/i18n_.js b/node_modules/mout/src/date/i18n_.js deleted file mode 100644 index c04ce88..0000000 --- a/node_modules/mout/src/date/i18n_.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../object/mixIn', './i18n/en-US'], function(mixIn, enUS){ - - // we also use mixIn to make sure we don't affect the original locale - var activeLocale = mixIn({}, enUS, { - // we expose a "set" method to allow overriding the global locale - set : function(localeData){ - mixIn(activeLocale, localeData); - } - }); - - return activeLocale; - -}); diff --git a/node_modules/mout/src/date/isLeapYear.js b/node_modules/mout/src/date/isLeapYear.js deleted file mode 100644 index e400b43..0000000 --- a/node_modules/mout/src/date/isLeapYear.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/isDate'], function (isDate) { - - /** - * checks if it's a leap year - */ - function isLeapYear(fullYear){ - if (isDate(fullYear)) { - fullYear = fullYear.getFullYear(); - } - return fullYear % 400 === 0 || (fullYear % 100 !== 0 && fullYear % 4 === 0); - } - - return isLeapYear; - -}); diff --git a/node_modules/mout/src/date/isSame.js b/node_modules/mout/src/date/isSame.js deleted file mode 100644 index f30531f..0000000 --- a/node_modules/mout/src/date/isSame.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./startOf'], function (startOf) { - - /** - * Check if date is "same" with optional period - */ - function isSame(date1, date2, period){ - if (period) { - date1 = startOf(date1, period); - date2 = startOf(date2, period); - } - return Number(date1) === Number(date2); - } - - return isSame; - -}); diff --git a/node_modules/mout/src/date/parseIso.js b/node_modules/mout/src/date/parseIso.js deleted file mode 100644 index b21c879..0000000 --- a/node_modules/mout/src/date/parseIso.js +++ /dev/null @@ -1,146 +0,0 @@ -define(['../array/some'], function (some) { - - var datePatterns = [ - /^([0-9]{4})$/, // YYYY - /^([0-9]{4})-([0-9]{2})$/, // YYYY-MM (YYYYMM not allowed) - /^([0-9]{4})-?([0-9]{2})-?([0-9]{2})$/ // YYYY-MM-DD or YYYYMMDD - ]; - var ORD_DATE = /^([0-9]{4})-?([0-9]{3})$/; // YYYY-DDD - - var timePatterns = [ - /^([0-9]{2}(?:\.[0-9]*)?)$/, // HH.hh - /^([0-9]{2}):?([0-9]{2}(?:\.[0-9]*)?)$/, // HH:MM.mm - /^([0-9]{2}):?([0-9]{2}):?([0-9]{2}(\.[0-9]*)?)$/ // HH:MM:SS.ss - ]; - - var DATE_TIME = /^(.+)T(.+)$/; - var TIME_ZONE = /^(.+)([+\-])([0-9]{2}):?([0-9]{2})$/; - - function matchAll(str, patterns) { - var match; - var found = some(patterns, function(pattern) { - return !!(match = pattern.exec(str)); - }); - - return found ? match : null; - } - - function getDate(year, month, day) { - var date = new Date(Date.UTC(year, month, day)); - - // Explicitly set year to avoid Date.UTC making dates < 100 relative to - // 1900 - date.setUTCFullYear(year); - - var valid = - date.getUTCFullYear() === year && - date.getUTCMonth() === month && - date.getUTCDate() === day; - return valid ? +date : NaN; - } - - function parseOrdinalDate(str) { - var match = ORD_DATE.exec(str); - if (match ) { - var year = +match[1], - day = +match[2], - date = new Date(Date.UTC(year, 0, day)); - - if (date.getUTCFullYear() === year) { - return +date; - } - } - - return NaN; - } - - function parseDate(str) { - var match, year, month, day; - - match = matchAll(str, datePatterns); - if (match === null) { - // Ordinal dates are verified differently. - return parseOrdinalDate(str); - } - - year = (match[1] === void 0) ? 0 : +match[1]; - month = (match[2] === void 0) ? 0 : +match[2] - 1; - day = (match[3] === void 0) ? 1 : +match[3]; - - return getDate(year, month, day); - } - - function getTime(hr, min, sec) { - var valid = - (hr < 24 && hr >= 0 && - min < 60 && min >= 0 && - sec < 60 && min >= 0) || - (hr === 24 && min === 0 && sec === 0); - if (!valid) { - return NaN; - } - - return ((hr * 60 + min) * 60 + sec) * 1000; - } - - function parseOffset(str) { - var match; - if (str.charAt(str.length - 1) === 'Z') { - str = str.substring(0, str.length - 1); - } else { - match = TIME_ZONE.exec(str); - if (match) { - var hours = +match[3], - minutes = (match[4] === void 0) ? 0 : +match[4], - offset = getTime(hours, minutes, 0); - - if (match[2] === '-') { - offset *= -1; - } - - return { offset: offset, time: match[1] }; - } - } - - // No time zone specified, assume UTC - return { offset: 0, time: str }; - } - - function parseTime(str) { - var match; - var offset = parseOffset(str); - - str = offset.time; - offset = offset.offset; - if (isNaN(offset)) { - return NaN; - } - - match = matchAll(str, timePatterns); - if (match === null) { - return NaN; - } - - var hours = (match[1] === void 0) ? 0 : +match[1], - minutes = (match[2] === void 0) ? 0 : +match[2], - seconds = (match[3] === void 0) ? 0 : +match[3]; - - return getTime(hours, minutes, seconds) - offset; - } - - /** - * Parse an ISO8601 formatted date string, and return a Date object. - */ - function parseISO8601(str){ - var match = DATE_TIME.exec(str); - if (!match) { - // No time specified - return parseDate(str); - } - - return parseDate(match[1]) + parseTime(match[2]); - } - - return parseISO8601; - -}); diff --git a/node_modules/mout/src/date/quarter.js b/node_modules/mout/src/date/quarter.js deleted file mode 100644 index 62b9206..0000000 --- a/node_modules/mout/src/date/quarter.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function () { - - /** - * gets date quarter - */ - function quarter(date){ - var month = date.getMonth(); - if (month < 3) return 1; - if (month < 6) return 2; - if (month < 9) return 3; - return 4; - } - - return quarter; - -}); diff --git a/node_modules/mout/src/date/startOf.js b/node_modules/mout/src/date/startOf.js deleted file mode 100644 index 747f114..0000000 --- a/node_modules/mout/src/date/startOf.js +++ /dev/null @@ -1,54 +0,0 @@ -define(['../lang/clone'], function (clone) { - - /** - * get a new Date object representing start of period - */ - function startOf(date, period){ - date = clone(date); - - // intentionally removed "break" from switch since start of - // month/year/etc should also reset the following periods - switch (period) { - case 'year': - date.setMonth(0); - /* falls through */ - case 'month': - date.setDate(1); - /* falls through */ - case 'week': - case 'day': - date.setHours(0); - /* falls through */ - case 'hour': - date.setMinutes(0); - /* falls through */ - case 'minute': - date.setSeconds(0); - /* falls through */ - case 'second': - date.setMilliseconds(0); - break; - default: - throw new Error('"'+ period +'" is not a valid period'); - } - - // week is the only case that should reset the weekDay and maybe even - // overflow to previous month - if (period === 'week') { - var weekDay = date.getDay(); - var baseDate = date.getDate(); - if (weekDay) { - if (weekDay >= baseDate) { - //start of the week is on previous month - date.setDate(0); - } - date.setDate(date.getDate() - date.getDay()); - } - } - - return date; - } - - return startOf; - -}); diff --git a/node_modules/mout/src/date/strftime.js b/node_modules/mout/src/date/strftime.js deleted file mode 100644 index 9c09c69..0000000 --- a/node_modules/mout/src/date/strftime.js +++ /dev/null @@ -1,115 +0,0 @@ -define(['../number/pad', '../string/lpad', './i18n_', './dayOfTheYear', './timezoneOffset', './timezoneAbbr', './weekOfTheYear'], function (pad, lpad, i18n, dayOfTheYear, timezoneOffset, timezoneAbbr, weekOfTheYear) { - - var _combinations = { - 'D': '%m/%d/%y', - 'F': '%Y-%m-%d', - 'r': '%I:%M:%S %p', - 'R': '%H:%M', - 'T': '%H:%M:%S', - 'x': 'locale', - 'X': 'locale', - 'c': 'locale' - }; - - - /** - * format date based on strftime format - */ - function strftime(date, format, localeData){ - localeData = localeData || i18n; - var reToken = /%([a-z%])/gi; - - function makeIterator(fn) { - return function(match, token){ - return fn(date, token, localeData); - }; - } - - return format - .replace(reToken, makeIterator(expandCombinations)) - .replace(reToken, makeIterator(convertToken)); - } - - - function expandCombinations(date, token, l10n){ - if (token in _combinations) { - var expanded = _combinations[token]; - return expanded === 'locale'? l10n[token] : expanded; - } else { - return '%'+ token; - } - } - - - function convertToken(date, token, l10n){ - switch (token){ - case 'a': - return l10n.days_abbr[date.getDay()]; - case 'A': - return l10n.days[date.getDay()]; - case 'h': - case 'b': - return l10n.months_abbr[date.getMonth()]; - case 'B': - return l10n.months[date.getMonth()]; - case 'C': - return pad(Math.floor(date.getFullYear() / 100), 2); - case 'd': - return pad(date.getDate(), 2); - case 'e': - return pad(date.getDate(), 2, ' '); - case 'H': - return pad(date.getHours(), 2); - case 'I': - return pad(date.getHours() % 12, 2); - case 'j': - return pad(dayOfTheYear(date), 3); - case 'l': - return lpad(date.getHours() % 12, 2); - case 'L': - return pad(date.getMilliseconds(), 3); - case 'm': - return pad(date.getMonth() + 1, 2); - case 'M': - return pad(date.getMinutes(), 2); - case 'n': - return '\n'; - case 'p': - return date.getHours() >= 12? l10n.pm : l10n.am; - case 'P': - return convertToken(date, 'p', l10n).toLowerCase(); - case 's': - return date.getTime() / 1000; - case 'S': - return pad(date.getSeconds(), 2); - case 't': - return '\t'; - case 'u': - var day = date.getDay(); - return day === 0? 7 : day; - case 'U': - return pad(weekOfTheYear(date), 2); - case 'w': - return date.getDay(); - case 'W': - return pad(weekOfTheYear(date, 1), 2); - case 'y': - return pad(date.getFullYear() % 100, 2); - case 'Y': - return pad(date.getFullYear(), 4); - case 'z': - return timezoneOffset(date); - case 'Z': - return timezoneAbbr(date); - case '%': - return '%'; - default: - // keep unrecognized tokens - return '%'+ token; - } - } - - - return strftime; - -}); diff --git a/node_modules/mout/src/date/timezoneAbbr.js b/node_modules/mout/src/date/timezoneAbbr.js deleted file mode 100644 index 225a685..0000000 --- a/node_modules/mout/src/date/timezoneAbbr.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./timezoneOffset'], function(timezoneOffset) { - - /** - * Abbreviated time zone name or similar information. - */ - function timezoneAbbr(date){ - // Date.toString gives different results depending on the - // browser/system so we fallback to timezone offset - // chrome: 'Mon Apr 08 2013 09:02:04 GMT-0300 (BRT)' - // IE: 'Mon Apr 8 09:02:04 UTC-0300 2013' - var tz = /\(([A-Z]{3,4})\)/.exec(date.toString()); - return tz? tz[1] : timezoneOffset(date); - } - - return timezoneAbbr; - -}); diff --git a/node_modules/mout/src/date/timezoneOffset.js b/node_modules/mout/src/date/timezoneOffset.js deleted file mode 100644 index ca06705..0000000 --- a/node_modules/mout/src/date/timezoneOffset.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/pad'], function (pad) { - - /** - * time zone as hour and minute offset from UTC (e.g. +0900) - */ - function timezoneOffset(date){ - var offset = date.getTimezoneOffset(); - var abs = Math.abs(offset); - var h = pad(Math.floor(abs / 60), 2); - var m = pad(abs % 60, 2); - return (offset > 0? '-' : '+') + h + m; - } - - return timezoneOffset; - -}); diff --git a/node_modules/mout/src/date/totalDaysInMonth.js b/node_modules/mout/src/date/totalDaysInMonth.js deleted file mode 100644 index 9aaafd7..0000000 --- a/node_modules/mout/src/date/totalDaysInMonth.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['../lang/isDate', './isLeapYear'], function (isDate, isLeapYear) { - - var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - - /** - * returns the total amount of days in the month (considering leap years) - */ - function totalDaysInMonth(fullYear, monthIndex){ - if (isDate(fullYear)) { - monthIndex = fullYear.getMonth(); - } - - if (monthIndex === 1 && isLeapYear(fullYear)) { - return 29; - } else { - return DAYS_IN_MONTH[monthIndex]; - } - } - - return totalDaysInMonth; - -}); diff --git a/node_modules/mout/src/date/totalDaysInYear.js b/node_modules/mout/src/date/totalDaysInYear.js deleted file mode 100644 index e9036b4..0000000 --- a/node_modules/mout/src/date/totalDaysInYear.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./isLeapYear'], function (isLeapYear) { - - /** - * return the amount of days in the year following the gregorian calendar - * and leap years - */ - function totalDaysInYear(fullYear){ - return isLeapYear(fullYear)? 366 : 365; - } - - return totalDaysInYear; - -}); diff --git a/node_modules/mout/src/date/weekOfTheYear.js b/node_modules/mout/src/date/weekOfTheYear.js deleted file mode 100644 index 8dabc45..0000000 --- a/node_modules/mout/src/date/weekOfTheYear.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./dayOfTheYear'], function (dayOfTheYear) { - - /** - * Return the week of the year based on given firstDayOfWeek - */ - function weekOfTheYear(date, firstDayOfWeek){ - firstDayOfWeek = firstDayOfWeek == null? 0 : firstDayOfWeek; - var doy = dayOfTheYear(date); - var dow = (7 + date.getDay() - firstDayOfWeek) % 7; - var relativeWeekDay = 6 - firstDayOfWeek - dow; - return Math.floor((doy + relativeWeekDay) / 7); - } - - return weekOfTheYear; - -}); diff --git a/node_modules/mout/src/function.js b/node_modules/mout/src/function.js deleted file mode 100644 index a2f667e..0000000 --- a/node_modules/mout/src/function.js +++ /dev/null @@ -1,25 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'after' : require('./function/after'), - 'awaitDelay' : require('./function/awaitDelay'), - 'bind' : require('./function/bind'), - 'compose' : require('./function/compose'), - 'constant' : require('./function/constant'), - 'debounce' : require('./function/debounce'), - 'func' : require('./function/func'), - 'identity' : require('./function/identity'), - 'makeIterator_' : require('./function/makeIterator_'), - 'memoize' : require('./function/memoize'), - 'partial' : require('./function/partial'), - 'prop' : require('./function/prop'), - 'series' : require('./function/series'), - 'throttle' : require('./function/throttle'), - 'timeout' : require('./function/timeout'), - 'times' : require('./function/times'), - 'wrap' : require('./function/wrap') -}; - -}); diff --git a/node_modules/mout/src/function/after.js b/node_modules/mout/src/function/after.js deleted file mode 100644 index e4ccf65..0000000 --- a/node_modules/mout/src/function/after.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Calls closure only after callback is called x times - */ - function after(closure, times){ - return function () { - if (--times <= 0) closure(); - }; - } - - return after; - -}); diff --git a/node_modules/mout/src/function/awaitDelay.js b/node_modules/mout/src/function/awaitDelay.js deleted file mode 100644 index 88bea6e..0000000 --- a/node_modules/mout/src/function/awaitDelay.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../time/now', './timeout', '../array/append'], function (now, timeout, append) { - - /** - * Ensure a minimum delay for callbacks - */ - function awaitDelay( callback, delay ){ - var baseTime = now() + delay; - return function() { - // ensure all browsers will execute it asynchronously (avoid hard - // to catch errors) not using "0" because of old browsers and also - // since new browsers increase the value to be at least "4" - // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout - var ms = Math.max(baseTime - now(), 4); - return timeout.apply(this, append([callback, ms, this], arguments)); - }; - } - - return awaitDelay; - -}); diff --git a/node_modules/mout/src/function/bind.js b/node_modules/mout/src/function/bind.js deleted file mode 100644 index 787c298..0000000 --- a/node_modules/mout/src/function/bind.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/slice'], function(slice){ - - /** - * Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection. - * @param {Function} fn Function. - * @param {object} context Execution context. - * @param {rest} args Arguments (0...n arguments). - * @return {Function} Wrapped Function. - */ - function bind(fn, context, args){ - var argsArr = slice(arguments, 2); //curried args - return function(){ - return fn.apply(context, argsArr.concat(slice(arguments))); - }; - } - - return bind; -}); - diff --git a/node_modules/mout/src/function/compose.js b/node_modules/mout/src/function/compose.js deleted file mode 100644 index d8b228f..0000000 --- a/node_modules/mout/src/function/compose.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Returns a function that composes multiple functions, passing results to - * each other. - */ - function compose() { - var fns = arguments; - return function(arg){ - // only cares about the first argument since the chain can only - // deal with a single return value anyway. It should start from - // the last fn. - var n = fns.length; - while (n--) { - arg = fns[n].call(this, arg); - } - return arg; - }; - } - - return compose; - -}); diff --git a/node_modules/mout/src/function/constant.js b/node_modules/mout/src/function/constant.js deleted file mode 100644 index addd412..0000000 --- a/node_modules/mout/src/function/constant.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a new function that will return the value - */ - function constant(value){ - return function() { - return value; - }; - } - - return constant; - -}); diff --git a/node_modules/mout/src/function/debounce.js b/node_modules/mout/src/function/debounce.js deleted file mode 100644 index 8c5fd47..0000000 --- a/node_modules/mout/src/function/debounce.js +++ /dev/null @@ -1,32 +0,0 @@ -define(function () { - - /** - * Debounce callback execution - */ - function debounce(fn, threshold, isAsap){ - var timeout, result; - function debounced(){ - var args = arguments, context = this; - function delayed(){ - if (! isAsap) { - result = fn.apply(context, args); - } - timeout = null; - } - if (timeout) { - clearTimeout(timeout); - } else if (isAsap) { - result = fn.apply(context, args); - } - timeout = setTimeout(delayed, threshold); - return result; - } - debounced.cancel = function(){ - clearTimeout(timeout); - }; - return debounced; - } - - return debounce; - -}); diff --git a/node_modules/mout/src/function/func.js b/node_modules/mout/src/function/func.js deleted file mode 100644 index b920e00..0000000 --- a/node_modules/mout/src/function/func.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that call a method on the passed object - */ - function func(name){ - return function(obj){ - return obj[name](); - }; - } - - return func; - -}); diff --git a/node_modules/mout/src/function/identity.js b/node_modules/mout/src/function/identity.js deleted file mode 100644 index 59f7182..0000000 --- a/node_modules/mout/src/function/identity.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Returns the first argument provided to it. - */ - function identity(val){ - return val; - } - - return identity; - -}); diff --git a/node_modules/mout/src/function/makeIterator_.js b/node_modules/mout/src/function/makeIterator_.js deleted file mode 100644 index 771ea19..0000000 --- a/node_modules/mout/src/function/makeIterator_.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['./identity', './prop', '../object/deepMatches'], function(identity, prop, deepMatches) { - - /** - * Converts argument into a valid iterator. - * Used internally on most array/object/collection methods that receives a - * callback/iterator providing a shortcut syntax. - */ - function makeIterator(src, thisObj){ - if (src == null) { - return identity; - } - switch(typeof src) { - case 'function': - // function is the first to improve perf (most common case) - // also avoid using `Function#call` if not needed, which boosts - // perf a lot in some cases - return (typeof thisObj !== 'undefined')? function(val, i, arr){ - return src.call(thisObj, val, i, arr); - } : src; - case 'object': - return function(val){ - return deepMatches(val, src); - }; - case 'string': - case 'number': - return prop(src); - } - } - - return makeIterator; - -}); diff --git a/node_modules/mout/src/function/memoize.js b/node_modules/mout/src/function/memoize.js deleted file mode 100644 index 8833fee..0000000 --- a/node_modules/mout/src/function/memoize.js +++ /dev/null @@ -1,39 +0,0 @@ -define(['../lang/isFunction', '../object/hasOwn'], function(isFunction, hasOwn){ - - /** - * Creates a function that memoizes the result of `fn`. If `resolver` is - * provided it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is coerced to a string and used as the - * cache key. The `fn` is invoked with the `this` binding of the memoized - * function. Modified from lodash. - * - * @param {Function} fn Function to have its output memoized. - * @param {Function} context Function to resolve the cache key. - * @return {Function} Returns the new memoized function. - */ - function memoize(fn, resolver) { - if (!isFunction(fn) || (resolver && !isFunction(resolver))) { - throw new TypeError('Expected a function'); - } - - var memoized = function() { - var cache = memoized.cache, - key = resolver ? resolver.apply(this, arguments) : arguments[0]; - - if (hasOwn(cache, key)) { - return cache[key]; - } - var result = fn.apply(this, arguments); - cache[key] = result; - return result; - }; - - memoized.cache = {}; - - return memoized; - } - - return memoize; -}); - diff --git a/node_modules/mout/src/function/partial.js b/node_modules/mout/src/function/partial.js deleted file mode 100644 index a9e9d76..0000000 --- a/node_modules/mout/src/function/partial.js +++ /dev/null @@ -1,29 +0,0 @@ -define(['../array/indexOf', '../array/slice', '../array/take'], function (indexOf, slice, take) { - - var _ = {}; - - /** - * Creates a partially applied function. - */ - function partial(f) { - var as = slice(arguments, 1); - var has_ = indexOf(as, _) !== -1; - - return function() { - var rest = slice(arguments); - - // Don't waste time checking for placeholders if there aren't any. - var args = has_ ? take(as.length, function(i) { - var a = as[i]; - return a === _ ? rest.shift() : a; - }) : as; - - return f.apply(this, rest.length ? args.concat(rest) : args); - }; - } - - partial._ = _; - - return partial; - -}); diff --git a/node_modules/mout/src/function/prop.js b/node_modules/mout/src/function/prop.js deleted file mode 100644 index c9df78c..0000000 --- a/node_modules/mout/src/function/prop.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * Returns a function that gets a property of the passed object - */ - function prop(name){ - return function(obj){ - return obj[name]; - }; - } - - return prop; - -}); diff --git a/node_modules/mout/src/function/series.js b/node_modules/mout/src/function/series.js deleted file mode 100644 index c8856a2..0000000 --- a/node_modules/mout/src/function/series.js +++ /dev/null @@ -1,22 +0,0 @@ -define(function () { - - /** - * Returns a function that will execute a list of functions in sequence - * passing the same arguments to each one. (useful for batch processing - * items during a forEach loop) - */ - function series(){ - var fns = arguments; - return function(){ - var i = 0, - n = fns.length; - while (i < n) { - fns[i].apply(this, arguments); - i += 1; - } - }; - } - - return series; - -}); diff --git a/node_modules/mout/src/function/throttle.js b/node_modules/mout/src/function/throttle.js deleted file mode 100644 index 9fb47b2..0000000 --- a/node_modules/mout/src/function/throttle.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../time/now'], function (now) { - - /** - */ - function throttle(fn, delay){ - var context, timeout, result, args, - diff, prevCall = 0; - function delayed(){ - prevCall = now(); - timeout = null; - result = fn.apply(context, args); - } - function throttled(){ - context = this; - args = arguments; - diff = delay - (now() - prevCall); - if (diff <= 0) { - clearTimeout(timeout); - delayed(); - } else if (! timeout) { - timeout = setTimeout(delayed, diff); - } - return result; - } - throttled.cancel = function(){ - clearTimeout(timeout); - }; - return throttled; - } - - return throttle; - -}); diff --git a/node_modules/mout/src/function/timeout.js b/node_modules/mout/src/function/timeout.js deleted file mode 100644 index 61b832c..0000000 --- a/node_modules/mout/src/function/timeout.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../array/slice'], function (slice) { - - /** - * Delays the call of a function within a given context. - */ - function timeout(fn, millis, context){ - - var args = slice(arguments, 3); - - return setTimeout(function() { - fn.apply(context, args); - }, millis); - } - - return timeout; - -}); diff --git a/node_modules/mout/src/function/times.js b/node_modules/mout/src/function/times.js deleted file mode 100644 index ec10cae..0000000 --- a/node_modules/mout/src/function/times.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function () { - - /** - * Iterates over a callback a set amount of times - */ - function times(n, callback, thisObj){ - var i = -1; - while (++i < n) { - if ( callback.call(thisObj, i) === false ) { - break; - } - } - } - - return times; - -}); diff --git a/node_modules/mout/src/function/wrap.js b/node_modules/mout/src/function/wrap.js deleted file mode 100644 index b2f54dd..0000000 --- a/node_modules/mout/src/function/wrap.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./partial'], function (partial) { - - /** - * Returns the first function passed as an argument to the second, - * allowing you to adjust arguments, run code before and after, and - * conditionally execute the original function. - */ - function wrap(fn, wrapper){ - return partial(wrapper, fn); - } - - return wrap; - -}); diff --git a/node_modules/mout/src/index.js b/node_modules/mout/src/index.js deleted file mode 100644 index bfa6c24..0000000 --- a/node_modules/mout/src/index.js +++ /dev/null @@ -1,25 +0,0 @@ -/**@license - * mout v1.2.4 | http://moutjs.com | MIT license - */ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'VERSION' : '1.2.4', - 'array' : require('./array'), - 'collection' : require('./collection'), - 'date' : require('./date'), - 'function' : require('./function'), - 'lang' : require('./lang'), - 'math' : require('./math'), - 'number' : require('./number'), - 'object' : require('./object'), - 'queryString' : require('./queryString'), - 'random' : require('./random'), - 'string' : require('./string'), - 'time' : require('./time'), - 'fn' : require('./function') -}; - -}); diff --git a/node_modules/mout/src/lang.js b/node_modules/mout/src/lang.js deleted file mode 100644 index df713a5..0000000 --- a/node_modules/mout/src/lang.js +++ /dev/null @@ -1,40 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'GLOBAL' : require('./lang/GLOBAL'), - 'clone' : require('./lang/clone'), - 'createObject' : require('./lang/createObject'), - 'ctorApply' : require('./lang/ctorApply'), - 'deepClone' : require('./lang/deepClone'), - 'deepEquals' : require('./lang/deepEquals'), - 'defaults' : require('./lang/defaults'), - 'inheritPrototype' : require('./lang/inheritPrototype'), - 'is' : require('./lang/is'), - 'isArguments' : require('./lang/isArguments'), - 'isArray' : require('./lang/isArray'), - 'isBoolean' : require('./lang/isBoolean'), - 'isDate' : require('./lang/isDate'), - 'isEmpty' : require('./lang/isEmpty'), - 'isFinite' : require('./lang/isFinite'), - 'isFunction' : require('./lang/isFunction'), - 'isInteger' : require('./lang/isInteger'), - 'isKind' : require('./lang/isKind'), - 'isNaN' : require('./lang/isNaN'), - 'isNull' : require('./lang/isNull'), - 'isNumber' : require('./lang/isNumber'), - 'isObject' : require('./lang/isObject'), - 'isPlainObject' : require('./lang/isPlainObject'), - 'isPrimitive' : require('./lang/isPrimitive'), - 'isRegExp' : require('./lang/isRegExp'), - 'isString' : require('./lang/isString'), - 'isUndefined' : require('./lang/isUndefined'), - 'isnt' : require('./lang/isnt'), - 'kindOf' : require('./lang/kindOf'), - 'toArray' : require('./lang/toArray'), - 'toNumber' : require('./lang/toNumber'), - 'toString' : require('./lang/toString') -}; - -}); diff --git a/node_modules/mout/src/lang/GLOBAL.js b/node_modules/mout/src/lang/GLOBAL.js deleted file mode 100644 index dcd4a42..0000000 --- a/node_modules/mout/src/lang/GLOBAL.js +++ /dev/null @@ -1,7 +0,0 @@ -define(function () { - - // Reference to the global context (works on ES3 and ES5-strict mode) - //jshint -W061, -W064 - return Function('return this')(); - -}); diff --git a/node_modules/mout/src/lang/clone.js b/node_modules/mout/src/lang/clone.js deleted file mode 100644 index d3429fd..0000000 --- a/node_modules/mout/src/lang/clone.js +++ /dev/null @@ -1,47 +0,0 @@ -define(['./kindOf', './isPlainObject', '../object/mixIn'], function (kindOf, isPlainObject, mixIn) { - - /** - * Clone native types. - */ - function clone(val){ - switch (kindOf(val)) { - case 'Object': - return cloneObject(val); - case 'Array': - return cloneArray(val); - case 'RegExp': - return cloneRegExp(val); - case 'Date': - return cloneDate(val); - default: - return val; - } - } - - function cloneObject(source) { - if (isPlainObject(source)) { - return mixIn({}, source); - } else { - return source; - } - } - - function cloneRegExp(r) { - var flags = ''; - flags += r.multiline ? 'm' : ''; - flags += r.global ? 'g' : ''; - flags += r.ignoreCase ? 'i' : ''; - return new RegExp(r.source, flags); - } - - function cloneDate(date) { - return new Date(+date); - } - - function cloneArray(arr) { - return arr.slice(); - } - - return clone; - -}); diff --git a/node_modules/mout/src/lang/createObject.js b/node_modules/mout/src/lang/createObject.js deleted file mode 100644 index f766150..0000000 --- a/node_modules/mout/src/lang/createObject.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../object/mixIn'], function(mixIn){ - - /** - * Create Object using prototypal inheritance and setting custom properties. - * - Mix between Douglas Crockford Prototypal Inheritance and the EcmaScript 5 `Object.create()` method. - * @param {object} parent Parent Object. - * @param {object} [props] Object properties. - * @return {object} Created object. - */ - function createObject(parent, props){ - function F(){} - F.prototype = parent; - return mixIn(new F(), props); - - } - return createObject; -}); - diff --git a/node_modules/mout/src/lang/ctorApply.js b/node_modules/mout/src/lang/ctorApply.js deleted file mode 100644 index d0674b1..0000000 --- a/node_modules/mout/src/lang/ctorApply.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - var bind = Function.prototype.bind; - - /** - * Do fn.apply on a constructor. - */ - function ctorApply(ctor, args) { - var Bound = bind.bind(ctor, undefined).apply(undefined, args); - return new Bound(); - } - - return ctorApply; - -}); diff --git a/node_modules/mout/src/lang/deepClone.js b/node_modules/mout/src/lang/deepClone.js deleted file mode 100644 index d45c10a..0000000 --- a/node_modules/mout/src/lang/deepClone.js +++ /dev/null @@ -1,45 +0,0 @@ -define(['./clone', '../object/forOwn', './kindOf', './isPlainObject'], function (clone, forOwn, kindOf, isPlainObject) { - - /** - * Recursively clone native types. - */ - function deepClone(val, instanceClone) { - switch ( kindOf(val) ) { - case 'Object': - return cloneObject(val, instanceClone); - case 'Array': - return cloneArray(val, instanceClone); - default: - return clone(val); - } - } - - function cloneObject(source, instanceClone) { - if (isPlainObject(source)) { - var out = {}; - forOwn(source, function(val, key) { - this[key] = deepClone(val, instanceClone); - }, out); - return out; - } else if (instanceClone) { - return instanceClone(source); - } else { - return source; - } - } - - function cloneArray(arr, instanceClone) { - var out = [], - i = -1, - n = arr.length, - val; - while (++i < n) { - out[i] = deepClone(arr[i], instanceClone); - } - return out; - } - - return deepClone; - -}); - diff --git a/node_modules/mout/src/lang/deepEquals.js b/node_modules/mout/src/lang/deepEquals.js deleted file mode 100644 index f4eda1a..0000000 --- a/node_modules/mout/src/lang/deepEquals.js +++ /dev/null @@ -1,26 +0,0 @@ -define(['./is', './isObject', './isArray', '../object/equals', '../array/equals'], function (is, isObject, isArray, objEquals, arrEquals) { - - /** - * Recursively checks for same properties and values. - */ - function deepEquals(a, b, callback){ - callback = callback || is; - - var bothObjects = isObject(a) && isObject(b); - var bothArrays = !bothObjects && isArray(a) && isArray(b); - - if (!bothObjects && !bothArrays) { - return callback(a, b); - } - - function compare(a, b){ - return deepEquals(a, b, callback); - } - - var method = bothObjects ? objEquals : arrEquals; - return method(a, b, compare); - } - - return deepEquals; - -}); diff --git a/node_modules/mout/src/lang/defaults.js b/node_modules/mout/src/lang/defaults.js deleted file mode 100644 index 5156b1b..0000000 --- a/node_modules/mout/src/lang/defaults.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./toArray', '../array/find'], function (toArray, find) { - - /** - * Return first non void argument - */ - function defaults(var_args){ - return find(toArray(arguments), nonVoid); - } - - function nonVoid(val){ - return val != null; - } - - return defaults; - -}); diff --git a/node_modules/mout/src/lang/inheritPrototype.js b/node_modules/mout/src/lang/inheritPrototype.js deleted file mode 100644 index 64c9178..0000000 --- a/node_modules/mout/src/lang/inheritPrototype.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./createObject'], function(createObject){ - - /** - * Inherit prototype from another Object. - * - inspired by Nicholas Zackas Solution - * @param {object} child Child object - * @param {object} parent Parent Object - */ - function inheritPrototype(child, parent){ - var p = createObject(parent.prototype); - p.constructor = child; - child.prototype = p; - child.super_ = parent; - return p; - } - - return inheritPrototype; -}); diff --git a/node_modules/mout/src/lang/is.js b/node_modules/mout/src/lang/is.js deleted file mode 100644 index 261a207..0000000 --- a/node_modules/mout/src/lang/is.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Check if both arguments are egal. - */ - function is(x, y){ - // implementation borrowed from harmony:egal spec - if (x === y) { - // 0 === -0, but they are not identical - return x !== 0 || 1 / x === 1 / y; - } - - // NaN !== NaN, but they are identical. - // NaNs are the only non-reflexive value, i.e., if x !== x, - // then x is a NaN. - // isNaN is broken: it converts its argument to number, so - // isNaN("foo") => true - return x !== x && y !== y; - } - - return is; - -}); diff --git a/node_modules/mout/src/lang/isArguments.js b/node_modules/mout/src/lang/isArguments.js deleted file mode 100644 index f889ee8..0000000 --- a/node_modules/mout/src/lang/isArguments.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isKind'], function (isKind) { - - /** - */ - var isArgs = isKind(arguments, 'Arguments')? - function(val){ - return isKind(val, 'Arguments'); - } : - function(val){ - // Arguments is an Object on IE7 - return !!(val && Object.prototype.hasOwnProperty.call(val, 'callee')); - }; - - return isArgs; -}); diff --git a/node_modules/mout/src/lang/isArray.js b/node_modules/mout/src/lang/isArray.js deleted file mode 100644 index 886e2aa..0000000 --- a/node_modules/mout/src/lang/isArray.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - var isArray = Array.isArray || function (val) { - return isKind(val, 'Array'); - }; - return isArray; -}); diff --git a/node_modules/mout/src/lang/isBoolean.js b/node_modules/mout/src/lang/isBoolean.js deleted file mode 100644 index 1ca27a6..0000000 --- a/node_modules/mout/src/lang/isBoolean.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isBoolean(val) { - return isKind(val, 'Boolean'); - } - return isBoolean; -}); diff --git a/node_modules/mout/src/lang/isDate.js b/node_modules/mout/src/lang/isDate.js deleted file mode 100644 index 2708d67..0000000 --- a/node_modules/mout/src/lang/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isDate(val) { - return isKind(val, 'Date'); - } - return isDate; -}); diff --git a/node_modules/mout/src/lang/isEmpty.js b/node_modules/mout/src/lang/isEmpty.js deleted file mode 100644 index 8b67750..0000000 --- a/node_modules/mout/src/lang/isEmpty.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../object/forOwn', './isArray'], function (forOwn, isArray) { - - function isEmpty(val){ - if (val == null) { - // typeof null == 'object' so we check it first - return true; - } else if ( typeof val === 'string' || isArray(val) ) { - return !val.length; - } else if ( typeof val === 'object' ) { - var result = true; - forOwn(val, function(){ - result = false; - return false; // break loop - }); - return result; - } else { - return true; - } - } - - return isEmpty; - -}); diff --git a/node_modules/mout/src/lang/isFinite.js b/node_modules/mout/src/lang/isFinite.js deleted file mode 100644 index 05c29ac..0000000 --- a/node_modules/mout/src/lang/isFinite.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./isNumber', './GLOBAL'], function (isNumber, GLOBAL) { - - /** - * Check if value is finite - */ - function isFinite(val){ - var is = false; - if (typeof val === 'string' && val !== '') { - is = GLOBAL.isFinite( parseFloat(val) ); - } else if (isNumber(val)){ - // need to use isNumber because of Number constructor - is = GLOBAL.isFinite( val ); - } - return is; - } - - return isFinite; - -}); diff --git a/node_modules/mout/src/lang/isFunction.js b/node_modules/mout/src/lang/isFunction.js deleted file mode 100644 index ff5df7f..0000000 --- a/node_modules/mout/src/lang/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isFunction(val) { - return isKind(val, 'Function'); - } - return isFunction; -}); diff --git a/node_modules/mout/src/lang/isInteger.js b/node_modules/mout/src/lang/isInteger.js deleted file mode 100644 index 1931f51..0000000 --- a/node_modules/mout/src/lang/isInteger.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./isNumber'], function (isNumber) { - - /** - * Check if value is an integer - */ - function isInteger(val){ - return isNumber(val) && (val % 1 === 0); - } - - return isInteger; - -}); diff --git a/node_modules/mout/src/lang/isKind.js b/node_modules/mout/src/lang/isKind.js deleted file mode 100644 index 6937a12..0000000 --- a/node_modules/mout/src/lang/isKind.js +++ /dev/null @@ -1,9 +0,0 @@ -define(['./kindOf'], function (kindOf) { - /** - * Check if value is from a specific "kind". - */ - function isKind(val, kind){ - return kindOf(val) === kind; - } - return isKind; -}); diff --git a/node_modules/mout/src/lang/isNaN.js b/node_modules/mout/src/lang/isNaN.js deleted file mode 100644 index 2219404..0000000 --- a/node_modules/mout/src/lang/isNaN.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./isNumber', '../number/isNaN'], function (isNumber, $isNaN) { - - /** - * Check if value is NaN for realz - */ - function isNaN(val){ - // based on the fact that NaN !== NaN - // need to check if it's a number to avoid conflicts with host objects - // also need to coerce ToNumber to avoid edge case `new Number(NaN)` - return !isNumber(val) || $isNaN(Number(val)); - } - - return isNaN; - -}); diff --git a/node_modules/mout/src/lang/isNull.js b/node_modules/mout/src/lang/isNull.js deleted file mode 100644 index 506e05e..0000000 --- a/node_modules/mout/src/lang/isNull.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - */ - function isNull(val){ - return val === null; - } - return isNull; -}); - diff --git a/node_modules/mout/src/lang/isNumber.js b/node_modules/mout/src/lang/isNumber.js deleted file mode 100644 index 9a832c5..0000000 --- a/node_modules/mout/src/lang/isNumber.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isNumber(val) { - return isKind(val, 'Number'); - } - return isNumber; -}); diff --git a/node_modules/mout/src/lang/isObject.js b/node_modules/mout/src/lang/isObject.js deleted file mode 100644 index 0befb06..0000000 --- a/node_modules/mout/src/lang/isObject.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isObject(val) { - return isKind(val, 'Object'); - } - return isObject; -}); diff --git a/node_modules/mout/src/lang/isPlainObject.js b/node_modules/mout/src/lang/isPlainObject.js deleted file mode 100644 index 406a279..0000000 --- a/node_modules/mout/src/lang/isPlainObject.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Checks if the value is created by the `Object` constructor. - */ - function isPlainObject(value) { - return (!!value && typeof value === 'object' && - value.constructor === Object); - } - - return isPlainObject; - -}); diff --git a/node_modules/mout/src/lang/isPrimitive.js b/node_modules/mout/src/lang/isPrimitive.js deleted file mode 100644 index c4035ea..0000000 --- a/node_modules/mout/src/lang/isPrimitive.js +++ /dev/null @@ -1,21 +0,0 @@ -define(function() { - - /** - * Checks if the object is a primitive - */ - function isPrimitive(value) { - // Using switch fallthrough because it's simple to read and is - // generally fast: http://jsperf.com/testing-value-is-primitive/5 - switch (typeof value) { - case "string": - case "number": - case "boolean": - return true; - } - - return value == null; - } - - return isPrimitive; - -}); diff --git a/node_modules/mout/src/lang/isRegExp.js b/node_modules/mout/src/lang/isRegExp.js deleted file mode 100644 index d78a03d..0000000 --- a/node_modules/mout/src/lang/isRegExp.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isRegExp(val) { - return isKind(val, 'RegExp'); - } - return isRegExp; -}); diff --git a/node_modules/mout/src/lang/isString.js b/node_modules/mout/src/lang/isString.js deleted file mode 100644 index 8a42fe0..0000000 --- a/node_modules/mout/src/lang/isString.js +++ /dev/null @@ -1,8 +0,0 @@ -define(['./isKind'], function (isKind) { - /** - */ - function isString(val) { - return isKind(val, 'String'); - } - return isString; -}); diff --git a/node_modules/mout/src/lang/isUndefined.js b/node_modules/mout/src/lang/isUndefined.js deleted file mode 100644 index c57b28e..0000000 --- a/node_modules/mout/src/lang/isUndefined.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function () { - var UNDEF; - - /** - */ - function isUndef(val){ - return val === UNDEF; - } - return isUndef; -}); diff --git a/node_modules/mout/src/lang/isnt.js b/node_modules/mout/src/lang/isnt.js deleted file mode 100644 index d433622..0000000 --- a/node_modules/mout/src/lang/isnt.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./is'], function (is) { - - /** - * Check if both values are not identical/egal - */ - function isnt(x, y){ - return !is(x, y); - } - - return isnt; - -}); diff --git a/node_modules/mout/src/lang/kindOf.js b/node_modules/mout/src/lang/kindOf.js deleted file mode 100644 index 4c7dc4c..0000000 --- a/node_modules/mout/src/lang/kindOf.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function () { - /** - * Gets the "kind" of value. (e.g. "String", "Number", etc) - */ - function kindOf(val) { - return Object.prototype.toString.call(val).slice(8, -1); - } - return kindOf; -}); diff --git a/node_modules/mout/src/lang/toArray.js b/node_modules/mout/src/lang/toArray.js deleted file mode 100644 index ad04d07..0000000 --- a/node_modules/mout/src/lang/toArray.js +++ /dev/null @@ -1,29 +0,0 @@ -define(['./kindOf', './GLOBAL'], function (kindOf, GLOBAL) { - - /** - * Convert array-like object into array - */ - function toArray(val){ - var ret = [], - kind = kindOf(val), - n; - - if (val != null) { - if ( val.length == null || kind === 'String' || kind === 'Function' || kind === 'RegExp' || val === GLOBAL ) { - //string, regexp, function have .length but user probably just want - //to wrap value into an array.. - ret[ret.length] = val; - } else { - //window returns true on isObject in IE7 and may have length - //property. `typeof NodeList` returns `function` on Safari so - //we can't use it (#58) - n = val.length; - while (n--) { - ret[n] = val[n]; - } - } - } - return ret; - } - return toArray; -}); diff --git a/node_modules/mout/src/lang/toNumber.js b/node_modules/mout/src/lang/toNumber.js deleted file mode 100644 index 3976738..0000000 --- a/node_modules/mout/src/lang/toNumber.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./isArray'], function (isArray) { - - /** - * covert value into number if numeric - */ - function toNumber(val){ - // numberic values should come first because of -0 - if (typeof val === 'number') return val; - // we want all falsy values (besides -0) to return zero to avoid - // headaches - if (!val) return 0; - if (typeof val === 'string') return parseFloat(val); - // arrays are edge cases. `Number([4]) === 4` - if (isArray(val)) return NaN; - return Number(val); - } - - return toNumber; - -}); diff --git a/node_modules/mout/src/lang/toString.js b/node_modules/mout/src/lang/toString.js deleted file mode 100644 index c28b89a..0000000 --- a/node_modules/mout/src/lang/toString.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Typecast a value to a String, using an empty string value for null or - * undefined. - */ - function toString(val){ - return val == null ? '' : val.toString(); - } - - return toString; - -}); diff --git a/node_modules/mout/src/math.js b/node_modules/mout/src/math.js deleted file mode 100644 index 481e44f..0000000 --- a/node_modules/mout/src/math.js +++ /dev/null @@ -1,20 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'ceil' : require('./math/ceil'), - 'clamp' : require('./math/clamp'), - 'countSteps' : require('./math/countSteps'), - 'floor' : require('./math/floor'), - 'inRange' : require('./math/inRange'), - 'isNear' : require('./math/isNear'), - 'lerp' : require('./math/lerp'), - 'loop' : require('./math/loop'), - 'map' : require('./math/map'), - 'norm' : require('./math/norm'), - 'overflow' : require('./math/overflow'), - 'round' : require('./math/round') -}; - -}); diff --git a/node_modules/mout/src/math/ceil.js b/node_modules/mout/src/math/ceil.js deleted file mode 100644 index d73b058..0000000 --- a/node_modules/mout/src/math/ceil.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Round value up with a custom radix. - */ - function ceil(val, step){ - step = Math.abs(step || 1); - return Math.ceil(val / step) * step; - } - - return ceil; -}); diff --git a/node_modules/mout/src/math/clamp.js b/node_modules/mout/src/math/clamp.js deleted file mode 100644 index fb5a148..0000000 --- a/node_modules/mout/src/math/clamp.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Clamps value inside range. - */ - function clamp(val, min, max){ - return val < min? min : (val > max? max : val); - } - return clamp; -}); diff --git a/node_modules/mout/src/math/countSteps.js b/node_modules/mout/src/math/countSteps.js deleted file mode 100644 index 0ecb32f..0000000 --- a/node_modules/mout/src/math/countSteps.js +++ /dev/null @@ -1,16 +0,0 @@ -define(function(){ - /** - * Count number of full steps. - */ - function countSteps(val, step, overflow){ - val = Math.floor(val / step); - - if (overflow) { - return val % overflow; - } - - return val; - } - - return countSteps; -}); diff --git a/node_modules/mout/src/math/floor.js b/node_modules/mout/src/math/floor.js deleted file mode 100644 index 8a4456b..0000000 --- a/node_modules/mout/src/math/floor.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Floor value to full steps. - */ - function floor(val, step){ - step = Math.abs(step || 1); - return Math.floor(val / step) * step; - } - return floor; -}); diff --git a/node_modules/mout/src/math/inRange.js b/node_modules/mout/src/math/inRange.js deleted file mode 100644 index 0c89053..0000000 --- a/node_modules/mout/src/math/inRange.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Checks if value is inside the range. - */ - function inRange(val, min, max, threshold){ - threshold = threshold || 0; - return (val + threshold >= min && val - threshold <= max); - } - - return inRange; -}); diff --git a/node_modules/mout/src/math/isNear.js b/node_modules/mout/src/math/isNear.js deleted file mode 100644 index b308a0b..0000000 --- a/node_modules/mout/src/math/isNear.js +++ /dev/null @@ -1,9 +0,0 @@ -define(function(){ - /** - * Check if value is close to target. - */ - function isNear(val, target, threshold){ - return (Math.abs(val - target) <= threshold); - } - return isNear; -}); diff --git a/node_modules/mout/src/math/lerp.js b/node_modules/mout/src/math/lerp.js deleted file mode 100644 index 26b99d0..0000000 --- a/node_modules/mout/src/math/lerp.js +++ /dev/null @@ -1,11 +0,0 @@ -define(function(){ - /** - * Linear interpolation. - * IMPORTANT:will return `Infinity` if numbers overflow Number.MAX_VALUE - */ - function lerp(ratio, start, end){ - return start + (end - start) * ratio; - } - - return lerp; -}); diff --git a/node_modules/mout/src/math/loop.js b/node_modules/mout/src/math/loop.js deleted file mode 100644 index c735ecf..0000000 --- a/node_modules/mout/src/math/loop.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Loops value inside range. - */ - function loop(val, min, max){ - return val < min? max : (val > max? min : val); - } - - return loop; -}); diff --git a/node_modules/mout/src/math/map.js b/node_modules/mout/src/math/map.js deleted file mode 100644 index bf7dc5d..0000000 --- a/node_modules/mout/src/math/map.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['./lerp', './norm'], function(lerp, norm){ - /** - * Maps a number from one scale to another. - * @example map(3, 0, 4, -1, 1) -> 0.5 - */ - function map(val, min1, max1, min2, max2){ - return lerp( norm(val, min1, max1), min2, max2 ); - } - return map; -}); diff --git a/node_modules/mout/src/math/norm.js b/node_modules/mout/src/math/norm.js deleted file mode 100644 index 724d4f5..0000000 --- a/node_modules/mout/src/math/norm.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function(){ - /** - * Gets normalized ratio of value inside range. - */ - function norm(val, min, max){ - if (val < min || val > max) { - throw new RangeError('value (' + val + ') must be between ' + min + ' and ' + max); - } - - return val === max ? 1 : (val - min) / (max - min); - } - return norm; -}); diff --git a/node_modules/mout/src/math/overflow.js b/node_modules/mout/src/math/overflow.js deleted file mode 100644 index d9fd529..0000000 --- a/node_modules/mout/src/math/overflow.js +++ /dev/null @@ -1,23 +0,0 @@ -define(function () { - - /** - * Wraps number within bounds both positive and negative - */ - function overflow(number, min, max){ - if ( max === undefined ) { - max = min; - min = 0; - } - - var difference = max - min; - - if ( number < min ) { - number += difference * ( ~~( ( min - number ) / difference ) + 1 ); - } - - return min + ( number - min ) % difference; - } - - return overflow; - -}); diff --git a/node_modules/mout/src/math/round.js b/node_modules/mout/src/math/round.js deleted file mode 100644 index b43e4ac..0000000 --- a/node_modules/mout/src/math/round.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - /** - * Round number to a specific radix - */ - function round(value, radix){ - radix = radix || 1; // default round 1 - return Math.round(value / radix) * radix; - } - - return round; - -}); diff --git a/node_modules/mout/src/number.js b/node_modules/mout/src/number.js deleted file mode 100644 index ffdb2cd..0000000 --- a/node_modules/mout/src/number.js +++ /dev/null @@ -1,25 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'MAX_INT' : require('./number/MAX_INT'), - 'MAX_SAFE_INTEGER' : require('./number/MAX_SAFE_INTEGER'), - 'MAX_UINT' : require('./number/MAX_UINT'), - 'MIN_INT' : require('./number/MIN_INT'), - 'abbreviate' : require('./number/abbreviate'), - 'currencyFormat' : require('./number/currencyFormat'), - 'enforcePrecision' : require('./number/enforcePrecision'), - 'isNaN' : require('./number/isNaN'), - 'nth' : require('./number/nth'), - 'ordinal' : require('./number/ordinal'), - 'pad' : require('./number/pad'), - 'rol' : require('./number/rol'), - 'ror' : require('./number/ror'), - 'sign' : require('./number/sign'), - 'toInt' : require('./number/toInt'), - 'toUInt' : require('./number/toUInt'), - 'toUInt31' : require('./number/toUInt31') -}; - -}); diff --git a/node_modules/mout/src/number/MAX_INT.js b/node_modules/mout/src/number/MAX_INT.js deleted file mode 100644 index 23a6e1a..0000000 --- a/node_modules/mout/src/number/MAX_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit signed integer value. (2^31 - 1) - */ -define(function(){ - return 2147483647; -}); diff --git a/node_modules/mout/src/number/MAX_SAFE_INTEGER.js b/node_modules/mout/src/number/MAX_SAFE_INTEGER.js deleted file mode 100644 index ecdc62e..0000000 --- a/node_modules/mout/src/number/MAX_SAFE_INTEGER.js +++ /dev/null @@ -1,7 +0,0 @@ -define(function () { - - // maximum safe integer (Math.pow(2, 53) - 1) - // see: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer - return 9007199254740991; - -}); diff --git a/node_modules/mout/src/number/MAX_UINT.js b/node_modules/mout/src/number/MAX_UINT.js deleted file mode 100644 index a035096..0000000 --- a/node_modules/mout/src/number/MAX_UINT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Maximum 32-bit unsigned integet value (2^32 - 1) - */ -define(function(){ - return 4294967295; -}); diff --git a/node_modules/mout/src/number/MIN_INT.js b/node_modules/mout/src/number/MIN_INT.js deleted file mode 100644 index 9b3e978..0000000 --- a/node_modules/mout/src/number/MIN_INT.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @constant Minimum 32-bit signed integer value (-2^31). - */ -define(function(){ - return -2147483648; -}); diff --git a/node_modules/mout/src/number/abbreviate.js b/node_modules/mout/src/number/abbreviate.js deleted file mode 100644 index 4e17a8f..0000000 --- a/node_modules/mout/src/number/abbreviate.js +++ /dev/null @@ -1,43 +0,0 @@ -define(["./enforcePrecision"], function (enforcePrecision) { - var _defaultDict = { - thousand: "K", - million: "M", - billion: "B", - }; - - /** - * Abbreviate number if bigger than 1000. (eg: 2.5K, 17.5M, 3.4B, ...) - */ - function abbreviateNumber(val, nDecimals, dict) { - nDecimals = nDecimals != null ? nDecimals : 1; - dict = dict || _defaultDict; - val = enforcePrecision(val, nDecimals); - - var str, mod; - var negative = false; - - if (val < 0) { - val = -val; - negative = true; - } - - if (val < 1000000) { - mod = enforcePrecision(val / 1000, nDecimals); - // might overflow to next scale during rounding - str = mod < 1000 ? mod + dict.thousand : 1 + dict.million; - } else if (val < 1000000000) { - mod = enforcePrecision(val / 1000000, nDecimals); - str = mod < 1000 ? mod + dict.million : 1 + dict.billion; - } else { - str = enforcePrecision(val / 1000000000, nDecimals) + dict.billion; - } - - if (negative) { - str = "-" + str; - } - - return str; - } - - return abbreviateNumber; -}); diff --git a/node_modules/mout/src/number/currencyFormat.js b/node_modules/mout/src/number/currencyFormat.js deleted file mode 100644 index 1e5fecb..0000000 --- a/node_modules/mout/src/number/currencyFormat.js +++ /dev/null @@ -1,27 +0,0 @@ -define(['../lang/toNumber'], function (toNumber) { - - /** - * Converts number into currency format - */ - function currencyFormat(val, nDecimalDigits, decimalSeparator, thousandsSeparator) { - val = toNumber(val); - nDecimalDigits = nDecimalDigits == null? 2 : nDecimalDigits; - decimalSeparator = decimalSeparator == null? '.' : decimalSeparator; - thousandsSeparator = thousandsSeparator == null? ',' : thousandsSeparator; - - //can't use enforce precision since it returns a number and we are - //doing a RegExp over the string - var fixed = val.toFixed(nDecimalDigits), - //separate begin [$1], middle [$2] and decimal digits [$4] - parts = new RegExp('^(-?\\d{1,3})((?:\\d{3})+)(\\.(\\d{'+ nDecimalDigits +'}))?$').exec( fixed ); - - if(parts){ //val >= 1000 || val <= -1000 - return parts[1] + parts[2].replace(/\d{3}/g, thousandsSeparator + '$&') + (parts[4] ? decimalSeparator + parts[4] : ''); - }else{ - return fixed.replace('.', decimalSeparator); - } - } - - return currencyFormat; - -}); diff --git a/node_modules/mout/src/number/enforcePrecision.js b/node_modules/mout/src/number/enforcePrecision.js deleted file mode 100644 index 1e65e50..0000000 --- a/node_modules/mout/src/number/enforcePrecision.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toNumber'], function(toNumber){ - /** - * Enforce a specific amount of decimal digits and also fix floating - * point rounding issues. - */ - function enforcePrecision(val, nDecimalDigits){ - val = toNumber(val); - var pow = Math.pow(10, nDecimalDigits); - return +(Math.round(val * pow) / pow).toFixed(nDecimalDigits); - } - return enforcePrecision; -}); diff --git a/node_modules/mout/src/number/isNaN.js b/node_modules/mout/src/number/isNaN.js deleted file mode 100644 index 3f1ebb6..0000000 --- a/node_modules/mout/src/number/isNaN.js +++ /dev/null @@ -1,14 +0,0 @@ -define(function () { - - /** - * ES6 Number.isNaN - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN - */ - function isNaN(val){ - // jshint eqeqeq:false - return typeof val === 'number' && val != val; - } - - return isNaN; - -}); diff --git a/node_modules/mout/src/number/nth.js b/node_modules/mout/src/number/nth.js deleted file mode 100644 index e991e2b..0000000 --- a/node_modules/mout/src/number/nth.js +++ /dev/null @@ -1,25 +0,0 @@ -define(function () { - - /** - * Returns "nth" of number (1 = "st", 2 = "nd", 3 = "rd", 4..10 = "th", ...) - */ - function nth(i) { - var t = (i % 100); - if (t >= 10 && t <= 20) { - return 'th'; - } - switch(i % 10) { - case 1: - return 'st'; - case 2: - return 'nd'; - case 3: - return 'rd'; - default: - return 'th'; - } - } - - return nth; - -}); diff --git a/node_modules/mout/src/number/ordinal.js b/node_modules/mout/src/number/ordinal.js deleted file mode 100644 index 17927fc..0000000 --- a/node_modules/mout/src/number/ordinal.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./toInt', './nth'], function (toInt, nth) { - - /** - * converts number into ordinal form (1st, 2nd, 3rd, 4th, ...) - */ - function ordinal(n){ - n = toInt(n); - return n + nth(n); - } - - return ordinal; - -}); diff --git a/node_modules/mout/src/number/pad.js b/node_modules/mout/src/number/pad.js deleted file mode 100644 index 194a3df..0000000 --- a/node_modules/mout/src/number/pad.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../string/lpad', '../lang/toNumber'], function(lpad, toNumber){ - - /** - * Add padding zeros if n.length < minLength. - */ - function pad(n, minLength, char){ - n = toNumber(n); - return lpad(''+ n, minLength, char || '0'); - } - - return pad; - -}); diff --git a/node_modules/mout/src/number/rol.js b/node_modules/mout/src/number/rol.js deleted file mode 100644 index a148f44..0000000 --- a/node_modules/mout/src/number/rol.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift left - * http://en.wikipedia.org/wiki/Circular_shift - */ - function rol(val, shift){ - return (val << shift) | (val >> (32 - shift)); - } - return rol; -}); diff --git a/node_modules/mout/src/number/ror.js b/node_modules/mout/src/number/ror.js deleted file mode 100644 index b5c66f9..0000000 --- a/node_modules/mout/src/number/ror.js +++ /dev/null @@ -1,10 +0,0 @@ -define(function(){ - /** - * Bitwise circular shift right - * http://en.wikipedia.org/wiki/Circular_shift - */ - function ror(val, shift){ - return (val >> shift) | (val << (32 - shift)); - } - return ror; -}); diff --git a/node_modules/mout/src/number/sign.js b/node_modules/mout/src/number/sign.js deleted file mode 100644 index b387c95..0000000 --- a/node_modules/mout/src/number/sign.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['../lang/toNumber'], function (toNumber) { - - /** - * Get sign of the value. - */ - function sign(val) { - var num = toNumber(val); - if (num === 0) return num; // +0 and +0 === 0 - if (isNaN(num)) return num; // NaN - return num < 0? -1 : 1; - } - - return sign; - -}); diff --git a/node_modules/mout/src/number/toInt.js b/node_modules/mout/src/number/toInt.js deleted file mode 100644 index 5ea59e5..0000000 --- a/node_modules/mout/src/number/toInt.js +++ /dev/null @@ -1,17 +0,0 @@ -define(function(){ - - /** - * "Convert" value into an 32-bit integer. - * Works like `Math.floor` if val > 0 and `Math.ceil` if val < 0. - * IMPORTANT: val will wrap at 2^31 and -2^31. - * Perf tests: http://jsperf.com/vs-vs-parseint-bitwise-operators/7 - */ - function toInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return ~~val; - } - - return toInt; - -}); diff --git a/node_modules/mout/src/number/toUInt.js b/node_modules/mout/src/number/toUInt.js deleted file mode 100644 index 36bbdad..0000000 --- a/node_modules/mout/src/number/toUInt.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function () { - - /** - * "Convert" value into a 32-bit unsigned integer. - * IMPORTANT: Value will wrap at 2^32. - */ - function toUInt(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return val >>> 0; - } - - return toUInt; - -}); diff --git a/node_modules/mout/src/number/toUInt31.js b/node_modules/mout/src/number/toUInt31.js deleted file mode 100644 index c1c4aff..0000000 --- a/node_modules/mout/src/number/toUInt31.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./MAX_INT'], function(MAX_INT){ - - /** - * "Convert" value into an 31-bit unsigned integer (since 1 bit is used for sign). - * IMPORTANT: value wil wrap at 2^31, if negative will return 0. - */ - function toUInt31(val){ - // we do not use lang/toNumber because of perf and also because it - // doesn't break the functionality - return (val <= 0)? 0 : (val > MAX_INT? ~~(val % (MAX_INT + 1)) : ~~val); - } - - return toUInt31; - -}); diff --git a/node_modules/mout/src/object.js b/node_modules/mout/src/object.js deleted file mode 100644 index 93cb49e..0000000 --- a/node_modules/mout/src/object.js +++ /dev/null @@ -1,44 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'bindAll' : require('./object/bindAll'), - 'contains' : require('./object/contains'), - 'deepFillIn' : require('./object/deepFillIn'), - 'deepMatches' : require('./object/deepMatches'), - 'deepMixIn' : require('./object/deepMixIn'), - 'equals' : require('./object/equals'), - 'every' : require('./object/every'), - 'fillIn' : require('./object/fillIn'), - 'filter' : require('./object/filter'), - 'find' : require('./object/find'), - 'flatten' : require('./object/flatten'), - 'forIn' : require('./object/forIn'), - 'forOwn' : require('./object/forOwn'), - 'functions' : require('./object/functions'), - 'get' : require('./object/get'), - 'has' : require('./object/has'), - 'hasOwn' : require('./object/hasOwn'), - 'keys' : require('./object/keys'), - 'map' : require('./object/map'), - 'matches' : require('./object/matches'), - 'max' : require('./object/max'), - 'merge' : require('./object/merge'), - 'min' : require('./object/min'), - 'mixIn' : require('./object/mixIn'), - 'namespace' : require('./object/namespace'), - 'omit' : require('./object/omit'), - 'pick' : require('./object/pick'), - 'pluck' : require('./object/pluck'), - 'reduce' : require('./object/reduce'), - 'reject' : require('./object/reject'), - 'result' : require('./object/result'), - 'set' : require('./object/set'), - 'size' : require('./object/size'), - 'some' : require('./object/some'), - 'unset' : require('./object/unset'), - 'values' : require('./object/values') -}; - -}); diff --git a/node_modules/mout/src/object/bindAll.js b/node_modules/mout/src/object/bindAll.js deleted file mode 100644 index 76576d6..0000000 --- a/node_modules/mout/src/object/bindAll.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./functions', '../function/bind', '../array/forEach', '../array/slice'], function (functions, bind, forEach, slice) { - - /** - * Binds methods of the object to be run in it's own context. - */ - function bindAll(obj, rest_methodNames){ - var keys = arguments.length > 1? - slice(arguments, 1) : functions(obj); - forEach(keys, function(key){ - obj[key] = bind(obj[key], obj); - }); - } - - return bindAll; - -}); diff --git a/node_modules/mout/src/object/contains.js b/node_modules/mout/src/object/contains.js deleted file mode 100644 index 297e898..0000000 --- a/node_modules/mout/src/object/contains.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./some'], function (some) { - - /** - * Check if object contains value - */ - function contains(obj, needle) { - return some(obj, function(val) { - return (val === needle); - }); - } - return contains; - -}); diff --git a/node_modules/mout/src/object/deepFillIn.js b/node_modules/mout/src/object/deepFillIn.js deleted file mode 100644 index ee69c3d..0000000 --- a/node_modules/mout/src/object/deepFillIn.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Deeply copy missing properties in the target from the defaults. - */ - function deepFillIn(target, defaults){ - var i = 0, - n = arguments.length, - obj; - - while(++i < n) { - obj = arguments[i]; - if (obj) { - // jshint loopfunc: true - forOwn(obj, function(newValue, key) { - var curValue = target[key]; - if (curValue == null) { - target[key] = newValue; - } else if (isPlainObject(curValue) && - isPlainObject(newValue)) { - deepFillIn(curValue, newValue); - } - }); - } - } - - return target; - } - - return deepFillIn; - -}); diff --git a/node_modules/mout/src/object/deepMatches.js b/node_modules/mout/src/object/deepMatches.js deleted file mode 100644 index ffd43e3..0000000 --- a/node_modules/mout/src/object/deepMatches.js +++ /dev/null @@ -1,55 +0,0 @@ -define(['./forOwn', '../lang/isArray'], function(forOwn, isArray) { - - function containsMatch(array, pattern) { - var i = -1, length = array.length; - while (++i < length) { - if (deepMatches(array[i], pattern)) { - return true; - } - } - - return false; - } - - function matchArray(target, pattern) { - var i = -1, patternLength = pattern.length; - while (++i < patternLength) { - if (!containsMatch(target, pattern[i])) { - return false; - } - } - - return true; - } - - function matchObject(target, pattern) { - var result = true; - forOwn(pattern, function(val, key) { - if (!deepMatches(target[key], val)) { - // Return false to break out of forOwn early - return (result = false); - } - }); - - return result; - } - - /** - * Recursively check if the objects match. - */ - function deepMatches(target, pattern){ - if (target && typeof target === 'object' && - pattern && typeof pattern === 'object') { - if (isArray(target) && isArray(pattern)) { - return matchArray(target, pattern); - } else { - return matchObject(target, pattern); - } - } else { - return target === pattern; - } - } - - return deepMatches; - -}); diff --git a/node_modules/mout/src/object/deepMixIn.js b/node_modules/mout/src/object/deepMixIn.js deleted file mode 100644 index 1b4178e..0000000 --- a/node_modules/mout/src/object/deepMixIn.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /** - * Mixes objects into the target object, recursively mixing existing child - * objects. - */ - function deepMixIn(target, objects) { - var i = 0, - n = arguments.length, - obj; - - while(++i < n){ - obj = arguments[i]; - if (obj) { - forOwn(obj, copyProp, target); - } - } - - return target; - } - - function copyProp(val, key) { - var existing = this[key]; - if (isPlainObject(val) && isPlainObject(existing)) { - deepMixIn(existing, val); - } else { - this[key] = val; - } - } - - return deepMixIn; - -}); diff --git a/node_modules/mout/src/object/equals.js b/node_modules/mout/src/object/equals.js deleted file mode 100644 index aeb8740..0000000 --- a/node_modules/mout/src/object/equals.js +++ /dev/null @@ -1,30 +0,0 @@ -define(['./hasOwn', './every', '../lang/isObject', '../lang/is'], function(hasOwn, every, isObject, is) { - - // Makes a function to compare the object values from the specified compare - // operation callback. - function makeCompare(callback) { - return function(value, key) { - return hasOwn(this, key) && callback(value, this[key]); - }; - } - - function checkProperties(value, key) { - return hasOwn(this, key); - } - - /** - * Checks if two objects have the same keys and values. - */ - function equals(a, b, callback) { - callback = callback || is; - - if (!isObject(a) || !isObject(b)) { - return callback(a, b); - } - - return (every(a, makeCompare(callback), b) && - every(b, checkProperties, a)); - } - - return equals; -}); diff --git a/node_modules/mout/src/object/every.js b/node_modules/mout/src/object/every.js deleted file mode 100644 index 52983a5..0000000 --- a/node_modules/mout/src/object/every.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object every - */ - function every(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = true; - forOwn(obj, function(val, key) { - // we consider any falsy values as "false" on purpose so shorthand - // syntax can be used to check property existence - if (!callback(val, key, obj)) { - result = false; - return false; // break - } - }); - return result; - } - - return every; - -}); diff --git a/node_modules/mout/src/object/fillIn.js b/node_modules/mout/src/object/fillIn.js deleted file mode 100644 index 363beab..0000000 --- a/node_modules/mout/src/object/fillIn.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach', '../array/slice', './forOwn'], function (forEach, slice, forOwn) { - - /** - * Copy missing properties in the obj from the defaults. - */ - function fillIn(obj, var_defaults){ - forEach(slice(arguments, 1), function(base){ - forOwn(base, function(val, key){ - if (obj[key] == null) { - obj[key] = val; - } - }); - }); - return obj; - } - - return fillIn; - -}); diff --git a/node_modules/mout/src/object/filter.js b/node_modules/mout/src/object/filter.js deleted file mode 100644 index f213b91..0000000 --- a/node_modules/mout/src/object/filter.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object with all the properties where the callback returns - * true. - */ - function filterValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - output[key] = value; - } - }); - - return output; - } - return filterValues; -}); diff --git a/node_modules/mout/src/object/find.js b/node_modules/mout/src/object/find.js deleted file mode 100644 index 47e6b09..0000000 --- a/node_modules/mout/src/object/find.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./some', '../function/makeIterator_'], function(some, makeIterator) { - - /** - * Returns first item that matches criteria - */ - function find(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result; - some(obj, function(value, key, obj) { - if (callback(value, key, obj)) { - result = value; - return true; //break - } - }); - return result; - } - - return find; - -}); diff --git a/node_modules/mout/src/object/flatten.js b/node_modules/mout/src/object/flatten.js deleted file mode 100644 index 4fe07af..0000000 --- a/node_modules/mout/src/object/flatten.js +++ /dev/null @@ -1,37 +0,0 @@ -define(['./forOwn', '../lang/isPlainObject'], function (forOwn, isPlainObject) { - - /* - * Helper function to flatten to a destination object. - * Used to remove the need to create intermediate objects while flattening. - */ - function flattenTo(obj, result, prefix, level) { - forOwn(obj, function (value, key) { - var nestedPrefix = prefix ? prefix + '.' + key : key; - - if (level !== 0 && isPlainObject(value)) { - flattenTo(value, result, nestedPrefix, level - 1); - } else { - result[nestedPrefix] = value; - } - }); - - return result; - } - - /** - * Recursively flattens an object. - * A new object containing all the elements is returned. - * If level is specified, it will only flatten up to that level. - */ - function flatten(obj, level) { - if (obj == null) { - return {}; - } - - level = level == null ? -1 : level; - return flattenTo(obj, {}, '', level); - } - - return flatten; - -}); diff --git a/node_modules/mout/src/object/forIn.js b/node_modules/mout/src/object/forIn.js deleted file mode 100644 index 90f2706..0000000 --- a/node_modules/mout/src/object/forIn.js +++ /dev/null @@ -1,76 +0,0 @@ -define(['./hasOwn'], function (hasOwn) { - - var _hasDontEnumBug, - _dontEnums; - - function checkDontEnum(){ - _dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ]; - - _hasDontEnumBug = true; - - for (var key in {'toString': null}) { - _hasDontEnumBug = false; - } - } - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forIn(obj, fn, thisObj){ - var key, i = 0; - // no need to check if argument is a real object that way we can use - // it for arrays, functions, date, etc. - - //post-pone check till needed - if (_hasDontEnumBug == null) checkDontEnum(); - - for (key in obj) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - - - if (_hasDontEnumBug) { - var ctor = obj.constructor, - isProto = !!ctor && obj === ctor.prototype; - - while (key = _dontEnums[i++]) { - // For constructor, if it is a prototype object the constructor - // is always non-enumerable unless defined otherwise (and - // enumerated above). For non-prototype objects, it will have - // to be defined on this object, since it cannot be defined on - // any prototype objects. - // - // For other [[DontEnum]] properties, check if the value is - // different than Object prototype value. - if ( - (key !== 'constructor' || - (!isProto && hasOwn(obj, key))) && - obj[key] !== Object.prototype[key] - ) { - if (exec(fn, obj, key, thisObj) === false) { - break; - } - } - } - } - } - - function exec(fn, obj, key, thisObj){ - return fn.call(thisObj, obj[key], key, obj); - } - - return forIn; - -}); diff --git a/node_modules/mout/src/object/forOwn.js b/node_modules/mout/src/object/forOwn.js deleted file mode 100644 index b40cbaf..0000000 --- a/node_modules/mout/src/object/forOwn.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./hasOwn', './forIn'], function (hasOwn, forIn) { - - /** - * Similar to Array/forEach but works over object properties and fixes Don't - * Enum bug on IE. - * based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation - */ - function forOwn(obj, fn, thisObj){ - forIn(obj, function(val, key){ - if (hasOwn(obj, key)) { - return fn.call(thisObj, obj[key], key, obj); - } - }); - } - - return forOwn; - -}); diff --git a/node_modules/mout/src/object/functions.js b/node_modules/mout/src/object/functions.js deleted file mode 100644 index 60fee3d..0000000 --- a/node_modules/mout/src/object/functions.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['./forIn'], function (forIn) { - - /** - * return a list of all enumerable properties that have function values - */ - function functions(obj){ - var keys = []; - forIn(obj, function(val, key){ - if (typeof val === 'function'){ - keys.push(key); - } - }); - return keys.sort(); - } - - return functions; - -}); diff --git a/node_modules/mout/src/object/get.js b/node_modules/mout/src/object/get.js deleted file mode 100644 index d8298ca..0000000 --- a/node_modules/mout/src/object/get.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/isPrimitive'], function (isPrimitive) { - - /** - * get "nested" object property - */ - function get(obj, prop){ - if (!obj) return; - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - if (obj == null) return; - } - - return obj[last]; - } - - return get; - -}); diff --git a/node_modules/mout/src/object/has.js b/node_modules/mout/src/object/has.js deleted file mode 100644 index cc29817..0000000 --- a/node_modules/mout/src/object/has.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./get'], function (get) { - - var UNDEF; - - /** - * Check if object has nested property. - */ - function has(obj, prop){ - return get(obj, prop) !== UNDEF; - } - - return has; - -}); - diff --git a/node_modules/mout/src/object/hasOwn.js b/node_modules/mout/src/object/hasOwn.js deleted file mode 100644 index 5c53bcf..0000000 --- a/node_modules/mout/src/object/hasOwn.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function () { - - /** - * Safer Object.hasOwnProperty - */ - function hasOwn(obj, prop){ - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - return hasOwn; - -}); diff --git a/node_modules/mout/src/object/keys.js b/node_modules/mout/src/object/keys.js deleted file mode 100644 index ed7c4f9..0000000 --- a/node_modules/mout/src/object/keys.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object keys - */ - var keys = Object.keys || function (obj) { - var keys = []; - forOwn(obj, function(val, key){ - keys.push(key); - }); - return keys; - }; - - return keys; - -}); diff --git a/node_modules/mout/src/object/map.js b/node_modules/mout/src/object/map.js deleted file mode 100644 index 2958f6b..0000000 --- a/node_modules/mout/src/object/map.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Creates a new object where all the values are the result of calling - * `callback`. - */ - function mapValues(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var output = {}; - forOwn(obj, function(val, key, obj) { - output[key] = callback(val, key, obj); - }); - - return output; - } - return mapValues; -}); diff --git a/node_modules/mout/src/object/matches.js b/node_modules/mout/src/object/matches.js deleted file mode 100644 index 73ff427..0000000 --- a/node_modules/mout/src/object/matches.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * checks if a object contains all given properties/values - */ - function matches(target, props){ - // can't use "object/every" because of circular dependency - var result = true; - forOwn(props, function(val, key){ - if (target[key] !== val) { - // break loop at first difference - return (result = false); - } - }); - return result; - } - - return matches; - -}); diff --git a/node_modules/mout/src/object/max.js b/node_modules/mout/src/object/max.js deleted file mode 100644 index ef311dc..0000000 --- a/node_modules/mout/src/object/max.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/max', './values'], function(arrMax, values) { - - /** - * Returns maximum value inside object. - */ - function max(obj, compareFn) { - return arrMax(values(obj), compareFn); - } - - return max; -}); diff --git a/node_modules/mout/src/object/merge.js b/node_modules/mout/src/object/merge.js deleted file mode 100644 index d7cfede..0000000 --- a/node_modules/mout/src/object/merge.js +++ /dev/null @@ -1,38 +0,0 @@ -define(['./hasOwn', '../lang/deepClone', '../lang/isObject'], function (hasOwn, deepClone, isObject) { - - /** - * Deep merge objects. - */ - function merge() { - var i = 1, - key, val, obj, target; - - // make sure we don't modify source element and it's properties - // objects are passed by reference - target = deepClone( arguments[0] ); - - while (obj = arguments[i++]) { - for (key in obj) { - if ( ! hasOwn(obj, key) ) { - continue; - } - - val = obj[key]; - - if ( isObject(val) && isObject(target[key]) ){ - // inception, deep merge objects - target[key] = merge(target[key], val); - } else { - // make sure arrays, regexp, date, objects are cloned - target[key] = deepClone(val); - } - - } - } - - return target; - } - - return merge; - -}); diff --git a/node_modules/mout/src/object/min.js b/node_modules/mout/src/object/min.js deleted file mode 100644 index 9fb4c1a..0000000 --- a/node_modules/mout/src/object/min.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../array/min', './values'], function(arrMin, values) { - - /** - * Returns minimum value inside object. - */ - function min(obj, iterator) { - return arrMin(values(obj), iterator); - } - - return min; -}); diff --git a/node_modules/mout/src/object/mixIn.js b/node_modules/mout/src/object/mixIn.js deleted file mode 100644 index 6210b7e..0000000 --- a/node_modules/mout/src/object/mixIn.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn'], function(forOwn){ - - /** - * Combine properties from all the objects into first one. - * - This method affects target object in place, if you want to create a new Object pass an empty object as first param. - * @param {object} target Target Object - * @param {...object} objects Objects to be combined (0...n objects). - * @return {object} Target Object. - */ - function mixIn(target, objects){ - var i = 0, - n = arguments.length, - obj; - while(++i < n){ - obj = arguments[i]; - if (obj != null) { - forOwn(obj, copyProp, target); - } - } - return target; - } - - function copyProp(val, key){ - this[key] = val; - } - - return mixIn; -}); diff --git a/node_modules/mout/src/object/namespace.js b/node_modules/mout/src/object/namespace.js deleted file mode 100644 index 7ed65db..0000000 --- a/node_modules/mout/src/object/namespace.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['../array/forEach'], function (forEach) { - - /** - * Create nested object if non-existent - */ - function namespace(obj, path){ - if (!path) return obj; - forEach(path.split('.'), function(key){ - if (!obj[key]) { - obj[key] = {}; - } - obj = obj[key]; - }); - return obj; - } - - return namespace; - -}); diff --git a/node_modules/mout/src/object/omit.js b/node_modules/mout/src/object/omit.js deleted file mode 100644 index 829cc58..0000000 --- a/node_modules/mout/src/object/omit.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../array/slice', '../array/contains'], function(slice, contains){ - - /** - * Return a copy of the object, filtered to only contain properties except the blacklisted keys. - */ - function omit(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), - out = {}; - - for (var property in obj) { - if (obj.hasOwnProperty(property) && !contains(keys, property)) { - out[property] = obj[property]; - } - } - return out; - } - - return omit; - -}); diff --git a/node_modules/mout/src/object/pick.js b/node_modules/mout/src/object/pick.js deleted file mode 100644 index 9d5e351..0000000 --- a/node_modules/mout/src/object/pick.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../array/slice'], function(slice){ - - /** - * Return a copy of the object, filtered to only have values for the whitelisted keys. - */ - function pick(obj, var_keys){ - var keys = typeof arguments[1] !== 'string'? arguments[1] : slice(arguments, 1), - out = {}, - i = 0, key; - while (key = keys[i++]) { - out[key] = obj[key]; - } - return out; - } - - return pick; - -}); diff --git a/node_modules/mout/src/object/pluck.js b/node_modules/mout/src/object/pluck.js deleted file mode 100644 index d47744b..0000000 --- a/node_modules/mout/src/object/pluck.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./map', '../function/prop'], function (map, prop) { - - /** - * Extract a list of property values. - */ - function pluck(obj, propName){ - return map(obj, prop(propName)); - } - - return pluck; - -}); diff --git a/node_modules/mout/src/object/reduce.js b/node_modules/mout/src/object/reduce.js deleted file mode 100644 index d3a5778..0000000 --- a/node_modules/mout/src/object/reduce.js +++ /dev/null @@ -1,28 +0,0 @@ -define(['./forOwn', './size'], function(forOwn, size) { - - /** - * Object reduce - */ - function reduce(obj, callback, memo, thisObj) { - var initial = arguments.length > 2; - - if (!size(obj) && !initial) { - throw new Error('reduce of empty object with no initial value'); - } - - forOwn(obj, function(value, key, list) { - if (!initial) { - memo = value; - initial = true; - } - else { - memo = callback.call(thisObj, memo, value, key, list); - } - }); - - return memo; - } - - return reduce; - -}); diff --git a/node_modules/mout/src/object/reject.js b/node_modules/mout/src/object/reject.js deleted file mode 100644 index 8429642..0000000 --- a/node_modules/mout/src/object/reject.js +++ /dev/null @@ -1,15 +0,0 @@ -define(['./filter', '../function/makeIterator_'], function (filter, makeIterator) { - - /** - * Object reject - */ - function reject(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - return filter(obj, function(value, index, obj) { - return !callback(value, index, obj); - }, thisObj); - } - - return reject; - -}); diff --git a/node_modules/mout/src/object/result.js b/node_modules/mout/src/object/result.js deleted file mode 100644 index 133572d..0000000 --- a/node_modules/mout/src/object/result.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/isFunction'], function (isFunction) { - - function result(obj, prop) { - var property = obj[prop]; - - if(property === undefined) { - return; - } - - return isFunction(property) ? property.call(obj) : property; - } - - return result; -}); diff --git a/node_modules/mout/src/object/set.js b/node_modules/mout/src/object/set.js deleted file mode 100644 index 5b658e8..0000000 --- a/node_modules/mout/src/object/set.js +++ /dev/null @@ -1,22 +0,0 @@ -define(['./namespace'], function (namespace) { - - /** - * set "nested" object property - */ - function set(obj, prop, val){ - var stringifiedProp = prop.toString(); - // prototype pollution mitigation - if(stringifiedProp.includes('__proto__') || stringifiedProp.includes('prototype') || stringifiedProp.includes('constructor')) { - return false; - } - var parts = (/^(.+)\.(.+)$/).exec(stringifiedProp); - if (parts){ - namespace(obj, parts[1])[parts[2]] = val; - } else { - obj[stringifiedProp] = val; - } - } - - return set; - -}); diff --git a/node_modules/mout/src/object/size.js b/node_modules/mout/src/object/size.js deleted file mode 100644 index c6e377c..0000000 --- a/node_modules/mout/src/object/size.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object size - */ - function size(obj) { - var count = 0; - forOwn(obj, function(){ - count++; - }); - return count; - } - - return size; - -}); diff --git a/node_modules/mout/src/object/some.js b/node_modules/mout/src/object/some.js deleted file mode 100644 index 1bd6fda..0000000 --- a/node_modules/mout/src/object/some.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['./forOwn', '../function/makeIterator_'], function(forOwn, makeIterator) { - - /** - * Object some - */ - function some(obj, callback, thisObj) { - callback = makeIterator(callback, thisObj); - var result = false; - forOwn(obj, function(val, key) { - if (callback(val, key, obj)) { - result = true; - return false; // break - } - }); - return result; - } - - return some; - -}); diff --git a/node_modules/mout/src/object/unset.js b/node_modules/mout/src/object/unset.js deleted file mode 100644 index 787fc19..0000000 --- a/node_modules/mout/src/object/unset.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./has'], function (has) { - - /** - * Unset object property. - */ - function unset(obj, prop){ - if (has(obj, prop)) { - var parts = prop.split('.'), - last = parts.pop(); - while (prop = parts.shift()) { - obj = obj[prop]; - } - return (delete obj[last]); - - } else { - // if property doesn't exist treat as deleted - return true; - } - } - - return unset; - -}); diff --git a/node_modules/mout/src/object/values.js b/node_modules/mout/src/object/values.js deleted file mode 100644 index b311fd0..0000000 --- a/node_modules/mout/src/object/values.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['./forOwn'], function (forOwn) { - - /** - * Get object values - */ - function values(obj) { - var vals = []; - forOwn(obj, function(val, key){ - vals.push(val); - }); - return vals; - } - - return values; - -}); diff --git a/node_modules/mout/src/queryString.js b/node_modules/mout/src/queryString.js deleted file mode 100644 index 4434612..0000000 --- a/node_modules/mout/src/queryString.js +++ /dev/null @@ -1,15 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'contains' : require('./queryString/contains'), - 'decode' : require('./queryString/decode'), - 'encode' : require('./queryString/encode'), - 'getParam' : require('./queryString/getParam'), - 'getQuery' : require('./queryString/getQuery'), - 'parse' : require('./queryString/parse'), - 'setParam' : require('./queryString/setParam') -}; - -}); diff --git a/node_modules/mout/src/queryString/contains.js b/node_modules/mout/src/queryString/contains.js deleted file mode 100644 index a6d11cc..0000000 --- a/node_modules/mout/src/queryString/contains.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./getQuery'], function (getQuery) { - - /** - * Checks if query string contains parameter. - */ - function contains(url, paramName) { - var regex = new RegExp('(\\?|&)'+ paramName +'=', 'g'); //matches `?param=` or `¶m=` - return regex.test(getQuery(url)); - } - - return contains; -}); diff --git a/node_modules/mout/src/queryString/decode.js b/node_modules/mout/src/queryString/decode.js deleted file mode 100644 index a37c123..0000000 --- a/node_modules/mout/src/queryString/decode.js +++ /dev/null @@ -1,34 +0,0 @@ -define(['../string/typecast', '../lang/isArray', '../object/hasOwn'], function (typecast, isArray, hasOwn) { - - /** - * Decode query string into an object of keys => vals. - */ - function decode(queryStr, shouldTypecast) { - var queryArr = (queryStr || '').replace('?', '').split('&'), - reg = /([^=]+)=(.+)/, - i = -1, - obj = {}, - equalIndex, cur, pValue, pName; - - while ((cur = queryArr[++i])) { - equalIndex = cur.indexOf('='); - pName = cur.substring(0, equalIndex); - pValue = decodeURIComponent(cur.substring(equalIndex + 1)); - if (shouldTypecast !== false) { - pValue = typecast(pValue); - } - if (hasOwn(obj, pName)){ - if(isArray(obj[pName])){ - obj[pName].push(pValue); - } else { - obj[pName] = [obj[pName], pValue]; - } - } else { - obj[pName] = pValue; - } - } - return obj; - } - - return decode; -}); diff --git a/node_modules/mout/src/queryString/encode.js b/node_modules/mout/src/queryString/encode.js deleted file mode 100644 index c249287..0000000 --- a/node_modules/mout/src/queryString/encode.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['../object/forOwn','../lang/isArray','../array/forEach'], function (forOwn,isArray,forEach) { - - /** - * Encode object into a query string. - */ - function encode(obj){ - var query = [], - arrValues, reg; - forOwn(obj, function (val, key) { - if (isArray(val)) { - arrValues = key + '='; - reg = new RegExp('&'+key+'+=$'); - forEach(val, function (aValue) { - arrValues += encodeURIComponent(aValue) + '&' + key + '='; - }); - query.push(arrValues.replace(reg, '')); - } else { - query.push(key + '=' + encodeURIComponent(val)); - } - }); - return (query.length) ? '?' + query.join('&') : ''; - } - - return encode; -}); diff --git a/node_modules/mout/src/queryString/getParam.js b/node_modules/mout/src/queryString/getParam.js deleted file mode 100644 index d981372..0000000 --- a/node_modules/mout/src/queryString/getParam.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../string/typecast', './getQuery'], function (typecast, getQuery) { - - /** - * Get query parameter value. - */ - function getParam(url, param, shouldTypecast){ - var regexp = new RegExp('(\\?|&)'+ param + '=([^&]*)'), //matches `?param=value` or `¶m=value`, value = $2 - result = regexp.exec( getQuery(url) ), - val = (result && result[2])? result[2] : null; - return shouldTypecast === false? val : typecast(val); - } - - return getParam; -}); diff --git a/node_modules/mout/src/queryString/getQuery.js b/node_modules/mout/src/queryString/getQuery.js deleted file mode 100644 index 995e00d..0000000 --- a/node_modules/mout/src/queryString/getQuery.js +++ /dev/null @@ -1,13 +0,0 @@ -define(function () { - - /** - * Gets full query as string with all special chars decoded. - */ - function getQuery(url) { - // url = url.replace(/#.*\?/, '?'); //removes hash (to avoid getting hash query) - var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt - return (queryString)? decodeURIComponent(queryString[0].replace(/\+/g,' ')) : ''; - } - - return getQuery; -}); diff --git a/node_modules/mout/src/queryString/parse.js b/node_modules/mout/src/queryString/parse.js deleted file mode 100644 index ac153e3..0000000 --- a/node_modules/mout/src/queryString/parse.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./decode', './getQuery'], function (decode, getQuery) { - - /** - * Get query string, parses and decodes it. - */ - function parse(url, shouldTypecast) { - return decode(getQuery(url), shouldTypecast); - } - - return parse; -}); - diff --git a/node_modules/mout/src/queryString/setParam.js b/node_modules/mout/src/queryString/setParam.js deleted file mode 100644 index 97081aa..0000000 --- a/node_modules/mout/src/queryString/setParam.js +++ /dev/null @@ -1,28 +0,0 @@ -define(function () { - - /** - * Set query string parameter value - */ - function setParam(url, paramName, value){ - url = url || ''; - - var re = new RegExp('(\\?|&)'+ paramName +'=[^&]*' ); - var param = paramName +'='+ encodeURIComponent( value ); - - if ( re.test(url) ) { - return url.replace(re, '$1'+ param); - } else { - if (url.indexOf('?') === -1) { - url += '?'; - } - if (url.indexOf('=') !== -1) { - url += '&'; - } - return url + param; - } - - } - - return setParam; - -}); diff --git a/node_modules/mout/src/random.js b/node_modules/mout/src/random.js deleted file mode 100644 index b47f203..0000000 --- a/node_modules/mout/src/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'choice' : require('./random/choice'), - 'guid' : require('./random/guid'), - 'rand' : require('./random/rand'), - 'randBit' : require('./random/randBit'), - 'randBool' : require('./random/randBool'), - 'randHex' : require('./random/randHex'), - 'randInt' : require('./random/randInt'), - 'randSign' : require('./random/randSign'), - 'randString' : require('./random/randString'), - 'random' : require('./random/random') -}; - -}); diff --git a/node_modules/mout/src/random/choice.js b/node_modules/mout/src/random/choice.js deleted file mode 100644 index 0d0c38d..0000000 --- a/node_modules/mout/src/random/choice.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['./randInt', '../lang/isArray'], function (randInt, isArray) { - - /** - * Returns a random element from the supplied arguments - * or from the array (if single argument is an array). - */ - function choice(items) { - var target = (arguments.length === 1 && isArray(items))? items : arguments; - return target[ randInt(0, target.length - 1) ]; - } - - return choice; - -}); diff --git a/node_modules/mout/src/random/guid.js b/node_modules/mout/src/random/guid.js deleted file mode 100644 index 82f3a2d..0000000 --- a/node_modules/mout/src/random/guid.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['./randHex', './choice'], function (randHex, choice) { - - /** - * Returns pseudo-random guid (UUID v4) - * IMPORTANT: it's not totally "safe" since randHex/choice uses Math.random - * by default and sequences can be predicted in some cases. See the - * "random/random" documentation for more info about it and how to replace - * the default PRNG. - */ - function guid() { - return ( - randHex(8)+'-'+ - randHex(4)+'-'+ - // v4 UUID always contain "4" at this position to specify it was - // randomly generated - '4' + randHex(3) +'-'+ - // v4 UUID always contain chars [a,b,8,9] at this position - choice(8, 9, 'a', 'b') + randHex(3)+'-'+ - randHex(12) - ); - } - return guid; -}); diff --git a/node_modules/mout/src/random/rand.js b/node_modules/mout/src/random/rand.js deleted file mode 100644 index b8c231d..0000000 --- a/node_modules/mout/src/random/rand.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['./random', '../number/MIN_INT', '../number/MAX_INT'], function(random, MIN_INT, MAX_INT){ - - /** - * Returns random number inside range - */ - function rand(min, max){ - min = min == null? MIN_INT : min; - max = max == null? MAX_INT : max; - return min + (max - min) * random(); - } - - return rand; -}); diff --git a/node_modules/mout/src/random/randBit.js b/node_modules/mout/src/random/randBit.js deleted file mode 100644 index 398fa2c..0000000 --- a/node_modules/mout/src/random/randBit.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./randBool'], function (randBool) { - - /** - * Returns random bit (0 or 1) - */ - function randomBit() { - return randBool()? 1 : 0; - } - - return randomBit; -}); diff --git a/node_modules/mout/src/random/randBool.js b/node_modules/mout/src/random/randBool.js deleted file mode 100644 index 8d9be0b..0000000 --- a/node_modules/mout/src/random/randBool.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['./random'], function (random) { - - /** - * returns a random boolean value (true or false) - */ - function randBool(){ - return random() >= 0.5; - } - - return randBool; - -}); diff --git a/node_modules/mout/src/random/randHex.js b/node_modules/mout/src/random/randHex.js deleted file mode 100644 index 6e9bf1c..0000000 --- a/node_modules/mout/src/random/randHex.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['./choice'], function (choice) { - - var _chars = '0123456789abcdef'.split(''); - - /** - * Returns a random hexadecimal string - */ - function randHex(size){ - size = size && size > 0? size : 6; - var str = ''; - while (size--) { - str += choice(_chars); - } - return str; - } - - return randHex; - -}); diff --git a/node_modules/mout/src/random/randInt.js b/node_modules/mout/src/random/randInt.js deleted file mode 100644 index 1750e9d..0000000 --- a/node_modules/mout/src/random/randInt.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../number/MIN_INT', '../number/MAX_INT', './rand'], function(MIN_INT, MAX_INT, rand){ - - /** - * Gets random integer inside range or snap to min/max values. - */ - function randInt(min, max){ - min = min == null? MIN_INT : ~~min; - max = max == null? MAX_INT : ~~max; - // can't be max + 0.5 otherwise it will round up if `rand` - // returns `max` causing it to overflow range. - // -0.5 and + 0.49 are required to avoid bias caused by rounding - return Math.round( rand(min - 0.5, max + 0.499999999999) ); - } - - return randInt; -}); diff --git a/node_modules/mout/src/random/randSign.js b/node_modules/mout/src/random/randSign.js deleted file mode 100644 index 1171b40..0000000 --- a/node_modules/mout/src/random/randSign.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['./randBool'], function (randBool) { - - /** - * Returns random sign (-1 or 1) - */ - function randomSign() { - return randBool()? 1 : -1; - } - - return randomSign; -}); diff --git a/node_modules/mout/src/random/randString.js b/node_modules/mout/src/random/randString.js deleted file mode 100644 index d309d08..0000000 --- a/node_modules/mout/src/random/randString.js +++ /dev/null @@ -1,29 +0,0 @@ -define([ - '../lang/isNumber', - '../lang/isString', - './randInt' -], function (isNumber, isString, randInt) { - - var defaultDictionary = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - function randomString(length, dictionary) { - if(!isNumber(length) || length <= 0) { - length = 8; - } - - if(!isString(dictionary) || dictionary.length < 1) { - dictionary = defaultDictionary; - } - - var result = '', - domain = dictionary.length - 1; - - while(length--) { - result += dictionary[randInt(0, domain)]; - } - - return result; - } - - return randomString; -}); diff --git a/node_modules/mout/src/random/random.js b/node_modules/mout/src/random/random.js deleted file mode 100644 index 4270822..0000000 --- a/node_modules/mout/src/random/random.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Just a wrapper to Math.random. No methods inside mout/random should call - * Math.random() directly so we can inject the pseudo-random number - * generator if needed (ie. in case we need a seeded random or a better - * algorithm than the native one) - */ - function random(){ - return random.get(); - } - - // we expose the method so it can be swapped if needed - random.get = Math.random; - - return random; - -}); diff --git a/node_modules/mout/src/string.js b/node_modules/mout/src/string.js deleted file mode 100644 index 49effa7..0000000 --- a/node_modules/mout/src/string.js +++ /dev/null @@ -1,47 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'insert' : require('./string/insert'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'stripMargin' : require('./string/stripMargin'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - -}); diff --git a/node_modules/mout/src/string/WHITE_SPACES.js b/node_modules/mout/src/string/WHITE_SPACES.js deleted file mode 100644 index e830d86..0000000 --- a/node_modules/mout/src/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function() { - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - return [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; -}); diff --git a/node_modules/mout/src/string/camelCase.js b/node_modules/mout/src/string/camelCase.js deleted file mode 100644 index 68cf274..0000000 --- a/node_modules/mout/src/string/camelCase.js +++ /dev/null @@ -1,30 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './upperCase', './lowerCase'], function(toString, replaceAccents, removeNonWord, upperCase, lowerCase){ - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' '); // convert all hyphens and underscores to spaces - - // handle acronyms - // matches lowercase chars && uppercase words - if (/[a-z]/.test(str) && /^|\s[A-Z]+\s|$/.test(str)) { - // we convert any word that isn't all caps into lowercase - str = str.replace(/\s(\w+)/g, function(word, m) { - return /^[A-Z]+$/.test(m) ? word : lowerCase(word); - }); - } else if (/\s/.test(str)) { - // if it doesn't contain an acronym and it has spaces we should - // convert every word to lowercase - str = lowerCase(str); - } - - return str - .replace(/\s[a-z]/g, upperCase) // convert first char of each word to UPPERCASE - .replace(/^\s*[A-Z]+/g, lowerCase) // convert first word to lowercase - .replace(/\s+/g, ''); // remove spaces - } - return camelCase; -}); diff --git a/node_modules/mout/src/string/contains.js b/node_modules/mout/src/string/contains.js deleted file mode 100644 index 825b5a5..0000000 --- a/node_modules/mout/src/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - return contains; - -}); diff --git a/node_modules/mout/src/string/crop.js b/node_modules/mout/src/string/crop.js deleted file mode 100644 index 3c073f0..0000000 --- a/node_modules/mout/src/string/crop.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './truncate'], function (toString, truncate) { - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - return crop; -}); diff --git a/node_modules/mout/src/string/endsWith.js b/node_modules/mout/src/string/endsWith.js deleted file mode 100644 index 31a73f2..0000000 --- a/node_modules/mout/src/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function(toString) { - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - return endsWith; -}); diff --git a/node_modules/mout/src/string/escapeHtml.js b/node_modules/mout/src/string/escapeHtml.js deleted file mode 100644 index de34b61..0000000 --- a/node_modules/mout/src/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - return escapeHtml; - -}); diff --git a/node_modules/mout/src/string/escapeRegExp.js b/node_modules/mout/src/string/escapeRegExp.js deleted file mode 100644 index 862655b..0000000 --- a/node_modules/mout/src/string/escapeRegExp.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - return toString(str).replace(/\W/g,'\\$&'); - } - - return escapeRegExp; - -}); diff --git a/node_modules/mout/src/string/escapeUnicode.js b/node_modules/mout/src/string/escapeUnicode.js deleted file mode 100644 index bd5e8c4..0000000 --- a/node_modules/mout/src/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - return escapeUnicode; - -}); diff --git a/node_modules/mout/src/string/hyphenate.js b/node_modules/mout/src/string/hyphenate.js deleted file mode 100644 index 679c405..0000000 --- a/node_modules/mout/src/string/hyphenate.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - return hyphenate; -}); diff --git a/node_modules/mout/src/string/insert.js b/node_modules/mout/src/string/insert.js deleted file mode 100644 index 79c45be..0000000 --- a/node_modules/mout/src/string/insert.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../math/clamp', '../lang/toString'], function (clamp, toString) { - - /** - * Inserts a string at a given index. - */ - function insert(string, index, partial){ - string = toString(string); - - if (index < 0) { - index = string.length + index; - } - - index = clamp(index, 0, string.length); - - return string.substr(0, index) + partial + string.substr(index); - } - - return insert; - -}); diff --git a/node_modules/mout/src/string/interpolate.js b/node_modules/mout/src/string/interpolate.js deleted file mode 100644 index b5e7f4b..0000000 --- a/node_modules/mout/src/string/interpolate.js +++ /dev/null @@ -1,21 +0,0 @@ -define([ - '../lang/toString', - '../object/get' -], function(toString, get) { - - var stache = /\{\{([^\}]+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return toString( get(replacements, prop) ); - }; - return template.replace(syntax || stache, replaceFn); - } - - return interpolate; - -}); diff --git a/node_modules/mout/src/string/lowerCase.js b/node_modules/mout/src/string/lowerCase.js deleted file mode 100644 index b045d69..0000000 --- a/node_modules/mout/src/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - return lowerCase; -}); diff --git a/node_modules/mout/src/string/lpad.js b/node_modules/mout/src/string/lpad.js deleted file mode 100644 index 134b415..0000000 --- a/node_modules/mout/src/string/lpad.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString', './repeat'], function(toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return (str.length < minLen) ? - repeat(ch, minLen - str.length) + str : str; - } - - return lpad; - -}); diff --git a/node_modules/mout/src/string/ltrim.js b/node_modules/mout/src/string/ltrim.js deleted file mode 100644 index 477df95..0000000 --- a/node_modules/mout/src/string/ltrim.js +++ /dev/null @@ -1,33 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - return ltrim; -}); diff --git a/node_modules/mout/src/string/makePath.js b/node_modules/mout/src/string/makePath.js deleted file mode 100644 index 3a6869e..0000000 --- a/node_modules/mout/src/string/makePath.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../array/join', '../array/slice'], function(join, slice){ - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(slice(arguments), '/'); - // need to disconsider duplicate '/' after protocol (eg: 'http://') - return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); - } - - return makePath; -}); diff --git a/node_modules/mout/src/string/normalizeLineBreaks.js b/node_modules/mout/src/string/normalizeLineBreaks.js deleted file mode 100644 index 44e4194..0000000 --- a/node_modules/mout/src/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - return normalizeLineBreaks; - -}); diff --git a/node_modules/mout/src/string/pascalCase.js b/node_modules/mout/src/string/pascalCase.js deleted file mode 100644 index ead9ead..0000000 --- a/node_modules/mout/src/string/pascalCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './camelCase', './upperCase'], function(toString, camelCase, upperCase){ - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - return pascalCase; -}); diff --git a/node_modules/mout/src/string/properCase.js b/node_modules/mout/src/string/properCase.js deleted file mode 100644 index 2987b50..0000000 --- a/node_modules/mout/src/string/properCase.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - return properCase; -}); diff --git a/node_modules/mout/src/string/removeNonASCII.js b/node_modules/mout/src/string/removeNonASCII.js deleted file mode 100644 index 4905869..0000000 --- a/node_modules/mout/src/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - return removeNonASCII; -}); diff --git a/node_modules/mout/src/string/removeNonWord.js b/node_modules/mout/src/string/removeNonWord.js deleted file mode 100644 index fb737d7..0000000 --- a/node_modules/mout/src/string/removeNonWord.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString'], function(toString){ - // This pattern is generated by the _build/pattern-removeNonWord.js script - var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; - - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(PATTERN, ''); - } - - return removeNonWord; -}); diff --git a/node_modules/mout/src/string/repeat.js b/node_modules/mout/src/string/repeat.js deleted file mode 100644 index 0a25d83..0000000 --- a/node_modules/mout/src/string/repeat.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['../lang/toString', '../number/toInt'], function(toString, toInt){ - - /** - * Repeat string n times - */ - function repeat(str, n){ - var result = ''; - str = toString(str); - n = toInt(n); - if (n < 1) { - return ''; - } - while (n > 0) { - if (n % 2) { - result += str; - } - n = Math.floor(n / 2); - str += str; - } - return result; - } - - return repeat; - -}); diff --git a/node_modules/mout/src/string/replace.js b/node_modules/mout/src/string/replace.js deleted file mode 100644 index 8b762fd..0000000 --- a/node_modules/mout/src/string/replace.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', '../lang/toArray'], function (toString, toArray) { - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - return replace; - -}); diff --git a/node_modules/mout/src/string/replaceAccents.js b/node_modules/mout/src/string/replaceAccents.js deleted file mode 100644 index 3a63f55..0000000 --- a/node_modules/mout/src/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - return replaceAccents; -}); diff --git a/node_modules/mout/src/string/rpad.js b/node_modules/mout/src/string/rpad.js deleted file mode 100644 index 2efd9c8..0000000 --- a/node_modules/mout/src/string/rpad.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['../lang/toString', './repeat'], function (toString, repeat) { - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - return rpad; - -}); diff --git a/node_modules/mout/src/string/rtrim.js b/node_modules/mout/src/string/rtrim.js deleted file mode 100644 index a4cc282..0000000 --- a/node_modules/mout/src/string/rtrim.js +++ /dev/null @@ -1,32 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){ - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - return rtrim; -}); diff --git a/node_modules/mout/src/string/sentenceCase.js b/node_modules/mout/src/string/sentenceCase.js deleted file mode 100644 index cfe45af..0000000 --- a/node_modules/mout/src/string/sentenceCase.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString', './lowerCase', './upperCase'], function(toString, lowerCase, upperCase){ - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - return sentenceCase; -}); diff --git a/node_modules/mout/src/string/slugify.js b/node_modules/mout/src/string/slugify.js deleted file mode 100644 index b70f3f5..0000000 --- a/node_modules/mout/src/string/slugify.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './replaceAccents', './removeNonWord', './trim'], function(toString, replaceAccents, removeNonWord, trim){ - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimiter. - * Does not split camelCase text. - */ - function slugify(str, delimiter){ - str = toString(str); - - if (delimiter == null) { - delimiter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimiter) //replace spaces with delimiter - .toLowerCase(); - return str; - } - return slugify; -}); diff --git a/node_modules/mout/src/string/startsWith.js b/node_modules/mout/src/string/startsWith.js deleted file mode 100644 index 88ae545..0000000 --- a/node_modules/mout/src/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -define(['../lang/toString'], function (toString) { - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - return startsWith; -}); diff --git a/node_modules/mout/src/string/stripHtmlTags.js b/node_modules/mout/src/string/stripHtmlTags.js deleted file mode 100644 index e8da956..0000000 --- a/node_modules/mout/src/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - return stripHtmlTags; -}); diff --git a/node_modules/mout/src/string/stripMargin.js b/node_modules/mout/src/string/stripMargin.js deleted file mode 100644 index 24f9a1e..0000000 --- a/node_modules/mout/src/string/stripMargin.js +++ /dev/null @@ -1,21 +0,0 @@ -define(['../lang/toString', './escapeRegExp'], function (toString, escapeRegExp) { - var DEFAULT_MARGIN_CHAR = '|'; - /** - * Strip leading characters followed by 'marginChar' from every line in a String. - * - * marginChar defaults to '|'. - */ - function stripMargin(str, marginChar) { - var regexp; - - marginChar = escapeRegExp(marginChar || DEFAULT_MARGIN_CHAR); - str = toString(str); - - regexp = new RegExp('^.*' + marginChar, 'gm'); - - return str.replace(regexp, ''); - } - - return stripMargin; - -}); diff --git a/node_modules/mout/src/string/trim.js b/node_modules/mout/src/string/trim.js deleted file mode 100644 index 5552604..0000000 --- a/node_modules/mout/src/string/trim.js +++ /dev/null @@ -1,12 +0,0 @@ -define(['../lang/toString', './WHITE_SPACES', './ltrim', './rtrim'], function(toString, WHITE_SPACES, ltrim, rtrim){ - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - return trim; -}); diff --git a/node_modules/mout/src/string/truncate.js b/node_modules/mout/src/string/truncate.js deleted file mode 100644 index 34000d9..0000000 --- a/node_modules/mout/src/string/truncate.js +++ /dev/null @@ -1,20 +0,0 @@ -define(['../lang/toString', './trim'], function(toString, trim){ - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - return truncate; -}); diff --git a/node_modules/mout/src/string/typecast.js b/node_modules/mout/src/string/typecast.js deleted file mode 100644 index a7c8315..0000000 --- a/node_modules/mout/src/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - return typecast; -}); diff --git a/node_modules/mout/src/string/unCamelCase.js b/node_modules/mout/src/string/unCamelCase.js deleted file mode 100644 index eeef39b..0000000 --- a/node_modules/mout/src/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../lang/toString'], function(toString){ - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - return unCamelCase; -}); diff --git a/node_modules/mout/src/string/underscore.js b/node_modules/mout/src/string/underscore.js deleted file mode 100644 index 75dd464..0000000 --- a/node_modules/mout/src/string/underscore.js +++ /dev/null @@ -1,11 +0,0 @@ -define(['../lang/toString', './slugify', './unCamelCase'], function(toString, slugify, unCamelCase){ - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - return underscore; -}); diff --git a/node_modules/mout/src/string/unescapeHtml.js b/node_modules/mout/src/string/unescapeHtml.js deleted file mode 100644 index ca89042..0000000 --- a/node_modules/mout/src/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -define(['../lang/toString'], function (toString) { - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/�*39;/g , "'") - .replace(/"/g, '"'); - return str; - } - - return unescapeHtml; - -}); diff --git a/node_modules/mout/src/string/unescapeUnicode.js b/node_modules/mout/src/string/unescapeUnicode.js deleted file mode 100644 index d4a7ba1..0000000 --- a/node_modules/mout/src/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['../lang/toString'], function(toString) { - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - return unescapeUnicode; - -}); diff --git a/node_modules/mout/src/string/unhyphenate.js b/node_modules/mout/src/string/unhyphenate.js deleted file mode 100644 index 6ac2fa4..0000000 --- a/node_modules/mout/src/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - return unhyphenate; -}); diff --git a/node_modules/mout/src/string/upperCase.js b/node_modules/mout/src/string/upperCase.js deleted file mode 100644 index 8b2073e..0000000 --- a/node_modules/mout/src/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -define(['../lang/toString'], function(toString){ - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - return upperCase; -}); diff --git a/node_modules/mout/src/time.js b/node_modules/mout/src/time.js deleted file mode 100644 index 67c9068..0000000 --- a/node_modules/mout/src/time.js +++ /dev/null @@ -1,12 +0,0 @@ -define(function(require){ - -//automatically generated, do not edit! -//run `node build` instead -return { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - -}); diff --git a/node_modules/mout/src/time/convert.js b/node_modules/mout/src/time/convert.js deleted file mode 100644 index 2de0cf2..0000000 --- a/node_modules/mout/src/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ -define(function () { - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - return convert; - -}); diff --git a/node_modules/mout/src/time/now.js b/node_modules/mout/src/time/now.js deleted file mode 100644 index 4b2d03c..0000000 --- a/node_modules/mout/src/time/now.js +++ /dev/null @@ -1,18 +0,0 @@ -define(function () { - - /** - * Get current time in miliseconds - */ - function now(){ - // yes, we defer the work to another function to allow mocking it - // during the tests - return now.get(); - } - - now.get = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - return now; - -}); diff --git a/node_modules/mout/src/time/parseMs.js b/node_modules/mout/src/time/parseMs.js deleted file mode 100644 index 964929a..0000000 --- a/node_modules/mout/src/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -define(['../math/countSteps'], function(countSteps){ - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - return parseMs; -}); diff --git a/node_modules/mout/src/time/toTimeString.js b/node_modules/mout/src/time/toTimeString.js deleted file mode 100644 index edf1821..0000000 --- a/node_modules/mout/src/time/toTimeString.js +++ /dev/null @@ -1,23 +0,0 @@ -define(['../math/countSteps', '../number/pad'], function(countSteps, pad){ - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - return toTimeString; -}); diff --git a/node_modules/mout/string.js b/node_modules/mout/string.js deleted file mode 100644 index fff8779..0000000 --- a/node_modules/mout/string.js +++ /dev/null @@ -1,47 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'WHITE_SPACES' : require('./string/WHITE_SPACES'), - 'camelCase' : require('./string/camelCase'), - 'contains' : require('./string/contains'), - 'crop' : require('./string/crop'), - 'endsWith' : require('./string/endsWith'), - 'escapeHtml' : require('./string/escapeHtml'), - 'escapeRegExp' : require('./string/escapeRegExp'), - 'escapeUnicode' : require('./string/escapeUnicode'), - 'hyphenate' : require('./string/hyphenate'), - 'insert' : require('./string/insert'), - 'interpolate' : require('./string/interpolate'), - 'lowerCase' : require('./string/lowerCase'), - 'lpad' : require('./string/lpad'), - 'ltrim' : require('./string/ltrim'), - 'makePath' : require('./string/makePath'), - 'normalizeLineBreaks' : require('./string/normalizeLineBreaks'), - 'pascalCase' : require('./string/pascalCase'), - 'properCase' : require('./string/properCase'), - 'removeNonASCII' : require('./string/removeNonASCII'), - 'removeNonWord' : require('./string/removeNonWord'), - 'repeat' : require('./string/repeat'), - 'replace' : require('./string/replace'), - 'replaceAccents' : require('./string/replaceAccents'), - 'rpad' : require('./string/rpad'), - 'rtrim' : require('./string/rtrim'), - 'sentenceCase' : require('./string/sentenceCase'), - 'slugify' : require('./string/slugify'), - 'startsWith' : require('./string/startsWith'), - 'stripHtmlTags' : require('./string/stripHtmlTags'), - 'stripMargin' : require('./string/stripMargin'), - 'trim' : require('./string/trim'), - 'truncate' : require('./string/truncate'), - 'typecast' : require('./string/typecast'), - 'unCamelCase' : require('./string/unCamelCase'), - 'underscore' : require('./string/underscore'), - 'unescapeHtml' : require('./string/unescapeHtml'), - 'unescapeUnicode' : require('./string/unescapeUnicode'), - 'unhyphenate' : require('./string/unhyphenate'), - 'upperCase' : require('./string/upperCase') -}; - - diff --git a/node_modules/mout/string/WHITE_SPACES.js b/node_modules/mout/string/WHITE_SPACES.js deleted file mode 100644 index 03e0125..0000000 --- a/node_modules/mout/string/WHITE_SPACES.js +++ /dev/null @@ -1,12 +0,0 @@ - - /** - * Contains all Unicode white-spaces. Taken from - * http://en.wikipedia.org/wiki/Whitespace_character. - */ - module.exports = [ - ' ', '\n', '\r', '\t', '\f', '\v', '\u00A0', '\u1680', '\u180E', - '\u2000', '\u2001', '\u2002', '\u2003', '\u2004', '\u2005', '\u2006', - '\u2007', '\u2008', '\u2009', '\u200A', '\u2028', '\u2029', '\u202F', - '\u205F', '\u3000' - ]; - diff --git a/node_modules/mout/string/camelCase.js b/node_modules/mout/string/camelCase.js deleted file mode 100644 index e73a960..0000000 --- a/node_modules/mout/string/camelCase.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var upperCase = require('./upperCase'); -var lowerCase = require('./lowerCase'); - /** - * Convert string to camelCase text. - */ - function camelCase(str){ - str = toString(str); - str = replaceAccents(str); - str = removeNonWord(str) - .replace(/[\-_]/g, ' '); // convert all hyphens and underscores to spaces - - // handle acronyms - // matches lowercase chars && uppercase words - if (/[a-z]/.test(str) && /^|\s[A-Z]+\s|$/.test(str)) { - // we convert any word that isn't all caps into lowercase - str = str.replace(/\s(\w+)/g, function(word, m) { - return /^[A-Z]+$/.test(m) ? word : lowerCase(word); - }); - } else if (/\s/.test(str)) { - // if it doesn't contain an acronym and it has spaces we should - // convert every word to lowercase - str = lowerCase(str); - } - - return str - .replace(/\s[a-z]/g, upperCase) // convert first char of each word to UPPERCASE - .replace(/^\s*[A-Z]+/g, lowerCase) // convert first word to lowercase - .replace(/\s+/g, ''); // remove spaces - } - module.exports = camelCase; - diff --git a/node_modules/mout/string/contains.js b/node_modules/mout/string/contains.js deleted file mode 100644 index cb22cae..0000000 --- a/node_modules/mout/string/contains.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Searches for a given substring - */ - function contains(str, substring, fromIndex){ - str = toString(str); - substring = toString(substring); - return str.indexOf(substring, fromIndex) !== -1; - } - - module.exports = contains; - - diff --git a/node_modules/mout/string/crop.js b/node_modules/mout/string/crop.js deleted file mode 100644 index 53b93b4..0000000 --- a/node_modules/mout/string/crop.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); -var truncate = require('./truncate'); - /** - * Truncate string at full words. - */ - function crop(str, maxChars, append) { - str = toString(str); - return truncate(str, maxChars, append, true); - } - - module.exports = crop; - diff --git a/node_modules/mout/string/endsWith.js b/node_modules/mout/string/endsWith.js deleted file mode 100644 index d504e9d..0000000 --- a/node_modules/mout/string/endsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string ends with specified suffix. - */ - function endsWith(str, suffix) { - str = toString(str); - suffix = toString(suffix); - - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - module.exports = endsWith; - diff --git a/node_modules/mout/string/escapeHtml.js b/node_modules/mout/string/escapeHtml.js deleted file mode 100644 index e67c4b2..0000000 --- a/node_modules/mout/string/escapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escapes a string for insertion into HTML. - */ - function escapeHtml(str){ - str = toString(str) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/'/g, ''') - .replace(/"/g, '"'); - return str; - } - - module.exports = escapeHtml; - - diff --git a/node_modules/mout/string/escapeRegExp.js b/node_modules/mout/string/escapeRegExp.js deleted file mode 100644 index 02d743c..0000000 --- a/node_modules/mout/string/escapeRegExp.js +++ /dev/null @@ -1,12 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape RegExp string chars. - */ - function escapeRegExp(str) { - return toString(str).replace(/\W/g,'\\$&'); - } - - module.exports = escapeRegExp; - - diff --git a/node_modules/mout/string/escapeUnicode.js b/node_modules/mout/string/escapeUnicode.js deleted file mode 100644 index ec649ad..0000000 --- a/node_modules/mout/string/escapeUnicode.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Escape string into unicode sequences - */ - function escapeUnicode(str, shouldEscapePrintable){ - str = toString(str); - return str.replace(/[\s\S]/g, function(ch){ - // skip printable ASCII chars if we should not escape them - if (!shouldEscapePrintable && (/[\x20-\x7E]/).test(ch)) { - return ch; - } - // we use "000" and slice(-4) for brevity, need to pad zeros, - // unicode escape always have 4 chars after "\u" - return '\\u'+ ('000'+ ch.charCodeAt(0).toString(16)).slice(-4); - }); - } - - module.exports = escapeUnicode; - - diff --git a/node_modules/mout/string/hyphenate.js b/node_modules/mout/string/hyphenate.js deleted file mode 100644 index 95e3243..0000000 --- a/node_modules/mout/string/hyphenate.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function hyphenate(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "-"); - } - - module.exports = hyphenate; - diff --git a/node_modules/mout/string/insert.js b/node_modules/mout/string/insert.js deleted file mode 100644 index 8f042c6..0000000 --- a/node_modules/mout/string/insert.js +++ /dev/null @@ -1,21 +0,0 @@ -var clamp = require('../math/clamp'); -var toString = require('../lang/toString'); - - /** - * Inserts a string at a given index. - */ - function insert(string, index, partial){ - string = toString(string); - - if (index < 0) { - index = string.length + index; - } - - index = clamp(index, 0, string.length); - - return string.substr(0, index) + partial + string.substr(index); - } - - module.exports = insert; - - diff --git a/node_modules/mout/string/interpolate.js b/node_modules/mout/string/interpolate.js deleted file mode 100644 index efbbf7d..0000000 --- a/node_modules/mout/string/interpolate.js +++ /dev/null @@ -1,19 +0,0 @@ -var toString = require('../lang/toString'); -var get = require('../object/get'); - - var stache = /\{\{([^\}]+)\}\}/g; //mustache-like - - /** - * String interpolation - */ - function interpolate(template, replacements, syntax){ - template = toString(template); - var replaceFn = function(match, prop){ - return toString( get(replacements, prop) ); - }; - return template.replace(syntax || stache, replaceFn); - } - - module.exports = interpolate; - - diff --git a/node_modules/mout/string/lowerCase.js b/node_modules/mout/string/lowerCase.js deleted file mode 100644 index 30bb7ad..0000000 --- a/node_modules/mout/string/lowerCase.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toLowerCase() - */ - function lowerCase(str){ - str = toString(str); - return str.toLowerCase(); - } - - module.exports = lowerCase; - diff --git a/node_modules/mout/string/lpad.js b/node_modules/mout/string/lpad.js deleted file mode 100644 index 63641d3..0000000 --- a/node_modules/mout/string/lpad.js +++ /dev/null @@ -1,17 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function lpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - - return (str.length < minLen) ? - repeat(ch, minLen - str.length) + str : str; - } - - module.exports = lpad; - - diff --git a/node_modules/mout/string/ltrim.js b/node_modules/mout/string/ltrim.js deleted file mode 100644 index 23d7b33..0000000 --- a/node_modules/mout/string/ltrim.js +++ /dev/null @@ -1,34 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from beginning of string. - */ - function ltrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var start = 0, - len = str.length, - charLen = chars.length, - found = true, - i, c; - - while (found && start < len) { - found = false; - i = -1; - c = str.charAt(start); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - start++; - break; - } - } - } - - return (start >= len) ? '' : str.substr(start, len); - } - - module.exports = ltrim; - diff --git a/node_modules/mout/string/makePath.js b/node_modules/mout/string/makePath.js deleted file mode 100644 index c337cec..0000000 --- a/node_modules/mout/string/makePath.js +++ /dev/null @@ -1,15 +0,0 @@ -var join = require('../array/join'); -var slice = require('../array/slice'); - - /** - * Group arguments as path segments, if any of the args is `null` or an - * empty string it will be ignored from resulting path. - */ - function makePath(var_args){ - var result = join(slice(arguments), '/'); - // need to disconsider duplicate '/' after protocol (eg: 'http://') - return result.replace(/([^:\/]|^)\/{2,}/g, '$1/'); - } - - module.exports = makePath; - diff --git a/node_modules/mout/string/normalizeLineBreaks.js b/node_modules/mout/string/normalizeLineBreaks.js deleted file mode 100644 index 8a8dccf..0000000 --- a/node_modules/mout/string/normalizeLineBreaks.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Convert line-breaks from DOS/MAC to a single standard (UNIX by default) - */ - function normalizeLineBreaks(str, lineEnd) { - str = toString(str); - lineEnd = lineEnd || '\n'; - - return str - .replace(/\r\n/g, lineEnd) // DOS - .replace(/\r/g, lineEnd) // Mac - .replace(/\n/g, lineEnd); // Unix - } - - module.exports = normalizeLineBreaks; - - diff --git a/node_modules/mout/string/pascalCase.js b/node_modules/mout/string/pascalCase.js deleted file mode 100644 index fd19035..0000000 --- a/node_modules/mout/string/pascalCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var camelCase = require('./camelCase'); -var upperCase = require('./upperCase'); - /** - * camelCase + UPPERCASE first char - */ - function pascalCase(str){ - str = toString(str); - return camelCase(str).replace(/^[a-z]/, upperCase); - } - - module.exports = pascalCase; - diff --git a/node_modules/mout/string/properCase.js b/node_modules/mout/string/properCase.js deleted file mode 100644 index 61636be..0000000 --- a/node_modules/mout/string/properCase.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each word. - */ - function properCase(str){ - str = toString(str); - return lowerCase(str).replace(/^\w|\s\w/g, upperCase); - } - - module.exports = properCase; - diff --git a/node_modules/mout/string/removeNonASCII.js b/node_modules/mout/string/removeNonASCII.js deleted file mode 100644 index fb46381..0000000 --- a/node_modules/mout/string/removeNonASCII.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove non-printable ASCII chars - */ - function removeNonASCII(str){ - str = toString(str); - - // Matches non-printable ASCII chars - - // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters - return str.replace(/[^\x20-\x7E]/g, ''); - } - - module.exports = removeNonASCII; - diff --git a/node_modules/mout/string/removeNonWord.js b/node_modules/mout/string/removeNonWord.js deleted file mode 100644 index ffb05a9..0000000 --- a/node_modules/mout/string/removeNonWord.js +++ /dev/null @@ -1,14 +0,0 @@ -var toString = require('../lang/toString'); - // This pattern is generated by the _build/pattern-removeNonWord.js script - var PATTERN = /[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g; - - /** - * Remove non-word chars. - */ - function removeNonWord(str){ - str = toString(str); - return str.replace(PATTERN, ''); - } - - module.exports = removeNonWord; - diff --git a/node_modules/mout/string/repeat.js b/node_modules/mout/string/repeat.js deleted file mode 100644 index df0dc1e..0000000 --- a/node_modules/mout/string/repeat.js +++ /dev/null @@ -1,26 +0,0 @@ -var toString = require('../lang/toString'); -var toInt = require('../number/toInt'); - - /** - * Repeat string n times - */ - function repeat(str, n){ - var result = ''; - str = toString(str); - n = toInt(n); - if (n < 1) { - return ''; - } - while (n > 0) { - if (n % 2) { - result += str; - } - n = Math.floor(n / 2); - str += str; - } - return result; - } - - module.exports = repeat; - - diff --git a/node_modules/mout/string/replace.js b/node_modules/mout/string/replace.js deleted file mode 100644 index 14433fc..0000000 --- a/node_modules/mout/string/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var toArray = require('../lang/toArray'); - - /** - * Replace string(s) with the replacement(s) in the source. - */ - function replace(str, search, replacements) { - str = toString(str); - search = toArray(search); - replacements = toArray(replacements); - - var searchLength = search.length, - replacementsLength = replacements.length; - - if (replacementsLength !== 1 && searchLength !== replacementsLength) { - throw new Error('Unequal number of searches and replacements'); - } - - var i = -1; - while (++i < searchLength) { - // Use the first replacement for all searches if only one - // replacement is provided - str = str.replace( - search[i], - replacements[(replacementsLength === 1) ? 0 : i]); - } - - return str; - } - - module.exports = replace; - - diff --git a/node_modules/mout/string/replaceAccents.js b/node_modules/mout/string/replaceAccents.js deleted file mode 100644 index bb22126..0000000 --- a/node_modules/mout/string/replaceAccents.js +++ /dev/null @@ -1,36 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces all accented chars with regular ones - */ - function replaceAccents(str){ - str = toString(str); - - // verifies if the String has accents and replace them - if (str.search(/[\xC0-\xFF]/g) > -1) { - str = str - .replace(/[\xC0-\xC5]/g, "A") - .replace(/[\xC6]/g, "AE") - .replace(/[\xC7]/g, "C") - .replace(/[\xC8-\xCB]/g, "E") - .replace(/[\xCC-\xCF]/g, "I") - .replace(/[\xD0]/g, "D") - .replace(/[\xD1]/g, "N") - .replace(/[\xD2-\xD6\xD8]/g, "O") - .replace(/[\xD9-\xDC]/g, "U") - .replace(/[\xDD]/g, "Y") - .replace(/[\xDE]/g, "P") - .replace(/[\xE0-\xE5]/g, "a") - .replace(/[\xE6]/g, "ae") - .replace(/[\xE7]/g, "c") - .replace(/[\xE8-\xEB]/g, "e") - .replace(/[\xEC-\xEF]/g, "i") - .replace(/[\xF1]/g, "n") - .replace(/[\xF2-\xF6\xF8]/g, "o") - .replace(/[\xF9-\xFC]/g, "u") - .replace(/[\xFE]/g, "p") - .replace(/[\xFD\xFF]/g, "y"); - } - return str; - } - module.exports = replaceAccents; - diff --git a/node_modules/mout/string/rpad.js b/node_modules/mout/string/rpad.js deleted file mode 100644 index 99f6378..0000000 --- a/node_modules/mout/string/rpad.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var repeat = require('./repeat'); - - /** - * Pad string with `char` if its' length is smaller than `minLen` - */ - function rpad(str, minLen, ch) { - str = toString(str); - ch = ch || ' '; - return (str.length < minLen)? str + repeat(ch, minLen - str.length) : str; - } - - module.exports = rpad; - - diff --git a/node_modules/mout/string/rtrim.js b/node_modules/mout/string/rtrim.js deleted file mode 100644 index 66ba80e..0000000 --- a/node_modules/mout/string/rtrim.js +++ /dev/null @@ -1,33 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); - /** - * Remove chars from end of string. - */ - function rtrim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - - var end = str.length - 1, - charLen = chars.length, - found = true, - i, c; - - while (found && end >= 0) { - found = false; - i = -1; - c = str.charAt(end); - - while (++i < charLen) { - if (c === chars[i]) { - found = true; - end--; - break; - } - } - } - - return (end >= 0) ? str.substring(0, end + 1) : ''; - } - - module.exports = rtrim; - diff --git a/node_modules/mout/string/sentenceCase.js b/node_modules/mout/string/sentenceCase.js deleted file mode 100644 index 354104c..0000000 --- a/node_modules/mout/string/sentenceCase.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var lowerCase = require('./lowerCase'); -var upperCase = require('./upperCase'); - /** - * UPPERCASE first char of each sentence and lowercase other chars. - */ - function sentenceCase(str){ - str = toString(str); - - // Replace first char of each sentence (new line or after '.\s+') to - // UPPERCASE - return lowerCase(str).replace(/(^\w)|\.\s+(\w)/gm, upperCase); - } - module.exports = sentenceCase; - diff --git a/node_modules/mout/string/slugify.js b/node_modules/mout/string/slugify.js deleted file mode 100644 index 305cb85..0000000 --- a/node_modules/mout/string/slugify.js +++ /dev/null @@ -1,24 +0,0 @@ -var toString = require('../lang/toString'); -var replaceAccents = require('./replaceAccents'); -var removeNonWord = require('./removeNonWord'); -var trim = require('./trim'); - /** - * Convert to lower case, remove accents, remove non-word chars and - * replace spaces with the specified delimiter. - * Does not split camelCase text. - */ - function slugify(str, delimiter){ - str = toString(str); - - if (delimiter == null) { - delimiter = "-"; - } - str = replaceAccents(str); - str = removeNonWord(str); - str = trim(str) //should come after removeNonWord - .replace(/ +/g, delimiter) //replace spaces with delimiter - .toLowerCase(); - return str; - } - module.exports = slugify; - diff --git a/node_modules/mout/string/startsWith.js b/node_modules/mout/string/startsWith.js deleted file mode 100644 index bce2bd2..0000000 --- a/node_modules/mout/string/startsWith.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Checks if string starts with specified prefix. - */ - function startsWith(str, prefix) { - str = toString(str); - prefix = toString(prefix); - - return str.indexOf(prefix) === 0; - } - - module.exports = startsWith; - diff --git a/node_modules/mout/string/stripHtmlTags.js b/node_modules/mout/string/stripHtmlTags.js deleted file mode 100644 index 01d17b0..0000000 --- a/node_modules/mout/string/stripHtmlTags.js +++ /dev/null @@ -1,11 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Remove HTML tags from string. - */ - function stripHtmlTags(str){ - str = toString(str); - - return str.replace(/<[^>]*>/g, ''); - } - module.exports = stripHtmlTags; - diff --git a/node_modules/mout/string/stripMargin.js b/node_modules/mout/string/stripMargin.js deleted file mode 100644 index bdfc7ac..0000000 --- a/node_modules/mout/string/stripMargin.js +++ /dev/null @@ -1,22 +0,0 @@ -var toString = require('../lang/toString'); -var escapeRegExp = require('./escapeRegExp'); - var DEFAULT_MARGIN_CHAR = '|'; - /** - * Strip leading characters followed by 'marginChar' from every line in a String. - * - * marginChar defaults to '|'. - */ - function stripMargin(str, marginChar) { - var regexp; - - marginChar = escapeRegExp(marginChar || DEFAULT_MARGIN_CHAR); - str = toString(str); - - regexp = new RegExp('^.*' + marginChar, 'gm'); - - return str.replace(regexp, ''); - } - - module.exports = stripMargin; - - diff --git a/node_modules/mout/string/trim.js b/node_modules/mout/string/trim.js deleted file mode 100644 index 9652b0c..0000000 --- a/node_modules/mout/string/trim.js +++ /dev/null @@ -1,15 +0,0 @@ -var toString = require('../lang/toString'); -var WHITE_SPACES = require('./WHITE_SPACES'); -var ltrim = require('./ltrim'); -var rtrim = require('./rtrim'); - /** - * Remove white-spaces from beginning and end of string. - */ - function trim(str, chars) { - str = toString(str); - chars = chars || WHITE_SPACES; - return ltrim(rtrim(str, chars), chars); - } - - module.exports = trim; - diff --git a/node_modules/mout/string/truncate.js b/node_modules/mout/string/truncate.js deleted file mode 100644 index a98d6c7..0000000 --- a/node_modules/mout/string/truncate.js +++ /dev/null @@ -1,21 +0,0 @@ -var toString = require('../lang/toString'); -var trim = require('./trim'); - /** - * Limit number of chars. - */ - function truncate(str, maxChars, append, onlyFullWords){ - str = toString(str); - append = append || '...'; - maxChars = onlyFullWords? maxChars + 1 : maxChars; - - str = trim(str); - if(str.length <= maxChars){ - return str; - } - str = str.substr(0, maxChars - append.length); - //crop at last space or remove trailing whitespace - str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str); - return str + append; - } - module.exports = truncate; - diff --git a/node_modules/mout/string/typecast.js b/node_modules/mout/string/typecast.js deleted file mode 100644 index c1386a4..0000000 --- a/node_modules/mout/string/typecast.js +++ /dev/null @@ -1,29 +0,0 @@ - - - var UNDEF; - - /** - * Parses string and convert it into a native value. - */ - function typecast(val) { - var r; - if ( val === null || val === 'null' ) { - r = null; - } else if ( val === 'true' ) { - r = true; - } else if ( val === 'false' ) { - r = false; - } else if ( val === UNDEF || val === 'undefined' ) { - r = UNDEF; - } else if ( val === '' || isNaN(val) ) { - //isNaN('') returns false - r = val; - } else { - //parseFloat(null || '') returns NaN - r = parseFloat(val); - } - return r; - } - - module.exports = typecast; - diff --git a/node_modules/mout/string/unCamelCase.js b/node_modules/mout/string/unCamelCase.js deleted file mode 100644 index 4968f37..0000000 --- a/node_modules/mout/string/unCamelCase.js +++ /dev/null @@ -1,23 +0,0 @@ -var toString = require('../lang/toString'); - - var CAMEL_CASE_BORDER = /([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g; - - /** - * Add space between camelCase text. - */ - function unCamelCase(str, delimiter){ - if (delimiter == null) { - delimiter = ' '; - } - - function join(str, c1, c2) { - return c1 + delimiter + c2; - } - - str = toString(str); - str = str.replace(CAMEL_CASE_BORDER, join); - str = str.toLowerCase(); //add space between camelCase text - return str; - } - module.exports = unCamelCase; - diff --git a/node_modules/mout/string/underscore.js b/node_modules/mout/string/underscore.js deleted file mode 100644 index ebd6e2b..0000000 --- a/node_modules/mout/string/underscore.js +++ /dev/null @@ -1,13 +0,0 @@ -var toString = require('../lang/toString'); -var slugify = require('./slugify'); -var unCamelCase = require('./unCamelCase'); - /** - * Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case. - */ - function underscore(str){ - str = toString(str); - str = unCamelCase(str); - return slugify(str, "_"); - } - module.exports = underscore; - diff --git a/node_modules/mout/string/unescapeHtml.js b/node_modules/mout/string/unescapeHtml.js deleted file mode 100644 index ad1987d..0000000 --- a/node_modules/mout/string/unescapeHtml.js +++ /dev/null @@ -1,18 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescapes HTML special chars - */ - function unescapeHtml(str){ - str = toString(str) - .replace(/&/g , '&') - .replace(/</g , '<') - .replace(/>/g , '>') - .replace(/�*39;/g , "'") - .replace(/"/g, '"'); - return str; - } - - module.exports = unescapeHtml; - - diff --git a/node_modules/mout/string/unescapeUnicode.js b/node_modules/mout/string/unescapeUnicode.js deleted file mode 100644 index 0b7fb73..0000000 --- a/node_modules/mout/string/unescapeUnicode.js +++ /dev/null @@ -1,16 +0,0 @@ -var toString = require('../lang/toString'); - - /** - * Unescape unicode char sequences - */ - function unescapeUnicode(str){ - str = toString(str); - return str.replace(/\\u[0-9a-f]{4}/g, function(ch){ - var code = parseInt(ch.slice(2), 16); - return String.fromCharCode(code); - }); - } - - module.exports = unescapeUnicode; - - diff --git a/node_modules/mout/string/unhyphenate.js b/node_modules/mout/string/unhyphenate.js deleted file mode 100644 index 311dfa1..0000000 --- a/node_modules/mout/string/unhyphenate.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * Replaces hyphens with spaces. (only hyphens between word chars) - */ - function unhyphenate(str){ - str = toString(str); - return str.replace(/(\w)(-)(\w)/g, '$1 $3'); - } - module.exports = unhyphenate; - diff --git a/node_modules/mout/string/upperCase.js b/node_modules/mout/string/upperCase.js deleted file mode 100644 index 6c92552..0000000 --- a/node_modules/mout/string/upperCase.js +++ /dev/null @@ -1,10 +0,0 @@ -var toString = require('../lang/toString'); - /** - * "Safer" String.toUpperCase() - */ - function upperCase(str){ - str = toString(str); - return str.toUpperCase(); - } - module.exports = upperCase; - diff --git a/node_modules/mout/time.js b/node_modules/mout/time.js deleted file mode 100644 index 9f53329..0000000 --- a/node_modules/mout/time.js +++ /dev/null @@ -1,12 +0,0 @@ - - -//automatically generated, do not edit! -//run `node build` instead -module.exports = { - 'convert' : require('./time/convert'), - 'now' : require('./time/now'), - 'parseMs' : require('./time/parseMs'), - 'toTimeString' : require('./time/toTimeString') -}; - - diff --git a/node_modules/mout/time/convert.js b/node_modules/mout/time/convert.js deleted file mode 100644 index 852a0f0..0000000 --- a/node_modules/mout/time/convert.js +++ /dev/null @@ -1,41 +0,0 @@ - - - /** - * convert time into another unit - */ - function convert(val, sourceUnitName, destinationUnitName){ - destinationUnitName = destinationUnitName || 'ms'; - return (val * getUnit(sourceUnitName)) / getUnit(destinationUnitName); - } - - - //TODO: maybe extract to a separate module - function getUnit(unitName){ - switch(unitName){ - case 'ms': - case 'millisecond': - return 1; - case 's': - case 'second': - return 1000; - case 'm': - case 'minute': - return 60000; - case 'h': - case 'hour': - return 3600000; - case 'd': - case 'day': - return 86400000; - case 'w': - case 'week': - return 604800000; - default: - throw new Error('"'+ unitName + '" is not a valid unit'); - } - } - - - module.exports = convert; - - diff --git a/node_modules/mout/time/now.js b/node_modules/mout/time/now.js deleted file mode 100644 index 0cedb18..0000000 --- a/node_modules/mout/time/now.js +++ /dev/null @@ -1,18 +0,0 @@ - - - /** - * Get current time in miliseconds - */ - function now(){ - // yes, we defer the work to another function to allow mocking it - // during the tests - return now.get(); - } - - now.get = (typeof Date.now === 'function')? Date.now : function(){ - return +(new Date()); - }; - - module.exports = now; - - diff --git a/node_modules/mout/time/parseMs.js b/node_modules/mout/time/parseMs.js deleted file mode 100644 index 6d99797..0000000 --- a/node_modules/mout/time/parseMs.js +++ /dev/null @@ -1,17 +0,0 @@ -var countSteps = require('../math/countSteps'); - - /** - * Parse timestamp into an object. - */ - function parseMs(ms){ - return { - milliseconds : countSteps(ms, 1, 1000), - seconds : countSteps(ms, 1000, 60), - minutes : countSteps(ms, 60000, 60), - hours : countSteps(ms, 3600000, 24), - days : countSteps(ms, 86400000) - }; - } - - module.exports = parseMs; - diff --git a/node_modules/mout/time/toTimeString.js b/node_modules/mout/time/toTimeString.js deleted file mode 100644 index 101d69f..0000000 --- a/node_modules/mout/time/toTimeString.js +++ /dev/null @@ -1,24 +0,0 @@ -var countSteps = require('../math/countSteps'); -var pad = require('../number/pad'); - - var HOUR = 3600000, - MINUTE = 60000, - SECOND = 1000; - - /** - * Format timestamp into a time string. - */ - function toTimeString(ms){ - var h = ms < HOUR ? 0 : countSteps(ms, HOUR), - m = ms < MINUTE ? 0 : countSteps(ms, MINUTE, 60), - s = ms < SECOND ? 0 : countSteps(ms, SECOND, 60), - str = ''; - - str += h? h + ':' : ''; - str += pad(m, 2) + ':'; - str += pad(s, 2); - - return str; - } - module.exports = toTimeString; - diff --git a/node_modules/npm/LICENSE b/node_modules/npm/LICENSE deleted file mode 100644 index 0b6c228..0000000 --- a/node_modules/npm/LICENSE +++ /dev/null @@ -1,235 +0,0 @@ -The npm application -Copyright (c) npm, Inc. and Contributors -Licensed on the terms of The Artistic License 2.0 - -Node package dependencies of the npm application -Copyright (c) their respective copyright owners -Licensed on their respective license terms - -The npm public registry at https://registry.npmjs.org -and the npm website at https://www.npmjs.com -Operated by npm, Inc. -Use governed by terms published on https://www.npmjs.com - -"Node.js" -Trademark Joyent, Inc., https://joyent.com -Neither npm nor npm, Inc. are affiliated with Joyent, Inc. - -The Node.js application -Project of Node Foundation, https://nodejs.org - -The npm Logo -Copyright (c) Mathias Pettersson and Brian Hammond - -"Gubblebum Blocky" typeface -Copyright (c) Tjarda Koster, https://jelloween.deviantart.com -Used with permission - - --------- - - -The Artistic License 2.0 - -Copyright (c) 2000-2006, The Perl Foundation. - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -This license establishes the terms under which a given free software -Package may be copied, modified, distributed, and/or redistributed. -The intent is that the Copyright Holder maintains some artistic -control over the development of that Package while still keeping the -Package available as open source and free software. - -You are always permitted to make arrangements wholly outside of this -license directly with the Copyright Holder of a given Package. If the -terms of this license do not permit the full use that you propose to -make of the Package, you should contact the Copyright Holder and seek -a different licensing arrangement. - -Definitions - - "Copyright Holder" means the individual(s) or organization(s) - named in the copyright notice for the entire Package. - - "Contributor" means any party that has contributed code or other - material to the Package, in accordance with the Copyright Holder's - procedures. - - "You" and "your" means any person who would like to copy, - distribute, or modify the Package. - - "Package" means the collection of files distributed by the - Copyright Holder, and derivatives of that collection and/or of - those files. A given Package may consist of either the Standard - Version, or a Modified Version. - - "Distribute" means providing a copy of the Package or making it - accessible to anyone else, or in the case of a company or - organization, to others outside of your company or organization. - - "Distributor Fee" means any fee that you charge for Distributing - this Package or providing support for this Package to another - party. It does not mean licensing fees. - - "Standard Version" refers to the Package if it has not been - modified, or has been modified only in ways explicitly requested - by the Copyright Holder. - - "Modified Version" means the Package, if it has been changed, and - such changes were not explicitly requested by the Copyright - Holder. - - "Original License" means this Artistic License as Distributed with - the Standard Version of the Package, in its current version or as - it may be modified by The Perl Foundation in the future. - - "Source" form means the source code, documentation source, and - configuration files for the Package. - - "Compiled" form means the compiled bytecode, object code, binary, - or any other form resulting from mechanical transformation or - translation of the Source form. - - -Permission for Use and Modification Without Distribution - -(1) You are permitted to use the Standard Version and create and use -Modified Versions for any purpose without restriction, provided that -you do not Distribute the Modified Version. - - -Permissions for Redistribution of the Standard Version - -(2) You may Distribute verbatim copies of the Source form of the -Standard Version of this Package in any medium without restriction, -either gratis or for a Distributor Fee, provided that you duplicate -all of the original copyright notices and associated disclaimers. At -your discretion, such verbatim copies may or may not include a -Compiled form of the Package. - -(3) You may apply any bug fixes, portability changes, and other -modifications made available from the Copyright Holder. The resulting -Package will still be considered the Standard Version, and as such -will be subject to the Original License. - - -Distribution of Modified Versions of the Package as Source - -(4) You may Distribute your Modified Version as Source (either gratis -or for a Distributor Fee, and with or without a Compiled form of the -Modified Version) provided that you clearly document how it differs -from the Standard Version, including, but not limited to, documenting -any non-standard features, executables, or modules, and provided that -you do at least ONE of the following: - - (a) make the Modified Version available to the Copyright Holder - of the Standard Version, under the Original License, so that the - Copyright Holder may include your modifications in the Standard - Version. - - (b) ensure that installation of your Modified Version does not - prevent the user installing or running the Standard Version. In - addition, the Modified Version must bear a name that is different - from the name of the Standard Version. - - (c) allow anyone who receives a copy of the Modified Version to - make the Source form of the Modified Version available to others - under - - (i) the Original License or - - (ii) a license that permits the licensee to freely copy, - modify and redistribute the Modified Version using the same - licensing terms that apply to the copy that the licensee - received, and requires that the Source form of the Modified - Version, and of any works derived from it, be made freely - available in that license fees are prohibited but Distributor - Fees are allowed. - - -Distribution of Compiled Forms of the Standard Version -or Modified Versions without the Source - -(5) You may Distribute Compiled forms of the Standard Version without -the Source, provided that you include complete instructions on how to -get the Source of the Standard Version. Such instructions must be -valid at the time of your distribution. If these instructions, at any -time while you are carrying out such distribution, become invalid, you -must provide new instructions on demand or cease further distribution. -If you provide valid instructions or cease distribution within thirty -days after you become aware that the instructions are invalid, then -you do not forfeit any of your rights under this license. - -(6) You may Distribute a Modified Version in Compiled form without -the Source, provided that you comply with Section 4 with respect to -the Source of the Modified Version. - - -Aggregating or Linking the Package - -(7) You may aggregate the Package (either the Standard Version or -Modified Version) with other packages and Distribute the resulting -aggregation provided that you do not charge a licensing fee for the -Package. Distributor Fees are permitted, and licensing fees for other -components in the aggregation are permitted. The terms of this license -apply to the use and Distribution of the Standard or Modified Versions -as included in the aggregation. - -(8) You are permitted to link Modified and Standard Versions with -other works, to embed the Package in a larger work of your own, or to -build stand-alone binary or bytecode versions of applications that -include the Package, and Distribute the result without restriction, -provided the result does not expose a direct interface to the Package. - - -Items That are Not Considered Part of a Modified Version - -(9) Works (including, but not limited to, modules and scripts) that -merely extend or make use of the Package, do not, by themselves, cause -the Package to be a Modified Version. In addition, such works are not -considered parts of the Package itself, and are not subject to the -terms of this license. - - -General Provisions - -(10) Any use, modification, and distribution of the Standard or -Modified Versions is governed by this Artistic License. By using, -modifying or distributing the Package, you accept this license. Do not -use, modify, or distribute the Package, if you do not accept this -license. - -(11) If your Modified Version has been derived from a Modified -Version made by someone other than you, you are nevertheless required -to ensure that your Modified Version complies with the requirements of -this license. - -(12) This license does not grant you the right to use any trademark, -service mark, tradename, or logo of the Copyright Holder. - -(13) This license includes the non-exclusive, worldwide, -free-of-charge patent license to make, have made, use, offer to sell, -sell, import and otherwise transfer the Package with respect to any -patent claims licensable by the Copyright Holder that are necessarily -infringed by the Package. If you institute patent litigation -(including a cross-claim or counterclaim) against any party alleging -that the Package constitutes direct or contributory patent -infringement, then this Artistic License to you shall terminate on the -date that such litigation is filed. - -(14) Disclaimer of Warranty: -THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS -IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR -NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL -LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - --------- diff --git a/node_modules/npm/README.md b/node_modules/npm/README.md deleted file mode 100644 index cffee24..0000000 --- a/node_modules/npm/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# npm - a JavaScript package manager - -[![npm version](https://img.shields.io/npm/v/npm.svg)](https://npm.im/npm) -[![license](https://img.shields.io/npm/l/npm.svg)](https://npm.im/npm) -[![CI - cli](https://github.com/npm/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci.yml) -[![Benchmark Suite](https://github.com/npm/cli/actions/workflows/benchmark.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/benchmark.yml) - -### Requirements - -One of the following versions of [Node.js](https://nodejs.org/en/download/) must be installed to run **`npm`**: - -* `18.x.x` >= `18.17.0` -* `20.5.0` or higher - -### Installation - -**`npm`** comes bundled with [**`node`**](https://nodejs.org/), & most third-party distributions, by default. Officially supported downloads/distributions can be found at: [nodejs.org/en/download](https://nodejs.org/en/download) - -#### Direct Download - -You can download & install **`npm`** directly from [**npmjs**.com](https://npmjs.com/) using our custom `install.sh` script: - -```bash -curl -qL https://www.npmjs.com/install.sh | sh -``` - -#### Node Version Managers - -If you're looking to manage multiple versions of **`Node.js`** &/or **`npm`**, consider using a [node version manager](https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch) - -### Usage - -```bash -npm -``` - -### Links & Resources - -* [**Documentation**](https://docs.npmjs.com/) - Official docs & how-tos for all things **npm** - * Note: you can also search docs locally with `npm help-search ` -* [**Bug Tracker**](https://github.com/npm/cli/issues) - Search or submit bugs against the CLI -* [**Roadmap**](https://github.com/orgs/github/projects/4247/views/1?filterQuery=npm) - Track & follow along with our public roadmap -* [**Feedback**](https://github.com/npm/feedback) - Contribute ideas & discussion around the npm registry, website & CLI -* [**RFCs**](https://github.com/npm/rfcs) - Contribute ideas & specifications for the API/design of the npm CLI -* [**Service Status**](https://status.npmjs.org/) - Monitor the current status & see incident reports for the website & registry -* [**Project Status**](https://npm.github.io/statusboard/) - See the health of all our maintained OSS projects in one view -* [**Events Calendar**](https://calendar.google.com/calendar/u/0/embed?src=npmjs.com_oonluqt8oftrt0vmgrfbg6q6go@group.calendar.google.com) - Keep track of our Open RFC calls, releases, meetups, conferences & more -* [**Support**](https://www.npmjs.com/support) - Experiencing problems with the **npm** [website](https://npmjs.com) or [registry](https://registry.npmjs.org)? File a ticket [here](https://www.npmjs.com/support) - -### Acknowledgments - -* `npm` is configured to use the **npm Public Registry** at [https://registry.npmjs.org](https://registry.npmjs.org) by default; Usage of this registry is subject to **Terms of Use** available at [https://npmjs.com/policies/terms](https://npmjs.com/policies/terms) -* You can configure `npm` to use any other compatible registry you prefer. You can read more about configuring third-party registries [here](https://docs.npmjs.com/cli/v7/using-npm/registry) - -### FAQ on Branding - -#### Is it "npm" or "NPM" or "Npm"? - -**`npm`** should never be capitalized unless it is being displayed in a location that is customarily all-capitals (ex. titles on `man` pages). - -#### Is "npm" an acronym for "Node Package Manager"? - -Contrary to popular belief, **`npm`** **is not** in fact an acronym for "Node Package Manager"; It is a recursive bacronymic abbreviation for **"npm is not an acronym"** (if the project was named "ninaa", then it would be an acronym). The precursor to **`npm`** was actually a bash utility named **"pm"**, which was the shortform name of **"pkgmakeinst"** - a bash function that installed various things on various platforms. If **`npm`** were to ever have been considered an acronym, it would be as "node pm" or, potentially "new pm". diff --git a/node_modules/npm/bin/node-gyp-bin/node-gyp b/node_modules/npm/bin/node-gyp-bin/node-gyp deleted file mode 100755 index 70efb6f..0000000 --- a/node_modules/npm/bin/node-gyp-bin/node-gyp +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh -if [ "x$npm_config_node_gyp" = "x" ]; then - node "`dirname "$0"`/../../node_modules/node-gyp/bin/node-gyp.js" "$@" -else - "$npm_config_node_gyp" "$@" -fi diff --git a/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd b/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd deleted file mode 100755 index 6816e5b..0000000 --- a/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd +++ /dev/null @@ -1,5 +0,0 @@ -if not defined npm_config_node_gyp ( - node "%~dp0\..\..\node_modules\node-gyp\bin\node-gyp.js" %* -) else ( - node "%npm_config_node_gyp%" %* -) diff --git a/node_modules/npm/bin/npm b/node_modules/npm/bin/npm deleted file mode 100755 index 7f210b9..0000000 --- a/node_modules/npm/bin/npm +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env bash - -# This is used by the Node.js installer, which expects the cygwin/mingw -# shell script to already be present in the npm dependency folder. - -(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix - -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then - IS_WSL="true" -fi - -function no_node_dir { - # if this didn't work, then everything else below will fail - echo "Could not determine Node.js install directory" >&2 - exit 1 -} - -NODE_EXE="$basedir/node.exe" -if ! [ -x "$NODE_EXE" ]; then - NODE_EXE="$basedir/node" -fi -if ! [ -x "$NODE_EXE" ]; then - NODE_EXE=node -fi - -# this path is passed to node.exe, so it needs to match whatever -# kind of paths Node.js thinks it's using, typically win32 paths. -CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)' 2> /dev/null)" -if [ $? -ne 0 ]; then - # this fails under WSL 1 so add an additional message. we also suppress stderr above - # because the actual error raised is not helpful. in WSL 1 node.exe cannot handle - # output redirection properly. See https://github.com/microsoft/WSL/issues/2370 - if [ "$IS_WSL" == "true" ]; then - echo "WSL 1 is not supported. Please upgrade to WSL 2 or above." >&2 - fi - no_node_dir -fi -NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" -NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` -if [ $? -ne 0 ]; then - no_node_dir -fi -NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" - -# a path that will fail -f test on any posix bash -NPM_WSL_PATH="/.." - -# WSL can run Windows binaries, so we have to give it the win32 path -# however, WSL bash tests against posix paths, so we need to construct that -# to know if npm is installed globally. -if [ "$IS_WSL" == "true" ]; then - NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"` -fi -if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then - NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" -fi - -"$NODE_EXE" "$NPM_CLI_JS" "$@" diff --git a/node_modules/npm/bin/npm-cli.js b/node_modules/npm/bin/npm-cli.js deleted file mode 100755 index 577abe0..0000000 --- a/node_modules/npm/bin/npm-cli.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../lib/cli.js')(process) diff --git a/node_modules/npm/bin/npm.cmd b/node_modules/npm/bin/npm.cmd deleted file mode 100755 index f111c59..0000000 --- a/node_modules/npm/bin/npm.cmd +++ /dev/null @@ -1,19 +0,0 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" -) -IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( - SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" -) - -"%NODE_EXE%" "%NPM_CLI_JS%" %* diff --git a/node_modules/npm/bin/npm.ps1 b/node_modules/npm/bin/npm.ps1 deleted file mode 100644 index f2f236a..0000000 --- a/node_modules/npm/bin/npm.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 - -$nodeexe = "node$exe" -$nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source -if ($nodebin -eq $null) { - Write-Host "$nodeexe not found." - exit 1 -} -$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path - -$npmclijs="$nodedir/node_modules/npm/bin/npm-cli.js" -$npmprefix=(& $nodeexe $npmclijs prefix -g) -if ($LASTEXITCODE -ne 0) { - Write-Host "Could not determine Node.js install directory" - exit 1 -} -$npmprefixclijs="$npmprefix/node_modules/npm/bin/npm-cli.js" - -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & $nodeexe $npmprefixclijs $args -} else { - & $nodeexe $npmprefixclijs $args -} -$ret=$LASTEXITCODE -exit $ret diff --git a/node_modules/npm/bin/npx b/node_modules/npm/bin/npx deleted file mode 100755 index 719ff8e..0000000 --- a/node_modules/npm/bin/npx +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash - -# This is used by the Node.js installer, which expects the cygwin/mingw -# shell script to already be present in the npm dependency folder. - -(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix - -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then - IS_WSL="true" -fi - -function no_node_dir { - # if this didn't work, then everything else below will fail - echo "Could not determine Node.js install directory" >&2 - exit 1 -} - -NODE_EXE="$basedir/node.exe" -if ! [ -x "$NODE_EXE" ]; then - NODE_EXE="$basedir/node" -fi -if ! [ -x "$NODE_EXE" ]; then - NODE_EXE=node -fi - -# this path is passed to node.exe, so it needs to match whatever -# kind of paths Node.js thinks it's using, typically win32 paths. -CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)' 2> /dev/null)" -if [ $? -ne 0 ]; then - # this fails under WSL 1 so add an additional message. we also suppress stderr above - # because the actual error raised is not helpful. in WSL 1 node.exe cannot handle - # output redirection properly. See https://github.com/microsoft/WSL/issues/2370 - if [ "$IS_WSL" == "true" ]; then - echo "WSL 1 is not supported. Please upgrade to WSL 2 or above." >&2 - fi - no_node_dir -fi -NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" -NPX_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npx-cli.js" -NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` -if [ $? -ne 0 ]; then - no_node_dir -fi -NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" - -# a path that will fail -f test on any posix bash -NPX_WSL_PATH="/.." - -# WSL can run Windows binaries, so we have to give it the win32 path -# however, WSL bash tests against posix paths, so we need to construct that -# to know if npm is installed globally. -if [ "$IS_WSL" == "true" ]; then - NPX_WSL_PATH=`wslpath "$NPM_PREFIX_NPX_CLI_JS"` -fi -if [ -f "$NPM_PREFIX_NPX_CLI_JS" ] || [ -f "$NPX_WSL_PATH" ]; then - NPX_CLI_JS="$NPM_PREFIX_NPX_CLI_JS" -fi - -"$NODE_EXE" "$NPX_CLI_JS" "$@" diff --git a/node_modules/npm/bin/npx-cli.js b/node_modules/npm/bin/npx-cli.js deleted file mode 100755 index 17d96fb..0000000 --- a/node_modules/npm/bin/npx-cli.js +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env node - -const cli = require('../lib/cli.js') - -// run the resulting command as `npm exec ...args` -process.argv[1] = require.resolve('./npm-cli.js') -process.argv.splice(2, 0, 'exec') - -// TODO: remove the affordances for removed items in npm v9 -const removedSwitches = new Set([ - 'always-spawn', - 'ignore-existing', - 'shell-auto-fallback', -]) - -const removedOpts = new Set([ - 'npm', - 'node-arg', - 'n', -]) - -const removed = new Set([ - ...removedSwitches, - ...removedOpts, -]) - -const { definitions, shorthands } = require('@npmcli/config/lib/definitions') -const npmSwitches = Object.entries(definitions) - .filter(([key, { type }]) => type === Boolean || - (Array.isArray(type) && type.includes(Boolean))) - .map(([key]) => key) - -// things that don't take a value -const switches = new Set([ - ...removedSwitches, - ...npmSwitches, - 'no-install', - 'quiet', - 'q', - 'version', - 'v', - 'help', - 'h', -]) - -// things that do take a value -const opts = new Set([ - ...removedOpts, - 'package', - 'p', - 'cache', - 'userconfig', - 'call', - 'c', - 'shell', - 'npm', - 'node-arg', - 'n', -]) - -// break out of loop when we find a positional argument or -- -// If we find a positional arg, we shove -- in front of it, and -// let the normal npm cli handle the rest. -let i -let sawRemovedFlags = false -for (i = 3; i < process.argv.length; i++) { - const arg = process.argv[i] - if (arg === '--') { - break - } else if (/^-/.test(arg)) { - const [key, ...v] = arg.replace(/^-+/, '').split('=') - - switch (key) { - case 'p': - process.argv[i] = ['--package', ...v].join('=') - break - - case 'shell': - process.argv[i] = ['--script-shell', ...v].join('=') - break - - case 'no-install': - process.argv[i] = '--yes=false' - break - - default: - // resolve shorthands and run again - if (shorthands[key] && !removed.has(key)) { - const a = [...shorthands[key]] - if (v.length) { - a.push(v.join('=')) - } - process.argv.splice(i, 1, ...a) - i-- - continue - } - break - } - - if (removed.has(key)) { - // eslint-disable-next-line no-console - console.error(`npx: the --${key} argument has been removed.`) - sawRemovedFlags = true - process.argv.splice(i, 1) - i-- - } - - if (v.length === 0 && !switches.has(key) && - (opts.has(key) || !/^-/.test(process.argv[i + 1]))) { - // value will be next argument, skip over it. - if (removed.has(key)) { - // also remove the value for the cut key. - process.argv.splice(i + 1, 1) - } else { - i++ - } - } - } else { - // found a positional arg, put -- in front of it, and we're done - process.argv.splice(i, 0, '--') - break - } -} - -if (sawRemovedFlags) { - // eslint-disable-next-line no-console - console.error('See `npm help exec` for more information') -} - -cli(process) diff --git a/node_modules/npm/bin/npx.cmd b/node_modules/npm/bin/npx.cmd deleted file mode 100755 index b79518e..0000000 --- a/node_modules/npm/bin/npx.cmd +++ /dev/null @@ -1,20 +0,0 @@ -:: Created by npm, please don't edit manually. -@ECHO OFF - -SETLOCAL - -SET "NODE_EXE=%~dp0\node.exe" -IF NOT EXIST "%NODE_EXE%" ( - SET "NODE_EXE=node" -) - -SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" -SET "NPX_CLI_JS=%~dp0\node_modules\npm\bin\npx-cli.js" -FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( - SET "NPM_PREFIX_NPX_CLI_JS=%%F\node_modules\npm\bin\npx-cli.js" -) -IF EXIST "%NPM_PREFIX_NPX_CLI_JS%" ( - SET "NPX_CLI_JS=%NPM_PREFIX_NPX_CLI_JS%" -) - -"%NODE_EXE%" "%NPX_CLI_JS%" %* diff --git a/node_modules/npm/bin/npx.ps1 b/node_modules/npm/bin/npx.ps1 deleted file mode 100644 index 437e2a7..0000000 --- a/node_modules/npm/bin/npx.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 - -$nodeexe = "node$exe" -$nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source -if ($nodebin -eq $null) { - Write-Host "$nodeexe not found." - exit 1 -} -$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path - -$npmclijs="$nodedir/node_modules/npm/bin/npm-cli.js" -$npmprefix=(& $nodeexe $npmclijs prefix -g) -if ($LASTEXITCODE -ne 0) { - Write-Host "Could not determine Node.js install directory" - exit 1 -} -$npmprefixclijs="$npmprefix/node_modules/npm/bin/npx-cli.js" - -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & $nodeexe $npmprefixclijs $args -} else { - & $nodeexe $npmprefixclijs $args -} -$ret=$LASTEXITCODE -exit $ret diff --git a/node_modules/npm/docs/content/commands/npm-access.md b/node_modules/npm/docs/content/commands/npm-access.md deleted file mode 100644 index 9e9f385..0000000 --- a/node_modules/npm/docs/content/commands/npm-access.md +++ /dev/null @@ -1,123 +0,0 @@ ---- -title: npm-access -section: 1 -description: Set access level on published packages ---- - -### Synopsis - -```bash -npm access list packages [|| [] -npm access list collaborators [ []] -npm access get status [] -npm access set status=public|private [] -npm access set mfa=none|publish|automation [] -npm access grant [] -npm access revoke [] -``` - -Note: This command is unaware of workspaces. - -### Description - -Used to set access controls on private packages. - -For all of the subcommands, `npm access` will perform actions on the packages -in the current working directory if no package name is passed to the -subcommand. - -* public / restricted (deprecated): - Set a package to be either publicly accessible or restricted. - -* grant / revoke (deprecated): - Add or remove the ability of users and teams to have read-only or read-write - access to a package. - -* 2fa-required / 2fa-not-required (deprecated): - Configure whether a package requires that anyone publishing it have two-factor - authentication enabled on their account. - -* ls-packages (deprecated): - Show all of the packages a user or a team is able to access, along with the - access level, except for read-only public packages (it won't print the whole - registry listing) - -* ls-collaborators (deprecated): - Show all of the access privileges for a package. Will only show permissions - for packages to which you have at least read access. If `` is passed in, - the list is filtered only to teams _that_ user happens to belong to. - -* edit (not implemented) - -### Details - -`npm access` always operates directly on the current registry, configurable -from the command line using `--registry=`. - -Unscoped packages are *always public*. - -Scoped packages *default to restricted*, but you can either publish them as -public using `npm publish --access=public`, or set their access as public using -`npm access public` after the initial publish. - -You must have privileges to set the access of a package: - -* You are an owner of an unscoped or scoped package. -* You are a member of the team that owns a scope. -* You have been given read-write privileges for a package, either as a member - of a team or directly as an owner. - -If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the `--otp=...` option to specify it on -the command line. - -If your account is not paid, then attempts to publish scoped packages will -fail with an HTTP 402 status code (logically enough), unless you use -`--access=public`. - -Management of teams and team memberships is done with the `npm team` command. - -### Configuration - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -### See Also - -* [`libnpmaccess`](https://npm.im/libnpmaccess) -* [npm team](/commands/npm-team) -* [npm publish](/commands/npm-publish) -* [npm config](/commands/npm-config) -* [npm registry](/using-npm/registry) diff --git a/node_modules/npm/docs/content/commands/npm-adduser.md b/node_modules/npm/docs/content/commands/npm-adduser.md deleted file mode 100644 index e19b3e3..0000000 --- a/node_modules/npm/docs/content/commands/npm-adduser.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: npm-adduser -section: 1 -description: Add a registry user account ---- - -### Synopsis - -```bash -npm adduser - -alias: add-user -``` - -Note: This command is unaware of workspaces. - -### Description - -Create a new user in the specified registry, and save the credentials to -the `.npmrc` file. If no registry is specified, the default registry -will be used (see [`registry`](/using-npm/registry)). - -When using `legacy` for your `auth-type`, the username, password, and -email are read in from prompts. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. Note that if an `otp` -config is given, this value will always be set to `legacy`. - - - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm token](/commands/npm-token) -* [npm profile](/commands/npm-profile) diff --git a/node_modules/npm/docs/content/commands/npm-audit.md b/node_modules/npm/docs/content/commands/npm-audit.md deleted file mode 100644 index 9b98734..0000000 --- a/node_modules/npm/docs/content/commands/npm-audit.md +++ /dev/null @@ -1,470 +0,0 @@ ---- -title: npm-audit -section: 1 -description: Run a security audit ---- - -### Synopsis - -```bash -npm audit [fix|signatures] -``` - -### Description - -The audit command submits a description of the dependencies configured in -your project to your default registry and asks for a report of known -vulnerabilities. If any vulnerabilities are found, then the impact and -appropriate remediation will be calculated. If the `fix` argument is -provided, then remediations will be applied to the package tree. - -The command will exit with a 0 exit code if no vulnerabilities were found. - -Note that some vulnerabilities cannot be fixed automatically and will -require manual intervention or review. Also note that since `npm audit -fix` runs a full-fledged `npm install` under the hood, all configs that -apply to the installer will also apply to `npm install` -- so things like -`npm audit fix --package-lock-only` will work as expected. - -By default, the audit command will exit with a non-zero code if any -vulnerability is found. It may be useful in CI environments to include the -`--audit-level` parameter to specify the minimum vulnerability level that -will cause the command to fail. This option does not filter the report -output, it simply changes the command's failure threshold. - -### Package lock - -By default npm requires a package-lock or shrinkwrap in order to run the -audit. You can bypass the package lock with `--no-package-lock` but be -aware the results may be different with every run, since npm will -re-build the dependency tree each time. - -### Audit Signatures - -To ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI. - -Registry signatures can be verified using the following `audit` command: - -```bash -$ npm audit signatures -``` - -The npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed: - -1. Signatures are provided in the package's `packument` in each published version within the `dist` object: - -```json -"dist":{ - "..omitted..": "..omitted..", - "signatures": [{ - "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}", - "sig": "a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809..." - }] -} -``` - -See this [example](https://registry.npmjs.org/light-cycle/1.4.3) of a signed package from the public npm registry. - -The `sig` is generated using the following template: `${package.name}@${package.version}:${package.dist.integrity}` and the `keyid` has to match one of the public signing keys below. - -2. Public signing keys are provided at `registry-host.tld/-/npm/v1/keys` in the following format: - -``` -{ - "keys": [{ - "expires": null, - "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}", - "keytype": "ecdsa-sha2-nistp256", - "scheme": "ecdsa-sha2-nistp256", - "key": "{{B64_PUBLIC_KEY}}" - }] -} -``` - -Keys response: - -- `expires`: null or a simplified extended [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601"): `YYYY-MM-DDTHH:mm:ss.sssZ` -- `keydid`: sha256 fingerprint of the public key -- `keytype`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI -- `scheme`: only `ecdsa-sha2-nistp256` is currently supported by the npm CLI -- `key`: base64 encoded public key - -See this [example key's response from the public npm registry](https://registry.npmjs.org/-/npm/v1/keys"). - -### Audit Endpoints - -There are two audit endpoints that npm may use to fetch vulnerability -information: the `Bulk Advisory` endpoint and the `Quick Audit` endpoint. - -#### Bulk Advisory Endpoint - -As of version 7, npm uses the much faster `Bulk Advisory` endpoint to -optimize the speed of calculating audit results. - -npm will generate a JSON payload with the name and list of versions of each -package in the tree, and POST it to the default configured registry at -the path `/-/npm/v1/security/advisories/bulk`. - -Any packages in the tree that do not have a `version` field in their -package.json file will be ignored. If any `--omit` options are specified -(either via the [`--omit` config](/using-npm/config#omit), or one of the -shorthands such as `--production`, `--only=dev`, and so on), then packages will -be omitted from the submitted payload as appropriate. - -If the registry responds with an error, or with an invalid response, then -npm will attempt to load advisory data from the `Quick Audit` endpoint. - -The expected result will contain a set of advisory objects for each -dependency that matches the advisory range. Each advisory object contains -a `name`, `url`, `id`, `severity`, `vulnerable_versions`, and `title`. - -npm then uses these advisory objects to calculate vulnerabilities and -meta-vulnerabilities of the dependencies within the tree. - -#### Quick Audit Endpoint - -If the `Bulk Advisory` endpoint returns an error, or invalid data, npm will -attempt to load advisory data from the `Quick Audit` endpoint, which is -considerably slower in most cases. - -The full package tree as found in `package-lock.json` is submitted, along -with the following pieces of additional metadata: - -* `npm_version` -* `node_version` -* `platform` -* `arch` -* `node_env` - -All packages in the tree are submitted to the Quick Audit endpoint. -Omitted dependency types are skipped when generating the report. - -#### Scrubbing - -Out of an abundance of caution, npm versions 5 and 6 would "scrub" any -packages from the submitted report if their name contained a `/` character, -so as to avoid leaking the names of potentially private packages or git -URLs. - -However, in practice, this resulted in audits often failing to properly -detect meta-vulnerabilities, because the tree would appear to be invalid -due to missing dependencies, and prevented the detection of vulnerabilities -in package trees that used git dependencies or private modules. - -This scrubbing has been removed from npm as of version 7. - -#### Calculating Meta-Vulnerabilities and Remediations - -npm uses the -[`@npmcli/metavuln-calculator`](http://npm.im/@npmcli/metavuln-calculator) -module to turn a set of security advisories into a set of "vulnerability" -objects. A "meta-vulnerability" is a dependency that is vulnerable by -virtue of dependence on vulnerable versions of a vulnerable package. - -For example, if the package `foo` is vulnerable in the range `>=1.0.2 -<2.0.0`, and the package `bar` depends on `foo@^1.1.0`, then that version -of `bar` can only be installed by installing a vulnerable version of `foo`. -In this case, `bar` is a "metavulnerability". - -Once metavulnerabilities for a given package are calculated, they are -cached in the `~/.npm` folder and only re-evaluated if the advisory range -changes, or a new version of the package is published (in which case, the -new version is checked for metavulnerable status as well). - -If the chain of metavulnerabilities extends all the way to the root -project, and it cannot be updated without changing its dependency ranges, -then `npm audit fix` will require the `--force` option to apply the -remediation. If remediations do not require changes to the dependency -ranges, then all vulnerable packages will be updated to a version that does -not have an advisory or metavulnerability posted against it. - -### Exit Code - -The `npm audit` command will exit with a 0 exit code if no vulnerabilities -were found. The `npm audit fix` command will exit with 0 exit code if no -vulnerabilities are found _or_ if the remediation is able to successfully -fix all vulnerabilities. - -If vulnerabilities were found the exit code will depend on the -[`audit-level` config](/using-npm/config#audit-level). - -### Examples - -Scan your project for vulnerabilities and automatically install any compatible -updates to vulnerable dependencies: - -```bash -$ npm audit fix -``` - -Run `audit fix` without modifying `node_modules`, but still updating the -pkglock: - -```bash -$ npm audit fix --package-lock-only -``` - -Skip updating `devDependencies`: - -```bash -$ npm audit fix --only=prod -``` - -Have `audit fix` install SemVer-major updates to toplevel dependencies, not -just SemVer-compatible ones: - -```bash -$ npm audit fix --force -``` - -Do a dry run to get an idea of what `audit fix` will do, and _also_ output -install information in JSON format: - -```bash -$ npm audit fix --dry-run --json -``` - -Scan your project for vulnerabilities and just show the details, without -fixing anything: - -```bash -$ npm audit -``` - -Get the detailed audit report in JSON format: - -```bash -$ npm audit --json -``` - -Fail an audit only if the results include a vulnerability with a level of moderate or higher: - -```bash -$ npm audit --audit-level=moderate -``` - -### Configuration - -#### `audit-level` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for `npm audit` to exit with a non-zero -exit code. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm install](/commands/npm-install) -* [config](/using-npm/config) diff --git a/node_modules/npm/docs/content/commands/npm-bugs.md b/node_modules/npm/docs/content/commands/npm-bugs.md deleted file mode 100644 index 4fb660a..0000000 --- a/node_modules/npm/docs/content/commands/npm-bugs.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: npm-bugs -section: 1 -description: Report bugs for a package in a web browser ---- - -### Synopsis - -```bash -npm bugs [ [ ...]] - -alias: issues -``` - -### Description - -This command tries to guess at the likely location of a package's bug -tracker URL or the `mailto` URL of the support email, and then tries to -open it using the [`--browser` config](/using-npm/config#browser) param. If no -package name is provided, it will search for a `package.json` in the current -folder and use the `name` property. - -### Configuration - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### See Also - -* [npm docs](/commands/npm-docs) -* [npm view](/commands/npm-view) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/node_modules/npm/docs/content/commands/npm-cache.md b/node_modules/npm/docs/content/commands/npm-cache.md deleted file mode 100644 index 1697be9..0000000 --- a/node_modules/npm/docs/content/commands/npm-cache.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: npm-cache -section: 1 -description: Manipulates packages cache ---- - -### Synopsis - -```bash -npm cache add -npm cache clean [] -npm cache ls [@] -npm cache verify -``` - -Note: This command is unaware of workspaces. - -### Description - -Used to add, list, or clean the npm cache folder. - -* add: - Add the specified packages to the local cache. This command is primarily - intended to be used internally by npm, but it can provide a way to - add data to the local installation cache explicitly. - -* clean: - Delete all data out of the cache folder. Note that this is typically - unnecessary, as npm's cache is self-healing and resistant to data - corruption issues. - -* verify: - Verify the contents of the cache folder, garbage collecting any unneeded - data, and verifying the integrity of the cache index and all cached data. - -### Details - -npm stores cache data in an opaque directory within the configured `cache`, -named `_cacache`. This directory is a -[`cacache`](http://npm.im/cacache)-based content-addressable cache that -stores all http request data as well as other package-related data. This -directory is primarily accessed through `pacote`, the library responsible -for all package fetching as of npm@5. - -All data that passes through the cache is fully verified for integrity on -both insertion and extraction. Cache corruption will either trigger an -error, or signal to `pacote` that the data must be refetched, which it will -do automatically. For this reason, it should never be necessary to clear -the cache for any reason other than reclaiming disk space, thus why `clean` -now requires `--force` to run. - -There is currently no method exposed through npm to inspect or directly -manage the contents of this cache. In order to access it, `cacache` must be -used directly. - -npm will not remove data by itself: the cache will grow as new packages are -installed. - -### A note about the cache's design - -The npm cache is strictly a cache: it should not be relied upon as a -persistent and reliable data store for package data. npm makes no guarantee -that a previously-cached piece of data will be available later, and will -automatically delete corrupted contents. The primary guarantee that the -cache makes is that, if it does return data, that data will be exactly the -data that was inserted. - -To run an offline verification of existing cache contents, use `npm cache -verify`. - -### Configuration - -#### `cache` - -* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` -* Type: Path - -The location of npm's cache directory. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm install](/commands/npm-install) -* [npm publish](/commands/npm-publish) -* [npm pack](/commands/npm-pack) -* https://npm.im/cacache -* https://npm.im/pacote -* https://npm.im/@npmcli/arborist -* https://npm.im/make-fetch-happen diff --git a/node_modules/npm/docs/content/commands/npm-ci.md b/node_modules/npm/docs/content/commands/npm-ci.md deleted file mode 100644 index 57f6555..0000000 --- a/node_modules/npm/docs/content/commands/npm-ci.md +++ /dev/null @@ -1,317 +0,0 @@ ---- -title: npm-ci -section: 1 -description: Clean install a project ---- - -### Synopsis - -```bash -npm ci - -aliases: clean-install, ic, install-clean, isntall-clean -``` - -### Description - -This command is similar to [`npm install`](/commands/npm-install), except -it's meant to be used in automated environments such as test platforms, -continuous integration, and deployment -- or any situation where you want -to make sure you're doing a clean install of your dependencies. - -The main differences between using `npm install` and `npm ci` are: - -* The project **must** have an existing `package-lock.json` or - `npm-shrinkwrap.json`. -* If dependencies in the package lock do not match those in `package.json`, - `npm ci` will exit with an error, instead of updating the package lock. -* `npm ci` can only install entire projects at a time: individual - dependencies cannot be added with this command. -* If a `node_modules` is already present, it will be automatically removed - before `npm ci` begins its install. -* It will never write to `package.json` or any of the package-locks: - installs are essentially frozen. - -NOTE: If you create your `package-lock.json` file by running `npm install` -with flags that can affect the shape of your dependency tree, such as -`--legacy-peer-deps` or `--install-links`, you _must_ provide the same -flags to `npm ci` or you are likely to encounter errors. An easy way to do -this is to run, for example, -`npm config set legacy-peer-deps=true --location=project` and commit the -`.npmrc` file to your repo. - -### Example - -Make sure you have a package-lock and an up-to-date install: - -```bash -$ cd ./my/npm/project -$ npm install -added 154 packages in 10s -$ ls | grep package-lock -``` - -Run `npm ci` in that project - -```bash -$ npm ci -added 154 packages in 5s -``` - -Configure Travis CI to build using `npm ci` instead of `npm install`: - -```bash -# .travis.yml -install: -- npm ci -# keep the npm cache around to speed up installs -cache: - directories: - - "$HOME/.npm" -``` - -### Configuration - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm install](/commands/npm-install) -* [package-lock.json](/configuring-npm/package-lock-json) diff --git a/node_modules/npm/docs/content/commands/npm-completion.md b/node_modules/npm/docs/content/commands/npm-completion.md deleted file mode 100644 index 8cbc713..0000000 --- a/node_modules/npm/docs/content/commands/npm-completion.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: npm-completion -section: 1 -description: Tab Completion for npm ---- - -### Synopsis - -```bash -npm completion -``` - -Note: This command is unaware of workspaces. - -### Description - -Enables tab-completion in all npm commands. - -The synopsis above -loads the completions into your current shell. Adding it to -your ~/.bashrc or ~/.zshrc will make the completions available -everywhere: - -```bash -npm completion >> ~/.bashrc -npm completion >> ~/.zshrc -``` - -You may of course also pipe the output of `npm completion` to a file -such as `/usr/local/etc/bash_completion.d/npm` or -`/etc/bash_completion.d/npm` if you have a system that will read -that file for you. - -When `COMP_CWORD`, `COMP_LINE`, and `COMP_POINT` are defined in the -environment, `npm completion` acts in "plumbing mode", and outputs -completions based on the arguments. - -### See Also - -* [npm developers](/using-npm/developers) -* [npm](/commands/npm) diff --git a/node_modules/npm/docs/content/commands/npm-config.md b/node_modules/npm/docs/content/commands/npm-config.md deleted file mode 100644 index 80f44b2..0000000 --- a/node_modules/npm/docs/content/commands/npm-config.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: npm-config -section: 1 -description: Manage the npm configuration files ---- - -### Synopsis - -```bash -npm config set = [= ...] -npm config get [ [ ...]] -npm config delete [ ...] -npm config list [--json] -npm config edit -npm config fix - -alias: c -``` - -Note: This command is unaware of workspaces. - -### Description - -npm gets its config settings from the command line, environment -variables, `npmrc` files, and in some cases, the `package.json` file. - -See [npmrc](/configuring-npm/npmrc) for more information about the npmrc -files. - -See [config](/using-npm/config) for a more thorough explanation of the -mechanisms involved, and a full list of config options available. - -The `npm config` command can be used to update and edit the contents -of the user and global npmrc files. - -### Sub-commands - -Config supports the following sub-commands: - -#### set - -```bash -npm config set key=value [key=value...] -npm set key=value [key=value...] -``` - -Sets each of the config keys to the value provided. - -If value is omitted, the key will be removed from your config file entirely. - -Note: for backwards compatibility, `npm config set key value` is supported -as an alias for `npm config set key=value`. - -#### get - -```bash -npm config get [key ...] -npm get [key ...] -``` - -Echo the config value(s) to stdout. - -If multiple keys are provided, then the values will be prefixed with the -key names. - -If no keys are provided, then this command behaves the same as `npm config -list`. - -#### list - -```bash -npm config list -``` - -Show all the config settings. Use `-l` to also show defaults. Use `--json` -to show the settings in json format. - -#### delete - -```bash -npm config delete key [key ...] -``` - -Deletes the specified keys from all configuration files. - -#### edit - -```bash -npm config edit -``` - -Opens the config file in an editor. Use the `--global` flag to edit the -global config. - -#### fix - -```bash -npm config fix -``` - -Attempts to repair invalid configuration items. Usually this means -attaching authentication config (i.e. `_auth`, `_authToken`) to the -configured `registry`. - -### Configuration - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or - '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - - - -#### `location` - -* Default: "user" unless `--global` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to `npm config` this refers to which config file to use. - -When set to "global" mode, packages are installed into the `prefix` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [package.json](/configuring-npm/package-json) -* [npmrc](/configuring-npm/npmrc) -* [npm](/commands/npm) diff --git a/node_modules/npm/docs/content/commands/npm-dedupe.md b/node_modules/npm/docs/content/commands/npm-dedupe.md deleted file mode 100644 index 1e8a4bc..0000000 --- a/node_modules/npm/docs/content/commands/npm-dedupe.md +++ /dev/null @@ -1,320 +0,0 @@ ---- -title: npm-dedupe -section: 1 -description: Reduce duplication in the package tree ---- - -### Synopsis - -```bash -npm dedupe - -alias: ddp -``` - -### Description - -Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages. - -For example, consider this dependency graph: - -``` -a -+-- b <-- depends on c@1.0.x -| `-- c@1.0.3 -`-- d <-- depends on c@~1.0.9 - `-- c@1.0.10 -``` - -In this case, `npm dedupe` will transform the tree to: - -```bash -a -+-- b -+-- d -`-- c@1.0.10 -``` - -Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree. - -In some cases, you may have a dependency graph like this: - -``` -a -+-- b <-- depends on c@1.0.x -+-- c@1.0.3 -`-- d <-- depends on c@1.x - `-- c@1.9.9 -``` - -During the installation process, the `c@1.0.3` dependency for `b` was -placed in the root of the tree. Though `d`'s dependency on `c@1.x` could -have been satisfied by `c@1.0.3`, the newer `c@1.9.0` dependency was used, -because npm favors updates by default, even when doing so causes -duplication. - -Running `npm dedupe` will cause npm to note the duplication and -re-evaluate, deleting the nested `c` module, because the one in the root is -sufficient. - -To prefer deduplication over novelty during the installation process, run -`npm install --prefer-dedupe` or `npm config set prefer-dedupe true`. - -Arguments are ignored. Dedupe always acts on the entire tree. - -Note that this operation transforms the dependency tree, but will never -result in new modules being installed. - -Using `npm find-dupes` will run the command in `--dry-run` mode. - -Note: `npm dedupe` will never update the semver values of direct -dependencies in your project `package.json`, if you want to update -values in `package.json` you can run: `npm update --save` instead. - -### Configuration - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm find-dupes](/commands/npm-find-dupes) -* [npm ls](/commands/npm-ls) -* [npm update](/commands/npm-update) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/commands/npm-deprecate.md b/node_modules/npm/docs/content/commands/npm-deprecate.md deleted file mode 100644 index 706ecf3..0000000 --- a/node_modules/npm/docs/content/commands/npm-deprecate.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: npm-deprecate -section: 1 -description: Deprecate a version of a package ---- - -### Synopsis - -```bash -npm deprecate -``` - -Note: This command is unaware of workspaces. - -### Description - -This command will update the npm registry entry for a package, providing a -deprecation warning to all who attempt to install it. - -It works on [version ranges](https://semver.npmjs.com/) as well as specific -versions, so you can do something like this: - -```bash -npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3" -``` - -SemVer ranges passed to this command are interpreted such that they *do* -include prerelease versions. For example: - -```bash -npm deprecate my-thing@1.x "1.x is no longer supported" -``` - -In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated. - -You must be the package owner to deprecate something. See the `owner` and -`adduser` help topics. - -To un-deprecate a package, specify an empty string (`""`) for the `message` -argument. Note that you must use double quotes with no space between them to -format an empty string. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm owner](/commands/npm-owner) -* [npm adduser](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm-diff.md b/node_modules/npm/docs/content/commands/npm-diff.md deleted file mode 100644 index e93aef3..0000000 --- a/node_modules/npm/docs/content/commands/npm-diff.md +++ /dev/null @@ -1,316 +0,0 @@ ---- -title: npm-diff -section: 1 -description: The registry diff command ---- - -### Synopsis - -```bash -npm diff [...] -``` - -### Description - -Similar to its `git diff` counterpart, this command will print diff patches -of files for packages published to the npm registry. - -* `npm diff --diff= --diff=` - - Compares two package versions using their registry specifiers, e.g: - `npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0`. It's also possible to - compare across forks of any package, - e.g: `npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0`. - - Any valid spec can be used, so that it's also possible to compare - directories or git repositories, - e.g: `npm diff --diff=pkg@latest --diff=./packages/pkg` - - Here's an example comparing two different versions of a package named - `abbrev` from the registry: - - ```bash - npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1 - ``` - - On success, output looks like: - - ```bash - diff --git a/package.json b/package.json - index v1.1.0..v1.1.1 100644 - --- a/package.json - +++ b/package.json - @@ -1,6 +1,6 @@ - { - "name": "abbrev", - - "version": "1.1.0", - + "version": "1.1.1", - "description": "Like ruby's abbrev module, but in js", - "author": "Isaac Z. Schlueter ", - "main": "abbrev.js", - ``` - - Given the flexible nature of npm specs, you can also target local - directories or git repos just like when using `npm install`: - - ```bash - npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path - ``` - - In the example above we can compare the contents from the package installed - from the git repo at `github.com/npm/libnpmdiff` with the contents of the - `./local-path` that contains a valid package, such as a modified copy of - the original. - -* `npm diff` (in a package directory, no arguments): - - If the package is published to the registry, `npm diff` will fetch the - tarball version tagged as `latest` (this value can be configured using the - `tag` option) and proceed to compare the contents of files present in that - tarball, with the current files in your local file system. - - This workflow provides a handy way for package authors to see what - package-tracked files have been changed in comparison with the latest - published version of that package. - -* `npm diff --diff=` (in a package directory): - - When using a single package name (with no version or tag specifier) as an - argument, `npm diff` will work in a similar way to - [`npm-outdated`](npm-outdated) and reach for the registry to figure out - what current published version of the package named `` - will satisfy its dependent declared semver-range. Once that specific - version is known `npm diff` will print diff patches comparing the - current version of `` found in the local file system with - that specific version returned by the registry. - - Given a package named `abbrev` that is currently installed: - - ```bash - npm diff --diff=abbrev - ``` - - That will request from the registry its most up to date version and - will print a diff output comparing the currently installed version to this - newer one if the version numbers are not the same. - -* `npm diff --diff=` (in a package directory): - - Similar to using only a single package name, it's also possible to declare - a full registry specifier version if you wish to compare the local version - of an installed package with the specific version/tag/semver-range provided - in ``. - - An example: assuming `pkg@1.0.0` is installed in the current `node_modules` - folder, running: - - ```bash - npm diff --diff=pkg@2.0.0 - ``` - - It will effectively be an alias to - `npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0`. - -* `npm diff --diff= [--diff=]` (in a package directory): - - Using `npm diff` along with semver-valid version numbers is a shorthand - to compare different versions of the current package. - - It needs to be run from a package directory, such that for a package named - `pkg` running `npm diff --diff=1.0.0 --diff=1.0.1` is the same as running - `npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1`. - - If only a single argument `` is provided, then the current local - file system is going to be compared against that version. - - Here's an example comparing two specific versions (published to the - configured registry) of the current project directory: - - ```bash - npm diff --diff=1.0.0 --diff=1.1.0 - ``` - -Note that tag names are not valid `--diff` argument values, if you wish to -compare to a published tag, you must use the `pkg@tagname` syntax. - -#### Filtering files - -It's possible to also specify positional arguments using file names or globs -pattern matching in order to limit the result of diff patches to only a subset -of files for a given package, e.g: - - ```bash - npm diff --diff=pkg@2 ./lib/ CHANGELOG.md - ``` - -In the example above the diff output is only going to print contents of files -located within the folder `./lib/` and changed lines of code within the -`CHANGELOG.md` file. - -### Configuration - -#### `diff` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in `npm diff`. - - - -#### `diff-name-only` - -* Default: false -* Type: Boolean - -Prints only filenames when using `npm diff`. - - - -#### `diff-unified` - -* Default: 3 -* Type: Number - -The number of lines of context to print in `npm diff`. - - - -#### `diff-ignore-all-space` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in `npm diff`. - - - -#### `diff-no-prefix` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in `npm diff` output. - -Note: this causes `npm diff` to ignore the `--diff-src-prefix` and -`--diff-dst-prefix` configs. - - - -#### `diff-src-prefix` - -* Default: "a/" -* Type: String - -Source prefix to be used in `npm diff` output. - - - -#### `diff-dst-prefix` - -* Default: "b/" -* Type: String - -Destination prefix to be used in `npm diff` output. - - - -#### `diff-text` - -* Default: false -* Type: Boolean - -Treat all files as text in `npm diff`. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. -## See Also - -* [npm outdated](/commands/npm-outdated) -* [npm install](/commands/npm-install) -* [npm config](/commands/npm-config) -* [npm registry](/using-npm/registry) diff --git a/node_modules/npm/docs/content/commands/npm-dist-tag.md b/node_modules/npm/docs/content/commands/npm-dist-tag.md deleted file mode 100644 index 609da16..0000000 --- a/node_modules/npm/docs/content/commands/npm-dist-tag.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: npm-dist-tag -section: 1 -description: Modify package distribution tags ---- - -### Synopsis - -```bash -npm dist-tag add [] -npm dist-tag rm -npm dist-tag ls [] - -alias: dist-tags -``` - -### Description - -Add, remove, and enumerate distribution tags on a package: - -* add: Tags the specified version of the package with the specified tag, - or the [`--tag` config](/using-npm/config#tag) if not specified. If you have - two-factor authentication on auth-and-writes then you’ll need to include a - one-time password on the command line with - `--otp `, or go through a second factor flow based on your `authtype`. - -* rm: Clear a tag that is no longer in use from the package. If you have - two-factor authentication on auth-and-writes then you’ll need to include - a one-time password on the command line with `--otp `, - or go through a second factor flow based on your `authtype` - -* ls: Show all of the dist-tags for a package, defaulting to the package in - the current prefix. This is the default action if none is specified. - -A tag can be used when installing packages as a reference to a version instead -of using a specific version number: - -```bash -npm install @ -``` - -When installing dependencies, a preferred tagged version may be specified: - -```bash -npm install --tag -``` - -(This also applies to any other commands that resolve and install -dependencies, such as `npm dedupe`, `npm update`, and `npm audit fix`.) - -Publishing a package sets the `latest` tag to the published version unless the -`--tag` option is used. For example, `npm publish --tag=beta`. - -By default, `npm install ` (without any `@` or `@` -specifier) installs the `latest` tag. - -### Purpose - -Tags can be used to provide an alias instead of version numbers. - -For example, a project might choose to have multiple streams of development -and use a different tag for each stream, e.g., `stable`, `beta`, `dev`, -`canary`. - -By default, the `latest` tag is used by npm to identify the current version -of a package, and `npm install ` (without any `@` or `@` -specifier) installs the `latest` tag. Typically, projects only use the -`latest` tag for stable release versions, and use other tags for unstable -versions such as prereleases. - -The `next` tag is used by some projects to identify the upcoming version. - -Other than `latest`, no tag has any special significance to npm itself. - -### Caveats - -This command used to be known as `npm tag`, which only created new tags, -and so had a different syntax. - -Tags must share a namespace with version numbers, because they are -specified in the same slot: `npm install @` vs -`npm install @`. - -Tags that can be interpreted as valid semver ranges will be rejected. For -example, `v1.4` cannot be used as a tag, because it is interpreted by -semver as `>=1.4.0 <1.5.0`. See . - -The simplest way to avoid semver problems with tags is to use tags that do -not begin with a number or the letter `v`. - -### Configuration - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm publish](/commands/npm-publish) -* [npm install](/commands/npm-install) -* [npm dedupe](/commands/npm-dedupe) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-docs.md b/node_modules/npm/docs/content/commands/npm-docs.md deleted file mode 100644 index 582fc55..0000000 --- a/node_modules/npm/docs/content/commands/npm-docs.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: npm-docs -section: 1 -description: Open documentation for a package in a web browser ---- - -### Synopsis - -```bash -npm docs [ [ ...]] - -alias: home -``` - -### Description - -This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the -[`--browser` config](/using-npm/config#browser) param. You can pass multiple -package names at once. If no package name is provided, it will search for a -`package.json` in the current folder and use the `name` property. - -### Configuration - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### See Also - -* [npm view](/commands/npm-view) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) diff --git a/node_modules/npm/docs/content/commands/npm-doctor.md b/node_modules/npm/docs/content/commands/npm-doctor.md deleted file mode 100644 index b36ec38..0000000 --- a/node_modules/npm/docs/content/commands/npm-doctor.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: npm-doctor -section: 1 -description: Check the health of your npm environment ---- - -### Synopsis - -```bash -npm doctor [ping] [registry] [versions] [environment] [permissions] [cache] -``` - -Note: This command is unaware of workspaces. - -### Description - -`npm doctor` runs a set of checks to ensure that your npm installation has -what it needs to manage your JavaScript packages. npm is mostly a -standalone tool, but it does have some basic requirements that must be met: - -+ Node.js and git must be executable by npm. -+ The primary npm registry, `registry.npmjs.com`, or another service that - uses the registry API, is available. -+ The directories that npm uses, `node_modules` (both locally and - globally), exist and can be written by the current user. -+ The npm cache exists, and the package tarballs within it aren't corrupt. - -Without all of these working properly, npm may not work properly. Many -issues are often attributable to things that are outside npm's code base, -so `npm doctor` confirms that the npm installation is in a good state. - -Also, in addition to this, there are also very many issue reports due to -using old versions of npm. Since npm is constantly improving, running -`npm@latest` is better than an old version. - -`npm doctor` verifies the following items in your environment, and if -there are any recommended changes, it will display them. By default npm -runs all of these checks. You can limit what checks are ran by -specifying them as extra arguments. - -#### `npm ping` - -By default, npm installs from the primary npm registry, -`registry.npmjs.org`. `npm doctor` hits a special ping endpoint within the -registry. This can also be checked with `npm ping`. If this check fails, -you may be using a proxy that needs to be configured, or may need to talk -to your IT staff to get access over HTTPS to `registry.npmjs.org`. - -This check is done against whichever registry you've configured (you can -see what that is by running `npm config get registry`), and if you're using -a private registry that doesn't support the `/whoami` endpoint supported by -the primary registry, this check may fail. - -#### `npm -v` - -While Node.js may come bundled with a particular version of npm, it's the -policy of the CLI team that we recommend all users run `npm@latest` if they -can. As the CLI is maintained by a small team of contributors, there are -only resources for a single line of development, so npm's own long-term -support releases typically only receive critical security and regression -fixes. The team believes that the latest tested version of npm is almost -always likely to be the most functional and defect-free version of npm. - -#### `node -v` - -For most users, in most circumstances, the best version of Node will be the -latest long-term support (LTS) release. Those of you who want access to new -ECMAscript features or bleeding-edge changes to Node's standard library may -be running a newer version, and some may be required to run an older -version of Node because of enterprise change control policies. That's OK! -But in general, the npm team recommends that most users run Node.js LTS. - -#### `npm config get registry` - -You may be installing from private package registries for your project or -company. That's great! Others may be following tutorials or StackOverflow -questions in an effort to troubleshoot problems you may be having. -Sometimes, this may entail changing the registry you're pointing at. This -part of `npm doctor` just lets you, and maybe whoever's helping you with -support, know that you're not using the default registry. - -#### `which git` - -While it's documented in the README, it may not be obvious that npm needs -Git installed to do many of the things that it does. Also, in some cases -– especially on Windows – you may have Git set up in such a way that it's -not accessible via your `PATH` so that npm can find it. This check ensures -that Git is available. - -#### Permissions checks - -* Your cache must be readable and writable by the user running npm. -* Global package binaries must be writable by the user running npm. -* Your local `node_modules` path, if you're running `npm doctor` with a - project directory, must be readable and writable by the user running npm. - -#### Validate the checksums of cached packages - -When an npm package is published, the publishing process generates a -checksum that npm uses at install time to verify that the package didn't -get corrupted in transit. `npm doctor` uses these checksums to validate the -package tarballs in your local cache (you can see where that cache is -located with `npm config get cache`). In the event that there are corrupt -packages in your cache, you should probably run `npm cache clean -f` and -reset the cache. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -### See Also - -* [npm bugs](/commands/npm-bugs) -* [npm help](/commands/npm-help) -* [npm ping](/commands/npm-ping) diff --git a/node_modules/npm/docs/content/commands/npm-edit.md b/node_modules/npm/docs/content/commands/npm-edit.md deleted file mode 100644 index a26df11..0000000 --- a/node_modules/npm/docs/content/commands/npm-edit.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: npm-edit -section: 1 -description: Edit an installed package ---- - -### Synopsis - -```bash -npm edit [/...] -``` - -Note: This command is unaware of workspaces. - -### Description - -Selects a dependency in the current project and opens the package folder in -the default editor (or whatever you've configured as the npm `editor` -config -- see [`npm-config`](npm-config).) - -After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages. - -For instance, you can do `npm install connect` to install connect -into your package, and then `npm edit connect` to make a few -changes to your locally installed copy. - -### Configuration - -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or - '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - - - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm explore](/commands/npm-explore) -* [npm install](/commands/npm-install) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-exec.md b/node_modules/npm/docs/content/commands/npm-exec.md deleted file mode 100644 index fa8d80c..0000000 --- a/node_modules/npm/docs/content/commands/npm-exec.md +++ /dev/null @@ -1,366 +0,0 @@ ---- -title: npm-exec -section: 1 -description: Run a command from a local or remote npm package ---- - -### Synopsis - -```bash -npm exec -- [@] [args...] -npm exec --package=[@] -- [args...] -npm exec -c ' [args...]' -npm exec --package=foo -c ' [args...]' - -alias: x -``` - -### Description - -This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via `npm run`. - -Run without positional arguments or `--call`, this allows you to -interactively run commands in the same sort of shell environment that -`package.json` scripts are run. Interactive mode is not supported in CI -environments when standard input is a TTY, to prevent hangs. - -Whatever packages are specified by the `--package` option will be -provided in the `PATH` of the executed command, along with any locally -installed package executables. The `--package` option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available. - -If any requested packages are not present in the local project -dependencies, then a prompt is printed, which can be suppressed by -providing either `--yes` or `--no`. When standard input is not a TTY or a -CI environment is detected, `--yes` is assumed. The requested packages are -installed to a folder in the npm cache, which is added to the `PATH` -environment variable in the executed process. - -Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency. - -If no `-c` or `--call` option is provided, then the positional arguments -are used to generate the command string. If no `--package` options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic: - -- If the package has a single entry in its `bin` field in `package.json`, - or if all entries are aliases of the same command, then that command - will be used. -- If the package has multiple `bin` entries, and one of them matches the - unscoped portion of the `name` field, then that command will be used. -- If this does not result in exactly one option (either because there are - no bin entries, or none of them match the `name` of the package), then - `npm exec` exits with an error. - -To run a binary _other than_ the named binary, specify one or more -`--package` options, which will prevent npm from inferring the package from -the first command argument. - -### `npx` vs `npm exec` - -When run via the `npx` binary, all flags and options *must* be set prior to -any positional arguments. When run via `npm exec`, a double-hyphen `--` -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command. - -For example: - -``` -$ npx foo@latest bar --package=@npmcli/foo -``` - -In this case, npm will resolve the `foo` package name, and run the -following command: - -``` -$ foo bar --package=@npmcli/foo -``` - -Since the `--package` option comes _after_ the positional arguments, it is -treated as an argument to the executed command. - -In contrast, due to npm's argument parsing logic, running this command is -different: - -``` -$ npm exec foo@latest bar --package=@npmcli/foo -``` - -In this case, npm will parse the `--package` option first, resolving the -`@npmcli/foo` package. Then, it will execute the following command in that -context: - -``` -$ foo@latest bar -``` - -The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the `npx` command above: - -``` -$ npm exec -- foo@latest bar --package=@npmcli/foo -``` - -### Configuration - -#### `package` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [`npm exec`](/commands/npm-exec) - - - -#### `call` - -* Default: "" -* Type: String - -Optional companion option for `npm exec`, `npx` that allows for specifying a -custom command to be run along with the installed packages. - -```bash -npm exec --package yo --package generator-node --call "yo node" -``` - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### Examples - -Run the version of `tap` in the local dependencies, with the provided -arguments: - -``` -$ npm exec -- tap --bail test/foo.js -$ npx tap --bail test/foo.js -``` - -Run a command _other than_ the command whose name matches the package name -by specifying a `--package` option: - -``` -$ npm exec --package=foo -- bar --bar-argument -# ~ or ~ -$ npx --package=foo bar --bar-argument -``` - -Run an arbitrary shell script, in the context of the current project: - -``` -$ npm x -c 'eslint && say "hooray, lint passed"' -$ npx -c 'eslint && say "hooray, lint passed"' -``` - -### Workspaces support - -You may use the [`workspace`](/using-npm/config#workspace) or -[`workspaces`](/using-npm/config#workspaces) configs in order to run an -arbitrary command from an npm package (either one installed locally, or fetched -remotely) in the context of the specified workspaces. -If no positional argument or `--call` option is provided, it will open an -interactive subshell in the context of each of these configured workspaces one -at a time. - -Given a project with configured workspaces, e.g: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - +-- b - | `-- package.json - `-- c - `-- package.json -``` - -Assuming the workspace configuration is properly set up at the root level -`package.json` file. e.g: - -``` -{ - "workspaces": [ "./packages/*" ] -} -``` - -You can execute an arbitrary command from a package in the context of each of -the configured workspaces when using the -[`workspaces` config options](/using-npm/config#workspace), in this example -we're using **eslint** to lint any js file found within each workspace folder: - -``` -npm exec --ws -- eslint ./*.js -``` - -#### Filtering workspaces - -It's also possible to execute a command in a single workspace using the -`workspace` config along with a name or directory path: - -``` -npm exec --workspace=a -- eslint ./*.js -``` - -The `workspace` config can also be specified multiple times in order to run a -specific script in the context of multiple workspaces. When defining values for -the `workspace` config in the command line, it also possible to use `-w` as a -shorthand, e.g: - -``` -npm exec -w a -w b -- eslint ./*.js -``` - -This last command will run the `eslint` command in both `./packages/a` and -`./packages/b` folders. - -### Compatibility with Older npx Versions - -The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx` -package deprecated at that time. `npx` uses the `npm exec` -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions. - -This resulted in some shifts in its functionality: - -- Any `npm` config value may be provided. -- To prevent security and user-experience problems from mistyping package - names, `npx` prompts before installing anything. Suppress this - prompt with the `-y` or `--yes` option. -- The `--no-install` option is deprecated, and will be converted to `--no`. -- Shell fallback functionality is removed, as it is not advisable. -- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand - for `--package` in npx. This is maintained, but only for the `npx` - executable. -- The `--ignore-existing` option is removed. Locally installed bins are - always present in the executed process `PATH`. -- The `--npm` option is removed. `npx` will always use the `npm` it ships - with. -- The `--node-arg` and `-n` options are removed. -- The `--always-spawn` option is redundant, and thus removed. -- The `--shell` option is replaced with `--script-shell`, but maintained - in the `npx` executable for backwards compatibility. - -### A note on caching - -The npm cli utilizes its internal package cache when using the package -name specified. You can use the following to change how and when the -cli uses this cache. See [`npm cache`](/commands/npm-cache) for more on -how the cache works. - -#### prefer-online - -Forces staleness checks for packages, making the cli look for updates -immediately even if the package is already in the cache. - -#### prefer-offline - -Bypasses staleness checks for packages. Missing data will still be -requested from the server. To force full offline mode, use `offline`. - -#### offline - -Forces full offline mode. Any packages not locally cached will result in -an error. - -#### workspace - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result to selecting all of the - nested workspaces) - -This value is not exported to the environment for child processes. - -#### workspaces - -* Alias: `--ws` -* Type: Boolean -* Default: `false` - -Run scripts in the context of all configured workspaces for the current -project. - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) -* [npm config](/commands/npm-config) -* [npm workspaces](/using-npm/workspaces) -* [npx](/commands/npx) diff --git a/node_modules/npm/docs/content/commands/npm-explain.md b/node_modules/npm/docs/content/commands/npm-explain.md deleted file mode 100644 index b0f0ebc..0000000 --- a/node_modules/npm/docs/content/commands/npm-explain.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: npm-explain -section: 1 -description: Explain installed packages ---- - -### Synopsis - -```bash -npm explain - -alias: why -``` - -### Description - -This command will print the chain of dependencies causing a given package -to be installed in the current project. - -If one or more package specs are provided, then only packages matching -one of the specifiers will have their relationships explained. - -The package spec can also refer to a folder within `./node_modules` - -For example, running `npm explain glob` within npm's source tree will show: - -```bash -glob@7.1.6 -node_modules/glob - glob@"^7.1.4" from the root project - -glob@7.1.1 dev -node_modules/tacks/node_modules/glob - glob@"^7.0.5" from rimraf@2.6.2 - node_modules/tacks/node_modules/rimraf - rimraf@"^2.6.2" from tacks@1.3.0 - node_modules/tacks - dev tacks@"^1.3.0" from the root project -``` - -To explain just the package residing at a specific folder, pass that as the -argument to the command. This can be useful when trying to figure out -exactly why a given dependency is being duplicated to satisfy conflicting -version requirements within the project. - -```bash -$ npm explain node_modules/nyc/node_modules/find-up -find-up@3.0.0 dev -node_modules/nyc/node_modules/find-up - find-up@"^3.0.0" from nyc@14.1.1 - node_modules/nyc - nyc@"^14.1.1" from tap@14.10.8 - node_modules/tap - dev tap@"^14.10.8" from the root project -``` - -### Configuration -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm folders](/configuring-npm/folders) -* [npm ls](/commands/npm-ls) -* [npm install](/commands/npm-install) -* [npm link](/commands/npm-link) -* [npm prune](/commands/npm-prune) -* [npm outdated](/commands/npm-outdated) -* [npm update](/commands/npm-update) diff --git a/node_modules/npm/docs/content/commands/npm-explore.md b/node_modules/npm/docs/content/commands/npm-explore.md deleted file mode 100644 index e25e760..0000000 --- a/node_modules/npm/docs/content/commands/npm-explore.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: npm-explore -section: 1 -description: Browse an installed package ---- - -### Synopsis - -```bash -npm explore [ -- ] -``` - -Note: This command is unaware of workspaces. - -### Description - -Spawn a subshell in the directory of the installed package specified. - -If a command is specified, then it is run in the subshell, which then -immediately terminates. - -This is particularly handy in the case of git submodules in the -`node_modules` folder: - -```bash -npm explore some-dependency -- git pull origin master -``` - -Note that the package is *not* automatically rebuilt afterwards, so be -sure to use `npm rebuild ` if you make any changes. - -### Configuration - -#### `shell` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the `npm explore` command. - - - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm edit](/commands/npm-edit) -* [npm rebuild](/commands/npm-rebuild) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/commands/npm-find-dupes.md b/node_modules/npm/docs/content/commands/npm-find-dupes.md deleted file mode 100644 index 6710760..0000000 --- a/node_modules/npm/docs/content/commands/npm-find-dupes.md +++ /dev/null @@ -1,246 +0,0 @@ ---- -title: npm-find-dupes -section: 1 -description: Find duplication in the package tree ---- - -### Synopsis - -```bash -npm find-dupes -``` - -### Description - -Runs `npm dedupe` in `--dry-run` mode, making npm only output the -duplications, without actually changing the package tree. - -### Configuration - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm dedupe](/commands/npm-dedupe) -* [npm ls](/commands/npm-ls) -* [npm update](/commands/npm-update) -* [npm install](/commands/npm-install) - diff --git a/node_modules/npm/docs/content/commands/npm-fund.md b/node_modules/npm/docs/content/commands/npm-fund.md deleted file mode 100644 index cd12e1b..0000000 --- a/node_modules/npm/docs/content/commands/npm-fund.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: npm-fund -section: 1 -description: Retrieve funding information ---- - -### Synopsis - -```bash -npm fund [] -``` - -### Description - -This command retrieves information on how to fund the dependencies of a -given project. If no package name is provided, it will list all -dependencies that are looking for funding in a tree structure, listing -the type of funding and the url to visit. If a package name is provided -then it tries to open its funding url using the -[`--browser` config](/using-npm/config#browser) param; if there are multiple -funding sources for the package, the user will be instructed to pass the -`--which` option to disambiguate. - -The list will avoid duplicated entries and will stack all packages that -share the same url as a single entry. Thus, the list does not have the -same shape of the output from `npm ls`. - -#### Example - -### Workspaces support - -It's possible to filter the results to only include a single workspace -and its dependencies using the -[`workspace` config](/using-npm/config#workspace) option. - -#### Example: - -Here's an example running `npm fund` in a project with a configured -workspace `a`: - -```bash -$ npm fund -test-workspaces-fund@1.0.0 -+-- https://example.com/a -| | `-- a@1.0.0 -| `-- https://example.com/maintainer -| `-- foo@1.0.0 -+-- https://example.com/npmcli-funding -| `-- @npmcli/test-funding -`-- https://example.com/org - `-- bar@2.0.0 -``` - -And here is an example of the expected result when filtering only by a -specific workspace `a` in the same project: - -```bash -$ npm fund -w a -test-workspaces-fund@1.0.0 -`-- https://example.com/a - | `-- a@1.0.0 - `-- https://example.com/maintainer - `-- foo@2.0.0 -``` - -### Configuration - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - - - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `which` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. - - - -## See Also - -* [package spec](/using-npm/package-spec) -* [npm install](/commands/npm-install) -* [npm docs](/commands/npm-docs) -* [npm ls](/commands/npm-ls) -* [npm config](/commands/npm-config) -* [npm workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-help-search.md b/node_modules/npm/docs/content/commands/npm-help-search.md deleted file mode 100644 index 5bc4602..0000000 --- a/node_modules/npm/docs/content/commands/npm-help-search.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: npm-help-search -section: 1 -description: Search npm help documentation ---- - -### Synopsis - -```bash -npm help-search -``` - -Note: This command is unaware of workspaces. - -### Description - -This command will search the npm markdown documentation files for the terms -provided, and then list the results, sorted by relevance. - -If only one result is found, then it will show that help topic. - -If the argument to `npm help` is not a known help topic, then it will call -`help-search`. It is rarely if ever necessary to call this command -directly. - -### Configuration - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -### See Also - -* [npm](/commands/npm) -* [npm help](/commands/npm-help) diff --git a/node_modules/npm/docs/content/commands/npm-help.md b/node_modules/npm/docs/content/commands/npm-help.md deleted file mode 100644 index bc2c876..0000000 --- a/node_modules/npm/docs/content/commands/npm-help.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: npm-help -section: 1 -description: Get help on npm ---- - -### Synopsis - -```bash -npm help [] - -alias: hlep -``` - -Note: This command is unaware of workspaces. - -### Description - -If supplied a topic, then show the appropriate documentation page. - -If the topic does not exist, or if multiple terms are provided, then npm -will run the `help-search` command to find a match. Note that, if -`help-search` finds a single subject, then it will run `help` on that -topic, so unique matches are equivalent to specifying a topic name. - -### Configuration - -#### `viewer` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to `"browser"` to view html help content in the default web browser. - - - -### See Also - -* [npm](/commands/npm) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [package.json](/configuring-npm/package-json) -* [npm help-search](/commands/npm-help-search) diff --git a/node_modules/npm/docs/content/commands/npm-hook.md b/node_modules/npm/docs/content/commands/npm-hook.md deleted file mode 100644 index 581e786..0000000 --- a/node_modules/npm/docs/content/commands/npm-hook.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: npm-hook -section: 1 -description: Manage registry hooks ---- - -### Synopsis - -```bash -npm hook add [--type=] -npm hook ls [pkg] -npm hook rm -npm hook update -``` - -Note: This command is unaware of workspaces. - -### Description - -Allows you to manage [npm -hooks](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm), -including adding, removing, listing, and updating. - -Hooks allow you to configure URL endpoints that will be notified whenever a -change happens to any of the supported entity types. Three different types -of entities can be watched by hooks: packages, owners, and scopes. - -To create a package hook, simply reference the package name. - -To create an owner hook, prefix the owner name with `~` (as in, -`~youruser`). - -To create a scope hook, prefix the scope name with `@` (as in, -`@yourscope`). - -The hook `id` used by `update` and `rm` are the IDs listed in `npm hook ls` -for that particular hook. - -The shared secret will be sent along to the URL endpoint so you can verify -the request came from your own configured hook. - -### Example - -Add a hook to watch a package for changes: - -```bash -$ npm hook add lodash https://example.com/ my-shared-secret -``` - -Add a hook to watch packages belonging to the user `substack`: - -```bash -$ npm hook add ~substack https://example.com/ my-shared-secret -``` - -Add a hook to watch packages in the scope `@npm` - -```bash -$ npm hook add @npm https://example.com/ my-shared-secret -``` - -List all your active hooks: - -```bash -$ npm hook ls -``` - -List your active hooks for the `lodash` package: - -```bash -$ npm hook ls lodash -``` - -Update an existing hook's url: - -```bash -$ npm hook update id-deadbeef https://my-new-website.here/ -``` - -Remove a hook: - -```bash -$ npm hook rm id-deadbeef -``` - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* ["Introducing Hooks" blog post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm) diff --git a/node_modules/npm/docs/content/commands/npm-init.md b/node_modules/npm/docs/content/commands/npm-init.md deleted file mode 100644 index c4b39e6..0000000 --- a/node_modules/npm/docs/content/commands/npm-init.md +++ /dev/null @@ -1,349 +0,0 @@ ---- -title: npm-init -section: 1 -description: Create a package.json file ---- - -### Synopsis - -```bash -npm init (same as `npx `) -npm init <@scope> (same as `npx <@scope>/create`) - -aliases: create, innit -``` - -### Description - -`npm init ` can be used to set up a new or existing npm -package. - -`initializer` in this case is an npm package named `create-`, -which will be installed by [`npm-exec`](/commands/npm-exec), and then have its -main bin executed -- presumably creating or updating `package.json` and -running any other initialization-related operations. - -The init command is transformed to a corresponding `npm exec` operation as -follows: - -* `npm init foo` -> `npm exec create-foo` -* `npm init @usr/foo` -> `npm exec @usr/create-foo` -* `npm init @usr` -> `npm exec @usr/create` -* `npm init @usr@2.0.0` -> `npm exec @usr/create@2.0.0` -* `npm init @usr/foo@2.0.0` -> `npm exec @usr/create-foo@2.0.0` - -If the initializer is omitted (by just calling `npm init`), init will fall -back to legacy init behavior. It will ask you a bunch of questions, and -then write a package.json for you. It will attempt to make reasonable -guesses based on existing fields, dependencies, and options selected. It is -strictly additive, so it will keep any fields and values that were already -set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If -you pass `--scope`, it will create a scoped package. - -*Note:* if a user already has the `create-` package -globally installed, that will be what `npm init` uses. If you want npm -to use the latest version, or another specific version you must specify -it: - -* `npm init foo@latest` # fetches and runs the latest `create-foo` from - the registry -* `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically - -#### Forwarding additional options - -Any additional options will be passed directly to the command, so `npm init -foo -- --hello` will map to `npm exec -- create-foo --hello`. - -To better illustrate how options are forwarded, here's a more evolved -example showing options passed to both the **npm cli** and a create package, -both following commands are equivalent: - -- `npm init foo -y --registry= -- --hello -a` -- `npm exec -y --registry= -- create-foo --hello -a` - -### Examples - -Create a new React-based project using -[`create-react-app`](https://npm.im/create-react-app): - -```bash -$ npm init react-app ./my-react-app -``` - -Create a new `esm`-compatible package using -[`create-esm`](https://npm.im/create-esm): - -```bash -$ mkdir my-esm-lib && cd my-esm-lib -$ npm init esm --yes -``` - -Generate a plain old package.json using legacy init: - -```bash -$ mkdir my-npm-pkg && cd my-npm-pkg -$ git init -$ npm init -``` - -Generate it without having it ask any questions: - -```bash -$ npm init -y -``` - -### Workspaces support - -It's possible to create a new workspace within your project by using the -`workspace` config option. When using `npm init -w ` the cli will -create the folders and boilerplate expected while also adding a reference -to your project `package.json` `"workspaces": []` property in order to make -sure that new generated **workspace** is properly set up as such. - -Given a project with no workspaces, e.g: - -``` -. -+-- package.json -``` - -You may generate a new workspace using the legacy init: - -```bash -$ npm init -w packages/a -``` - -That will generate a new folder and `package.json` file, while also updating -your top-level `package.json` to add the reference to this new workspace: - -``` -. -+-- package.json -`-- packages - `-- a - `-- package.json -``` - -The workspaces init also supports the `npm init -w ` -syntax, following the same set of rules explained earlier in the initial -**Description** section of this page. Similar to the previous example of -creating a new React-based project using -[`create-react-app`](https://npm.im/create-react-app), the following syntax -will make sure to create the new react app as a nested **workspace** within your -project and configure your `package.json` to recognize it as such: - -```bash -npm init -w packages/my-react-app react-app . -``` - -This will make sure to generate your react app as expected, one important -consideration to have in mind is that `npm exec` is going to be run in the -context of the newly created folder for that workspace, and that's the reason -why in this example the initializer uses the initializer name followed with a -dot to represent the current directory in that context, e.g: `react-app .`: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- my-react-app - +-- README - +-- package.json - `-- ... -``` - -### Configuration - -#### `init-author-name` - -* Default: "" -* Type: String - -The value `npm init` should use by default for the package author's name. - - - -#### `init-author-url` - -* Default: "" -* Type: "" or URL - -The value `npm init` should use by default for the package author's -homepage. - - - -#### `init-license` - -* Default: "ISC" -* Type: String - -The value `npm init` should use by default for the package license. - - - -#### `init-module` - -* Default: "~/.npm-init.js" -* Type: Path - -A module that will be loaded by the `npm init` command. See the -documentation for the -[init-package-json](https://github.com/npm/init-package-json) module for -more information, or [npm init](/commands/npm-init). - - - -#### `init-version` - -* Default: "1.0.0" -* Type: SemVer string - -The value that `npm init` should use by default for the package version -number, if not already set in package.json. - - - -#### `yes` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. - - - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - - - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - - - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [init-package-json module](http://npm.im/init-package-json) -* [package.json](/configuring-npm/package-json) -* [npm version](/commands/npm-version) -* [npm scope](/using-npm/scope) -* [npm exec](/commands/npm-exec) -* [npm workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-install-ci-test.md b/node_modules/npm/docs/content/commands/npm-install-ci-test.md deleted file mode 100644 index f01b997..0000000 --- a/node_modules/npm/docs/content/commands/npm-install-ci-test.md +++ /dev/null @@ -1,264 +0,0 @@ ---- -title: npm-install-ci-test -section: 1 -description: Install a project with a clean slate and run tests ---- - -### Synopsis - -```bash -npm install-ci-test - -aliases: cit, clean-install-test, sit -``` - -### Description - -This command runs `npm ci` followed immediately by `npm test`. - -### Configuration - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm install-test](/commands/npm-install-test) -* [npm ci](/commands/npm-ci) -* [npm test](/commands/npm-test) diff --git a/node_modules/npm/docs/content/commands/npm-install-test.md b/node_modules/npm/docs/content/commands/npm-install-test.md deleted file mode 100644 index 3b94ea2..0000000 --- a/node_modules/npm/docs/content/commands/npm-install-test.md +++ /dev/null @@ -1,361 +0,0 @@ ---- -title: npm-install-test -section: 1 -description: Install package(s) and run tests ---- - -### Synopsis - -```bash -npm install-test [ ...] - -alias: it -``` - -### Description - -This command runs an `npm install` followed immediately by an `npm test`. It -takes exactly the same arguments as `npm install`. - -### Configuration - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `prefer-dedupe` - -* Default: false -* Type: Boolean - -Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `cpu` - -* Default: null -* Type: null or String - -Override CPU architecture of native modules to install. Acceptable values -are same as `cpu` field of package.json, which comes from `process.arch`. - - - -#### `os` - -* Default: null -* Type: null or String - -Override OS of native modules to install. Acceptable values are same as `os` -field of package.json, which comes from `process.platform`. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm install](/commands/npm-install) -* [npm install-ci-test](/commands/npm-install-ci-test) -* [npm test](/commands/npm-test) diff --git a/node_modules/npm/docs/content/commands/npm-install.md b/node_modules/npm/docs/content/commands/npm-install.md deleted file mode 100644 index 7a181a9..0000000 --- a/node_modules/npm/docs/content/commands/npm-install.md +++ /dev/null @@ -1,797 +0,0 @@ ---- -title: npm-install -section: 1 -description: Install a package ---- - -### Synopsis - -```bash -npm install [ ...] - -aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall -``` - -### Description - -This command installs a package and any packages that it depends on. If the -package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, -the installation of dependencies will be driven by that, respecting the -following order of precedence: - -* `npm-shrinkwrap.json` -* `package-lock.json` -* `yarn.lock` - -See [package-lock.json](/configuring-npm/package-lock-json) and -[`npm shrinkwrap`](/commands/npm-shrinkwrap). - -A `package` is: - -* a) a folder containing a program described by a - [`package.json`](/configuring-npm/package-json) file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `@` that is published on the registry (see - [`registry`](/using-npm/registry)) with (c) -* e) a `@` (see [`npm dist-tag`](/commands/npm-dist-tag)) that - points to (d) -* f) a `` that has a "latest" tag satisfying (e) -* g) a `` that resolves to (a) - -Even if you never publish your package, you can still get a lot of benefits -of using npm if you just want to write a node program (a), and perhaps if -you also want to be able to easily install it elsewhere after packing it up -into a tarball (b). - - -* `npm install` (in a package directory, no arguments): - - Install the dependencies to the local `node_modules` folder. - - In global mode (ie, with `-g` or `--global` appended to the command), - it installs the current package context (ie, the current working - directory) as a global package. - - By default, `npm install` will install all modules listed as - dependencies in [`package.json`](/configuring-npm/package-json). - - With the `--production` flag (or when the `NODE_ENV` environment - variable is set to `production`), npm will not install modules listed - in `devDependencies`. To install all modules listed in both - `dependencies` and `devDependencies` when `NODE_ENV` environment - variable is set to `production`, you can use `--production=false`. - - > NOTE: The `--production` flag has no particular meaning when adding a - dependency to a project. - -* `npm install `: - - If `` sits inside the root of your project, its dependencies will be installed and may - be hoisted to the top-level `node_modules` as they would for other - types of dependencies. If `` sits outside the root of your project, - *npm will not install the package dependencies* in the directory ``, - but it will create a symlink to ``. - - > NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the `--install-links` option. - - Example: - - ```bash - npm install ../../other-package --install-links - npm install ./sub-package - ``` - -* `npm install `: - - Install a package that is sitting on the filesystem. Note: if you just - want to link a dev directory into your npm root, you can do this more - easily by using [`npm link`](/commands/npm-link). - - Tarball requirements: - * The filename *must* use `.tar`, `.tar.gz`, or `.tgz` as the - extension. - * The package contents should reside in a subfolder inside the tarball - (usually it is called `package/`). npm strips one directory layer - when installing the package (an equivalent of `tar x - --strip-components=1` is run). - * The package must contain a `package.json` file with `name` and - `version` properties. - - Example: - - ```bash - npm install ./package.tgz - ``` - -* `npm install `: - - Fetch the tarball url, and then install it. In order to distinguish between - this and other options, the argument must start with "http://" or "https://" - - Example: - - ```bash - npm install https://github.com/indexzero/forever/tarball/v0.5.6 - ``` - -* `npm install [<@scope>/]`: - - Do a `@` install, where `` is the "tag" config. (See - [`config`](/using-npm/config#tag). The config's default value is `latest`.) - - In most cases, this will install the version of the modules tagged as - `latest` on the npm registry. - - Example: - - ```bash - npm install sax - ``` - - `npm install` saves any specified packages into `dependencies` by default. - Additionally, you can control where and how they get saved with some - additional flags: - - * `-P, --save-prod`: Package will appear in your `dependencies`. This - is the default unless `-D` or `-O` are present. - - * `-D, --save-dev`: Package will appear in your `devDependencies`. - - * `-O, --save-optional`: Package will appear in your - `optionalDependencies`. - - * `--no-save`: Prevents saving to `dependencies`. - - When using any of the above options to save dependencies to your - package.json, there are two additional, optional flags: - - * `-E, --save-exact`: Saved dependencies will be configured with an - exact version rather than using npm's default semver range operator. - - * `-B, --save-bundle`: Saved dependencies will also be added to your - `bundleDependencies` list. - - Further, if you have an `npm-shrinkwrap.json` or `package-lock.json` - then it will be updated as well. - - `` is optional. The package will be downloaded from the registry - associated with the specified scope. If no registry is associated with - the given scope the default registry is assumed. See - [`scope`](/using-npm/scope). - - Note: if you do not include the @-symbol on your scope name, npm will - interpret this as a GitHub repository instead, see below. Scopes names - must also be followed by a slash. - - Examples: - - ```bash - npm install sax - npm install githubname/reponame - npm install @myorg/privatepackage - npm install node-tap --save-dev - npm install dtrace-provider --save-optional - npm install readable-stream --save-exact - npm install ansi-regex --save-bundle - ``` - - **Note**: If there is a file or folder named `` in the current - working directory, then it will try to install that, and only try to - fetch the package by name if it is not valid. - -* `npm install @npm:`: - - Install a package under a custom alias. Allows multiple versions of - a same-name package side-by-side, more convenient import names for - packages with otherwise long ones, and using git forks replacements - or forked npm packages as replacements. Aliasing works only on your - project and does not rename packages in transitive dependencies. - Aliases should follow the naming conventions stated in - [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). - - Examples: - - ```bash - npm install my-react@npm:react - npm install jquery2@npm:jquery@2 - npm install jquery3@npm:jquery@3 - npm install npa@npm:npm-package-arg - ``` - -* `npm install [<@scope>/]@`: - - Install the version of the package that is referenced by the specified tag. - If the tag does not exist in the registry data for that package, then this - will fail. - - Example: - - ```bash - npm install sax@latest - npm install @myorg/mypackage@latest - ``` - -* `npm install [<@scope>/]@`: - - Install the specified version of the package. This will fail if the - version has not been published to the registry. - - Example: - - ```bash - npm install sax@0.1.1 - npm install @myorg/privatepackage@1.5.0 - ``` - -* `npm install [<@scope>/]@`: - - Install a version of the package matching the specified version range. - This will follow the same rules for resolving dependencies described in - [`package.json`](/configuring-npm/package-json). - - Note that most version ranges must be put in quotes so that your shell - will treat it as a single argument. - - Example: - - ```bash - npm install sax@">=0.1.0 <0.2.0" - npm install @myorg/privatepackage@"16 - 17" - ``` - -* `npm install `: - - Installs the package from the hosted git provider, cloning it with - `git`. For a full git remote url, only that URL will be attempted. - - ```bash - ://[[:]@][:][:][/][# | #semver:] - ``` - - `` is one of `git`, `git+ssh`, `git+http`, `git+https`, or - `git+file`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` - can be any valid semver range or exact version, and npm will look for - any tags or refs matching that range in the remote repository, much as - it would for a registry dependency. If neither `#` or - `#semver:` is specified, then the default branch of the - repository is used. - - If the repository makes use of submodules, those submodules will be - cloned as well. - - If the package being installed contains a `prepare` script, its - `dependencies` and `devDependencies` will be installed, and the prepare - script will be run, before the package is packaged and installed. - - The following git environment variables are recognized by npm and will - be added to the environment when running git: - - * `GIT_ASKPASS` - * `GIT_EXEC_PATH` - * `GIT_PROXY_COMMAND` - * `GIT_SSH` - * `GIT_SSH_COMMAND` - * `GIT_SSL_CAINFO` - * `GIT_SSL_NO_VERIFY` - - See the git man page for details. - - Examples: - - ```bash - npm install git+ssh://git@github.com:npm/cli.git#v1.0.27 - npm install git+ssh://git@github.com:npm/cli#pull/273 - npm install git+ssh://git@github.com:npm/cli#semver:^5.0 - npm install git+https://isaacs@github.com/npm/cli.git - npm install git://github.com/npm/cli.git#v1.0.27 - GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git - ``` - -* `npm install /[#]`: -* `npm install github:/[#]`: - - Install the package at `https://github.com/githubname/githubrepo` by - attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` - can be any valid semver range or exact version, and npm will look for - any tags or refs matching that range in the remote repository, much as - it would for a registry dependency. If neither `#` or - `#semver:` is specified, then the default branch is used. - - As with regular git dependencies, `dependencies` and `devDependencies` - will be installed if the package has a `prepare` script before the - package is done installing. - - Examples: - - ```bash - npm install mygithubuser/myproject - npm install github:mygithubuser/myproject - ``` - -* `npm install gist:[/][#|#semver:]`: - - Install the package at `https://gist.github.com/gistID` by attempting to - clone it using `git`. The GitHub username associated with the gist is - optional and will not be saved in `package.json`. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install gist:101a11beef - ``` - -* `npm install bitbucket:/[#]`: - - Install the package at `https://bitbucket.org/bitbucketname/bitbucketrepo` - by attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then `master` is used. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install bitbucket:mybitbucketuser/myproject - ``` - -* `npm install gitlab:/[#]`: - - Install the package at `https://gitlab.com/gitlabname/gitlabrepo` - by attempting to clone it using `git`. - - If `#` is provided, it will be used to clone exactly that - commit. If the commit-ish has the format `#semver:`, `` can - be any valid semver range or exact version, and npm will look for any tags - or refs matching that range in the remote repository, much as it would for a - registry dependency. If neither `#` or `#semver:` is - specified, then `master` is used. - - As with regular git dependencies, `dependencies` and `devDependencies` will - be installed if the package has a `prepare` script before the package is - done installing. - - Example: - - ```bash - npm install gitlab:mygitlabuser/myproject - npm install gitlab:myusr/myproj#semver:^5.0 - ``` - -You may combine multiple arguments and even multiple types of arguments. -For example: - -```bash -npm install sax@">=0.1.0 <0.2.0" bench supervisor -``` - -The `--tag` argument will apply to all of the specified install targets. If -a tag with the given name exists, the tagged version is preferred over -newer versions. - -The `--dry-run` argument will report in the usual way what the install -would have done without actually installing anything. - -The `--package-lock-only` argument will only update the -`package-lock.json`, instead of checking `node_modules` and downloading -dependencies. - -The `-f` or `--force` argument will force npm to fetch remote resources -even if a local copy exists on disk. - -```bash -npm install sax --force -``` - -### Configuration - -See the [`config`](/using-npm/config) help doc. Many of the configuration -params have some effect on installation, since that's most of what npm -does. - -These are some of the most common options related to installation. - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `prefer-dedupe` - -* Default: false -* Type: Boolean - -Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `cpu` - -* Default: null -* Type: null or String - -Override CPU architecture of native modules to install. Acceptable values -are same as `cpu` field of package.json, which comes from `process.arch`. - - - -#### `os` - -* Default: null -* Type: null or String - -Override OS of native modules to install. Acceptable values are same as `os` -field of package.json, which comes from `process.platform`. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### Algorithm - -Given a `package{dep}` structure: `A{B,C}, B{C}, C{D}`, -the npm install algorithm produces: - -```bash -A -+-- B -+-- C -+-- D -``` - -That is, the dependency from B to C is satisfied by the fact that A already -caused C to be installed at a higher level. D is still installed at the top -level because nothing conflicts with it. - -For `A{B,C}, B{C,D@1}, C{D@2}`, this algorithm produces: - -```bash -A -+-- B -+-- C - `-- D@2 -+-- D@1 -``` - -Because B's D@1 will be installed in the top-level, C now has to install -D@2 privately for itself. This algorithm is deterministic, but different -trees may be produced if two dependencies are requested for installation in -a different order. - -See [folders](/configuring-npm/folders) for a more detailed description of -the specific folder structures that npm creates. - -### See Also - -* [npm folders](/configuring-npm/folders) -* [npm update](/commands/npm-update) -* [npm audit](/commands/npm-audit) -* [npm fund](/commands/npm-fund) -* [npm link](/commands/npm-link) -* [npm rebuild](/commands/npm-rebuild) -* [npm scripts](/using-npm/scripts) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm registry](/using-npm/registry) -* [npm dist-tag](/commands/npm-dist-tag) -* [npm uninstall](/commands/npm-uninstall) -* [npm shrinkwrap](/commands/npm-shrinkwrap) -* [package.json](/configuring-npm/package-json) -* [workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-link.md b/node_modules/npm/docs/content/commands/npm-link.md deleted file mode 100644 index 34b893e..0000000 --- a/node_modules/npm/docs/content/commands/npm-link.md +++ /dev/null @@ -1,396 +0,0 @@ ---- -title: npm-link -section: 1 -description: Symlink a package folder ---- - -### Synopsis - -```bash -npm link [] - -alias: ln -``` - -### Description - -This is handy for installing your own stuff, so that you can work on it and -test iteratively without having to continually rebuild. - -Package linking is a two-step process. - -First, `npm link` in a package folder with no arguments will create a -symlink in the global folder `{prefix}/lib/node_modules/` that -links to the package where the `npm link` command was executed. It will -also link any bins in the package to `{prefix}/bin/{name}`. Note that -`npm link` uses the global prefix (see `npm prefix -g` for its value). - -Next, in some other location, `npm link package-name` will create a -symbolic link from globally-installed `package-name` to `node_modules/` of -the current folder. - -Note that `package-name` is taken from `package.json`, _not_ from the -directory name. - -The package name can be optionally prefixed with a scope. See -[`scope`](/using-npm/scope). The scope must be preceded by an @-symbol and -followed by a slash. - -When creating tarballs for `npm publish`, the linked packages are -"snapshotted" to their current state by resolving the symbolic links, if -they are included in `bundleDependencies`. - -For example: - -```bash -cd ~/projects/node-redis # go into the package directory -npm link # creates global link -cd ~/projects/node-bloggy # go into some other package directory. -npm link redis # link-install the package -``` - -Now, any changes to `~/projects/node-redis` will be reflected in -`~/projects/node-bloggy/node_modules/node-redis/`. Note that the link -should be to the package name, not the directory name for that package. - -You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way: - -```bash -cd ~/projects/node-bloggy # go into the dir of your main project -npm link ../node-redis # link the dir of your dependency -``` - -The second line is the equivalent of doing: - -```bash -(cd ../node-redis; npm link) -npm link redis -``` - -That is, it first creates a global link, and then links the global -installation target into your project's `node_modules` folder. - -Note that in this case, you are referring to the directory name, -`node-redis`, rather than the package name `redis`. - -If your linked package is scoped (see [`scope`](/using-npm/scope)) your -link command must include that scope, e.g. - -```bash -npm link @myorg/privatepackage -``` - -### Caveat - -Note that package dependencies linked in this way are _not_ saved to -`package.json` by default, on the assumption that the intention is to have -a link stand in for a regular non-link dependency. Otherwise, for example, -if you depend on `redis@^3.0.1`, and ran `npm link redis`, it would replace -the `^3.0.1` dependency with `file:../path/to/node-redis`, which you -probably don't want! Additionally, other users or developers on your -project would run into issues if they do not have their folders set up -exactly the same as yours. - -If you are adding a _new_ dependency as a link, you should add it to the -relevant metadata by running `npm install --package-lock-only`. - -If you _want_ to save the `file:` reference in your `package.json` and -`package-lock.json` files, you can use `npm link --save` to do so. - -### Workspace Usage - -`npm link --workspace ` will link the relevant package as a -dependency of the specified workspace(s). Note that It may actually be -linked into the parent project's `node_modules` folder, if there are no -conflicting dependencies. - -`npm link --workspace ` will create a global link to the specified -workspace(s). - -### Configuration - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm developers](/using-npm/developers) -* [package.json](/configuring-npm/package-json) -* [npm install](/commands/npm-install) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-login.md b/node_modules/npm/docs/content/commands/npm-login.md deleted file mode 100644 index 531dc71..0000000 --- a/node_modules/npm/docs/content/commands/npm-login.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: npm-login -section: 1 -description: Login to a registry user account ---- - -### Synopsis - -```bash -npm login -``` - -Note: This command is unaware of workspaces. - -### Description - -Verify a user in the specified registry, and save the credentials to the -`.npmrc` file. If no registry is specified, the default registry will be -used (see [`config`](/using-npm/config)). - -When using `legacy` for your `auth-type`, the username and password, are -read in from prompts. - -To reset your password, go to - -To change your email address, go to - -You may use this command multiple times with the same user account to -authorize on a new machine. When authenticating on a new machine, -the username, password and email address must all match with -your existing record. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. Note that if an `otp` -config is given, this value will always be set to `legacy`. - - - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm token](/commands/npm-token) -* [npm profile](/commands/npm-profile) diff --git a/node_modules/npm/docs/content/commands/npm-logout.md b/node_modules/npm/docs/content/commands/npm-logout.md deleted file mode 100644 index 2d5aa3e..0000000 --- a/node_modules/npm/docs/content/commands/npm-logout.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: npm-logout -section: 1 -description: Log out of the registry ---- - -### Synopsis - -```bash -npm logout -``` - -Note: This command is unaware of workspaces. - -### Description - -When logged into a registry that supports token-based authentication, tell -the server to end this token's session. This will invalidate the token -everywhere you're using it, not just for the current environment. - -When logged into a legacy registry that uses username and password -authentication, this will clear the credentials in your user configuration. -In this case, it will _only_ affect the current environment. - -If `--scope` is provided, this will find the credentials for the registry -connected to that scope, if set. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - - -### See Also - -* [npm adduser](/commands/npm-adduser) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npm whoami](/commands/npm-whoami) diff --git a/node_modules/npm/docs/content/commands/npm-ls.md b/node_modules/npm/docs/content/commands/npm-ls.md deleted file mode 100644 index 29adf7e..0000000 --- a/node_modules/npm/docs/content/commands/npm-ls.md +++ /dev/null @@ -1,294 +0,0 @@ ---- -title: npm-ls -section: 1 -description: List installed packages ---- - -### Synopsis - -```bash -npm ls - -alias: list -``` - -### Description - -This command will print to stdout all the versions of packages that are -installed, as well as their dependencies when `--all` is specified, in a -tree structure. - -Note: to get a "bottoms up" view of why a given package is included in the -tree at all, use [`npm explain`](/commands/npm-explain). - -Positional arguments are `name@version-range` identifiers, which will limit -the results to only the paths to the packages named. Note that nested -packages will *also* show the paths to the specified packages. For -example, running `npm ls promzard` in npm's source tree will show: - -```bash -npm@10.2.5 /path/to/npm -└─┬ init-package-json@0.0.4 - └── promzard@0.1.5 -``` - -It will print out extraneous, missing, and invalid packages. - -If a project specifies git urls for dependencies these are shown -in parentheses after the `name@version` to make it easier for users to -recognize potential forks of a project. - -The tree shown is the logical dependency tree, based on package -dependencies, not the physical layout of your `node_modules` folder. - -When run as `ll` or `la`, it shows extended information by default. - -### Note: Design Changes Pending - -The `npm ls` command's output and behavior made a _ton_ of sense when npm -created a `node_modules` folder that naively nested every dependency. In -such a case, the logical dependency graph and physical tree of packages on -disk would be roughly identical. - -With the advent of automatic install-time deduplication of dependencies in -npm v3, the `ls` output was modified to display the logical dependency -graph as a tree structure, since this was more useful to most users. -However, without using `npm ls -l`, it became impossible to show _where_ a -package was actually installed much of the time! - -With the advent of automatic installation of `peerDependencies` in npm v7, -this gets even more curious, as `peerDependencies` are logically -"underneath" their dependents in the dependency graph, but are always -physically at or above their location on disk. - -Also, in the years since npm got an `ls` command (in version 0.0.2!), -dependency graphs have gotten much larger as a general rule. Therefore, in -order to avoid dumping an excessive amount of content to the terminal, `npm -ls` now only shows the _top_ level dependencies, unless `--all` is -provided. - -A thorough re-examination of the use cases, intention, behavior, and output -of this command, is currently underway. Expect significant changes to at -least the default human-readable `npm ls` output in npm v8. - -### Configuration - -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `depth` - -* Default: `Infinity` if `--all` is set, otherwise `1` -* Type: null or Number - -The depth to go when recursing packages for `npm ls`. - -If not set, `npm ls` will show only the immediate dependencies of the root -project. If `--all` is set, then npm will show all dependencies by default. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `link` - -* Default: false -* Type: Boolean - -Used with `npm ls`, limiting output to only those packages that are linked. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm explain](/commands/npm-explain) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm folders](/configuring-npm/folders) -* [npm explain](/commands/npm-explain) -* [npm install](/commands/npm-install) -* [npm link](/commands/npm-link) -* [npm prune](/commands/npm-prune) -* [npm outdated](/commands/npm-outdated) -* [npm update](/commands/npm-update) diff --git a/node_modules/npm/docs/content/commands/npm-org.md b/node_modules/npm/docs/content/commands/npm-org.md deleted file mode 100644 index f065247..0000000 --- a/node_modules/npm/docs/content/commands/npm-org.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: npm-org -section: 1 -description: Manage orgs ---- - -### Synopsis - -```bash -npm org set orgname username [developer | admin | owner] -npm org rm orgname username -npm org ls orgname [] - -alias: ogr -``` - -Note: This command is unaware of workspaces. - -### Example - -Add a new developer to an org: - -```bash -$ npm org set my-org @mx-smith -``` - -Add a new admin to an org (or change a developer to an admin): - -```bash -$ npm org set my-org @mx-santos admin -``` - -Remove a user from an org: - -```bash -$ npm org rm my-org mx-santos -``` - -List all users in an org: - -```bash -$ npm org ls my-org -``` - -List all users in JSON format: - -```bash -$ npm org ls my-org --json -``` - -See what role a user has in an org: - -```bash -$ npm org ls my-org @mx-santos -``` - -### Description - -You can use the `npm org` commands to manage and view users of an -organization. It supports adding and removing users, changing their roles, -listing them, and finding specific ones and their roles. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -### See Also - -* [using orgs](/using-npm/orgs) -* [Documentation on npm Orgs](https://docs.npmjs.com/orgs/) diff --git a/node_modules/npm/docs/content/commands/npm-outdated.md b/node_modules/npm/docs/content/commands/npm-outdated.md deleted file mode 100644 index b1a1c62..0000000 --- a/node_modules/npm/docs/content/commands/npm-outdated.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: npm-outdated -section: 1 -description: Check for outdated packages ---- - -### Synopsis - -```bash -npm outdated [ ...] -``` - -### Description - -This command will check the registry to see if any (or, specific) installed -packages are currently outdated. - -By default, only the direct dependencies of the root project and direct -dependencies of your configured *workspaces* are shown. -Use `--all` to find all outdated meta-dependencies as well. - -In the output: - -* `wanted` is the maximum version of the package that satisfies the semver - range specified in `package.json`. If there's no available semver range - (i.e. you're running `npm outdated --global`, or the package isn't - included in `package.json`), then `wanted` shows the currently-installed - version. -* `latest` is the version of the package tagged as latest in the registry. - Running `npm publish` with no special configuration will publish the - package with a dist-tag of `latest`. This may or may not be the maximum - version of the package, or the most-recently published version of the - package, depending on how the package's developer manages the latest - [dist-tag](/commands/npm-dist-tag). -* `location` is where in the physical tree the package is located. -* `depended by` shows which package depends on the displayed dependency -* `package type` (when using `--long` / `-l`) tells you whether this - package is a `dependency` or a dev/peer/optional dependency. Packages not - included in `package.json` are always marked `dependencies`. -* `homepage` (when using `--long` / `-l`) is the `homepage` value contained - in the package's packument -* Red means there's a newer version matching your semver requirements, so - you should update now. -* Yellow indicates that there's a newer version _above_ your semver - requirements (usually new major, or new 0.x minor) so proceed with - caution. - -### An example - -```bash -$ npm outdated -Package Current Wanted Latest Location Depended by -glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name -nothingness 0.0.3 git git node_modules/nothingness dependent-package-name -npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name -local-dev 0.0.3 linked linked local-dev dependent-package-name -once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name -``` - -With these `dependencies`: -```json -{ - "glob": "^5.0.15", - "nothingness": "github:othiym23/nothingness#master", - "npm": "^3.5.1", - "once": "^1.3.1" -} -``` - -A few things to note: - -* `glob` requires `^5`, which prevents npm from installing `glob@6`, which - is outside the semver range. -* Git dependencies will always be reinstalled, because of how they're - specified. The installed committish might satisfy the dependency - specifier (if it's something immutable, like a commit SHA), or it might - not, so `npm outdated` and `npm update` have to fetch Git repos to check. - This is why currently doing a reinstall of a Git dependency always forces - a new clone and install. -* `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because - npm uses dist-tags to manage its `latest` and `next` release channels. - `npm update` will install the _newest_ version, but `npm install npm` - (with no semver range) will install whatever's tagged as `latest`. -* `once` is just plain out of date. Reinstalling `node_modules` from - scratch or running `npm update` will bring it up to spec. - -### Configuration - -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm update](/commands/npm-update) -* [npm dist-tag](/commands/npm-dist-tag) -* [npm registry](/using-npm/registry) -* [npm folders](/configuring-npm/folders) -* [npm workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-owner.md b/node_modules/npm/docs/content/commands/npm-owner.md deleted file mode 100644 index cd172ad..0000000 --- a/node_modules/npm/docs/content/commands/npm-owner.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: npm-owner -section: 1 -description: Manage package owners ---- - -### Synopsis - -```bash -npm owner add -npm owner rm -npm owner ls - -alias: author -``` - -### Description - -Manage ownership of published packages. - -* ls: List all the users who have access to modify a package and push new - versions. Handy when you need to know who to bug for help. -* add: Add a new user as a maintainer of a package. This user is enabled - to modify metadata, publish new versions, and add other owners. -* rm: Remove a user from the package owner list. This immediately revokes - their privileges. - -Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time. - -If you have two-factor authentication enabled with `auth-and-writes` (see -[`npm-profile`](/commands/npm-profile)) then you'll need to go through a second factor -flow when changing ownership or include an otp on the command line with `--otp`. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm profile](/commands/npm-profile) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm adduser](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm-pack.md b/node_modules/npm/docs/content/commands/npm-pack.md deleted file mode 100644 index 2ef8597..0000000 --- a/node_modules/npm/docs/content/commands/npm-pack.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: npm-pack -section: 1 -description: Create a tarball from a package ---- - -### Synopsis - -```bash -npm pack -``` - -### Configuration - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `pack-destination` - -* Default: "." -* Type: String - -Directory in which `npm pack` will save tarballs. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### Description - -For anything that's installable (that is, a package folder, tarball, -tarball url, git url, name@tag, name@version, name, or scoped name), this -command will fetch it to the cache, copy the tarball to the current working -directory as `-.tgz`, and then write the filenames out to -stdout. - -If the same package is specified multiple times, then the file will be -overwritten the second time. - -If no arguments are supplied, then npm packs the current package folder. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm-packlist package](http://npm.im/npm-packlist) -* [npm cache](/commands/npm-cache) -* [npm publish](/commands/npm-publish) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-ping.md b/node_modules/npm/docs/content/commands/npm-ping.md deleted file mode 100644 index cc3326f..0000000 --- a/node_modules/npm/docs/content/commands/npm-ping.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: npm-ping -section: 1 -description: Ping npm registry ---- - -### Synopsis - -```bash -npm ping -``` - -Note: This command is unaware of workspaces. - -### Description - -Ping the configured or given npm registry and verify authentication. -If it works it will output something like: - -```bash -npm notice PING https://registry.npmjs.org/ -npm notice PONG 255ms -``` -otherwise you will get an error: -```bash -npm notice PING http://foo.com/ -npm ERR! code E404 -npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true -``` - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -### See Also - -* [npm doctor](/commands/npm-doctor) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-pkg.md b/node_modules/npm/docs/content/commands/npm-pkg.md deleted file mode 100644 index f668c56..0000000 --- a/node_modules/npm/docs/content/commands/npm-pkg.md +++ /dev/null @@ -1,272 +0,0 @@ ---- -title: npm-pkg -section: 1 -description: Manages your package.json ---- - -### Synopsis - -```bash -npm pkg set = [= ...] -npm pkg get [ [ ...]] -npm pkg delete [ ...] -npm pkg set [[].= ...] -npm pkg set [[].= ...] -npm pkg fix -``` - -### Description - -A command that automates the management of `package.json` files. -`npm pkg` provide 3 different sub commands that allow you to modify or retrieve -values for given object keys in your `package.json`. - -The syntax to retrieve and set fields is a dot separated representation of -the nested object properties to be found within your `package.json`, it's the -same notation used in [`npm view`](/commands/npm-view) to retrieve information -from the registry manifest, below you can find more examples on how to use it. - -Returned values are always in **json** format. - -* `npm pkg get ` - - Retrieves a value `key`, defined in your `package.json` file. - - For example, in order to retrieve the name of the current package, you - can run: - - ```bash - npm pkg get name - ``` - - It's also possible to retrieve multiple values at once: - - ```bash - npm pkg get name version - ``` - - You can view child fields by separating them with a period. To retrieve - the value of a test `script` value, you would run the following command: - - ```bash - npm pkg get scripts.test - ``` - - For fields that are arrays, requesting a non-numeric field will return - all of the values from the objects in the list. For example, to get all - the contributor emails for a package, you would run: - - ```bash - npm pkg get contributors.email - ``` - - You may also use numeric indices in square braces to specifically select - an item in an array field. To just get the email address of the first - contributor in the list, you can run: - - ```bash - npm pkg get contributors[0].email - ``` - - For complex fields you can also name a property in square brackets - to specifically select a child field. This is especially helpful - with the exports object: - - ```bash - npm pkg get "exports[.].require" - ``` - -* `npm pkg set =` - - Sets a `value` in your `package.json` based on the `field` value. When - saving to your `package.json` file the same set of rules used during - `npm install` and other cli commands that touches the `package.json` file - are used, making sure to respect the existing indentation and possibly - applying some validation prior to saving values to the file. - - The same syntax used to retrieve values from your package can also be used - to define new properties or overriding existing ones, below are some - examples of how the dot separated syntax can be used to edit your - `package.json` file. - - Defining a new bin named `mynewcommand` in your `package.json` that points - to a file `cli.js`: - - ```bash - npm pkg set bin.mynewcommand=cli.js - ``` - - Setting multiple fields at once is also possible: - - ```bash - npm pkg set description='Awesome package' engines.node='>=10' - ``` - - It's also possible to add to array values, for example to add a new - contributor entry: - - ```bash - npm pkg set contributors[0].name='Foo' contributors[0].email='foo@bar.ca' - ``` - - You may also append items to the end of an array using the special - empty bracket notation: - - ```bash - npm pkg set contributors[].name='Foo' contributors[].name='Bar' - ``` - - It's also possible to parse values as json prior to saving them to your - `package.json` file, for example in order to set a `"private": true` - property: - - ```bash - npm pkg set private=true --json - ``` - - It also enables saving values as numbers: - - ```bash - npm pkg set tap.timeout=60 --json - ``` - -* `npm pkg delete ` - - Deletes a `key` from your `package.json` - - The same syntax used to set values from your package can also be used - to remove existing ones. For example, in order to remove a script named - build: - - ```bash - npm pkg delete scripts.build - ``` - -* `npm pkg fix` - - Auto corrects common errors in your `package.json`. npm already - does this during `publish`, which leads to subtle (mostly harmless) - differences between the contents of your `package.json` file and the - manifest that npm uses during installation. - -### Workspaces support - -You can set/get/delete items across your configured workspaces by using the -[`workspace`](/using-npm/config#workspace) or -[`workspaces`](/using-npm/config#workspaces) config options. - -For example, setting a `funding` value across all configured workspaces -of a project: - -```bash -npm pkg set funding=https://example.com --ws -``` - -When using `npm pkg get` to retrieve info from your configured workspaces, the -returned result will be in a json format in which top level keys are the -names of each workspace, the values of these keys will be the result values -returned from each of the configured workspaces, e.g: - -``` -npm pkg get name version --ws -{ - "a": { - "name": "a", - "version": "1.0.0" - }, - "b": { - "name": "b", - "version": "1.0.0" - } -} -``` - -### Configuration - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. -## See Also - -* [npm install](/commands/npm-install) -* [npm init](/commands/npm-init) -* [npm config](/commands/npm-config) -* [workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-prefix.md b/node_modules/npm/docs/content/commands/npm-prefix.md deleted file mode 100644 index 7718ed3..0000000 --- a/node_modules/npm/docs/content/commands/npm-prefix.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: npm-prefix -section: 1 -description: Display prefix ---- - -### Synopsis - -```bash -npm prefix [-g] -``` - -Note: This command is unaware of workspaces. - -### Description - -Print the local prefix to standard output. This is the closest parent directory -to contain a `package.json` file or `node_modules` directory, unless `-g` is -also specified. - -If `-g` is specified, this will be the value of the global prefix. See -[`npm config`](/commands/npm-config) for more detail. - -### Example - -```bash -npm prefix -/usr/local/projects/foo -``` - -```bash -npm prefix -g -/usr/local -``` - -### Configuration - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -### See Also - -* [npm root](/commands/npm-root) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-profile.md b/node_modules/npm/docs/content/commands/npm-profile.md deleted file mode 100644 index d048532..0000000 --- a/node_modules/npm/docs/content/commands/npm-profile.md +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: npm-profile -section: 1 -description: Change settings on your registry profile ---- - -### Synopsis - -```bash -npm profile enable-2fa [auth-only|auth-and-writes] -npm profile disable-2fa -npm profile get [] -npm profile set -``` - -Note: This command is unaware of workspaces. - -### Description - -Change your profile information on the registry. Note that this command -depends on the registry implementation, so third-party registries may not -support this interface. - -* `npm profile get []`: Display all of the properties of your - profile, or one or more specific properties. It looks like: - -```bash -+-----------------+---------------------------+ -| name | example | -+-----------------+---------------------------+ -| email | me@example.com (verified) | -+-----------------+---------------------------+ -| two factor auth | auth-and-writes | -+-----------------+---------------------------+ -| fullname | Example User | -+-----------------+---------------------------+ -| homepage | | -+-----------------+---------------------------+ -| freenode | | -+-----------------+---------------------------+ -| twitter | | -+-----------------+---------------------------+ -| github | | -+-----------------+---------------------------+ -| created | 2015-02-26T01:38:35.892Z | -+-----------------+---------------------------+ -| updated | 2017-10-02T21:29:45.922Z | -+-----------------+---------------------------+ -``` - -* `npm profile set `: Set the value of a profile - property. You can set the following properties this way: email, fullname, - homepage, freenode, twitter, github - -* `npm profile set password`: Change your password. This is interactive, - you'll be prompted for your current password and a new password. You'll - also be prompted for an OTP if you have two-factor authentication - enabled. - -* `npm profile enable-2fa [auth-and-writes|auth-only]`: Enables two-factor - authentication. Defaults to `auth-and-writes` mode. Modes are: - * `auth-only`: Require an OTP when logging in or making changes to your - account's authentication. The OTP will be required on both the website - and the command line. - * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, - and also requires one when publishing a module, setting the `latest` - dist-tag, or changing access via `npm access` and `npm owner`. - -* `npm profile disable-2fa`: Disables two-factor authentication. - -### Details - -Some of these commands may not be available on non npmjs.com registries. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* [npm adduser](/commands/npm-adduser) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm token](/commands/npm-token) diff --git a/node_modules/npm/docs/content/commands/npm-prune.md b/node_modules/npm/docs/content/commands/npm-prune.md deleted file mode 100644 index d195eb6..0000000 --- a/node_modules/npm/docs/content/commands/npm-prune.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: npm-prune -section: 1 -description: Remove extraneous packages ---- - -### Synopsis - -```bash -npm prune [[<@scope>/]...] -``` - -### Description - -This command removes "extraneous" packages. If a package name is provided, -then only packages matching one of the supplied names are removed. - -Extraneous packages are those present in the `node_modules` folder that are -not listed as any package's dependency list. - -If the `--omit=dev` flag is specified or the `NODE_ENV` environment -variable is set to `production`, this command will remove the packages -specified in your `devDependencies`. - -If the `--dry-run` flag is used then no changes will actually be made. - -If the `--json` flag is used, then the changes `npm prune` made (or would -have made with `--dry-run`) are printed as a JSON object. - -In normal operation, extraneous modules are pruned automatically, so you'll -only need this command with the `--production` flag. However, in the real -world, operation is not always "normal". When crashes or mistakes happen, -this command can help clean up any resulting garbage. - -### Configuration - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm uninstall](/commands/npm-uninstall) -* [npm folders](/configuring-npm/folders) -* [npm ls](/commands/npm-ls) diff --git a/node_modules/npm/docs/content/commands/npm-publish.md b/node_modules/npm/docs/content/commands/npm-publish.md deleted file mode 100644 index 0e18cdd..0000000 --- a/node_modules/npm/docs/content/commands/npm-publish.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -title: npm-publish -section: 1 -description: Publish a package ---- - -### Synopsis - -```bash -npm publish -``` - -### Description - -Publishes a package to the registry so that it can be installed by name. - -By default npm will publish to the public registry. This can be -overridden by specifying a different default registry or using a -[`scope`](/using-npm/scope) in the name, combined with a -scope-configured registry (see -[`package.json`](/configuring-npm/package-json)). - - -A `package` is interpreted the same way as other commands (like -`npm install` and can be: - -* a) a folder containing a program described by a - [`package.json`](/configuring-npm/package-json) file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `@` that is published on the registry (see - [`registry`](/using-npm/registry)) with (c) -* e) a `@` (see [`npm dist-tag`](/commands/npm-dist-tag)) that - points to (d) -* f) a `` that has a "latest" tag satisfying (e) -* g) a `` that resolves to (a) - -The publish will fail if the package name and version combination already -exists in the specified registry. - -Once a package is published with a given name and version, that specific -name and version combination can never be used again, even if it is removed -with [`npm unpublish`](/commands/npm-unpublish). - -As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the -tarball will be submitted to the registry during publication. Subsequent -installs will use the strongest supported algorithm to verify downloads. - -Similar to `--dry-run` see [`npm pack`](/commands/npm-pack), which figures -out the files to be included and packs them into a tarball to be uploaded -to the registry. - -### Files included in package - -To see what will be included in your package, run `npm pack --dry-run`. All -files are included by default, with the following exceptions: - -- Certain files that are relevant to package installation and distribution - are always included. For example, `package.json`, `README.md`, - `LICENSE`, and so on. - -- If there is a "files" list in - [`package.json`](/configuring-npm/package-json), then only the files - specified will be included. (If directories are specified, then they - will be walked recursively and their contents included, subject to the - same ignore rules.) - -- If there is a `.gitignore` or `.npmignore` file, then ignored files in - that and all child directories will be excluded from the package. If - _both_ files exist, then the `.gitignore` is ignored, and only the - `.npmignore` is used. - - `.npmignore` files follow the [same pattern - rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) - as `.gitignore` files - -- If the file matches certain patterns, then it will _never_ be included, - unless explicitly added to the `"files"` list in `package.json`, or - un-ignored with a `!` rule in a `.npmignore` or `.gitignore` file. - -- Symbolic links are never included in npm packages. - - -See [`developers`](/using-npm/developers) for full details on what's -included in the published package, as well as details on how the package is -built. - -### Configuration - -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - - - -#### `access` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If you do not want your scoped package to be publicly viewable (and -installable) set `--access=restricted`. - -Unscoped packages can not be set to `restricted`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of `restricted` or `public` during publish will -change the access for an existing package the same way that `npm access set -status` would. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `provenance` - -* Default: false -* Type: Boolean - -When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from. - -This config can not be used with: `provenance-file` - -#### `provenance-file` - -* Default: null -* Type: Path - -When publishing, the provenance bundle at the given path will be used. - -This config can not be used with: `provenance` - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm-packlist package](http://npm.im/npm-packlist) -* [npm registry](/using-npm/registry) -* [npm scope](/using-npm/scope) -* [npm adduser](/commands/npm-adduser) -* [npm owner](/commands/npm-owner) -* [npm deprecate](/commands/npm-deprecate) -* [npm dist-tag](/commands/npm-dist-tag) -* [npm pack](/commands/npm-pack) -* [npm profile](/commands/npm-profile) diff --git a/node_modules/npm/docs/content/commands/npm-query.md b/node_modules/npm/docs/content/commands/npm-query.md deleted file mode 100644 index 8fd42d6..0000000 --- a/node_modules/npm/docs/content/commands/npm-query.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: npm-query -section: 1 -description: Dependency selector query ---- - -### Synopsis - -```bash -npm query -``` - -### Description - -The `npm query` command allows for usage of css selectors in order to retrieve -an array of dependency objects. - -### Piping npm query to other commands - -```bash -# find all dependencies with postinstall scripts & uninstall them -npm query ":attr(scripts, [postinstall])" | jq 'map(.name)|join("\n")' -r | xargs -I {} npm uninstall {} - -# find all git dependencies & explain who requires them -npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {} -``` - -### Extended Use Cases & Queries - -```stylus -// all deps -* - -// all direct deps -:root > * - -// direct production deps -:root > .prod - -// direct development deps -:root > .dev - -// any peer dep of a direct deps -:root > * > .peer - -// any workspace dep -.workspace - -// all workspaces that depend on another workspace -.workspace > .workspace - -// all workspaces that have peer deps -.workspace:has(.peer) - -// any dep named "lodash" -// equivalent to [name="lodash"] -#lodash - -// any deps named "lodash" & within semver range ^"1.2.3" -#lodash@^1.2.3 -// equivalent to... -[name="lodash"]:semver(^1.2.3) - -// get the hoisted node for a given semver range -#lodash@^1.2.3:not(:deduped) - -// querying deps with a specific version -#lodash@2.1.5 -// equivalent to... -[name="lodash"][version="2.1.5"] - -// has any deps -:has(*) - -// deps with no other deps (ie. "leaf" nodes) -:empty - -// manually querying git dependencies -[repository^=github:], -[repository^=git:], -[repository^=https://github.com], -[repository^=http://github.com], -[repository^=https://github.com], -[repository^=+git:...] - -// querying for all git dependencies -:type(git) - -// get production dependencies that aren't also dev deps -.prod:not(.dev) - -// get dependencies with specific licenses -[license=MIT], [license=ISC] - -// find all packages that have @ruyadorno as a contributor -:attr(contributors, [email=ruyadorno@github.com]) -``` - -### Example Response Output - -- an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped - -```json -[ - { - "name": "", - "version": "", - "description": "", - "homepage": "", - "bugs": {}, - "author": {}, - "license": {}, - "funding": {}, - "files": [], - "main": "", - "browser": "", - "bin": {}, - "man": [], - "directories": {}, - "repository": {}, - "scripts": {}, - "config": {}, - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "bundledDependencies": {}, - "peerDependencies": {}, - "peerDependenciesMeta": {}, - "engines": {}, - "os": [], - "cpu": [], - "workspaces": {}, - "keywords": [], - ... - }, - ... -``` -### Package lock only mode - -If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines). - -### Package lock only mode - -If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines). - -### Configuration - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - -## See Also - -* [dependency selectors](/using-npm/dependency-selectors) - diff --git a/node_modules/npm/docs/content/commands/npm-rebuild.md b/node_modules/npm/docs/content/commands/npm-rebuild.md deleted file mode 100644 index 596ae97..0000000 --- a/node_modules/npm/docs/content/commands/npm-rebuild.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: npm-rebuild -section: 1 -description: Rebuild a package ---- - -### Synopsis - -```bash -npm rebuild [] ...] - -alias: rb -``` - -### Description - -This command does the following: - -1. Execute lifecycle scripts (`preinstall`, `install`, `postinstall`, `prepare`) -2. Links bins depending on whether bin links are enabled - -This command is particularly useful in scenarios including but not limited to: - -1. Installing a new version of **node.js**, where you need to recompile all your C++ add-ons with the updated binary. -2. Installing with `--ignore-scripts` and `--no-bin-links`, to explicitly choose which packages to build and/or link bins. - -If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt. - -Usually, you should not need to run `npm rebuild` as it is already done for you as part of npm install (unless you suppressed these steps with `--ignore-scripts` or `--no-bin-links`). - -If there is a `binding.gyp` file in the root of your package, then npm will use a default install hook: - -``` -"scripts": { - "install": "node-gyp rebuild" -} -``` - -This default behavior is suppressed if the `package.json` has its own `install` or `preinstall` scripts. It is also suppressed if the package specifies `"gypfile": false` - -### Configuration - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/commands/npm-repo.md b/node_modules/npm/docs/content/commands/npm-repo.md deleted file mode 100644 index 005f4ac..0000000 --- a/node_modules/npm/docs/content/commands/npm-repo.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: npm-repo -section: 1 -description: Open package repository page in the browser ---- - -### Synopsis - -```bash -npm repo [ [ ...]] -``` - -### Description - -This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the -[`--browser` config](/using-npm/config#browser) param. If no package name is -provided, it will search for a `package.json` in the current folder and use the -`repository` property. - -### Configuration - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### See Also - -* [npm docs](/commands/npm-docs) -* [npm config](/commands/npm-config) diff --git a/node_modules/npm/docs/content/commands/npm-restart.md b/node_modules/npm/docs/content/commands/npm-restart.md deleted file mode 100644 index 545315c..0000000 --- a/node_modules/npm/docs/content/commands/npm-restart.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: npm-restart -section: 1 -description: Restart a package ---- - -### Synopsis - -```bash -npm restart [-- ] -``` - -### Description - -This restarts a project. It is equivalent to running `npm run-script -restart`. - -If the current project has a `"restart"` script specified in -`package.json`, then the following scripts will be run: - -1. prerestart -2. restart -3. postrestart - -If it does _not_ have a `"restart"` script specified, but it does have -`stop` and/or `start` scripts, then the following scripts will be run: - -1. prerestart -2. prestop -3. stop -4. poststop -6. prestart -7. start -8. poststart -9. postrestart - -### Configuration - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm stop](/commands/npm-stop) -* [npm restart](/commands/npm-restart) diff --git a/node_modules/npm/docs/content/commands/npm-root.md b/node_modules/npm/docs/content/commands/npm-root.md deleted file mode 100644 index 75d70c2..0000000 --- a/node_modules/npm/docs/content/commands/npm-root.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: npm-root -section: 1 -description: Display npm root ---- - -### Synopsis - -```bash -npm root -``` - -Note: This command is unaware of workspaces. - -### Description - -Print the effective `node_modules` folder to standard out. - -Useful for using npm in shell scripts that do things with the -`node_modules` folder. For example: - -```bash -#!/bin/bash -global_node_modules="$(npm root --global)" -echo "Global packages installed in: ${global_node_modules}" -``` - -### Configuration - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -### See Also - -* [npm prefix](/commands/npm-prefix) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-run-script.md b/node_modules/npm/docs/content/commands/npm-run-script.md deleted file mode 100644 index 9e3ae1e..0000000 --- a/node_modules/npm/docs/content/commands/npm-run-script.md +++ /dev/null @@ -1,253 +0,0 @@ ---- -title: npm-run-script -section: 1 -description: Run arbitrary package scripts ---- - -### Synopsis - -```bash -npm run-script [-- ] - -aliases: run, rum, urn -``` - -### Description - -This runs an arbitrary command from a package's `"scripts"` object. If no -`"command"` is provided, it will list the available scripts. - -`run[-script]` is used by the test, start, restart, and stop commands, but -can be called directly, as well. When the scripts in the package are -printed out, they're separated into lifecycle (test, start, restart) and -directly-run scripts. - -Any positional arguments are passed to the specified script. Use `--` to -pass `-`-prefixed flags and options which would otherwise be parsed by npm. - -For example: - -```bash -npm run test -- --grep="pattern" -``` - -The arguments will only be passed to the script specified after `npm run` -and not to any `pre` or `post` script. - -The `env` script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package, it will take precedence over the -built-in. - -In addition to the shell's pre-existing `PATH`, `npm run` adds -`node_modules/.bin` to the `PATH` provided to scripts. Any binaries -provided by locally-installed dependencies can be used without the -`node_modules/.bin` prefix. For example, if there is a `devDependency` on -`tap` in your package, you should write: - -```bash -"scripts": {"test": "tap test/*.js"} -``` - -instead of - -```bash -"scripts": {"test": "node_modules/.bin/tap test/*.js"} -``` - -The actual shell your script is run within is platform dependent. By default, -on Unix-like systems it is the `/bin/sh` command, on Windows it is -`cmd.exe`. -The actual shell referred to by `/bin/sh` also depends on the system. -You can customize the shell with the -[`script-shell` config](/using-npm/config#script-shell). - -Scripts are run from the root of the package folder, regardless of what the -current working directory is when `npm run` is called. If you want your -script to use different behavior based on what subdirectory you're in, you -can use the `INIT_CWD` environment variable, which holds the full path you -were in when you ran `npm run`. - -`npm run` sets the `NODE` environment variable to the `node` executable -with which `npm` is executed. - -If you try to run a script without having a `node_modules` directory and it -fails, you will be given a warning to run `npm install`, just in case you've -forgotten. - -### Workspaces support - -You may use the [`workspace`](/using-npm/config#workspace) or -[`workspaces`](/using-npm/config#workspaces) configs in order to run an -arbitrary command from a package's `"scripts"` object in the context of the -specified workspaces. If no `"command"` is provided, it will list the available -scripts for each of these configured workspaces. - -Given a project with configured workspaces, e.g: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - +-- b - | `-- package.json - `-- c - `-- package.json -``` - -Assuming the workspace configuration is properly set up at the root level -`package.json` file. e.g: - -``` -{ - "workspaces": [ "./packages/*" ] -} -``` - -And that each of the configured workspaces has a configured `test` script, -we can run tests in all of them using the -[`workspaces` config](/using-npm/config#workspaces): - -``` -npm test --workspaces -``` - -#### Filtering workspaces - -It's also possible to run a script in a single workspace using the `workspace` -config along with a name or directory path: - -``` -npm test --workspace=a -``` - -The `workspace` config can also be specified multiple times in order to run a -specific script in the context of multiple workspaces. When defining values for -the `workspace` config in the command line, it also possible to use `-w` as a -shorthand, e.g: - -``` -npm test -w a -w b -``` - -This last command will run `test` in both `./packages/a` and `./packages/b` -packages. - -### Configuration - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `if-present` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -### See Also - -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) -* [npm config](/commands/npm-config) -* [npm workspaces](/using-npm/workspaces) diff --git a/node_modules/npm/docs/content/commands/npm-sbom.md b/node_modules/npm/docs/content/commands/npm-sbom.md deleted file mode 100644 index ecfc2e3..0000000 --- a/node_modules/npm/docs/content/commands/npm-sbom.md +++ /dev/null @@ -1,319 +0,0 @@ ---- -title: npm-sbom -section: 1 -description: Generate a Software Bill of Materials (SBOM) ---- - -### Synopsis - -```bash -npm sbom -``` - -### Description - -The `npm sbom` command generates a Software Bill of Materials (SBOM) listing the -dependencies for the current project. SBOMs can be generated in either -[SPDX](https://spdx.dev/) or [CycloneDX](https://cyclonedx.org/) format. - -### Example CycloneDX SBOM - -```json -{ - "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", - "bomFormat": "CycloneDX", - "specVersion": "1.5", - "serialNumber": "urn:uuid:09f55116-97e1-49cf-b3b8-44d0207e7730", - "version": 1, - "metadata": { - "timestamp": "2023-09-01T00:00:00.001Z", - "lifecycles": [ - { - "phase": "build" - } - ], - "tools": [ - { - "vendor": "npm", - "name": "cli", - "version": "10.1.0" - } - ], - "component": { - "bom-ref": "simple@1.0.0", - "type": "library", - "name": "simple", - "version": "1.0.0", - "scope": "required", - "author": "John Doe", - "description": "simple react app", - "purl": "pkg:npm/simple@1.0.0", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "" - } - ], - "externalReferences": [], - "licenses": [ - { - "license": { - "id": "MIT" - } - } - ] - } - }, - "components": [ - { - "bom-ref": "lodash@4.17.21", - "type": "library", - "name": "lodash", - "version": "4.17.21", - "scope": "required", - "author": "John-David Dalton", - "description": "Lodash modular utilities.", - "purl": "pkg:npm/lodash@4.17.21", - "properties": [ - { - "name": "cdx:npm:package:path", - "value": "node_modules/lodash" - } - ], - "externalReferences": [ - { - "type": "distribution", - "url": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - }, - { - "type": "vcs", - "url": "git+https://github.com/lodash/lodash.git" - }, - { - "type": "website", - "url": "https://lodash.com/" - }, - { - "type": "issue-tracker", - "url": "https://github.com/lodash/lodash/issues" - } - ], - "hashes": [ - { - "alg": "SHA-512", - "content": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a" - } - ], - "licenses": [ - { - "license": { - "id": "MIT" - } - } - ] - } - ], - "dependencies": [ - { - "ref": "simple@1.0.0", - "dependsOn": [ - "lodash@4.17.21" - ] - }, - { - "ref": "lodash@4.17.21", - "dependsOn": [] - } - ] -} -``` - -### Example SPDX SBOM - -```json -{ - "spdxVersion": "SPDX-2.3", - "dataLicense": "CC0-1.0", - "SPDXID": "SPDXRef-DOCUMENT", - "name": "simple@1.0.0", - "documentNamespace": "http://spdx.org/spdxdocs/simple-1.0.0-bf81090e-8bbc-459d-bec9-abeb794e096a", - "creationInfo": { - "created": "2023-09-01T00:00:00.001Z", - "creators": [ - "Tool: npm/cli-10.1.0" - ] - }, - "documentDescribes": [ - "SPDXRef-Package-simple-1.0.0" - ], - "packages": [ - { - "name": "simple", - "SPDXID": "SPDXRef-Package-simple-1.0.0", - "versionInfo": "1.0.0", - "packageFileName": "", - "description": "simple react app", - "primaryPackagePurpose": "LIBRARY", - "downloadLocation": "NOASSERTION", - "filesAnalyzed": false, - "homepage": "NOASSERTION", - "licenseDeclared": "MIT", - "externalRefs": [ - { - "referenceCategory": "PACKAGE-MANAGER", - "referenceType": "purl", - "referenceLocator": "pkg:npm/simple@1.0.0" - } - ] - }, - { - "name": "lodash", - "SPDXID": "SPDXRef-Package-lodash-4.17.21", - "versionInfo": "4.17.21", - "packageFileName": "node_modules/lodash", - "description": "Lodash modular utilities.", - "downloadLocation": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "filesAnalyzed": false, - "homepage": "https://lodash.com/", - "licenseDeclared": "MIT", - "externalRefs": [ - { - "referenceCategory": "PACKAGE-MANAGER", - "referenceType": "purl", - "referenceLocator": "pkg:npm/lodash@4.17.21" - } - ], - "checksums": [ - { - "algorithm": "SHA512", - "checksumValue": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a" - } - ] - } - ], - "relationships": [ - { - "spdxElementId": "SPDXRef-DOCUMENT", - "relatedSpdxElement": "SPDXRef-Package-simple-1.0.0", - "relationshipType": "DESCRIBES" - }, - { - "spdxElementId": "SPDXRef-Package-simple-1.0.0", - "relatedSpdxElement": "SPDXRef-Package-lodash-4.17.21", - "relationshipType": "DEPENDS_ON" - } - ] -} -``` - -### Package lock only mode - -If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines). - -### Configuration - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `sbom-format` - -* Default: null -* Type: "cyclonedx" or "spdx" - -SBOM format to use when generating SBOMs. - - - -#### `sbom-type` - -* Default: "library" -* Type: "library", "application", or "framework" - -The type of package described by the generated SBOM. For SPDX, this is the -value for the `primaryPackagePurpose` field. For CycloneDX, this is the -value for the `type` field. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. -## See Also - -* [package spec](/using-npm/package-spec) -* [dependency selectors](/using-npm/dependency-selectors) -* [package.json](/configuring-npm/package-json) -* [workspaces](/using-npm/workspaces) - diff --git a/node_modules/npm/docs/content/commands/npm-search.md b/node_modules/npm/docs/content/commands/npm-search.md deleted file mode 100644 index df5cc51..0000000 --- a/node_modules/npm/docs/content/commands/npm-search.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: npm-search -section: 1 -description: Search for packages ---- - -### Synopsis - -```bash -npm search [search terms ...] - -aliases: find, s, se -``` - -Note: This command is unaware of workspaces. - -### Description - -Search the registry for packages matching the search terms. `npm search` -performs a linear, incremental, lexically-ordered search through package -metadata for all files in the registry. If your terminal has color -support, it will further highlight the matches in the results. This can -be disabled with the config item `color` - -Additionally, using the `--searchopts` and `--searchexclude` options -paired with more search terms will include and exclude further patterns. -The main difference between `--searchopts` and the standard search terms -is that the former does not highlight results in the output and you can -use them more fine-grained filtering. Additionally, you can add both of -these to your config to change default search filtering behavior. - -Search also allows targeting of maintainers in search results, by prefixing -their npm username with `=`. - -If a term starts with `/`, then it's interpreted as a regular expression -and supports standard JavaScript RegExp syntax. In this case search will -ignore a trailing `/` . (Note you must escape or quote many regular -expression characters in most shells.) - -### Configuration - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `color` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If `"always"` then always shows colors. If -true, then only prints color codes for tty file descriptors. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `description` - -* Default: true -* Type: Boolean - -Show the description in `npm search` - - - -#### `searchopts` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. - - - -#### `searchexclude` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `prefer-online` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. - - - -#### `prefer-offline` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -`--offline`. - - - -#### `offline` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see `--prefer-offline`. - - - -### See Also - -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm view](/commands/npm-view) -* [npm cache](/commands/npm-cache) -* https://npm.im/npm-registry-fetch diff --git a/node_modules/npm/docs/content/commands/npm-shrinkwrap.md b/node_modules/npm/docs/content/commands/npm-shrinkwrap.md deleted file mode 100644 index 6786229..0000000 --- a/node_modules/npm/docs/content/commands/npm-shrinkwrap.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: npm-shrinkwrap -section: 1 -description: Lock down dependency versions for publication ---- - -### Synopsis - -```bash -npm shrinkwrap -``` - -Note: This command is unaware of workspaces. - -### Description - -This command repurposes `package-lock.json` into a publishable -`npm-shrinkwrap.json` or simply creates a new one. The file created and -updated by this command will then take precedence over any other existing -or future `package-lock.json` files. For a detailed explanation of the -design and purpose of package locks in npm, see -[package-lock-json](/configuring-npm/package-lock-json). - -### See Also - -* [npm install](/commands/npm-install) -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [package.json](/configuring-npm/package-json) -* [package-lock.json](/configuring-npm/package-lock-json) -* [npm-shrinkwrap.json](/configuring-npm/npm-shrinkwrap-json) -* [npm ls](/commands/npm-ls) diff --git a/node_modules/npm/docs/content/commands/npm-star.md b/node_modules/npm/docs/content/commands/npm-star.md deleted file mode 100644 index 59e1fbe..0000000 --- a/node_modules/npm/docs/content/commands/npm-star.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: npm-star -section: 1 -description: Mark your favorite packages ---- - -### Synopsis - -```bash -npm star [...] -``` - -Note: This command is unaware of workspaces. - -### Description - -"Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care. - -It's a boolean thing. Starring repeatedly has no additional effect. - -### More - -There's also these extra commands to help you manage your favorite packages: - -#### Unstar - -You can also "unstar" a package using [`npm unstar`](/commands/npm-unstar) - -"Unstarring" is the same thing, but in reverse. - -#### Listing stars - -You can see all your starred packages using [`npm stars`](/commands/npm-stars) - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm unstar](/commands/npm-unstar) -* [npm stars](/commands/npm-stars) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm-stars.md b/node_modules/npm/docs/content/commands/npm-stars.md deleted file mode 100644 index 642ccfa..0000000 --- a/node_modules/npm/docs/content/commands/npm-stars.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: npm-stars -section: 1 -description: View packages marked as favorites ---- - -### Synopsis - -```bash -npm stars [] -``` - -Note: This command is unaware of workspaces. - -### Description - -If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that. - -You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -### See Also - -* [npm star](/commands/npm-star) -* [npm unstar](/commands/npm-unstar) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm-start.md b/node_modules/npm/docs/content/commands/npm-start.md deleted file mode 100644 index cf9392c..0000000 --- a/node_modules/npm/docs/content/commands/npm-start.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: npm-start -section: 1 -description: Start a package ---- - -### Synopsis - -```bash -npm start [-- ] -``` - -### Description - -This runs a predefined command specified in the `"start"` property of -a package's `"scripts"` object. - -If the `"scripts"` object does not define a `"start"` property, npm -will run `node server.js`. - -Note that this is different from the default node behavior of running -the file specified in a package's `"main"` attribute when evoking with -`node .` - -As of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can -use custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details. - -### Example - -```json -{ - "scripts": { - "start": "node foo.js" - } -} -``` - -```bash -npm start - -> npm@x.x.x start -> node foo.js - -(foo.js output would be here) - -``` - -### Configuration - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) diff --git a/node_modules/npm/docs/content/commands/npm-stop.md b/node_modules/npm/docs/content/commands/npm-stop.md deleted file mode 100644 index 6075b43..0000000 --- a/node_modules/npm/docs/content/commands/npm-stop.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: npm-stop -section: 1 -description: Stop a package ---- - -### Synopsis - -```bash -npm stop [-- ] -``` - -### Description - -This runs a predefined command specified in the "stop" property of a -package's "scripts" object. - -Unlike with [npm start](/commands/npm-start), there is no default script -that will run if the `"stop"` property is not defined. - -### Example - -```json -{ - "scripts": { - "stop": "node bar.js" - } -} -``` - -```bash -npm stop - -> npm@x.x.x stop -> node bar.js - -(bar.js output would be here) - -``` - -### Configuration - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) diff --git a/node_modules/npm/docs/content/commands/npm-team.md b/node_modules/npm/docs/content/commands/npm-team.md deleted file mode 100644 index 7895df7..0000000 --- a/node_modules/npm/docs/content/commands/npm-team.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: npm-team -section: 1 -description: Manage organization teams and team memberships ---- - -### Synopsis - -```bash -npm team create [--otp ] -npm team destroy [--otp ] -npm team add [--otp ] -npm team rm [--otp ] -npm team ls | -``` - -Note: This command is unaware of workspaces. - -### Description - -Used to manage teams in organizations, and change team memberships. Does not -handle permissions for packages. - -Teams must always be fully qualified with the organization/scope they belong to -when operating on them, separated by a colon (`:`). That is, if you have a -`newteam` team in an `org` organization, you must always refer to that team -as `@org:newteam` in these commands. - -If you have two-factor authentication enabled in `auth-and-writes` mode, then -you can provide a code from your authenticator with `[--otp ]`. -If you don't include this then you will be taken through a second factor flow based -on your `authtype`. - -* create / destroy: - Create a new team, or destroy an existing one. Note: You cannot remove the - `developers` team, [learn more.](https://docs.npmjs.com/about-developers-team) - - Here's how to create a new team `newteam` under the `org` org: - - ```bash - npm team create @org:newteam - ``` - - You should see a confirming message such as: `+@org:newteam` once the new - team has been created. - -* add: - Add a user to an existing team. - - Adding a new user `username` to a team named `newteam` under the `org` org: - - ```bash - npm team add @org:newteam username - ``` - - On success, you should see a message: `username added to @org:newteam` - -* rm: - Using `npm team rm` you can also remove users from a team they belong to. - - Here's an example removing user `username` from `newteam` team - in `org` organization: - - ```bash - npm team rm @org:newteam username - ``` - - Once the user is removed a confirmation message is displayed: - `username removed from @org:newteam` - -* ls: - If performed on an organization name, will return a list of existing teams - under that organization. If performed on a team, it will instead return a list - of all users belonging to that particular team. - - Here's an example of how to list all teams from an org named `org`: - - ```bash - npm team ls @org - ``` - - Example listing all members of a team named `newteam`: - - ```bash - npm team ls @org:newteam - ``` - -### Details - -`npm team` always operates directly on the current registry, configurable from -the command line using `--registry=`. - -You must be a *team admin* to create teams and manage team membership, under -the given organization. Listing teams and team memberships may be done by -any member of the organization. - -Organization creation and management of team admins and *organization* members -is done through the website, not the npm CLI. - -To use teams to manage permissions on packages belonging to your organization, -use the `npm access` command to grant or revoke the appropriate permissions. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -### See Also - -* [npm access](/commands/npm-access) -* [npm config](/commands/npm-config) -* [npm registry](/using-npm/registry) diff --git a/node_modules/npm/docs/content/commands/npm-test.md b/node_modules/npm/docs/content/commands/npm-test.md deleted file mode 100644 index 72a7822..0000000 --- a/node_modules/npm/docs/content/commands/npm-test.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: npm-test -section: 1 -description: Test a package ---- - -### Synopsis - -```bash -npm test [-- ] - -aliases: tst, t -``` - -### Description - -This runs a predefined command specified in the `"test"` property of -a package's `"scripts"` object. - -### Example - -```json -{ - "scripts": { - "test": "node test.js" - } -} -``` - -```bash -npm test -> npm@x.x.x test -> node test.js - -(test.js output would be here) -``` - -### Configuration - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) diff --git a/node_modules/npm/docs/content/commands/npm-token.md b/node_modules/npm/docs/content/commands/npm-token.md deleted file mode 100644 index a17193d..0000000 --- a/node_modules/npm/docs/content/commands/npm-token.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: npm-token -section: 1 -description: Manage your authentication tokens ---- - -### Synopsis - -```bash -npm token list -npm token revoke -npm token create [--read-only] [--cidr=list] -``` - -Note: This command is unaware of workspaces. - -### Description - -This lets you list, create and revoke authentication tokens. - -* `npm token list`: - Shows a table of all active authentication tokens. You can request - this as JSON with `--json` or tab-separated values with `--parseable`. - -```bash -+--------+---------+------------+----------+----------------+ -| id | token | created | read-only | CIDR whitelist | -+--------+---------+------------+----------+----------------+ -| 7f3134 | 1fa9ba… | 2017-10-02 | yes | | -+--------+---------+------------+----------+----------------+ -| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 | -+--------+---------+------------+----------+----------------+ -| e0cf92 | 3a436a… | 2017-10-02 | no | | -+--------+---------+------------+----------+----------------+ -| 63eb9d | 74ef35… | 2017-09-28 | no | | -+--------+---------+------------+----------+----------------+ -| 2daaa8 | cbad5f… | 2017-09-26 | no | | -+--------+---------+------------+----------+----------------+ -| 68c2fe | 127e51… | 2017-09-23 | no | | -+--------+---------+------------+----------+----------------+ -| 6334e1 | 1dadd1… | 2017-09-23 | no | | -+--------+---------+------------+----------+----------------+ -``` - -* `npm token create [--read-only] [--cidr=]`: - Create a new authentication token. It can be `--read-only`, or accept - a list of - [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - ranges with which to limit use of this token. This will prompt you for - your password, and, if you have two-factor authentication enabled, an - otp. - - Currently, the cli can not generate automation tokens. Please refer to - the [docs - website](https://docs.npmjs.com/creating-and-viewing-access-tokens) - for more information on generating automation tokens. - -```bash -+----------------+--------------------------------------+ -| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d | -+----------------+--------------------------------------+ -| cidr_whitelist | | -+----------------+--------------------------------------+ -| readonly | false | -+----------------+--------------------------------------+ -| created | 2017-10-02T07:52:24.838Z | -+----------------+--------------------------------------+ -``` - -* `npm token revoke `: - Immediately removes an authentication token from the registry. You - will no longer be able to use it. This can accept both complete - tokens (such as those you get back from `npm token create`, and those - found in your `.npmrc`), and ids as seen in the parseable or json - output of `npm token list`. This will NOT accept the truncated token - found in the normal `npm token list` output. - -### Configuration - -#### `read-only` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the `npm token create` command. - - - -#### `cidr` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the `npm token create` command. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* [npm adduser](/commands/npm-adduser) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm owner](/commands/npm-owner) -* [npm whoami](/commands/npm-whoami) -* [npm profile](/commands/npm-profile) diff --git a/node_modules/npm/docs/content/commands/npm-uninstall.md b/node_modules/npm/docs/content/commands/npm-uninstall.md deleted file mode 100644 index de90df9..0000000 --- a/node_modules/npm/docs/content/commands/npm-uninstall.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: npm-uninstall -section: 1 -description: Remove a package ---- - -### Synopsis - -```bash -npm uninstall [<@scope>/]... - -aliases: unlink, remove, rm, r, un -``` - -### Description - -This uninstalls a package, completely removing everything npm installed -on its behalf. - -It also removes the package from the `dependencies`, `devDependencies`, -`optionalDependencies`, and `peerDependencies` objects in your -`package.json`. - -Further, if you have an `npm-shrinkwrap.json` or `package-lock.json`, npm -will update those files as well. - -`--no-save` will tell npm not to remove the package from your -`package.json`, `npm-shrinkwrap.json`, or `package-lock.json` files. - -`--save` or `-S` will tell npm to remove the package from your -`package.json`, `npm-shrinkwrap.json`, and `package-lock.json` files. -This is the default, but you may need to use this if you have for -instance `save=false` in your `npmrc` file - -In global mode (ie, with `-g` or `--global` appended to the command), -it uninstalls the current package context as a global package. -`--no-save` is ignored in this case. - -Scope is optional and follows the usual rules for [`scope`](/using-npm/scope). - -### Examples - -```bash -npm uninstall sax -``` - -`sax` will no longer be in your `package.json`, `npm-shrinkwrap.json`, or -`package-lock.json` files. - -```bash -npm uninstall lodash --no-save -``` - -`lodash` will not be removed from your `package.json`, -`npm-shrinkwrap.json`, or `package-lock.json` files. - -### Configuration - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm prune](/commands/npm-prune) -* [npm install](/commands/npm-install) -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) diff --git a/node_modules/npm/docs/content/commands/npm-unpublish.md b/node_modules/npm/docs/content/commands/npm-unpublish.md deleted file mode 100644 index 2421e10..0000000 --- a/node_modules/npm/docs/content/commands/npm-unpublish.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: npm-unpublish -section: 1 -description: Remove a package from the registry ---- - -### Synopsis - -```bash -npm unpublish [] -``` - -To learn more about how the npm registry treats unpublish, see our -[unpublish policies](https://docs.npmjs.com/policies/unpublish). - -### Warning - -Consider using the [`deprecate`](/commands/npm-deprecate) command instead, -if your intent is to encourage users to upgrade, or if you no longer -want to maintain a package. - -### Description - -This removes a package version from the registry, deleting its entry and -removing the tarball. - -The npm registry will return an error if you are not [logged -in](/commands/npm-adduser). - -If you do not specify a package name at all, the name and version to be -unpublished will be pulled from the project in the current directory. - -If you specify a package name but do not specify a version or if you -remove all of a package's versions then the registry will remove the -root package entry entirely. - -Even if you unpublish a package version, that specific name and version -combination can never be reused. In order to publish the package again, -you must use a new version number. If you unpublish the entire package, -you may not publish any new versions of that package until 24 hours have -passed. - -### Configuration - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm deprecate](/commands/npm-deprecate) -* [npm publish](/commands/npm-publish) -* [npm registry](/using-npm/registry) -* [npm adduser](/commands/npm-adduser) -* [npm owner](/commands/npm-owner) -* [npm login](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm-unstar.md b/node_modules/npm/docs/content/commands/npm-unstar.md deleted file mode 100644 index 92ae740..0000000 --- a/node_modules/npm/docs/content/commands/npm-unstar.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: npm-unstar -section: 1 -description: Remove an item from your favorite packages ---- - -### Synopsis - -```bash -npm unstar [...] -``` - -Note: This command is unaware of workspaces. - -### Description - -"Unstarring" a package is the opposite of [`npm star`](/commands/npm-star), -it removes an item from your list of favorite packages. - -### More - -There's also these extra commands to help you manage your favorite packages: - -#### Star - -You can "star" a package using [`npm star`](/commands/npm-star) - -#### Listing stars - -You can see all your starred packages using [`npm stars`](/commands/npm-stars) - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -### See Also - -* [npm star](/commands/npm-star) -* [npm stars](/commands/npm-stars) -* [npm view](/commands/npm-view) -* [npm whoami](/commands/npm-whoami) -* [npm adduser](/commands/npm-adduser) - diff --git a/node_modules/npm/docs/content/commands/npm-update.md b/node_modules/npm/docs/content/commands/npm-update.md deleted file mode 100644 index ea0bcdd..0000000 --- a/node_modules/npm/docs/content/commands/npm-update.md +++ /dev/null @@ -1,446 +0,0 @@ ---- -title: npm-update -section: 1 -description: Update packages ---- - -### Synopsis - -```bash -npm update [...] - -aliases: up, upgrade, udpate -``` - -### Description - -This command will update all the packages listed to the latest version -(specified by the [`tag` config](/using-npm/config#tag)), respecting the semver -constraints of both your package and its dependencies (if they also require the -same package). - -It will also install missing packages. - -If the `-g` flag is specified, this command will update globally installed -packages. - -If no package name is specified, all packages in the specified location (global -or local) will be updated. - -Note that by default `npm update` will not update the semver values of direct -dependencies in your project `package.json`, if you want to also update -values in `package.json` you can run: `npm update --save` (or add the -`save=true` option to a [configuration file](/configuring-npm/npmrc) -to make that the default behavior). - -### Example - -For the examples below, assume that the current package is `app` and it depends -on dependencies, `dep1` (`dep2`, .. etc.). The published versions of `dep1` -are: - -```json -{ - "dist-tags": { "latest": "1.2.2" }, - "versions": [ - "1.2.2", - "1.2.1", - "1.2.0", - "1.1.2", - "1.1.1", - "1.0.0", - "0.4.1", - "0.4.0", - "0.2.0" - ] -} -``` - -#### Caret Dependencies - -If `app`'s `package.json` contains: - -```json -"dependencies": { - "dep1": "^1.1.1" -} -``` - -Then `npm update` will install `dep1@1.2.2`, because `1.2.2` is `latest` and -`1.2.2` satisfies `^1.1.1`. - -#### Tilde Dependencies - -However, if `app`'s `package.json` contains: - -```json -"dependencies": { - "dep1": "~1.1.1" -} -``` - -In this case, running `npm update` will install `dep1@1.1.2`. Even though the -`latest` tag points to `1.2.2`, this version do not satisfy `~1.1.1`, which is -equivalent to `>=1.1.1 <1.2.0`. So the highest-sorting version that satisfies -`~1.1.1` is used, which is `1.1.2`. - -#### Caret Dependencies below 1.0.0 - -Suppose `app` has a caret dependency on a version below `1.0.0`, for example: - -```json -"dependencies": { - "dep1": "^0.2.0" -} -``` - -`npm update` will install `dep1@0.2.0`, because there are no other -versions which satisfy `^0.2.0`. - -If the dependence were on `^0.4.0`: - -```json -"dependencies": { - "dep1": "^0.4.0" -} -``` - -Then `npm update` will install `dep1@0.4.1`, because that is the highest-sorting -version that satisfies `^0.4.0` (`>= 0.4.0 <0.5.0`) - - -#### Subdependencies - -Suppose your app now also has a dependency on `dep2` - -```json -{ - "name": "my-app", - "dependencies": { - "dep1": "^1.0.0", - "dep2": "1.0.0" - } -} -``` - -and `dep2` itself depends on this limited range of `dep1` - -```json -{ -"name": "dep2", - "dependencies": { - "dep1": "~1.1.1" - } -} -``` - -Then `npm update` will install `dep1@1.1.2` because that is the highest -version that `dep2` allows. npm will prioritize having a single version -of `dep1` in your tree rather than two when that single version can -satisfy the semver requirements of multiple dependencies in your tree. -In this case if you really did need your package to use a newer version -you would need to use `npm install`. - - -#### Updating Globally-Installed Packages - -`npm update -g` will apply the `update` action to each globally installed -package that is `outdated` -- that is, has a version that is different from -`wanted`. - -Note: Globally installed packages are treated as if they are installed with a -caret semver range specified. So if you require to update to `latest` you may -need to run `npm install -g [...]` - -NOTE: If a package has been upgraded to a version newer than `latest`, it will -be _downgraded_. - -### Configuration - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -### See Also - -* [npm install](/commands/npm-install) -* [npm outdated](/commands/npm-outdated) -* [npm shrinkwrap](/commands/npm-shrinkwrap) -* [npm registry](/using-npm/registry) -* [npm folders](/configuring-npm/folders) -* [npm ls](/commands/npm-ls) diff --git a/node_modules/npm/docs/content/commands/npm-version.md b/node_modules/npm/docs/content/commands/npm-version.md deleted file mode 100644 index bc31b4a..0000000 --- a/node_modules/npm/docs/content/commands/npm-version.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -title: npm-version -section: 1 -description: Bump a package version ---- - -### Synopsis - -```bash -npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] - -alias: verison -``` - -### Configuration - -#### `allow-same-version` - -* Default: false -* Type: Boolean - -Prevents throwing an error when `npm version` is used to set the new version -to the same value as the current version. - - - -#### `commit-hooks` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the `npm version` command. - - - -#### `git-tag-version` - -* Default: true -* Type: Boolean - -Tag the commit when using the `npm version` command. Setting this to false -results in no commit being made at all. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `preid` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the `rc` in `1.2.0-rc.8`. - - - -#### `sign-git-tag` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will tag the version using -`-s` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - - - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### Description - -Run this in a package directory to bump the version and write the new data -back to `package.json`, `package-lock.json`, and, if present, -`npm-shrinkwrap.json`. - -The `newversion` argument should be a valid semver string, a valid second -argument to [semver.inc](https://github.com/npm/node-semver#functions) (one -of `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`, -`prerelease`), or `from-git`. In the second case, the existing version will -be incremented by 1 in the specified field. `from-git` will try to read -the latest git tag, and use that as the new npm version. - -If run in a git repo, it will also create a version commit and tag. This -behavior is controlled by `git-tag-version` (see below), and can be -disabled on the command line by running `npm --no-git-tag-version version`. -It will fail if the working directory is not clean, unless the `-f` or -`--force` flag is set. - -If supplied with `-m` or [`--message` config](/using-npm/config#message) option, -npm will use it as a commit message when creating a version commit. If the -`message` config contains `%s` then that will be replaced with the resulting -version number. For example: - -```bash -npm version patch -m "Upgrade to %s for reasons" -``` - -If the [`sign-git-tag` config](/using-npm/config#sign-git-tag) is set, then the -tag will be signed using the `-s` flag to git. Note that you must have a default -GPG key set up in your git config for this to work properly. For example: - -```bash -$ npm config set sign-git-tag true -$ npm version patch - -You need a passphrase to unlock the secret key for -user: "isaacs (http://blog.izs.me/) " -2048-bit RSA key, ID 6C481CF6, created 2010-08-31 - -Enter passphrase: -``` - -If `preversion`, `version`, or `postversion` are in the `scripts` property -of the package.json, they will be executed as part of running `npm -version`. - -The exact order of execution is as follows: - -1. Check to make sure the git working directory is clean before we get - started. Your scripts may add files to the commit in future steps. - This step is skipped if the `--force` flag is set. -2. Run the `preversion` script. These scripts have access to the old - `version` in package.json. A typical use would be running your full - test suite before deploying. Any files you want added to the commit - should be explicitly added using `git add`. -3. Bump `version` in `package.json` as requested (`patch`, `minor`, - `major`, etc). -4. Run the `version` script. These scripts have access to the new `version` - in package.json (so they can incorporate it into file headers in - generated files for example). Again, scripts should explicitly add - generated files to the commit using `git add`. -5. Commit and tag. -6. Run the `postversion` script. Use it to clean up the file system or - automatically push the commit and/or tag. - -Take the following example: - -```json -{ - "scripts": { - "preversion": "npm test", - "version": "npm run build && git add -A dist", - "postversion": "git push && git push --tags && rm -rf build/temp" - } -} -``` - -This runs all your tests and proceeds only if they pass. Then runs your -`build` script, and adds everything in the `dist` directory to the commit. -After the commit, it pushes the new commit and tag up to the server, and -deletes the `build/temp` directory. - -### See Also - -* [npm init](/commands/npm-init) -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [package.json](/configuring-npm/package-json) -* [config](/using-npm/config) diff --git a/node_modules/npm/docs/content/commands/npm-view.md b/node_modules/npm/docs/content/commands/npm-view.md deleted file mode 100644 index 63bfe41..0000000 --- a/node_modules/npm/docs/content/commands/npm-view.md +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: npm-view -section: 1 -description: View registry info ---- - -### Synopsis - -```bash -npm view [] [[.subfield]...] - -aliases: info, show, v -``` - -### Description - -This command shows data about a package and prints it to stdout. - -As an example, to view information about the `connect` package from the registry, you would run: - -```bash -npm view connect -``` - -The default version is `"latest"` if unspecified. - -Field names can be specified after the package descriptor. -For example, to show the dependencies of the `ronn` package at version -`0.3.5`, you could do the following: - -```bash -npm view ronn@0.3.5 dependencies -``` - -By default, `npm view` shows data about the current project context (by looking for a `package.json`). -To show field data for the current project use a file path (i.e. `.`): - -```bash -npm view . dependencies -``` - -You can view child fields by separating them with a period. -To view the git repository URL for the latest version of `npm`, you would run the following command: - -```bash -npm view npm repository.url -``` - -This makes it easy to view information about a dependency with a bit of -shell scripting. For example, to view all the data about the version of -`opts` that `ronn` depends on, you could write the following: - -```bash -npm view opts@$(npm view ronn dependencies.opts) -``` - -For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor email addresses for the `express` package, you would run: - -```bash -npm view express contributors.email -``` - -You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can run: - -```bash -npm view express contributors[0].email -``` - -If the field value you are querying for is a property of an object, you should run: - -```bash -npm view express time'[4.8.0]' -``` - -Multiple fields may be specified, and will be printed one after another. -For example, to get all the contributor names and email addresses, you -can do this: - -```bash -npm view express contributors.name contributors.email -``` - -"Person" fields are shown as a string if they would be shown as an -object. So, for example, this will show the list of `npm` contributors in -the shortened string format. (See [`package.json`](/configuring-npm/package-json) for more on this.) - -```bash -npm view npm contributors -``` - -If a version range is provided, then data will be printed for every -matching version of the package. This will show which version of `jsdom` -was required by each matching version of `yui3`: - -```bash -npm view yui3@'>0.5.4' dependencies.jsdom -``` - -To show the `connect` package version history, you can do -this: - -```bash -npm view connect versions -``` - -### Configuration - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -### Output - -If only a single string field for a single version is output, then it -will not be colorized or quoted, to enable piping the output to -another command. If the field is an object, it will be output as a JavaScript object literal. - -If the `--json` flag is given, the outputted fields will be JSON. - -If the version range matches multiple versions then each printed value -will be prefixed with the version it applies to. - -If multiple fields are requested, then each of them is prefixed with -the field name. - -### See Also - -* [package spec](/using-npm/package-spec) -* [npm search](/commands/npm-search) -* [npm registry](/using-npm/registry) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm docs](/commands/npm-docs) diff --git a/node_modules/npm/docs/content/commands/npm-whoami.md b/node_modules/npm/docs/content/commands/npm-whoami.md deleted file mode 100644 index a1458f0..0000000 --- a/node_modules/npm/docs/content/commands/npm-whoami.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: npm-whoami -section: 1 -description: Display npm username ---- - -### Synopsis - -```bash -npm whoami -``` - -Note: This command is unaware of workspaces. - -### Description - -Display the npm username of the currently logged-in user. - -If logged into a registry that provides token-based authentication, then -connect to the `/-/whoami` registry endpoint to find the username -associated with the token, and print to standard output. - -If logged into a registry that uses Basic Auth, then simply print the -`username` portion of the authentication string. - -### Configuration - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -### See Also - -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm adduser](/commands/npm-adduser) diff --git a/node_modules/npm/docs/content/commands/npm.md b/node_modules/npm/docs/content/commands/npm.md deleted file mode 100644 index e0b8b45..0000000 --- a/node_modules/npm/docs/content/commands/npm.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: npm -section: 1 -description: javascript package manager ---- - -### Synopsis - -```bash -npm -``` - -Note: This command is unaware of workspaces. - -### Version - -10.2.5 - -### Description - -npm is the package manager for the Node JavaScript platform. It puts -modules in place so that node can find them, and manages dependency -conflicts intelligently. - -It is extremely configurable to support a variety of use cases. Most -commonly, you use it to publish, discover, install, and develop node -programs. - -Run `npm help` to get a list of available commands. - -### Important - -npm comes preconfigured to use npm's public registry at -https://registry.npmjs.org by default. Use of the npm public registry is -subject to terms of use available at -https://docs.npmjs.com/policies/terms. - -You can configure npm to use any compatible registry you like, and even -run your own registry. Use of someone else's registry is governed by -their terms of use. - -### Introduction - -You probably got npm because you want to install stuff. - -The very first thing you will most likely want to run in any node -program is `npm install` to install its dependencies. - -You can also run `npm install blerg` to install the latest version of -"blerg". Check out [`npm install`](/commands/npm-install) for more -info. It can do a lot of stuff. - -Use the `npm search` command to show everything that's available in the -public registry. Use `npm ls` to show everything you've installed. - -### Dependencies - -If a package lists a dependency using a git URL, npm will install that -dependency using the [`git`](https://github.com/git-guides/install-git) -command and will generate an error if it is not installed. - -If one of the packages npm tries to install is a native node module and -requires compiling of C++ Code, npm will use -[node-gyp](https://github.com/nodejs/node-gyp) for that task. -For a Unix system, [node-gyp](https://github.com/nodejs/node-gyp) -needs Python, make and a buildchain like GCC. On Windows, -Python and Microsoft Visual Studio C++ are needed. For more information -visit [the node-gyp repository](https://github.com/nodejs/node-gyp) and -the [node-gyp Wiki](https://github.com/nodejs/node-gyp/wiki). - -### Directories - -See [`folders`](/configuring-npm/folders) to learn about where npm puts -stuff. - -In particular, npm has two modes of operation: - -* local mode: - npm installs packages into the current project directory, which - defaults to the current working directory. Packages install to - `./node_modules`, and bins to `./node_modules/.bin`. -* global mode: - npm installs packages into the install prefix at - `$npm_config_prefix/lib/node_modules` and bins to - `$npm_config_prefix/bin`. - -Local mode is the default. Use `-g` or `--global` on any command to -run in global mode instead. - -### Developer Usage - -If you're using npm to develop and publish your code, check out the -following help topics: - -* json: - Make a package.json file. See - [`package.json`](/configuring-npm/package-json). -* link: - Links your current working code into Node's path, so that you don't - have to reinstall every time you make a change. Use [`npm - link`](/commands/npm-link) to do this. -* install: - It's a good idea to install things if you don't need the symbolic - link. Especially, installing other peoples code from the registry is - done via [`npm install`](/commands/npm-install) -* adduser: - Create an account or log in. When you do this, npm will store - credentials in the user config file. -* publish: - Use the [`npm publish`](/commands/npm-publish) command to upload your - code to the registry. - -#### Configuration - -npm is extremely configurable. It reads its configuration options from -5 places. - -* Command line switches: - Set a config with `--key val`. All keys take a value, even if they - are booleans (the config parser doesn't know what the options are at - the time of parsing). If you do not provide a value (`--key`) then - the option is set to boolean `true`. -* Environment Variables: - Set any config by prefixing the name in an environment variable with - `npm_config_`. For example, `export npm_config_key=val`. -* User Configs: - The file at `$HOME/.npmrc` is an ini-formatted list of configs. If - present, it is parsed. If the `userconfig` option is set in the cli - or env, that file will be used instead. -* Global Configs: - The file found at `./etc/npmrc` (relative to the global prefix will be - parsed if it is found. See [`npm prefix`](/commands/npm-prefix) for - more info on the global prefix. If the `globalconfig` option is set - in the cli, env, or user config, then that file is parsed instead. -* Defaults: - npm's default configuration options are defined in - `lib/utils/config/definitions.js`. These must not be changed. - -See [`config`](/using-npm/config) for much much more information. - -### Contributions - -Patches welcome! - -If you would like to help, but don't know what to work on, read the -[contributing -guidelines](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) and -check the issues list. - -### Bugs - -When you find issues, please report them: - - -Please be sure to follow the template and bug reporting guidelines. - -### Feature Requests - -Discuss new feature ideas on our discussion forum: - -* - -Or suggest formal RFC proposals: - -* - -### See Also - -* [npm help](/commands/npm-help) -* [package.json](/configuring-npm/package-json) -* [npmrc](/configuring-npm/npmrc) -* [npm config](/commands/npm-config) -* [npm install](/commands/npm-install) -* [npm prefix](/commands/npm-prefix) -* [npm publish](/commands/npm-publish) diff --git a/node_modules/npm/docs/content/commands/npx.md b/node_modules/npm/docs/content/commands/npx.md deleted file mode 100644 index 5ce300e..0000000 --- a/node_modules/npm/docs/content/commands/npx.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: npx -section: 1 -description: Run a command from a local or remote npm package ---- - -### Synopsis - -```bash -npx -- [@] [args...] -npx --package=[@] -- [args...] -npx -c ' [args...]' -npx --package=foo -c ' [args...]' -``` - -### Description - -This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via `npm run`. - -Whatever packages are specified by the `--package` option will be -provided in the `PATH` of the executed command, along with any locally -installed package executables. The `--package` option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available. - -If any requested packages are not present in the local project -dependencies, then they are installed to a folder in the npm cache, which -is added to the `PATH` environment variable in the executed process. A -prompt is printed (which can be suppressed by providing either `--yes` or -`--no`). - -Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency. - -If no `-c` or `--call` option is provided, then the positional arguments -are used to generate the command string. If no `--package` options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic: - -- If the package has a single entry in its `bin` field in `package.json`, - or if all entries are aliases of the same command, then that command - will be used. -- If the package has multiple `bin` entries, and one of them matches the - unscoped portion of the `name` field, then that command will be used. -- If this does not result in exactly one option (either because there are - no bin entries, or none of them match the `name` of the package), then - `npm exec` exits with an error. - -To run a binary _other than_ the named binary, specify one or more -`--package` options, which will prevent npm from inferring the package from -the first command argument. - -### `npx` vs `npm exec` - -When run via the `npx` binary, all flags and options *must* be set prior to -any positional arguments. When run via `npm exec`, a double-hyphen `--` -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command. - -For example: - -``` -$ npx foo@latest bar --package=@npmcli/foo -``` - -In this case, npm will resolve the `foo` package name, and run the -following command: - -``` -$ foo bar --package=@npmcli/foo -``` - -Since the `--package` option comes _after_ the positional arguments, it is -treated as an argument to the executed command. - -In contrast, due to npm's argument parsing logic, running this command is -different: - -``` -$ npm exec foo@latest bar --package=@npmcli/foo -``` - -In this case, npm will parse the `--package` option first, resolving the -`@npmcli/foo` package. Then, it will execute the following command in that -context: - -``` -$ foo@latest bar -``` - -The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the `npx` command above: - -``` -$ npm exec -- foo@latest bar --package=@npmcli/foo -``` - -### Examples - -Run the version of `tap` in the local dependencies, with the provided -arguments: - -``` -$ npm exec -- tap --bail test/foo.js -$ npx tap --bail test/foo.js -``` - -Run a command _other than_ the command whose name matches the package name -by specifying a `--package` option: - -``` -$ npm exec --package=foo -- bar --bar-argument -# ~ or ~ -$ npx --package=foo bar --bar-argument -``` - -Run an arbitrary shell script, in the context of the current project: - -``` -$ npm x -c 'eslint && say "hooray, lint passed"' -$ npx -c 'eslint && say "hooray, lint passed"' -``` - -### Compatibility with Older npx Versions - -The `npx` binary was rewritten in npm v7.0.0, and the standalone `npx` -package deprecated at that time. `npx` uses the `npm exec` -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions. - -This resulted in some shifts in its functionality: - -- Any `npm` config value may be provided. -- To prevent security and user-experience problems from mistyping package - names, `npx` prompts before installing anything. Suppress this - prompt with the `-y` or `--yes` option. -- The `--no-install` option is deprecated, and will be converted to `--no`. -- Shell fallback functionality is removed, as it is not advisable. -- The `-p` argument is a shorthand for `--parseable` in npm, but shorthand - for `--package` in npx. This is maintained, but only for the `npx` - executable. -- The `--ignore-existing` option is removed. Locally installed bins are - always present in the executed process `PATH`. -- The `--npm` option is removed. `npx` will always use the `npm` it ships - with. -- The `--node-arg` and `-n` options are removed. -- The `--always-spawn` option is redundant, and thus removed. -- The `--shell` option is replaced with `--script-shell`, but maintained - in the `npx` executable for backwards compatibility. - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [npm scripts](/using-npm/scripts) -* [npm test](/commands/npm-test) -* [npm start](/commands/npm-start) -* [npm restart](/commands/npm-restart) -* [npm stop](/commands/npm-stop) -* [npm config](/commands/npm-config) -* [npm exec](/commands/npm-exec) diff --git a/node_modules/npm/docs/content/configuring-npm/folders.md b/node_modules/npm/docs/content/configuring-npm/folders.md deleted file mode 100644 index 5fb4ca2..0000000 --- a/node_modules/npm/docs/content/configuring-npm/folders.md +++ /dev/null @@ -1,219 +0,0 @@ ---- -title: folders -section: 5 -description: Folder Structures Used by npm ---- - -### Description - -npm puts various things on your computer. That's its job. - -This document will tell you what it puts where. - -#### tl;dr - -* Local install (default): puts stuff in `./node_modules` of the current - package root. -* Global install (with `-g`): puts stuff in /usr/local or wherever node - is installed. -* Install it **locally** if you're going to `require()` it. -* Install it **globally** if you're going to run it on the command line. -* If you need both, then install it in both places, or use `npm link`. - -#### prefix Configuration - -The [`prefix` config](/using-npm/config#prefix) defaults to the location where -node is installed. On most systems, this is `/usr/local`. On Windows, it's -`%AppData%\npm`. On Unix systems, it's one level up, since node is typically -installed at `{prefix}/bin/node` rather than `{prefix}/node.exe`. - -When the `global` flag is set, npm installs things into this prefix. -When it is not set, it uses the root of the current package, or the -current working directory if not in a package already. - -#### Node Modules - -Packages are dropped into the `node_modules` folder under the `prefix`. -When installing locally, this means that you can -`require("packagename")` to load its main module, or -`require("packagename/lib/path/to/sub/module")` to load other modules. - -Global installs on Unix systems go to `{prefix}/lib/node_modules`. -Global installs on Windows go to `{prefix}/node_modules` (that is, no -`lib` folder.) - -Scoped packages are installed the same way, except they are grouped together -in a sub-folder of the relevant `node_modules` folder with the name of that -scope prefix by the @ symbol, e.g. `npm install @myorg/package` would place -the package in `{prefix}/node_modules/@myorg/package`. See -[`scope`](/using-npm/scope) for more details. - -If you wish to `require()` a package, then install it locally. - -#### Executables - -When in global mode, executables are linked into `{prefix}/bin` on Unix, -or directly into `{prefix}` on Windows. Ensure that path is in your -terminal's `PATH` environment to run them. - -When in local mode, executables are linked into -`./node_modules/.bin` so that they can be made available to scripts run -through npm. (For example, so that a test runner will be in the path -when you run `npm test`.) - -#### Man Pages - -When in global mode, man pages are linked into `{prefix}/share/man`. - -When in local mode, man pages are not installed. - -Man pages are not installed on Windows systems. - -#### Cache - -See [`npm cache`](/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or -`%LocalAppData%/npm-cache` on Windows. - -This is controlled by the [`cache` config](/using-npm/config#cache) param. - -#### Temp Files - -Temporary files are stored by default in the folder specified by the -[`tmp` config](/using-npm/config#tmp), which defaults to the TMPDIR, TMP, or -TEMP environment variables, or `/tmp` on Unix and `c:\windows\temp` on Windows. - -Temp files are given a unique folder under this root for each run of the -program, and are deleted upon successful exit. - -### More Information - -When installing locally, npm first tries to find an appropriate -`prefix` folder. This is so that `npm install foo@1.2.3` will install -to the sensible root of your package, even if you happen to have `cd`ed -into some other folder. - -Starting at the $PWD, npm will walk up the folder tree checking for a -folder that contains either a `package.json` file, or a `node_modules` -folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking -logic when running git commands in a working dir.) - -If no package root is found, then the current folder is used. - -When you run `npm install foo@1.2.3`, then the package is loaded into -the cache, and then unpacked into `./node_modules/foo`. Then, any of -foo's dependencies are similarly unpacked into -`./node_modules/foo/node_modules/...`. - -Any bin files are symlinked to `./node_modules/.bin/`, so that they may -be found by npm scripts when necessary. - -#### Global Installation - -If the [`global` config](/using-npm/config#global) is set to true, then npm will -install packages "globally". - -For global installation, packages are installed roughly the same way, -but using the folders described above. - -#### Cycles, Conflicts, and Folder Parsimony - -Cycles are handled using the property of node's module system that it -walks up the directories looking for `node_modules` folders. So, at every -stage, if a package is already installed in an ancestor `node_modules` -folder, then it is not installed at the current location. - -Consider the case above, where `foo -> bar -> baz`. Imagine if, in -addition to that, baz depended on bar, so you'd have: -`foo -> bar -> baz -> bar -> baz ...`. However, since the folder -structure is: `foo/node_modules/bar/node_modules/baz`, there's no need to -put another copy of bar into `.../baz/node_modules`, since when baz calls -`require("bar")`, it will get the copy that is installed in -`foo/node_modules/bar`. - -This shortcut is only used if the exact same -version would be installed in multiple nested `node_modules` folders. It -is still possible to have `a/node_modules/b/node_modules/a` if the two -"a" packages are different versions. However, without repeating the -exact same package multiple times, an infinite regress will always be -prevented. - -Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder (hoisting). -Since version 3, npm hoists dependencies by default. - -#### Example - -Consider this dependency graph: - -```bash -foo -+-- blerg@1.2.5 -+-- bar@1.2.3 -| +-- blerg@1.x (latest=1.3.7) -| +-- baz@2.x -| | `-- quux@3.x -| | `-- bar@1.2.3 (cycle) -| `-- asdf@* -`-- baz@1.2.3 - `-- quux@3.x - `-- bar -``` - -In this case, we might expect a folder structure like this -(with all dependencies hoisted to the highest level possible): - -```bash -foo -+-- node_modules - +-- blerg (1.2.5) <---[A] - +-- bar (1.2.3) <---[B] - | +-- node_modules - | +-- baz (2.0.2) <---[C] - +-- asdf (2.3.4) - +-- baz (1.2.3) <---[D] - +-- quux (3.2.0) <---[E] -``` - -Since foo depends directly on `bar@1.2.3` and `baz@1.2.3`, those are -installed in foo's `node_modules` folder. - -Even though the latest copy of blerg is 1.3.7, foo has a specific -dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfies bar's dependency on `blerg@1.x`, -it does not install another copy under [B]. - -Bar [B] also has dependencies on baz and asdf. Because it depends on `baz@2.x`, it cannot -re-use the `baz@1.2.3` installed in the parent `node_modules` folder [D], -and must install its own copy [C]. In order to minimize duplication, npm hoists -dependencies to the top level by default, so asdf is installed under [A]. - -Underneath bar, the `baz -> quux -> bar` dependency creates a cycle. -However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder. Likewise, quux's [E] -folder tree is empty, because its dependency on bar is satisfied -by the parent folder copy installed at [B]. - -For a graphical breakdown of what is installed where, use `npm ls`. - -#### Publishing - -Upon publishing, npm will look in the `node_modules` folder. If any of -the items there are not in the `bundleDependencies` array, then they will -not be included in the package tarball. - -This allows a package maintainer to install all of their dependencies -(and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See [`package.json`](/configuring-npm/package-json) for more information. - -### See also - -* [package.json](/configuring-npm/package-json) -* [npm install](/commands/npm-install) -* [npm pack](/commands/npm-pack) -* [npm cache](/commands/npm-cache) -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [config](/using-npm/config) -* [npm publish](/commands/npm-publish) diff --git a/node_modules/npm/docs/content/configuring-npm/install.md b/node_modules/npm/docs/content/configuring-npm/install.md deleted file mode 100644 index d9c1d32..0000000 --- a/node_modules/npm/docs/content/configuring-npm/install.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: install -section: 5 -description: Download and install node and npm ---- - -### Description - -To publish and install packages to and from the public npm registry, you -must install Node.js and the npm command line interface using either a Node -version manager or a Node installer. **We strongly recommend using a Node -version manager to install Node.js and npm.** We do not recommend using a -Node installer, since the Node installation process installs npm in a -directory with local permissions and can cause permissions errors when you -run npm packages globally. - -### Overview - -- [Checking your version of npm and - Node.js](#checking-your-version-of-npm-and-nodejs) -- [Using a Node version manager to install Node.js and - npm](#using-a-node-version-manager-to-install-nodejs-and-npm) -- [Using a Node installer to install Node.js and - npm](#using-a-node-installer-to-install-nodejs-and-npm) - -### Checking your version of npm and Node.js - -To see if you already have Node.js and npm installed and check the -installed version, run the following commands: - -``` -node -v -npm -v -``` - -### Using a Node version manager to install Node.js and npm - -Node version managers allow you to install and switch between multiple -versions of Node.js and npm on your system so you can test your -applications on multiple versions of npm to ensure they work for users on -different versions. You can -[search for them on GitHub](https://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch). - -### Using a Node installer to install Node.js and npm - -If you are unable to use a Node version manager, you can use a Node -installer to install both Node.js and npm on your system. - -* [Node.js installer](https://nodejs.org/en/download/) -* [NodeSource installer](https://github.com/nodesource/distributions). If - you use Linux, we recommend that you use a NodeSource installer. - -#### OS X or Windows Node installers - -If you're using OS X or Windows, use one of the installers from the -[Node.js download page](https://nodejs.org/en/download/). Be sure to -install the version labeled **LTS**. Other versions have not yet been -tested with npm. - -#### Linux or other operating systems Node installers - -If you're using Linux or another operating system, use one of the following -installers: - -- [NodeSource installer](https://github.com/nodesource/distributions) - (recommended) -- One of the installers on the [Node.js download - page](https://nodejs.org/en/download/) - -Or see [this page](https://nodejs.org/en/download/package-manager/) to -install npm for Linux in the way many Linux developers prefer. - -#### Less-common operating systems - -For more information on installing Node.js on a variety of operating -systems, see [this page][pkg-mgr]. - -[pkg-mgr]: https://nodejs.org/en/download/package-manager/ diff --git a/node_modules/npm/docs/content/configuring-npm/npm-shrinkwrap-json.md b/node_modules/npm/docs/content/configuring-npm/npm-shrinkwrap-json.md deleted file mode 100644 index ab0a241..0000000 --- a/node_modules/npm/docs/content/configuring-npm/npm-shrinkwrap-json.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: npm-shrinkwrap.json -section: 5 -description: A publishable lockfile ---- - -### Description - -`npm-shrinkwrap.json` is a file created by [`npm -shrinkwrap`](/commands/npm-shrinkwrap). It is identical to -`package-lock.json`, with one major caveat: Unlike `package-lock.json`, -`npm-shrinkwrap.json` may be included when publishing a package. - -The recommended use-case for `npm-shrinkwrap.json` is applications deployed -through the publishing process on the registry: for example, daemons and -command-line tools intended as global installs or `devDependencies`. It's -strongly discouraged for library authors to publish this file, since that -would prevent end users from having control over transitive dependency -updates. - -If both `package-lock.json` and `npm-shrinkwrap.json` are present in a -package root, `npm-shrinkwrap.json` will be preferred over the -`package-lock.json` file. - -For full details and description of the `npm-shrinkwrap.json` file format, -refer to the manual page for -[package-lock.json](/configuring-npm/package-lock-json). - -### See also - -* [npm shrinkwrap](/commands/npm-shrinkwrap) -* [package-lock.json](/configuring-npm/package-lock-json) -* [package.json](/configuring-npm/package-json) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/configuring-npm/npmrc.md b/node_modules/npm/docs/content/configuring-npm/npmrc.md deleted file mode 100644 index 8cd532a..0000000 --- a/node_modules/npm/docs/content/configuring-npm/npmrc.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -title: npmrc -section: 5 -description: The npm config files ---- - -### Description - -npm gets its config settings from the command line, environment variables, -and `npmrc` files. - -The `npm config` command can be used to update and edit the contents of the -user and global npmrc files. - -For a list of available configuration options, see -[config](/using-npm/config). - -### Files - -The four relevant files are: - -* per-project config file (/path/to/my/project/.npmrc) -* per-user config file (~/.npmrc) -* global config file ($PREFIX/etc/npmrc) -* npm builtin config file (/path/to/npm/npmrc) - -All npm config files are an ini-formatted list of `key = value` parameters. -Environment variables can be replaced using `${VARIABLE_NAME}`. For -example: - -```bash -prefix = ${HOME}/.npm-packages -``` - -Each of these files is loaded, and config options are resolved in priority -order. For example, a setting in the userconfig file would override the -setting in the globalconfig file. - -Array values are specified by adding "[]" after the key name. For example: - -```bash -key[] = "first value" -key[] = "second value" -``` - -#### Comments - -Lines in `.npmrc` files are interpreted as comments when they begin with a -`;` or `#` character. `.npmrc` files are parsed by -[npm/ini](https://github.com/npm/ini), which specifies this comment syntax. - -For example: - -```bash -# last modified: 01 Jan 2016 -; Set a new registry for a scoped package -@myscope:registry=https://mycustomregistry.example.org -``` - -#### Per-project config file - -When working locally in a project, a `.npmrc` file in the root of the -project (ie, a sibling of `node_modules` and `package.json`) will set -config values specific to this project. - -Note that this only applies to the root of the project that you're running -npm in. It has no effect when your module is published. For example, you -can't publish a module that forces itself to install globally, or in a -different location. - -Additionally, this file is not read in global mode, such as when running -`npm install -g`. - -#### Per-user config file - -`$HOME/.npmrc` (or the `userconfig` param, if set in the environment or on -the command line) - -#### Global config file - -`$PREFIX/etc/npmrc` (or the `globalconfig` param, if set above): This file -is an ini-file formatted list of `key = value` parameters. Environment -variables can be replaced as above. - -#### Built-in config file - -`path/to/npm/itself/npmrc` - -This is an unchangeable "builtin" configuration file that npm keeps -consistent across updates. Set fields in here using the `./configure` -script that comes with npm. This is primarily for distribution maintainers -to override default configs in a standard and consistent manner. - -### Auth related configuration - -The settings `_auth`, `_authToken`, `username` and `_password` must all be -scoped to a specific registry. This ensures that `npm` will never send -credentials to the wrong host. - -The full list is: - - `_auth` (base64 authentication string) - - `_authToken` (authentication token) - - `username` - - `_password` - - `email` - - `certfile` (path to certificate file) - - `keyfile` (path to key file) - -In order to scope these values, they must be prefixed by a URI fragment. -If the credential is meant for any request to a registry on a single host, -the scope may look like `//registry.npmjs.org/:`. If it must be scoped to a -specific path on the host that path may also be provided, such as -`//my-custom-registry.org/unique/path:`. - -``` -; bad config -_authToken=MYTOKEN - -; good config -@myorg:registry=https://somewhere-else.com/myorg -@another:registry=https://somewhere-else.com/another -//registry.npmjs.org/:_authToken=MYTOKEN -; would apply to both @myorg and @another -; //somewhere-else.com/:_authToken=MYTOKEN -; would apply only to @myorg -//somewhere-else.com/myorg/:_authToken=MYTOKEN1 -; would apply only to @another -//somewhere-else.com/another/:_authToken=MYTOKEN2 -``` - -### See also - -* [npm folders](/configuring-npm/folders) -* [npm config](/commands/npm-config) -* [config](/using-npm/config) -* [package.json](/configuring-npm/package-json) -* [npm](/commands/npm) diff --git a/node_modules/npm/docs/content/configuring-npm/package-json.md b/node_modules/npm/docs/content/configuring-npm/package-json.md deleted file mode 100644 index a429e6d..0000000 --- a/node_modules/npm/docs/content/configuring-npm/package-json.md +++ /dev/null @@ -1,1190 +0,0 @@ ---- -title: package.json -section: 5 -description: Specifics of npm's package.json handling ---- - -### Description - -This document is all you need to know about what's required in your -package.json file. It must be actual JSON, not just a JavaScript object -literal. - -A lot of the behavior described in this document is affected by the config -settings described in [`config`](/using-npm/config). - -### name - -If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional. - -The name is what your thing is called. - -Some rules: - -* The name must be less than or equal to 214 characters. This includes the - scope for scoped packages. -* The names of scoped packages can begin with a dot or an underscore. This - is not permitted without a scope. -* New packages must not have uppercase letters in the name. -* The name ends up being part of a URL, an argument on the command line, - and a folder name. Therefore, the name can't contain any non-URL-safe - characters. - -Some tips: - -* Don't use the same name as a core Node module. -* Don't put "js" or "node" in the name. It's assumed that it's js, since - you're writing a package.json file, and you can specify the engine using - the "engines" field. (See below.) -* The name will probably be passed as an argument to require(), so it - should be something short, but also reasonably descriptive. -* You may want to check the npm registry to see if there's something by - that name already, before you get too attached to it. - - -A name can be optionally prefixed by a scope, e.g. `@myorg/mypackage`. See -[`scope`](/using-npm/scope) for more detail. - -### version - -If you plan to publish your package, the *most* important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional. - -Version must be parseable by -[node-semver](https://github.com/npm/node-semver), which is bundled with -npm as a dependency. (`npm install semver` to use it yourself.) - -### description - -Put a description in it. It's a string. This helps people discover your -package, as it's listed in `npm search`. - -### keywords - -Put keywords in it. It's an array of strings. This helps people discover -your package as it's listed in `npm search`. - -### homepage - -The url to the project homepage. - -Example: - -```json -"homepage": "https://github.com/owner/project#readme" -``` - -### bugs - -The url to your project's issue tracker and / or the email address to which -issues should be reported. These are helpful for people who encounter -issues with your package. - -It should look like this: - -```json -{ - "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" - } -} -``` - -You can specify either one or both values. If you want to provide only a -url, you can specify the value for "bugs" as a simple string instead of an -object. - -If a url is provided, it will be used by the `npm bugs` command. - -### license - -You should specify a license for your package so that people know how they -are permitted to use it, and any restrictions you're placing on it. - -If you're using a common license such as BSD-2-Clause or MIT, add a current -SPDX license identifier for the license you're using, like this: - -```json -{ - "license" : "BSD-3-Clause" -} -``` - -You can check [the full list of SPDX license -IDs](https://spdx.org/licenses/). Ideally you should pick one that is -[OSI](https://opensource.org/licenses/) approved. - -If your package is licensed under multiple common licenses, use an [SPDX -license expression syntax version 2.0 -string](https://spdx.dev/specifications/), like this: - -```json -{ - "license" : "(ISC OR GPL-3.0)" -} -``` -If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use a string value like this one: - -```json -{ - "license" : "SEE LICENSE IN " -} -``` -Then include a file named `` at the top level of the package. - -Some old packages used license objects or a "licenses" property containing -an array of license objects: - -```json -// Not valid metadata -{ - "license" : { - "type" : "ISC", - "url" : "https://opensource.org/licenses/ISC" - } -} - -// Not valid metadata -{ - "licenses" : [ - { - "type": "MIT", - "url": "https://www.opensource.org/licenses/mit-license.php" - }, - { - "type": "Apache-2.0", - "url": "https://opensource.org/licenses/apache2.0.php" - } - ] -} -``` - -Those styles are now deprecated. Instead, use SPDX expressions, like this: - -```json -{ - "license": "ISC" -} -``` - -```json -{ - "license": "(MIT OR Apache-2.0)" -} -``` - -Finally, if you do not wish to grant others the right to use a private or -unpublished package under any terms: - -```json -{ - "license": "UNLICENSED" -} -``` - -Consider also setting `"private": true` to prevent accidental publication. - -### people fields: author, contributors - -The "author" is one person. "contributors" is an array of people. A -"person" is an object with a "name" field and optionally "url" and "email", -like this: - -```json -{ - "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" -} -``` - -Or you can shorten that all into a single string, and npm will parse it for -you: - -```json -{ - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" -} -``` - -Both email and url are optional either way. - -npm also sets a top-level "maintainers" field with your npm user info. - -### funding - -You can specify an object containing a URL that provides up-to-date -information about ways to help fund development of your package, or a -string URL, or an array of these: - -```json -{ - "funding": { - "type" : "individual", - "url" : "http://example.com/donate" - }, - - "funding": { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - }, - - "funding": "http://example.com/donate", - - "funding": [ - { - "type" : "individual", - "url" : "http://example.com/donate" - }, - "http://example.com/donateAlso", - { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - } - ] -} -``` - -Users can use the `npm fund` subcommand to list the `funding` URLs of all -dependencies of their project, direct and indirect. A shortcut to visit -each funding url is also available when providing the project name such as: -`npm fund ` (when there are multiple URLs, the first one will -be visited) - -### files - -The optional `files` field is an array of file patterns that describes the -entries to be included when your package is installed as a dependency. File -patterns follow a similar syntax to `.gitignore`, but reversed: including a -file, directory, or glob pattern (`*`, `**/*`, and such) will make it so -that file is included in the tarball when it's packed. Omitting the field -will make it default to `["*"]`, which means it will include all files. - -Some special files and directories are also included or excluded regardless -of whether they exist in the `files` array (see below). - -You can also provide a `.npmignore` file in the root of your package or in -subdirectories, which will keep files from being included. At the root of -your package it will not override the "files" field, but in subdirectories -it will. The `.npmignore` file works just like a `.gitignore`. If there is -a `.gitignore` file, and `.npmignore` is missing, `.gitignore`'s contents -will be used instead. - -Certain files are always included, regardless of settings: - -* `package.json` -* `README` -* `LICENSE` / `LICENCE` -* The file in the "main" field -* The file(s) in the "bin" field - -`README` & `LICENSE` can have any case and extension. - -Some files are always ignored by default: - -* `*.orig` -* `.*.swp` -* `.DS_Store` -* `._*` -* `.git` -* `.npmrc` -* `.hg` -* `.lock-wscript` -* `.npmrc` -* `.svn` -* `.wafpickle-N` -* `CVS` -* `config.gypi` -* `node_modules` -* `npm-debug.log` -* `package-lock.json` (use - [`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json) - if you wish it to be published) -* `pnpm-lock.yaml` -* `yarn.lock` - -Most of these ignored files can be included specifically if included in -the `files` globs. Exceptions to this are: - -* `.git` -* `.npmrc` -* `node_modules` -* `package-lock.json` -* `pnpm-lock.yaml` -* `yarn.lock` - -These can not be included. - -### main - -The main field is a module ID that is the primary entry point to your -program. That is, if your package is named `foo`, and a user installs it, -and then does `require("foo")`, then your main module's exports object will -be returned. - -This should be a module relative to the root of your package folder. - -For most modules, it makes the most sense to have a main script and often -not much else. - -If `main` is not set, it defaults to `index.js` in the package's root folder. - -### browser - -If your module is meant to be used client-side the browser field should be -used instead of the main field. This is helpful to hint users that it might -rely on primitives that aren't available in Node.js modules. (e.g. -`window`) - -### bin - -A lot of packages have one or more executable files that they'd like to -install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.) - -To use this, supply a `bin` field in your package.json which is a map of -command name to local file name. When this package is installed globally, -that file will be either linked inside the global bins directory or -a cmd (Windows Command File) will be created which executes the specified -file in the `bin` field, so it is available to run by `name` or `name.cmd` (on -Windows PowerShell). When this package is installed as a dependency in another -package, the file will be linked where it will be available to that package -either directly by `npm exec` or by name in other scripts when invoking them -via `npm run-script`. - - -For example, myapp could have this: - -```json -{ - "bin": { - "myapp": "./cli.js" - } -} -``` - -So, when you install myapp, in case of unix-like OS it'll create a symlink -from the `cli.js` script to `/usr/local/bin/myapp` and in case of windows it -will create a cmd file usually at `C:\Users\{Username}\AppData\Roaming\npm\myapp.cmd` -which runs the `cli.js` script. - -If you have a single executable, and its name should be the name of the -package, then you can just supply it as a string. For example: - -```json -{ - "name": "my-program", - "version": "1.2.5", - "bin": "./path/to/program" -} -``` - -would be the same as this: - -```json -{ - "name": "my-program", - "version": "1.2.5", - "bin": { - "my-program": "./path/to/program" - } -} -``` - -Please make sure that your file(s) referenced in `bin` starts with -`#!/usr/bin/env node`, otherwise the scripts are started without the node -executable! - -Note that you can also set the executable files using [directories.bin](#directoriesbin). - -See [folders](/configuring-npm/folders#executables) for more info on -executables. - -### man - -Specify either a single file or an array of filenames to put in place for -the `man` program to find. - -If only a single file is provided, then it's installed such that it is the -result from `man `, regardless of its actual filename. For -example: - -```json -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": "./man/doc.1" -} -``` - -would link the `./man/doc.1` file in such that it is the target for `man -foo` - -If the filename doesn't start with the package name, then it's prefixed. -So, this: - -```json -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": [ - "./man/foo.1", - "./man/bar.1" - ] -} -``` - -will create files to do `man foo` and `man foo-bar`. - -Man files must end with a number, and optionally a `.gz` suffix if they are -compressed. The number dictates which man section the file is installed -into. - -```json -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": [ - "./man/foo.1", - "./man/foo.2" - ] -} -``` - -will create entries for `man foo` and `man 2 foo` - -### directories - -The CommonJS [Packages](http://wiki.commonjs.org/wiki/Packages/1.0) spec -details a few ways that you can indicate the structure of your package -using a `directories` object. If you look at [npm's -package.json](https://registry.npmjs.org/npm/latest), you'll see that it -has directories for doc, lib, and man. - -In the future, this information may be used in other creative ways. - -#### directories.bin - -If you specify a `bin` directory in `directories.bin`, all the files in -that folder will be added. - -Because of the way the `bin` directive works, specifying both a `bin` path -and setting `directories.bin` is an error. If you want to specify -individual files, use `bin`, and for all the files in an existing `bin` -directory, use `directories.bin`. - -#### directories.man - -A folder that is full of man pages. Sugar to generate a "man" array by -walking the folder. - -### repository - -Specify the place where your code lives. This is helpful for people who -want to contribute. If the git repo is on GitHub, then the `npm docs` -command will be able to find you. - -Do it like this: - -```json -{ - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git" - } -} -``` - -The URL should be a publicly available (perhaps read-only) url that can be -handed directly to a VCS program without any modification. It should not -be a url to an html project page that you put in your browser. It's for -computers. - -For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the -same shortcut syntax you use for `npm install`: - -```json -{ - "repository": "npm/npm", - - "repository": "github:user/repo", - - "repository": "gist:11081aaa281", - - "repository": "bitbucket:user/repo", - - "repository": "gitlab:user/repo" -} -``` - -If the `package.json` for your package is not in the root directory (for -example if it is part of a monorepo), you can specify the directory in -which it lives: - -```json -{ - "repository": { - "type": "git", - "url": "https://github.com/facebook/react.git", - "directory": "packages/react-dom" - } -} -``` - -### scripts - -The "scripts" property is a dictionary containing script commands that are -run at various times in the lifecycle of your package. The key is the -lifecycle event, and the value is the command to run at that point. - -See [`scripts`](/using-npm/scripts) to find out more about writing package -scripts. - -### config - -A "config" object can be used to set configuration parameters used in -package scripts that persist across upgrades. For instance, if a package -had the following: - -```json -{ - "name": "foo", - "config": { - "port": "8080" - } -} -``` - -It could also have a "start" command that referenced the -`npm_package_config_port` environment variable. - -### dependencies - -Dependencies are specified in a simple object that maps a package name to a -version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with a -tarball or git URL. - -**Please do not put test harnesses or transpilers or other "development" -time tools in your `dependencies` object.** See `devDependencies`, below. - -See [semver](https://github.com/npm/node-semver#versions) for more details about specifying version ranges. - -* `version` Must match `version` exactly -* `>version` Must be greater than `version` -* `>=version` etc -* `=version1 <=version2`. -* `range1 || range2` Passes if either range1 or range2 are satisfied. -* `git...` See 'Git URLs as Dependencies' below -* `user/repo` See 'GitHub URLs' below -* `tag` A specific version tagged and published as `tag` See [`npm - dist-tag`](/commands/npm-dist-tag) -* `path/path/path` See [Local Paths](#local-paths) below - -For example, these are all valid: - -```json -{ - "dependencies": { - "foo": "1.0.0 - 2.9999.9999", - "bar": ">=1.0.2 <2.1.2", - "baz": ">1.0.2 <=2.3.4", - "boo": "2.0.1", - "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", - "til": "~1.2", - "elf": "~1.2.3", - "two": "2.x", - "thr": "3.3.x", - "lat": "latest", - "dyl": "file:../dyl" - } -} -``` - -#### URLs as Dependencies - -You may specify a tarball URL in place of a version range. - -This tarball will be downloaded and installed locally to your package at -install time. - -#### Git URLs as Dependencies - -Git urls are of the form: - -```bash -://[[:]@][:][:][/][# | #semver:] -``` - -`` is one of `git`, `git+ssh`, `git+http`, `git+https`, or -`git+file`. - -If `#` is provided, it will be used to clone exactly that -commit. If the commit-ish has the format `#semver:`, `` can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for -a registry dependency. If neither `#` or `#semver:` is -specified, then the default branch is used. - -Examples: - -```bash -git+ssh://git@github.com:npm/cli.git#v1.0.27 -git+ssh://git@github.com:npm/cli#semver:^5.0 -git+https://isaacs@github.com/npm/cli.git -git://github.com/npm/cli.git#v1.0.27 -``` - -When installing from a `git` repository, the presence of certain fields in the -`package.json` will cause npm to believe it needs to perform a build. To do so -your repository will be cloned into a temporary directory, all of its deps -installed, relevant scripts run, and the resulting directory packed and -installed. - -This flow will occur if your git dependency uses `workspaces`, or if any of the -following scripts are present: - -* `build` -* `prepare` -* `prepack` -* `preinstall` -* `install` -* `postinstall` - -If your git repository includes pre-built artifacts, you will likely want to -make sure that none of the above scripts are defined, or your dependency -will be rebuilt for every installation. - -#### GitHub URLs - -As of version 1.1.65, you can refer to GitHub urls as just "foo": -"user/foo-project". Just as with git URLs, a `commit-ish` suffix can be -included. For example: - -```json -{ - "name": "foo", - "version": "0.0.0", - "dependencies": { - "express": "expressjs/express", - "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\/branch" - } -} -``` - -#### Local Paths - -As of version 2.0.0 you can provide a path to a local directory that -contains a package. Local paths can be saved using `npm install -S` or `npm -install --save`, using any of these forms: - -```bash -../foo/bar -~/foo/bar -./foo/bar -/foo/bar -``` - -in which case they will be normalized to a relative path and added to your -`package.json`. For example: - -```json -{ - "name": "baz", - "dependencies": { - "bar": "file:../foo/bar" - } -} -``` - -This feature is helpful for local offline development and creating tests -that require npm installing where you don't want to hit an external server, -but should not be used when publishing packages to the public registry. - -*note*: Packages linked by local path will not have their own -dependencies installed when `npm install` is ran in this case. You must -run `npm install` from inside the local path itself. - -### devDependencies - -If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build the -external test or documentation framework that you use. - -In this case, it's best to map these additional items in a -`devDependencies` object. - -These things will be installed when doing `npm link` or `npm install` from -the root of a package, and can be managed like any other npm configuration -param. See [`config`](/using-npm/config) for more on the topic. - -For build steps that are not platform-specific, such as compiling -CoffeeScript or other languages to JavaScript, use the `prepare` script to -do this, and make the required package a devDependency. - -For example: - -```json -{ - "name": "ethopia-waza", - "description": "a delightfully fruity coffee varietal", - "version": "1.2.3", - "devDependencies": { - "coffee-script": "~1.6.3" - }, - "scripts": { - "prepare": "coffee -o lib/ -c src/waza.coffee" - }, - "main": "lib/waza.js" -} -``` - -The `prepare` script will be run before publishing, so that users can -consume the functionality without requiring them to compile it themselves. -In dev mode (ie, locally running `npm install`), it'll run this script as -well, so that you can test it easily. - -### peerDependencies - -In some cases, you want to express the compatibility of your package with a -host tool or library, while not necessarily doing a `require` of this host. -This is usually referred to as a *plugin*. Notably, your module may be -exposing a specific interface, expected and specified by the host -documentation. - -For example: - -```json -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x" - } -} -``` - -This ensures your package `tea-latte` can be installed *along* with the -second major version of the host package `tea` only. `npm install -tea-latte` could possibly yield the following dependency graph: - -```bash -├── tea-latte@1.3.5 -└── tea@2.2.0 -``` - -In npm versions 3 through 6, `peerDependencies` were not automatically -installed, and would raise a warning if an invalid version of the peer -dependency was found in the tree. As of npm v7, peerDependencies _are_ -installed by default. - -Trying to install another plugin with a conflicting requirement may cause -an error if the tree cannot be resolved correctly. For this reason, make -sure your plugin requirement is as broad as possible, and not to lock it -down to specific patch versions. - -Assuming the host complies with [semver](https://semver.org/), only changes -in the host package's major version will break your plugin. Thus, if you've -worked with every 1.x version of the host package, use `"^1.0"` or `"1.x"` -to express this. If you depend on features introduced in 1.5.2, use -`"^1.5.2"`. - -### peerDependenciesMeta - -When a user installs your package, npm will emit warnings if packages -specified in `peerDependencies` are not already installed. The -`peerDependenciesMeta` field serves to provide npm more information on how -your peer dependencies are to be used. Specifically, it allows peer -dependencies to be marked as optional. - -For example: - -```json -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" - }, - "peerDependenciesMeta": { - "soy-milk": { - "optional": true - } - } -} -``` - -Marking a peer dependency as optional ensures npm will not emit a warning -if the `soy-milk` package is not installed on the host. This allows you to -integrate and interact with a variety of host packages without requiring -all of them to be installed. - -### bundleDependencies - -This defines an array of package names that will be bundled when publishing -the package. - -In cases where you need to preserve npm packages locally or have them -available through a single file download, you can bundle the packages in a -tarball file by specifying the package names in the `bundleDependencies` -array and executing `npm pack`. - -For example: - -If we define a package.json like this: - -```json -{ - "name": "awesome-web-framework", - "version": "1.0.0", - "bundleDependencies": [ - "renderized", - "super-streams" - ] -} -``` - -we can obtain `awesome-web-framework-1.0.0.tgz` file by running `npm pack`. -This file contains the dependencies `renderized` and `super-streams` which -can be installed in a new project by executing `npm install -awesome-web-framework-1.0.0.tgz`. Note that the package names do not -include any versions, as that information is specified in `dependencies`. - -If this is spelled `"bundledDependencies"`, then that is also honored. - -Alternatively, `"bundleDependencies"` can be defined as a boolean value. A -value of `true` will bundle all dependencies, a value of `false` will bundle -none. - -### optionalDependencies - -If a dependency can be used, but you would like npm to proceed if it cannot -be found or fails to install, then you may put it in the -`optionalDependencies` object. This is a map of package name to version or -url, just like the `dependencies` object. The difference is that build -failures do not cause installation to fail. Running `npm install ---omit=optional` will prevent these dependencies from being installed. - -It is still your program's responsibility to handle the lack of the -dependency. For example, something like this: - -```js -try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version -} catch (er) { - foo = null -} -if ( notGoodFooVersion(fooVersion) ) { - foo = null -} - -// .. then later in your program .. - -if (foo) { - foo.doFooThings() -} -``` - -Entries in `optionalDependencies` will override entries of the same name in -`dependencies`, so it's usually best to only put in one place. - -### overrides - -If you need to make specific changes to dependencies of your dependencies, for -example replacing the version of a dependency with a known security issue, -replacing an existing dependency with a fork, or making sure that the same -version of a package is used everywhere, then you may add an override. - -Overrides provide a way to replace a package in your dependency tree with -another version, or another package entirely. These changes can be scoped as -specific or as vague as desired. - -To make sure the package `foo` is always installed as version `1.0.0` no matter -what version your dependencies rely on: - -```json -{ - "overrides": { - "foo": "1.0.0" - } -} -``` - -The above is a short hand notation, the full object form can be used to allow -overriding a package itself as well as a child of the package. This will cause -`foo` to always be `1.0.0` while also making `bar` at any depth beyond `foo` -also `1.0.0`: - -```json -{ - "overrides": { - "foo": { - ".": "1.0.0", - "bar": "1.0.0" - } - } -} -``` - -To only override `foo` to be `1.0.0` when it's a child (or grandchild, or great -grandchild, etc) of the package `bar`: - -```json -{ - "overrides": { - "bar": { - "foo": "1.0.0" - } - } -} -``` - -Keys can be nested to any arbitrary length. To override `foo` only when it's a -child of `bar` and only when `bar` is a child of `baz`: - -```json -{ - "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" - } - } - } -} -``` - -The key of an override can also include a version, or range of versions. -To override `foo` to `1.0.0`, but only when it's a child of `bar@2.0.0`: - -```json -{ - "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" - } - } -} -``` - -You may not set an override for a package that you directly depend on unless -both the dependency and the override itself share the exact same spec. To make -this limitation easier to deal with, overrides may also be defined as a -reference to a spec for a direct dependency by prefixing the name of the -package you wish the version to match with a `$`. - -```json -{ - "dependencies": { - "foo": "^1.0.0" - }, - "overrides": { - // BAD, will throw an EOVERRIDE error - // "foo": "^2.0.0" - // GOOD, specs match so override is allowed - // "foo": "^1.0.0" - // BEST, the override is defined as a reference to the dependency - "foo": "$foo", - // the referenced package does not need to match the overridden one - "bar": "$foo" - } -} -``` - -### engines - -You can specify the version of node that your stuff works on: - -```json -{ - "engines": { - "node": ">=0.10.3 <15" - } -} -``` - -And, like with dependencies, if you don't specify the version (or if you -specify "\*" as the version), then any version of node will do. - -You can also use the "engines" field to specify which versions of npm are -capable of properly installing your program. For example: - -```json -{ - "engines": { - "npm": "~1.0.20" - } -} -``` - -Unless the user has set the -[`engine-strict` config](/using-npm/config#engine-strict) flag, this field is -advisory only and will only produce warnings when your package is installed as a -dependency. - -### os - -You can specify which operating systems your -module will run on: - -```json -{ - "os": [ - "darwin", - "linux" - ] -} -``` - -You can also block instead of allowing operating systems, just prepend the -blocked os with a '!': - -```json -{ - "os": [ - "!win32" - ] -} -``` - -The host operating system is determined by `process.platform` - -It is allowed to both block and allow an item, although there isn't any -good reason to do this. - -### cpu - -If your code only runs on certain cpu architectures, -you can specify which ones. - -```json -{ - "cpu": [ - "x64", - "ia32" - ] -} -``` - -Like the `os` option, you can also block architectures: - -```json -{ - "cpu": [ - "!arm", - "!mips" - ] -} -``` - -The host architecture is determined by `process.arch` - -### private - -If you set `"private": true` in your package.json, then npm will refuse to -publish it. - -This is a way to prevent accidental publication of private repositories. -If you would like to ensure that a given package is only ever published to -a specific registry (for example, an internal registry), then use the -`publishConfig` dictionary described below to override the `registry` -config param at publish-time. - -### publishConfig - -This is a set of config values that will be used at publish-time. It's -especially handy if you want to set the tag, registry or access, so that -you can ensure that a given package is not tagged with "latest", published -to the global public registry or that a scoped module is private by -default. - -See [`config`](/using-npm/config) to see the list of config options that -can be overridden. - -### workspaces - -The optional `workspaces` field is an array of file patterns that describes -locations within the local file system that the install client should look -up to find each [workspace](/using-npm/workspaces) that needs to be -symlinked to the top level `node_modules` folder. - -It can describe either the direct paths of the folders to be used as -workspaces or it can define globs that will resolve to these same folders. - -In the following example, all folders located inside the folder -`./packages` will be treated as workspaces as long as they have valid -`package.json` files inside them: - -```json -{ - "name": "workspace-example", - "workspaces": [ - "./packages/*" - ] -} -``` - -See [`workspaces`](/using-npm/workspaces) for more examples. - -### DEFAULT VALUES - -npm will default some values based on package contents. - -* `"scripts": {"start": "node server.js"}` - - If there is a `server.js` file in the root of your package, then npm will - default the `start` command to `node server.js`. - -* `"scripts":{"install": "node-gyp rebuild"}` - - If there is a `binding.gyp` file in the root of your package and you have - not defined an `install` or `preinstall` script, npm will default the - `install` command to compile using node-gyp. - -* `"contributors": [...]` - - If there is an `AUTHORS` file in the root of your package, npm will treat - each line as a `Name (url)` format, where email and url are - optional. Lines which start with a `#` or are blank, will be ignored. - -### SEE ALSO - -* [semver](https://github.com/npm/node-semver#versions) -* [workspaces](/using-npm/workspaces) -* [npm init](/commands/npm-init) -* [npm version](/commands/npm-version) -* [npm config](/commands/npm-config) -* [npm help](/commands/npm-help) -* [npm install](/commands/npm-install) -* [npm publish](/commands/npm-publish) -* [npm uninstall](/commands/npm-uninstall) diff --git a/node_modules/npm/docs/content/configuring-npm/package-lock-json.md b/node_modules/npm/docs/content/configuring-npm/package-lock-json.md deleted file mode 100644 index d540dd0..0000000 --- a/node_modules/npm/docs/content/configuring-npm/package-lock-json.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -title: package-lock.json -section: 5 -description: A manifestation of the manifest ---- - -### Description - -`package-lock.json` is automatically generated for any operations where npm -modifies either the `node_modules` tree, or `package.json`. It describes the -exact tree that was generated, such that subsequent installs are able to -generate identical trees, regardless of intermediate dependency updates. - -This file is intended to be committed into source repositories, and serves -various purposes: - -* Describe a single representation of a dependency tree such that - teammates, deployments, and continuous integration are guaranteed to - install exactly the same dependencies. - -* Provide a facility for users to "time-travel" to previous states of - `node_modules` without having to commit the directory itself. - -* Facilitate greater visibility of tree changes through readable source - control diffs. - -* Optimize the installation process by allowing npm to skip repeated - metadata resolutions for previously-installed packages. - -* As of npm v7, lockfiles include enough information to gain a complete - picture of the package tree, reducing the need to read `package.json` - files, and allowing for significant performance improvements. - -### `package-lock.json` vs `npm-shrinkwrap.json` - -Both of these files have the same format, and perform similar functions in -the root of a project. - -The difference is that `package-lock.json` cannot be published, and it will -be ignored if found in any place other than the root project. - -In contrast, [npm-shrinkwrap.json](/configuring-npm/npm-shrinkwrap-json) allows -publication, and defines the dependency tree from the point encountered. -This is not recommended unless deploying a CLI tool or otherwise using the -publication process for producing production packages. - -If both `package-lock.json` and `npm-shrinkwrap.json` are present in the -root of a project, `npm-shrinkwrap.json` will take precedence and -`package-lock.json` will be ignored. - -### Hidden Lockfiles - -In order to avoid processing the `node_modules` folder repeatedly, npm as -of v7 uses a "hidden" lockfile present in -`node_modules/.package-lock.json`. This contains information about the -tree, and is used in lieu of reading the entire `node_modules` hierarchy -provided that the following conditions are met: - -- All package folders it references exist in the `node_modules` hierarchy. -- No package folders exist in the `node_modules` hierarchy that are not - listed in the lockfile. -- The modified time of the file is at least as recent as all of the package - folders it references. - -That is, the hidden lockfile will only be relevant if it was created as -part of the most recent update to the package tree. If another CLI mutates -the tree in any way, this will be detected, and the hidden lockfile will be -ignored. - -Note that it _is_ possible to manually change the _contents_ of a package -in such a way that the modified time of the package folder is unaffected. -For example, if you add a file to `node_modules/foo/lib/bar.js`, then the -modified time on `node_modules/foo` will not reflect this change. If you -are manually editing files in `node_modules`, it is generally best to -delete the file at `node_modules/.package-lock.json`. - -As the hidden lockfile is ignored by older npm versions, it does not -contain the backwards compatibility affordances present in "normal" -lockfiles. That is, it is `lockfileVersion: 3`, rather than -`lockfileVersion: 2`. - -### Handling Old Lockfiles - -When npm detects a lockfile from npm v6 or before during the package -installation process, it is automatically updated to fetch missing -information from either the `node_modules` tree or (in the case of empty -`node_modules` trees or very old lockfile formats) the npm registry. - -### File Format - -#### `name` - -The name of the package this is a package-lock for. This will match what's -in `package.json`. - -#### `version` - -The version of the package this is a package-lock for. This will match -what's in `package.json`. - -#### `lockfileVersion` - -An integer version, starting at `1` with the version number of this -document whose semantics were used when generating this -`package-lock.json`. - -Note that the file format changed significantly in npm v7 to track -information that would have otherwise required looking in `node_modules` or -the npm registry. Lockfiles generated by npm v7 will contain -`lockfileVersion: 2`. - -* No version provided: an "ancient" shrinkwrap file from a version of npm - prior to npm v5. -* `1`: The lockfile version used by npm v5 and v6. -* `2`: The lockfile version used by npm v7 and v8. Backwards compatible to v1 - lockfiles. -* `3`: The lockfile version used by npm v9 and above. Backwards compatible to npm v7. - -npm will always attempt to get whatever data it can out of a lockfile, even -if it is not a version that it was designed to support. - -#### `packages` - -This is an object that maps package locations to an object containing the -information about that package. - -The root project is typically listed with a key of `""`, and all other -packages are listed with their relative paths from the root project folder. - -Package descriptors have the following fields: - -* version: The version found in `package.json` - -* resolved: The place where the package was actually resolved from. In - the case of packages fetched from the registry, this will be a url to a - tarball. In the case of git dependencies, this will be the full git url - with commit sha. In the case of link dependencies, this will be the - location of the link target. `registry.npmjs.org` is a magic value meaning - "the currently configured registry". - -* integrity: A `sha512` or `sha1` [Standard Subresource - Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) - string for the artifact that was unpacked in this location. - -* link: A flag to indicate that this is a symbolic link. If this is - present, no other fields are specified, since the link target will also - be included in the lockfile. - -* dev, optional, devOptional: If the package is strictly part of the - `devDependencies` tree, then `dev` will be true. If it is strictly part - of the `optionalDependencies` tree, then `optional` will be set. If it - is both a `dev` dependency _and_ an `optional` dependency of a non-dev - dependency, then `devOptional` will be set. (An `optional` dependency of - a `dev` dependency will have both `dev` and `optional` set.) - -* inBundle: A flag to indicate that the package is a bundled dependency. - -* hasInstallScript: A flag to indicate that the package has a `preinstall`, - `install`, or `postinstall` script. - -* hasShrinkwrap: A flag to indicate that the package has an - `npm-shrinkwrap.json` file. - -* bin, license, engines, dependencies, optionalDependencies: fields from - `package.json` - -#### dependencies - -Legacy data for supporting versions of npm that use `lockfileVersion: 1`. -This is a mapping of package names to dependency objects. Because the -object structure is strictly hierarchical, symbolic link dependencies are -somewhat challenging to represent in some cases. - -npm v7 ignores this section entirely if a `packages` section is present, -but does keep it up to date in order to support switching between npm v6 -and npm v7. - -Dependency objects have the following fields: - -* version: a specifier that varies depending on the nature of the package, - and is usable in fetching a new copy of it. - - * bundled dependencies: Regardless of source, this is a version number - that is purely for informational purposes. - * registry sources: This is a version number. (eg, `1.2.3`) - * git sources: This is a git specifier with resolved committish. (eg, - `git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e`) - * http tarball sources: This is the URL of the tarball. (eg, - `https://example.com/example-1.3.0.tgz`) - * local tarball sources: This is the file URL of the tarball. (eg - `file:///opt/storage/example-1.3.0.tgz`) - * local link sources: This is the file URL of the link. (eg - `file:libs/our-module`) - -* integrity: A `sha512` or `sha1` [Standard Subresource - Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) - string for the artifact that was unpacked in this location. For git - dependencies, this is the commit sha. - -* resolved: For registry sources this is path of the tarball relative to - the registry URL. If the tarball URL isn't on the same server as the - registry URL then this is a complete URL. `registry.npmjs.org` is a magic - value meaning "the currently configured registry". - -* bundled: If true, this is the bundled dependency and will be installed - by the parent module. When installing, this module will be extracted - from the parent module during the extract phase, not installed as a - separate dependency. - -* dev: If true then this dependency is either a development dependency ONLY - of the top level module or a transitive dependency of one. This is false - for dependencies that are both a development dependency of the top level - and a transitive dependency of a non-development dependency of the top - level. - -* optional: If true then this dependency is either an optional dependency - ONLY of the top level module or a transitive dependency of one. This is - false for dependencies that are both an optional dependency of the top - level and a transitive dependency of a non-optional dependency of the top - level. - -* requires: This is a mapping of module name to version. This is a list of - everything this module requires, regardless of where it will be - installed. The version should match via normal matching rules a - dependency either in our `dependencies` or in a level higher than us. - -* dependencies: The dependencies of this dependency, exactly as at the top - level. - -### See also - -* [npm shrinkwrap](/commands/npm-shrinkwrap) -* [npm-shrinkwrap.json](/configuring-npm/npm-shrinkwrap-json) -* [package.json](/configuring-npm/package-json) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/using-npm/config.md b/node_modules/npm/docs/content/using-npm/config.md deleted file mode 100644 index 78d6ade..0000000 --- a/node_modules/npm/docs/content/using-npm/config.md +++ /dev/null @@ -1,1984 +0,0 @@ ---- -title: config -section: 7 -description: More than you probably want to know about npm configuration ---- - -### Description - -npm gets its configuration values from the following sources, sorted by priority: - -#### Command Line Flags - -Putting `--foo bar` on the command line sets the `foo` configuration -parameter to `"bar"`. A `--` argument tells the cli parser to stop -reading flags. Using `--flag` without specifying any value will set -the value to `true`. - -Example: `--flag1 --flag2` will set both configuration parameters -to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`, -and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set -both configuration parameters to `true`, and the `bar` is taken -as a command argument. - -#### Environment Variables - -Any environment variables that start with `npm_config_` will be -interpreted as a configuration parameter. For example, putting -`npm_config_foo=bar` in your environment will set the `foo` -configuration parameter to `bar`. Any environment configurations that -are not given a value will be given the value of `true`. Config -values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the -same. However, please note that inside [`scripts`](/using-npm/scripts) -npm will set its own environment variables and Node will prefer -those lowercase versions over any uppercase ones that you might set. -For details see [this issue](https://github.com/npm/npm/issues/14528). - -Notice that you need to use underscores instead of dashes, so `--allow-same-version` -would become `npm_config_allow_same_version=true`. - -#### npmrc Files - -The four relevant files are: - -* per-project configuration file (`/path/to/my/project/.npmrc`) -* per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI - option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`) -* global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via - CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`) -* npm's built-in configuration file (`/path/to/npm/npmrc`) - -See [npmrc](/configuring-npm/npmrc) for more details. - -#### Default Configs - -Run `npm config ls -l` to see a set of configuration parameters that are -internal to npm, and are defaults if nothing else is specified. - -### Shorthands and Other CLI Niceties - -The following shorthands are parsed on the command-line: - -* `-a`: `--all` -* `--enjoy-by`: `--before` -* `-c`: `--call` -* `--desc`: `--description` -* `-f`: `--force` -* `-g`: `--global` -* `--iwr`: `--include-workspace-root` -* `-L`: `--location` -* `-d`: `--loglevel info` -* `-s`: `--loglevel silent` -* `--silent`: `--loglevel silent` -* `--ddd`: `--loglevel silly` -* `--dd`: `--loglevel verbose` -* `--verbose`: `--loglevel verbose` -* `-q`: `--loglevel warn` -* `--quiet`: `--loglevel warn` -* `-l`: `--long` -* `-m`: `--message` -* `--local`: `--no-global` -* `-n`: `--no-yes` -* `--no`: `--no-yes` -* `-p`: `--parseable` -* `--porcelain`: `--parseable` -* `-C`: `--prefix` -* `--readonly`: `--read-only` -* `--reg`: `--registry` -* `-S`: `--save` -* `-B`: `--save-bundle` -* `-D`: `--save-dev` -* `-E`: `--save-exact` -* `-O`: `--save-optional` -* `-P`: `--save-prod` -* `-?`: `--usage` -* `-h`: `--usage` -* `-H`: `--usage` -* `--help`: `--usage` -* `-v`: `--version` -* `-w`: `--workspace` -* `--ws`: `--workspaces` -* `-y`: `--yes` - -If the specified configuration param resolves unambiguously to a known -configuration parameter, then it is expanded to that configuration -parameter. For example: - -```bash -npm ls --par -# same as: -npm ls --parseable -``` - -If multiple single-character shorthands are strung together, and the -resulting combination is unambiguously not some other configuration -param, then it is expanded to its various component pieces. For -example: - -```bash -npm ls -gpld -# same as: -npm ls --global --parseable --long --loglevel info -``` - -### Config Settings - -#### `_auth` - -* Default: null -* Type: null or String - -A basic-auth string to use when authenticating against the npm registry. -This will ONLY be used to authenticate against the npm registry. For other -registries you will need to scope it like "//other-registry.tld/:_auth" - -Warning: This should generally not be set via a command-line option. It is -safer to use a registry-provided authentication bearer token stored in the -~/.npmrc file by running `npm login`. - - - -#### `access` - -* Default: 'public' for new packages, existing packages it will not change the - current level -* Type: null, "restricted", or "public" - -If you do not want your scoped package to be publicly viewable (and -installable) set `--access=restricted`. - -Unscoped packages can not be set to `restricted`. - -Note: This defaults to not changing the current access level for existing -packages. Specifying a value of `restricted` or `public` during publish will -change the access for an existing package the same way that `npm access set -status` would. - - - -#### `all` - -* Default: false -* Type: Boolean - -When running `npm outdated` and `npm ls`, setting `--all` will show all -outdated or installed packages, rather than only those directly depended -upon by the current project. - - - -#### `allow-same-version` - -* Default: false -* Type: Boolean - -Prevents throwing an error when `npm version` is used to set the new version -to the same value as the current version. - - - -#### `audit` - -* Default: true -* Type: Boolean - -When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for [`npm audit`](/commands/npm-audit) for details on what is -submitted. - - - -#### `audit-level` - -* Default: null -* Type: null, "info", "low", "moderate", "high", "critical", or "none" - -The minimum level of vulnerability for `npm audit` to exit with a non-zero -exit code. - - - -#### `auth-type` - -* Default: "web" -* Type: "legacy" or "web" - -What authentication strategy to use with `login`. Note that if an `otp` -config is given, this value will always be set to `legacy`. - - - -#### `before` - -* Default: null -* Type: null or Date - -If passed to `npm install`, will rebuild the npm tree such that only -versions that were available **on or before** the `--before` time get -installed. If there's no versions available for the current set of direct -dependencies, the command will error. - -If the requested version is a `dist-tag` and the given tag does not pass the -`--before` filter, the most recent version less than or equal to that tag -will be used. For example, `foo@latest` might install `foo@1.2` even though -`latest` is `2.0`. - - - -#### `bin-links` - -* Default: true -* Type: Boolean - -Tells npm to create symlinks (or `.cmd` shims on Windows) for package -executables. - -Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems. - - - -#### `browser` - -* Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"` -* Type: null, Boolean, or String - -The browser that is called by npm commands to open websites. - -Set to `false` to suppress browser behavior and instead print urls to -terminal. - -Set to `true` to use default system URL opener. - - - -#### `ca` - -* Default: null -* Type: null or String (can be set multiple times) - -The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls -it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string -"\n". For example: - -```ini -ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" -``` - -Set to `null` to only allow "known" registrars, or to a specific CA cert to -trust only that specific signing authority. - -Multiple CAs can be trusted by specifying an array of certificates: - -```ini -ca[]="..." -ca[]="..." -``` - -See also the `strict-ssl` config. - - - -#### `cache` - -* Default: Windows: `%LocalAppData%\npm-cache`, Posix: `~/.npm` -* Type: Path - -The location of npm's cache directory. - - - -#### `cafile` - -* Default: null -* Type: Path - -A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the `ca` setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk. - - - -#### `call` - -* Default: "" -* Type: String - -Optional companion option for `npm exec`, `npx` that allows for specifying a -custom command to be run along with the installed packages. - -```bash -npm exec --package yo --package generator-node --call "yo node" -``` - - - -#### `cidr` - -* Default: null -* Type: null or String (can be set multiple times) - -This is a list of CIDR address to be used when configuring limited access -tokens with the `npm token create` command. - - - -#### `color` - -* Default: true unless the NO_COLOR environ is set to something other than '0' -* Type: "always" or Boolean - -If false, never shows colors. If `"always"` then always shows colors. If -true, then only prints color codes for tty file descriptors. - - - -#### `commit-hooks` - -* Default: true -* Type: Boolean - -Run git commit hooks when using the `npm version` command. - - - -#### `cpu` - -* Default: null -* Type: null or String - -Override CPU architecture of native modules to install. Acceptable values -are same as `cpu` field of package.json, which comes from `process.arch`. - - - -#### `depth` - -* Default: `Infinity` if `--all` is set, otherwise `1` -* Type: null or Number - -The depth to go when recursing packages for `npm ls`. - -If not set, `npm ls` will show only the immediate dependencies of the root -project. If `--all` is set, then npm will show all dependencies by default. - - - -#### `description` - -* Default: true -* Type: Boolean - -Show the description in `npm search` - - - -#### `diff` - -* Default: -* Type: String (can be set multiple times) - -Define arguments to compare in `npm diff`. - - - -#### `diff-dst-prefix` - -* Default: "b/" -* Type: String - -Destination prefix to be used in `npm diff` output. - - - -#### `diff-ignore-all-space` - -* Default: false -* Type: Boolean - -Ignore whitespace when comparing lines in `npm diff`. - - - -#### `diff-name-only` - -* Default: false -* Type: Boolean - -Prints only filenames when using `npm diff`. - - - -#### `diff-no-prefix` - -* Default: false -* Type: Boolean - -Do not show any source or destination prefix in `npm diff` output. - -Note: this causes `npm diff` to ignore the `--diff-src-prefix` and -`--diff-dst-prefix` configs. - - - -#### `diff-src-prefix` - -* Default: "a/" -* Type: String - -Source prefix to be used in `npm diff` output. - - - -#### `diff-text` - -* Default: false -* Type: Boolean - -Treat all files as text in `npm diff`. - - - -#### `diff-unified` - -* Default: 3 -* Type: Number - -The number of lines of context to print in `npm diff`. - - - -#### `dry-run` - -* Default: false -* Type: Boolean - -Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, `install`, `update`, -`dedupe`, `uninstall`, as well as `pack` and `publish`. - -Note: This is NOT honored by other network related commands, eg `dist-tags`, -`owner`, etc. - - - -#### `editor` - -* Default: The EDITOR or VISUAL environment variables, or - '%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems -* Type: String - -The command to run for `npm edit` and `npm config edit`. - - - -#### `engine-strict` - -* Default: false -* Type: Boolean - -If set to true, then npm will stubbornly refuse to install (or even consider -installing) any package that claims to not be compatible with the current -Node.js version. - -This can be overridden by setting the `--force` flag. - - - -#### `fetch-retries` - -* Default: 2 -* Type: Number - -The "retries" config for the `retry` module to use when fetching packages -from the registry. - -npm will retry idempotent read requests to the registry in the case of -network failures or 5xx HTTP errors. - - - -#### `fetch-retry-factor` - -* Default: 10 -* Type: Number - -The "factor" config for the `retry` module to use when fetching packages. - - - -#### `fetch-retry-maxtimeout` - -* Default: 60000 (1 minute) -* Type: Number - -The "maxTimeout" config for the `retry` module to use when fetching -packages. - - - -#### `fetch-retry-mintimeout` - -* Default: 10000 (10 seconds) -* Type: Number - -The "minTimeout" config for the `retry` module to use when fetching -packages. - - - -#### `fetch-timeout` - -* Default: 300000 (5 minutes) -* Type: Number - -The maximum amount of time to wait for HTTP requests to complete. - - - -#### `force` - -* Default: false -* Type: Boolean - -Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input. - -* Allow clobbering non-npm files in global installs. -* Allow the `npm version` command to work on an unclean git repository. -* Allow deleting the cache folder with `npm cache clean`. -* Allow installing packages that have an `engines` declaration requiring a - different version of npm. -* Allow installing packages that have an `engines` declaration requiring a - different version of `node`, even if `--engine-strict` is enabled. -* Allow `npm audit fix` to install modules outside your stated dependency - range (including SemVer-major changes). -* Allow unpublishing all versions of a published package. -* Allow conflicting peerDependencies to be installed in the root project. -* Implicitly set `--yes` during `npm init`. -* Allow clobbering existing values in `npm pkg` -* Allow unpublishing of entire packages (not just a single version). - -If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option! - - - -#### `foreground-scripts` - -* Default: false -* Type: Boolean - -Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process. - -Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging. - - - -#### `format-package-lock` - -* Default: true -* Type: Boolean - -Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable -file. - - - -#### `fund` - -* Default: true -* Type: Boolean - -When "true" displays the message at the end of each `npm install` -acknowledging the number of dependencies looking for funding. See [`npm -fund`](/commands/npm-fund) for details. - - - -#### `git` - -* Default: "git" -* Type: String - -The command to use for git commands. If git is installed on the computer, -but is not in the `PATH`, then set this to the full path to the git binary. - - - -#### `git-tag-version` - -* Default: true -* Type: Boolean - -Tag the commit when using the `npm version` command. Setting this to false -results in no commit being made at all. - - - -#### `global` - -* Default: false -* Type: Boolean - -Operates in "global" mode, so that packages are installed into the `prefix` -folder instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `globalconfig` - -* Default: The global --prefix setting plus 'etc/npmrc'. For example, - '/usr/local/etc/npmrc' -* Type: Path - -The config file to read for global config options. - - - -#### `heading` - -* Default: "npm" -* Type: String - -The string that starts all the debugging log output. - - - -#### `https-proxy` - -* Default: null -* Type: null or URL - -A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or -`https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set, -proxy settings will be honored by the underlying `make-fetch-happen` -library. - - - -#### `if-present` - -* Default: false -* Type: Boolean - -If true, npm will not exit with an error code when `run-script` is invoked -for a script that isn't defined in the `scripts` section of `package.json`. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup. - -This value is not exported to the environment for child processes. - -#### `ignore-scripts` - -* Default: false -* Type: Boolean - -If true, npm does not run scripts specified in package.json files. - -Note that commands explicitly intended to run a particular script, such as -`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` -will still run their intended script if `ignore-scripts` is set, but they -will *not* run any pre- or post-scripts. - - - -#### `include` - -* Default: -* Type: "prod", "dev", "optional", or "peer" (can be set multiple times) - -Option that allows for defining which types of dependencies to install. - -This is the inverse of `--omit=`. - -Dependency types specified in `--include` will not be omitted, regardless of -the order in which omit/include are specified on the command-line. - - - -#### `include-staged` - -* Default: false -* Type: Boolean - -Allow installing "staged" published packages, as defined by [npm RFC PR -#92](https://github.com/npm/rfcs/pull/92). - -This is experimental, and not implemented by the npm public registry. - - - -#### `include-workspace-root` - -* Default: false -* Type: Boolean - -Include the workspace root when workspaces are enabled for a command. - -When false, specifying individual workspaces via the `workspace` config, or -all workspaces via the `workspaces` flag, will cause npm to operate only on -the specified workspaces, and not on the root project. - -This value is not exported to the environment for child processes. - -#### `init-author-email` - -* Default: "" -* Type: String - -The value `npm init` should use by default for the package author's email. - - - -#### `init-author-name` - -* Default: "" -* Type: String - -The value `npm init` should use by default for the package author's name. - - - -#### `init-author-url` - -* Default: "" -* Type: "" or URL - -The value `npm init` should use by default for the package author's -homepage. - - - -#### `init-license` - -* Default: "ISC" -* Type: String - -The value `npm init` should use by default for the package license. - - - -#### `init-module` - -* Default: "~/.npm-init.js" -* Type: Path - -A module that will be loaded by the `npm init` command. See the -documentation for the -[init-package-json](https://github.com/npm/init-package-json) module for -more information, or [npm init](/commands/npm-init). - - - -#### `init-version` - -* Default: "1.0.0" -* Type: SemVer string - -The value that `npm init` should use by default for the package version -number, if not already set in package.json. - - - -#### `install-links` - -* Default: false -* Type: Boolean - -When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces. - - - -#### `install-strategy` - -* Default: "hoisted" -* Type: "hoisted", "nested", "shallow", or "linked" - -Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted. - - - -#### `json` - -* Default: false -* Type: Boolean - -Whether or not to output JSON data, rather than the normal output. - -* In `npm pkg set` it enables parsing set values with JSON.parse() before - saving them to your `package.json`. - -Not supported by all npm commands. - - - -#### `legacy-peer-deps` - -* Default: false -* Type: Boolean - -Causes npm to completely ignore `peerDependencies` when building a package -tree, as in npm versions 3 through 6. - -If a package cannot be installed because of overly strict `peerDependencies` -that collide, it provides a way to move forward resolving the situation. - -This differs from `--omit=peer`, in that `--omit=peer` will avoid unpacking -`peerDependencies` on disk, but will still design a tree such that -`peerDependencies` _could_ be unpacked in a correct place. - -Use of `legacy-peer-deps` is not recommended, as it will not enforce the -`peerDependencies` contract that meta-dependencies may rely on. - - - -#### `link` - -* Default: false -* Type: Boolean - -Used with `npm ls`, limiting output to only those packages that are linked. - - - -#### `local-address` - -* Default: null -* Type: IP Address - -The IP address of the local interface to use when making connections to the -npm registry. Must be IPv4 in versions of Node prior to 0.12. - - - -#### `location` - -* Default: "user" unless `--global` is passed, which will also set this value - to "global" -* Type: "global", "user", or "project" - -When passed to `npm config` this refers to which config file to use. - -When set to "global" mode, packages are installed into the `prefix` folder -instead of the current working directory. See -[folders](/configuring-npm/folders) for more on the differences in behavior. - -* packages are installed into the `{prefix}/lib/node_modules` folder, instead - of the current working directory. -* bin files are linked to `{prefix}/bin` -* man pages are linked to `{prefix}/share/man` - - - -#### `lockfile-version` - -* Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, - otherwise maintain current lockfile version. -* Type: null, 1, 2, 3, "1", "2", or "3" - -Set the lockfile format version to be used in package-lock.json and -npm-shrinkwrap-json files. Possible options are: - -1: The lockfile version used by npm versions 5 and 6. Lacks some data that -is used during the install, resulting in slower and possibly less -deterministic installs. Prevents lockfile churn when interoperating with -older npm versions. - -2: The default lockfile version used by npm version 7 and 8. Includes both -the version 1 lockfile data and version 3 lockfile data, for maximum -determinism and interoperability, at the expense of more bytes on disk. - -3: Only the new lockfile information introduced in npm version 7. Smaller on -disk than lockfile version 2, but not interoperable with older npm versions. -Ideal if all users are on npm version 7 and higher. - - - -#### `loglevel` - -* Default: "notice" -* Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or - "silly" - -What level of logs to report. All logs are written to a debug log, with the -path to that file printed if the execution of a command fails. - -Any logs of a higher level than the setting are shown. The default is -"notice". - -See also the `foreground-scripts` config. - - - -#### `logs-dir` - -* Default: A directory named `_logs` inside the cache -* Type: null or Path - -The location of npm's log directory. See [`npm logging`](/using-npm/logging) -for more information. - - - -#### `logs-max` - -* Default: 10 -* Type: Number - -The maximum number of log files to store. - -If set to 0, no log files will be written for the current run. - - - -#### `long` - -* Default: false -* Type: Boolean - -Show extended information in `ls`, `search`, and `help-search`. - - - -#### `maxsockets` - -* Default: 15 -* Type: Number - -The maximum number of connections to use per origin (protocol/host/port -combination). - - - -#### `message` - -* Default: "%s" -* Type: String - -Commit message which is used by `npm version` when creating version commit. - -Any "%s" in the message will be replaced with the version number. - - - -#### `node-options` - -* Default: null -* Type: null or String - -Options to pass through to Node.js via the `NODE_OPTIONS` environment -variable. This does not impact how npm itself is executed but it does impact -how lifecycle scripts are called. - - - -#### `noproxy` - -* Default: The value of the NO_PROXY environment variable -* Type: String (can be set multiple times) - -Domain extensions that should bypass any proxies. - -Also accepts a comma-delimited string. - - - -#### `offline` - -* Default: false -* Type: Boolean - -Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see `--prefer-offline`. - - - -#### `omit` - -* Default: 'dev' if the `NODE_ENV` environment variable is set to - 'production', otherwise empty. -* Type: "dev", "optional", or "peer" (can be set multiple times) - -Dependency types to omit from the installation tree on disk. - -Note that these dependencies _are_ still resolved and added to the -`package-lock.json` or `npm-shrinkwrap.json` file. They are just not -physically installed on disk. - -If a package type appears in both the `--include` and `--omit` lists, then -it will be included. - -If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment -variable will be set to `'production'` for all lifecycle scripts. - - - -#### `omit-lockfile-registry-resolved` - -* Default: false -* Type: Boolean - -This option causes npm to create lock files without a `resolved` key for -registry dependencies. Subsequent installs will need to resolve tarball -endpoints with the configured registry, likely resulting in a longer install -time. - - - -#### `os` - -* Default: null -* Type: null or String - -Override OS of native modules to install. Acceptable values are same as `os` -field of package.json, which comes from `process.platform`. - - - -#### `otp` - -* Default: null -* Type: null or String - -This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with `npm access`. - -If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one. - - - -#### `pack-destination` - -* Default: "." -* Type: String - -Directory in which `npm pack` will save tarballs. - - - -#### `package` - -* Default: -* Type: String (can be set multiple times) - -The package or packages to install for [`npm exec`](/commands/npm-exec) - - - -#### `package-lock` - -* Default: true -* Type: Boolean - -If set to false, then ignore `package-lock.json` files when installing. This -will also prevent _writing_ `package-lock.json` if `save` is true. - - - -#### `package-lock-only` - -* Default: false -* Type: Boolean - -If set to true, the current operation will only use the `package-lock.json`, -ignoring `node_modules`. - -For `update` this means only the `package-lock.json` will be updated, -instead of checking `node_modules` and downloading dependencies. - -For `list` this means the output will be based on the tree described by the -`package-lock.json`, rather than the contents of `node_modules`. - - - -#### `parseable` - -* Default: false -* Type: Boolean - -Output parseable results from commands that write to standard output. For -`npm search`, this will be tab-separated table format. - - - -#### `prefer-dedupe` - -* Default: false -* Type: Boolean - -Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency. - - - -#### `prefer-offline` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use -`--offline`. - - - -#### `prefer-online` - -* Default: false -* Type: Boolean - -If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data. - - - -#### `prefix` - -* Default: In global mode, the folder where the node executable is installed. - Otherwise, the nearest parent folder containing either a package.json file - or a node_modules folder. -* Type: Path - -The location to install global items. If set on the command line, then it -forces non-global commands to run in the specified folder. - - - -#### `preid` - -* Default: "" -* Type: String - -The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the `rc` in `1.2.0-rc.8`. - - - -#### `progress` - -* Default: `true` unless running in a known CI system -* Type: Boolean - -When set to `true`, npm will display a progress bar during time intensive -operations, if `process.stderr` is a TTY. - -Set to `false` to suppress the progress bar. - - - -#### `provenance` - -* Default: false -* Type: Boolean - -When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from. - -This config can not be used with: `provenance-file` - -#### `provenance-file` - -* Default: null -* Type: Path - -When publishing, the provenance bundle at the given path will be used. - -This config can not be used with: `provenance` - -#### `proxy` - -* Default: null -* Type: null, false, or URL - -A proxy to use for outgoing http requests. If the `HTTP_PROXY` or -`http_proxy` environment variables are set, proxy settings will be honored -by the underlying `request` library. - - - -#### `read-only` - -* Default: false -* Type: Boolean - -This is used to mark a token as unable to publish when configuring limited -access tokens with the `npm token create` command. - - - -#### `rebuild-bundle` - -* Default: true -* Type: Boolean - -Rebuild bundled dependencies after installation. - - - -#### `registry` - -* Default: "https://registry.npmjs.org/" -* Type: URL - -The base URL of the npm registry. - - - -#### `replace-registry-host` - -* Default: "npmjs" -* Type: "npmjs", "never", "always", or String - -Defines behavior for replacing the registry host in a lockfile with the -configured registry. - -The default behavior is to replace package dist URLs from the default -registry (https://registry.npmjs.org) to the configured registry. If set to -"never", then use the registry value. If set to "always", then replace the -registry host with the configured host every time. - -You may also specify a bare hostname (e.g., "registry.npmjs.org"). - - - -#### `save` - -* Default: `true` unless when using `npm update` where it defaults to `false` -* Type: Boolean - -Save installed packages to a `package.json` file as dependencies. - -When used with the `npm rm` command, removes the dependency from -`package.json`. - -Will also prevent writing to `package-lock.json` if set to `false`. - - - -#### `save-bundle` - -* Default: false -* Type: Boolean - -If a package would be saved at install time by the use of `--save`, -`--save-dev`, or `--save-optional`, then also put it in the -`bundleDependencies` list. - -Ignored if `--save-peer` is set, since peerDependencies cannot be bundled. - - - -#### `save-dev` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `devDependencies`. - - - -#### `save-exact` - -* Default: false -* Type: Boolean - -Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator. - - - -#### `save-optional` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `optionalDependencies`. - - - -#### `save-peer` - -* Default: false -* Type: Boolean - -Save installed packages to a package.json file as `peerDependencies` - - - -#### `save-prefix` - -* Default: "^" -* Type: String - -Configure how versions of packages installed to a package.json file via -`--save` or `--save-dev` get prefixed. - -For example if a package has version `1.2.3`, by default its version is set -to `^1.2.3` which allows minor upgrades for that package, but after `npm -config set save-prefix='~'` it would be set to `~1.2.3` which only allows -patch upgrades. - - - -#### `save-prod` - -* Default: false -* Type: Boolean - -Save installed packages into `dependencies` specifically. This is useful if -a package already exists in `devDependencies` or `optionalDependencies`, but -you want to move it to be a non-optional production dependency. - -This is the default behavior if `--save` is true, and neither `--save-dev` -or `--save-optional` are true. - - - -#### `sbom-format` - -* Default: null -* Type: "cyclonedx" or "spdx" - -SBOM format to use when generating SBOMs. - - - -#### `sbom-type` - -* Default: "library" -* Type: "library", "application", or "framework" - -The type of package described by the generated SBOM. For SPDX, this is the -value for the `primaryPackagePurpose` field. For CycloneDX, this is the -value for the `type` field. - - - -#### `scope` - -* Default: the scope of the current project, if any, or "" -* Type: String - -Associate an operation with a scope for a scoped registry. - -Useful when logging in to or out of a private registry: - -``` -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -``` - -This will cause `@mycorp` to be mapped to the registry for future -installation of packages specified according to the pattern -`@mycorp/package`. - -This will also cause `npm init` to create a scoped package. - -``` -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -``` - - - -#### `script-shell` - -* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -* Type: null or String - -The shell to use for scripts run with the `npm exec`, `npm run` and `npm -init ` commands. - - - -#### `searchexclude` - -* Default: "" -* Type: String - -Space-separated options that limit the results from search. - - - -#### `searchlimit` - -* Default: 20 -* Type: Number - -Number of items to limit search results to. Will not apply at all to legacy -searches. - - - -#### `searchopts` - -* Default: "" -* Type: String - -Space-separated options that are always passed to search. - - - -#### `searchstaleness` - -* Default: 900 -* Type: Number - -The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint. - - - -#### `shell` - -* Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on - Windows -* Type: String - -The shell to run for the `npm explore` command. - - - -#### `sign-git-commit` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will commit the new package -version using `-S` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - - - -#### `sign-git-tag` - -* Default: false -* Type: Boolean - -If set to true, then the `npm version` command will tag the version using -`-s` to add a signature. - -Note that git requires you to have set up GPG keys in your git configs for -this to work properly. - - - -#### `strict-peer-deps` - -* Default: false -* Type: Boolean - -If set to `true`, and `--legacy-peer-deps` is not set, then _any_ -conflicting `peerDependencies` will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships. - -By default, conflicting `peerDependencies` deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's `peerDependencies` object. - -When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If `--strict-peer-deps` is set, then -this warning is treated as a failure. - - - -#### `strict-ssl` - -* Default: true -* Type: Boolean - -Whether or not to do SSL key validation when making requests to the registry -via https. - -See also the `ca` config. - - - -#### `tag` - -* Default: "latest" -* Type: String - -If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag. - -Also the tag that is added to the package@version specified by the `npm tag` -command, if no explicit tag is given. - -When used by the `npm diff` command, this is the tag used to fetch the -tarball that will be compared with the local files by default. - - - -#### `tag-version-prefix` - -* Default: "v" -* Type: String - -If set, alters the prefix used when tagging a new version when performing a -version increment using `npm version`. To remove the prefix altogether, set -it to the empty string: `""`. - -Because other tools may rely on the convention that npm version tags look -like `v1.0.0`, _only use this property if it is absolutely necessary_. In -particular, use care when overriding this setting for public packages. - - - -#### `timing` - -* Default: false -* Type: Boolean - -If true, writes timing information to a process specific json file in the -cache or `logs-dir`. The file name ends with `-timing.json`. - -You can quickly view it with this [json](https://npm.im/json) command line: -`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g`. - -Timing information will also be reported in the terminal. To suppress this -while still writing the timing file, use `--silent`. - - - -#### `umask` - -* Default: 0 -* Type: Octal numeric string in range 0000..0777 (0..511) - -The "umask" value to use when setting the file creation mode on files and -folders. - -Folders and executables are given a mode which is `0o777` masked against -this value. Other files are given a mode which is `0o666` masked against -this value. - -Note that the underlying system will _also_ apply its own umask value to -files and folders that are created, and npm does not circumvent this, but -rather adds the `--umask` config to it. - -Thus, the effective default umask value on most POSIX systems is 0o22, -meaning that folders and executables are created with a mode of 0o755 and -other files are created with a mode of 0o644. - - - -#### `unicode` - -* Default: false on windows, true on mac/unix systems with a unicode locale, - as defined by the `LC_ALL`, `LC_CTYPE`, or `LANG` environment variables. -* Type: Boolean - -When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs. - - - -#### `update-notifier` - -* Default: true -* Type: Boolean - -Set to false to suppress the update notification when using an older version -of npm than the latest. - - - -#### `usage` - -* Default: false -* Type: Boolean - -Show short usage output about the command specified. - - - -#### `user-agent` - -* Default: "npm/{npm-version} node/{node-version} {platform} {arch} - workspaces/{workspaces} {ci}" -* Type: String - -Sets the User-Agent request header. The following fields are replaced with -their actual counterparts: - -* `{npm-version}` - The npm version in use -* `{node-version}` - The Node.js version in use -* `{platform}` - The value of `process.platform` -* `{arch}` - The value of `process.arch` -* `{workspaces}` - Set to `true` if the `workspaces` or `workspace` options - are set. -* `{ci}` - The value of the `ci-name` config, if set, prefixed with `ci/`, or - an empty string if `ci-name` is empty. - - - -#### `userconfig` - -* Default: "~/.npmrc" -* Type: Path - -The location of user-level configuration settings. - -This may be overridden by the `npm_config_userconfig` environment variable -or the `--userconfig` command line option, but may _not_ be overridden by -settings in the `globalconfig` file. - - - -#### `version` - -* Default: false -* Type: Boolean - -If true, output the npm version and exit successfully. - -Only relevant when specified explicitly on the command line. - - - -#### `versions` - -* Default: false -* Type: Boolean - -If true, output the npm version as well as node's `process.versions` map and -the version in the current working directory's `package.json` file if one -exists, and exit successfully. - -Only relevant when specified explicitly on the command line. - - - -#### `viewer` - -* Default: "man" on Posix, "browser" on Windows -* Type: String - -The program to use to view help content. - -Set to `"browser"` to view html help content in the default web browser. - - - -#### `which` - -* Default: null -* Type: null or Number - -If there are multiple funding sources, which 1-indexed source URL to open. - - - -#### `workspace` - -* Default: -* Type: String (can be set multiple times) - -Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option. - -Valid values for the `workspace` config are either: - -* Workspace names -* Path to a workspace directory -* Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - -When set for the `npm init` command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project. - -This value is not exported to the environment for child processes. - -#### `workspaces` - -* Default: null -* Type: null or Boolean - -Set to true to run the command in the context of **all** configured -workspaces. - -Explicitly setting this to false will cause commands like `install` to -ignore workspaces altogether. When not set explicitly: - -- Commands that operate on the `node_modules` tree (install, update, etc.) -will link workspaces into the `node_modules` folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -_unless_ one or more workspaces are specified in the `workspace` config. - -This value is not exported to the environment for child processes. - -#### `workspaces-update` - -* Default: true -* Type: Boolean - -If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the `node_modules` folder. - - - -#### `yes` - -* Default: null -* Type: null or Boolean - -Automatically answer "yes" to any prompts that npm might print on the -command line. - - - -#### `also` - -* Default: null -* Type: null, "dev", or "development" -* DEPRECATED: Please use --include=dev instead. - -When set to `dev` or `development`, this is an alias for `--include=dev`. - - - -#### `cache-max` - -* Default: Infinity -* Type: Number -* DEPRECATED: This option has been deprecated in favor of `--prefer-online` - -`--cache-max=0` is an alias for `--prefer-online` - - - -#### `cache-min` - -* Default: 0 -* Type: Number -* DEPRECATED: This option has been deprecated in favor of `--prefer-offline`. - -`--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`. - - - -#### `cert` - -* Default: null -* Type: null or String -* DEPRECATED: `key` and `cert` are no longer used for most registry - operations. Use registry scoped `keyfile` and `certfile` instead. Example: - //other-registry.tld/:keyfile=/path/to/key.pem - //other-registry.tld/:certfile=/path/to/cert.crt - -A client certificate to pass when accessing the registry. Values should be -in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with -newlines replaced by the string "\n". For example: - -```ini -cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" -``` - -It is _not_ the path to a certificate file, though you can set a -registry-scoped "certfile" path like -"//other-registry.tld/:certfile=/path/to/cert.pem". - - - -#### `dev` - -* Default: false -* Type: Boolean -* DEPRECATED: Please use --include=dev instead. - -Alias for `--include=dev`. - - - -#### `global-style` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=shallow` - -Only install direct dependencies in the top level `node_modules`, but hoist -on deeper dependencies. Sets `--install-strategy=shallow`. - - - -#### `init.author.email` - -* Default: "" -* Type: String -* DEPRECATED: Use `--init-author-email` instead. - -Alias for `--init-author-email` - - - -#### `init.author.name` - -* Default: "" -* Type: String -* DEPRECATED: Use `--init-author-name` instead. - -Alias for `--init-author-name` - - - -#### `init.author.url` - -* Default: "" -* Type: "" or URL -* DEPRECATED: Use `--init-author-url` instead. - -Alias for `--init-author-url` - - - -#### `init.license` - -* Default: "ISC" -* Type: String -* DEPRECATED: Use `--init-license` instead. - -Alias for `--init-license` - - - -#### `init.module` - -* Default: "~/.npm-init.js" -* Type: Path -* DEPRECATED: Use `--init-module` instead. - -Alias for `--init-module` - - - -#### `init.version` - -* Default: "1.0.0" -* Type: SemVer string -* DEPRECATED: Use `--init-version` instead. - -Alias for `--init-version` - - - -#### `key` - -* Default: null -* Type: null or String -* DEPRECATED: `key` and `cert` are no longer used for most registry - operations. Use registry scoped `keyfile` and `certfile` instead. Example: - //other-registry.tld/:keyfile=/path/to/key.pem - //other-registry.tld/:certfile=/path/to/cert.crt - -A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\n". For example: - -```ini -key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----" -``` - -It is _not_ the path to a key file, though you can set a registry-scoped -"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". - - - -#### `legacy-bundling` - -* Default: false -* Type: Boolean -* DEPRECATED: This option has been deprecated in favor of - `--install-strategy=nested` - -Instead of hoisting package installs in `node_modules`, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets `--install-strategy=nested`. - - - -#### `only` - -* Default: null -* Type: null, "prod", or "production" -* DEPRECATED: Use `--omit=dev` to omit dev dependencies from the install. - -When set to `prod` or `production`, this is an alias for `--omit=dev`. - - - -#### `optional` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use `--omit=optional` to exclude optional dependencies, or - `--include=optional` to include them. - -Default value does install optional deps unless otherwise omitted. - -Alias for --include=optional or --omit=optional - - - -#### `production` - -* Default: null -* Type: null or Boolean -* DEPRECATED: Use `--omit=dev` instead. - -Alias for `--omit=dev` - - - -#### `shrinkwrap` - -* Default: true -* Type: Boolean -* DEPRECATED: Use the --package-lock setting instead. - -Alias for --package-lock - - - -### See also - -* [npm config](/commands/npm-config) -* [npmrc](/configuring-npm/npmrc) -* [npm scripts](/using-npm/scripts) -* [npm folders](/configuring-npm/folders) -* [npm](/commands/npm) diff --git a/node_modules/npm/docs/content/using-npm/dependency-selectors.md b/node_modules/npm/docs/content/using-npm/dependency-selectors.md deleted file mode 100644 index 5cedf8f..0000000 --- a/node_modules/npm/docs/content/using-npm/dependency-selectors.md +++ /dev/null @@ -1,207 +0,0 @@ ---- -title: Dependency Selector Syntax & Querying -section: 7 -description: Dependency Selector Syntax & Querying ---- - -### Description - -The [`npm query`](/commands/npm-query) command exposes a new dependency selector syntax (informed by & respecting many aspects of the [CSS Selectors 4 Spec](https://dev.w3.org/csswg/selectors4/#relational)) which: - -- Standardizes the shape of, & querying of, dependency graphs with a robust object model, metadata & selector syntax -- Leverages existing, known language syntax & operators from CSS to make disparate package information broadly accessible -- Unlocks the ability to answer complex, multi-faceted questions about dependencies, their relationships & associative metadata -- Consolidates redundant logic of similar query commands in `npm` (ex. `npm fund`, `npm ls`, `npm outdated`, `npm audit` ...) - -### Dependency Selector Syntax `v1.0.0` - -#### Overview: - -- there is no "type" or "tag" selectors (ex. `div, h1, a`) as a dependency/target is the only type of `Node` that can be queried -- the term "dependencies" is in reference to any `Node` found in a `tree` returned by `Arborist` - -#### Combinators - -- `>` direct descendant/child -- ` ` any descendant/child -- `~` sibling - -#### Selectors - -- `*` universal selector -- `#` dependency selector (equivalent to `[name="..."]`) -- `#@` (equivalent to `[name=]:semver()`) -- `,` selector list delimiter -- `.` dependency type selector -- `:` pseudo selector - -#### Dependency Type Selectors - -- `.prod` dependency found in the `dependencies` section of `package.json`, or is a child of said dependency -- `.dev` dependency found in the `devDependencies` section of `package.json`, or is a child of said dependency -- `.optional` dependency found in the `optionalDependencies` section of `package.json`, or has `"optional": true` set in its entry in the `peerDependenciesMeta` section of `package.json`, or a child of said dependency -- `.peer` dependency found in the `peerDependencies` section of `package.json` -- `.workspace` dependency found in the [`workspaces`](https://docs.npmjs.com/cli/v8/using-npm/workspaces) section of `package.json` -- `.bundled` dependency found in the `bundleDependencies` section of `package.json`, or is a child of said dependency - -#### Pseudo Selectors -- [`:not()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:not) -- [`:has()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:has) -- [`:is()`](https://developer.mozilla.org/en-US/docs/Web/CSS/:is) -- [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) matches the root node/dependency -- [`:scope`](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) matches node/dependency it was queried against -- [`:empty`](https://developer.mozilla.org/en-US/docs/Web/CSS/:empty) when a dependency has no dependencies -- [`:private`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#private) when a dependency is private -- `:link` when a dependency is linked (for instance, workspaces or packages manually [`linked`](https://docs.npmjs.com/cli/v8/commands/npm-link) -- `:deduped` when a dependency has been deduped (note that this does *not* always mean the dependency has been hoisted to the root of node_modules) -- `:overridden` when a dependency has been overridden -- `:extraneous` when a dependency exists but is not defined as a dependency of any node -- `:invalid` when a dependency version is out of its ancestors specified range -- `:missing` when a dependency is not found on disk -- `:semver(, [selector], [function])` match a valid [`node-semver`](https://github.com/npm/node-semver) version or range to a selector -- `:path()` [glob](https://www.npmjs.com/package/glob) matching based on dependencies path relative to the project -- `:type()` [based on currently recognized types](https://github.com/npm/npm-package-arg#result-object) -- `:outdated()` when a dependency is outdated - -##### `:semver(, [selector], [function])` - -The `:semver()` pseudo selector allows comparing fields from each node's `package.json` using [semver](https://github.com/npm/node-semver#readme) methods. It accepts up to 3 parameters, all but the first of which are optional. - -- `spec` a semver version or range -- `selector` an attribute selector for each node (default `[version]`) -- `function` a semver method to apply, one of: `satisfies`, `intersects`, `subset`, `gt`, `gte`, `gtr`, `lt`, `lte`, `ltr`, `eq`, `neq` or the special function `infer` (default `infer`) - -When the special `infer` function is used the `spec` and the actual value from the node are compared. If both are versions, according to `semver.valid()`, `eq` is used. If both values are ranges, according to `!semver.valid()`, `intersects` is used. If the values are mixed types `satisfies` is used. - -Some examples: - -- `:semver(^1.0.0)` returns every node that has a `version` satisfied by the provided range `^1.0.0` -- `:semver(16.0.0, :attr(engines, [node]))` returns every node which has an `engines.node` property satisfying the version `16.0.0` -- `:semver(1.0.0, [version], lt)` every node with a `version` less than `1.0.0` - -##### `:outdated()` - -The `:outdated` pseudo selector retrieves data from the registry and returns information about which of your dependencies are outdated. The type parameter may be one of the following: - -- `any` (default) a version exists that is greater than the current one -- `in-range` a version exists that is greater than the current one, and satisfies at least one if its dependents -- `out-of-range` a version exists that is greater than the current one, does not satisfy at least one of its dependents -- `major` a version exists that is a semver major greater than the current one -- `minor` a version exists that is a semver minor greater than the current one -- `patch` a version exists that is a semver patch greater than the current one - -In addition to the filtering performed by the pseudo selector, some extra data is added to the resulting objects. The following data can be found under the `queryContext` property of each node. - -- `versions` an array of every available version of the given node -- `outdated.inRange` an array of objects, each with a `from` and `versions`, where `from` is the on-disk location of the node that depends on the current node and `versions` is an array of all available versions that satisfies that dependency. This is only populated if `:outdated(in-range)` is used. -- `outdated.outOfRange` an array of objects, identical in shape to `inRange`, but where the `versions` array is every available version that does not satisfy the dependency. This is only populated if `:outdated(out-of-range)` is used. - -Some examples: - -- `:root > :outdated(major)` returns every direct dependency that has a new semver major release -- `.prod:outdated(in-range)` returns production dependencies that have a new release that satisfies at least one of its edges in - -#### [Attribute Selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) - -The attribute selector evaluates the key/value pairs in `package.json` if they are `String`s. - -- `[]` attribute selector (ie. existence of attribute) -- `[attribute=value]` attribute value is equivalant... -- `[attribute~=value]` attribute value contains word... -- `[attribute*=value]` attribute value contains string... -- `[attribute|=value]` attribute value is equal to or starts with... -- `[attribute^=value]` attribute value starts with... -- `[attribute$=value]` attribute value ends with... - -#### `Array` & `Object` Attribute Selectors - -The generic `:attr()` pseudo selector standardizes a pattern which can be used for attribute selection of `Object`s, `Array`s or `Arrays` of `Object`s accessible via `Arborist`'s `Node.package` metadata. This allows for iterative attribute selection beyond top-level `String` evaluation. The last argument passed to `:attr()` must be an `attribute` selector or a nested `:attr()`. See examples below: - -#### `Objects` - -```css -/* return dependencies that have a `scripts.test` containing `"tap"` */ -*:attr(scripts, [test~=tap]) -``` - -#### Nested `Objects` - -Nested objects are expressed as sequential arguments to `:attr()`. - -```css -/* return dependencies that have a testling config for opera browsers */ -*:attr(testling, browsers, [~=opera]) -``` - -#### `Arrays` - -`Array`s specifically uses a special/reserved `.` character in place of a typical attribute name. `Arrays` also support exact `value` matching when a `String` is passed to the selector. - -##### Example of an `Array` Attribute Selection: -```css -/* removes the distinction between properties & arrays */ -/* ie. we'd have to check the property & iterate to match selection */ -*:attr([keywords^=react]) -*:attr(contributors, :attr([name~=Jordan])) -``` - -##### Example of an `Array` matching directly to a value: -```css -/* return dependencies that have the exact keyword "react" */ -/* this is equivalent to `*:keywords([value="react"])` */ -*:attr([keywords=react]) -``` - -##### Example of an `Array` of `Object`s: -```css -/* returns */ -*:attr(contributors, [email=ruyadorno@github.com]) -``` - -### Groups - -Dependency groups are defined by the package relationships to their ancestors (ie. the dependency types that are defined in `package.json`). This approach is user-centric as the ecosystem has been taught to think about dependencies in these groups first-and-foremost. Dependencies are allowed to be included in multiple groups (ex. a `prod` dependency may also be a `dev` dependency (in that it's also required by another `dev` dependency) & may also be `bundled` - a selector for that type of dependency would look like: `*.prod.dev.bundled`). - -- `.prod` -- `.dev` -- `.optional` -- `.peer` -- `.bundled` -- `.workspace` - -Please note that currently `workspace` deps are always `prod` dependencies. Additionally the `.root` dependency is also considered a `prod` dependency. - -### Programmatic Usage - -- `Arborist`'s `Node` Class has a `.querySelectorAll()` method - - this method will return a filtered, flattened dependency Arborist `Node` list based on a valid query selector - -```js -const Arborist = require('@npmcli/arborist') -const arb = new Arborist({}) -``` - -```js -// root-level -arb.loadActual().then(async (tree) => { - // query all production dependencies - const results = await tree.querySelectorAll('.prod') - console.log(results) -}) -``` - -```js -// iterative -arb.loadActual().then(async (tree) => { - // query for the deduped version of react - const results = await tree.querySelectorAll('#react:not(:deduped)') - // query the deduped react for git deps - const deps = await results[0].querySelectorAll(':type(git)') - console.log(deps) -}) -``` - -## See Also - -* [npm query](/commands/npm-query) -* [@npmcli/arborist](https://npm.im/@npmcli/arborist) diff --git a/node_modules/npm/docs/content/using-npm/developers.md b/node_modules/npm/docs/content/using-npm/developers.md deleted file mode 100644 index 5fc2e58..0000000 --- a/node_modules/npm/docs/content/using-npm/developers.md +++ /dev/null @@ -1,245 +0,0 @@ ---- -title: developers -section: 7 -description: Developer Guide ---- - -### Description - -So, you've decided to use npm to develop (and maybe publish/deploy) -your project. - -Fantastic! - -There are a few things that you need to do above the simple steps -that your users will do to install your program. - -### About These Documents - -These are man pages. If you install npm, you should be able to -then do `man npm-thing` to get the documentation on a particular -topic, or `npm help thing` to see the same information. - -### What is a Package - -A package is: - -* a) a folder containing a program described by a package.json file -* b) a gzipped tarball containing (a) -* c) a url that resolves to (b) -* d) a `@` that is published on the registry with (c) -* e) a `@` that points to (d) -* f) a `` that has a "latest" tag satisfying (e) -* g) a `git` url that, when cloned, results in (a). - -Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b). - -Git urls can be of the form: - -```bash -git://github.com/user/project.git#commit-ish -git+ssh://user@hostname:project.git#commit-ish -git+http://user@hostname/project/blah.git#commit-ish -git+https://user@hostname/project/blah.git#commit-ish -``` - -The `commit-ish` can be any tag, sha, or branch which can be supplied as -an argument to `git checkout`. The default is whatever the repository uses -as its default branch. - -### The package.json File - -You need to have a `package.json` file in the root of your project to do -much of anything with npm. That is basically the whole interface. - -See [`package.json`](/configuring-npm/package-json) for details about what -goes in that file. At the very least, you need: - -* name: This should be a string that identifies your project. Please do - not use the name to specify that it runs on node, or is in JavaScript. - You can use the "engines" field to explicitly state the versions of node - (or whatever else) that your program requires, and it's pretty well - assumed that it's JavaScript. - - It does not necessarily need to match your github repository name. - - So, `node-foo` and `bar-js` are bad names. `foo` or `bar` are better. - -* version: A semver-compatible version. - -* engines: Specify the versions of node (or whatever else) that your - program runs on. The node API changes a lot, and there may be bugs or - new functionality that you depend on. Be explicit. - -* author: Take some credit. - -* scripts: If you have a special compilation or installation script, then - you should put it in the `scripts` object. You should definitely have at - least a basic smoke-test command as the "scripts.test" field. See - [scripts](/using-npm/scripts). - -* main: If you have a single module that serves as the entry point to your - program (like what the "foo" package gives you at require("foo")), then - you need to specify that in the "main" field. - -* directories: This is an object mapping names to folders. The best ones - to include are "lib" and "doc", but if you use "man" to specify a folder - full of man pages, they'll get installed just like these ones. - -You can use `npm init` in the root of your package in order to get you -started with a pretty basic package.json file. See [`npm -init`](/commands/npm-init) for more info. - -### Keeping files *out* of your Package - -Use a `.npmignore` file to keep stuff out of your package. If there's no -`.npmignore` file, but there *is* a `.gitignore` file, then npm will ignore -the stuff matched by the `.gitignore` file. If you *want* to include -something that is excluded by your `.gitignore` file, you can create an -empty `.npmignore` file to override it. Like `git`, `npm` looks for -`.npmignore` and `.gitignore` files in all subdirectories of your package, -not only the root directory. - -`.npmignore` files follow the [same pattern -rules](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring) -as `.gitignore` files: - -* Blank lines or lines starting with `#` are ignored. -* Standard glob patterns work. -* You can end patterns with a forward slash `/` to specify a directory. -* You can negate a pattern by starting it with an exclamation point `!`. - -By default, the following paths and files are ignored, so there's no -need to add them to `.npmignore` explicitly: - -* `.*.swp` -* `._*` -* `.DS_Store` -* `.git` -* `.gitignore` -* `.hg` -* `.npmignore` -* `.npmrc` -* `.lock-wscript` -* `.svn` -* `.wafpickle-*` -* `config.gypi` -* `CVS` -* `npm-debug.log` - -Additionally, everything in `node_modules` is ignored, except for -bundled dependencies. npm automatically handles this for you, so don't -bother adding `node_modules` to `.npmignore`. - -The following paths and files are never ignored, so adding them to -`.npmignore` is pointless: - -* `package.json` -* `README` (and its variants) -* `CHANGELOG` (and its variants) -* `LICENSE` / `LICENCE` - -If, given the structure of your project, you find `.npmignore` to be a -maintenance headache, you might instead try populating the `files` -property of `package.json`, which is an array of file or directory names -that should be included in your package. Sometimes manually picking -which items to allow is easier to manage than building a block list. - -#### Testing whether your `.npmignore` or `files` config works - -If you want to double check that your package will include only the files -you intend it to when published, you can run the `npm pack` command locally -which will generate a tarball in the working directory, the same way it -does for publishing. - -### Link Packages - -`npm link` is designed to install a development package and see the -changes in real time without having to keep re-installing it. (You do -need to either re-link or `npm rebuild -g` to update compiled packages, -of course.) - -More info at [`npm link`](/commands/npm-link). - -### Before Publishing: Make Sure Your Package Installs and Works - -**This is important.** - -If you can not install it locally, you'll have -problems trying to publish it. Or, worse yet, you'll be able to -publish it, but you'll be publishing a broken or pointless package. -So don't do that. - -In the root of your package, do this: - -```bash -npm install . -g -``` - -That'll show you that it's working. If you'd rather just create a symlink -package that points to your working directory, then do this: - -```bash -npm link -``` - -Use `npm ls -g` to see if it's there. - -To test a local install, go into some other folder, and then do: - -```bash -cd ../some-other-folder -npm install ../my-package -``` - -to install it locally into the node_modules folder in that other place. - -Then go into the node-repl, and try using require("my-thing") to -bring in your module's main module. - -### Create a User Account - -Create a user with the adduser command. It works like this: - -```bash -npm adduser -``` - -and then follow the prompts. - -This is documented better in [npm adduser](/commands/npm-adduser). - -### Publish your Package - -This part's easy. In the root of your folder, do this: - -```bash -npm publish -``` - -You can give publish a url to a tarball, or a filename of a tarball, -or a path to a folder. - -Note that pretty much **everything in that folder will be exposed** -by default. So, if you have secret stuff in there, use a -`.npmignore` file to list out the globs to ignore, or publish -from a fresh checkout. - -### Brag about it - -Send emails, write blogs, blab in IRC. - -Tell the world how easy it is to install your program! - -### See also - -* [npm](/commands/npm) -* [npm init](/commands/npm-init) -* [package.json](/configuring-npm/package-json) -* [npm scripts](/using-npm/scripts) -* [npm publish](/commands/npm-publish) -* [npm adduser](/commands/npm-adduser) -* [npm registry](/using-npm/registry) diff --git a/node_modules/npm/docs/content/using-npm/logging.md b/node_modules/npm/docs/content/using-npm/logging.md deleted file mode 100644 index 4470d5d..0000000 --- a/node_modules/npm/docs/content/using-npm/logging.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Logging -section: 7 -description: Why, What & How We Log ---- - -### Description - -The `npm` CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments. - -### Setting Log File Location - -All logs are written to a debug log, with the path to that file printed if the execution of a command fails. - -The default location of the logs directory is a directory named `_logs` inside the npm cache. This can be changed with the `logs-dir` config option. - -For example, if you wanted to write all your logs to the current working directory, you could run: `npm install --logs-dir=.`. This is especially helpful in debugging a specific `npm` issue as you can run -a command multiple times with different config values and then diff all the log files. - -Log files will be removed from the `logs-dir` when the number of log files exceeds `logs-max`, with the oldest logs being deleted first. - -To turn off logs completely set `--logs-max=0`. - -### Setting Log Levels - -#### `loglevel` - -`loglevel` is a global argument/config that can be set to determine the type of information to be displayed. - -The default value of `loglevel` is `"notice"` but there are several levels/types of logs available, including: - -- `"silent"` -- `"error"` -- `"warn"` -- `"notice"` -- `"http"` -- `"info"` -- `"verbose"` -- `"silly"` - -All logs pertaining to a level proceeding the current setting will be shown. - -##### Aliases - -The log levels listed above have various corresponding aliases, including: - -- `-d`: `--loglevel info` -- `--dd`: `--loglevel verbose` -- `--verbose`: `--loglevel verbose` -- `--ddd`: `--loglevel silly` -- `-q`: `--loglevel warn` -- `--quiet`: `--loglevel warn` -- `-s`: `--loglevel silent` -- `--silent`: `--loglevel silent` - -#### `foreground-scripts` - -The `npm` CLI began hiding the output of lifecycle scripts for `npm install` as of `v7`. Notably, this means you will not see logs/output from packages that may be using "install scripts" to display information back to you or from your own project's scripts defined in `package.json`. If you'd like to change this behavior & log this output you can set `foreground-scripts` to `true`. - -### Timing Information - -The [`--timing` config](/using-npm/config#timing) can be set which does a few -things: - -1. Always shows the full path to the debug log regardless of command exit status -1. Write timing information to a process specific timing file in the cache or `logs-dir` -1. Output timing information to the terminal - -This file contains a `timers` object where the keys are an identifier for the -portion of the process being timed and the value is the number of milliseconds it took to complete. - -Sometimes it is helpful to get timing information without outputting anything to the terminal. For -example, the performance might be affected by writing to the terminal. In this case you can use -`--timing --silent` which will still write the timing file, but not output anything to the terminal -while running. - -### Registry Response Headers - -#### `npm-notice` - -The `npm` CLI reads from & logs any `npm-notice` headers that are returned from the configured registry. This mechanism can be used by third-party registries to provide useful information when network-dependent requests occur. - -This header is not cached, and will not be logged if the request is served from the cache. - -### Logs and Sensitive Information - -The `npm` CLI makes a best effort to redact the following from terminal output and log files: - -- Passwords inside basic auth URLs -- npm tokens - -However, this behavior should not be relied on to keep all possible sensitive information redacted. If you are concerned about secrets in your log file or terminal output, you can use `--loglevel=silent` and `--logs-max=0` to ensure no logs are written to your terminal or filesystem. - -### See also - -* [config](/using-npm/config) diff --git a/node_modules/npm/docs/content/using-npm/orgs.md b/node_modules/npm/docs/content/using-npm/orgs.md deleted file mode 100644 index 5fe9ac6..0000000 --- a/node_modules/npm/docs/content/using-npm/orgs.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: orgs -section: 7 -description: Working with Teams & Orgs ---- - -### Description - -There are three levels of org users: - -1. Super admin, controls billing & adding people to the org. -2. Team admin, manages team membership & package access. -3. Developer, works on packages they are given access to. - -The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a `developers` team that all users are automatically added to. - -The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals. - -The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only. - -There are two main commands: - -1. `npm team` see [npm team](/commands/npm-team) for more details -2. `npm access` see [npm access](/commands/npm-access) for more details - -### Team Admins create teams - -* Check who you’ve added to your org: - -```bash -npm team ls :developers -``` - -* Each org is automatically given a `developers` team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the `access` command. - -* Create a new team: - -```bash -npm team create -``` - -* Add members to that team: - -```bash -npm team add -``` - -### Publish a package and adjust package access - -* In package directory, run - -```bash -npm init --scope= -``` -to scope it for your org & publish as usual - -* Grant access: - -```bash -npm access grant [] -``` - -* Revoke access: - -```bash -npm access revoke [] -``` - -### Monitor your package access - -* See what org packages a team member can access: - -```bash -npm access ls-packages -``` - -* See packages available to a specific team: - -```bash -npm access ls-packages -``` - -* Check which teams are collaborating on a package: - -```bash -npm access ls-collaborators -``` - -### See also - -* [npm team](/commands/npm-team) -* [npm access](/commands/npm-access) -* [npm scope](/using-npm/scope) diff --git a/node_modules/npm/docs/content/using-npm/package-spec.md b/node_modules/npm/docs/content/using-npm/package-spec.md deleted file mode 100644 index f7844d1..0000000 --- a/node_modules/npm/docs/content/using-npm/package-spec.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: package-spec -section: 7 -description: Package name specifier ---- - -### Description - -Commands like `npm install` and the dependency sections in the -`package.json` use a package name specifier. This can be many different -things that all refer to a "package". Examples include a package name, -git url, tarball, or local directory. These will generally be referred -to as `` in the help output for the npm commands that use -this package name specifier. - -### Package name - -* `[<@scope>/]` -* `[<@scope>/]@` -* `[<@scope>/]@` -* `[<@scope>/]@` - -Refers to a package by name, with or without a scope, and optionally -tag, version, or version range. This is typically used in combination -with the [registry](/using-npm/config#registry) config to refer to a -package in a registry. - -Examples: -* `npm` -* `@npmcli/arborist` -* `@npmcli/arborist@latest` -* `npm@6.13.1` -* `npm@^4.0.0` - -### Aliases - -* `@npm:` - -Primarily used by commands like `npm install` and in the dependency -sections in the `package.json`, this refers to a package by an alias. -The `` is the name of the package as it is reified in the -`node_modules` folder, and the `` refers to a package name as -found in the configured registry. - -See `Package name` above for more info on referring to a package by -name, and [registry](/using-npm/config#registry) for configuring which -registry is used when referring to a package by name. - -Examples: -* `semver:@npm:@npmcli/semver-with-patch` -* `semver:@npm:semver@7.2.2` -* `semver:@npm:semver@legacy` - -### Folders - -* `` - -This refers to a package on the local filesystem. Specifically this is -a folder with a `package.json` file in it. This *should* always be -prefixed with a `/` or `./` (or your OS equivalent) to reduce confusion. -npm currently will parse a string with more than one `/` in it as a -folder, but this is legacy behavior that may be removed in a future -version. - -Examples: - -* `./my-package` -* `/opt/npm/my-package` - -### Tarballs - -* `` -* `` - -Examples: - -* `./my-package.tgz` -* `https://registry.npmjs.org/semver/-/semver-1.0.0.tgz` - -Refers to a package in a tarball format, either on the local filesystem -or remotely via url. This is the format that packages exist in when -uploaded to a registry. - -### git urls - -* `` -* `/` - -Refers to a package in a git repo. This can be a full git url, git -shorthand, or a username/package on GitHub. You can specify a -git tag, branch, or other git ref by appending `#ref`. - -Examples: - -* `https://github.com/npm/cli.git` -* `git@github.com:npm/cli.git` -* `git+ssh://git@github.com/npm/cli#v6.0.0` -* `github:npm/cli#HEAD` -* `npm/cli#c12ea07` - -### See also - -* [npm-package-arg](https://npm.im/npm-package-arg) -* [scope](/using-npm/scope) -* [config](/using-npm/config) diff --git a/node_modules/npm/docs/content/using-npm/registry.md b/node_modules/npm/docs/content/using-npm/registry.md deleted file mode 100644 index 035ede5..0000000 --- a/node_modules/npm/docs/content/using-npm/registry.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: registry -section: 7 -description: The JavaScript Package Registry ---- - -### Description - -To resolve packages by name and version, npm talks to a registry website -that implements the CommonJS Package Registry specification for reading -package info. - -npm is configured to use the **npm public registry** at - by default. Use of the npm public registry is -subject to terms of use available at . - -You can configure npm to use any compatible registry you like, and even run -your own registry. Use of someone else's registry may be governed by their -terms of use. - -npm's package registry implementation supports several -write APIs as well, to allow for publishing packages and managing user -account information. - -The npm public registry is powered by a CouchDB database, -of which there is a public mirror at . - -The registry URL used is determined by the scope of the package (see -[`scope`](/using-npm/scope). If no scope is specified, the default registry is -used, which is supplied by the [`registry` config](/using-npm/config#registry) -parameter. See [`npm config`](/commands/npm-config), -[`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on -managing npm's configuration. -Authentication configuration such as auth tokens and certificates are configured -specifically scoped to an individual registry. See -[Auth Related Configuration](/configuring-npm/npmrc#auth-related-configuration) - -When the default registry is used in a package-lock or shrinkwrap it has the -special meaning of "the currently configured registry". If you create a lock -file while using the default registry you can switch to another registry and -npm will install packages from the new registry, but if you create a lock -file while using a custom registry packages will be installed from that -registry even after you change to another registry. - -### Does npm send any information about me back to the registry? - -Yes. - -When making requests of the registry npm adds two headers with information -about your environment: - -* `Npm-Scope` – If your project is scoped, this header will contain its - scope. In the future npm hopes to build registry features that use this - information to allow you to customize your experience for your - organization. -* `Npm-In-CI` – Set to "true" if npm believes this install is running in a - continuous integration environment, "false" otherwise. This is detected by - looking for the following environment variables: `CI`, `TDDIUM`, - `JENKINS_URL`, `bamboo.buildKey`. If you'd like to learn more you may find - the [original PR](https://github.com/npm/npm-registry-client/pull/129) - interesting. - This is used to gather better metrics on how npm is used by humans, versus - build farms. - -The npm registry does not try to correlate the information in these headers -with any authenticated accounts that may be used in the same requests. - -### How can I prevent my package from being published in the official registry? - -Set `"private": true` in your `package.json` to prevent it from being -published at all, or -`"publishConfig":{"registry":"http://my-internal-registry.local"}` -to force it to be published only to your internal/private registry. - -See [`package.json`](/configuring-npm/package-json) for more info on what goes in the package.json file. - -### Where can I find my (and others') published packages? - - - -### See also - -* [npm config](/commands/npm-config) -* [config](/using-npm/config) -* [npmrc](/configuring-npm/npmrc) -* [npm developers](/using-npm/developers) diff --git a/node_modules/npm/docs/content/using-npm/removal.md b/node_modules/npm/docs/content/using-npm/removal.md deleted file mode 100644 index 25dbb80..0000000 --- a/node_modules/npm/docs/content/using-npm/removal.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: removal -section: 7 -description: Cleaning the Slate ---- - -### Synopsis - -So sad to see you go. - -```bash -sudo npm uninstall npm -g -``` - -Or, if that fails, get the npm source code, and do: - -```bash -sudo make uninstall -``` - -### More Severe Uninstalling - -Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed. - -If that doesn't work, or if you require more drastic measures, -continue reading. - -Note that this is only necessary for globally-installed packages. Local -installs are completely contained within a project's `node_modules` -folder. Delete that folder, and everything is gone unless a package's -install script is particularly ill-behaved. - -This assumes that you installed node and npm in the default place. If -you configured node with a different `--prefix`, or installed npm with a -different prefix setting, then adjust the paths accordingly, replacing -`/usr/local` with your install prefix. - -To remove everything npm-related manually: - -```bash -rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm* -``` - -If you installed things *with* npm, then your best bet is to uninstall -them with npm first, and then install them again once you have a -proper install. This can help find any symlinks that are lying -around: - -```bash -ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm -``` - -Prior to version 0.3, npm used shim files for executables and node -modules. To track those down, you can do the following: - -```bash -find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ; -``` - -### See also - -* [npm uninstall](/commands/npm-uninstall) -* [npm prune](/commands/npm-prune) diff --git a/node_modules/npm/docs/content/using-npm/scope.md b/node_modules/npm/docs/content/using-npm/scope.md deleted file mode 100644 index 829e6cc..0000000 --- a/node_modules/npm/docs/content/using-npm/scope.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: scope -section: 7 -description: Scoped packages ---- - -### Description - -All npm packages have a name. Some package names also have a scope. A scope -follows the usual rules for package names (URL-safe characters, no leading dots -or underscores). When used in package names, scopes are preceded by an `@` symbol -and followed by a slash, e.g. - -```bash -@somescope/somepackagename -``` - -Scopes are a way of grouping related packages together, and also affect a few -things about the way npm treats the package. - -Each npm user/organization has their own scope, and only you can add packages -in your scope. This means you don't have to worry about someone taking your -package name ahead of you. Thus it is also a good way to signal official packages -for organizations. - -Scoped packages can be published and installed as of `npm@2` and are supported -by the primary npm registry. Unscoped packages can depend on scoped packages and -vice versa. The npm client is backwards-compatible with unscoped registries, -so it can be used to work with scoped and unscoped registries at the same time. - -### Installing scoped packages - -Scoped packages are installed to a sub-folder of the regular installation -folder, e.g. if your other packages are installed in `node_modules/packagename`, -scoped modules will be installed in `node_modules/@myorg/packagename`. The scope -folder (`@myorg`) is simply the name of the scope preceded by an `@` symbol, and can -contain any number of scoped packages. - -A scoped package is installed by referencing it by name, preceded by an -`@` symbol, in `npm install`: - -```bash -npm install @myorg/mypackage -``` - -Or in `package.json`: - -```json -"dependencies": { - "@myorg/mypackage": "^1.3.0" -} -``` - -Note that if the `@` symbol is omitted, in either case, npm will instead attempt to -install from GitHub; see [`npm install`](/commands/npm-install). - -### Requiring scoped packages - -Because scoped packages are installed into a scope folder, you have to -include the name of the scope when requiring them in your code, e.g. - -```javascript -require('@myorg/mypackage') -``` - -There is nothing special about the way Node treats scope folders. This -simply requires the `mypackage` module in the folder named `@myorg`. - -### Publishing scoped packages - -Scoped packages can be published from the CLI as of `npm@2` and can be -published to any registry that supports them, including the primary npm -registry. - -(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry -**does** support scoped packages.) - -If you wish, you may associate a scope with a registry; see below. - -#### Publishing public scoped packages to the primary npm registry - -Publishing to a scope, you have two options: - -- Publishing to your user scope (example: `@username/module`) -- Publishing to an organization scope (example: `@org/module`) - -If publishing a public module to an organization scope, you must -first either create an organization with the name of the scope -that you'd like to publish to or be added to an existing organization -with the appropriate permissions. For example, if you'd like to -publish to `@org`, you would need to create the `org` organization -on npmjs.com prior to trying to publish. - -Scoped packages are not public by default. You will need to specify -`--access public` with the initial `npm publish` command. This will publish -the package and set access to `public` as if you had run `npm access public` -after publishing. You do not need to do this when publishing new versions of -an existing scoped package. - -#### Publishing private scoped packages to the npm registry - -To publish a private scoped package to the npm registry, you must have -an [npm Private Modules](https://docs.npmjs.com/private-modules/intro) -account. - -You can then publish the module with `npm publish` or `npm publish ---access restricted`, and it will be present in the npm registry, with -restricted access. You can then change the access permissions, if -desired, with `npm access` or on the npmjs.com website. - -### Associating a scope with a registry - -Scopes can be associated with a separate registry. This allows you to -seamlessly use a mix of packages from the primary npm registry and one or more -private registries, such as [GitHub Packages](https://github.com/features/packages) or the open source [Verdaccio](https://verdaccio.org) -project. - -You can associate a scope with a registry at login, e.g. - -```bash -npm login --registry=http://reg.example.com --scope=@myco -``` - -Scopes have a many-to-one relationship with registries: one registry can -host multiple scopes, but a scope only ever points to one registry. - -You can also associate a scope with a registry using `npm config`: - -```bash -npm config set @myco:registry http://reg.example.com -``` - -Once a scope is associated with a registry, any `npm install` for a package -with that scope will request packages from that registry instead. Any -`npm publish` for a package name that contains the scope will be published to -that registry instead. - -### See also - -* [npm install](/commands/npm-install) -* [npm publish](/commands/npm-publish) -* [npm access](/commands/npm-access) -* [npm registry](/using-npm/registry) diff --git a/node_modules/npm/docs/content/using-npm/scripts.md b/node_modules/npm/docs/content/using-npm/scripts.md deleted file mode 100644 index 6f1ec42..0000000 --- a/node_modules/npm/docs/content/using-npm/scripts.md +++ /dev/null @@ -1,368 +0,0 @@ ---- -title: scripts -section: 7 -description: How npm handles the "scripts" field ---- - -### Description - -The `"scripts"` property of your `package.json` file supports a number -of built-in scripts and their preset life cycle events as well as -arbitrary scripts. These all can be executed by running -`npm run-script ` or `npm run ` for short. *Pre* and *post* -commands with matching names will be run for those as well (e.g. `premyscript`, -`myscript`, `postmyscript`). Scripts from dependencies can be run with -`npm explore -- npm run `. - -### Pre & Post Scripts - -To create "pre" or "post" scripts for any scripts defined in the -`"scripts"` section of the `package.json`, simply create another script -*with a matching name* and add "pre" or "post" to the beginning of them. - -```json -{ - "scripts": { - "precompress": "{{ executes BEFORE the `compress` script }}", - "compress": "{{ run command to compress files }}", - "postcompress": "{{ executes AFTER `compress` script }}" - } -} -``` - -In this example `npm run compress` would execute these scripts as -described. - -### Life Cycle Scripts - -There are some special life cycle scripts that happen only in certain -situations. These scripts happen in addition to the `pre`, `post`, and -`` scripts. - -* `prepare`, `prepublish`, `prepublishOnly`, `prepack`, `postpack`, `dependencies` - -**prepare** (since `npm@4.0.0`) -* Runs BEFORE the package is packed, i.e. during `npm publish` - and `npm pack` -* Runs on local `npm install` without any arguments -* Runs AFTER `prepublish`, but BEFORE `prepublishOnly` - -* NOTE: If a package being installed through git contains a `prepare` - script, its `dependencies` and `devDependencies` will be installed, and - the prepare script will be run, before the package is packaged and - installed. - -* As of `npm@7` these scripts run in the background. - To see the output, run with: `--foreground-scripts`. - -**prepublish** (DEPRECATED) -* Does not run during `npm publish`, but does run during `npm ci` - and `npm install`. See below for more info. - -**prepublishOnly** -* Runs BEFORE the package is prepared and packed, ONLY on `npm publish`. - -**prepack** -* Runs BEFORE a tarball is packed (on "`npm pack`", "`npm publish`", and when installing a git dependency). -* NOTE: "`npm run pack`" is NOT the same as "`npm pack`". "`npm run pack`" is an arbitrary user defined script name, where as, "`npm pack`" is a CLI defined command. - -**postpack** -* Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally) - -**dependencies** -* Runs AFTER any operations that modify the `node_modules` directory IF changes occurred. -* Does NOT run in global mode - -#### Prepare and Prepublish - -**Deprecation Note: prepublish** - -Since `npm@1.1.71`, the npm CLI has run the `prepublish` script for both `npm publish` and `npm install`, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, [very confusing](https://github.com/npm/npm/issues/10074). As of `npm@4.0.0`, a new event has been introduced, `prepare`, that preserves this existing behavior. A _new_ event, `prepublishOnly` has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on `npm publish` (for instance, running the tests one last time to ensure they're in good shape). - -See for a much lengthier justification, with further reading, for this change. - -**Use Cases** - -If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a `prepublish` script. This includes tasks such as: - -* Compiling CoffeeScript source code into JavaScript. -* Creating minified versions of JavaScript source code. -* Fetching remote resources that your package will use. - -The advantage of doing these things at `prepublish` time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that: - -* You can depend on `coffee-script` as a `devDependency`, and thus - your users don't need to have it installed. -* You don't need to include minifiers in your package, reducing - the size for your users. -* You don't need to rely on your users having `curl` or `wget` or - other system tools on the target machines. - -#### Dependencies - -The `dependencies` script is run any time an `npm` command causes changes to the `node_modules` directory. It is run AFTER the changes have been applied and the `package.json` and `package-lock.json` files have been updated. - -### Life Cycle Operation Order - -#### [`npm cache add`](/commands/npm-cache) - -* `prepare` - -#### [`npm ci`](/commands/npm-ci) - -* `preinstall` -* `install` -* `postinstall` -* `prepublish` -* `preprepare` -* `prepare` -* `postprepare` - - These all run after the actual installation of modules into - `node_modules`, in order, with no internal actions happening in between - -#### [`npm diff`](/commands/npm-diff) - -* `prepare` - -#### [`npm install`](/commands/npm-install) - -These also run when you run `npm install -g ` - -* `preinstall` -* `install` -* `postinstall` -* `prepublish` -* `preprepare` -* `prepare` -* `postprepare` - -If there is a `binding.gyp` file in the root of your package and you -haven't defined your own `install` or `preinstall` scripts, npm will -default the `install` command to compile using node-gyp via `node-gyp -rebuild` - -These are run from the scripts of `` - -#### [`npm pack`](/commands/npm-pack) - -* `prepack` -* `prepare` -* `postpack` - -#### [`npm publish`](/commands/npm-publish) - -* `prepublishOnly` -* `prepack` -* `prepare` -* `postpack` -* `publish` -* `postpublish` - -#### [`npm rebuild`](/commands/npm-rebuild) - -* `preinstall` -* `install` -* `postinstall` -* `prepare` - -`prepare` is only run if the current directory is a symlink (e.g. with -linked packages) - -#### [`npm restart`](/commands/npm-restart) - -If there is a `restart` script defined, these events are run, otherwise -`stop` and `start` are both run if present, including their `pre` and -`post` iterations) - -* `prerestart` -* `restart` -* `postrestart` - -#### [`npm run `](/commands/npm-run-script) - -* `pre` -* `` -* `post` - -#### [`npm start`](/commands/npm-start) - -* `prestart` -* `start` -* `poststart` - -If there is a `server.js` file in the root of your package, then npm -will default the `start` command to `node server.js`. `prestart` and -`poststart` will still run in this case. - -#### [`npm stop`](/commands/npm-stop) - -* `prestop` -* `stop` -* `poststop` - -#### [`npm test`](/commands/npm-test) - -* `pretest` -* `test` -* `posttest` - -#### [`npm version`](/commands/npm-version) - -* `preversion` -* `version` -* `postversion` - -#### A Note on a lack of [`npm uninstall`](/commands/npm-uninstall) scripts - -While npm v6 had `uninstall` lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful. - -Reasons for a package removal include: - -* a user directly uninstalled this package -* a user uninstalled a dependant package and so this dependency is being uninstalled -* a user uninstalled a dependant package but another package also depends on this version -* this version has been merged as a duplicate with another version -* etc. - -Due to the lack of necessary context, `uninstall` lifecycle scripts are not implemented and will not function. - -### User - -When npm is run as root, scripts are always run with the effective uid -and gid of the working directory owner. - -### Environment - -Package scripts run in an environment where many pieces of information -are made available regarding the setup of npm and the current state of -the process. - -#### path - -If you depend on modules that define executable scripts, like test -suites, then those executables will be added to the `PATH` for -executing the scripts. So, if your package.json has this: - -```json -{ - "name" : "foo", - "dependencies" : { - "bar" : "0.1.x" - }, - "scripts": { - "start" : "bar ./test" - } -} -``` - -then you could run `npm start` to execute the `bar` script, which is -exported into the `node_modules/.bin` directory on `npm install`. - -#### package.json vars - -The package.json fields are tacked onto the `npm_package_` prefix. So, -for instance, if you had `{"name":"foo", "version":"1.2.5"}` in your -package.json file, then your package scripts would have the -`npm_package_name` environment variable set to "foo", and the -`npm_package_version` set to "1.2.5". You can access these variables -in your code with `process.env.npm_package_name` and -`process.env.npm_package_version`, and so on for other fields. - -See [`package.json`](/configuring-npm/package-json) for more on package configs. - -#### current lifecycle event - -Lastly, the `npm_lifecycle_event` environment variable is set to -whichever stage of the cycle is being executed. So, you could have a -single script used for different parts of the process which switches -based on what's currently happening. - -Objects are flattened following this format, so if you had -`{"scripts":{"install":"foo.js"}}` in your package.json, then you'd -see this in the script: - -```bash -process.env.npm_package_scripts_install === "foo.js" -``` - -### Examples - -For example, if your package.json contains this: - -```json -{ - "scripts" : { - "install" : "scripts/install.js", - "postinstall" : "scripts/install.js", - "uninstall" : "scripts/uninstall.js" - } -} -``` - -then `scripts/install.js` will be called for the install -and post-install stages of the lifecycle, and `scripts/uninstall.js` -will be called when the package is uninstalled. Since -`scripts/install.js` is running for two different phases, it would -be wise in this case to look at the `npm_lifecycle_event` environment -variable. - -If you want to run a make command, you can do so. This works just -fine: - -```json -{ - "scripts" : { - "preinstall" : "./configure", - "install" : "make && make install", - "test" : "make test" - } -} -``` - -### Exiting - -Scripts are run by passing the line as a script argument to `sh`. - -If the script exits with a code other than 0, then this will abort the -process. - -Note that these script files don't have to be Node.js or even -JavaScript programs. They just have to be some kind of executable -file. - -### Best Practices - -* Don't exit with a non-zero error code unless you *really* mean it. - Except for uninstall scripts, this will cause the npm action to - fail, and potentially be rolled back. If the failure is minor or - only will prevent some optional features, then it's better to just - print a warning and exit successfully. -* Try not to use scripts to do what npm can do for you. Read through - [`package.json`](/configuring-npm/package-json) to see all the things that you can specify and enable - by simply describing your package appropriately. In general, this - will lead to a more robust and consistent state. -* Inspect the env to determine where to put things. For instance, if - the `npm_config_binroot` environment variable is set to `/home/user/bin`, then - don't try to install executables into `/usr/local/bin`. The user - probably set it up that way for a reason. -* Don't prefix your script commands with "sudo". If root permissions - are required for some reason, then it'll fail with that error, and - the user will sudo the npm command in question. -* Don't use `install`. Use a `.gyp` file for compilation, and `prepare` - for anything else. You should almost never have to explicitly set a - preinstall or install script. If you are doing this, please consider if - there is another option. The only valid use of `install` or `preinstall` - scripts is for compilation which must be done on the target architecture. -* Scripts are run from the root of the package folder, regardless of what the - current working directory is when `npm` is invoked. If you want your - script to use different behavior based on what subdirectory you're in, you - can use the `INIT_CWD` environment variable, which holds the full path you - were in when you ran `npm run`. - -### See Also - -* [npm run-script](/commands/npm-run-script) -* [package.json](/configuring-npm/package-json) -* [npm developers](/using-npm/developers) -* [npm install](/commands/npm-install) diff --git a/node_modules/npm/docs/content/using-npm/workspaces.md b/node_modules/npm/docs/content/using-npm/workspaces.md deleted file mode 100644 index bbfa2d8..0000000 --- a/node_modules/npm/docs/content/using-npm/workspaces.md +++ /dev/null @@ -1,226 +0,0 @@ ---- -title: workspaces -section: 7 -description: Working with workspaces ---- - -### Description - -**Workspaces** is a generic term that refers to the set of features in the -npm cli that provides support to managing multiple packages from your local -file system from within a singular top-level, root package. - -This set of features makes up for a much more streamlined workflow handling -linked packages from the local file system. Automating the linking process -as part of `npm install` and avoiding manually having to use `npm link` in -order to add references to packages that should be symlinked into the current -`node_modules` folder. - -We also refer to these packages being auto-symlinked during `npm install` as a -single **workspace**, meaning it's a nested package within the current local -file system that is explicitly defined in the [`package.json`](/configuring-npm/package-json#workspaces) -`workspaces` configuration. - -### Defining workspaces - -Workspaces are usually defined via the `workspaces` property of the -[`package.json`](/configuring-npm/package-json#workspaces) file, e.g: - -```json -{ - "name": "my-workspaces-powered-project", - "workspaces": [ - "packages/a" - ] -} -``` - -Given the above `package.json` example living at a current working -directory `.` that contains a folder named `packages/a` that itself contains -a `package.json` inside it, defining a Node.js package, e.g: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json -``` - -The expected result once running `npm install` in this current working -directory `.` is that the folder `packages/a` will get symlinked to the -`node_modules` folder of the current working dir. - -Below is a post `npm install` example, given that same previous example -structure of files and folders: - -``` -. -+-- node_modules -| `-- a -> ../packages/a -+-- package-lock.json -+-- package.json -`-- packages - +-- a - | `-- package.json -``` - -### Getting started with workspaces - -You may automate the required steps to define a new workspace using -[npm init](/commands/npm-init). For example in a project that already has a -`package.json` defined you can run: - -``` -npm init -w ./packages/a -``` - -This command will create the missing folders and a new `package.json` -file (if needed) while also making sure to properly configure the -`"workspaces"` property of your root project `package.json`. - -### Adding dependencies to a workspace - -It's possible to directly add/remove/update dependencies of your workspaces -using the [`workspace` config](/using-npm/config#workspace). - -For example, assuming the following structure: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- b - `-- package.json -``` - -If you want to add a dependency named `abbrev` from the registry as a -dependency of your workspace **a**, you may use the workspace config to tell -the npm installer that package should be added as a dependency of the provided -workspace: - -``` -npm install abbrev -w a -``` - -Note: other installing commands such as `uninstall`, `ci`, etc will also -respect the provided `workspace` configuration. - -### Using workspaces - -Given the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace -by its declared `package.json` `name`. Continuing from the example defined -above, let's also create a Node.js script that will require the workspace `a` -example module, e.g: - -``` -// ./packages/a/index.js -module.exports = 'a' - -// ./lib/index.js -const moduleA = require('a') -console.log(moduleA) // -> a -``` - -When running it with: - -`node lib/index.js` - -This demonstrates how the nature of `node_modules` resolution allows for -**workspaces** to enable a portable workflow for requiring each **workspace** -in such a way that is also easy to [publish](/commands/npm-publish) these -nested workspaces to be consumed elsewhere. - -### Running commands in the context of workspaces - -You can use the `workspace` configuration option to run commands in the context -of a configured workspace. -Additionally, if your current directory is in a workspace, the `workspace` -configuration is implicitly set, and `prefix` is set to the root workspace. - -Following is a quick example on how to use the `npm run` command in the context -of nested workspaces. For a project containing multiple workspaces, e.g: - -``` -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- b - `-- package.json -``` - -By running a command using the `workspace` option, it's possible to run the -given command in the context of that specific workspace. e.g: - -``` -npm run test --workspace=a -``` - -You could also run the command within the workspace. - -``` -cd packages/a && npm run test -``` - -Either will run the `test` script defined within the -`./packages/a/package.json` file. - -Please note that you can also specify this argument multiple times in the -command-line in order to target multiple workspaces, e.g: - -``` -npm run test --workspace=a --workspace=b -``` - -Or run the command for each workspace within the 'packages' folder: -``` -npm run test --workspace=packages -``` - -It's also possible to use the `workspaces` (plural) configuration option to -enable the same behavior but running that command in the context of **all** -configured workspaces. e.g: - -``` -npm run test --workspaces -``` - -Will run the `test` script in both `./packages/a` and `./packages/b`. - -Commands will be run in each workspace in the order they appear in your `package.json` - -``` -{ - "workspaces": [ "packages/a", "packages/b" ] -} -``` - -Order of run is different with: - -``` -{ - "workspaces": [ "packages/b", "packages/a" ] -} -``` - -### Ignoring missing scripts - -It is not required for all of the workspaces to implement scripts run with the `npm run` command. - -By running the command with the `--if-present` flag, npm will ignore workspaces missing target script. - -``` -npm run test --workspaces --if-present -``` - -### See also - -* [npm install](/commands/npm-install) -* [npm publish](/commands/npm-publish) -* [npm run-script](/commands/npm-run-script) -* [config](/using-npm/config) - diff --git a/node_modules/npm/docs/lib/index.js b/node_modules/npm/docs/lib/index.js deleted file mode 100644 index 5d4ae7a..0000000 --- a/node_modules/npm/docs/lib/index.js +++ /dev/null @@ -1,189 +0,0 @@ -const localeCompare = require('@isaacs/string-locale-compare')('en') -const { join, basename, resolve } = require('path') -const transformHTML = require('./transform-html.js') -const { version } = require('../../lib/npm.js') -const { aliases } = require('../../lib/utils/cmd-list') -const { shorthands, definitions } = require('@npmcli/config/lib/definitions') - -const DOC_EXT = '.md' - -const TAGS = { - CONFIG: '', - USAGE: '', - SHORTHANDS: '', -} - -const assertPlaceholder = (src, path, placeholder) => { - if (!src.includes(placeholder)) { - throw new Error( - `Cannot replace ${placeholder} in ${path} due to missing placeholder` - ) - } - return placeholder -} - -const getCommandByDoc = (docFile, docExt) => { - // Grab the command name from the *.md filename - // NOTE: We cannot use the name property command file because in the case of - // `npx` the file being used is `lib/commands/exec.js` - const name = basename(docFile, docExt).replace('npm-', '') - - if (name === 'npm') { - return { - name, - params: null, - usage: 'npm', - } - } - - // special case for `npx`: - // `npx` is not technically a command in and of itself, - // so it just needs the usage of npm exex - const srcName = name === 'npx' ? 'exec' : name - const { params, usage = [''], workspaces } = require(`../../lib/commands/${srcName}`) - const usagePrefix = name === 'npx' ? 'npx' : `npm ${name}` - if (params) { - for (const param of params) { - if (definitions[param].exclusive) { - for (const e of definitions[param].exclusive) { - if (!params.includes(e)) { - params.splice(params.indexOf(param) + 1, 0, e) - } - } - } - } - } - - return { - name, - workspaces, - params: name === 'npx' ? null : params, - usage: usage.map(u => `${usagePrefix} ${u}`.trim()).join('\n'), - } -} - -const replaceVersion = (src) => src.replace(/@VERSION@/g, version) - -const replaceUsage = (src, { path }) => { - const replacer = assertPlaceholder(src, path, TAGS.USAGE) - const { usage, name, workspaces } = getCommandByDoc(path, DOC_EXT) - - const synopsis = ['```bash', usage] - - const cmdAliases = Object.keys(aliases).reduce((p, c) => { - if (aliases[c] === name) { - p.push(c) - } - return p - }, []) - - if (cmdAliases.length === 1) { - synopsis.push('', `alias: ${cmdAliases[0]}`) - } else if (cmdAliases.length > 1) { - synopsis.push('', `aliases: ${cmdAliases.join(', ')}`) - } - - synopsis.push('```') - - if (!workspaces) { - synopsis.push('', 'Note: This command is unaware of workspaces.') - } - - return src.replace(replacer, synopsis.join('\n')) -} - -const replaceParams = (src, { path }) => { - const { params } = getCommandByDoc(path, DOC_EXT) - const replacer = params && assertPlaceholder(src, path, TAGS.CONFIG) - - if (!params) { - return src - } - - const paramsConfig = params.map((n) => definitions[n].describe()) - - return src.replace(replacer, paramsConfig.join('\n\n')) -} - -const replaceConfig = (src, { path }) => { - const replacer = assertPlaceholder(src, path, TAGS.CONFIG) - - // sort not-deprecated ones to the top - /* istanbul ignore next - typically already sorted in the definitions file, - * but this is here so that our help doc will stay consistent if we decide - * to move them around. */ - const sort = ([keya, { deprecated: depa }], [keyb, { deprecated: depb }]) => { - return depa && !depb ? 1 - : !depa && depb ? -1 - : localeCompare(keya, keyb) - } - - const allConfig = Object.entries(definitions).sort(sort) - .map(([_, def]) => def.describe()) - .join('\n\n') - - return src.replace(replacer, allConfig) -} - -const replaceShorthands = (src, { path }) => { - const replacer = assertPlaceholder(src, path, TAGS.SHORTHANDS) - - const sh = Object.entries(shorthands) - .sort(([shorta, expansiona], [shortb, expansionb]) => - // sort by what they're short FOR - localeCompare(expansiona.join(' '), expansionb.join(' ')) || localeCompare(shorta, shortb) - ) - .map(([short, expansion]) => { - // XXX: this is incorrect. we have multicharacter flags like `-iwr` that - // can only be set with a single dash - const dash = short.length === 1 ? '-' : '--' - return `* \`${dash}${short}\`: \`${expansion.join(' ')}\`` - }) - - return src.replace(replacer, sh.join('\n')) -} - -const replaceHelpLinks = (src) => { - // replaces markdown links with equivalent-ish npm help commands - return src.replace( - /\[`?([\w\s-]+)`?\]\(\/(?:commands|configuring-npm|using-npm)\/(?:[\w\s-]+)\)/g, - (_, p1) => { - const term = p1.replace(/npm\s/g, '').replace(/\s+/g, ' ').trim() - const help = `npm help ${term.includes(' ') ? `"${term}"` : term}` - return help - } - ) -} - -const transformMan = (src, { data, unified, remarkParse, remarkMan }) => unified() - .use(remarkParse) - .use(remarkMan) - .processSync(`# ${data.title}(${data.section}) - ${data.description}\n\n${src}`) - .toString() - -const manPath = (name, { data }) => join(`man${data.section}`, `${name}.${data.section}`) - -const transformMd = (src, { frontmatter }) => ['---', frontmatter, '---', '', src].join('\n') - -module.exports = { - DOC_EXT, - TAGS, - paths: { - content: resolve(__dirname, 'content'), - nav: resolve(__dirname, 'content', 'nav.yml'), - template: resolve(__dirname, 'template.html'), - man: resolve(__dirname, '..', '..', 'man'), - html: resolve(__dirname, '..', 'output'), - md: resolve(__dirname, '..', 'content'), - }, - usage: replaceUsage, - params: replaceParams, - config: replaceConfig, - shorthands: replaceShorthands, - version: replaceVersion, - helpLinks: replaceHelpLinks, - man: transformMan, - manPath: manPath, - md: transformMd, - html: transformHTML, -} diff --git a/node_modules/npm/docs/output/commands/npm-access.html b/node_modules/npm/docs/output/commands/npm-access.html deleted file mode 100644 index aa89c3e..0000000 --- a/node_modules/npm/docs/output/commands/npm-access.html +++ /dev/null @@ -1,262 +0,0 @@ - - -npm-access - - - - - -
-
-

npm-access

-Set access level on published packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm access list packages [<user>|<scope>|<scope:team> [<package>]
-npm access list collaborators [<package> [<user>]]
-npm access get status [<package>]
-npm access set status=public|private [<package>]
-npm access set mfa=none|publish|automation [<package>]
-npm access grant <read-only|read-write> <scope:team> [<package>]
-npm access revoke <scope:team> [<package>]
-
-

Note: This command is unaware of workspaces.

-

Description

-

Used to set access controls on private packages.

-

For all of the subcommands, npm access will perform actions on the packages -in the current working directory if no package name is passed to the -subcommand.

-
    -
  • -

    public / restricted (deprecated): -Set a package to be either publicly accessible or restricted.

    -
  • -
  • -

    grant / revoke (deprecated): -Add or remove the ability of users and teams to have read-only or read-write -access to a package.

    -
  • -
  • -

    2fa-required / 2fa-not-required (deprecated): -Configure whether a package requires that anyone publishing it have two-factor -authentication enabled on their account.

    -
  • -
  • -

    ls-packages (deprecated): -Show all of the packages a user or a team is able to access, along with the -access level, except for read-only public packages (it won't print the whole -registry listing)

    -
  • -
  • -

    ls-collaborators (deprecated): -Show all of the access privileges for a package. Will only show permissions -for packages to which you have at least read access. If <user> is passed in, -the list is filtered only to teams that user happens to belong to.

    -
  • -
  • -

    edit (not implemented)

    -
  • -
-

Details

-

npm access always operates directly on the current registry, configurable -from the command line using --registry=<registry url>.

-

Unscoped packages are always public.

-

Scoped packages default to restricted, but you can either publish them as -public using npm publish --access=public, or set their access as public using -npm access public after the initial publish.

-

You must have privileges to set the access of a package:

-
    -
  • You are an owner of an unscoped or scoped package.
  • -
  • You are a member of the team that owns a scope.
  • -
  • You have been given read-write privileges for a package, either as a member -of a team or directly as an owner.
  • -
-

If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the --otp=... option to specify it on -the command line.

-

If your account is not paid, then attempts to publish scoped packages will -fail with an HTTP 402 status code (logically enough), unless you use ---access=public.

-

Management of teams and team memberships is done with the npm team command.

-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

registry

- -

The base URL of the npm registry.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-adduser.html b/node_modules/npm/docs/output/commands/npm-adduser.html deleted file mode 100644 index e515eaa..0000000 --- a/node_modules/npm/docs/output/commands/npm-adduser.html +++ /dev/null @@ -1,218 +0,0 @@ - - -npm-adduser - - - - - -
-
-

npm-adduser

-Add a registry user account -
- -
-

Table of contents

- -
- -

Synopsis

-
npm adduser
-
-alias: add-user
-
-

Note: This command is unaware of workspaces.

-

Description

-

Create a new user in the specified registry, and save the credentials to -the .npmrc file. If no registry is specified, the default registry -will be used (see registry).

-

When using legacy for your auth-type, the username, password, and -email are read in from prompts.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry.

-

Useful when logging in to or out of a private registry:

-
# log in, linking the scope to the custom registry
-npm login --scope=@mycorp --registry=https://registry.mycorp.com
-
-# log out, removing the link and the auth token
-npm logout --scope=@mycorp
-
-

This will cause @mycorp to be mapped to the registry for future -installation of packages specified according to the pattern -@mycorp/package.

-

This will also cause npm init to create a scoped package.

-
# accept all defaults, and create a package named "@foo/whatever",
-# instead of just named "whatever"
-npm init --scope=@foo --yes
-
-

auth-type

-
    -
  • Default: "web"
  • -
  • Type: "legacy" or "web"
  • -
-

What authentication strategy to use with login. Note that if an otp -config is given, this value will always be set to legacy.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-audit.html b/node_modules/npm/docs/output/commands/npm-audit.html deleted file mode 100644 index 4aaff93..0000000 --- a/node_modules/npm/docs/output/commands/npm-audit.html +++ /dev/null @@ -1,502 +0,0 @@ - - -npm-audit - - - - - -
-
-

npm-audit

-Run a security audit -
- -
-

Table of contents

- -
- -

Synopsis

-
npm audit [fix|signatures]
-
-

Description

-

The audit command submits a description of the dependencies configured in -your project to your default registry and asks for a report of known -vulnerabilities. If any vulnerabilities are found, then the impact and -appropriate remediation will be calculated. If the fix argument is -provided, then remediations will be applied to the package tree.

-

The command will exit with a 0 exit code if no vulnerabilities were found.

-

Note that some vulnerabilities cannot be fixed automatically and will -require manual intervention or review. Also note that since npm audit fix runs a full-fledged npm install under the hood, all configs that -apply to the installer will also apply to npm install -- so things like -npm audit fix --package-lock-only will work as expected.

-

By default, the audit command will exit with a non-zero code if any -vulnerability is found. It may be useful in CI environments to include the ---audit-level parameter to specify the minimum vulnerability level that -will cause the command to fail. This option does not filter the report -output, it simply changes the command's failure threshold.

-

Package lock

-

By default npm requires a package-lock or shrinkwrap in order to run the -audit. You can bypass the package lock with --no-package-lock but be -aware the results may be different with every run, since npm will -re-build the dependency tree each time.

-

Audit Signatures

-

To ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI.

-

Registry signatures can be verified using the following audit command:

-
$ npm audit signatures
-
-

The npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed:

-
    -
  1. Signatures are provided in the package's packument in each published version within the dist object:
  2. -
-
"dist":{
-  "..omitted..": "..omitted..",
-  "signatures": [{
-    "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
-    "sig": "a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809..."
-  }]
-}
-
-

See this example of a signed package from the public npm registry.

-

The sig is generated using the following template: ${package.name}@${package.version}:${package.dist.integrity} and the keyid has to match one of the public signing keys below.

-
    -
  1. Public signing keys are provided at registry-host.tld/-/npm/v1/keys in the following format:
  2. -
-
{
-  "keys": [{
-    "expires": null,
-    "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}",
-    "keytype": "ecdsa-sha2-nistp256",
-    "scheme": "ecdsa-sha2-nistp256",
-    "key": "{{B64_PUBLIC_KEY}}"
-  }]
-}
-
-

Keys response:

-
    -
  • expires: null or a simplified extended ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
  • -
  • keydid: sha256 fingerprint of the public key
  • -
  • keytype: only ecdsa-sha2-nistp256 is currently supported by the npm CLI
  • -
  • scheme: only ecdsa-sha2-nistp256 is currently supported by the npm CLI
  • -
  • key: base64 encoded public key
  • -
-

See this example key's response from the public npm registry.

-

Audit Endpoints

-

There are two audit endpoints that npm may use to fetch vulnerability -information: the Bulk Advisory endpoint and the Quick Audit endpoint.

-

Bulk Advisory Endpoint

-

As of version 7, npm uses the much faster Bulk Advisory endpoint to -optimize the speed of calculating audit results.

-

npm will generate a JSON payload with the name and list of versions of each -package in the tree, and POST it to the default configured registry at -the path /-/npm/v1/security/advisories/bulk.

-

Any packages in the tree that do not have a version field in their -package.json file will be ignored. If any --omit options are specified -(either via the --omit config, or one of the -shorthands such as --production, --only=dev, and so on), then packages will -be omitted from the submitted payload as appropriate.

-

If the registry responds with an error, or with an invalid response, then -npm will attempt to load advisory data from the Quick Audit endpoint.

-

The expected result will contain a set of advisory objects for each -dependency that matches the advisory range. Each advisory object contains -a name, url, id, severity, vulnerable_versions, and title.

-

npm then uses these advisory objects to calculate vulnerabilities and -meta-vulnerabilities of the dependencies within the tree.

-

Quick Audit Endpoint

-

If the Bulk Advisory endpoint returns an error, or invalid data, npm will -attempt to load advisory data from the Quick Audit endpoint, which is -considerably slower in most cases.

-

The full package tree as found in package-lock.json is submitted, along -with the following pieces of additional metadata:

-
    -
  • npm_version
  • -
  • node_version
  • -
  • platform
  • -
  • arch
  • -
  • node_env
  • -
-

All packages in the tree are submitted to the Quick Audit endpoint. -Omitted dependency types are skipped when generating the report.

-

Scrubbing

-

Out of an abundance of caution, npm versions 5 and 6 would "scrub" any -packages from the submitted report if their name contained a / character, -so as to avoid leaking the names of potentially private packages or git -URLs.

-

However, in practice, this resulted in audits often failing to properly -detect meta-vulnerabilities, because the tree would appear to be invalid -due to missing dependencies, and prevented the detection of vulnerabilities -in package trees that used git dependencies or private modules.

-

This scrubbing has been removed from npm as of version 7.

-

Calculating Meta-Vulnerabilities and Remediations

-

npm uses the -@npmcli/metavuln-calculator -module to turn a set of security advisories into a set of "vulnerability" -objects. A "meta-vulnerability" is a dependency that is vulnerable by -virtue of dependence on vulnerable versions of a vulnerable package.

-

For example, if the package foo is vulnerable in the range >=1.0.2 <2.0.0, and the package bar depends on foo@^1.1.0, then that version -of bar can only be installed by installing a vulnerable version of foo. -In this case, bar is a "metavulnerability".

-

Once metavulnerabilities for a given package are calculated, they are -cached in the ~/.npm folder and only re-evaluated if the advisory range -changes, or a new version of the package is published (in which case, the -new version is checked for metavulnerable status as well).

-

If the chain of metavulnerabilities extends all the way to the root -project, and it cannot be updated without changing its dependency ranges, -then npm audit fix will require the --force option to apply the -remediation. If remediations do not require changes to the dependency -ranges, then all vulnerable packages will be updated to a version that does -not have an advisory or metavulnerability posted against it.

-

Exit Code

-

The npm audit command will exit with a 0 exit code if no vulnerabilities -were found. The npm audit fix command will exit with 0 exit code if no -vulnerabilities are found or if the remediation is able to successfully -fix all vulnerabilities.

-

If vulnerabilities were found the exit code will depend on the -audit-level config.

-

Examples

-

Scan your project for vulnerabilities and automatically install any compatible -updates to vulnerable dependencies:

-
$ npm audit fix
-
-

Run audit fix without modifying node_modules, but still updating the -pkglock:

-
$ npm audit fix --package-lock-only
-
-

Skip updating devDependencies:

-
$ npm audit fix --only=prod
-
-

Have audit fix install SemVer-major updates to toplevel dependencies, not -just SemVer-compatible ones:

-
$ npm audit fix --force
-
-

Do a dry run to get an idea of what audit fix will do, and also output -install information in JSON format:

-
$ npm audit fix --dry-run --json
-
-

Scan your project for vulnerabilities and just show the details, without -fixing anything:

-
$ npm audit
-
-

Get the detailed audit report in JSON format:

-
$ npm audit --json
-
-

Fail an audit only if the results include a vulnerability with a level of moderate or higher:

-
$ npm audit --audit-level=moderate
-
-

Configuration

-

audit-level

-
    -
  • Default: null
  • -
  • Type: null, "info", "low", "moderate", "high", "critical", or "none"
  • -
-

The minimum level of vulnerability for npm audit to exit with a non-zero -exit code.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engine-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow unpublishing all versions of a published package.
  • -
  • Allow conflicting peerDependencies to be installed in the root project.
  • -
  • Implicitly set --yes during npm init.
  • -
  • Allow clobbering existing values in npm pkg
  • -
  • Allow unpublishing of entire packages (not just a single version).
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-bugs.html b/node_modules/npm/docs/output/commands/npm-bugs.html deleted file mode 100644 index b3f7987..0000000 --- a/node_modules/npm/docs/output/commands/npm-bugs.html +++ /dev/null @@ -1,243 +0,0 @@ - - -npm-bugs - - - - - -
-
-

npm-bugs

-Report bugs for a package in a web browser -
- -
-

Table of contents

- -
- -

Synopsis

-
npm bugs [<pkgname> [<pkgname> ...]]
-
-alias: issues
-
-

Description

-

This command tries to guess at the likely location of a package's bug -tracker URL or the mailto URL of the support email, and then tries to -open it using the --browser config param. If no -package name is provided, it will search for a package.json in the current -folder and use the name property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: null, Boolean, or String
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

registry

- -

The base URL of the npm registry.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-cache.html b/node_modules/npm/docs/output/commands/npm-cache.html deleted file mode 100644 index b5ddd5a..0000000 --- a/node_modules/npm/docs/output/commands/npm-cache.html +++ /dev/null @@ -1,236 +0,0 @@ - - -npm-cache - - - - - -
-
-

npm-cache

-Manipulates packages cache -
- -
-

Table of contents

- -
- -

Synopsis

-
npm cache add <package-spec>
-npm cache clean [<key>]
-npm cache ls [<name>@<version>]
-npm cache verify
-
-

Note: This command is unaware of workspaces.

-

Description

-

Used to add, list, or clean the npm cache folder.

-
    -
  • -

    add: -Add the specified packages to the local cache. This command is primarily -intended to be used internally by npm, but it can provide a way to -add data to the local installation cache explicitly.

    -
  • -
  • -

    clean: -Delete all data out of the cache folder. Note that this is typically -unnecessary, as npm's cache is self-healing and resistant to data -corruption issues.

    -
  • -
  • -

    verify: -Verify the contents of the cache folder, garbage collecting any unneeded -data, and verifying the integrity of the cache index and all cached data.

    -
  • -
-

Details

-

npm stores cache data in an opaque directory within the configured cache, -named _cacache. This directory is a -cacache-based content-addressable cache that -stores all http request data as well as other package-related data. This -directory is primarily accessed through pacote, the library responsible -for all package fetching as of npm@5.

-

All data that passes through the cache is fully verified for integrity on -both insertion and extraction. Cache corruption will either trigger an -error, or signal to pacote that the data must be refetched, which it will -do automatically. For this reason, it should never be necessary to clear -the cache for any reason other than reclaiming disk space, thus why clean -now requires --force to run.

-

There is currently no method exposed through npm to inspect or directly -manage the contents of this cache. In order to access it, cacache must be -used directly.

-

npm will not remove data by itself: the cache will grow as new packages are -installed.

-

A note about the cache's design

-

The npm cache is strictly a cache: it should not be relied upon as a -persistent and reliable data store for package data. npm makes no guarantee -that a previously-cached piece of data will be available later, and will -automatically delete corrupted contents. The primary guarantee that the -cache makes is that, if it does return data, that data will be exactly the -data that was inserted.

-

To run an offline verification of existing cache contents, use npm cache verify.

-

Configuration

-

cache

-
    -
  • Default: Windows: %LocalAppData%\npm-cache, Posix: ~/.npm
  • -
  • Type: Path
  • -
-

The location of npm's cache directory.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-ci.html b/node_modules/npm/docs/output/commands/npm-ci.html deleted file mode 100644 index 2349e46..0000000 --- a/node_modules/npm/docs/output/commands/npm-ci.html +++ /dev/null @@ -1,397 +0,0 @@ - - -npm-ci - - - - - -
-
-

npm-ci

-Clean install a project -
- -
-

Table of contents

- -
- -

Synopsis

-
npm ci
-
-aliases: clean-install, ic, install-clean, isntall-clean
-
-

Description

-

This command is similar to npm install, except -it's meant to be used in automated environments such as test platforms, -continuous integration, and deployment -- or any situation where you want -to make sure you're doing a clean install of your dependencies.

-

The main differences between using npm install and npm ci are:

-
    -
  • The project must have an existing package-lock.json or -npm-shrinkwrap.json.
  • -
  • If dependencies in the package lock do not match those in package.json, -npm ci will exit with an error, instead of updating the package lock.
  • -
  • npm ci can only install entire projects at a time: individual -dependencies cannot be added with this command.
  • -
  • If a node_modules is already present, it will be automatically removed -before npm ci begins its install.
  • -
  • It will never write to package.json or any of the package-locks: -installs are essentially frozen.
  • -
-

NOTE: If you create your package-lock.json file by running npm install -with flags that can affect the shape of your dependency tree, such as ---legacy-peer-deps or --install-links, you must provide the same -flags to npm ci or you are likely to encounter errors. An easy way to do -this is to run, for example, -npm config set legacy-peer-deps=true --location=project and commit the -.npmrc file to your repo.

-

Example

-

Make sure you have a package-lock and an up-to-date install:

-
$ cd ./my/npm/project
-$ npm install
-added 154 packages in 10s
-$ ls | grep package-lock
-
-

Run npm ci in that project

-
$ npm ci
-added 154 packages in 5s
-
-

Configure Travis CI to build using npm ci instead of npm install:

-
# .travis.yml
-install:
-- npm ci
-# keep the npm cache around to speed up installs
-cache:
-  directories:
-  - "$HOME/.npm"
-
-

Configuration

-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-completion.html b/node_modules/npm/docs/output/commands/npm-completion.html deleted file mode 100644 index d43bbf9..0000000 --- a/node_modules/npm/docs/output/commands/npm-completion.html +++ /dev/null @@ -1,186 +0,0 @@ - - -npm-completion - - - - - -
-
-

npm-completion

-Tab Completion for npm -
- -
-

Table of contents

- -
- -

Synopsis

-
npm completion
-
-

Note: This command is unaware of workspaces.

-

Description

-

Enables tab-completion in all npm commands.

-

The synopsis above -loads the completions into your current shell. Adding it to -your ~/.bashrc or ~/.zshrc will make the completions available -everywhere:

-
npm completion >> ~/.bashrc
-npm completion >> ~/.zshrc
-
-

You may of course also pipe the output of npm completion to a file -such as /usr/local/etc/bash_completion.d/npm or -/etc/bash_completion.d/npm if you have a system that will read -that file for you.

-

When COMP_CWORD, COMP_LINE, and COMP_POINT are defined in the -environment, npm completion acts in "plumbing mode", and outputs -completions based on the arguments.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-config.html b/node_modules/npm/docs/output/commands/npm-config.html deleted file mode 100644 index d4c8bb5..0000000 --- a/node_modules/npm/docs/output/commands/npm-config.html +++ /dev/null @@ -1,282 +0,0 @@ - - -npm-config - - - - - -
-
-

npm-config

-Manage the npm configuration files -
- -
-

Table of contents

- -
- -

Synopsis

-
npm config set <key>=<value> [<key>=<value> ...]
-npm config get [<key> [<key> ...]]
-npm config delete <key> [<key> ...]
-npm config list [--json]
-npm config edit
-npm config fix
-
-alias: c
-
-

Note: This command is unaware of workspaces.

-

Description

-

npm gets its config settings from the command line, environment -variables, npmrc files, and in some cases, the package.json file.

-

See npmrc for more information about the npmrc -files.

-

See config for a more thorough explanation of the -mechanisms involved, and a full list of config options available.

-

The npm config command can be used to update and edit the contents -of the user and global npmrc files.

-

Sub-commands

-

Config supports the following sub-commands:

-

set

-
npm config set key=value [key=value...]
-npm set key=value [key=value...]
-
-

Sets each of the config keys to the value provided.

-

If value is omitted, the key will be removed from your config file entirely.

-

Note: for backwards compatibility, npm config set key value is supported -as an alias for npm config set key=value.

-

get

-
npm config get [key ...]
-npm get [key ...]
-
-

Echo the config value(s) to stdout.

-

If multiple keys are provided, then the values will be prefixed with the -key names.

-

If no keys are provided, then this command behaves the same as npm config list.

-

list

-
npm config list
-
-

Show all the config settings. Use -l to also show defaults. Use --json -to show the settings in json format.

-

delete

-
npm config delete key [key ...]
-
-

Deletes the specified keys from all configuration files.

-

edit

-
npm config edit
-
-

Opens the config file in an editor. Use the --global flag to edit the -global config.

-

fix

-
npm config fix
-
-

Attempts to repair invalid configuration items. Usually this means -attaching authentication config (i.e. _auth, _authToken) to the -configured registry.

-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

editor

-
    -
  • Default: The EDITOR or VISUAL environment variables, or -'%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems
  • -
  • Type: String
  • -
-

The command to run for npm edit and npm config edit.

-

location

-
    -
  • Default: "user" unless --global is passed, which will also set this value -to "global"
  • -
  • Type: "global", "user", or "project"
  • -
-

When passed to npm config this refers to which config file to use.

-

When set to "global" mode, packages are installed into the prefix folder -instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-dedupe.html b/node_modules/npm/docs/output/commands/npm-dedupe.html deleted file mode 100644 index 625fe39..0000000 --- a/node_modules/npm/docs/output/commands/npm-dedupe.html +++ /dev/null @@ -1,395 +0,0 @@ - - -npm-dedupe - - - - - -
-
-

npm-dedupe

-Reduce duplication in the package tree -
- -
-

Table of contents

- -
- -

Synopsis

-
npm dedupe
-
-alias: ddp
-
-

Description

-

Searches the local package tree and attempts to simplify the overall -structure by moving dependencies further up the tree, where they can -be more effectively shared by multiple dependent packages.

-

For example, consider this dependency graph:

-
a
-+-- b <-- depends on c@1.0.x
-|   `-- c@1.0.3
-`-- d <-- depends on c@~1.0.9
-    `-- c@1.0.10
-
-

In this case, npm dedupe will transform the tree to:

-
a
-+-- b
-+-- d
-`-- c@1.0.10
-
-

Because of the hierarchical nature of node's module lookup, b and d -will both get their dependency met by the single c package at the root -level of the tree.

-

In some cases, you may have a dependency graph like this:

-
a
-+-- b <-- depends on c@1.0.x
-+-- c@1.0.3
-`-- d <-- depends on c@1.x
-    `-- c@1.9.9
-
-

During the installation process, the c@1.0.3 dependency for b was -placed in the root of the tree. Though d's dependency on c@1.x could -have been satisfied by c@1.0.3, the newer c@1.9.0 dependency was used, -because npm favors updates by default, even when doing so causes -duplication.

-

Running npm dedupe will cause npm to note the duplication and -re-evaluate, deleting the nested c module, because the one in the root is -sufficient.

-

To prefer deduplication over novelty during the installation process, run -npm install --prefer-dedupe or npm config set prefer-dedupe true.

-

Arguments are ignored. Dedupe always acts on the entire tree.

-

Note that this operation transforms the dependency tree, but will never -result in new modules being installed.

-

Using npm find-dupes will run the command in --dry-run mode.

-

Note: npm dedupe will never update the semver values of direct -dependencies in your project package.json, if you want to update -values in package.json you can run: npm update --save instead.

-

Configuration

-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-deprecate.html b/node_modules/npm/docs/output/commands/npm-deprecate.html deleted file mode 100644 index f332437..0000000 --- a/node_modules/npm/docs/output/commands/npm-deprecate.html +++ /dev/null @@ -1,206 +0,0 @@ - - -npm-deprecate - - - - - -
-
-

npm-deprecate

-Deprecate a version of a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm deprecate <package-spec> <message>
-
-

Note: This command is unaware of workspaces.

-

Description

-

This command will update the npm registry entry for a package, providing a -deprecation warning to all who attempt to install it.

-

It works on version ranges as well as specific -versions, so you can do something like this:

-
npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
-
-

SemVer ranges passed to this command are interpreted such that they do -include prerelease versions. For example:

-
npm deprecate my-thing@1.x "1.x is no longer supported"
-
-

In this case, a version my-thing@1.0.0-beta.0 will also be deprecated.

-

You must be the package owner to deprecate something. See the owner and -adduser help topics.

-

To un-deprecate a package, specify an empty string ("") for the message -argument. Note that you must use double quotes with no space between them to -format an empty string.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-diff.html b/node_modules/npm/docs/output/commands/npm-diff.html deleted file mode 100644 index 13569c8..0000000 --- a/node_modules/npm/docs/output/commands/npm-diff.html +++ /dev/null @@ -1,398 +0,0 @@ - - -npm-diff - - - - - -
-
-

npm-diff

-The registry diff command -
- -
-

Table of contents

- -
- -

Synopsis

-
npm diff [...<paths>]
-
-

Description

-

Similar to its git diff counterpart, this command will print diff patches -of files for packages published to the npm registry.

-
    -
  • -

    npm diff --diff=<spec-a> --diff=<spec-b>

    -

    Compares two package versions using their registry specifiers, e.g: -npm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0. It's also possible to -compare across forks of any package, -e.g: npm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0.

    -

    Any valid spec can be used, so that it's also possible to compare -directories or git repositories, -e.g: npm diff --diff=pkg@latest --diff=./packages/pkg

    -

    Here's an example comparing two different versions of a package named -abbrev from the registry:

    -
    npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1
    -
    -

    On success, output looks like:

    -
    diff --git a/package.json b/package.json
    -index v1.1.0..v1.1.1 100644
    ---- a/package.json
    -+++ b/package.json
    -@@ -1,6 +1,6 @@
    - {
    -   "name": "abbrev",
    --  "version": "1.1.0",
    -+  "version": "1.1.1",
    -   "description": "Like ruby's abbrev module, but in js",
    -   "author": "Isaac Z. Schlueter <i@izs.me>",
    -   "main": "abbrev.js",
    -
    -

    Given the flexible nature of npm specs, you can also target local -directories or git repos just like when using npm install:

    -
    npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path
    -
    -

    In the example above we can compare the contents from the package installed -from the git repo at github.com/npm/libnpmdiff with the contents of the -./local-path that contains a valid package, such as a modified copy of -the original.

    -
  • -
  • -

    npm diff (in a package directory, no arguments):

    -

    If the package is published to the registry, npm diff will fetch the -tarball version tagged as latest (this value can be configured using the -tag option) and proceed to compare the contents of files present in that -tarball, with the current files in your local file system.

    -

    This workflow provides a handy way for package authors to see what -package-tracked files have been changed in comparison with the latest -published version of that package.

    -
  • -
  • -

    npm diff --diff=<pkg-name> (in a package directory):

    -

    When using a single package name (with no version or tag specifier) as an -argument, npm diff will work in a similar way to -npm-outdated and reach for the registry to figure out -what current published version of the package named <pkg-name> -will satisfy its dependent declared semver-range. Once that specific -version is known npm diff will print diff patches comparing the -current version of <pkg-name> found in the local file system with -that specific version returned by the registry.

    -

    Given a package named abbrev that is currently installed:

    -
    npm diff --diff=abbrev
    -
    -

    That will request from the registry its most up to date version and -will print a diff output comparing the currently installed version to this -newer one if the version numbers are not the same.

    -
  • -
  • -

    npm diff --diff=<spec-a> (in a package directory):

    -

    Similar to using only a single package name, it's also possible to declare -a full registry specifier version if you wish to compare the local version -of an installed package with the specific version/tag/semver-range provided -in <spec-a>.

    -

    An example: assuming pkg@1.0.0 is installed in the current node_modules -folder, running:

    -
    npm diff --diff=pkg@2.0.0
    -
    -

    It will effectively be an alias to -npm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0.

    -
  • -
  • -

    npm diff --diff=<semver-a> [--diff=<semver-b>] (in a package directory):

    -

    Using npm diff along with semver-valid version numbers is a shorthand -to compare different versions of the current package.

    -

    It needs to be run from a package directory, such that for a package named -pkg running npm diff --diff=1.0.0 --diff=1.0.1 is the same as running -npm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1.

    -

    If only a single argument <version-a> is provided, then the current local -file system is going to be compared against that version.

    -

    Here's an example comparing two specific versions (published to the -configured registry) of the current project directory:

    -
    npm diff --diff=1.0.0 --diff=1.1.0
    -
    -
  • -
-

Note that tag names are not valid --diff argument values, if you wish to -compare to a published tag, you must use the pkg@tagname syntax.

-

Filtering files

-

It's possible to also specify positional arguments using file names or globs -pattern matching in order to limit the result of diff patches to only a subset -of files for a given package, e.g:

-
npm diff --diff=pkg@2 ./lib/ CHANGELOG.md
-
-

In the example above the diff output is only going to print contents of files -located within the folder ./lib/ and changed lines of code within the -CHANGELOG.md file.

-

Configuration

-

diff

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Define arguments to compare in npm diff.

-

diff-name-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prints only filenames when using npm diff.

-

diff-unified

-
    -
  • Default: 3
  • -
  • Type: Number
  • -
-

The number of lines of context to print in npm diff.

-

diff-ignore-all-space

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Ignore whitespace when comparing lines in npm diff.

-

diff-no-prefix

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Do not show any source or destination prefix in npm diff output.

-

Note: this causes npm diff to ignore the --diff-src-prefix and ---diff-dst-prefix configs.

-

diff-src-prefix

-
    -
  • Default: "a/"
  • -
  • Type: String
  • -
-

Source prefix to be used in npm diff output.

-

diff-dst-prefix

-
    -
  • Default: "b/"
  • -
  • Type: String
  • -
-

Destination prefix to be used in npm diff output.

-

diff-text

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Treat all files as text in npm diff.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

tag

-
    -
  • Default: "latest"
  • -
  • Type: String
  • -
-

If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag.

-

Also the tag that is added to the package@version specified by the npm tag -command, if no explicit tag is given.

-

When used by the npm diff command, this is the tag used to fetch the -tarball that will be compared with the local files by default.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-dist-tag.html b/node_modules/npm/docs/output/commands/npm-dist-tag.html deleted file mode 100644 index 1e75f62..0000000 --- a/node_modules/npm/docs/output/commands/npm-dist-tag.html +++ /dev/null @@ -1,281 +0,0 @@ - - -npm-dist-tag - - - - - -
-
-

npm-dist-tag

-Modify package distribution tags -
- -
-

Table of contents

- -
- -

Synopsis

-
npm dist-tag add <package-spec (with version)> [<tag>]
-npm dist-tag rm <package-spec> <tag>
-npm dist-tag ls [<package-spec>]
-
-alias: dist-tags
-
-

Description

-

Add, remove, and enumerate distribution tags on a package:

-
    -
  • -

    add: Tags the specified version of the package with the specified tag, -or the --tag config if not specified. If you have -two-factor authentication on auth-and-writes then you’ll need to include a -one-time password on the command line with ---otp <one-time password>, or go through a second factor flow based on your authtype.

    -
  • -
  • -

    rm: Clear a tag that is no longer in use from the package. If you have -two-factor authentication on auth-and-writes then you’ll need to include -a one-time password on the command line with --otp <one-time password>, -or go through a second factor flow based on your authtype

    -
  • -
  • -

    ls: Show all of the dist-tags for a package, defaulting to the package in -the current prefix. This is the default action if none is specified.

    -
  • -
-

A tag can be used when installing packages as a reference to a version instead -of using a specific version number:

-
npm install <name>@<tag>
-
-

When installing dependencies, a preferred tagged version may be specified:

-
npm install --tag <tag>
-
-

(This also applies to any other commands that resolve and install -dependencies, such as npm dedupe, npm update, and npm audit fix.)

-

Publishing a package sets the latest tag to the published version unless the ---tag option is used. For example, npm publish --tag=beta.

-

By default, npm install <pkg> (without any @<version> or @<tag> -specifier) installs the latest tag.

-

Purpose

-

Tags can be used to provide an alias instead of version numbers.

-

For example, a project might choose to have multiple streams of development -and use a different tag for each stream, e.g., stable, beta, dev, -canary.

-

By default, the latest tag is used by npm to identify the current version -of a package, and npm install <pkg> (without any @<version> or @<tag> -specifier) installs the latest tag. Typically, projects only use the -latest tag for stable release versions, and use other tags for unstable -versions such as prereleases.

-

The next tag is used by some projects to identify the upcoming version.

-

Other than latest, no tag has any special significance to npm itself.

-

Caveats

-

This command used to be known as npm tag, which only created new tags, -and so had a different syntax.

-

Tags must share a namespace with version numbers, because they are -specified in the same slot: npm install <pkg>@<version> vs -npm install <pkg>@<tag>.

-

Tags that can be interpreted as valid semver ranges will be rejected. For -example, v1.4 cannot be used as a tag, because it is interpreted by -semver as >=1.4.0 <1.5.0. See https://github.com/npm/npm/issues/6082.

-

The simplest way to avoid semver problems with tags is to use tags that do -not begin with a number or the letter v.

-

Configuration

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-docs.html b/node_modules/npm/docs/output/commands/npm-docs.html deleted file mode 100644 index 5388543..0000000 --- a/node_modules/npm/docs/output/commands/npm-docs.html +++ /dev/null @@ -1,242 +0,0 @@ - - -npm-docs - - - - - -
-
-

npm-docs

-Open documentation for a package in a web browser -
- -
-

Table of contents

- -
- -

Synopsis

-
npm docs [<pkgname> [<pkgname> ...]]
-
-alias: home
-
-

Description

-

This command tries to guess at the likely location of a package's -documentation URL, and then tries to open it using the ---browser config param. You can pass multiple -package names at once. If no package name is provided, it will search for a -package.json in the current folder and use the name property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: null, Boolean, or String
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

registry

- -

The base URL of the npm registry.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-doctor.html b/node_modules/npm/docs/output/commands/npm-doctor.html deleted file mode 100644 index d63f333..0000000 --- a/node_modules/npm/docs/output/commands/npm-doctor.html +++ /dev/null @@ -1,253 +0,0 @@ - - -npm-doctor - - - - - -
-
-

npm-doctor

-Check the health of your npm environment -
- -
-

Table of contents

- -
- -

Synopsis

-
npm doctor [ping] [registry] [versions] [environment] [permissions] [cache]
-
-

Note: This command is unaware of workspaces.

-

Description

-

npm doctor runs a set of checks to ensure that your npm installation has -what it needs to manage your JavaScript packages. npm is mostly a -standalone tool, but it does have some basic requirements that must be met:

-
    -
  • Node.js and git must be executable by npm.
  • -
  • The primary npm registry, registry.npmjs.com, or another service that -uses the registry API, is available.
  • -
  • The directories that npm uses, node_modules (both locally and -globally), exist and can be written by the current user.
  • -
  • The npm cache exists, and the package tarballs within it aren't corrupt.
  • -
-

Without all of these working properly, npm may not work properly. Many -issues are often attributable to things that are outside npm's code base, -so npm doctor confirms that the npm installation is in a good state.

-

Also, in addition to this, there are also very many issue reports due to -using old versions of npm. Since npm is constantly improving, running -npm@latest is better than an old version.

-

npm doctor verifies the following items in your environment, and if -there are any recommended changes, it will display them. By default npm -runs all of these checks. You can limit what checks are ran by -specifying them as extra arguments.

-

npm ping

-

By default, npm installs from the primary npm registry, -registry.npmjs.org. npm doctor hits a special ping endpoint within the -registry. This can also be checked with npm ping. If this check fails, -you may be using a proxy that needs to be configured, or may need to talk -to your IT staff to get access over HTTPS to registry.npmjs.org.

-

This check is done against whichever registry you've configured (you can -see what that is by running npm config get registry), and if you're using -a private registry that doesn't support the /whoami endpoint supported by -the primary registry, this check may fail.

-

npm -v

-

While Node.js may come bundled with a particular version of npm, it's the -policy of the CLI team that we recommend all users run npm@latest if they -can. As the CLI is maintained by a small team of contributors, there are -only resources for a single line of development, so npm's own long-term -support releases typically only receive critical security and regression -fixes. The team believes that the latest tested version of npm is almost -always likely to be the most functional and defect-free version of npm.

-

node -v

-

For most users, in most circumstances, the best version of Node will be the -latest long-term support (LTS) release. Those of you who want access to new -ECMAscript features or bleeding-edge changes to Node's standard library may -be running a newer version, and some may be required to run an older -version of Node because of enterprise change control policies. That's OK! -But in general, the npm team recommends that most users run Node.js LTS.

-

npm config get registry

-

You may be installing from private package registries for your project or -company. That's great! Others may be following tutorials or StackOverflow -questions in an effort to troubleshoot problems you may be having. -Sometimes, this may entail changing the registry you're pointing at. This -part of npm doctor just lets you, and maybe whoever's helping you with -support, know that you're not using the default registry.

-

which git

-

While it's documented in the README, it may not be obvious that npm needs -Git installed to do many of the things that it does. Also, in some cases -– especially on Windows – you may have Git set up in such a way that it's -not accessible via your PATH so that npm can find it. This check ensures -that Git is available.

-

Permissions checks

-
    -
  • Your cache must be readable and writable by the user running npm.
  • -
  • Global package binaries must be writable by the user running npm.
  • -
  • Your local node_modules path, if you're running npm doctor with a -project directory, must be readable and writable by the user running npm.
  • -
-

Validate the checksums of cached packages

-

When an npm package is published, the publishing process generates a -checksum that npm uses at install time to verify that the package didn't -get corrupted in transit. npm doctor uses these checksums to validate the -package tarballs in your local cache (you can see where that cache is -located with npm config get cache). In the event that there are corrupt -packages in your cache, you should probably run npm cache clean -f and -reset the cache.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-edit.html b/node_modules/npm/docs/output/commands/npm-edit.html deleted file mode 100644 index 52c8e57..0000000 --- a/node_modules/npm/docs/output/commands/npm-edit.html +++ /dev/null @@ -1,190 +0,0 @@ - - -npm-edit - - - - - -
-
-

npm-edit

-Edit an installed package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm edit <pkg>[/<subpkg>...]
-
-

Note: This command is unaware of workspaces.

-

Description

-

Selects a dependency in the current project and opens the package folder in -the default editor (or whatever you've configured as the npm editor -config -- see npm-config.)

-

After it has been edited, the package is rebuilt so as to pick up any -changes in compiled packages.

-

For instance, you can do npm install connect to install connect -into your package, and then npm edit connect to make a few -changes to your locally installed copy.

-

Configuration

-

editor

-
    -
  • Default: The EDITOR or VISUAL environment variables, or -'%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems
  • -
  • Type: String
  • -
-

The command to run for npm edit and npm config edit.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-exec.html b/node_modules/npm/docs/output/commands/npm-exec.html deleted file mode 100644 index 51f6c2b..0000000 --- a/node_modules/npm/docs/output/commands/npm-exec.html +++ /dev/null @@ -1,435 +0,0 @@ - - -npm-exec - - - - - -
-
-

npm-exec

-Run a command from a local or remote npm package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm exec -- <pkg>[@<version>] [args...]
-npm exec --package=<pkg>[@<version>] -- <cmd> [args...]
-npm exec -c '<cmd> [args...]'
-npm exec --package=foo -c '<cmd> [args...]'
-
-alias: x
-
-

Description

-

This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via npm run.

-

Run without positional arguments or --call, this allows you to -interactively run commands in the same sort of shell environment that -package.json scripts are run. Interactive mode is not supported in CI -environments when standard input is a TTY, to prevent hangs.

-

Whatever packages are specified by the --package option will be -provided in the PATH of the executed command, along with any locally -installed package executables. The --package option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available.

-

If any requested packages are not present in the local project -dependencies, then a prompt is printed, which can be suppressed by -providing either --yes or --no. When standard input is not a TTY or a -CI environment is detected, --yes is assumed. The requested packages are -installed to a folder in the npm cache, which is added to the PATH -environment variable in the executed process.

-

Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency.

-

If no -c or --call option is provided, then the positional arguments -are used to generate the command string. If no --package options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic:

-
    -
  • If the package has a single entry in its bin field in package.json, -or if all entries are aliases of the same command, then that command -will be used.
  • -
  • If the package has multiple bin entries, and one of them matches the -unscoped portion of the name field, then that command will be used.
  • -
  • If this does not result in exactly one option (either because there are -no bin entries, or none of them match the name of the package), then -npm exec exits with an error.
  • -
-

To run a binary other than the named binary, specify one or more ---package options, which will prevent npm from inferring the package from -the first command argument.

-

npx vs npm exec

-

When run via the npx binary, all flags and options must be set prior to -any positional arguments. When run via npm exec, a double-hyphen -- -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command.

-

For example:

-
$ npx foo@latest bar --package=@npmcli/foo
-
-

In this case, npm will resolve the foo package name, and run the -following command:

-
$ foo bar --package=@npmcli/foo
-
-

Since the --package option comes after the positional arguments, it is -treated as an argument to the executed command.

-

In contrast, due to npm's argument parsing logic, running this command is -different:

-
$ npm exec foo@latest bar --package=@npmcli/foo
-
-

In this case, npm will parse the --package option first, resolving the -@npmcli/foo package. Then, it will execute the following command in that -context:

-
$ foo@latest bar
-
-

The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the npx command above:

-
$ npm exec -- foo@latest bar --package=@npmcli/foo
-
-

Configuration

-

package

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

The package or packages to install for npm exec

-

call

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Optional companion option for npm exec, npx that allows for specifying a -custom command to be run along with the installed packages.

-
npm exec --package yo --package generator-node --call "yo node"
-
-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

Examples

-

Run the version of tap in the local dependencies, with the provided -arguments:

-
$ npm exec -- tap --bail test/foo.js
-$ npx tap --bail test/foo.js
-
-

Run a command other than the command whose name matches the package name -by specifying a --package option:

-
$ npm exec --package=foo -- bar --bar-argument
-# ~ or ~
-$ npx --package=foo bar --bar-argument
-
-

Run an arbitrary shell script, in the context of the current project:

-
$ npm x -c 'eslint && say "hooray, lint passed"'
-$ npx -c 'eslint && say "hooray, lint passed"'
-
-

Workspaces support

-

You may use the workspace or -workspaces configs in order to run an -arbitrary command from an npm package (either one installed locally, or fetched -remotely) in the context of the specified workspaces. -If no positional argument or --call option is provided, it will open an -interactive subshell in the context of each of these configured workspaces one -at a time.

-

Given a project with configured workspaces, e.g:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-   +-- b
-   |   `-- package.json
-   `-- c
-       `-- package.json
-
-

Assuming the workspace configuration is properly set up at the root level -package.json file. e.g:

-
{
-    "workspaces": [ "./packages/*" ]
-}
-
-

You can execute an arbitrary command from a package in the context of each of -the configured workspaces when using the -workspaces config options, in this example -we're using eslint to lint any js file found within each workspace folder:

-
npm exec --ws -- eslint ./*.js
-
-

Filtering workspaces

-

It's also possible to execute a command in a single workspace using the -workspace config along with a name or directory path:

-
npm exec --workspace=a -- eslint ./*.js
-
-

The workspace config can also be specified multiple times in order to run a -specific script in the context of multiple workspaces. When defining values for -the workspace config in the command line, it also possible to use -w as a -shorthand, e.g:

-
npm exec -w a -w b -- eslint ./*.js
-
-

This last command will run the eslint command in both ./packages/a and -./packages/b folders.

-

Compatibility with Older npx Versions

-

The npx binary was rewritten in npm v7.0.0, and the standalone npx -package deprecated at that time. npx uses the npm exec -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions.

-

This resulted in some shifts in its functionality:

-
    -
  • Any npm config value may be provided.
  • -
  • To prevent security and user-experience problems from mistyping package -names, npx prompts before installing anything. Suppress this -prompt with the -y or --yes option.
  • -
  • The --no-install option is deprecated, and will be converted to --no.
  • -
  • Shell fallback functionality is removed, as it is not advisable.
  • -
  • The -p argument is a shorthand for --parseable in npm, but shorthand -for --package in npx. This is maintained, but only for the npx -executable.
  • -
  • The --ignore-existing option is removed. Locally installed bins are -always present in the executed process PATH.
  • -
  • The --npm option is removed. npx will always use the npm it ships -with.
  • -
  • The --node-arg and -n options are removed.
  • -
  • The --always-spawn option is redundant, and thus removed.
  • -
  • The --shell option is replaced with --script-shell, but maintained -in the npx executable for backwards compatibility.
  • -
-

A note on caching

-

The npm cli utilizes its internal package cache when using the package -name specified. You can use the following to change how and when the -cli uses this cache. See npm cache for more on -how the cache works.

-

prefer-online

-

Forces staleness checks for packages, making the cli look for updates -immediately even if the package is already in the cache.

-

prefer-offline

-

Bypasses staleness checks for packages. Missing data will still be -requested from the server. To force full offline mode, use offline.

-

offline

-

Forces full offline mode. Any packages not locally cached will result in -an error.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result to selecting all of the -nested workspaces)
  • -
-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Alias: --ws
  • -
  • Type: Boolean
  • -
  • Default: false
  • -
-

Run scripts in the context of all configured workspaces for the current -project.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-explain.html b/node_modules/npm/docs/output/commands/npm-explain.html deleted file mode 100644 index 74305d3..0000000 --- a/node_modules/npm/docs/output/commands/npm-explain.html +++ /dev/null @@ -1,242 +0,0 @@ - - -npm-explain - - - - - -
-
-

npm-explain

-Explain installed packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm explain <package-spec>
-
-alias: why
-
-

Description

-

This command will print the chain of dependencies causing a given package -to be installed in the current project.

-

If one or more package specs are provided, then only packages matching -one of the specifiers will have their relationships explained.

-

The package spec can also refer to a folder within ./node_modules

-

For example, running npm explain glob within npm's source tree will show:

-
glob@7.1.6
-node_modules/glob
-  glob@"^7.1.4" from the root project
-
-glob@7.1.1 dev
-node_modules/tacks/node_modules/glob
-  glob@"^7.0.5" from rimraf@2.6.2
-  node_modules/tacks/node_modules/rimraf
-    rimraf@"^2.6.2" from tacks@1.3.0
-    node_modules/tacks
-      dev tacks@"^1.3.0" from the root project
-
-

To explain just the package residing at a specific folder, pass that as the -argument to the command. This can be useful when trying to figure out -exactly why a given dependency is being duplicated to satisfy conflicting -version requirements within the project.

-
$ npm explain node_modules/nyc/node_modules/find-up
-find-up@3.0.0 dev
-node_modules/nyc/node_modules/find-up
-  find-up@"^3.0.0" from nyc@14.1.1
-  node_modules/nyc
-    nyc@"^14.1.1" from tap@14.10.8
-    node_modules/tap
-      dev tap@"^14.10.8" from the root project
-
-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-explore.html b/node_modules/npm/docs/output/commands/npm-explore.html deleted file mode 100644 index 2e52c73..0000000 --- a/node_modules/npm/docs/output/commands/npm-explore.html +++ /dev/null @@ -1,190 +0,0 @@ - - -npm-explore - - - - - -
-
-

npm-explore

-Browse an installed package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm explore <pkg> [ -- <command>]
-
-

Note: This command is unaware of workspaces.

-

Description

-

Spawn a subshell in the directory of the installed package specified.

-

If a command is specified, then it is run in the subshell, which then -immediately terminates.

-

This is particularly handy in the case of git submodules in the -node_modules folder:

-
npm explore some-dependency -- git pull origin master
-
-

Note that the package is not automatically rebuilt afterwards, so be -sure to use npm rebuild <pkg> if you make any changes.

-

Configuration

-

shell

-
    -
  • Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on -Windows
  • -
  • Type: String
  • -
-

The shell to run for the npm explore command.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-find-dupes.html b/node_modules/npm/docs/output/commands/npm-find-dupes.html deleted file mode 100644 index 86546d3..0000000 --- a/node_modules/npm/docs/output/commands/npm-find-dupes.html +++ /dev/null @@ -1,341 +0,0 @@ - - -npm-find-dupes - - - - - -
-
-

npm-find-dupes

-Find duplication in the package tree -
- -
-

Table of contents

- -
- -

Synopsis

-
npm find-dupes
-
-

Description

-

Runs npm dedupe in --dry-run mode, making npm only output the -duplications, without actually changing the package tree.

-

Configuration

-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-fund.html b/node_modules/npm/docs/output/commands/npm-fund.html deleted file mode 100644 index 7193d17..0000000 --- a/node_modules/npm/docs/output/commands/npm-fund.html +++ /dev/null @@ -1,267 +0,0 @@ - - -npm-fund - - - - - -
-
-

npm-fund

-Retrieve funding information -
- -
-

Table of contents

- -
- -

Synopsis

-
npm fund [<package-spec>]
-
-

Description

-

This command retrieves information on how to fund the dependencies of a -given project. If no package name is provided, it will list all -dependencies that are looking for funding in a tree structure, listing -the type of funding and the url to visit. If a package name is provided -then it tries to open its funding url using the ---browser config param; if there are multiple -funding sources for the package, the user will be instructed to pass the ---which option to disambiguate.

-

The list will avoid duplicated entries and will stack all packages that -share the same url as a single entry. Thus, the list does not have the -same shape of the output from npm ls.

-

Example

-

Workspaces support

-

It's possible to filter the results to only include a single workspace -and its dependencies using the -workspace config option.

-

Example:

-

Here's an example running npm fund in a project with a configured -workspace a:

-
$ npm fund
-test-workspaces-fund@1.0.0
-+-- https://example.com/a
-| | `-- a@1.0.0
-| `-- https://example.com/maintainer
-|     `-- foo@1.0.0
-+-- https://example.com/npmcli-funding
-|   `-- @npmcli/test-funding
-`-- https://example.com/org
-    `-- bar@2.0.0
-
-

And here is an example of the expected result when filtering only by a -specific workspace a in the same project:

-
$ npm fund -w a
-test-workspaces-fund@1.0.0
-`-- https://example.com/a
-  | `-- a@1.0.0
-  `-- https://example.com/maintainer
-      `-- foo@2.0.0
-
-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: null, Boolean, or String
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale, -as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

which

-
    -
  • Default: null
  • -
  • Type: null or Number
  • -
-

If there are multiple funding sources, which 1-indexed source URL to open.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-help-search.html b/node_modules/npm/docs/output/commands/npm-help-search.html deleted file mode 100644 index c8ae1b6..0000000 --- a/node_modules/npm/docs/output/commands/npm-help-search.html +++ /dev/null @@ -1,184 +0,0 @@ - - -npm-help-search - - - - - -
-
-

npm-help-search

-Search npm help documentation -
- -
-

Table of contents

- -
- -

Synopsis

-
npm help-search <text>
-
-

Note: This command is unaware of workspaces.

-

Description

-

This command will search the npm markdown documentation files for the terms -provided, and then list the results, sorted by relevance.

-

If only one result is found, then it will show that help topic.

-

If the argument to npm help is not a known help topic, then it will call -help-search. It is rarely if ever necessary to call this command -directly.

-

Configuration

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-help.html b/node_modules/npm/docs/output/commands/npm-help.html deleted file mode 100644 index 3cf78e3..0000000 --- a/node_modules/npm/docs/output/commands/npm-help.html +++ /dev/null @@ -1,190 +0,0 @@ - - -npm-help - - - - - -
-
-

npm-help

-Get help on npm -
- -
-

Table of contents

- -
- -

Synopsis

-
npm help <term> [<terms..>]
-
-alias: hlep
-
-

Note: This command is unaware of workspaces.

-

Description

-

If supplied a topic, then show the appropriate documentation page.

-

If the topic does not exist, or if multiple terms are provided, then npm -will run the help-search command to find a match. Note that, if -help-search finds a single subject, then it will run help on that -topic, so unique matches are equivalent to specifying a topic name.

-

Configuration

-

viewer

-
    -
  • Default: "man" on Posix, "browser" on Windows
  • -
  • Type: String
  • -
-

The program to use to view help content.

-

Set to "browser" to view html help content in the default web browser.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-hook.html b/node_modules/npm/docs/output/commands/npm-hook.html deleted file mode 100644 index 4607751..0000000 --- a/node_modules/npm/docs/output/commands/npm-hook.html +++ /dev/null @@ -1,226 +0,0 @@ - - -npm-hook - - - - - -
-
-

npm-hook

-Manage registry hooks -
- -
-

Table of contents

- -
- -

Synopsis

-
npm hook add <pkg> <url> <secret> [--type=<type>]
-npm hook ls [pkg]
-npm hook rm <id>
-npm hook update <id> <url> <secret>
-
-

Note: This command is unaware of workspaces.

-

Description

-

Allows you to manage npm -hooks, -including adding, removing, listing, and updating.

-

Hooks allow you to configure URL endpoints that will be notified whenever a -change happens to any of the supported entity types. Three different types -of entities can be watched by hooks: packages, owners, and scopes.

-

To create a package hook, simply reference the package name.

-

To create an owner hook, prefix the owner name with ~ (as in, -~youruser).

-

To create a scope hook, prefix the scope name with @ (as in, -@yourscope).

-

The hook id used by update and rm are the IDs listed in npm hook ls -for that particular hook.

-

The shared secret will be sent along to the URL endpoint so you can verify -the request came from your own configured hook.

-

Example

-

Add a hook to watch a package for changes:

-
$ npm hook add lodash https://example.com/ my-shared-secret
-
-

Add a hook to watch packages belonging to the user substack:

-
$ npm hook add ~substack https://example.com/ my-shared-secret
-
-

Add a hook to watch packages in the scope @npm

-
$ npm hook add @npm https://example.com/ my-shared-secret
-
-

List all your active hooks:

-
$ npm hook ls
-
-

List your active hooks for the lodash package:

-
$ npm hook ls lodash
-
-

Update an existing hook's url:

-
$ npm hook update id-deadbeef https://my-new-website.here/
-
-

Remove a hook:

-
$ npm hook rm id-deadbeef
-
-

Configuration

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-init.html b/node_modules/npm/docs/output/commands/npm-init.html deleted file mode 100644 index 9094984..0000000 --- a/node_modules/npm/docs/output/commands/npm-init.html +++ /dev/null @@ -1,422 +0,0 @@ - - -npm-init - - - - - -
-
-

npm-init

-Create a package.json file -
- -
-

Table of contents

- -
- -

Synopsis

-
npm init <package-spec> (same as `npx <package-spec>`)
-npm init <@scope> (same as `npx <@scope>/create`)
-
-aliases: create, innit
-
-

Description

-

npm init <initializer> can be used to set up a new or existing npm -package.

-

initializer in this case is an npm package named create-<initializer>, -which will be installed by npm-exec, and then have its -main bin executed -- presumably creating or updating package.json and -running any other initialization-related operations.

-

The init command is transformed to a corresponding npm exec operation as -follows:

-
    -
  • npm init foo -> npm exec create-foo
  • -
  • npm init @usr/foo -> npm exec @usr/create-foo
  • -
  • npm init @usr -> npm exec @usr/create
  • -
  • npm init @usr@2.0.0 -> npm exec @usr/create@2.0.0
  • -
  • npm init @usr/foo@2.0.0 -> npm exec @usr/create-foo@2.0.0
  • -
-

If the initializer is omitted (by just calling npm init), init will fall -back to legacy init behavior. It will ask you a bunch of questions, and -then write a package.json for you. It will attempt to make reasonable -guesses based on existing fields, dependencies, and options selected. It is -strictly additive, so it will keep any fields and values that were already -set. You can also use -y/--yes to skip the questionnaire altogether. If -you pass --scope, it will create a scoped package.

-

Note: if a user already has the create-<initializer> package -globally installed, that will be what npm init uses. If you want npm -to use the latest version, or another specific version you must specify -it:

-
    -
  • npm init foo@latest # fetches and runs the latest create-foo from -the registry
  • -
  • npm init foo@1.2.3 # runs create-foo@1.2.3 specifically
  • -
-

Forwarding additional options

-

Any additional options will be passed directly to the command, so npm init foo -- --hello will map to npm exec -- create-foo --hello.

-

To better illustrate how options are forwarded, here's a more evolved -example showing options passed to both the npm cli and a create package, -both following commands are equivalent:

-
    -
  • npm init foo -y --registry=<url> -- --hello -a
  • -
  • npm exec -y --registry=<url> -- create-foo --hello -a
  • -
-

Examples

-

Create a new React-based project using -create-react-app:

-
$ npm init react-app ./my-react-app
-
-

Create a new esm-compatible package using -create-esm:

-
$ mkdir my-esm-lib && cd my-esm-lib
-$ npm init esm --yes
-
-

Generate a plain old package.json using legacy init:

-
$ mkdir my-npm-pkg && cd my-npm-pkg
-$ git init
-$ npm init
-
-

Generate it without having it ask any questions:

-
$ npm init -y
-
-

Workspaces support

-

It's possible to create a new workspace within your project by using the -workspace config option. When using npm init -w <dir> the cli will -create the folders and boilerplate expected while also adding a reference -to your project package.json "workspaces": [] property in order to make -sure that new generated workspace is properly set up as such.

-

Given a project with no workspaces, e.g:

-
.
-+-- package.json
-
-

You may generate a new workspace using the legacy init:

-
$ npm init -w packages/a
-
-

That will generate a new folder and package.json file, while also updating -your top-level package.json to add the reference to this new workspace:

-
.
-+-- package.json
-`-- packages
-   `-- a
-       `-- package.json
-
-

The workspaces init also supports the npm init <initializer> -w <dir> -syntax, following the same set of rules explained earlier in the initial -Description section of this page. Similar to the previous example of -creating a new React-based project using -create-react-app, the following syntax -will make sure to create the new react app as a nested workspace within your -project and configure your package.json to recognize it as such:

-
npm init -w packages/my-react-app react-app .
-
-

This will make sure to generate your react app as expected, one important -consideration to have in mind is that npm exec is going to be run in the -context of the newly created folder for that workspace, and that's the reason -why in this example the initializer uses the initializer name followed with a -dot to represent the current directory in that context, e.g: react-app .:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-   `-- my-react-app
-       +-- README
-       +-- package.json
-       `-- ...
-
-

Configuration

-

init-author-name

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's name.

-

init-author-url

-
    -
  • Default: ""
  • -
  • Type: "" or URL
  • -
-

The value npm init should use by default for the package author's -homepage.

-

init-license

-
    -
  • Default: "ISC"
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package license.

-

init-module

-
    -
  • Default: "~/.npm-init.js"
  • -
  • Type: Path
  • -
-

A module that will be loaded by the npm init command. See the -documentation for the -init-package-json module for -more information, or npm init.

-

init-version

-
    -
  • Default: "1.0.0"
  • -
  • Type: SemVer string
  • -
-

The value that npm init should use by default for the package version -number, if not already set in package.json.

-

yes

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Automatically answer "yes" to any prompts that npm might print on the -command line.

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engine-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow unpublishing all versions of a published package.
  • -
  • Allow conflicting peerDependencies to be installed in the root project.
  • -
  • Implicitly set --yes during npm init.
  • -
  • Allow clobbering existing values in npm pkg
  • -
  • Allow unpublishing of entire packages (not just a single version).
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry.

-

Useful when logging in to or out of a private registry:

-
# log in, linking the scope to the custom registry
-npm login --scope=@mycorp --registry=https://registry.mycorp.com
-
-# log out, removing the link and the auth token
-npm logout --scope=@mycorp
-
-

This will cause @mycorp to be mapped to the registry for future -installation of packages specified according to the pattern -@mycorp/package.

-

This will also cause npm init to create a scoped package.

-
# accept all defaults, and create a package named "@foo/whatever",
-# instead of just named "whatever"
-npm init --scope=@foo --yes
-
-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

workspaces-update

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the node_modules folder.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-install-ci-test.html b/node_modules/npm/docs/output/commands/npm-install-ci-test.html deleted file mode 100644 index 635b59b..0000000 --- a/node_modules/npm/docs/output/commands/npm-install-ci-test.html +++ /dev/null @@ -1,355 +0,0 @@ - - -npm-install-ci-test - - - - - -
-
-

npm-install-ci-test

-Install a project with a clean slate and run tests -
- -
-

Table of contents

- -
- -

Synopsis

-
npm install-ci-test
-
-aliases: cit, clean-install-test, sit
-
-

Description

-

This command runs npm ci followed immediately by npm test.

-

Configuration

-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-install-test.html b/node_modules/npm/docs/output/commands/npm-install-test.html deleted file mode 100644 index dd78090..0000000 --- a/node_modules/npm/docs/output/commands/npm-install-test.html +++ /dev/null @@ -1,425 +0,0 @@ - - -npm-install-test - - - - - -
-
-

npm-install-test

-Install package(s) and run tests -
- -
-

Table of contents

- -
- -

Synopsis

-
npm install-test [<package-spec> ...]
-
-alias: it
-
-

Description

-

This command runs an npm install followed immediately by an npm test. It -takes exactly the same arguments as npm install.

-

Configuration

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

save-exact

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

prefer-dedupe

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

cpu

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override CPU architecture of native modules to install. Acceptable values -are same as cpu field of package.json, which comes from process.arch.

-

os

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override OS of native modules to install. Acceptable values are same as os -field of package.json, which comes from process.platform.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-install.html b/node_modules/npm/docs/output/commands/npm-install.html deleted file mode 100644 index 91e88eb..0000000 --- a/node_modules/npm/docs/output/commands/npm-install.html +++ /dev/null @@ -1,787 +0,0 @@ - - -npm-install - - - - - -
-
-

npm-install

-Install a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm install [<package-spec> ...]
-
-aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall
-
-

Description

-

This command installs a package and any packages that it depends on. If the -package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, -the installation of dependencies will be driven by that, respecting the -following order of precedence:

-
    -
  • npm-shrinkwrap.json
  • -
  • package-lock.json
  • -
  • yarn.lock
  • -
-

See package-lock.json and -npm shrinkwrap.

-

A package is:

-
    -
  • a) a folder containing a program described by a -package.json file
  • -
  • b) a gzipped tarball containing (a)
  • -
  • c) a url that resolves to (b)
  • -
  • d) a <name>@<version> that is published on the registry (see -registry) with (c)
  • -
  • e) a <name>@<tag> (see npm dist-tag) that -points to (d)
  • -
  • f) a <name> that has a "latest" tag satisfying (e)
  • -
  • g) a <git remote url> that resolves to (a)
  • -
-

Even if you never publish your package, you can still get a lot of benefits -of using npm if you just want to write a node program (a), and perhaps if -you also want to be able to easily install it elsewhere after packing it up -into a tarball (b).

-
    -
  • -

    npm install (in a package directory, no arguments):

    -

    Install the dependencies to the local node_modules folder.

    -

    In global mode (ie, with -g or --global appended to the command), -it installs the current package context (ie, the current working -directory) as a global package.

    -

    By default, npm install will install all modules listed as -dependencies in package.json.

    -

    With the --production flag (or when the NODE_ENV environment -variable is set to production), npm will not install modules listed -in devDependencies. To install all modules listed in both -dependencies and devDependencies when NODE_ENV environment -variable is set to production, you can use --production=false.

    -
    -

    NOTE: The --production flag has no particular meaning when adding a -dependency to a project.

    -
    -
  • -
  • -

    npm install <folder>:

    -

    If <folder> sits inside the root of your project, its dependencies will be installed and may -be hoisted to the top-level node_modules as they would for other -types of dependencies. If <folder> sits outside the root of your project, -npm will not install the package dependencies in the directory <folder>, -but it will create a symlink to <folder>.

    -
    -

    NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the --install-links option.

    -
    -

    Example:

    -
    npm install ../../other-package --install-links
    -npm install ./sub-package
    -
    -
  • -
  • -

    npm install <tarball file>:

    -

    Install a package that is sitting on the filesystem. Note: if you just -want to link a dev directory into your npm root, you can do this more -easily by using npm link.

    -

    Tarball requirements:

    -
      -
    • The filename must use .tar, .tar.gz, or .tgz as the -extension.
    • -
    • The package contents should reside in a subfolder inside the tarball -(usually it is called package/). npm strips one directory layer -when installing the package (an equivalent of tar x --strip-components=1 is run).
    • -
    • The package must contain a package.json file with name and -version properties.
    • -
    -

    Example:

    -
    npm install ./package.tgz
    -
    -
  • -
  • -

    npm install <tarball url>:

    -

    Fetch the tarball url, and then install it. In order to distinguish between -this and other options, the argument must start with "http://" or "https://"

    -

    Example:

    -
    npm install https://github.com/indexzero/forever/tarball/v0.5.6
    -
    -
  • -
  • -

    npm install [<@scope>/]<name>:

    -

    Do a <name>@<tag> install, where <tag> is the "tag" config. (See -config. The config's default value is latest.)

    -

    In most cases, this will install the version of the modules tagged as -latest on the npm registry.

    -

    Example:

    -
    npm install sax
    -
    -

    npm install saves any specified packages into dependencies by default. -Additionally, you can control where and how they get saved with some -additional flags:

    -
      -
    • -

      -P, --save-prod: Package will appear in your dependencies. This -is the default unless -D or -O are present.

      -
    • -
    • -

      -D, --save-dev: Package will appear in your devDependencies.

      -
    • -
    • -

      -O, --save-optional: Package will appear in your -optionalDependencies.

      -
    • -
    • -

      --no-save: Prevents saving to dependencies.

      -
    • -
    -

    When using any of the above options to save dependencies to your -package.json, there are two additional, optional flags:

    -
      -
    • -

      -E, --save-exact: Saved dependencies will be configured with an -exact version rather than using npm's default semver range operator.

      -
    • -
    • -

      -B, --save-bundle: Saved dependencies will also be added to your -bundleDependencies list.

      -
    • -
    -

    Further, if you have an npm-shrinkwrap.json or package-lock.json -then it will be updated as well.

    -

    <scope> is optional. The package will be downloaded from the registry -associated with the specified scope. If no registry is associated with -the given scope the default registry is assumed. See -scope.

    -

    Note: if you do not include the @-symbol on your scope name, npm will -interpret this as a GitHub repository instead, see below. Scopes names -must also be followed by a slash.

    -

    Examples:

    -
    npm install sax
    -npm install githubname/reponame
    -npm install @myorg/privatepackage
    -npm install node-tap --save-dev
    -npm install dtrace-provider --save-optional
    -npm install readable-stream --save-exact
    -npm install ansi-regex --save-bundle
    -
    -

    Note: If there is a file or folder named <name> in the current -working directory, then it will try to install that, and only try to -fetch the package by name if it is not valid.

    -
  • -
  • -

    npm install <alias>@npm:<name>:

    -

    Install a package under a custom alias. Allows multiple versions of -a same-name package side-by-side, more convenient import names for -packages with otherwise long ones, and using git forks replacements -or forked npm packages as replacements. Aliasing works only on your -project and does not rename packages in transitive dependencies. -Aliases should follow the naming conventions stated in -validate-npm-package-name.

    -

    Examples:

    -
    npm install my-react@npm:react
    -npm install jquery2@npm:jquery@2
    -npm install jquery3@npm:jquery@3
    -npm install npa@npm:npm-package-arg
    -
    -
  • -
  • -

    npm install [<@scope>/]<name>@<tag>:

    -

    Install the version of the package that is referenced by the specified tag. -If the tag does not exist in the registry data for that package, then this -will fail.

    -

    Example:

    -
    npm install sax@latest
    -npm install @myorg/mypackage@latest
    -
    -
  • -
  • -

    npm install [<@scope>/]<name>@<version>:

    -

    Install the specified version of the package. This will fail if the -version has not been published to the registry.

    -

    Example:

    -
    npm install sax@0.1.1
    -npm install @myorg/privatepackage@1.5.0
    -
    -
  • -
  • -

    npm install [<@scope>/]<name>@<version range>:

    -

    Install a version of the package matching the specified version range. -This will follow the same rules for resolving dependencies described in -package.json.

    -

    Note that most version ranges must be put in quotes so that your shell -will treat it as a single argument.

    -

    Example:

    -
    npm install sax@">=0.1.0 <0.2.0"
    -npm install @myorg/privatepackage@"16 - 17"
    -
    -
  • -
  • -

    npm install <git remote url>:

    -

    Installs the package from the hosted git provider, cloning it with -git. For a full git remote url, only that URL will be attempted.

    -
    <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
    -
    -

    <protocol> is one of git, git+ssh, git+http, git+https, or -git+file.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> -can be any valid semver range or exact version, and npm will look for -any tags or refs matching that range in the remote repository, much as -it would for a registry dependency. If neither #<commit-ish> or -#semver:<semver> is specified, then the default branch of the -repository is used.

    -

    If the repository makes use of submodules, those submodules will be -cloned as well.

    -

    If the package being installed contains a prepare script, its -dependencies and devDependencies will be installed, and the prepare -script will be run, before the package is packaged and installed.

    -

    The following git environment variables are recognized by npm and will -be added to the environment when running git:

    -
      -
    • GIT_ASKPASS
    • -
    • GIT_EXEC_PATH
    • -
    • GIT_PROXY_COMMAND
    • -
    • GIT_SSH
    • -
    • GIT_SSH_COMMAND
    • -
    • GIT_SSL_CAINFO
    • -
    • GIT_SSL_NO_VERIFY
    • -
    -

    See the git man page for details.

    -

    Examples:

    -
    npm install git+ssh://git@github.com:npm/cli.git#v1.0.27
    -npm install git+ssh://git@github.com:npm/cli#pull/273
    -npm install git+ssh://git@github.com:npm/cli#semver:^5.0
    -npm install git+https://isaacs@github.com/npm/cli.git
    -npm install git://github.com/npm/cli.git#v1.0.27
    -GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git
    -
    -
  • -
  • -

    npm install <githubname>/<githubrepo>[#<commit-ish>]:

    -
  • -
  • -

    npm install github:<githubname>/<githubrepo>[#<commit-ish>]:

    -

    Install the package at https://github.com/githubname/githubrepo by -attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> -can be any valid semver range or exact version, and npm will look for -any tags or refs matching that range in the remote repository, much as -it would for a registry dependency. If neither #<commit-ish> or -#semver:<semver> is specified, then the default branch is used.

    -

    As with regular git dependencies, dependencies and devDependencies -will be installed if the package has a prepare script before the -package is done installing.

    -

    Examples:

    -
    npm install mygithubuser/myproject
    -npm install github:mygithubuser/myproject
    -
    -
  • -
  • -

    npm install gist:[<githubname>/]<gistID>[#<commit-ish>|#semver:<semver>]:

    -

    Install the package at https://gist.github.com/gistID by attempting to -clone it using git. The GitHub username associated with the gist is -optional and will not be saved in package.json.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install gist:101a11beef
    -
    -
  • -
  • -

    npm install bitbucket:<bitbucketname>/<bitbucketrepo>[#<commit-ish>]:

    -

    Install the package at https://bitbucket.org/bitbucketname/bitbucketrepo -by attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install bitbucket:mybitbucketuser/myproject
    -
    -
  • -
  • -

    npm install gitlab:<gitlabname>/<gitlabrepo>[#<commit-ish>]:

    -

    Install the package at https://gitlab.com/gitlabname/gitlabrepo -by attempting to clone it using git.

    -

    If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for a -registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then master is used.

    -

    As with regular git dependencies, dependencies and devDependencies will -be installed if the package has a prepare script before the package is -done installing.

    -

    Example:

    -
    npm install gitlab:mygitlabuser/myproject
    -npm install gitlab:myusr/myproj#semver:^5.0
    -
    -
  • -
-

You may combine multiple arguments and even multiple types of arguments. -For example:

-
npm install sax@">=0.1.0 <0.2.0" bench supervisor
-
-

The --tag argument will apply to all of the specified install targets. If -a tag with the given name exists, the tagged version is preferred over -newer versions.

-

The --dry-run argument will report in the usual way what the install -would have done without actually installing anything.

-

The --package-lock-only argument will only update the -package-lock.json, instead of checking node_modules and downloading -dependencies.

-

The -f or --force argument will force npm to fetch remote resources -even if a local copy exists on disk.

-
npm install sax --force
-
-

Configuration

-

See the config help doc. Many of the configuration -params have some effect on installation, since that's most of what npm -does.

-

These are some of the most common options related to installation.

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

save-exact

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

prefer-dedupe

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

cpu

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override CPU architecture of native modules to install. Acceptable values -are same as cpu field of package.json, which comes from process.arch.

-

os

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override OS of native modules to install. Acceptable values are same as os -field of package.json, which comes from process.platform.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

Algorithm

-

Given a package{dep} structure: A{B,C}, B{C}, C{D}, -the npm install algorithm produces:

-
A
-+-- B
-+-- C
-+-- D
-
-

That is, the dependency from B to C is satisfied by the fact that A already -caused C to be installed at a higher level. D is still installed at the top -level because nothing conflicts with it.

-

For A{B,C}, B{C,D@1}, C{D@2}, this algorithm produces:

-
A
-+-- B
-+-- C
-   `-- D@2
-+-- D@1
-
-

Because B's D@1 will be installed in the top-level, C now has to install -D@2 privately for itself. This algorithm is deterministic, but different -trees may be produced if two dependencies are requested for installation in -a different order.

-

See folders for a more detailed description of -the specific folder structures that npm creates.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-link.html b/node_modules/npm/docs/output/commands/npm-link.html deleted file mode 100644 index 93ec043..0000000 --- a/node_modules/npm/docs/output/commands/npm-link.html +++ /dev/null @@ -1,450 +0,0 @@ - - -npm-link - - - - - -
-
-

npm-link

-Symlink a package folder -
- -
-

Table of contents

- -
- -

Synopsis

-
npm link [<package-spec>]
-
-alias: ln
-
-

Description

-

This is handy for installing your own stuff, so that you can work on it and -test iteratively without having to continually rebuild.

-

Package linking is a two-step process.

-

First, npm link in a package folder with no arguments will create a -symlink in the global folder {prefix}/lib/node_modules/<package> that -links to the package where the npm link command was executed. It will -also link any bins in the package to {prefix}/bin/{name}. Note that -npm link uses the global prefix (see npm prefix -g for its value).

-

Next, in some other location, npm link package-name will create a -symbolic link from globally-installed package-name to node_modules/ of -the current folder.

-

Note that package-name is taken from package.json, not from the -directory name.

-

The package name can be optionally prefixed with a scope. See -scope. The scope must be preceded by an @-symbol and -followed by a slash.

-

When creating tarballs for npm publish, the linked packages are -"snapshotted" to their current state by resolving the symbolic links, if -they are included in bundleDependencies.

-

For example:

-
cd ~/projects/node-redis    # go into the package directory
-npm link                    # creates global link
-cd ~/projects/node-bloggy   # go into some other package directory.
-npm link redis              # link-install the package
-
-

Now, any changes to ~/projects/node-redis will be reflected in -~/projects/node-bloggy/node_modules/node-redis/. Note that the link -should be to the package name, not the directory name for that package.

-

You may also shortcut the two steps in one. For example, to do the -above use-case in a shorter way:

-
cd ~/projects/node-bloggy  # go into the dir of your main project
-npm link ../node-redis     # link the dir of your dependency
-
-

The second line is the equivalent of doing:

-
(cd ../node-redis; npm link)
-npm link redis
-
-

That is, it first creates a global link, and then links the global -installation target into your project's node_modules folder.

-

Note that in this case, you are referring to the directory name, -node-redis, rather than the package name redis.

-

If your linked package is scoped (see scope) your -link command must include that scope, e.g.

-
npm link @myorg/privatepackage
-
-

Caveat

-

Note that package dependencies linked in this way are not saved to -package.json by default, on the assumption that the intention is to have -a link stand in for a regular non-link dependency. Otherwise, for example, -if you depend on redis@^3.0.1, and ran npm link redis, it would replace -the ^3.0.1 dependency with file:../path/to/node-redis, which you -probably don't want! Additionally, other users or developers on your -project would run into issues if they do not have their folders set up -exactly the same as yours.

-

If you are adding a new dependency as a link, you should add it to the -relevant metadata by running npm install <dep> --package-lock-only.

-

If you want to save the file: reference in your package.json and -package-lock.json files, you can use npm link <dep> --save to do so.

-

Workspace Usage

-

npm link <pkg> --workspace <name> will link the relevant package as a -dependency of the specified workspace(s). Note that It may actually be -linked into the parent project's node_modules folder, if there are no -conflicting dependencies.

-

npm link --workspace <name> will create a global link to the specified -workspace(s).

-

Configuration

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

save-exact

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-login.html b/node_modules/npm/docs/output/commands/npm-login.html deleted file mode 100644 index 5ffff8a..0000000 --- a/node_modules/npm/docs/output/commands/npm-login.html +++ /dev/null @@ -1,222 +0,0 @@ - - -npm-login - - - - - -
-
-

npm-login

-Login to a registry user account -
- -
-

Table of contents

- -
- -

Synopsis

-
npm login
-
-

Note: This command is unaware of workspaces.

-

Description

-

Verify a user in the specified registry, and save the credentials to the -.npmrc file. If no registry is specified, the default registry will be -used (see config).

-

When using legacy for your auth-type, the username and password, are -read in from prompts.

-

To reset your password, go to https://www.npmjs.com/forgot

-

To change your email address, go to https://www.npmjs.com/email-edit

-

You may use this command multiple times with the same user account to -authorize on a new machine. When authenticating on a new machine, -the username, password and email address must all match with -your existing record.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry.

-

Useful when logging in to or out of a private registry:

-
# log in, linking the scope to the custom registry
-npm login --scope=@mycorp --registry=https://registry.mycorp.com
-
-# log out, removing the link and the auth token
-npm logout --scope=@mycorp
-
-

This will cause @mycorp to be mapped to the registry for future -installation of packages specified according to the pattern -@mycorp/package.

-

This will also cause npm init to create a scoped package.

-
# accept all defaults, and create a package named "@foo/whatever",
-# instead of just named "whatever"
-npm init --scope=@foo --yes
-
-

auth-type

-
    -
  • Default: "web"
  • -
  • Type: "legacy" or "web"
  • -
-

What authentication strategy to use with login. Note that if an otp -config is given, this value will always be set to legacy.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-logout.html b/node_modules/npm/docs/output/commands/npm-logout.html deleted file mode 100644 index 5767772..0000000 --- a/node_modules/npm/docs/output/commands/npm-logout.html +++ /dev/null @@ -1,209 +0,0 @@ - - -npm-logout - - - - - -
-
-

npm-logout

-Log out of the registry -
- -
-

Table of contents

- -
- -

Synopsis

-
npm logout
-
-

Note: This command is unaware of workspaces.

-

Description

-

When logged into a registry that supports token-based authentication, tell -the server to end this token's session. This will invalidate the token -everywhere you're using it, not just for the current environment.

-

When logged into a legacy registry that uses username and password -authentication, this will clear the credentials in your user configuration. -In this case, it will only affect the current environment.

-

If --scope is provided, this will find the credentials for the registry -connected to that scope, if set.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry.

-

Useful when logging in to or out of a private registry:

-
# log in, linking the scope to the custom registry
-npm login --scope=@mycorp --registry=https://registry.mycorp.com
-
-# log out, removing the link and the auth token
-npm logout --scope=@mycorp
-
-

This will cause @mycorp to be mapped to the registry for future -installation of packages specified according to the pattern -@mycorp/package.

-

This will also cause npm init to create a scoped package.

-
# accept all defaults, and create a package named "@foo/whatever",
-# instead of just named "whatever"
-npm init --scope=@foo --yes
-
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-ls.html b/node_modules/npm/docs/output/commands/npm-ls.html deleted file mode 100644 index f5d8ee6..0000000 --- a/node_modules/npm/docs/output/commands/npm-ls.html +++ /dev/null @@ -1,378 +0,0 @@ - - -npm-ls - - - - - -
-
-

npm-ls

-List installed packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm ls <package-spec>
-
-alias: list
-
-

Description

-

This command will print to stdout all the versions of packages that are -installed, as well as their dependencies when --all is specified, in a -tree structure.

-

Note: to get a "bottoms up" view of why a given package is included in the -tree at all, use npm explain.

-

Positional arguments are name@version-range identifiers, which will limit -the results to only the paths to the packages named. Note that nested -packages will also show the paths to the specified packages. For -example, running npm ls promzard in npm's source tree will show:

-
npm@10.2.5 /path/to/npm
-└─┬ init-package-json@0.0.4
-  └── promzard@0.1.5
-
-

It will print out extraneous, missing, and invalid packages.

-

If a project specifies git urls for dependencies these are shown -in parentheses after the name@version to make it easier for users to -recognize potential forks of a project.

-

The tree shown is the logical dependency tree, based on package -dependencies, not the physical layout of your node_modules folder.

-

When run as ll or la, it shows extended information by default.

-

Note: Design Changes Pending

-

The npm ls command's output and behavior made a ton of sense when npm -created a node_modules folder that naively nested every dependency. In -such a case, the logical dependency graph and physical tree of packages on -disk would be roughly identical.

-

With the advent of automatic install-time deduplication of dependencies in -npm v3, the ls output was modified to display the logical dependency -graph as a tree structure, since this was more useful to most users. -However, without using npm ls -l, it became impossible to show where a -package was actually installed much of the time!

-

With the advent of automatic installation of peerDependencies in npm v7, -this gets even more curious, as peerDependencies are logically -"underneath" their dependents in the dependency graph, but are always -physically at or above their location on disk.

-

Also, in the years since npm got an ls command (in version 0.0.2!), -dependency graphs have gotten much larger as a general rule. Therefore, in -order to avoid dumping an excessive amount of content to the terminal, npm ls now only shows the top level dependencies, unless --all is -provided.

-

A thorough re-examination of the use cases, intention, behavior, and output -of this command, is currently underway. Expect significant changes to at -least the default human-readable npm ls output in npm v8.

-

Configuration

-

all

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When running npm outdated and npm ls, setting --all will show all -outdated or installed packages, rather than only those directly depended -upon by the current project.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

depth

-
    -
  • Default: Infinity if --all is set, otherwise 1
  • -
  • Type: null or Number
  • -
-

The depth to go when recursing packages for npm ls.

-

If not set, npm ls will show only the immediate dependencies of the root -project. If --all is set, then npm will show all dependencies by default.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Used with npm ls, limiting output to only those packages that are linked.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale, -as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-org.html b/node_modules/npm/docs/output/commands/npm-org.html deleted file mode 100644 index 601abc6..0000000 --- a/node_modules/npm/docs/output/commands/npm-org.html +++ /dev/null @@ -1,231 +0,0 @@ - - -npm-org - - - - - -
-
-

npm-org

-Manage orgs -
- -
-

Table of contents

- -
- -

Synopsis

-
npm org set orgname username [developer | admin | owner]
-npm org rm orgname username
-npm org ls orgname [<username>]
-
-alias: ogr
-
-

Note: This command is unaware of workspaces.

-

Example

-

Add a new developer to an org:

-
$ npm org set my-org @mx-smith
-
-

Add a new admin to an org (or change a developer to an admin):

-
$ npm org set my-org @mx-santos admin
-
-

Remove a user from an org:

-
$ npm org rm my-org mx-santos
-
-

List all users in an org:

-
$ npm org ls my-org
-
-

List all users in JSON format:

-
$ npm org ls my-org --json
-
-

See what role a user has in an org:

-
$ npm org ls my-org @mx-santos
-
-

Description

-

You can use the npm org commands to manage and view users of an -organization. It supports adding and removing users, changing their roles, -listing them, and finding specific ones and their roles.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-outdated.html b/node_modules/npm/docs/output/commands/npm-outdated.html deleted file mode 100644 index 96689fb..0000000 --- a/node_modules/npm/docs/output/commands/npm-outdated.html +++ /dev/null @@ -1,305 +0,0 @@ - - -npm-outdated - - - - - -
-
-

npm-outdated

-Check for outdated packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm outdated [<package-spec> ...]
-
-

Description

-

This command will check the registry to see if any (or, specific) installed -packages are currently outdated.

-

By default, only the direct dependencies of the root project and direct -dependencies of your configured workspaces are shown. -Use --all to find all outdated meta-dependencies as well.

-

In the output:

-
    -
  • wanted is the maximum version of the package that satisfies the semver -range specified in package.json. If there's no available semver range -(i.e. you're running npm outdated --global, or the package isn't -included in package.json), then wanted shows the currently-installed -version.
  • -
  • latest is the version of the package tagged as latest in the registry. -Running npm publish with no special configuration will publish the -package with a dist-tag of latest. This may or may not be the maximum -version of the package, or the most-recently published version of the -package, depending on how the package's developer manages the latest -dist-tag.
  • -
  • location is where in the physical tree the package is located.
  • -
  • depended by shows which package depends on the displayed dependency
  • -
  • package type (when using --long / -l) tells you whether this -package is a dependency or a dev/peer/optional dependency. Packages not -included in package.json are always marked dependencies.
  • -
  • homepage (when using --long / -l) is the homepage value contained -in the package's packument
  • -
  • Red means there's a newer version matching your semver requirements, so -you should update now.
  • -
  • Yellow indicates that there's a newer version above your semver -requirements (usually new major, or new 0.x minor) so proceed with -caution.
  • -
-

An example

-
$ npm outdated
-Package      Current   Wanted   Latest  Location                  Depended by
-glob          5.0.15   5.0.15    6.0.1  node_modules/glob         dependent-package-name
-nothingness    0.0.3      git      git  node_modules/nothingness  dependent-package-name
-npm            3.5.1    3.5.2    3.5.1  node_modules/npm          dependent-package-name
-local-dev      0.0.3   linked   linked  local-dev                 dependent-package-name
-once           1.3.2    1.3.3    1.3.3  node_modules/once         dependent-package-name
-
-

With these dependencies:

-
{
-  "glob": "^5.0.15",
-  "nothingness": "github:othiym23/nothingness#master",
-  "npm": "^3.5.1",
-  "once": "^1.3.1"
-}
-
-

A few things to note:

-
    -
  • glob requires ^5, which prevents npm from installing glob@6, which -is outside the semver range.
  • -
  • Git dependencies will always be reinstalled, because of how they're -specified. The installed committish might satisfy the dependency -specifier (if it's something immutable, like a commit SHA), or it might -not, so npm outdated and npm update have to fetch Git repos to check. -This is why currently doing a reinstall of a Git dependency always forces -a new clone and install.
  • -
  • npm@3.5.2 is marked as "wanted", but "latest" is npm@3.5.1 because -npm uses dist-tags to manage its latest and next release channels. -npm update will install the newest version, but npm install npm -(with no semver range) will install whatever's tagged as latest.
  • -
  • once is just plain out of date. Reinstalling node_modules from -scratch or running npm update will bring it up to spec.
  • -
-

Configuration

-

all

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When running npm outdated and npm ls, setting --all will show all -outdated or installed packages, rather than only those directly depended -upon by the current project.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-owner.html b/node_modules/npm/docs/output/commands/npm-owner.html deleted file mode 100644 index dab34ab..0000000 --- a/node_modules/npm/docs/output/commands/npm-owner.html +++ /dev/null @@ -1,243 +0,0 @@ - - -npm-owner - - - - - -
-
-

npm-owner

-Manage package owners -
- -
-

Table of contents

- -
- -

Synopsis

-
npm owner add <user> <package-spec>
-npm owner rm <user> <package-spec>
-npm owner ls <package-spec>
-
-alias: author
-
-

Description

-

Manage ownership of published packages.

-
    -
  • ls: List all the users who have access to modify a package and push new -versions. Handy when you need to know who to bug for help.
  • -
  • add: Add a new user as a maintainer of a package. This user is enabled -to modify metadata, publish new versions, and add other owners.
  • -
  • rm: Remove a user from the package owner list. This immediately revokes -their privileges.
  • -
-

Note that there is only one level of access. Either you can modify a package, -or you can't. Future versions may contain more fine-grained access levels, but -that is not implemented at this time.

-

If you have two-factor authentication enabled with auth-and-writes (see -npm-profile) then you'll need to go through a second factor -flow when changing ownership or include an otp on the command line with --otp.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-pack.html b/node_modules/npm/docs/output/commands/npm-pack.html deleted file mode 100644 index f8f5d78..0000000 --- a/node_modules/npm/docs/output/commands/npm-pack.html +++ /dev/null @@ -1,256 +0,0 @@ - - -npm-pack - - - - - -
-
-

npm-pack

-Create a tarball from a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm pack <package-spec>
-
-

Configuration

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

pack-destination

-
    -
  • Default: "."
  • -
  • Type: String
  • -
-

Directory in which npm pack will save tarballs.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

Description

-

For anything that's installable (that is, a package folder, tarball, -tarball url, git url, name@tag, name@version, name, or scoped name), this -command will fetch it to the cache, copy the tarball to the current working -directory as <name>-<version>.tgz, and then write the filenames out to -stdout.

-

If the same package is specified multiple times, then the file will be -overwritten the second time.

-

If no arguments are supplied, then npm packs the current package folder.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-ping.html b/node_modules/npm/docs/output/commands/npm-ping.html deleted file mode 100644 index 708238b..0000000 --- a/node_modules/npm/docs/output/commands/npm-ping.html +++ /dev/null @@ -1,189 +0,0 @@ - - -npm-ping - - - - - -
-
-

npm-ping

-Ping npm registry -
- -
-

Table of contents

- -
- -

Synopsis

-
npm ping
-
-

Note: This command is unaware of workspaces.

-

Description

-

Ping the configured or given npm registry and verify authentication. -If it works it will output something like:

-
npm notice PING https://registry.npmjs.org/
-npm notice PONG 255ms
-
-

otherwise you will get an error:

-
npm notice PING http://foo.com/
-npm ERR! code E404
-npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true
-
-

Configuration

-

registry

- -

The base URL of the npm registry.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-pkg.html b/node_modules/npm/docs/output/commands/npm-pkg.html deleted file mode 100644 index d60ca0b..0000000 --- a/node_modules/npm/docs/output/commands/npm-pkg.html +++ /dev/null @@ -1,364 +0,0 @@ - - -npm-pkg - - - - - -
-
-

npm-pkg

-Manages your package.json -
- -
-

Table of contents

- -
- -

Synopsis

-
npm pkg set <key>=<value> [<key>=<value> ...]
-npm pkg get [<key> [<key> ...]]
-npm pkg delete <key> [<key> ...]
-npm pkg set [<array>[<index>].<key>=<value> ...]
-npm pkg set [<array>[].<key>=<value> ...]
-npm pkg fix
-
-

Description

-

A command that automates the management of package.json files. -npm pkg provide 3 different sub commands that allow you to modify or retrieve -values for given object keys in your package.json.

-

The syntax to retrieve and set fields is a dot separated representation of -the nested object properties to be found within your package.json, it's the -same notation used in npm view to retrieve information -from the registry manifest, below you can find more examples on how to use it.

-

Returned values are always in json format.

-
    -
  • -

    npm pkg get <field>

    -

    Retrieves a value key, defined in your package.json file.

    -

    For example, in order to retrieve the name of the current package, you -can run:

    -
    npm pkg get name
    -
    -

    It's also possible to retrieve multiple values at once:

    -
    npm pkg get name version
    -
    -

    You can view child fields by separating them with a period. To retrieve -the value of a test script value, you would run the following command:

    -
    npm pkg get scripts.test
    -
    -

    For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor emails for a package, you would run:

    -
    npm pkg get contributors.email
    -
    -

    You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can run:

    -
    npm pkg get contributors[0].email
    -
    -

    For complex fields you can also name a property in square brackets -to specifically select a child field. This is especially helpful -with the exports object:

    -
    npm pkg get "exports[.].require"
    -
    -
  • -
  • -

    npm pkg set <field>=<value>

    -

    Sets a value in your package.json based on the field value. When -saving to your package.json file the same set of rules used during -npm install and other cli commands that touches the package.json file -are used, making sure to respect the existing indentation and possibly -applying some validation prior to saving values to the file.

    -

    The same syntax used to retrieve values from your package can also be used -to define new properties or overriding existing ones, below are some -examples of how the dot separated syntax can be used to edit your -package.json file.

    -

    Defining a new bin named mynewcommand in your package.json that points -to a file cli.js:

    -
    npm pkg set bin.mynewcommand=cli.js
    -
    -

    Setting multiple fields at once is also possible:

    -
    npm pkg set description='Awesome package' engines.node='>=10'
    -
    -

    It's also possible to add to array values, for example to add a new -contributor entry:

    -
    npm pkg set contributors[0].name='Foo' contributors[0].email='foo@bar.ca'
    -
    -

    You may also append items to the end of an array using the special -empty bracket notation:

    -
    npm pkg set contributors[].name='Foo' contributors[].name='Bar'
    -
    -

    It's also possible to parse values as json prior to saving them to your -package.json file, for example in order to set a "private": true -property:

    -
    npm pkg set private=true --json
    -
    -

    It also enables saving values as numbers:

    -
    npm pkg set tap.timeout=60 --json
    -
    -
  • -
  • -

    npm pkg delete <key>

    -

    Deletes a key from your package.json

    -

    The same syntax used to set values from your package can also be used -to remove existing ones. For example, in order to remove a script named -build:

    -
    npm pkg delete scripts.build
    -
    -
  • -
  • -

    npm pkg fix

    -

    Auto corrects common errors in your package.json. npm already -does this during publish, which leads to subtle (mostly harmless) -differences between the contents of your package.json file and the -manifest that npm uses during installation.

    -
  • -
-

Workspaces support

-

You can set/get/delete items across your configured workspaces by using the -workspace or -workspaces config options.

-

For example, setting a funding value across all configured workspaces -of a project:

-
npm pkg set funding=https://example.com --ws
-
-

When using npm pkg get to retrieve info from your configured workspaces, the -returned result will be in a json format in which top level keys are the -names of each workspace, the values of these keys will be the result values -returned from each of the configured workspaces, e.g:

-
npm pkg get name version --ws
-{
-  "a": {
-    "name": "a",
-    "version": "1.0.0"
-  },
-  "b": {
-    "name": "b",
-    "version": "1.0.0"
-  }
-}
-
-

Configuration

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engine-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow unpublishing all versions of a published package.
  • -
  • Allow conflicting peerDependencies to be installed in the root project.
  • -
  • Implicitly set --yes during npm init.
  • -
  • Allow clobbering existing values in npm pkg
  • -
  • Allow unpublishing of entire packages (not just a single version).
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-prefix.html b/node_modules/npm/docs/output/commands/npm-prefix.html deleted file mode 100644 index 41789e3..0000000 --- a/node_modules/npm/docs/output/commands/npm-prefix.html +++ /dev/null @@ -1,200 +0,0 @@ - - -npm-prefix - - - - - -
-
-

npm-prefix

-Display prefix -
- -
-

Table of contents

- -
- -

Synopsis

-
npm prefix [-g]
-
-

Note: This command is unaware of workspaces.

-

Description

-

Print the local prefix to standard output. This is the closest parent directory -to contain a package.json file or node_modules directory, unless -g is -also specified.

-

If -g is specified, this will be the value of the global prefix. See -npm config for more detail.

-

Example

-
npm prefix
-/usr/local/projects/foo
-
-
npm prefix -g
-/usr/local
-
-

Configuration

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-profile.html b/node_modules/npm/docs/output/commands/npm-profile.html deleted file mode 100644 index a6283ae..0000000 --- a/node_modules/npm/docs/output/commands/npm-profile.html +++ /dev/null @@ -1,272 +0,0 @@ - - -npm-profile - - - - - -
-
-

npm-profile

-Change settings on your registry profile -
- -
-

Table of contents

- -
- -

Synopsis

-
npm profile enable-2fa [auth-only|auth-and-writes]
-npm profile disable-2fa
-npm profile get [<key>]
-npm profile set <key> <value>
-
-

Note: This command is unaware of workspaces.

-

Description

-

Change your profile information on the registry. Note that this command -depends on the registry implementation, so third-party registries may not -support this interface.

-
    -
  • npm profile get [<property>]: Display all of the properties of your -profile, or one or more specific properties. It looks like:
  • -
-
+-----------------+---------------------------+
-| name            | example                   |
-+-----------------+---------------------------+
-| email           | me@example.com (verified) |
-+-----------------+---------------------------+
-| two factor auth | auth-and-writes           |
-+-----------------+---------------------------+
-| fullname        | Example User              |
-+-----------------+---------------------------+
-| homepage        |                           |
-+-----------------+---------------------------+
-| freenode        |                           |
-+-----------------+---------------------------+
-| twitter         |                           |
-+-----------------+---------------------------+
-| github          |                           |
-+-----------------+---------------------------+
-| created         | 2015-02-26T01:38:35.892Z  |
-+-----------------+---------------------------+
-| updated         | 2017-10-02T21:29:45.922Z  |
-+-----------------+---------------------------+
-
-
    -
  • -

    npm profile set <property> <value>: Set the value of a profile -property. You can set the following properties this way: email, fullname, -homepage, freenode, twitter, github

    -
  • -
  • -

    npm profile set password: Change your password. This is interactive, -you'll be prompted for your current password and a new password. You'll -also be prompted for an OTP if you have two-factor authentication -enabled.

    -
  • -
  • -

    npm profile enable-2fa [auth-and-writes|auth-only]: Enables two-factor -authentication. Defaults to auth-and-writes mode. Modes are:

    -
      -
    • auth-only: Require an OTP when logging in or making changes to your -account's authentication. The OTP will be required on both the website -and the command line.
    • -
    • auth-and-writes: Requires an OTP at all the times auth-only does, -and also requires one when publishing a module, setting the latest -dist-tag, or changing access via npm access and npm owner.
    • -
    -
  • -
  • -

    npm profile disable-2fa: Disables two-factor authentication.

    -
  • -
-

Details

-

Some of these commands may not be available on non npmjs.com registries.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-prune.html b/node_modules/npm/docs/output/commands/npm-prune.html deleted file mode 100644 index 034257f..0000000 --- a/node_modules/npm/docs/output/commands/npm-prune.html +++ /dev/null @@ -1,304 +0,0 @@ - - -npm-prune - - - - - -
-
-

npm-prune

-Remove extraneous packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm prune [[<@scope>/]<pkg>...]
-
-

Description

-

This command removes "extraneous" packages. If a package name is provided, -then only packages matching one of the supplied names are removed.

-

Extraneous packages are those present in the node_modules folder that are -not listed as any package's dependency list.

-

If the --omit=dev flag is specified or the NODE_ENV environment -variable is set to production, this command will remove the packages -specified in your devDependencies.

-

If the --dry-run flag is used then no changes will actually be made.

-

If the --json flag is used, then the changes npm prune made (or would -have made with --dry-run) are printed as a JSON object.

-

In normal operation, extraneous modules are pruned automatically, so you'll -only need this command with the --production flag. However, in the real -world, operation is not always "normal". When crashes or mistakes happen, -this command can help clean up any resulting garbage.

-

Configuration

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-publish.html b/node_modules/npm/docs/output/commands/npm-publish.html deleted file mode 100644 index 24e715e..0000000 --- a/node_modules/npm/docs/output/commands/npm-publish.html +++ /dev/null @@ -1,350 +0,0 @@ - - -npm-publish - - - - - -
-
-

npm-publish

-Publish a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm publish <package-spec>
-
-

Description

-

Publishes a package to the registry so that it can be installed by name.

-

By default npm will publish to the public registry. This can be -overridden by specifying a different default registry or using a -scope in the name, combined with a -scope-configured registry (see -package.json).

-

A package is interpreted the same way as other commands (like -npm install and can be:

-
    -
  • a) a folder containing a program described by a -package.json file
  • -
  • b) a gzipped tarball containing (a)
  • -
  • c) a url that resolves to (b)
  • -
  • d) a <name>@<version> that is published on the registry (see -registry) with (c)
  • -
  • e) a <name>@<tag> (see npm dist-tag) that -points to (d)
  • -
  • f) a <name> that has a "latest" tag satisfying (e)
  • -
  • g) a <git remote url> that resolves to (a)
  • -
-

The publish will fail if the package name and version combination already -exists in the specified registry.

-

Once a package is published with a given name and version, that specific -name and version combination can never be used again, even if it is removed -with npm unpublish.

-

As of npm@5, both a sha1sum and an integrity field with a sha512sum of the -tarball will be submitted to the registry during publication. Subsequent -installs will use the strongest supported algorithm to verify downloads.

-

Similar to --dry-run see npm pack, which figures -out the files to be included and packs them into a tarball to be uploaded -to the registry.

-

Files included in package

-

To see what will be included in your package, run npm pack --dry-run. All -files are included by default, with the following exceptions:

-
    -
  • -

    Certain files that are relevant to package installation and distribution -are always included. For example, package.json, README.md, -LICENSE, and so on.

    -
  • -
  • -

    If there is a "files" list in -package.json, then only the files -specified will be included. (If directories are specified, then they -will be walked recursively and their contents included, subject to the -same ignore rules.)

    -
  • -
  • -

    If there is a .gitignore or .npmignore file, then ignored files in -that and all child directories will be excluded from the package. If -both files exist, then the .gitignore is ignored, and only the -.npmignore is used.

    -

    .npmignore files follow the same pattern -rules -as .gitignore files

    -
  • -
  • -

    If the file matches certain patterns, then it will never be included, -unless explicitly added to the "files" list in package.json, or -un-ignored with a ! rule in a .npmignore or .gitignore file.

    -
  • -
  • -

    Symbolic links are never included in npm packages.

    -
  • -
-

See developers for full details on what's -included in the published package, as well as details on how the package is -built.

-

Configuration

-

tag

-
    -
  • Default: "latest"
  • -
  • Type: String
  • -
-

If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag.

-

Also the tag that is added to the package@version specified by the npm tag -command, if no explicit tag is given.

-

When used by the npm diff command, this is the tag used to fetch the -tarball that will be compared with the local files by default.

-

access

-
    -
  • Default: 'public' for new packages, existing packages it will not change the -current level
  • -
  • Type: null, "restricted", or "public"
  • -
-

If you do not want your scoped package to be publicly viewable (and -installable) set --access=restricted.

-

Unscoped packages can not be set to restricted.

-

Note: This defaults to not changing the current access level for existing -packages. Specifying a value of restricted or public during publish will -change the access for an existing package the same way that npm access set status would.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

provenance

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from.

-

This config can not be used with: provenance-file

-

provenance-file

-
    -
  • Default: null
  • -
  • Type: Path
  • -
-

When publishing, the provenance bundle at the given path will be used.

-

This config can not be used with: provenance

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-query.html b/node_modules/npm/docs/output/commands/npm-query.html deleted file mode 100644 index cbfccc0..0000000 --- a/node_modules/npm/docs/output/commands/npm-query.html +++ /dev/null @@ -1,365 +0,0 @@ - - -npm-query - - - - - -
-
-

npm-query

-Dependency selector query -
- -
-

Table of contents

- -
- -

Synopsis

-
npm query <selector>
-
-

Description

-

The npm query command allows for usage of css selectors in order to retrieve -an array of dependency objects.

-

Piping npm query to other commands

-
# find all dependencies with postinstall scripts & uninstall them
-npm query ":attr(scripts, [postinstall])" | jq 'map(.name)|join("\n")' -r | xargs -I {} npm uninstall {}
-
-# find all git dependencies & explain who requires them
-npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {}
-
-

Extended Use Cases & Queries

-
// all deps
-*
-
-// all direct deps
-:root > *
-
-// direct production deps
-:root > .prod
-
-// direct development deps
-:root > .dev
-
-// any peer dep of a direct deps
-:root > * > .peer
-
-// any workspace dep
-.workspace
-
-// all workspaces that depend on another workspace
-.workspace > .workspace
-
-// all workspaces that have peer deps
-.workspace:has(.peer)
-
-// any dep named "lodash"
-// equivalent to [name="lodash"]
-#lodash
-
-// any deps named "lodash" & within semver range ^"1.2.3"
-#lodash@^1.2.3
-// equivalent to...
-[name="lodash"]:semver(^1.2.3)
-
-// get the hoisted node for a given semver range
-#lodash@^1.2.3:not(:deduped)
-
-// querying deps with a specific version
-#lodash@2.1.5
-// equivalent to...
-[name="lodash"][version="2.1.5"]
-
-// has any deps
-:has(*)
-
-// deps with no other deps (ie. "leaf" nodes)
-:empty
-
-// manually querying git dependencies
-[repository^=github:],
-[repository^=git:],
-[repository^=https://github.com],
-[repository^=http://github.com],
-[repository^=https://github.com],
-[repository^=+git:...]
-
-// querying for all git dependencies
-:type(git)
-
-// get production dependencies that aren't also dev deps
-.prod:not(.dev)
-
-// get dependencies with specific licenses
-[license=MIT], [license=ISC]
-
-// find all packages that have @ruyadorno as a contributor
-:attr(contributors, [email=ruyadorno@github.com])
-
-

Example Response Output

-
    -
  • an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped
  • -
-
[
-  {
-    "name": "",
-    "version": "",
-    "description": "",
-    "homepage": "",
-    "bugs": {},
-    "author": {},
-    "license": {},
-    "funding": {},
-    "files": [],
-    "main": "",
-    "browser": "",
-    "bin": {},
-    "man": [],
-    "directories": {},
-    "repository": {},
-    "scripts": {},
-    "config": {},
-    "dependencies": {},
-    "devDependencies": {},
-    "optionalDependencies": {},
-    "bundledDependencies": {},
-    "peerDependencies": {},
-    "peerDependenciesMeta": {},
-    "engines": {},
-    "os": [],
-    "cpu": [],
-    "workspaces": {},
-    "keywords": [],
-    ...
-  },
-  ...
-
-

Package lock only mode

-

If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines).

-

Package lock only mode

-

If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines).

-

Configuration

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-rebuild.html b/node_modules/npm/docs/output/commands/npm-rebuild.html deleted file mode 100644 index 3a1a5a4..0000000 --- a/node_modules/npm/docs/output/commands/npm-rebuild.html +++ /dev/null @@ -1,288 +0,0 @@ - - -npm-rebuild - - - - - -
-
-

npm-rebuild

-Rebuild a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm rebuild [<package-spec>] ...]
-
-alias: rb
-
-

Description

-

This command does the following:

-
    -
  1. Execute lifecycle scripts (preinstall, install, postinstall, prepare)
  2. -
  3. Links bins depending on whether bin links are enabled
  4. -
-

This command is particularly useful in scenarios including but not limited to:

-
    -
  1. Installing a new version of node.js, where you need to recompile all your C++ add-ons with the updated binary.
  2. -
  3. Installing with --ignore-scripts and --no-bin-links, to explicitly choose which packages to build and/or link bins.
  4. -
-

If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt.

-

Usually, you should not need to run npm rebuild as it is already done for you as part of npm install (unless you suppressed these steps with --ignore-scripts or --no-bin-links).

-

If there is a binding.gyp file in the root of your package, then npm will use a default install hook:

-
"scripts": {
-    "install": "node-gyp rebuild"
-}
-
-

This default behavior is suppressed if the package.json has its own install or preinstall scripts. It is also suppressed if the package specifies "gypfile": false

-

Configuration

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-repo.html b/node_modules/npm/docs/output/commands/npm-repo.html deleted file mode 100644 index 4278ffa..0000000 --- a/node_modules/npm/docs/output/commands/npm-repo.html +++ /dev/null @@ -1,236 +0,0 @@ - - -npm-repo - - - - - -
-
-

npm-repo

-Open package repository page in the browser -
- -
-

Table of contents

- -
- -

Synopsis

-
npm repo [<pkgname> [<pkgname> ...]]
-
-

Description

-

This command tries to guess at the likely location of a package's -repository URL, and then tries to open it using the ---browser config param. If no package name is -provided, it will search for a package.json in the current folder and use the -repository property.

-

Configuration

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: null, Boolean, or String
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

registry

- -

The base URL of the npm registry.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-restart.html b/node_modules/npm/docs/output/commands/npm-restart.html deleted file mode 100644 index 368252f..0000000 --- a/node_modules/npm/docs/output/commands/npm-restart.html +++ /dev/null @@ -1,211 +0,0 @@ - - -npm-restart - - - - - -
-
-

npm-restart

-Restart a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm restart [-- <args>]
-
-

Description

-

This restarts a project. It is equivalent to running npm run-script restart.

-

If the current project has a "restart" script specified in -package.json, then the following scripts will be run:

-
    -
  1. prerestart
  2. -
  3. restart
  4. -
  5. postrestart
  6. -
-

If it does not have a "restart" script specified, but it does have -stop and/or start scripts, then the following scripts will be run:

-
    -
  1. prerestart
  2. -
  3. prestop
  4. -
  5. stop
  6. -
  7. poststop
  8. -
  9. prestart
  10. -
  11. start
  12. -
  13. poststart
  14. -
  15. postrestart
  16. -
-

Configuration

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-root.html b/node_modules/npm/docs/output/commands/npm-root.html deleted file mode 100644 index d300a0c..0000000 --- a/node_modules/npm/docs/output/commands/npm-root.html +++ /dev/null @@ -1,195 +0,0 @@ - - -npm-root - - - - - -
-
-

npm-root

-Display npm root -
- -
-

Table of contents

- -
- -

Synopsis

-
npm root
-
-

Note: This command is unaware of workspaces.

-

Description

-

Print the effective node_modules folder to standard out.

-

Useful for using npm in shell scripts that do things with the -node_modules folder. For example:

-
#!/bin/bash
-global_node_modules="$(npm root --global)"
-echo "Global packages installed in: ${global_node_modules}"
-
-

Configuration

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-run-script.html b/node_modules/npm/docs/output/commands/npm-run-script.html deleted file mode 100644 index bc89b33..0000000 --- a/node_modules/npm/docs/output/commands/npm-run-script.html +++ /dev/null @@ -1,345 +0,0 @@ - - -npm-run-script - - - - - -
-
-

npm-run-script

-Run arbitrary package scripts -
- -
-

Table of contents

- -
- -

Synopsis

-
npm run-script <command> [-- <args>]
-
-aliases: run, rum, urn
-
-

Description

-

This runs an arbitrary command from a package's "scripts" object. If no -"command" is provided, it will list the available scripts.

-

run[-script] is used by the test, start, restart, and stop commands, but -can be called directly, as well. When the scripts in the package are -printed out, they're separated into lifecycle (test, start, restart) and -directly-run scripts.

-

Any positional arguments are passed to the specified script. Use -- to -pass --prefixed flags and options which would otherwise be parsed by npm.

-

For example:

-
npm run test -- --grep="pattern"
-
-

The arguments will only be passed to the script specified after npm run -and not to any pre or post script.

-

The env script is a special built-in command that can be used to list -environment variables that will be available to the script at runtime. If an -"env" command is defined in your package, it will take precedence over the -built-in.

-

In addition to the shell's pre-existing PATH, npm run adds -node_modules/.bin to the PATH provided to scripts. Any binaries -provided by locally-installed dependencies can be used without the -node_modules/.bin prefix. For example, if there is a devDependency on -tap in your package, you should write:

-
"scripts": {"test": "tap test/*.js"}
-
-

instead of

-
"scripts": {"test": "node_modules/.bin/tap test/*.js"}
-
-

The actual shell your script is run within is platform dependent. By default, -on Unix-like systems it is the /bin/sh command, on Windows it is -cmd.exe. -The actual shell referred to by /bin/sh also depends on the system. -You can customize the shell with the -script-shell config.

-

Scripts are run from the root of the package folder, regardless of what the -current working directory is when npm run is called. If you want your -script to use different behavior based on what subdirectory you're in, you -can use the INIT_CWD environment variable, which holds the full path you -were in when you ran npm run.

-

npm run sets the NODE environment variable to the node executable -with which npm is executed.

-

If you try to run a script without having a node_modules directory and it -fails, you will be given a warning to run npm install, just in case you've -forgotten.

-

Workspaces support

-

You may use the workspace or -workspaces configs in order to run an -arbitrary command from a package's "scripts" object in the context of the -specified workspaces. If no "command" is provided, it will list the available -scripts for each of these configured workspaces.

-

Given a project with configured workspaces, e.g:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-   +-- b
-   |   `-- package.json
-   `-- c
-       `-- package.json
-
-

Assuming the workspace configuration is properly set up at the root level -package.json file. e.g:

-
{
-    "workspaces": [ "./packages/*" ]
-}
-
-

And that each of the configured workspaces has a configured test script, -we can run tests in all of them using the -workspaces config:

-
npm test --workspaces
-
-

Filtering workspaces

-

It's also possible to run a script in a single workspace using the workspace -config along with a name or directory path:

-
npm test --workspace=a
-
-

The workspace config can also be specified multiple times in order to run a -specific script in the context of multiple workspaces. When defining values for -the workspace config in the command line, it also possible to use -w as a -shorthand, e.g:

-
npm test -w a -w b
-
-

This last command will run test in both ./packages/a and ./packages/b -packages.

-

Configuration

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

if-present

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm will not exit with an error code when run-script is invoked -for a script that isn't defined in the scripts section of package.json. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup.

-

This value is not exported to the environment for child processes.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-sbom.html b/node_modules/npm/docs/output/commands/npm-sbom.html deleted file mode 100644 index 0130278..0000000 --- a/node_modules/npm/docs/output/commands/npm-sbom.html +++ /dev/null @@ -1,439 +0,0 @@ - - -npm-sbom - - - - - -
-
-

npm-sbom

-Generate a Software Bill of Materials (SBOM) -
- -
-

Table of contents

- -
- -

Synopsis

-
npm sbom
-
-

Description

-

The npm sbom command generates a Software Bill of Materials (SBOM) listing the -dependencies for the current project. SBOMs can be generated in either -SPDX or CycloneDX format.

-

Example CycloneDX SBOM

-
{
-  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
-  "bomFormat": "CycloneDX",
-  "specVersion": "1.5",
-  "serialNumber": "urn:uuid:09f55116-97e1-49cf-b3b8-44d0207e7730",
-  "version": 1,
-  "metadata": {
-    "timestamp": "2023-09-01T00:00:00.001Z",
-    "lifecycles": [
-      {
-        "phase": "build"
-      }
-    ],
-    "tools": [
-      {
-        "vendor": "npm",
-        "name": "cli",
-        "version": "10.1.0"
-      }
-    ],
-    "component": {
-      "bom-ref": "simple@1.0.0",
-      "type": "library",
-      "name": "simple",
-      "version": "1.0.0",
-      "scope": "required",
-      "author": "John Doe",
-      "description": "simple react app",
-      "purl": "pkg:npm/simple@1.0.0",
-      "properties": [
-        {
-          "name": "cdx:npm:package:path",
-          "value": ""
-        }
-      ],
-      "externalReferences": [],
-      "licenses": [
-        {
-          "license": {
-            "id": "MIT"
-          }
-        }
-      ]
-    }
-  },
-  "components": [
-    {
-      "bom-ref": "lodash@4.17.21",
-      "type": "library",
-      "name": "lodash",
-      "version": "4.17.21",
-      "scope": "required",
-      "author": "John-David Dalton",
-      "description": "Lodash modular utilities.",
-      "purl": "pkg:npm/lodash@4.17.21",
-      "properties": [
-        {
-          "name": "cdx:npm:package:path",
-          "value": "node_modules/lodash"
-        }
-      ],
-      "externalReferences": [
-        {
-          "type": "distribution",
-          "url": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
-        },
-        {
-          "type": "vcs",
-          "url": "git+https://github.com/lodash/lodash.git"
-        },
-        {
-          "type": "website",
-          "url": "https://lodash.com/"
-        },
-        {
-          "type": "issue-tracker",
-          "url": "https://github.com/lodash/lodash/issues"
-        }
-      ],
-      "hashes": [
-        {
-          "alg": "SHA-512",
-          "content": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a"
-        }
-      ],
-      "licenses": [
-        {
-          "license": {
-            "id": "MIT"
-          }
-        }
-      ]
-    }
-  ],
-  "dependencies": [
-    {
-      "ref": "simple@1.0.0",
-      "dependsOn": [
-        "lodash@4.17.21"
-      ]
-    },
-    {
-      "ref": "lodash@4.17.21",
-      "dependsOn": []
-    }
-  ]
-}
-
-

Example SPDX SBOM

-
{
-  "spdxVersion": "SPDX-2.3",
-  "dataLicense": "CC0-1.0",
-  "SPDXID": "SPDXRef-DOCUMENT",
-  "name": "simple@1.0.0",
-  "documentNamespace": "http://spdx.org/spdxdocs/simple-1.0.0-bf81090e-8bbc-459d-bec9-abeb794e096a",
-  "creationInfo": {
-    "created": "2023-09-01T00:00:00.001Z",
-    "creators": [
-      "Tool: npm/cli-10.1.0"
-    ]
-  },
-  "documentDescribes": [
-    "SPDXRef-Package-simple-1.0.0"
-  ],
-  "packages": [
-    {
-      "name": "simple",
-      "SPDXID": "SPDXRef-Package-simple-1.0.0",
-      "versionInfo": "1.0.0",
-      "packageFileName": "",
-      "description": "simple react app",
-      "primaryPackagePurpose": "LIBRARY",
-      "downloadLocation": "NOASSERTION",
-      "filesAnalyzed": false,
-      "homepage": "NOASSERTION",
-      "licenseDeclared": "MIT",
-      "externalRefs": [
-        {
-          "referenceCategory": "PACKAGE-MANAGER",
-          "referenceType": "purl",
-          "referenceLocator": "pkg:npm/simple@1.0.0"
-        }
-      ]
-    },
-    {
-      "name": "lodash",
-      "SPDXID": "SPDXRef-Package-lodash-4.17.21",
-      "versionInfo": "4.17.21",
-      "packageFileName": "node_modules/lodash",
-      "description": "Lodash modular utilities.",
-      "downloadLocation": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
-      "filesAnalyzed": false,
-      "homepage": "https://lodash.com/",
-      "licenseDeclared": "MIT",
-      "externalRefs": [
-        {
-          "referenceCategory": "PACKAGE-MANAGER",
-          "referenceType": "purl",
-          "referenceLocator": "pkg:npm/lodash@4.17.21"
-        }
-      ],
-      "checksums": [
-        {
-          "algorithm": "SHA512",
-          "checksumValue": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a"
-        }
-      ]
-    }
-  ],
-  "relationships": [
-    {
-      "spdxElementId": "SPDXRef-DOCUMENT",
-      "relatedSpdxElement": "SPDXRef-Package-simple-1.0.0",
-      "relationshipType": "DESCRIBES"
-    },
-    {
-      "spdxElementId": "SPDXRef-Package-simple-1.0.0",
-      "relatedSpdxElement": "SPDXRef-Package-lodash-4.17.21",
-      "relationshipType": "DEPENDS_ON"
-    }
-  ]
-}
-
-

Package lock only mode

-

If package-lock-only is enabled, only the information in the package -lock (or shrinkwrap) is loaded. This means that information from the -package.json files of your dependencies will not be included in the -result set (e.g. description, homepage, engines).

-

Configuration

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

sbom-format

-
    -
  • Default: null
  • -
  • Type: "cyclonedx" or "spdx"
  • -
-

SBOM format to use when generating SBOMs.

-

sbom-type

-
    -
  • Default: "library"
  • -
  • Type: "library", "application", or "framework"
  • -
-

The type of package described by the generated SBOM. For SPDX, this is the -value for the primaryPackagePurpose field. For CycloneDX, this is the -value for the type field.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-search.html b/node_modules/npm/docs/output/commands/npm-search.html deleted file mode 100644 index 16fe0a5..0000000 --- a/node_modules/npm/docs/output/commands/npm-search.html +++ /dev/null @@ -1,272 +0,0 @@ - - -npm-search - - - - - -
-
-

npm-search

-Search for packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm search [search terms ...]
-
-aliases: find, s, se
-
-

Note: This command is unaware of workspaces.

-

Description

-

Search the registry for packages matching the search terms. npm search -performs a linear, incremental, lexically-ordered search through package -metadata for all files in the registry. If your terminal has color -support, it will further highlight the matches in the results. This can -be disabled with the config item color

-

Additionally, using the --searchopts and --searchexclude options -paired with more search terms will include and exclude further patterns. -The main difference between --searchopts and the standard search terms -is that the former does not highlight results in the output and you can -use them more fine-grained filtering. Additionally, you can add both of -these to your config to change default search filtering behavior.

-

Search also allows targeting of maintainers in search results, by prefixing -their npm username with =.

-

If a term starts with /, then it's interpreted as a regular expression -and supports standard JavaScript RegExp syntax. In this case search will -ignore a trailing / . (Note you must escape or quote many regular -expression characters in most shells.)

-

Configuration

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

color

-
    -
  • Default: true unless the NO_COLOR environ is set to something other than '0'
  • -
  • Type: "always" or Boolean
  • -
-

If false, never shows colors. If "always" then always shows colors. If -true, then only prints color codes for tty file descriptors.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

description

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Show the description in npm search

-

searchopts

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that are always passed to search.

-

searchexclude

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that limit the results from search.

-

registry

- -

The base URL of the npm registry.

-

prefer-online

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data.

-

prefer-offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use ---offline.

-

offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see --prefer-offline.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-shrinkwrap.html b/node_modules/npm/docs/output/commands/npm-shrinkwrap.html deleted file mode 100644 index fd219fe..0000000 --- a/node_modules/npm/docs/output/commands/npm-shrinkwrap.html +++ /dev/null @@ -1,182 +0,0 @@ - - -npm-shrinkwrap - - - - - -
-
-

npm-shrinkwrap

-Lock down dependency versions for publication -
- -
-

Table of contents

- -
- -

Synopsis

-
npm shrinkwrap
-
-

Note: This command is unaware of workspaces.

-

Description

-

This command repurposes package-lock.json into a publishable -npm-shrinkwrap.json or simply creates a new one. The file created and -updated by this command will then take precedence over any other existing -or future package-lock.json files. For a detailed explanation of the -design and purpose of package locks in npm, see -package-lock-json.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-star.html b/node_modules/npm/docs/output/commands/npm-star.html deleted file mode 100644 index 58f8c09..0000000 --- a/node_modules/npm/docs/output/commands/npm-star.html +++ /dev/null @@ -1,209 +0,0 @@ - - -npm-star - - - - - -
-
-

npm-star

-Mark your favorite packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm star [<package-spec>...]
-
-

Note: This command is unaware of workspaces.

-

Description

-

"Starring" a package means that you have some interest in it. It's -a vaguely positive way to show that you care.

-

It's a boolean thing. Starring repeatedly has no additional effect.

-

More

-

There's also these extra commands to help you manage your favorite packages:

-

Unstar

-

You can also "unstar" a package using npm unstar

-

"Unstarring" is the same thing, but in reverse.

-

Listing stars

-

You can see all your starred packages using npm stars

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale, -as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-stars.html b/node_modules/npm/docs/output/commands/npm-stars.html deleted file mode 100644 index 18ffb85..0000000 --- a/node_modules/npm/docs/output/commands/npm-stars.html +++ /dev/null @@ -1,185 +0,0 @@ - - -npm-stars - - - - - -
-
-

npm-stars

-View packages marked as favorites -
- -
-

Table of contents

- -
- -

Synopsis

-
npm stars [<user>]
-
-

Note: This command is unaware of workspaces.

-

Description

-

If you have starred a lot of neat things and want to find them again -quickly this command lets you do just that.

-

You may also want to see your friend's favorite packages, in this case -you will most certainly enjoy this command.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-start.html b/node_modules/npm/docs/output/commands/npm-start.html deleted file mode 100644 index 79647ed..0000000 --- a/node_modules/npm/docs/output/commands/npm-start.html +++ /dev/null @@ -1,214 +0,0 @@ - - -npm-start - - - - - -
-
-

npm-start

-Start a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm start [-- <args>]
-
-

Description

-

This runs a predefined command specified in the "start" property of -a package's "scripts" object.

-

If the "scripts" object does not define a "start" property, npm -will run node server.js.

-

Note that this is different from the default node behavior of running -the file specified in a package's "main" attribute when evoking with -node .

-

As of npm@2.0.0, you can -use custom arguments when executing scripts. Refer to npm run-script for more details.

-

Example

-
{
-  "scripts": {
-    "start": "node foo.js"
-  }
-}
-
-
npm start
-
-> npm@x.x.x start
-> node foo.js
-
-(foo.js output would be here)
-
-
-

Configuration

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-stop.html b/node_modules/npm/docs/output/commands/npm-stop.html deleted file mode 100644 index a744a63..0000000 --- a/node_modules/npm/docs/output/commands/npm-stop.html +++ /dev/null @@ -1,209 +0,0 @@ - - -npm-stop - - - - - -
-
-

npm-stop

-Stop a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm stop [-- <args>]
-
-

Description

-

This runs a predefined command specified in the "stop" property of a -package's "scripts" object.

-

Unlike with npm start, there is no default script -that will run if the "stop" property is not defined.

-

Example

-
{
-  "scripts": {
-    "stop": "node bar.js"
-  }
-}
-
-
npm stop
-
-> npm@x.x.x stop
-> node bar.js
-
-(bar.js output would be here)
-
-
-

Configuration

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-team.html b/node_modules/npm/docs/output/commands/npm-team.html deleted file mode 100644 index 6752bb3..0000000 --- a/node_modules/npm/docs/output/commands/npm-team.html +++ /dev/null @@ -1,272 +0,0 @@ - - -npm-team - - - - - -
-
-

npm-team

-Manage organization teams and team memberships -
- -
-

Table of contents

- -
- -

Synopsis

-
npm team create <scope:team> [--otp <otpcode>]
-npm team destroy <scope:team> [--otp <otpcode>]
-npm team add <scope:team> <user> [--otp <otpcode>]
-npm team rm <scope:team> <user> [--otp <otpcode>]
-npm team ls <scope>|<scope:team>
-
-

Note: This command is unaware of workspaces.

-

Description

-

Used to manage teams in organizations, and change team memberships. Does not -handle permissions for packages.

-

Teams must always be fully qualified with the organization/scope they belong to -when operating on them, separated by a colon (:). That is, if you have a -newteam team in an org organization, you must always refer to that team -as @org:newteam in these commands.

-

If you have two-factor authentication enabled in auth-and-writes mode, then -you can provide a code from your authenticator with [--otp <otpcode>]. -If you don't include this then you will be taken through a second factor flow based -on your authtype.

-
    -
  • -

    create / destroy: -Create a new team, or destroy an existing one. Note: You cannot remove the -developers team, learn more.

    -

    Here's how to create a new team newteam under the org org:

    -
    npm team create @org:newteam
    -
    -

    You should see a confirming message such as: +@org:newteam once the new -team has been created.

    -
  • -
  • -

    add: -Add a user to an existing team.

    -

    Adding a new user username to a team named newteam under the org org:

    -
    npm team add @org:newteam username
    -
    -

    On success, you should see a message: username added to @org:newteam

    -
  • -
  • -

    rm: -Using npm team rm you can also remove users from a team they belong to.

    -

    Here's an example removing user username from newteam team -in org organization:

    -
    npm team rm @org:newteam username
    -
    -

    Once the user is removed a confirmation message is displayed: -username removed from @org:newteam

    -
  • -
  • -

    ls: -If performed on an organization name, will return a list of existing teams -under that organization. If performed on a team, it will instead return a list -of all users belonging to that particular team.

    -

    Here's an example of how to list all teams from an org named org:

    -
    npm team ls @org
    -
    -

    Example listing all members of a team named newteam:

    -
    npm team ls @org:newteam
    -
    -
  • -
-

Details

-

npm team always operates directly on the current registry, configurable from -the command line using --registry=<registry url>.

-

You must be a team admin to create teams and manage team membership, under -the given organization. Listing teams and team memberships may be done by -any member of the organization.

-

Organization creation and management of team admins and organization members -is done through the website, not the npm CLI.

-

To use teams to manage permissions on packages belonging to your organization, -use the npm access command to grant or revoke the appropriate permissions.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-test.html b/node_modules/npm/docs/output/commands/npm-test.html deleted file mode 100644 index 6e1732a..0000000 --- a/node_modules/npm/docs/output/commands/npm-test.html +++ /dev/null @@ -1,207 +0,0 @@ - - -npm-test - - - - - -
-
-

npm-test

-Test a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm test [-- <args>]
-
-aliases: tst, t
-
-

Description

-

This runs a predefined command specified in the "test" property of -a package's "scripts" object.

-

Example

-
{
-  "scripts": {
-    "test": "node test.js"
-  }
-}
-
-
npm test
-> npm@x.x.x test
-> node test.js
-
-(test.js output would be here)
-
-

Configuration

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-token.html b/node_modules/npm/docs/output/commands/npm-token.html deleted file mode 100644 index 44f94ec..0000000 --- a/node_modules/npm/docs/output/commands/npm-token.html +++ /dev/null @@ -1,266 +0,0 @@ - - -npm-token - - - - - -
-
-

npm-token

-Manage your authentication tokens -
- -
-

Table of contents

- -
- -

Synopsis

-
npm token list
-npm token revoke <id|token>
-npm token create [--read-only] [--cidr=list]
-
-

Note: This command is unaware of workspaces.

-

Description

-

This lets you list, create and revoke authentication tokens.

-
    -
  • npm token list: -Shows a table of all active authentication tokens. You can request -this as JSON with --json or tab-separated values with --parseable.
  • -
-
+--------+---------+------------+----------+----------------+
-| id     | token   | created    | read-only | CIDR whitelist |
-+--------+---------+------------+----------+----------------+
-| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |
-+--------+---------+------------+----------+----------------+
-| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |
-+--------+---------+------------+----------+----------------+
-| e0cf92 | 3a436a… | 2017-10-02 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 63eb9d | 74ef35… | 2017-09-28 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 68c2fe | 127e51… | 2017-09-23 | no       |                |
-+--------+---------+------------+----------+----------------+
-| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |
-+--------+---------+------------+----------+----------------+
-
-
    -
  • -

    npm token create [--read-only] [--cidr=<cidr-ranges>]: -Create a new authentication token. It can be --read-only, or accept -a list of -CIDR -ranges with which to limit use of this token. This will prompt you for -your password, and, if you have two-factor authentication enabled, an -otp.

    -

    Currently, the cli can not generate automation tokens. Please refer to -the docs -website -for more information on generating automation tokens.

    -
  • -
-
+----------------+--------------------------------------+
-| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
-+----------------+--------------------------------------+
-| cidr_whitelist |                                      |
-+----------------+--------------------------------------+
-| readonly       | false                                |
-+----------------+--------------------------------------+
-| created        | 2017-10-02T07:52:24.838Z             |
-+----------------+--------------------------------------+
-
-
    -
  • npm token revoke <token|id>: -Immediately removes an authentication token from the registry. You -will no longer be able to use it. This can accept both complete -tokens (such as those you get back from npm token create, and those -found in your .npmrc), and ids as seen in the parseable or json -output of npm token list. This will NOT accept the truncated token -found in the normal npm token list output.
  • -
-

Configuration

-

read-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

This is used to mark a token as unable to publish when configuring limited -access tokens with the npm token create command.

-

cidr

-
    -
  • Default: null
  • -
  • Type: null or String (can be set multiple times)
  • -
-

This is a list of CIDR address to be used when configuring limited access -tokens with the npm token create command.

-

registry

- -

The base URL of the npm registry.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-uninstall.html b/node_modules/npm/docs/output/commands/npm-uninstall.html deleted file mode 100644 index 4a4e6c2..0000000 --- a/node_modules/npm/docs/output/commands/npm-uninstall.html +++ /dev/null @@ -1,278 +0,0 @@ - - -npm-uninstall - - - - - -
-
-

npm-uninstall

-Remove a package -
- -
-

Table of contents

- -
- -

Synopsis

-
npm uninstall [<@scope>/]<pkg>...
-
-aliases: unlink, remove, rm, r, un
-
-

Description

-

This uninstalls a package, completely removing everything npm installed -on its behalf.

-

It also removes the package from the dependencies, devDependencies, -optionalDependencies, and peerDependencies objects in your -package.json.

-

Further, if you have an npm-shrinkwrap.json or package-lock.json, npm -will update those files as well.

-

--no-save will tell npm not to remove the package from your -package.json, npm-shrinkwrap.json, or package-lock.json files.

-

--save or -S will tell npm to remove the package from your -package.json, npm-shrinkwrap.json, and package-lock.json files. -This is the default, but you may need to use this if you have for -instance save=false in your npmrc file

-

In global mode (ie, with -g or --global appended to the command), -it uninstalls the current package context as a global package. ---no-save is ignored in this case.

-

Scope is optional and follows the usual rules for scope.

-

Examples

-
npm uninstall sax
-
-

sax will no longer be in your package.json, npm-shrinkwrap.json, or -package-lock.json files.

-
npm uninstall lodash --no-save
-
-

lodash will not be removed from your package.json, -npm-shrinkwrap.json, or package-lock.json files.

-

Configuration

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-unpublish.html b/node_modules/npm/docs/output/commands/npm-unpublish.html deleted file mode 100644 index cf952c5..0000000 --- a/node_modules/npm/docs/output/commands/npm-unpublish.html +++ /dev/null @@ -1,267 +0,0 @@ - - -npm-unpublish - - - - - -
-
-

npm-unpublish

-Remove a package from the registry -
- -
-

Table of contents

- -
- -

Synopsis

-
npm unpublish [<package-spec>]
-
-

To learn more about how the npm registry treats unpublish, see our -unpublish policies.

-

Warning

-

Consider using the deprecate command instead, -if your intent is to encourage users to upgrade, or if you no longer -want to maintain a package.

-

Description

-

This removes a package version from the registry, deleting its entry and -removing the tarball.

-

The npm registry will return an error if you are not logged -in.

-

If you do not specify a package name at all, the name and version to be -unpublished will be pulled from the project in the current directory.

-

If you specify a package name but do not specify a version or if you -remove all of a package's versions then the registry will remove the -root package entry entirely.

-

Even if you unpublish a package version, that specific name and version -combination can never be reused. In order to publish the package again, -you must use a new version number. If you unpublish the entire package, -you may not publish any new versions of that package until 24 hours have -passed.

-

Configuration

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engine-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow unpublishing all versions of a published package.
  • -
  • Allow conflicting peerDependencies to be installed in the root project.
  • -
  • Implicitly set --yes during npm init.
  • -
  • Allow clobbering existing values in npm pkg
  • -
  • Allow unpublishing of entire packages (not just a single version).
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-unstar.html b/node_modules/npm/docs/output/commands/npm-unstar.html deleted file mode 100644 index 602e555..0000000 --- a/node_modules/npm/docs/output/commands/npm-unstar.html +++ /dev/null @@ -1,206 +0,0 @@ - - -npm-unstar - - - - - -
-
-

npm-unstar

-Remove an item from your favorite packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm unstar [<package-spec>...]
-
-

Note: This command is unaware of workspaces.

-

Description

-

"Unstarring" a package is the opposite of npm star, -it removes an item from your list of favorite packages.

-

More

-

There's also these extra commands to help you manage your favorite packages:

-

Star

-

You can "star" a package using npm star

-

Listing stars

-

You can see all your starred packages using npm stars

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale, -as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-update.html b/node_modules/npm/docs/output/commands/npm-update.html deleted file mode 100644 index f471762..0000000 --- a/node_modules/npm/docs/output/commands/npm-update.html +++ /dev/null @@ -1,486 +0,0 @@ - - -npm-update - - - - - -
-
-

npm-update

-Update packages -
- -
-

Table of contents

- -
- -

Synopsis

-
npm update [<pkg>...]
-
-aliases: up, upgrade, udpate
-
-

Description

-

This command will update all the packages listed to the latest version -(specified by the tag config), respecting the semver -constraints of both your package and its dependencies (if they also require the -same package).

-

It will also install missing packages.

-

If the -g flag is specified, this command will update globally installed -packages.

-

If no package name is specified, all packages in the specified location (global -or local) will be updated.

-

Note that by default npm update will not update the semver values of direct -dependencies in your project package.json, if you want to also update -values in package.json you can run: npm update --save (or add the -save=true option to a configuration file -to make that the default behavior).

-

Example

-

For the examples below, assume that the current package is app and it depends -on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 -are:

-
{
-  "dist-tags": { "latest": "1.2.2" },
-  "versions": [
-    "1.2.2",
-    "1.2.1",
-    "1.2.0",
-    "1.1.2",
-    "1.1.1",
-    "1.0.0",
-    "0.4.1",
-    "0.4.0",
-    "0.2.0"
-  ]
-}
-
-

Caret Dependencies

-

If app's package.json contains:

-
"dependencies": {
-  "dep1": "^1.1.1"
-}
-
-

Then npm update will install dep1@1.2.2, because 1.2.2 is latest and -1.2.2 satisfies ^1.1.1.

-

Tilde Dependencies

-

However, if app's package.json contains:

-
"dependencies": {
-  "dep1": "~1.1.1"
-}
-
-

In this case, running npm update will install dep1@1.1.2. Even though the -latest tag points to 1.2.2, this version do not satisfy ~1.1.1, which is -equivalent to >=1.1.1 <1.2.0. So the highest-sorting version that satisfies -~1.1.1 is used, which is 1.1.2.

-

Caret Dependencies below 1.0.0

-

Suppose app has a caret dependency on a version below 1.0.0, for example:

-
"dependencies": {
-  "dep1": "^0.2.0"
-}
-
-

npm update will install dep1@0.2.0, because there are no other -versions which satisfy ^0.2.0.

-

If the dependence were on ^0.4.0:

-
"dependencies": {
-  "dep1": "^0.4.0"
-}
-
-

Then npm update will install dep1@0.4.1, because that is the highest-sorting -version that satisfies ^0.4.0 (>= 0.4.0 <0.5.0)

-

Subdependencies

-

Suppose your app now also has a dependency on dep2

-
{
-  "name": "my-app",
-  "dependencies": {
-      "dep1": "^1.0.0",
-      "dep2": "1.0.0"
-  }
-}
-
-

and dep2 itself depends on this limited range of dep1

-
{
-"name": "dep2",
-  "dependencies": {
-    "dep1": "~1.1.1"
-  }
-}
-
-

Then npm update will install dep1@1.1.2 because that is the highest -version that dep2 allows. npm will prioritize having a single version -of dep1 in your tree rather than two when that single version can -satisfy the semver requirements of multiple dependencies in your tree. -In this case if you really did need your package to use a newer version -you would need to use npm install.

-

Updating Globally-Installed Packages

-

npm update -g will apply the update action to each globally installed -package that is outdated -- that is, has a version that is different from -wanted.

-

Note: Globally installed packages are treated as if they are installed with a -caret semver range specified. So if you require to update to latest you may -need to run npm install -g [<pkg>...]

-

NOTE: If a package has been upgraded to a version newer than latest, it will -be downgraded.

-

Configuration

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-version.html b/node_modules/npm/docs/output/commands/npm-version.html deleted file mode 100644 index 4977af5..0000000 --- a/node_modules/npm/docs/output/commands/npm-version.html +++ /dev/null @@ -1,341 +0,0 @@ - - -npm-version - - - - - -
-
-

npm-version

-Bump a package version -
- -
-

Table of contents

- -
- -

Synopsis

-
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]
-
-alias: verison
-
-

Configuration

-

allow-same-version

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prevents throwing an error when npm version is used to set the new version -to the same value as the current version.

-

commit-hooks

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Run git commit hooks when using the npm version command.

-

git-tag-version

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tag the commit when using the npm version command. Setting this to false -results in no commit being made at all.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

preid

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the rc in 1.2.0-rc.8.

-

sign-git-tag

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then the npm version command will tag the version using --s to add a signature.

-

Note that git requires you to have set up GPG keys in your git configs for -this to work properly.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

workspaces-update

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the node_modules folder.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

Description

-

Run this in a package directory to bump the version and write the new data -back to package.json, package-lock.json, and, if present, -npm-shrinkwrap.json.

-

The newversion argument should be a valid semver string, a valid second -argument to semver.inc (one -of patch, minor, major, prepatch, preminor, premajor, -prerelease), or from-git. In the second case, the existing version will -be incremented by 1 in the specified field. from-git will try to read -the latest git tag, and use that as the new npm version.

-

If run in a git repo, it will also create a version commit and tag. This -behavior is controlled by git-tag-version (see below), and can be -disabled on the command line by running npm --no-git-tag-version version. -It will fail if the working directory is not clean, unless the -f or ---force flag is set.

-

If supplied with -m or --message config option, -npm will use it as a commit message when creating a version commit. If the -message config contains %s then that will be replaced with the resulting -version number. For example:

-
npm version patch -m "Upgrade to %s for reasons"
-
-

If the sign-git-tag config is set, then the -tag will be signed using the -s flag to git. Note that you must have a default -GPG key set up in your git config for this to work properly. For example:

-
$ npm config set sign-git-tag true
-$ npm version patch
-
-You need a passphrase to unlock the secret key for
-user: "isaacs (http://blog.izs.me/) <i@izs.me>"
-2048-bit RSA key, ID 6C481CF6, created 2010-08-31
-
-Enter passphrase:
-
-

If preversion, version, or postversion are in the scripts property -of the package.json, they will be executed as part of running npm version.

-

The exact order of execution is as follows:

-
    -
  1. Check to make sure the git working directory is clean before we get -started. Your scripts may add files to the commit in future steps. -This step is skipped if the --force flag is set.
  2. -
  3. Run the preversion script. These scripts have access to the old -version in package.json. A typical use would be running your full -test suite before deploying. Any files you want added to the commit -should be explicitly added using git add.
  4. -
  5. Bump version in package.json as requested (patch, minor, -major, etc).
  6. -
  7. Run the version script. These scripts have access to the new version -in package.json (so they can incorporate it into file headers in -generated files for example). Again, scripts should explicitly add -generated files to the commit using git add.
  8. -
  9. Commit and tag.
  10. -
  11. Run the postversion script. Use it to clean up the file system or -automatically push the commit and/or tag.
  12. -
-

Take the following example:

-
{
-  "scripts": {
-    "preversion": "npm test",
-    "version": "npm run build && git add -A dist",
-    "postversion": "git push && git push --tags && rm -rf build/temp"
-  }
-}
-
-

This runs all your tests and proceeds only if they pass. Then runs your -build script, and adds everything in the dist directory to the commit. -After the commit, it pushes the new commit and tag up to the server, and -deletes the build/temp directory.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-view.html b/node_modules/npm/docs/output/commands/npm-view.html deleted file mode 100644 index af43193..0000000 --- a/node_modules/npm/docs/output/commands/npm-view.html +++ /dev/null @@ -1,297 +0,0 @@ - - -npm-view - - - - - -
-
-

npm-view

-View registry info -
- -
-

Table of contents

- -
- -

Synopsis

-
npm view [<package-spec>] [<field>[.subfield]...]
-
-aliases: info, show, v
-
-

Description

-

This command shows data about a package and prints it to stdout.

-

As an example, to view information about the connect package from the registry, you would run:

-
npm view connect
-
-

The default version is "latest" if unspecified.

-

Field names can be specified after the package descriptor. -For example, to show the dependencies of the ronn package at version -0.3.5, you could do the following:

-
npm view ronn@0.3.5 dependencies
-
-

By default, npm view shows data about the current project context (by looking for a package.json). -To show field data for the current project use a file path (i.e. .):

-
npm view . dependencies
-
-

You can view child fields by separating them with a period. -To view the git repository URL for the latest version of npm, you would run the following command:

-
npm view npm repository.url
-
-

This makes it easy to view information about a dependency with a bit of -shell scripting. For example, to view all the data about the version of -opts that ronn depends on, you could write the following:

-
npm view opts@$(npm view ronn dependencies.opts)
-
-

For fields that are arrays, requesting a non-numeric field will return -all of the values from the objects in the list. For example, to get all -the contributor email addresses for the express package, you would run:

-
npm view express contributors.email
-
-

You may also use numeric indices in square braces to specifically select -an item in an array field. To just get the email address of the first -contributor in the list, you can run:

-
npm view express contributors[0].email
-
-

If the field value you are querying for is a property of an object, you should run:

-
npm view express time'[4.8.0]'
-
-

Multiple fields may be specified, and will be printed one after another. -For example, to get all the contributor names and email addresses, you -can do this:

-
npm view express contributors.name contributors.email
-
-

"Person" fields are shown as a string if they would be shown as an -object. So, for example, this will show the list of npm contributors in -the shortened string format. (See package.json for more on this.)

-
npm view npm contributors
-
-

If a version range is provided, then data will be printed for every -matching version of the package. This will show which version of jsdom -was required by each matching version of yui3:

-
npm view yui3@'>0.5.4' dependencies.jsdom
-
-

To show the connect package version history, you can do -this:

-
npm view connect versions
-
-

Configuration

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

Output

-

If only a single string field for a single version is output, then it -will not be colorized or quoted, to enable piping the output to -another command. If the field is an object, it will be output as a JavaScript object literal.

-

If the --json flag is given, the outputted fields will be JSON.

-

If the version range matches multiple versions then each printed value -will be prefixed with the version it applies to.

-

If multiple fields are requested, then each of them is prefixed with -the field name.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm-whoami.html b/node_modules/npm/docs/output/commands/npm-whoami.html deleted file mode 100644 index 9e5050b..0000000 --- a/node_modules/npm/docs/output/commands/npm-whoami.html +++ /dev/null @@ -1,185 +0,0 @@ - - -npm-whoami - - - - - -
-
-

npm-whoami

-Display npm username -
- -
-

Table of contents

- -
- -

Synopsis

-
npm whoami
-
-

Note: This command is unaware of workspaces.

-

Description

-

Display the npm username of the currently logged-in user.

-

If logged into a registry that provides token-based authentication, then -connect to the /-/whoami registry endpoint to find the username -associated with the token, and print to standard output.

-

If logged into a registry that uses Basic Auth, then simply print the -username portion of the authentication string.

-

Configuration

-

registry

- -

The base URL of the npm registry.

-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npm.html b/node_modules/npm/docs/output/commands/npm.html deleted file mode 100644 index 8b2b237..0000000 --- a/node_modules/npm/docs/output/commands/npm.html +++ /dev/null @@ -1,296 +0,0 @@ - - -npm - - - - - -
-
-

npm

-javascript package manager -
- -
-

Table of contents

- -
- -

Synopsis

-
npm
-
-

Note: This command is unaware of workspaces.

-

Version

-

10.2.5

-

Description

-

npm is the package manager for the Node JavaScript platform. It puts -modules in place so that node can find them, and manages dependency -conflicts intelligently.

-

It is extremely configurable to support a variety of use cases. Most -commonly, you use it to publish, discover, install, and develop node -programs.

-

Run npm help to get a list of available commands.

-

Important

-

npm comes preconfigured to use npm's public registry at -https://registry.npmjs.org by default. Use of the npm public registry is -subject to terms of use available at -https://docs.npmjs.com/policies/terms.

-

You can configure npm to use any compatible registry you like, and even -run your own registry. Use of someone else's registry is governed by -their terms of use.

-

Introduction

-

You probably got npm because you want to install stuff.

-

The very first thing you will most likely want to run in any node -program is npm install to install its dependencies.

-

You can also run npm install blerg to install the latest version of -"blerg". Check out npm install for more -info. It can do a lot of stuff.

-

Use the npm search command to show everything that's available in the -public registry. Use npm ls to show everything you've installed.

-

Dependencies

-

If a package lists a dependency using a git URL, npm will install that -dependency using the git -command and will generate an error if it is not installed.

-

If one of the packages npm tries to install is a native node module and -requires compiling of C++ Code, npm will use -node-gyp for that task. -For a Unix system, node-gyp -needs Python, make and a buildchain like GCC. On Windows, -Python and Microsoft Visual Studio C++ are needed. For more information -visit the node-gyp repository and -the node-gyp Wiki.

-

Directories

-

See folders to learn about where npm puts -stuff.

-

In particular, npm has two modes of operation:

-
    -
  • local mode: -npm installs packages into the current project directory, which -defaults to the current working directory. Packages install to -./node_modules, and bins to ./node_modules/.bin.
  • -
  • global mode: -npm installs packages into the install prefix at -$npm_config_prefix/lib/node_modules and bins to -$npm_config_prefix/bin.
  • -
-

Local mode is the default. Use -g or --global on any command to -run in global mode instead.

-

Developer Usage

-

If you're using npm to develop and publish your code, check out the -following help topics:

-
    -
  • json: -Make a package.json file. See -package.json.
  • -
  • link: -Links your current working code into Node's path, so that you don't -have to reinstall every time you make a change. Use npm link to do this.
  • -
  • install: -It's a good idea to install things if you don't need the symbolic -link. Especially, installing other peoples code from the registry is -done via npm install
  • -
  • adduser: -Create an account or log in. When you do this, npm will store -credentials in the user config file.
  • -
  • publish: -Use the npm publish command to upload your -code to the registry.
  • -
-

Configuration

-

npm is extremely configurable. It reads its configuration options from -5 places.

-
    -
  • Command line switches: -Set a config with --key val. All keys take a value, even if they -are booleans (the config parser doesn't know what the options are at -the time of parsing). If you do not provide a value (--key) then -the option is set to boolean true.
  • -
  • Environment Variables: -Set any config by prefixing the name in an environment variable with -npm_config_. For example, export npm_config_key=val.
  • -
  • User Configs: -The file at $HOME/.npmrc is an ini-formatted list of configs. If -present, it is parsed. If the userconfig option is set in the cli -or env, that file will be used instead.
  • -
  • Global Configs: -The file found at ./etc/npmrc (relative to the global prefix will be -parsed if it is found. See npm prefix for -more info on the global prefix. If the globalconfig option is set -in the cli, env, or user config, then that file is parsed instead.
  • -
  • Defaults: -npm's default configuration options are defined in -lib/utils/config/definitions.js. These must not be changed.
  • -
-

See config for much much more information.

-

Contributions

-

Patches welcome!

-

If you would like to help, but don't know what to work on, read the -contributing -guidelines and -check the issues list.

-

Bugs

-

When you find issues, please report them: -https://github.com/npm/cli/issues

-

Please be sure to follow the template and bug reporting guidelines.

-

Feature Requests

-

Discuss new feature ideas on our discussion forum:

- -

Or suggest formal RFC proposals:

- -

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/commands/npx.html b/node_modules/npm/docs/output/commands/npx.html deleted file mode 100644 index 54d59ca..0000000 --- a/node_modules/npm/docs/output/commands/npx.html +++ /dev/null @@ -1,284 +0,0 @@ - - -npx - - - - - -
-
-

npx

-Run a command from a local or remote npm package -
- -
-

Table of contents

- -
- -

Synopsis

-
npx -- <pkg>[@<version>] [args...]
-npx --package=<pkg>[@<version>] -- <cmd> [args...]
-npx -c '<cmd> [args...]'
-npx --package=foo -c '<cmd> [args...]'
-
-

Description

-

This command allows you to run an arbitrary command from an npm package -(either one installed locally, or fetched remotely), in a similar context -as running it via npm run.

-

Whatever packages are specified by the --package option will be -provided in the PATH of the executed command, along with any locally -installed package executables. The --package option may be -specified multiple times, to execute the supplied command in an environment -where all specified packages are available.

-

If any requested packages are not present in the local project -dependencies, then they are installed to a folder in the npm cache, which -is added to the PATH environment variable in the executed process. A -prompt is printed (which can be suppressed by providing either --yes or ---no).

-

Package names provided without a specifier will be matched with whatever -version exists in the local project. Package names with a specifier will -only be considered a match if they have the exact same name and version as -the local dependency.

-

If no -c or --call option is provided, then the positional arguments -are used to generate the command string. If no --package options -are provided, then npm will attempt to determine the executable name from -the package specifier provided as the first positional argument according -to the following heuristic:

-
    -
  • If the package has a single entry in its bin field in package.json, -or if all entries are aliases of the same command, then that command -will be used.
  • -
  • If the package has multiple bin entries, and one of them matches the -unscoped portion of the name field, then that command will be used.
  • -
  • If this does not result in exactly one option (either because there are -no bin entries, or none of them match the name of the package), then -npm exec exits with an error.
  • -
-

To run a binary other than the named binary, specify one or more ---package options, which will prevent npm from inferring the package from -the first command argument.

-

npx vs npm exec

-

When run via the npx binary, all flags and options must be set prior to -any positional arguments. When run via npm exec, a double-hyphen -- -flag can be used to suppress npm's parsing of switches and options that -should be sent to the executed command.

-

For example:

-
$ npx foo@latest bar --package=@npmcli/foo
-
-

In this case, npm will resolve the foo package name, and run the -following command:

-
$ foo bar --package=@npmcli/foo
-
-

Since the --package option comes after the positional arguments, it is -treated as an argument to the executed command.

-

In contrast, due to npm's argument parsing logic, running this command is -different:

-
$ npm exec foo@latest bar --package=@npmcli/foo
-
-

In this case, npm will parse the --package option first, resolving the -@npmcli/foo package. Then, it will execute the following command in that -context:

-
$ foo@latest bar
-
-

The double-hyphen character is recommended to explicitly tell npm to stop -parsing command line options and switches. The following command would -thus be equivalent to the npx command above:

-
$ npm exec -- foo@latest bar --package=@npmcli/foo
-
-

Examples

-

Run the version of tap in the local dependencies, with the provided -arguments:

-
$ npm exec -- tap --bail test/foo.js
-$ npx tap --bail test/foo.js
-
-

Run a command other than the command whose name matches the package name -by specifying a --package option:

-
$ npm exec --package=foo -- bar --bar-argument
-# ~ or ~
-$ npx --package=foo bar --bar-argument
-
-

Run an arbitrary shell script, in the context of the current project:

-
$ npm x -c 'eslint && say "hooray, lint passed"'
-$ npx -c 'eslint && say "hooray, lint passed"'
-
-

Compatibility with Older npx Versions

-

The npx binary was rewritten in npm v7.0.0, and the standalone npx -package deprecated at that time. npx uses the npm exec -command instead of a separate argument parser and install process, with -some affordances to maintain backwards compatibility with the arguments it -accepted in previous versions.

-

This resulted in some shifts in its functionality:

-
    -
  • Any npm config value may be provided.
  • -
  • To prevent security and user-experience problems from mistyping package -names, npx prompts before installing anything. Suppress this -prompt with the -y or --yes option.
  • -
  • The --no-install option is deprecated, and will be converted to --no.
  • -
  • Shell fallback functionality is removed, as it is not advisable.
  • -
  • The -p argument is a shorthand for --parseable in npm, but shorthand -for --package in npx. This is maintained, but only for the npx -executable.
  • -
  • The --ignore-existing option is removed. Locally installed bins are -always present in the executed process PATH.
  • -
  • The --npm option is removed. npx will always use the npm it ships -with.
  • -
  • The --node-arg and -n options are removed.
  • -
  • The --always-spawn option is redundant, and thus removed.
  • -
  • The --shell option is replaced with --script-shell, but maintained -in the npx executable for backwards compatibility.
  • -
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/folders.html b/node_modules/npm/docs/output/configuring-npm/folders.html deleted file mode 100644 index cb97ac6..0000000 --- a/node_modules/npm/docs/output/configuring-npm/folders.html +++ /dev/null @@ -1,322 +0,0 @@ - - -folders - - - - - -
-
-

folders

-Folder Structures Used by npm -
- -
-

Table of contents

- -
- -

Description

-

npm puts various things on your computer. That's its job.

-

This document will tell you what it puts where.

-

tl;dr

-
    -
  • Local install (default): puts stuff in ./node_modules of the current -package root.
  • -
  • Global install (with -g): puts stuff in /usr/local or wherever node -is installed.
  • -
  • Install it locally if you're going to require() it.
  • -
  • Install it globally if you're going to run it on the command line.
  • -
  • If you need both, then install it in both places, or use npm link.
  • -
-

prefix Configuration

-

The prefix config defaults to the location where -node is installed. On most systems, this is /usr/local. On Windows, it's -%AppData%\npm. On Unix systems, it's one level up, since node is typically -installed at {prefix}/bin/node rather than {prefix}/node.exe.

-

When the global flag is set, npm installs things into this prefix. -When it is not set, it uses the root of the current package, or the -current working directory if not in a package already.

-

Node Modules

-

Packages are dropped into the node_modules folder under the prefix. -When installing locally, this means that you can -require("packagename") to load its main module, or -require("packagename/lib/path/to/sub/module") to load other modules.

-

Global installs on Unix systems go to {prefix}/lib/node_modules. -Global installs on Windows go to {prefix}/node_modules (that is, no -lib folder.)

-

Scoped packages are installed the same way, except they are grouped together -in a sub-folder of the relevant node_modules folder with the name of that -scope prefix by the @ symbol, e.g. npm install @myorg/package would place -the package in {prefix}/node_modules/@myorg/package. See -scope for more details.

-

If you wish to require() a package, then install it locally.

-

Executables

-

When in global mode, executables are linked into {prefix}/bin on Unix, -or directly into {prefix} on Windows. Ensure that path is in your -terminal's PATH environment to run them.

-

When in local mode, executables are linked into -./node_modules/.bin so that they can be made available to scripts run -through npm. (For example, so that a test runner will be in the path -when you run npm test.)

-

Man Pages

-

When in global mode, man pages are linked into {prefix}/share/man.

-

When in local mode, man pages are not installed.

-

Man pages are not installed on Windows systems.

-

Cache

-

See npm cache. Cache files are stored in ~/.npm on Posix, or -%LocalAppData%/npm-cache on Windows.

-

This is controlled by the cache config param.

-

Temp Files

-

Temporary files are stored by default in the folder specified by the -tmp config, which defaults to the TMPDIR, TMP, or -TEMP environment variables, or /tmp on Unix and c:\windows\temp on Windows.

-

Temp files are given a unique folder under this root for each run of the -program, and are deleted upon successful exit.

-

More Information

-

When installing locally, npm first tries to find an appropriate -prefix folder. This is so that npm install foo@1.2.3 will install -to the sensible root of your package, even if you happen to have cded -into some other folder.

-

Starting at the $PWD, npm will walk up the folder tree checking for a -folder that contains either a package.json file, or a node_modules -folder. If such a thing is found, then that is treated as the effective -"current directory" for the purpose of running npm commands. (This -behavior is inspired by and similar to git's .git-folder seeking -logic when running git commands in a working dir.)

-

If no package root is found, then the current folder is used.

-

When you run npm install foo@1.2.3, then the package is loaded into -the cache, and then unpacked into ./node_modules/foo. Then, any of -foo's dependencies are similarly unpacked into -./node_modules/foo/node_modules/....

-

Any bin files are symlinked to ./node_modules/.bin/, so that they may -be found by npm scripts when necessary.

-

Global Installation

-

If the global config is set to true, then npm will -install packages "globally".

-

For global installation, packages are installed roughly the same way, -but using the folders described above.

-

Cycles, Conflicts, and Folder Parsimony

-

Cycles are handled using the property of node's module system that it -walks up the directories looking for node_modules folders. So, at every -stage, if a package is already installed in an ancestor node_modules -folder, then it is not installed at the current location.

-

Consider the case above, where foo -> bar -> baz. Imagine if, in -addition to that, baz depended on bar, so you'd have: -foo -> bar -> baz -> bar -> baz .... However, since the folder -structure is: foo/node_modules/bar/node_modules/baz, there's no need to -put another copy of bar into .../baz/node_modules, since when baz calls -require("bar"), it will get the copy that is installed in -foo/node_modules/bar.

-

This shortcut is only used if the exact same -version would be installed in multiple nested node_modules folders. It -is still possible to have a/node_modules/b/node_modules/a if the two -"a" packages are different versions. However, without repeating the -exact same package multiple times, an infinite regress will always be -prevented.

-

Another optimization can be made by installing dependencies at the -highest level possible, below the localized "target" folder (hoisting). -Since version 3, npm hoists dependencies by default.

-

Example

-

Consider this dependency graph:

-
foo
-+-- blerg@1.2.5
-+-- bar@1.2.3
-|   +-- blerg@1.x (latest=1.3.7)
-|   +-- baz@2.x
-|   |   `-- quux@3.x
-|   |       `-- bar@1.2.3 (cycle)
-|   `-- asdf@*
-`-- baz@1.2.3
-    `-- quux@3.x
-        `-- bar
-
-

In this case, we might expect a folder structure like this -(with all dependencies hoisted to the highest level possible):

-
foo
-+-- node_modules
-    +-- blerg (1.2.5) <---[A]
-    +-- bar (1.2.3) <---[B]
-    |   +-- node_modules
-    |       +-- baz (2.0.2) <---[C]
-    +-- asdf (2.3.4)
-    +-- baz (1.2.3) <---[D]
-    +-- quux (3.2.0) <---[E]
-
-

Since foo depends directly on bar@1.2.3 and baz@1.2.3, those are -installed in foo's node_modules folder.

-

Even though the latest copy of blerg is 1.3.7, foo has a specific -dependency on version 1.2.5. So, that gets installed at [A]. Since the -parent installation of blerg satisfies bar's dependency on blerg@1.x, -it does not install another copy under [B].

-

Bar [B] also has dependencies on baz and asdf. Because it depends on baz@2.x, it cannot -re-use the baz@1.2.3 installed in the parent node_modules folder [D], -and must install its own copy [C]. In order to minimize duplication, npm hoists -dependencies to the top level by default, so asdf is installed under [A].

-

Underneath bar, the baz -> quux -> bar dependency creates a cycle. -However, because bar is already in quux's ancestry [B], it does not -unpack another copy of bar into that folder. Likewise, quux's [E] -folder tree is empty, because its dependency on bar is satisfied -by the parent folder copy installed at [B].

-

For a graphical breakdown of what is installed where, use npm ls.

-

Publishing

-

Upon publishing, npm will look in the node_modules folder. If any of -the items there are not in the bundleDependencies array, then they will -not be included in the package tarball.

-

This allows a package maintainer to install all of their dependencies -(and dev dependencies) locally, but only re-publish those items that -cannot be found elsewhere. See package.json for more information.

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/install.html b/node_modules/npm/docs/output/configuring-npm/install.html deleted file mode 100644 index 996082d..0000000 --- a/node_modules/npm/docs/output/configuring-npm/install.html +++ /dev/null @@ -1,217 +0,0 @@ - - -install - - - - - -
-
-

install

-Download and install node and npm -
- -
-

Table of contents

- -
- -

Description

-

To publish and install packages to and from the public npm registry, you -must install Node.js and the npm command line interface using either a Node -version manager or a Node installer. We strongly recommend using a Node -version manager to install Node.js and npm. We do not recommend using a -Node installer, since the Node installation process installs npm in a -directory with local permissions and can cause permissions errors when you -run npm packages globally.

-

Overview

- -

Checking your version of npm and Node.js

-

To see if you already have Node.js and npm installed and check the -installed version, run the following commands:

-
node -v
-npm -v
-
-

Using a Node version manager to install Node.js and npm

-

Node version managers allow you to install and switch between multiple -versions of Node.js and npm on your system so you can test your -applications on multiple versions of npm to ensure they work for users on -different versions. You can -search for them on GitHub.

-

Using a Node installer to install Node.js and npm

-

If you are unable to use a Node version manager, you can use a Node -installer to install both Node.js and npm on your system.

- -

OS X or Windows Node installers

-

If you're using OS X or Windows, use one of the installers from the -Node.js download page. Be sure to -install the version labeled LTS. Other versions have not yet been -tested with npm.

-

Linux or other operating systems Node installers

-

If you're using Linux or another operating system, use one of the following -installers:

- -

Or see this page to -install npm for Linux in the way many Linux developers prefer.

-

Less-common operating systems

-

For more information on installing Node.js on a variety of operating -systems, see this page.

- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html b/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html deleted file mode 100644 index f03832d..0000000 --- a/node_modules/npm/docs/output/configuring-npm/npm-shrinkwrap-json.html +++ /dev/null @@ -1,184 +0,0 @@ - - -npm-shrinkwrap.json - - - - - -
-
-

npm-shrinkwrap.json

-A publishable lockfile -
- -
-

Table of contents

- -
- -

Description

-

npm-shrinkwrap.json is a file created by npm shrinkwrap. It is identical to -package-lock.json, with one major caveat: Unlike package-lock.json, -npm-shrinkwrap.json may be included when publishing a package.

-

The recommended use-case for npm-shrinkwrap.json is applications deployed -through the publishing process on the registry: for example, daemons and -command-line tools intended as global installs or devDependencies. It's -strongly discouraged for library authors to publish this file, since that -would prevent end users from having control over transitive dependency -updates.

-

If both package-lock.json and npm-shrinkwrap.json are present in a -package root, npm-shrinkwrap.json will be preferred over the -package-lock.json file.

-

For full details and description of the npm-shrinkwrap.json file format, -refer to the manual page for -package-lock.json.

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/npmrc.html b/node_modules/npm/docs/output/configuring-npm/npmrc.html deleted file mode 100644 index 0e27de6..0000000 --- a/node_modules/npm/docs/output/configuring-npm/npmrc.html +++ /dev/null @@ -1,261 +0,0 @@ - - -npmrc - - - - - -
-
-

npmrc

-The npm config files -
- -
-

Table of contents

- -
- -

Description

-

npm gets its config settings from the command line, environment variables, -and npmrc files.

-

The npm config command can be used to update and edit the contents of the -user and global npmrc files.

-

For a list of available configuration options, see -config.

-

Files

-

The four relevant files are:

-
    -
  • per-project config file (/path/to/my/project/.npmrc)
  • -
  • per-user config file (~/.npmrc)
  • -
  • global config file ($PREFIX/etc/npmrc)
  • -
  • npm builtin config file (/path/to/npm/npmrc)
  • -
-

All npm config files are an ini-formatted list of key = value parameters. -Environment variables can be replaced using ${VARIABLE_NAME}. For -example:

-
prefix = ${HOME}/.npm-packages
-
-

Each of these files is loaded, and config options are resolved in priority -order. For example, a setting in the userconfig file would override the -setting in the globalconfig file.

-

Array values are specified by adding "[]" after the key name. For example:

-
key[] = "first value"
-key[] = "second value"
-
-

Comments

-

Lines in .npmrc files are interpreted as comments when they begin with a -; or # character. .npmrc files are parsed by -npm/ini, which specifies this comment syntax.

-

For example:

-
# last modified: 01 Jan 2016
-; Set a new registry for a scoped package
-@myscope:registry=https://mycustomregistry.example.org
-
-

Per-project config file

-

When working locally in a project, a .npmrc file in the root of the -project (ie, a sibling of node_modules and package.json) will set -config values specific to this project.

-

Note that this only applies to the root of the project that you're running -npm in. It has no effect when your module is published. For example, you -can't publish a module that forces itself to install globally, or in a -different location.

-

Additionally, this file is not read in global mode, such as when running -npm install -g.

-

Per-user config file

-

$HOME/.npmrc (or the userconfig param, if set in the environment or on -the command line)

-

Global config file

-

$PREFIX/etc/npmrc (or the globalconfig param, if set above): This file -is an ini-file formatted list of key = value parameters. Environment -variables can be replaced as above.

-

Built-in config file

-

path/to/npm/itself/npmrc

-

This is an unchangeable "builtin" configuration file that npm keeps -consistent across updates. Set fields in here using the ./configure -script that comes with npm. This is primarily for distribution maintainers -to override default configs in a standard and consistent manner.

- -

The settings _auth, _authToken, username and _password must all be -scoped to a specific registry. This ensures that npm will never send -credentials to the wrong host.

-

The full list is:

-
    -
  • _auth (base64 authentication string)
  • -
  • _authToken (authentication token)
  • -
  • username
  • -
  • _password
  • -
  • email
  • -
  • certfile (path to certificate file)
  • -
  • keyfile (path to key file)
  • -
-

In order to scope these values, they must be prefixed by a URI fragment. -If the credential is meant for any request to a registry on a single host, -the scope may look like //registry.npmjs.org/:. If it must be scoped to a -specific path on the host that path may also be provided, such as -//my-custom-registry.org/unique/path:.

-
; bad config
-_authToken=MYTOKEN
-
-; good config
-@myorg:registry=https://somewhere-else.com/myorg
-@another:registry=https://somewhere-else.com/another
-//registry.npmjs.org/:_authToken=MYTOKEN
-; would apply to both @myorg and @another
-; //somewhere-else.com/:_authToken=MYTOKEN
-; would apply only to @myorg
-//somewhere-else.com/myorg/:_authToken=MYTOKEN1
-; would apply only to @another
-//somewhere-else.com/another/:_authToken=MYTOKEN2
-
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/package-json.html b/node_modules/npm/docs/output/configuring-npm/package-json.html deleted file mode 100644 index c9488e6..0000000 --- a/node_modules/npm/docs/output/configuring-npm/package-json.html +++ /dev/null @@ -1,1070 +0,0 @@ - - -package.json - - - - - -
-
-

package.json

-Specifics of npm's package.json handling -
- -
-

Table of contents

- -
- -

Description

-

This document is all you need to know about what's required in your -package.json file. It must be actual JSON, not just a JavaScript object -literal.

-

A lot of the behavior described in this document is affected by the config -settings described in config.

-

name

-

If you plan to publish your package, the most important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional.

-

The name is what your thing is called.

-

Some rules:

-
    -
  • The name must be less than or equal to 214 characters. This includes the -scope for scoped packages.
  • -
  • The names of scoped packages can begin with a dot or an underscore. This -is not permitted without a scope.
  • -
  • New packages must not have uppercase letters in the name.
  • -
  • The name ends up being part of a URL, an argument on the command line, -and a folder name. Therefore, the name can't contain any non-URL-safe -characters.
  • -
-

Some tips:

-
    -
  • Don't use the same name as a core Node module.
  • -
  • Don't put "js" or "node" in the name. It's assumed that it's js, since -you're writing a package.json file, and you can specify the engine using -the "engines" field. (See below.)
  • -
  • The name will probably be passed as an argument to require(), so it -should be something short, but also reasonably descriptive.
  • -
  • You may want to check the npm registry to see if there's something by -that name already, before you get too attached to it. -https://www.npmjs.com/
  • -
-

A name can be optionally prefixed by a scope, e.g. @myorg/mypackage. See -scope for more detail.

-

version

-

If you plan to publish your package, the most important things in your -package.json are the name and version fields as they will be required. The -name and version together form an identifier that is assumed to be -completely unique. Changes to the package should come along with changes -to the version. If you don't plan to publish your package, the name and -version fields are optional.

-

Version must be parseable by -node-semver, which is bundled with -npm as a dependency. (npm install semver to use it yourself.)

-

description

-

Put a description in it. It's a string. This helps people discover your -package, as it's listed in npm search.

-

keywords

-

Put keywords in it. It's an array of strings. This helps people discover -your package as it's listed in npm search.

-

homepage

-

The url to the project homepage.

-

Example:

-
"homepage": "https://github.com/owner/project#readme"
-
-

bugs

-

The url to your project's issue tracker and / or the email address to which -issues should be reported. These are helpful for people who encounter -issues with your package.

-

It should look like this:

-
{
-  "bugs": {
-    "url": "https://github.com/owner/project/issues",
-    "email": "project@hostname.com"
-  }
-}
-
-

You can specify either one or both values. If you want to provide only a -url, you can specify the value for "bugs" as a simple string instead of an -object.

-

If a url is provided, it will be used by the npm bugs command.

-

license

-

You should specify a license for your package so that people know how they -are permitted to use it, and any restrictions you're placing on it.

-

If you're using a common license such as BSD-2-Clause or MIT, add a current -SPDX license identifier for the license you're using, like this:

-
{
-  "license" : "BSD-3-Clause"
-}
-
-

You can check the full list of SPDX license -IDs. Ideally you should pick one that is -OSI approved.

-

If your package is licensed under multiple common licenses, use an SPDX -license expression syntax version 2.0 -string, like this:

-
{
-  "license" : "(ISC OR GPL-3.0)"
-}
-
-

If you are using a license that hasn't been assigned an SPDX identifier, or if -you are using a custom license, use a string value like this one:

-
{
-  "license" : "SEE LICENSE IN <filename>"
-}
-
-

Then include a file named <filename> at the top level of the package.

-

Some old packages used license objects or a "licenses" property containing -an array of license objects:

-
// Not valid metadata
-{
-  "license" : {
-    "type" : "ISC",
-    "url" : "https://opensource.org/licenses/ISC"
-  }
-}
-
-// Not valid metadata
-{
-  "licenses" : [
-    {
-      "type": "MIT",
-      "url": "https://www.opensource.org/licenses/mit-license.php"
-    },
-    {
-      "type": "Apache-2.0",
-      "url": "https://opensource.org/licenses/apache2.0.php"
-    }
-  ]
-}
-
-

Those styles are now deprecated. Instead, use SPDX expressions, like this:

-
{
-  "license": "ISC"
-}
-
-
{
-  "license": "(MIT OR Apache-2.0)"
-}
-
-

Finally, if you do not wish to grant others the right to use a private or -unpublished package under any terms:

-
{
-  "license": "UNLICENSED"
-}
-
-

Consider also setting "private": true to prevent accidental publication.

-

people fields: author, contributors

-

The "author" is one person. "contributors" is an array of people. A -"person" is an object with a "name" field and optionally "url" and "email", -like this:

-
{
-  "name" : "Barney Rubble",
-  "email" : "b@rubble.com",
-  "url" : "http://barnyrubble.tumblr.com/"
-}
-
-

Or you can shorten that all into a single string, and npm will parse it for -you:

-
{
-  "author": "Barney Rubble <b@rubble.com> (http://barnyrubble.tumblr.com/)"
-}
-
-

Both email and url are optional either way.

-

npm also sets a top-level "maintainers" field with your npm user info.

-

funding

-

You can specify an object containing a URL that provides up-to-date -information about ways to help fund development of your package, or a -string URL, or an array of these:

-
{
-  "funding": {
-    "type" : "individual",
-    "url" : "http://example.com/donate"
-  },
-
-  "funding": {
-    "type" : "patreon",
-    "url" : "https://www.patreon.com/my-account"
-  },
-
-  "funding": "http://example.com/donate",
-
-  "funding": [
-    {
-      "type" : "individual",
-      "url" : "http://example.com/donate"
-    },
-    "http://example.com/donateAlso",
-    {
-      "type" : "patreon",
-      "url" : "https://www.patreon.com/my-account"
-    }
-  ]
-}
-
-

Users can use the npm fund subcommand to list the funding URLs of all -dependencies of their project, direct and indirect. A shortcut to visit -each funding url is also available when providing the project name such as: -npm fund <projectname> (when there are multiple URLs, the first one will -be visited)

-

files

-

The optional files field is an array of file patterns that describes the -entries to be included when your package is installed as a dependency. File -patterns follow a similar syntax to .gitignore, but reversed: including a -file, directory, or glob pattern (*, **/*, and such) will make it so -that file is included in the tarball when it's packed. Omitting the field -will make it default to ["*"], which means it will include all files.

-

Some special files and directories are also included or excluded regardless -of whether they exist in the files array (see below).

-

You can also provide a .npmignore file in the root of your package or in -subdirectories, which will keep files from being included. At the root of -your package it will not override the "files" field, but in subdirectories -it will. The .npmignore file works just like a .gitignore. If there is -a .gitignore file, and .npmignore is missing, .gitignore's contents -will be used instead.

-

Certain files are always included, regardless of settings:

-
    -
  • package.json
  • -
  • README
  • -
  • LICENSE / LICENCE
  • -
  • The file in the "main" field
  • -
  • The file(s) in the "bin" field
  • -
-

README & LICENSE can have any case and extension.

-

Some files are always ignored by default:

-
    -
  • *.orig
  • -
  • .*.swp
  • -
  • .DS_Store
  • -
  • ._*
  • -
  • .git
  • -
  • .npmrc
  • -
  • .hg
  • -
  • .lock-wscript
  • -
  • .npmrc
  • -
  • .svn
  • -
  • .wafpickle-N
  • -
  • CVS
  • -
  • config.gypi
  • -
  • node_modules
  • -
  • npm-debug.log
  • -
  • package-lock.json (use -npm-shrinkwrap.json -if you wish it to be published)
  • -
  • pnpm-lock.yaml
  • -
  • yarn.lock
  • -
-

Most of these ignored files can be included specifically if included in -the files globs. Exceptions to this are:

-
    -
  • .git
  • -
  • .npmrc
  • -
  • node_modules
  • -
  • package-lock.json
  • -
  • pnpm-lock.yaml
  • -
  • yarn.lock
  • -
-

These can not be included.

-

main

-

The main field is a module ID that is the primary entry point to your -program. That is, if your package is named foo, and a user installs it, -and then does require("foo"), then your main module's exports object will -be returned.

-

This should be a module relative to the root of your package folder.

-

For most modules, it makes the most sense to have a main script and often -not much else.

-

If main is not set, it defaults to index.js in the package's root folder.

-

browser

-

If your module is meant to be used client-side the browser field should be -used instead of the main field. This is helpful to hint users that it might -rely on primitives that aren't available in Node.js modules. (e.g. -window)

-

bin

-

A lot of packages have one or more executable files that they'd like to -install into the PATH. npm makes this pretty easy (in fact, it uses this -feature to install the "npm" executable.)

-

To use this, supply a bin field in your package.json which is a map of -command name to local file name. When this package is installed globally, -that file will be either linked inside the global bins directory or -a cmd (Windows Command File) will be created which executes the specified -file in the bin field, so it is available to run by name or name.cmd (on -Windows PowerShell). When this package is installed as a dependency in another -package, the file will be linked where it will be available to that package -either directly by npm exec or by name in other scripts when invoking them -via npm run-script.

-

For example, myapp could have this:

-
{
-  "bin": {
-    "myapp": "./cli.js"
-  }
-}
-
-

So, when you install myapp, in case of unix-like OS it'll create a symlink -from the cli.js script to /usr/local/bin/myapp and in case of windows it -will create a cmd file usually at C:\Users\{Username}\AppData\Roaming\npm\myapp.cmd -which runs the cli.js script.

-

If you have a single executable, and its name should be the name of the -package, then you can just supply it as a string. For example:

-
{
-  "name": "my-program",
-  "version": "1.2.5",
-  "bin": "./path/to/program"
-}
-
-

would be the same as this:

-
{
-  "name": "my-program",
-  "version": "1.2.5",
-  "bin": {
-    "my-program": "./path/to/program"
-  }
-}
-
-

Please make sure that your file(s) referenced in bin starts with -#!/usr/bin/env node, otherwise the scripts are started without the node -executable!

-

Note that you can also set the executable files using directories.bin.

-

See folders for more info on -executables.

-

man

-

Specify either a single file or an array of filenames to put in place for -the man program to find.

-

If only a single file is provided, then it's installed such that it is the -result from man <pkgname>, regardless of its actual filename. For -example:

-
{
-  "name": "foo",
-  "version": "1.2.3",
-  "description": "A packaged foo fooer for fooing foos",
-  "main": "foo.js",
-  "man": "./man/doc.1"
-}
-
-

would link the ./man/doc.1 file in such that it is the target for man foo

-

If the filename doesn't start with the package name, then it's prefixed. -So, this:

-
{
-  "name": "foo",
-  "version": "1.2.3",
-  "description": "A packaged foo fooer for fooing foos",
-  "main": "foo.js",
-  "man": [
-    "./man/foo.1",
-    "./man/bar.1"
-  ]
-}
-
-

will create files to do man foo and man foo-bar.

-

Man files must end with a number, and optionally a .gz suffix if they are -compressed. The number dictates which man section the file is installed -into.

-
{
-  "name": "foo",
-  "version": "1.2.3",
-  "description": "A packaged foo fooer for fooing foos",
-  "main": "foo.js",
-  "man": [
-    "./man/foo.1",
-    "./man/foo.2"
-  ]
-}
-
-

will create entries for man foo and man 2 foo

-

directories

-

The CommonJS Packages spec -details a few ways that you can indicate the structure of your package -using a directories object. If you look at npm's -package.json, you'll see that it -has directories for doc, lib, and man.

-

In the future, this information may be used in other creative ways.

-

directories.bin

-

If you specify a bin directory in directories.bin, all the files in -that folder will be added.

-

Because of the way the bin directive works, specifying both a bin path -and setting directories.bin is an error. If you want to specify -individual files, use bin, and for all the files in an existing bin -directory, use directories.bin.

-

directories.man

-

A folder that is full of man pages. Sugar to generate a "man" array by -walking the folder.

-

repository

-

Specify the place where your code lives. This is helpful for people who -want to contribute. If the git repo is on GitHub, then the npm docs -command will be able to find you.

-

Do it like this:

-
{
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/cli.git"
-  }
-}
-
-

The URL should be a publicly available (perhaps read-only) url that can be -handed directly to a VCS program without any modification. It should not -be a url to an html project page that you put in your browser. It's for -computers.

-

For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the -same shortcut syntax you use for npm install:

-
{
-  "repository": "npm/npm",
-
-  "repository": "github:user/repo",
-
-  "repository": "gist:11081aaa281",
-
-  "repository": "bitbucket:user/repo",
-
-  "repository": "gitlab:user/repo"
-}
-
-

If the package.json for your package is not in the root directory (for -example if it is part of a monorepo), you can specify the directory in -which it lives:

-
{
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/facebook/react.git",
-    "directory": "packages/react-dom"
-  }
-}
-
-

scripts

-

The "scripts" property is a dictionary containing script commands that are -run at various times in the lifecycle of your package. The key is the -lifecycle event, and the value is the command to run at that point.

-

See scripts to find out more about writing package -scripts.

-

config

-

A "config" object can be used to set configuration parameters used in -package scripts that persist across upgrades. For instance, if a package -had the following:

-
{
-  "name": "foo",
-  "config": {
-    "port": "8080"
-  }
-}
-
-

It could also have a "start" command that referenced the -npm_package_config_port environment variable.

-

dependencies

-

Dependencies are specified in a simple object that maps a package name to a -version range. The version range is a string which has one or more -space-separated descriptors. Dependencies can also be identified with a -tarball or git URL.

-

Please do not put test harnesses or transpilers or other "development" -time tools in your dependencies object. See devDependencies, below.

-

See semver for more details about specifying version ranges.

-
    -
  • version Must match version exactly
  • -
  • >version Must be greater than version
  • -
  • >=version etc
  • -
  • <version
  • -
  • <=version
  • -
  • ~version "Approximately equivalent to version" See -semver
  • -
  • ^version "Compatible with version" See semver
  • -
  • 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0
  • -
  • http://... See 'URLs as Dependencies' below
  • -
  • * Matches any version
  • -
  • "" (just an empty string) Same as *
  • -
  • version1 - version2 Same as >=version1 <=version2.
  • -
  • range1 || range2 Passes if either range1 or range2 are satisfied.
  • -
  • git... See 'Git URLs as Dependencies' below
  • -
  • user/repo See 'GitHub URLs' below
  • -
  • tag A specific version tagged and published as tag See npm dist-tag
  • -
  • path/path/path See Local Paths below
  • -
-

For example, these are all valid:

-
{
-  "dependencies": {
-    "foo": "1.0.0 - 2.9999.9999",
-    "bar": ">=1.0.2 <2.1.2",
-    "baz": ">1.0.2 <=2.3.4",
-    "boo": "2.0.1",
-    "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0",
-    "asd": "http://asdf.com/asdf.tar.gz",
-    "til": "~1.2",
-    "elf": "~1.2.3",
-    "two": "2.x",
-    "thr": "3.3.x",
-    "lat": "latest",
-    "dyl": "file:../dyl"
-  }
-}
-
-

URLs as Dependencies

-

You may specify a tarball URL in place of a version range.

-

This tarball will be downloaded and installed locally to your package at -install time.

-

Git URLs as Dependencies

-

Git urls are of the form:

-
<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>[#<commit-ish> | #semver:<semver>]
-
-

<protocol> is one of git, git+ssh, git+http, git+https, or -git+file.

-

If #<commit-ish> is provided, it will be used to clone exactly that -commit. If the commit-ish has the format #semver:<semver>, <semver> can -be any valid semver range or exact version, and npm will look for any tags -or refs matching that range in the remote repository, much as it would for -a registry dependency. If neither #<commit-ish> or #semver:<semver> is -specified, then the default branch is used.

-

Examples:

-
git+ssh://git@github.com:npm/cli.git#v1.0.27
-git+ssh://git@github.com:npm/cli#semver:^5.0
-git+https://isaacs@github.com/npm/cli.git
-git://github.com/npm/cli.git#v1.0.27
-
-

When installing from a git repository, the presence of certain fields in the -package.json will cause npm to believe it needs to perform a build. To do so -your repository will be cloned into a temporary directory, all of its deps -installed, relevant scripts run, and the resulting directory packed and -installed.

-

This flow will occur if your git dependency uses workspaces, or if any of the -following scripts are present:

-
    -
  • build
  • -
  • prepare
  • -
  • prepack
  • -
  • preinstall
  • -
  • install
  • -
  • postinstall
  • -
-

If your git repository includes pre-built artifacts, you will likely want to -make sure that none of the above scripts are defined, or your dependency -will be rebuilt for every installation.

-

GitHub URLs

-

As of version 1.1.65, you can refer to GitHub urls as just "foo": -"user/foo-project". Just as with git URLs, a commit-ish suffix can be -included. For example:

-
{
-  "name": "foo",
-  "version": "0.0.0",
-  "dependencies": {
-    "express": "expressjs/express",
-    "mocha": "mochajs/mocha#4727d357ea",
-    "module": "user/repo#feature\/branch"
-  }
-}
-
-

Local Paths

-

As of version 2.0.0 you can provide a path to a local directory that -contains a package. Local paths can be saved using npm install -S or npm install --save, using any of these forms:

-
../foo/bar
-~/foo/bar
-./foo/bar
-/foo/bar
-
-

in which case they will be normalized to a relative path and added to your -package.json. For example:

-
{
-  "name": "baz",
-  "dependencies": {
-    "bar": "file:../foo/bar"
-  }
-}
-
-

This feature is helpful for local offline development and creating tests -that require npm installing where you don't want to hit an external server, -but should not be used when publishing packages to the public registry.

-

note: Packages linked by local path will not have their own -dependencies installed when npm install is ran in this case. You must -run npm install from inside the local path itself.

-

devDependencies

-

If someone is planning on downloading and using your module in their -program, then they probably don't want or need to download and build the -external test or documentation framework that you use.

-

In this case, it's best to map these additional items in a -devDependencies object.

-

These things will be installed when doing npm link or npm install from -the root of a package, and can be managed like any other npm configuration -param. See config for more on the topic.

-

For build steps that are not platform-specific, such as compiling -CoffeeScript or other languages to JavaScript, use the prepare script to -do this, and make the required package a devDependency.

-

For example:

-
{
-  "name": "ethopia-waza",
-  "description": "a delightfully fruity coffee varietal",
-  "version": "1.2.3",
-  "devDependencies": {
-    "coffee-script": "~1.6.3"
-  },
-  "scripts": {
-    "prepare": "coffee -o lib/ -c src/waza.coffee"
-  },
-  "main": "lib/waza.js"
-}
-
-

The prepare script will be run before publishing, so that users can -consume the functionality without requiring them to compile it themselves. -In dev mode (ie, locally running npm install), it'll run this script as -well, so that you can test it easily.

-

peerDependencies

-

In some cases, you want to express the compatibility of your package with a -host tool or library, while not necessarily doing a require of this host. -This is usually referred to as a plugin. Notably, your module may be -exposing a specific interface, expected and specified by the host -documentation.

-

For example:

-
{
-  "name": "tea-latte",
-  "version": "1.3.5",
-  "peerDependencies": {
-    "tea": "2.x"
-  }
-}
-
-

This ensures your package tea-latte can be installed along with the -second major version of the host package tea only. npm install tea-latte could possibly yield the following dependency graph:

-
├── tea-latte@1.3.5
-└── tea@2.2.0
-
-

In npm versions 3 through 6, peerDependencies were not automatically -installed, and would raise a warning if an invalid version of the peer -dependency was found in the tree. As of npm v7, peerDependencies are -installed by default.

-

Trying to install another plugin with a conflicting requirement may cause -an error if the tree cannot be resolved correctly. For this reason, make -sure your plugin requirement is as broad as possible, and not to lock it -down to specific patch versions.

-

Assuming the host complies with semver, only changes -in the host package's major version will break your plugin. Thus, if you've -worked with every 1.x version of the host package, use "^1.0" or "1.x" -to express this. If you depend on features introduced in 1.5.2, use -"^1.5.2".

-

peerDependenciesMeta

-

When a user installs your package, npm will emit warnings if packages -specified in peerDependencies are not already installed. The -peerDependenciesMeta field serves to provide npm more information on how -your peer dependencies are to be used. Specifically, it allows peer -dependencies to be marked as optional.

-

For example:

-
{
-  "name": "tea-latte",
-  "version": "1.3.5",
-  "peerDependencies": {
-    "tea": "2.x",
-    "soy-milk": "1.2"
-  },
-  "peerDependenciesMeta": {
-    "soy-milk": {
-      "optional": true
-    }
-  }
-}
-
-

Marking a peer dependency as optional ensures npm will not emit a warning -if the soy-milk package is not installed on the host. This allows you to -integrate and interact with a variety of host packages without requiring -all of them to be installed.

-

bundleDependencies

-

This defines an array of package names that will be bundled when publishing -the package.

-

In cases where you need to preserve npm packages locally or have them -available through a single file download, you can bundle the packages in a -tarball file by specifying the package names in the bundleDependencies -array and executing npm pack.

-

For example:

-

If we define a package.json like this:

-
{
-  "name": "awesome-web-framework",
-  "version": "1.0.0",
-  "bundleDependencies": [
-    "renderized",
-    "super-streams"
-  ]
-}
-
-

we can obtain awesome-web-framework-1.0.0.tgz file by running npm pack. -This file contains the dependencies renderized and super-streams which -can be installed in a new project by executing npm install awesome-web-framework-1.0.0.tgz. Note that the package names do not -include any versions, as that information is specified in dependencies.

-

If this is spelled "bundledDependencies", then that is also honored.

-

Alternatively, "bundleDependencies" can be defined as a boolean value. A -value of true will bundle all dependencies, a value of false will bundle -none.

-

optionalDependencies

-

If a dependency can be used, but you would like npm to proceed if it cannot -be found or fails to install, then you may put it in the -optionalDependencies object. This is a map of package name to version or -url, just like the dependencies object. The difference is that build -failures do not cause installation to fail. Running npm install --omit=optional will prevent these dependencies from being installed.

-

It is still your program's responsibility to handle the lack of the -dependency. For example, something like this:

-
try {
-  var foo = require('foo')
-  var fooVersion = require('foo/package.json').version
-} catch (er) {
-  foo = null
-}
-if ( notGoodFooVersion(fooVersion) ) {
-  foo = null
-}
-
-// .. then later in your program ..
-
-if (foo) {
-  foo.doFooThings()
-}
-
-

Entries in optionalDependencies will override entries of the same name in -dependencies, so it's usually best to only put in one place.

-

overrides

-

If you need to make specific changes to dependencies of your dependencies, for -example replacing the version of a dependency with a known security issue, -replacing an existing dependency with a fork, or making sure that the same -version of a package is used everywhere, then you may add an override.

-

Overrides provide a way to replace a package in your dependency tree with -another version, or another package entirely. These changes can be scoped as -specific or as vague as desired.

-

To make sure the package foo is always installed as version 1.0.0 no matter -what version your dependencies rely on:

-
{
-  "overrides": {
-    "foo": "1.0.0"
-  }
-}
-
-

The above is a short hand notation, the full object form can be used to allow -overriding a package itself as well as a child of the package. This will cause -foo to always be 1.0.0 while also making bar at any depth beyond foo -also 1.0.0:

-
{
-  "overrides": {
-    "foo": {
-      ".": "1.0.0",
-      "bar": "1.0.0"
-    }
-  }
-}
-
-

To only override foo to be 1.0.0 when it's a child (or grandchild, or great -grandchild, etc) of the package bar:

-
{
-  "overrides": {
-    "bar": {
-      "foo": "1.0.0"
-    }
-  }
-}
-
-

Keys can be nested to any arbitrary length. To override foo only when it's a -child of bar and only when bar is a child of baz:

-
{
-  "overrides": {
-    "baz": {
-      "bar": {
-        "foo": "1.0.0"
-      }
-    }
-  }
-}
-
-

The key of an override can also include a version, or range of versions. -To override foo to 1.0.0, but only when it's a child of bar@2.0.0:

-
{
-  "overrides": {
-    "bar@2.0.0": {
-      "foo": "1.0.0"
-    }
-  }
-}
-
-

You may not set an override for a package that you directly depend on unless -both the dependency and the override itself share the exact same spec. To make -this limitation easier to deal with, overrides may also be defined as a -reference to a spec for a direct dependency by prefixing the name of the -package you wish the version to match with a $.

-
{
-  "dependencies": {
-    "foo": "^1.0.0"
-  },
-  "overrides": {
-    // BAD, will throw an EOVERRIDE error
-    // "foo": "^2.0.0"
-    // GOOD, specs match so override is allowed
-    // "foo": "^1.0.0"
-    // BEST, the override is defined as a reference to the dependency
-    "foo": "$foo",
-    // the referenced package does not need to match the overridden one
-    "bar": "$foo"
-  }
-}
-
-

engines

-

You can specify the version of node that your stuff works on:

-
{
-  "engines": {
-    "node": ">=0.10.3 <15"
-  }
-}
-
-

And, like with dependencies, if you don't specify the version (or if you -specify "*" as the version), then any version of node will do.

-

You can also use the "engines" field to specify which versions of npm are -capable of properly installing your program. For example:

-
{
-  "engines": {
-    "npm": "~1.0.20"
-  }
-}
-
-

Unless the user has set the -engine-strict config flag, this field is -advisory only and will only produce warnings when your package is installed as a -dependency.

-

os

-

You can specify which operating systems your -module will run on:

-
{
-  "os": [
-    "darwin",
-    "linux"
-  ]
-}
-
-

You can also block instead of allowing operating systems, just prepend the -blocked os with a '!':

-
{
-  "os": [
-    "!win32"
-  ]
-}
-
-

The host operating system is determined by process.platform

-

It is allowed to both block and allow an item, although there isn't any -good reason to do this.

-

cpu

-

If your code only runs on certain cpu architectures, -you can specify which ones.

-
{
-  "cpu": [
-    "x64",
-    "ia32"
-  ]
-}
-
-

Like the os option, you can also block architectures:

-
{
-  "cpu": [
-    "!arm",
-    "!mips"
-  ]
-}
-
-

The host architecture is determined by process.arch

-

private

-

If you set "private": true in your package.json, then npm will refuse to -publish it.

-

This is a way to prevent accidental publication of private repositories. -If you would like to ensure that a given package is only ever published to -a specific registry (for example, an internal registry), then use the -publishConfig dictionary described below to override the registry -config param at publish-time.

-

publishConfig

-

This is a set of config values that will be used at publish-time. It's -especially handy if you want to set the tag, registry or access, so that -you can ensure that a given package is not tagged with "latest", published -to the global public registry or that a scoped module is private by -default.

-

See config to see the list of config options that -can be overridden.

-

workspaces

-

The optional workspaces field is an array of file patterns that describes -locations within the local file system that the install client should look -up to find each workspace that needs to be -symlinked to the top level node_modules folder.

-

It can describe either the direct paths of the folders to be used as -workspaces or it can define globs that will resolve to these same folders.

-

In the following example, all folders located inside the folder -./packages will be treated as workspaces as long as they have valid -package.json files inside them:

-
{
-  "name": "workspace-example",
-  "workspaces": [
-    "./packages/*"
-  ]
-}
-
-

See workspaces for more examples.

-

DEFAULT VALUES

-

npm will default some values based on package contents.

-
    -
  • -

    "scripts": {"start": "node server.js"}

    -

    If there is a server.js file in the root of your package, then npm will -default the start command to node server.js.

    -
  • -
  • -

    "scripts":{"install": "node-gyp rebuild"}

    -

    If there is a binding.gyp file in the root of your package and you have -not defined an install or preinstall script, npm will default the -install command to compile using node-gyp.

    -
  • -
  • -

    "contributors": [...]

    -

    If there is an AUTHORS file in the root of your package, npm will treat -each line as a Name <email> (url) format, where email and url are -optional. Lines which start with a # or are blank, will be ignored.

    -
  • -
-

SEE ALSO

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/configuring-npm/package-lock-json.html b/node_modules/npm/docs/output/configuring-npm/package-lock-json.html deleted file mode 100644 index 11e4ab7..0000000 --- a/node_modules/npm/docs/output/configuring-npm/package-lock-json.html +++ /dev/null @@ -1,390 +0,0 @@ - - -package-lock.json - - - - - -
-
-

package-lock.json

-A manifestation of the manifest -
- -
-

Table of contents

- -
- -

Description

-

package-lock.json is automatically generated for any operations where npm -modifies either the node_modules tree, or package.json. It describes the -exact tree that was generated, such that subsequent installs are able to -generate identical trees, regardless of intermediate dependency updates.

-

This file is intended to be committed into source repositories, and serves -various purposes:

-
    -
  • -

    Describe a single representation of a dependency tree such that -teammates, deployments, and continuous integration are guaranteed to -install exactly the same dependencies.

    -
  • -
  • -

    Provide a facility for users to "time-travel" to previous states of -node_modules without having to commit the directory itself.

    -
  • -
  • -

    Facilitate greater visibility of tree changes through readable source -control diffs.

    -
  • -
  • -

    Optimize the installation process by allowing npm to skip repeated -metadata resolutions for previously-installed packages.

    -
  • -
  • -

    As of npm v7, lockfiles include enough information to gain a complete -picture of the package tree, reducing the need to read package.json -files, and allowing for significant performance improvements.

    -
  • -
-

package-lock.json vs npm-shrinkwrap.json

-

Both of these files have the same format, and perform similar functions in -the root of a project.

-

The difference is that package-lock.json cannot be published, and it will -be ignored if found in any place other than the root project.

-

In contrast, npm-shrinkwrap.json allows -publication, and defines the dependency tree from the point encountered. -This is not recommended unless deploying a CLI tool or otherwise using the -publication process for producing production packages.

-

If both package-lock.json and npm-shrinkwrap.json are present in the -root of a project, npm-shrinkwrap.json will take precedence and -package-lock.json will be ignored.

-

Hidden Lockfiles

-

In order to avoid processing the node_modules folder repeatedly, npm as -of v7 uses a "hidden" lockfile present in -node_modules/.package-lock.json. This contains information about the -tree, and is used in lieu of reading the entire node_modules hierarchy -provided that the following conditions are met:

-
    -
  • All package folders it references exist in the node_modules hierarchy.
  • -
  • No package folders exist in the node_modules hierarchy that are not -listed in the lockfile.
  • -
  • The modified time of the file is at least as recent as all of the package -folders it references.
  • -
-

That is, the hidden lockfile will only be relevant if it was created as -part of the most recent update to the package tree. If another CLI mutates -the tree in any way, this will be detected, and the hidden lockfile will be -ignored.

-

Note that it is possible to manually change the contents of a package -in such a way that the modified time of the package folder is unaffected. -For example, if you add a file to node_modules/foo/lib/bar.js, then the -modified time on node_modules/foo will not reflect this change. If you -are manually editing files in node_modules, it is generally best to -delete the file at node_modules/.package-lock.json.

-

As the hidden lockfile is ignored by older npm versions, it does not -contain the backwards compatibility affordances present in "normal" -lockfiles. That is, it is lockfileVersion: 3, rather than -lockfileVersion: 2.

-

Handling Old Lockfiles

-

When npm detects a lockfile from npm v6 or before during the package -installation process, it is automatically updated to fetch missing -information from either the node_modules tree or (in the case of empty -node_modules trees or very old lockfile formats) the npm registry.

-

File Format

-

name

-

The name of the package this is a package-lock for. This will match what's -in package.json.

-

version

-

The version of the package this is a package-lock for. This will match -what's in package.json.

-

lockfileVersion

-

An integer version, starting at 1 with the version number of this -document whose semantics were used when generating this -package-lock.json.

-

Note that the file format changed significantly in npm v7 to track -information that would have otherwise required looking in node_modules or -the npm registry. Lockfiles generated by npm v7 will contain -lockfileVersion: 2.

-
    -
  • No version provided: an "ancient" shrinkwrap file from a version of npm -prior to npm v5.
  • -
  • 1: The lockfile version used by npm v5 and v6.
  • -
  • 2: The lockfile version used by npm v7 and v8. Backwards compatible to v1 -lockfiles.
  • -
  • 3: The lockfile version used by npm v9 and above. Backwards compatible to npm v7.
  • -
-

npm will always attempt to get whatever data it can out of a lockfile, even -if it is not a version that it was designed to support.

-

packages

-

This is an object that maps package locations to an object containing the -information about that package.

-

The root project is typically listed with a key of "", and all other -packages are listed with their relative paths from the root project folder.

-

Package descriptors have the following fields:

-
    -
  • -

    version: The version found in package.json

    -
  • -
  • -

    resolved: The place where the package was actually resolved from. In -the case of packages fetched from the registry, this will be a url to a -tarball. In the case of git dependencies, this will be the full git url -with commit sha. In the case of link dependencies, this will be the -location of the link target. registry.npmjs.org is a magic value meaning -"the currently configured registry".

    -
  • -
  • -

    integrity: A sha512 or sha1 Standard Subresource -Integrity -string for the artifact that was unpacked in this location.

    -
  • -
  • -

    link: A flag to indicate that this is a symbolic link. If this is -present, no other fields are specified, since the link target will also -be included in the lockfile.

    -
  • -
  • -

    dev, optional, devOptional: If the package is strictly part of the -devDependencies tree, then dev will be true. If it is strictly part -of the optionalDependencies tree, then optional will be set. If it -is both a dev dependency and an optional dependency of a non-dev -dependency, then devOptional will be set. (An optional dependency of -a dev dependency will have both dev and optional set.)

    -
  • -
  • -

    inBundle: A flag to indicate that the package is a bundled dependency.

    -
  • -
  • -

    hasInstallScript: A flag to indicate that the package has a preinstall, -install, or postinstall script.

    -
  • -
  • -

    hasShrinkwrap: A flag to indicate that the package has an -npm-shrinkwrap.json file.

    -
  • -
  • -

    bin, license, engines, dependencies, optionalDependencies: fields from -package.json

    -
  • -
-

dependencies

-

Legacy data for supporting versions of npm that use lockfileVersion: 1. -This is a mapping of package names to dependency objects. Because the -object structure is strictly hierarchical, symbolic link dependencies are -somewhat challenging to represent in some cases.

-

npm v7 ignores this section entirely if a packages section is present, -but does keep it up to date in order to support switching between npm v6 -and npm v7.

-

Dependency objects have the following fields:

-
    -
  • -

    version: a specifier that varies depending on the nature of the package, -and is usable in fetching a new copy of it.

    -
      -
    • bundled dependencies: Regardless of source, this is a version number -that is purely for informational purposes.
    • -
    • registry sources: This is a version number. (eg, 1.2.3)
    • -
    • git sources: This is a git specifier with resolved committish. (eg, -git+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e)
    • -
    • http tarball sources: This is the URL of the tarball. (eg, -https://example.com/example-1.3.0.tgz)
    • -
    • local tarball sources: This is the file URL of the tarball. (eg -file:///opt/storage/example-1.3.0.tgz)
    • -
    • local link sources: This is the file URL of the link. (eg -file:libs/our-module)
    • -
    -
  • -
  • -

    integrity: A sha512 or sha1 Standard Subresource -Integrity -string for the artifact that was unpacked in this location. For git -dependencies, this is the commit sha.

    -
  • -
  • -

    resolved: For registry sources this is path of the tarball relative to -the registry URL. If the tarball URL isn't on the same server as the -registry URL then this is a complete URL. registry.npmjs.org is a magic -value meaning "the currently configured registry".

    -
  • -
  • -

    bundled: If true, this is the bundled dependency and will be installed -by the parent module. When installing, this module will be extracted -from the parent module during the extract phase, not installed as a -separate dependency.

    -
  • -
  • -

    dev: If true then this dependency is either a development dependency ONLY -of the top level module or a transitive dependency of one. This is false -for dependencies that are both a development dependency of the top level -and a transitive dependency of a non-development dependency of the top -level.

    -
  • -
  • -

    optional: If true then this dependency is either an optional dependency -ONLY of the top level module or a transitive dependency of one. This is -false for dependencies that are both an optional dependency of the top -level and a transitive dependency of a non-optional dependency of the top -level.

    -
  • -
  • -

    requires: This is a mapping of module name to version. This is a list of -everything this module requires, regardless of where it will be -installed. The version should match via normal matching rules a -dependency either in our dependencies or in a level higher than us.

    -
  • -
  • -

    dependencies: The dependencies of this dependency, exactly as at the top -level.

    -
  • -
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/config.html b/node_modules/npm/docs/output/using-npm/config.html deleted file mode 100644 index 70dfddc..0000000 --- a/node_modules/npm/docs/output/using-npm/config.html +++ /dev/null @@ -1,1584 +0,0 @@ - - -config - - - - - -
-
-

config

-More than you probably want to know about npm configuration -
- -
-

Table of contents

-
-
- -

Description

-

npm gets its configuration values from the following sources, sorted by priority:

-

Command Line Flags

-

Putting --foo bar on the command line sets the foo configuration -parameter to "bar". A -- argument tells the cli parser to stop -reading flags. Using --flag without specifying any value will set -the value to true.

-

Example: --flag1 --flag2 will set both configuration parameters -to true, while --flag1 --flag2 bar will set flag1 to true, -and flag2 to bar. Finally, --flag1 --flag2 -- bar will set -both configuration parameters to true, and the bar is taken -as a command argument.

-

Environment Variables

-

Any environment variables that start with npm_config_ will be -interpreted as a configuration parameter. For example, putting -npm_config_foo=bar in your environment will set the foo -configuration parameter to bar. Any environment configurations that -are not given a value will be given the value of true. Config -values are case-insensitive, so NPM_CONFIG_FOO=bar will work the -same. However, please note that inside scripts -npm will set its own environment variables and Node will prefer -those lowercase versions over any uppercase ones that you might set. -For details see this issue.

-

Notice that you need to use underscores instead of dashes, so --allow-same-version -would become npm_config_allow_same_version=true.

-

npmrc Files

-

The four relevant files are:

-
    -
  • per-project configuration file (/path/to/my/project/.npmrc)
  • -
  • per-user configuration file (defaults to $HOME/.npmrc; configurable via CLI -option --userconfig or environment variable $NPM_CONFIG_USERCONFIG)
  • -
  • global configuration file (defaults to $PREFIX/etc/npmrc; configurable via -CLI option --globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG)
  • -
  • npm's built-in configuration file (/path/to/npm/npmrc)
  • -
-

See npmrc for more details.

-

Default Configs

-

Run npm config ls -l to see a set of configuration parameters that are -internal to npm, and are defaults if nothing else is specified.

-

Shorthands and Other CLI Niceties

-

The following shorthands are parsed on the command-line:

-
    -
  • -a: --all
  • -
  • --enjoy-by: --before
  • -
  • -c: --call
  • -
  • --desc: --description
  • -
  • -f: --force
  • -
  • -g: --global
  • -
  • --iwr: --include-workspace-root
  • -
  • -L: --location
  • -
  • -d: --loglevel info
  • -
  • -s: --loglevel silent
  • -
  • --silent: --loglevel silent
  • -
  • --ddd: --loglevel silly
  • -
  • --dd: --loglevel verbose
  • -
  • --verbose: --loglevel verbose
  • -
  • -q: --loglevel warn
  • -
  • --quiet: --loglevel warn
  • -
  • -l: --long
  • -
  • -m: --message
  • -
  • --local: --no-global
  • -
  • -n: --no-yes
  • -
  • --no: --no-yes
  • -
  • -p: --parseable
  • -
  • --porcelain: --parseable
  • -
  • -C: --prefix
  • -
  • --readonly: --read-only
  • -
  • --reg: --registry
  • -
  • -S: --save
  • -
  • -B: --save-bundle
  • -
  • -D: --save-dev
  • -
  • -E: --save-exact
  • -
  • -O: --save-optional
  • -
  • -P: --save-prod
  • -
  • -?: --usage
  • -
  • -h: --usage
  • -
  • -H: --usage
  • -
  • --help: --usage
  • -
  • -v: --version
  • -
  • -w: --workspace
  • -
  • --ws: --workspaces
  • -
  • -y: --yes
  • -
-

If the specified configuration param resolves unambiguously to a known -configuration parameter, then it is expanded to that configuration -parameter. For example:

-
npm ls --par
-# same as:
-npm ls --parseable
-
-

If multiple single-character shorthands are strung together, and the -resulting combination is unambiguously not some other configuration -param, then it is expanded to its various component pieces. For -example:

-
npm ls -gpld
-# same as:
-npm ls --global --parseable --long --loglevel info
-
-

Config Settings

-

_auth

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

A basic-auth string to use when authenticating against the npm registry. -This will ONLY be used to authenticate against the npm registry. For other -registries you will need to scope it like "//other-registry.tld/:_auth"

-

Warning: This should generally not be set via a command-line option. It is -safer to use a registry-provided authentication bearer token stored in the -~/.npmrc file by running npm login.

-

access

-
    -
  • Default: 'public' for new packages, existing packages it will not change the -current level
  • -
  • Type: null, "restricted", or "public"
  • -
-

If you do not want your scoped package to be publicly viewable (and -installable) set --access=restricted.

-

Unscoped packages can not be set to restricted.

-

Note: This defaults to not changing the current access level for existing -packages. Specifying a value of restricted or public during publish will -change the access for an existing package the same way that npm access set status would.

-

all

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When running npm outdated and npm ls, setting --all will show all -outdated or installed packages, rather than only those directly depended -upon by the current project.

-

allow-same-version

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prevents throwing an error when npm version is used to set the new version -to the same value as the current version.

-

audit

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" submit audit reports alongside the current npm command to the -default registry and all registries configured for scopes. See the -documentation for npm audit for details on what is -submitted.

-

audit-level

-
    -
  • Default: null
  • -
  • Type: null, "info", "low", "moderate", "high", "critical", or "none"
  • -
-

The minimum level of vulnerability for npm audit to exit with a non-zero -exit code.

-

auth-type

-
    -
  • Default: "web"
  • -
  • Type: "legacy" or "web"
  • -
-

What authentication strategy to use with login. Note that if an otp -config is given, this value will always be set to legacy.

-

before

-
    -
  • Default: null
  • -
  • Type: null or Date
  • -
-

If passed to npm install, will rebuild the npm tree such that only -versions that were available on or before the --before time get -installed. If there's no versions available for the current set of direct -dependencies, the command will error.

-

If the requested version is a dist-tag and the given tag does not pass the ---before filter, the most recent version less than or equal to that tag -will be used. For example, foo@latest might install foo@1.2 even though -latest is 2.0.

- -
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tells npm to create symlinks (or .cmd shims on Windows) for package -executables.

-

Set to false to have it not do this. This can be used to work around the -fact that some file systems don't support symlinks, even on ostensibly Unix -systems.

-

browser

-
    -
  • Default: OS X: "open", Windows: "start", Others: "xdg-open"
  • -
  • Type: null, Boolean, or String
  • -
-

The browser that is called by npm commands to open websites.

-

Set to false to suppress browser behavior and instead print urls to -terminal.

-

Set to true to use default system URL opener.

-

ca

-
    -
  • Default: null
  • -
  • Type: null or String (can be set multiple times)
  • -
-

The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format (Windows calls -it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string -"\n". For example:

-
ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
-
-

Set to null to only allow "known" registrars, or to a specific CA cert to -trust only that specific signing authority.

-

Multiple CAs can be trusted by specifying an array of certificates:

-
ca[]="..."
-ca[]="..."
-
-

See also the strict-ssl config.

-

cache

-
    -
  • Default: Windows: %LocalAppData%\npm-cache, Posix: ~/.npm
  • -
  • Type: Path
  • -
-

The location of npm's cache directory.

-

cafile

-
    -
  • Default: null
  • -
  • Type: Path
  • -
-

A path to a file containing one or multiple Certificate Authority signing -certificates. Similar to the ca setting, but allows for multiple CA's, as -well as for the CA information to be stored in a file on disk.

-

call

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Optional companion option for npm exec, npx that allows for specifying a -custom command to be run along with the installed packages.

-
npm exec --package yo --package generator-node --call "yo node"
-
-

cidr

-
    -
  • Default: null
  • -
  • Type: null or String (can be set multiple times)
  • -
-

This is a list of CIDR address to be used when configuring limited access -tokens with the npm token create command.

-

color

-
    -
  • Default: true unless the NO_COLOR environ is set to something other than '0'
  • -
  • Type: "always" or Boolean
  • -
-

If false, never shows colors. If "always" then always shows colors. If -true, then only prints color codes for tty file descriptors.

-

commit-hooks

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Run git commit hooks when using the npm version command.

-

cpu

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override CPU architecture of native modules to install. Acceptable values -are same as cpu field of package.json, which comes from process.arch.

-

depth

-
    -
  • Default: Infinity if --all is set, otherwise 1
  • -
  • Type: null or Number
  • -
-

The depth to go when recursing packages for npm ls.

-

If not set, npm ls will show only the immediate dependencies of the root -project. If --all is set, then npm will show all dependencies by default.

-

description

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Show the description in npm search

-

diff

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Define arguments to compare in npm diff.

-

diff-dst-prefix

-
    -
  • Default: "b/"
  • -
  • Type: String
  • -
-

Destination prefix to be used in npm diff output.

-

diff-ignore-all-space

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Ignore whitespace when comparing lines in npm diff.

-

diff-name-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prints only filenames when using npm diff.

-

diff-no-prefix

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Do not show any source or destination prefix in npm diff output.

-

Note: this causes npm diff to ignore the --diff-src-prefix and ---diff-dst-prefix configs.

-

diff-src-prefix

-
    -
  • Default: "a/"
  • -
  • Type: String
  • -
-

Source prefix to be used in npm diff output.

-

diff-text

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Treat all files as text in npm diff.

-

diff-unified

-
    -
  • Default: 3
  • -
  • Type: Number
  • -
-

The number of lines of context to print in npm diff.

-

dry-run

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Indicates that you don't want npm to make any changes and that it should -only report what it would have done. This can be passed into any of the -commands that modify your local installation, eg, install, update, -dedupe, uninstall, as well as pack and publish.

-

Note: This is NOT honored by other network related commands, eg dist-tags, -owner, etc.

-

editor

-
    -
  • Default: The EDITOR or VISUAL environment variables, or -'%SYSTEMROOT%\notepad.exe' on Windows, or 'vi' on Unix systems
  • -
  • Type: String
  • -
-

The command to run for npm edit and npm config edit.

-

engine-strict

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then npm will stubbornly refuse to install (or even consider -installing) any package that claims to not be compatible with the current -Node.js version.

-

This can be overridden by setting the --force flag.

-

fetch-retries

-
    -
  • Default: 2
  • -
  • Type: Number
  • -
-

The "retries" config for the retry module to use when fetching packages -from the registry.

-

npm will retry idempotent read requests to the registry in the case of -network failures or 5xx HTTP errors.

-

fetch-retry-factor

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

The "factor" config for the retry module to use when fetching packages.

-

fetch-retry-maxtimeout

-
    -
  • Default: 60000 (1 minute)
  • -
  • Type: Number
  • -
-

The "maxTimeout" config for the retry module to use when fetching -packages.

-

fetch-retry-mintimeout

-
    -
  • Default: 10000 (10 seconds)
  • -
  • Type: Number
  • -
-

The "minTimeout" config for the retry module to use when fetching -packages.

-

fetch-timeout

-
    -
  • Default: 300000 (5 minutes)
  • -
  • Type: Number
  • -
-

The maximum amount of time to wait for HTTP requests to complete.

-

force

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Removes various protections against unfortunate side effects, common -mistakes, unnecessary performance degradation, and malicious input.

-
    -
  • Allow clobbering non-npm files in global installs.
  • -
  • Allow the npm version command to work on an unclean git repository.
  • -
  • Allow deleting the cache folder with npm cache clean.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of npm.
  • -
  • Allow installing packages that have an engines declaration requiring a -different version of node, even if --engine-strict is enabled.
  • -
  • Allow npm audit fix to install modules outside your stated dependency -range (including SemVer-major changes).
  • -
  • Allow unpublishing all versions of a published package.
  • -
  • Allow conflicting peerDependencies to be installed in the root project.
  • -
  • Implicitly set --yes during npm init.
  • -
  • Allow clobbering existing values in npm pkg
  • -
  • Allow unpublishing of entire packages (not just a single version).
  • -
-

If you don't have a clear idea of what you want to do, it is strongly -recommended that you do not use this option!

-

foreground-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Run all build scripts (ie, preinstall, install, and postinstall) -scripts for installed packages in the foreground process, sharing standard -input, output, and error with the main npm process.

-

Note that this will generally make installs run slower, and be much noisier, -but can be useful for debugging.

-

format-package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Format package-lock.json or npm-shrinkwrap.json as a human readable -file.

-

fund

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

When "true" displays the message at the end of each npm install -acknowledging the number of dependencies looking for funding. See npm fund for details.

-

git

-
    -
  • Default: "git"
  • -
  • Type: String
  • -
-

The command to use for git commands. If git is installed on the computer, -but is not in the PATH, then set this to the full path to the git binary.

-

git-tag-version

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Tag the commit when using the npm version command. Setting this to false -results in no commit being made at all.

-

global

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Operates in "global" mode, so that packages are installed into the prefix -folder instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

globalconfig

-
    -
  • Default: The global --prefix setting plus 'etc/npmrc'. For example, -'/usr/local/etc/npmrc'
  • -
  • Type: Path
  • -
-

The config file to read for global config options.

-

heading

-
    -
  • Default: "npm"
  • -
  • Type: String
  • -
-

The string that starts all the debugging log output.

-

https-proxy

-
    -
  • Default: null
  • -
  • Type: null or URL
  • -
-

A proxy to use for outgoing https requests. If the HTTPS_PROXY or -https_proxy or HTTP_PROXY or http_proxy environment variables are set, -proxy settings will be honored by the underlying make-fetch-happen -library.

-

if-present

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm will not exit with an error code when run-script is invoked -for a script that isn't defined in the scripts section of package.json. -This option can be used when it's desirable to optionally run a script when -it's present and fail if the script fails. This is useful, for example, when -running scripts that may only apply for some builds in an otherwise generic -CI setup.

-

This value is not exported to the environment for child processes.

-

ignore-scripts

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, npm does not run scripts specified in package.json files.

-

Note that commands explicitly intended to run a particular script, such as -npm start, npm stop, npm restart, npm test, and npm run-script -will still run their intended script if ignore-scripts is set, but they -will not run any pre- or post-scripts.

-

include

-
    -
  • Default:
  • -
  • Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Option that allows for defining which types of dependencies to install.

-

This is the inverse of --omit=<type>.

-

Dependency types specified in --include will not be omitted, regardless of -the order in which omit/include are specified on the command-line.

-

include-staged

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Allow installing "staged" published packages, as defined by npm RFC PR -#92.

-

This is experimental, and not implemented by the npm public registry.

-

include-workspace-root

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Include the workspace root when workspaces are enabled for a command.

-

When false, specifying individual workspaces via the workspace config, or -all workspaces via the workspaces flag, will cause npm to operate only on -the specified workspaces, and not on the root project.

-

This value is not exported to the environment for child processes.

-

init-author-email

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's email.

-

init-author-name

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package author's name.

-

init-author-url

-
    -
  • Default: ""
  • -
  • Type: "" or URL
  • -
-

The value npm init should use by default for the package author's -homepage.

-

init-license

-
    -
  • Default: "ISC"
  • -
  • Type: String
  • -
-

The value npm init should use by default for the package license.

-

init-module

-
    -
  • Default: "~/.npm-init.js"
  • -
  • Type: Path
  • -
-

A module that will be loaded by the npm init command. See the -documentation for the -init-package-json module for -more information, or npm init.

-

init-version

-
    -
  • Default: "1.0.0"
  • -
  • Type: SemVer string
  • -
-

The value that npm init should use by default for the package version -number, if not already set in package.json.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When set file: protocol dependencies will be packed and installed as regular -dependencies instead of creating a symlink. This option has no effect on -workspaces.

-

install-strategy

-
    -
  • Default: "hoisted"
  • -
  • Type: "hoisted", "nested", "shallow", or "linked"
  • -
-

Sets the strategy for installing packages in node_modules. hoisted -(default): Install non-duplicated in top-level, and duplicated as necessary -within directory structure. nested: (formerly --legacy-bundling) install in -place, no hoisting. shallow (formerly --global-style) only install direct -deps at top-level. linked: (experimental) install in node_modules/.store, -link in place, unhoisted.

-

json

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Whether or not to output JSON data, rather than the normal output.

-
    -
  • In npm pkg set it enables parsing set values with JSON.parse() before -saving them to your package.json.
  • -
-

Not supported by all npm commands.

-

legacy-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Causes npm to completely ignore peerDependencies when building a package -tree, as in npm versions 3 through 6.

-

If a package cannot be installed because of overly strict peerDependencies -that collide, it provides a way to move forward resolving the situation.

-

This differs from --omit=peer, in that --omit=peer will avoid unpacking -peerDependencies on disk, but will still design a tree such that -peerDependencies could be unpacked in a correct place.

-

Use of legacy-peer-deps is not recommended, as it will not enforce the -peerDependencies contract that meta-dependencies may rely on.

- -
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Used with npm ls, limiting output to only those packages that are linked.

-

local-address

-
    -
  • Default: null
  • -
  • Type: IP Address
  • -
-

The IP address of the local interface to use when making connections to the -npm registry. Must be IPv4 in versions of Node prior to 0.12.

-

location

-
    -
  • Default: "user" unless --global is passed, which will also set this value -to "global"
  • -
  • Type: "global", "user", or "project"
  • -
-

When passed to npm config this refers to which config file to use.

-

When set to "global" mode, packages are installed into the prefix folder -instead of the current working directory. See -folders for more on the differences in behavior.

-
    -
  • packages are installed into the {prefix}/lib/node_modules folder, instead -of the current working directory.
  • -
  • bin files are linked to {prefix}/bin
  • -
  • man pages are linked to {prefix}/share/man
  • -
-

lockfile-version

-
    -
  • Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, -otherwise maintain current lockfile version.
  • -
  • Type: null, 1, 2, 3, "1", "2", or "3"
  • -
-

Set the lockfile format version to be used in package-lock.json and -npm-shrinkwrap-json files. Possible options are:

-

1: The lockfile version used by npm versions 5 and 6. Lacks some data that -is used during the install, resulting in slower and possibly less -deterministic installs. Prevents lockfile churn when interoperating with -older npm versions.

-

2: The default lockfile version used by npm version 7 and 8. Includes both -the version 1 lockfile data and version 3 lockfile data, for maximum -determinism and interoperability, at the expense of more bytes on disk.

-

3: Only the new lockfile information introduced in npm version 7. Smaller on -disk than lockfile version 2, but not interoperable with older npm versions. -Ideal if all users are on npm version 7 and higher.

-

loglevel

-
    -
  • Default: "notice"
  • -
  • Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or -"silly"
  • -
-

What level of logs to report. All logs are written to a debug log, with the -path to that file printed if the execution of a command fails.

-

Any logs of a higher level than the setting are shown. The default is -"notice".

-

See also the foreground-scripts config.

-

logs-dir

-
    -
  • Default: A directory named _logs inside the cache
  • -
  • Type: null or Path
  • -
-

The location of npm's log directory. See npm logging -for more information.

-

logs-max

-
    -
  • Default: 10
  • -
  • Type: Number
  • -
-

The maximum number of log files to store.

-

If set to 0, no log files will be written for the current run.

-

long

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show extended information in ls, search, and help-search.

-

maxsockets

-
    -
  • Default: 15
  • -
  • Type: Number
  • -
-

The maximum number of connections to use per origin (protocol/host/port -combination).

-

message

-
    -
  • Default: "%s"
  • -
  • Type: String
  • -
-

Commit message which is used by npm version when creating version commit.

-

Any "%s" in the message will be replaced with the version number.

-

node-options

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Options to pass through to Node.js via the NODE_OPTIONS environment -variable. This does not impact how npm itself is executed but it does impact -how lifecycle scripts are called.

-

noproxy

-
    -
  • Default: The value of the NO_PROXY environment variable
  • -
  • Type: String (can be set multiple times)
  • -
-

Domain extensions that should bypass any proxies.

-

Also accepts a comma-delimited string.

-

offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Force offline mode: no network requests will be done during install. To -allow the CLI to fill in missing cache data, see --prefer-offline.

-

omit

-
    -
  • Default: 'dev' if the NODE_ENV environment variable is set to -'production', otherwise empty.
  • -
  • Type: "dev", "optional", or "peer" (can be set multiple times)
  • -
-

Dependency types to omit from the installation tree on disk.

-

Note that these dependencies are still resolved and added to the -package-lock.json or npm-shrinkwrap.json file. They are just not -physically installed on disk.

-

If a package type appears in both the --include and --omit lists, then -it will be included.

-

If the resulting omit list includes 'dev', then the NODE_ENV environment -variable will be set to 'production' for all lifecycle scripts.

-

omit-lockfile-registry-resolved

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

This option causes npm to create lock files without a resolved key for -registry dependencies. Subsequent installs will need to resolve tarball -endpoints with the configured registry, likely resulting in a longer install -time.

-

os

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

Override OS of native modules to install. Acceptable values are same as os -field of package.json, which comes from process.platform.

-

otp

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
-

This is a one-time password from a two-factor authenticator. It's needed -when publishing or changing package permissions with npm access.

-

If not set, and a registry response fails with a challenge for a one-time -password, npm will prompt on the command line for one.

-

pack-destination

-
    -
  • Default: "."
  • -
  • Type: String
  • -
-

Directory in which npm pack will save tarballs.

-

package

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

The package or packages to install for npm exec

-

package-lock

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to false, then ignore package-lock.json files when installing. This -will also prevent writing package-lock.json if save is true.

-

package-lock-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, the current operation will only use the package-lock.json, -ignoring node_modules.

-

For update this means only the package-lock.json will be updated, -instead of checking node_modules and downloading dependencies.

-

For list this means the output will be based on the tree described by the -package-lock.json, rather than the contents of node_modules.

-

parseable

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Output parseable results from commands that write to standard output. For -npm search, this will be tab-separated table format.

-

prefer-dedupe

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Prefer to deduplicate packages if possible, rather than choosing a newer -version of a dependency.

-

prefer-offline

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be bypassed, but missing data -will be requested from the server. To force full offline mode, use ---offline.

-

prefer-online

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, staleness checks for cached data will be forced, making the CLI -look for updates immediately even for fresh package data.

-

prefix

-
    -
  • Default: In global mode, the folder where the node executable is installed. -Otherwise, the nearest parent folder containing either a package.json file -or a node_modules folder.
  • -
  • Type: Path
  • -
-

The location to install global items. If set on the command line, then it -forces non-global commands to run in the specified folder.

-

preid

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

The "prerelease identifier" to use as a prefix for the "prerelease" part of -a semver. Like the rc in 1.2.0-rc.8.

-

progress

-
    -
  • Default: true unless running in a known CI system
  • -
  • Type: Boolean
  • -
-

When set to true, npm will display a progress bar during time intensive -operations, if process.stderr is a TTY.

-

Set to false to suppress the progress bar.

-

provenance

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

When publishing from a supported cloud CI/CD system, the package will be -publicly linked to where it was built and published from.

-

This config can not be used with: provenance-file

-

provenance-file

-
    -
  • Default: null
  • -
  • Type: Path
  • -
-

When publishing, the provenance bundle at the given path will be used.

-

This config can not be used with: provenance

-

proxy

-
    -
  • Default: null
  • -
  • Type: null, false, or URL
  • -
-

A proxy to use for outgoing http requests. If the HTTP_PROXY or -http_proxy environment variables are set, proxy settings will be honored -by the underlying request library.

-

read-only

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

This is used to mark a token as unable to publish when configuring limited -access tokens with the npm token create command.

-

rebuild-bundle

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Rebuild bundled dependencies after installation.

-

registry

- -

The base URL of the npm registry.

-

replace-registry-host

-
    -
  • Default: "npmjs"
  • -
  • Type: "npmjs", "never", "always", or String
  • -
-

Defines behavior for replacing the registry host in a lockfile with the -configured registry.

-

The default behavior is to replace package dist URLs from the default -registry (https://registry.npmjs.org) to the configured registry. If set to -"never", then use the registry value. If set to "always", then replace the -registry host with the configured host every time.

-

You may also specify a bare hostname (e.g., "registry.npmjs.org").

-

save

-
    -
  • Default: true unless when using npm update where it defaults to false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as dependencies.

-

When used with the npm rm command, removes the dependency from -package.json.

-

Will also prevent writing to package-lock.json if set to false.

-

save-bundle

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If a package would be saved at install time by the use of --save, ---save-dev, or --save-optional, then also put it in the -bundleDependencies list.

-

Ignored if --save-peer is set, since peerDependencies cannot be bundled.

-

save-dev

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as devDependencies.

-

save-exact

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Dependencies saved to package.json will be configured with an exact version -rather than using npm's default semver range operator.

-

save-optional

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as optionalDependencies.

-

save-peer

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages to a package.json file as peerDependencies

-

save-prefix

-
    -
  • Default: "^"
  • -
  • Type: String
  • -
-

Configure how versions of packages installed to a package.json file via ---save or --save-dev get prefixed.

-

For example if a package has version 1.2.3, by default its version is set -to ^1.2.3 which allows minor upgrades for that package, but after npm config set save-prefix='~' it would be set to ~1.2.3 which only allows -patch upgrades.

-

save-prod

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Save installed packages into dependencies specifically. This is useful if -a package already exists in devDependencies or optionalDependencies, but -you want to move it to be a non-optional production dependency.

-

This is the default behavior if --save is true, and neither --save-dev -or --save-optional are true.

-

sbom-format

-
    -
  • Default: null
  • -
  • Type: "cyclonedx" or "spdx"
  • -
-

SBOM format to use when generating SBOMs.

-

sbom-type

-
    -
  • Default: "library"
  • -
  • Type: "library", "application", or "framework"
  • -
-

The type of package described by the generated SBOM. For SPDX, this is the -value for the primaryPackagePurpose field. For CycloneDX, this is the -value for the type field.

-

scope

-
    -
  • Default: the scope of the current project, if any, or ""
  • -
  • Type: String
  • -
-

Associate an operation with a scope for a scoped registry.

-

Useful when logging in to or out of a private registry:

-
# log in, linking the scope to the custom registry
-npm login --scope=@mycorp --registry=https://registry.mycorp.com
-
-# log out, removing the link and the auth token
-npm logout --scope=@mycorp
-
-

This will cause @mycorp to be mapped to the registry for future -installation of packages specified according to the pattern -@mycorp/package.

-

This will also cause npm init to create a scoped package.

-
# accept all defaults, and create a package named "@foo/whatever",
-# instead of just named "whatever"
-npm init --scope=@foo --yes
-
-

script-shell

-
    -
  • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  • -
  • Type: null or String
  • -
-

The shell to use for scripts run with the npm exec, npm run and npm init <package-spec> commands.

-

searchexclude

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that limit the results from search.

-

searchlimit

-
    -
  • Default: 20
  • -
  • Type: Number
  • -
-

Number of items to limit search results to. Will not apply at all to legacy -searches.

-

searchopts

-
    -
  • Default: ""
  • -
  • Type: String
  • -
-

Space-separated options that are always passed to search.

-

searchstaleness

-
    -
  • Default: 900
  • -
  • Type: Number
  • -
-

The age of the cache, in seconds, before another registry request is made if -using legacy search endpoint.

-

shell

-
    -
  • Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on -Windows
  • -
  • Type: String
  • -
-

The shell to run for the npm explore command.

-

sign-git-commit

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then the npm version command will commit the new package -version using -S to add a signature.

-

Note that git requires you to have set up GPG keys in your git configs for -this to work properly.

-

sign-git-tag

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, then the npm version command will tag the version using --s to add a signature.

-

Note that git requires you to have set up GPG keys in your git configs for -this to work properly.

-

strict-peer-deps

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If set to true, and --legacy-peer-deps is not set, then any -conflicting peerDependencies will be treated as an install failure, even -if npm could reasonably guess the appropriate resolution based on non-peer -dependency relationships.

-

By default, conflicting peerDependencies deep in the dependency graph will -be resolved using the nearest non-peer dependency specification, even if -doing so will result in some packages receiving a peer dependency outside -the range set in their package's peerDependencies object.

-

When such an override is performed, a warning is printed, explaining the -conflict and the packages involved. If --strict-peer-deps is set, then -this warning is treated as a failure.

-

strict-ssl

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Whether or not to do SSL key validation when making requests to the registry -via https.

-

See also the ca config.

-

tag

-
    -
  • Default: "latest"
  • -
  • Type: String
  • -
-

If you ask npm to install a package and don't tell it a specific version, -then it will install the specified tag.

-

Also the tag that is added to the package@version specified by the npm tag -command, if no explicit tag is given.

-

When used by the npm diff command, this is the tag used to fetch the -tarball that will be compared with the local files by default.

-

tag-version-prefix

-
    -
  • Default: "v"
  • -
  • Type: String
  • -
-

If set, alters the prefix used when tagging a new version when performing a -version increment using npm version. To remove the prefix altogether, set -it to the empty string: "".

-

Because other tools may rely on the convention that npm version tags look -like v1.0.0, only use this property if it is absolutely necessary. In -particular, use care when overriding this setting for public packages.

-

timing

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, writes timing information to a process specific json file in the -cache or logs-dir. The file name ends with -timing.json.

-

You can quickly view it with this json command line: -cat ~/.npm/_logs/*-timing.json | npm exec -- json -g.

-

Timing information will also be reported in the terminal. To suppress this -while still writing the timing file, use --silent.

-

umask

-
    -
  • Default: 0
  • -
  • Type: Octal numeric string in range 0000..0777 (0..511)
  • -
-

The "umask" value to use when setting the file creation mode on files and -folders.

-

Folders and executables are given a mode which is 0o777 masked against -this value. Other files are given a mode which is 0o666 masked against -this value.

-

Note that the underlying system will also apply its own umask value to -files and folders that are created, and npm does not circumvent this, but -rather adds the --umask config to it.

-

Thus, the effective default umask value on most POSIX systems is 0o22, -meaning that folders and executables are created with a mode of 0o755 and -other files are created with a mode of 0o644.

-

unicode

-
    -
  • Default: false on windows, true on mac/unix systems with a unicode locale, -as defined by the LC_ALL, LC_CTYPE, or LANG environment variables.
  • -
  • Type: Boolean
  • -
-

When set to true, npm uses unicode characters in the tree output. When -false, it uses ascii characters instead of unicode glyphs.

-

update-notifier

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

Set to false to suppress the update notification when using an older version -of npm than the latest.

-

usage

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

Show short usage output about the command specified.

-

user-agent

-
    -
  • Default: "npm/{npm-version} node/{node-version} {platform} {arch} -workspaces/{workspaces} {ci}"
  • -
  • Type: String
  • -
-

Sets the User-Agent request header. The following fields are replaced with -their actual counterparts:

-
    -
  • {npm-version} - The npm version in use
  • -
  • {node-version} - The Node.js version in use
  • -
  • {platform} - The value of process.platform
  • -
  • {arch} - The value of process.arch
  • -
  • {workspaces} - Set to true if the workspaces or workspace options -are set.
  • -
  • {ci} - The value of the ci-name config, if set, prefixed with ci/, or -an empty string if ci-name is empty.
  • -
-

userconfig

-
    -
  • Default: "~/.npmrc"
  • -
  • Type: Path
  • -
-

The location of user-level configuration settings.

-

This may be overridden by the npm_config_userconfig environment variable -or the --userconfig command line option, but may not be overridden by -settings in the globalconfig file.

-

version

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, output the npm version and exit successfully.

-

Only relevant when specified explicitly on the command line.

-

versions

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
-

If true, output the npm version as well as node's process.versions map and -the version in the current working directory's package.json file if one -exists, and exit successfully.

-

Only relevant when specified explicitly on the command line.

-

viewer

-
    -
  • Default: "man" on Posix, "browser" on Windows
  • -
  • Type: String
  • -
-

The program to use to view help content.

-

Set to "browser" to view html help content in the default web browser.

-

which

-
    -
  • Default: null
  • -
  • Type: null or Number
  • -
-

If there are multiple funding sources, which 1-indexed source URL to open.

-

workspace

-
    -
  • Default:
  • -
  • Type: String (can be set multiple times)
  • -
-

Enable running a command in the context of the configured workspaces of the -current project while filtering by running only the workspaces defined by -this configuration option.

-

Valid values for the workspace config are either:

-
    -
  • Workspace names
  • -
  • Path to a workspace directory
  • -
  • Path to a parent workspace directory (will result in selecting all -workspaces within that folder)
  • -
-

When set for the npm init command, this may be set to the folder of a -workspace which does not yet exist, to create the folder and set it up as a -brand new workspace within the project.

-

This value is not exported to the environment for child processes.

-

workspaces

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Set to true to run the command in the context of all configured -workspaces.

-

Explicitly setting this to false will cause commands like install to -ignore workspaces altogether. When not set explicitly:

-
    -
  • Commands that operate on the node_modules tree (install, update, etc.) -will link workspaces into the node_modules folder. - Commands that do -other things (test, exec, publish, etc.) will operate on the root project, -unless one or more workspaces are specified in the workspace config.
  • -
-

This value is not exported to the environment for child processes.

-

workspaces-update

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
-

If set to true, the npm cli will run an update after operations that may -possibly change the workspaces installed to the node_modules folder.

-

yes

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
-

Automatically answer "yes" to any prompts that npm might print on the -command line.

-

also

-
    -
  • Default: null
  • -
  • Type: null, "dev", or "development"
  • -
  • DEPRECATED: Please use --include=dev instead.
  • -
-

When set to dev or development, this is an alias for --include=dev.

-

cache-max

-
    -
  • Default: Infinity
  • -
  • Type: Number
  • -
  • DEPRECATED: This option has been deprecated in favor of --prefer-online
  • -
-

--cache-max=0 is an alias for --prefer-online

-

cache-min

-
    -
  • Default: 0
  • -
  • Type: Number
  • -
  • DEPRECATED: This option has been deprecated in favor of --prefer-offline.
  • -
-

--cache-min=9999 (or bigger) is an alias for --prefer-offline.

-

cert

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
  • DEPRECATED: key and cert are no longer used for most registry -operations. Use registry scoped keyfile and certfile instead. Example: -//other-registry.tld/:keyfile=/path/to/key.pem -//other-registry.tld/:certfile=/path/to/cert.crt
  • -
-

A client certificate to pass when accessing the registry. Values should be -in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with -newlines replaced by the string "\n". For example:

-
cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
-
-

It is not the path to a certificate file, though you can set a -registry-scoped "certfile" path like -"//other-registry.tld/:certfile=/path/to/cert.pem".

-

dev

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: Please use --include=dev instead.
  • -
-

Alias for --include=dev.

-

global-style

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=shallow
  • -
-

Only install direct dependencies in the top level node_modules, but hoist -on deeper dependencies. Sets --install-strategy=shallow.

-

init.author.email

-
    -
  • Default: ""
  • -
  • Type: String
  • -
  • DEPRECATED: Use --init-author-email instead.
  • -
-

Alias for --init-author-email

-

init.author.name

-
    -
  • Default: ""
  • -
  • Type: String
  • -
  • DEPRECATED: Use --init-author-name instead.
  • -
-

Alias for --init-author-name

-

init.author.url

-
    -
  • Default: ""
  • -
  • Type: "" or URL
  • -
  • DEPRECATED: Use --init-author-url instead.
  • -
-

Alias for --init-author-url

-

init.license

-
    -
  • Default: "ISC"
  • -
  • Type: String
  • -
  • DEPRECATED: Use --init-license instead.
  • -
-

Alias for --init-license

-

init.module

-
    -
  • Default: "~/.npm-init.js"
  • -
  • Type: Path
  • -
  • DEPRECATED: Use --init-module instead.
  • -
-

Alias for --init-module

-

init.version

-
    -
  • Default: "1.0.0"
  • -
  • Type: SemVer string
  • -
  • DEPRECATED: Use --init-version instead.
  • -
-

Alias for --init-version

-

key

-
    -
  • Default: null
  • -
  • Type: null or String
  • -
  • DEPRECATED: key and cert are no longer used for most registry -operations. Use registry scoped keyfile and certfile instead. Example: -//other-registry.tld/:keyfile=/path/to/key.pem -//other-registry.tld/:certfile=/path/to/cert.crt
  • -
-

A client key to pass when accessing the registry. Values should be in PEM -format with newlines replaced by the string "\n". For example:

-
key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
-
-

It is not the path to a key file, though you can set a registry-scoped -"keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem".

-

legacy-bundling

-
    -
  • Default: false
  • -
  • Type: Boolean
  • -
  • DEPRECATED: This option has been deprecated in favor of ---install-strategy=nested
  • -
-

Instead of hoisting package installs in node_modules, install packages in -the same manner that they are depended on. This may cause very deep -directory structures and duplicate package installs as there is no -de-duplicating. Sets --install-strategy=nested.

-

only

-
    -
  • Default: null
  • -
  • Type: null, "prod", or "production"
  • -
  • DEPRECATED: Use --omit=dev to omit dev dependencies from the install.
  • -
-

When set to prod or production, this is an alias for --omit=dev.

-

optional

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
  • DEPRECATED: Use --omit=optional to exclude optional dependencies, or ---include=optional to include them.
  • -
-

Default value does install optional deps unless otherwise omitted.

-

Alias for --include=optional or --omit=optional

-

production

-
    -
  • Default: null
  • -
  • Type: null or Boolean
  • -
  • DEPRECATED: Use --omit=dev instead.
  • -
-

Alias for --omit=dev

-

shrinkwrap

-
    -
  • Default: true
  • -
  • Type: Boolean
  • -
  • DEPRECATED: Use the --package-lock setting instead.
  • -
-

Alias for --package-lock

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/dependency-selectors.html b/node_modules/npm/docs/output/using-npm/dependency-selectors.html deleted file mode 100644 index 1ea3587..0000000 --- a/node_modules/npm/docs/output/using-npm/dependency-selectors.html +++ /dev/null @@ -1,336 +0,0 @@ - - -Dependency Selector Syntax & Querying - - - - - -
-
-

Dependency Selector Syntax & Querying

-Dependency Selector Syntax & Querying -
- -
-

Table of contents

- -
- -

Description

-

The npm query command exposes a new dependency selector syntax (informed by & respecting many aspects of the CSS Selectors 4 Spec) which:

-
    -
  • Standardizes the shape of, & querying of, dependency graphs with a robust object model, metadata & selector syntax
  • -
  • Leverages existing, known language syntax & operators from CSS to make disparate package information broadly accessible
  • -
  • Unlocks the ability to answer complex, multi-faceted questions about dependencies, their relationships & associative metadata
  • -
  • Consolidates redundant logic of similar query commands in npm (ex. npm fund, npm ls, npm outdated, npm audit ...)
  • -
-

Dependency Selector Syntax v1.0.0

-

Overview:

-
    -
  • there is no "type" or "tag" selectors (ex. div, h1, a) as a dependency/target is the only type of Node that can be queried
  • -
  • the term "dependencies" is in reference to any Node found in a tree returned by Arborist
  • -
-

Combinators

-
    -
  • > direct descendant/child
  • -
  • any descendant/child
  • -
  • ~ sibling
  • -
-

Selectors

-
    -
  • * universal selector
  • -
  • #<name> dependency selector (equivalent to [name="..."])
  • -
  • #<name>@<version> (equivalent to [name=<name>]:semver(<version>))
  • -
  • , selector list delimiter
  • -
  • . dependency type selector
  • -
  • : pseudo selector
  • -
-

Dependency Type Selectors

-
    -
  • .prod dependency found in the dependencies section of package.json, or is a child of said dependency
  • -
  • .dev dependency found in the devDependencies section of package.json, or is a child of said dependency
  • -
  • .optional dependency found in the optionalDependencies section of package.json, or has "optional": true set in its entry in the peerDependenciesMeta section of package.json, or a child of said dependency
  • -
  • .peer dependency found in the peerDependencies section of package.json
  • -
  • .workspace dependency found in the workspaces section of package.json
  • -
  • .bundled dependency found in the bundleDependencies section of package.json, or is a child of said dependency
  • -
-

Pseudo Selectors

-
    -
  • :not(<selector>)
  • -
  • :has(<selector>)
  • -
  • :is(<selector list>)
  • -
  • :root matches the root node/dependency
  • -
  • :scope matches node/dependency it was queried against
  • -
  • :empty when a dependency has no dependencies
  • -
  • :private when a dependency is private
  • -
  • :link when a dependency is linked (for instance, workspaces or packages manually linked
  • -
  • :deduped when a dependency has been deduped (note that this does not always mean the dependency has been hoisted to the root of node_modules)
  • -
  • :overridden when a dependency has been overridden
  • -
  • :extraneous when a dependency exists but is not defined as a dependency of any node
  • -
  • :invalid when a dependency version is out of its ancestors specified range
  • -
  • :missing when a dependency is not found on disk
  • -
  • :semver(<spec>, [selector], [function]) match a valid node-semver version or range to a selector
  • -
  • :path(<path>) glob matching based on dependencies path relative to the project
  • -
  • :type(<type>) based on currently recognized types
  • -
  • :outdated(<type>) when a dependency is outdated
  • -
-
:semver(<spec>, [selector], [function])
-

The :semver() pseudo selector allows comparing fields from each node's package.json using semver methods. It accepts up to 3 parameters, all but the first of which are optional.

-
    -
  • spec a semver version or range
  • -
  • selector an attribute selector for each node (default [version])
  • -
  • function a semver method to apply, one of: satisfies, intersects, subset, gt, gte, gtr, lt, lte, ltr, eq, neq or the special function infer (default infer)
  • -
-

When the special infer function is used the spec and the actual value from the node are compared. If both are versions, according to semver.valid(), eq is used. If both values are ranges, according to !semver.valid(), intersects is used. If the values are mixed types satisfies is used.

-

Some examples:

-
    -
  • :semver(^1.0.0) returns every node that has a version satisfied by the provided range ^1.0.0
  • -
  • :semver(16.0.0, :attr(engines, [node])) returns every node which has an engines.node property satisfying the version 16.0.0
  • -
  • :semver(1.0.0, [version], lt) every node with a version less than 1.0.0
  • -
-
:outdated(<type>)
-

The :outdated pseudo selector retrieves data from the registry and returns information about which of your dependencies are outdated. The type parameter may be one of the following:

-
    -
  • any (default) a version exists that is greater than the current one
  • -
  • in-range a version exists that is greater than the current one, and satisfies at least one if its dependents
  • -
  • out-of-range a version exists that is greater than the current one, does not satisfy at least one of its dependents
  • -
  • major a version exists that is a semver major greater than the current one
  • -
  • minor a version exists that is a semver minor greater than the current one
  • -
  • patch a version exists that is a semver patch greater than the current one
  • -
-

In addition to the filtering performed by the pseudo selector, some extra data is added to the resulting objects. The following data can be found under the queryContext property of each node.

-
    -
  • versions an array of every available version of the given node
  • -
  • outdated.inRange an array of objects, each with a from and versions, where from is the on-disk location of the node that depends on the current node and versions is an array of all available versions that satisfies that dependency. This is only populated if :outdated(in-range) is used.
  • -
  • outdated.outOfRange an array of objects, identical in shape to inRange, but where the versions array is every available version that does not satisfy the dependency. This is only populated if :outdated(out-of-range) is used.
  • -
-

Some examples:

-
    -
  • :root > :outdated(major) returns every direct dependency that has a new semver major release
  • -
  • .prod:outdated(in-range) returns production dependencies that have a new release that satisfies at least one of its edges in
  • -
-

Attribute Selectors

-

The attribute selector evaluates the key/value pairs in package.json if they are Strings.

-
    -
  • [] attribute selector (ie. existence of attribute)
  • -
  • [attribute=value] attribute value is equivalant...
  • -
  • [attribute~=value] attribute value contains word...
  • -
  • [attribute*=value] attribute value contains string...
  • -
  • [attribute|=value] attribute value is equal to or starts with...
  • -
  • [attribute^=value] attribute value starts with...
  • -
  • [attribute$=value] attribute value ends with...
  • -
-

Array & Object Attribute Selectors

-

The generic :attr() pseudo selector standardizes a pattern which can be used for attribute selection of Objects, Arrays or Arrays of Objects accessible via Arborist's Node.package metadata. This allows for iterative attribute selection beyond top-level String evaluation. The last argument passed to :attr() must be an attribute selector or a nested :attr(). See examples below:

-

Objects

-
/* return dependencies that have a `scripts.test` containing `"tap"` */
-*:attr(scripts, [test~=tap])
-
-

Nested Objects

-

Nested objects are expressed as sequential arguments to :attr().

-
/* return dependencies that have a testling config for opera browsers */
-*:attr(testling, browsers, [~=opera])
-
-

Arrays

-

Arrays specifically uses a special/reserved . character in place of a typical attribute name. Arrays also support exact value matching when a String is passed to the selector.

-
Example of an Array Attribute Selection:
-
/* removes the distinction between properties & arrays */
-/* ie. we'd have to check the property & iterate to match selection */
-*:attr([keywords^=react])
-*:attr(contributors, :attr([name~=Jordan]))
-
-
Example of an Array matching directly to a value:
-
/* return dependencies that have the exact keyword "react" */
-/* this is equivalent to `*:keywords([value="react"])` */
-*:attr([keywords=react])
-
-
Example of an Array of Objects:
-
/* returns */
-*:attr(contributors, [email=ruyadorno@github.com])
-
-

Groups

-

Dependency groups are defined by the package relationships to their ancestors (ie. the dependency types that are defined in package.json). This approach is user-centric as the ecosystem has been taught to think about dependencies in these groups first-and-foremost. Dependencies are allowed to be included in multiple groups (ex. a prod dependency may also be a dev dependency (in that it's also required by another dev dependency) & may also be bundled - a selector for that type of dependency would look like: *.prod.dev.bundled).

-
    -
  • .prod
  • -
  • .dev
  • -
  • .optional
  • -
  • .peer
  • -
  • .bundled
  • -
  • .workspace
  • -
-

Please note that currently workspace deps are always prod dependencies. Additionally the .root dependency is also considered a prod dependency.

-

Programmatic Usage

-
    -
  • Arborist's Node Class has a .querySelectorAll() method -
      -
    • this method will return a filtered, flattened dependency Arborist Node list based on a valid query selector
    • -
    -
  • -
-
const Arborist = require('@npmcli/arborist')
-const arb = new Arborist({})
-
-
// root-level
-arb.loadActual().then(async (tree) => {
-  // query all production dependencies
-  const results = await tree.querySelectorAll('.prod')
-  console.log(results)
-})
-
-
// iterative
-arb.loadActual().then(async (tree) => {
-  // query for the deduped version of react
-  const results = await tree.querySelectorAll('#react:not(:deduped)')
-  // query the deduped react for git deps
-  const deps = await results[0].querySelectorAll(':type(git)')
-  console.log(deps)
-})
-
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/developers.html b/node_modules/npm/docs/output/using-npm/developers.html deleted file mode 100644 index cde04b8..0000000 --- a/node_modules/npm/docs/output/using-npm/developers.html +++ /dev/null @@ -1,352 +0,0 @@ - - -developers - - - - - -
-
-

developers

-Developer Guide -
- -
-

Table of contents

- -
- -

Description

-

So, you've decided to use npm to develop (and maybe publish/deploy) -your project.

-

Fantastic!

-

There are a few things that you need to do above the simple steps -that your users will do to install your program.

-

About These Documents

-

These are man pages. If you install npm, you should be able to -then do man npm-thing to get the documentation on a particular -topic, or npm help thing to see the same information.

-

What is a Package

-

A package is:

-
    -
  • a) a folder containing a program described by a package.json file
  • -
  • b) a gzipped tarball containing (a)
  • -
  • c) a url that resolves to (b)
  • -
  • d) a <name>@<version> that is published on the registry with (c)
  • -
  • e) a <name>@<tag> that points to (d)
  • -
  • f) a <name> that has a "latest" tag satisfying (e)
  • -
  • g) a git url that, when cloned, results in (a).
  • -
-

Even if you never publish your package, you can still get a lot of -benefits of using npm if you just want to write a node program (a), and -perhaps if you also want to be able to easily install it elsewhere -after packing it up into a tarball (b).

-

Git urls can be of the form:

-
git://github.com/user/project.git#commit-ish
-git+ssh://user@hostname:project.git#commit-ish
-git+http://user@hostname/project/blah.git#commit-ish
-git+https://user@hostname/project/blah.git#commit-ish
-
-

The commit-ish can be any tag, sha, or branch which can be supplied as -an argument to git checkout. The default is whatever the repository uses -as its default branch.

-

The package.json File

-

You need to have a package.json file in the root of your project to do -much of anything with npm. That is basically the whole interface.

-

See package.json for details about what -goes in that file. At the very least, you need:

-
    -
  • -

    name: This should be a string that identifies your project. Please do -not use the name to specify that it runs on node, or is in JavaScript. -You can use the "engines" field to explicitly state the versions of node -(or whatever else) that your program requires, and it's pretty well -assumed that it's JavaScript.

    -

    It does not necessarily need to match your github repository name.

    -

    So, node-foo and bar-js are bad names. foo or bar are better.

    -
  • -
  • -

    version: A semver-compatible version.

    -
  • -
  • -

    engines: Specify the versions of node (or whatever else) that your -program runs on. The node API changes a lot, and there may be bugs or -new functionality that you depend on. Be explicit.

    -
  • -
  • -

    author: Take some credit.

    -
  • -
  • -

    scripts: If you have a special compilation or installation script, then -you should put it in the scripts object. You should definitely have at -least a basic smoke-test command as the "scripts.test" field. See -scripts.

    -
  • -
  • -

    main: If you have a single module that serves as the entry point to your -program (like what the "foo" package gives you at require("foo")), then -you need to specify that in the "main" field.

    -
  • -
  • -

    directories: This is an object mapping names to folders. The best ones -to include are "lib" and "doc", but if you use "man" to specify a folder -full of man pages, they'll get installed just like these ones.

    -
  • -
-

You can use npm init in the root of your package in order to get you -started with a pretty basic package.json file. See npm init for more info.

-

Keeping files out of your Package

-

Use a .npmignore file to keep stuff out of your package. If there's no -.npmignore file, but there is a .gitignore file, then npm will ignore -the stuff matched by the .gitignore file. If you want to include -something that is excluded by your .gitignore file, you can create an -empty .npmignore file to override it. Like git, npm looks for -.npmignore and .gitignore files in all subdirectories of your package, -not only the root directory.

-

.npmignore files follow the same pattern -rules -as .gitignore files:

-
    -
  • Blank lines or lines starting with # are ignored.
  • -
  • Standard glob patterns work.
  • -
  • You can end patterns with a forward slash / to specify a directory.
  • -
  • You can negate a pattern by starting it with an exclamation point !.
  • -
-

By default, the following paths and files are ignored, so there's no -need to add them to .npmignore explicitly:

-
    -
  • .*.swp
  • -
  • ._*
  • -
  • .DS_Store
  • -
  • .git
  • -
  • .gitignore
  • -
  • .hg
  • -
  • .npmignore
  • -
  • .npmrc
  • -
  • .lock-wscript
  • -
  • .svn
  • -
  • .wafpickle-*
  • -
  • config.gypi
  • -
  • CVS
  • -
  • npm-debug.log
  • -
-

Additionally, everything in node_modules is ignored, except for -bundled dependencies. npm automatically handles this for you, so don't -bother adding node_modules to .npmignore.

-

The following paths and files are never ignored, so adding them to -.npmignore is pointless:

-
    -
  • package.json
  • -
  • README (and its variants)
  • -
  • CHANGELOG (and its variants)
  • -
  • LICENSE / LICENCE
  • -
-

If, given the structure of your project, you find .npmignore to be a -maintenance headache, you might instead try populating the files -property of package.json, which is an array of file or directory names -that should be included in your package. Sometimes manually picking -which items to allow is easier to manage than building a block list.

-

Testing whether your .npmignore or files config works

-

If you want to double check that your package will include only the files -you intend it to when published, you can run the npm pack command locally -which will generate a tarball in the working directory, the same way it -does for publishing.

- -

npm link is designed to install a development package and see the -changes in real time without having to keep re-installing it. (You do -need to either re-link or npm rebuild -g to update compiled packages, -of course.)

-

More info at npm link.

-

Before Publishing: Make Sure Your Package Installs and Works

-

This is important.

-

If you can not install it locally, you'll have -problems trying to publish it. Or, worse yet, you'll be able to -publish it, but you'll be publishing a broken or pointless package. -So don't do that.

-

In the root of your package, do this:

-
npm install . -g
-
-

That'll show you that it's working. If you'd rather just create a symlink -package that points to your working directory, then do this:

-
npm link
-
-

Use npm ls -g to see if it's there.

-

To test a local install, go into some other folder, and then do:

-
cd ../some-other-folder
-npm install ../my-package
-
-

to install it locally into the node_modules folder in that other place.

-

Then go into the node-repl, and try using require("my-thing") to -bring in your module's main module.

-

Create a User Account

-

Create a user with the adduser command. It works like this:

-
npm adduser
-
-

and then follow the prompts.

-

This is documented better in npm adduser.

-

Publish your Package

-

This part's easy. In the root of your folder, do this:

-
npm publish
-
-

You can give publish a url to a tarball, or a filename of a tarball, -or a path to a folder.

-

Note that pretty much everything in that folder will be exposed -by default. So, if you have secret stuff in there, use a -.npmignore file to list out the globs to ignore, or publish -from a fresh checkout.

-

Brag about it

-

Send emails, write blogs, blab in IRC.

-

Tell the world how easy it is to install your program!

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/logging.html b/node_modules/npm/docs/output/using-npm/logging.html deleted file mode 100644 index 0a874fd..0000000 --- a/node_modules/npm/docs/output/using-npm/logging.html +++ /dev/null @@ -1,228 +0,0 @@ - - -Logging - - - - - -
-
-

Logging

-Why, What & How We Log -
- -
-

Table of contents

- -
- -

Description

-

The npm CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments.

-

Setting Log File Location

-

All logs are written to a debug log, with the path to that file printed if the execution of a command fails.

-

The default location of the logs directory is a directory named _logs inside the npm cache. This can be changed with the logs-dir config option.

-

For example, if you wanted to write all your logs to the current working directory, you could run: npm install --logs-dir=.. This is especially helpful in debugging a specific npm issue as you can run -a command multiple times with different config values and then diff all the log files.

-

Log files will be removed from the logs-dir when the number of log files exceeds logs-max, with the oldest logs being deleted first.

-

To turn off logs completely set --logs-max=0.

-

Setting Log Levels

-

loglevel

-

loglevel is a global argument/config that can be set to determine the type of information to be displayed.

-

The default value of loglevel is "notice" but there are several levels/types of logs available, including:

-
    -
  • "silent"
  • -
  • "error"
  • -
  • "warn"
  • -
  • "notice"
  • -
  • "http"
  • -
  • "info"
  • -
  • "verbose"
  • -
  • "silly"
  • -
-

All logs pertaining to a level proceeding the current setting will be shown.

-
Aliases
-

The log levels listed above have various corresponding aliases, including:

-
    -
  • -d: --loglevel info
  • -
  • --dd: --loglevel verbose
  • -
  • --verbose: --loglevel verbose
  • -
  • --ddd: --loglevel silly
  • -
  • -q: --loglevel warn
  • -
  • --quiet: --loglevel warn
  • -
  • -s: --loglevel silent
  • -
  • --silent: --loglevel silent
  • -
-

foreground-scripts

-

The npm CLI began hiding the output of lifecycle scripts for npm install as of v7. Notably, this means you will not see logs/output from packages that may be using "install scripts" to display information back to you or from your own project's scripts defined in package.json. If you'd like to change this behavior & log this output you can set foreground-scripts to true.

-

Timing Information

-

The --timing config can be set which does a few -things:

-
    -
  1. Always shows the full path to the debug log regardless of command exit status
  2. -
  3. Write timing information to a process specific timing file in the cache or logs-dir
  4. -
  5. Output timing information to the terminal
  6. -
-

This file contains a timers object where the keys are an identifier for the -portion of the process being timed and the value is the number of milliseconds it took to complete.

-

Sometimes it is helpful to get timing information without outputting anything to the terminal. For -example, the performance might be affected by writing to the terminal. In this case you can use ---timing --silent which will still write the timing file, but not output anything to the terminal -while running.

-

Registry Response Headers

-

npm-notice

-

The npm CLI reads from & logs any npm-notice headers that are returned from the configured registry. This mechanism can be used by third-party registries to provide useful information when network-dependent requests occur.

-

This header is not cached, and will not be logged if the request is served from the cache.

-

Logs and Sensitive Information

-

The npm CLI makes a best effort to redact the following from terminal output and log files:

-
    -
  • Passwords inside basic auth URLs
  • -
  • npm tokens
  • -
-

However, this behavior should not be relied on to keep all possible sensitive information redacted. If you are concerned about secrets in your log file or terminal output, you can use --loglevel=silent and --logs-max=0 to ensure no logs are written to your terminal or filesystem.

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/orgs.html b/node_modules/npm/docs/output/using-npm/orgs.html deleted file mode 100644 index 0c2b69e..0000000 --- a/node_modules/npm/docs/output/using-npm/orgs.html +++ /dev/null @@ -1,236 +0,0 @@ - - -orgs - - - - - -
-
-

orgs

-Working with Teams & Orgs -
- -
-

Table of contents

- -
- -

Description

-

There are three levels of org users:

-
    -
  1. Super admin, controls billing & adding people to the org.
  2. -
  3. Team admin, manages team membership & package access.
  4. -
  5. Developer, works on packages they are given access to.
  6. -
-

The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a developers team that all users are automatically added to.

-

The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals.

-

The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only.

-

There are two main commands:

-
    -
  1. npm team see npm team for more details
  2. -
  3. npm access see npm access for more details
  4. -
-

Team Admins create teams

-
    -
  • Check who you’ve added to your org:
  • -
-
npm team ls <org>:developers
-
-
    -
  • -

    Each org is automatically given a developers team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the access command.

    -
  • -
  • -

    Create a new team:

    -
  • -
-
npm team create <org:team>
-
-
    -
  • Add members to that team:
  • -
-
npm team add <org:team> <user>
-
-

Publish a package and adjust package access

-
    -
  • In package directory, run
  • -
-
npm init --scope=<org>
-
-

to scope it for your org & publish as usual

-
    -
  • Grant access:
  • -
-
npm access grant <read-only|read-write> <org:team> [<package>]
-
-
    -
  • Revoke access:
  • -
-
npm access revoke <org:team> [<package>]
-
-

Monitor your package access

-
    -
  • See what org packages a team member can access:
  • -
-
npm access ls-packages <org> <user>
-
-
    -
  • See packages available to a specific team:
  • -
-
npm access ls-packages <org:team>
-
-
    -
  • Check which teams are collaborating on a package:
  • -
-
npm access ls-collaborators <pkg>
-
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/package-spec.html b/node_modules/npm/docs/output/using-npm/package-spec.html deleted file mode 100644 index ee4f6ff..0000000 --- a/node_modules/npm/docs/output/using-npm/package-spec.html +++ /dev/null @@ -1,255 +0,0 @@ - - -package-spec - - - - - -
-
-

package-spec

-Package name specifier -
- -
-

Table of contents

- -
- -

Description

-

Commands like npm install and the dependency sections in the -package.json use a package name specifier. This can be many different -things that all refer to a "package". Examples include a package name, -git url, tarball, or local directory. These will generally be referred -to as <package-spec> in the help output for the npm commands that use -this package name specifier.

-

Package name

-
    -
  • [<@scope>/]<pkg>
  • -
  • [<@scope>/]<pkg>@<tag>
  • -
  • [<@scope>/]<pkg>@<version>
  • -
  • [<@scope>/]<pkg>@<version range>
  • -
-

Refers to a package by name, with or without a scope, and optionally -tag, version, or version range. This is typically used in combination -with the registry config to refer to a -package in a registry.

-

Examples:

-
    -
  • npm
  • -
  • @npmcli/arborist
  • -
  • @npmcli/arborist@latest
  • -
  • npm@6.13.1
  • -
  • npm@^4.0.0
  • -
-

Aliases

-
    -
  • <alias>@npm:<name>
  • -
-

Primarily used by commands like npm install and in the dependency -sections in the package.json, this refers to a package by an alias. -The <alias> is the name of the package as it is reified in the -node_modules folder, and the <name> refers to a package name as -found in the configured registry.

-

See Package name above for more info on referring to a package by -name, and registry for configuring which -registry is used when referring to a package by name.

-

Examples:

-
    -
  • semver:@npm:@npmcli/semver-with-patch
  • -
  • semver:@npm:semver@7.2.2
  • -
  • semver:@npm:semver@legacy
  • -
-

Folders

-
    -
  • <folder>
  • -
-

This refers to a package on the local filesystem. Specifically this is -a folder with a package.json file in it. This should always be -prefixed with a / or ./ (or your OS equivalent) to reduce confusion. -npm currently will parse a string with more than one / in it as a -folder, but this is legacy behavior that may be removed in a future -version.

-

Examples:

-
    -
  • ./my-package
  • -
  • /opt/npm/my-package
  • -
-

Tarballs

-
    -
  • <tarball file>
  • -
  • <tarball url>
  • -
-

Examples:

-
    -
  • ./my-package.tgz
  • -
  • https://registry.npmjs.org/semver/-/semver-1.0.0.tgz
  • -
-

Refers to a package in a tarball format, either on the local filesystem -or remotely via url. This is the format that packages exist in when -uploaded to a registry.

-

git urls

-
    -
  • <git:// url>
  • -
  • <github username>/<github project>
  • -
-

Refers to a package in a git repo. This can be a full git url, git -shorthand, or a username/package on GitHub. You can specify a -git tag, branch, or other git ref by appending #ref.

-

Examples:

-
    -
  • https://github.com/npm/cli.git
  • -
  • git@github.com:npm/cli.git
  • -
  • git+ssh://git@github.com/npm/cli#v6.0.0
  • -
  • github:npm/cli#HEAD
  • -
  • npm/cli#c12ea07
  • -
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/registry.html b/node_modules/npm/docs/output/using-npm/registry.html deleted file mode 100644 index 8ff4010..0000000 --- a/node_modules/npm/docs/output/using-npm/registry.html +++ /dev/null @@ -1,226 +0,0 @@ - - -registry - - - - - -
-
-

registry

-The JavaScript Package Registry -
- -
-

Table of contents

- -
- -

Description

-

To resolve packages by name and version, npm talks to a registry website -that implements the CommonJS Package Registry specification for reading -package info.

-

npm is configured to use the npm public registry at -https://registry.npmjs.org by default. Use of the npm public registry is -subject to terms of use available at https://docs.npmjs.com/policies/terms.

-

You can configure npm to use any compatible registry you like, and even run -your own registry. Use of someone else's registry may be governed by their -terms of use.

-

npm's package registry implementation supports several -write APIs as well, to allow for publishing packages and managing user -account information.

-

The npm public registry is powered by a CouchDB database, -of which there is a public mirror at https://skimdb.npmjs.com/registry.

-

The registry URL used is determined by the scope of the package (see -scope. If no scope is specified, the default registry is -used, which is supplied by the registry config -parameter. See npm config, -npmrc, and config for more on -managing npm's configuration. -Authentication configuration such as auth tokens and certificates are configured -specifically scoped to an individual registry. See -Auth Related Configuration

-

When the default registry is used in a package-lock or shrinkwrap it has the -special meaning of "the currently configured registry". If you create a lock -file while using the default registry you can switch to another registry and -npm will install packages from the new registry, but if you create a lock -file while using a custom registry packages will be installed from that -registry even after you change to another registry.

-

Does npm send any information about me back to the registry?

-

Yes.

-

When making requests of the registry npm adds two headers with information -about your environment:

-
    -
  • Npm-Scope – If your project is scoped, this header will contain its -scope. In the future npm hopes to build registry features that use this -information to allow you to customize your experience for your -organization.
  • -
  • Npm-In-CI – Set to "true" if npm believes this install is running in a -continuous integration environment, "false" otherwise. This is detected by -looking for the following environment variables: CI, TDDIUM, -JENKINS_URL, bamboo.buildKey. If you'd like to learn more you may find -the original PR -interesting. -This is used to gather better metrics on how npm is used by humans, versus -build farms.
  • -
-

The npm registry does not try to correlate the information in these headers -with any authenticated accounts that may be used in the same requests.

-

How can I prevent my package from being published in the official registry?

-

Set "private": true in your package.json to prevent it from being -published at all, or -"publishConfig":{"registry":"http://my-internal-registry.local"} -to force it to be published only to your internal/private registry.

-

See package.json for more info on what goes in the package.json file.

-

Where can I find my (and others') published packages?

-

https://www.npmjs.com/

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/removal.html b/node_modules/npm/docs/output/using-npm/removal.html deleted file mode 100644 index e541871..0000000 --- a/node_modules/npm/docs/output/using-npm/removal.html +++ /dev/null @@ -1,199 +0,0 @@ - - -removal - - - - - -
-
-

removal

-Cleaning the Slate -
- -
-

Table of contents

- -
- -

Synopsis

-

So sad to see you go.

-
sudo npm uninstall npm -g
-
-

Or, if that fails, get the npm source code, and do:

-
sudo make uninstall
-
-

More Severe Uninstalling

-

Usually, the above instructions are sufficient. That will remove -npm, but leave behind anything you've installed.

-

If that doesn't work, or if you require more drastic measures, -continue reading.

-

Note that this is only necessary for globally-installed packages. Local -installs are completely contained within a project's node_modules -folder. Delete that folder, and everything is gone unless a package's -install script is particularly ill-behaved.

-

This assumes that you installed node and npm in the default place. If -you configured node with a different --prefix, or installed npm with a -different prefix setting, then adjust the paths accordingly, replacing -/usr/local with your install prefix.

-

To remove everything npm-related manually:

-
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
-
-

If you installed things with npm, then your best bet is to uninstall -them with npm first, and then install them again once you have a -proper install. This can help find any symlinks that are lying -around:

-
ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm
-
-

Prior to version 0.3, npm used shim files for executables and node -modules. To track those down, you can do the following:

-
find /usr/local/{lib/node,bin} -exec grep -l npm \{\} \; ;
-
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/scope.html b/node_modules/npm/docs/output/using-npm/scope.html deleted file mode 100644 index fcecb0d..0000000 --- a/node_modules/npm/docs/output/using-npm/scope.html +++ /dev/null @@ -1,257 +0,0 @@ - - -scope - - - - - -
-
-

scope

-Scoped packages -
- -
-

Table of contents

- -
- -

Description

-

All npm packages have a name. Some package names also have a scope. A scope -follows the usual rules for package names (URL-safe characters, no leading dots -or underscores). When used in package names, scopes are preceded by an @ symbol -and followed by a slash, e.g.

-
@somescope/somepackagename
-
-

Scopes are a way of grouping related packages together, and also affect a few -things about the way npm treats the package.

-

Each npm user/organization has their own scope, and only you can add packages -in your scope. This means you don't have to worry about someone taking your -package name ahead of you. Thus it is also a good way to signal official packages -for organizations.

-

Scoped packages can be published and installed as of npm@2 and are supported -by the primary npm registry. Unscoped packages can depend on scoped packages and -vice versa. The npm client is backwards-compatible with unscoped registries, -so it can be used to work with scoped and unscoped registries at the same time.

-

Installing scoped packages

-

Scoped packages are installed to a sub-folder of the regular installation -folder, e.g. if your other packages are installed in node_modules/packagename, -scoped modules will be installed in node_modules/@myorg/packagename. The scope -folder (@myorg) is simply the name of the scope preceded by an @ symbol, and can -contain any number of scoped packages.

-

A scoped package is installed by referencing it by name, preceded by an -@ symbol, in npm install:

-
npm install @myorg/mypackage
-
-

Or in package.json:

-
"dependencies": {
-  "@myorg/mypackage": "^1.3.0"
-}
-
-

Note that if the @ symbol is omitted, in either case, npm will instead attempt to -install from GitHub; see npm install.

-

Requiring scoped packages

-

Because scoped packages are installed into a scope folder, you have to -include the name of the scope when requiring them in your code, e.g.

-
require('@myorg/mypackage')
-
-

There is nothing special about the way Node treats scope folders. This -simply requires the mypackage module in the folder named @myorg.

-

Publishing scoped packages

-

Scoped packages can be published from the CLI as of npm@2 and can be -published to any registry that supports them, including the primary npm -registry.

-

(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry -does support scoped packages.)

-

If you wish, you may associate a scope with a registry; see below.

-

Publishing public scoped packages to the primary npm registry

-

Publishing to a scope, you have two options:

-
    -
  • Publishing to your user scope (example: @username/module)
  • -
  • Publishing to an organization scope (example: @org/module)
  • -
-

If publishing a public module to an organization scope, you must -first either create an organization with the name of the scope -that you'd like to publish to or be added to an existing organization -with the appropriate permissions. For example, if you'd like to -publish to @org, you would need to create the org organization -on npmjs.com prior to trying to publish.

-

Scoped packages are not public by default. You will need to specify ---access public with the initial npm publish command. This will publish -the package and set access to public as if you had run npm access public -after publishing. You do not need to do this when publishing new versions of -an existing scoped package.

-

Publishing private scoped packages to the npm registry

-

To publish a private scoped package to the npm registry, you must have -an npm Private Modules -account.

-

You can then publish the module with npm publish or npm publish --access restricted, and it will be present in the npm registry, with -restricted access. You can then change the access permissions, if -desired, with npm access or on the npmjs.com website.

-

Associating a scope with a registry

-

Scopes can be associated with a separate registry. This allows you to -seamlessly use a mix of packages from the primary npm registry and one or more -private registries, such as GitHub Packages or the open source Verdaccio -project.

-

You can associate a scope with a registry at login, e.g.

-
npm login --registry=http://reg.example.com --scope=@myco
-
-

Scopes have a many-to-one relationship with registries: one registry can -host multiple scopes, but a scope only ever points to one registry.

-

You can also associate a scope with a registry using npm config:

-
npm config set @myco:registry http://reg.example.com
-
-

Once a scope is associated with a registry, any npm install for a package -with that scope will request packages from that registry instead. Any -npm publish for a package name that contains the scope will be published to -that registry instead.

-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/scripts.html b/node_modules/npm/docs/output/using-npm/scripts.html deleted file mode 100644 index 5628c77..0000000 --- a/node_modules/npm/docs/output/using-npm/scripts.html +++ /dev/null @@ -1,482 +0,0 @@ - - -scripts - - - - - -
-
-

scripts

-How npm handles the "scripts" field -
- -
-

Table of contents

- -
- -

Description

-

The "scripts" property of your package.json file supports a number -of built-in scripts and their preset life cycle events as well as -arbitrary scripts. These all can be executed by running -npm run-script <stage> or npm run <stage> for short. Pre and post -commands with matching names will be run for those as well (e.g. premyscript, -myscript, postmyscript). Scripts from dependencies can be run with -npm explore <pkg> -- npm run <stage>.

-

Pre & Post Scripts

-

To create "pre" or "post" scripts for any scripts defined in the -"scripts" section of the package.json, simply create another script -with a matching name and add "pre" or "post" to the beginning of them.

-
{
-  "scripts": {
-    "precompress": "{{ executes BEFORE the `compress` script }}",
-    "compress": "{{ run command to compress files }}",
-    "postcompress": "{{ executes AFTER `compress` script }}"
-  }
-}
-
-

In this example npm run compress would execute these scripts as -described.

-

Life Cycle Scripts

-

There are some special life cycle scripts that happen only in certain -situations. These scripts happen in addition to the pre<event>, post<event>, and -<event> scripts.

-
    -
  • prepare, prepublish, prepublishOnly, prepack, postpack, dependencies
  • -
-

prepare (since npm@4.0.0)

-
    -
  • -

    Runs BEFORE the package is packed, i.e. during npm publish -and npm pack

    -
  • -
  • -

    Runs on local npm install without any arguments

    -
  • -
  • -

    Runs AFTER prepublish, but BEFORE prepublishOnly

    -
  • -
  • -

    NOTE: If a package being installed through git contains a prepare -script, its dependencies and devDependencies will be installed, and -the prepare script will be run, before the package is packaged and -installed.

    -
  • -
  • -

    As of npm@7 these scripts run in the background. -To see the output, run with: --foreground-scripts.

    -
  • -
-

prepublish (DEPRECATED)

-
    -
  • Does not run during npm publish, but does run during npm ci -and npm install. See below for more info.
  • -
-

prepublishOnly

-
    -
  • Runs BEFORE the package is prepared and packed, ONLY on npm publish.
  • -
-

prepack

-
    -
  • Runs BEFORE a tarball is packed (on "npm pack", "npm publish", and when installing a git dependency).
  • -
  • NOTE: "npm run pack" is NOT the same as "npm pack". "npm run pack" is an arbitrary user defined script name, where as, "npm pack" is a CLI defined command.
  • -
-

postpack

-
    -
  • Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally)
  • -
-

dependencies

-
    -
  • Runs AFTER any operations that modify the node_modules directory IF changes occurred.
  • -
  • Does NOT run in global mode
  • -
-

Prepare and Prepublish

-

Deprecation Note: prepublish

-

Since npm@1.1.71, the npm CLI has run the prepublish script for both npm publish and npm install, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, very confusing. As of npm@4.0.0, a new event has been introduced, prepare, that preserves this existing behavior. A new event, prepublishOnly has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on npm publish (for instance, running the tests one last time to ensure they're in good shape).

-

See https://github.com/npm/npm/issues/10074 for a much lengthier justification, with further reading, for this change.

-

Use Cases

-

If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a prepublish script. This includes tasks such as:

-
    -
  • Compiling CoffeeScript source code into JavaScript.
  • -
  • Creating minified versions of JavaScript source code.
  • -
  • Fetching remote resources that your package will use.
  • -
-

The advantage of doing these things at prepublish time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that:

-
    -
  • You can depend on coffee-script as a devDependency, and thus -your users don't need to have it installed.
  • -
  • You don't need to include minifiers in your package, reducing -the size for your users.
  • -
  • You don't need to rely on your users having curl or wget or -other system tools on the target machines.
  • -
-

Dependencies

-

The dependencies script is run any time an npm command causes changes to the node_modules directory. It is run AFTER the changes have been applied and the package.json and package-lock.json files have been updated.

-

Life Cycle Operation Order

-

npm cache add

-
    -
  • prepare
  • -
-

npm ci

-
    -
  • preinstall
  • -
  • install
  • -
  • postinstall
  • -
  • prepublish
  • -
  • preprepare
  • -
  • prepare
  • -
  • postprepare
  • -
-

These all run after the actual installation of modules into -node_modules, in order, with no internal actions happening in between

-

npm diff

-
    -
  • prepare
  • -
-

npm install

-

These also run when you run npm install -g <pkg-name>

-
    -
  • preinstall
  • -
  • install
  • -
  • postinstall
  • -
  • prepublish
  • -
  • preprepare
  • -
  • prepare
  • -
  • postprepare
  • -
-

If there is a binding.gyp file in the root of your package and you -haven't defined your own install or preinstall scripts, npm will -default the install command to compile using node-gyp via node-gyp rebuild

-

These are run from the scripts of <pkg-name>

-

npm pack

-
    -
  • prepack
  • -
  • prepare
  • -
  • postpack
  • -
-

npm publish

-
    -
  • prepublishOnly
  • -
  • prepack
  • -
  • prepare
  • -
  • postpack
  • -
  • publish
  • -
  • postpublish
  • -
-

npm rebuild

-
    -
  • preinstall
  • -
  • install
  • -
  • postinstall
  • -
  • prepare
  • -
-

prepare is only run if the current directory is a symlink (e.g. with -linked packages)

-

npm restart

-

If there is a restart script defined, these events are run, otherwise -stop and start are both run if present, including their pre and -post iterations)

-
    -
  • prerestart
  • -
  • restart
  • -
  • postrestart
  • -
-

npm run <user defined>

-
    -
  • pre<user-defined>
  • -
  • <user-defined>
  • -
  • post<user-defined>
  • -
-

npm start

-
    -
  • prestart
  • -
  • start
  • -
  • poststart
  • -
-

If there is a server.js file in the root of your package, then npm -will default the start command to node server.js. prestart and -poststart will still run in this case.

-

npm stop

-
    -
  • prestop
  • -
  • stop
  • -
  • poststop
  • -
-

npm test

-
    -
  • pretest
  • -
  • test
  • -
  • posttest
  • -
-

npm version

-
    -
  • preversion
  • -
  • version
  • -
  • postversion
  • -
-

A Note on a lack of npm uninstall scripts

-

While npm v6 had uninstall lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful.

-

Reasons for a package removal include:

-
    -
  • a user directly uninstalled this package
  • -
  • a user uninstalled a dependant package and so this dependency is being uninstalled
  • -
  • a user uninstalled a dependant package but another package also depends on this version
  • -
  • this version has been merged as a duplicate with another version
  • -
  • etc.
  • -
-

Due to the lack of necessary context, uninstall lifecycle scripts are not implemented and will not function.

-

User

-

When npm is run as root, scripts are always run with the effective uid -and gid of the working directory owner.

-

Environment

-

Package scripts run in an environment where many pieces of information -are made available regarding the setup of npm and the current state of -the process.

-

path

-

If you depend on modules that define executable scripts, like test -suites, then those executables will be added to the PATH for -executing the scripts. So, if your package.json has this:

-
{
-  "name" : "foo",
-  "dependencies" : {
-    "bar" : "0.1.x"
-  },
-  "scripts": {
-    "start" : "bar ./test"
-  }
-}
-
-

then you could run npm start to execute the bar script, which is -exported into the node_modules/.bin directory on npm install.

-

package.json vars

-

The package.json fields are tacked onto the npm_package_ prefix. So, -for instance, if you had {"name":"foo", "version":"1.2.5"} in your -package.json file, then your package scripts would have the -npm_package_name environment variable set to "foo", and the -npm_package_version set to "1.2.5". You can access these variables -in your code with process.env.npm_package_name and -process.env.npm_package_version, and so on for other fields.

-

See package.json for more on package configs.

-

current lifecycle event

-

Lastly, the npm_lifecycle_event environment variable is set to -whichever stage of the cycle is being executed. So, you could have a -single script used for different parts of the process which switches -based on what's currently happening.

-

Objects are flattened following this format, so if you had -{"scripts":{"install":"foo.js"}} in your package.json, then you'd -see this in the script:

-
process.env.npm_package_scripts_install === "foo.js"
-
-

Examples

-

For example, if your package.json contains this:

-
{
-  "scripts" : {
-    "install" : "scripts/install.js",
-    "postinstall" : "scripts/install.js",
-    "uninstall" : "scripts/uninstall.js"
-  }
-}
-
-

then scripts/install.js will be called for the install -and post-install stages of the lifecycle, and scripts/uninstall.js -will be called when the package is uninstalled. Since -scripts/install.js is running for two different phases, it would -be wise in this case to look at the npm_lifecycle_event environment -variable.

-

If you want to run a make command, you can do so. This works just -fine:

-
{
-  "scripts" : {
-    "preinstall" : "./configure",
-    "install" : "make && make install",
-    "test" : "make test"
-  }
-}
-
-

Exiting

-

Scripts are run by passing the line as a script argument to sh.

-

If the script exits with a code other than 0, then this will abort the -process.

-

Note that these script files don't have to be Node.js or even -JavaScript programs. They just have to be some kind of executable -file.

-

Best Practices

-
    -
  • Don't exit with a non-zero error code unless you really mean it. -Except for uninstall scripts, this will cause the npm action to -fail, and potentially be rolled back. If the failure is minor or -only will prevent some optional features, then it's better to just -print a warning and exit successfully.
  • -
  • Try not to use scripts to do what npm can do for you. Read through -package.json to see all the things that you can specify and enable -by simply describing your package appropriately. In general, this -will lead to a more robust and consistent state.
  • -
  • Inspect the env to determine where to put things. For instance, if -the npm_config_binroot environment variable is set to /home/user/bin, then -don't try to install executables into /usr/local/bin. The user -probably set it up that way for a reason.
  • -
  • Don't prefix your script commands with "sudo". If root permissions -are required for some reason, then it'll fail with that error, and -the user will sudo the npm command in question.
  • -
  • Don't use install. Use a .gyp file for compilation, and prepare -for anything else. You should almost never have to explicitly set a -preinstall or install script. If you are doing this, please consider if -there is another option. The only valid use of install or preinstall -scripts is for compilation which must be done on the target architecture.
  • -
  • Scripts are run from the root of the package folder, regardless of what the -current working directory is when npm is invoked. If you want your -script to use different behavior based on what subdirectory you're in, you -can use the INIT_CWD environment variable, which holds the full path you -were in when you ran npm run.
  • -
-

See Also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/docs/output/using-npm/workspaces.html b/node_modules/npm/docs/output/using-npm/workspaces.html deleted file mode 100644 index 6d6401b..0000000 --- a/node_modules/npm/docs/output/using-npm/workspaces.html +++ /dev/null @@ -1,313 +0,0 @@ - - -workspaces - - - - - -
-
-

workspaces

-Working with workspaces -
- -
-

Table of contents

- -
- -

Description

-

Workspaces is a generic term that refers to the set of features in the -npm cli that provides support to managing multiple packages from your local -file system from within a singular top-level, root package.

-

This set of features makes up for a much more streamlined workflow handling -linked packages from the local file system. Automating the linking process -as part of npm install and avoiding manually having to use npm link in -order to add references to packages that should be symlinked into the current -node_modules folder.

-

We also refer to these packages being auto-symlinked during npm install as a -single workspace, meaning it's a nested package within the current local -file system that is explicitly defined in the package.json -workspaces configuration.

-

Defining workspaces

-

Workspaces are usually defined via the workspaces property of the -package.json file, e.g:

-
{
-  "name": "my-workspaces-powered-project",
-  "workspaces": [
-    "packages/a"
-  ]
-}
-
-

Given the above package.json example living at a current working -directory . that contains a folder named packages/a that itself contains -a package.json inside it, defining a Node.js package, e.g:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-
-

The expected result once running npm install in this current working -directory . is that the folder packages/a will get symlinked to the -node_modules folder of the current working dir.

-

Below is a post npm install example, given that same previous example -structure of files and folders:

-
.
-+-- node_modules
-|  `-- a -> ../packages/a
-+-- package-lock.json
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-
-

Getting started with workspaces

-

You may automate the required steps to define a new workspace using -npm init. For example in a project that already has a -package.json defined you can run:

-
npm init -w ./packages/a
-
-

This command will create the missing folders and a new package.json -file (if needed) while also making sure to properly configure the -"workspaces" property of your root project package.json.

-

Adding dependencies to a workspace

-

It's possible to directly add/remove/update dependencies of your workspaces -using the workspace config.

-

For example, assuming the following structure:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-   `-- b
-       `-- package.json
-
-

If you want to add a dependency named abbrev from the registry as a -dependency of your workspace a, you may use the workspace config to tell -the npm installer that package should be added as a dependency of the provided -workspace:

-
npm install abbrev -w a
-
-

Note: other installing commands such as uninstall, ci, etc will also -respect the provided workspace configuration.

-

Using workspaces

-

Given the specifities of how Node.js handles module resolution it's possible to consume any defined workspace -by its declared package.json name. Continuing from the example defined -above, let's also create a Node.js script that will require the workspace a -example module, e.g:

-
// ./packages/a/index.js
-module.exports = 'a'
-
-// ./lib/index.js
-const moduleA = require('a')
-console.log(moduleA) // -> a
-
-

When running it with:

-

node lib/index.js

-

This demonstrates how the nature of node_modules resolution allows for -workspaces to enable a portable workflow for requiring each workspace -in such a way that is also easy to publish these -nested workspaces to be consumed elsewhere.

-

Running commands in the context of workspaces

-

You can use the workspace configuration option to run commands in the context -of a configured workspace. -Additionally, if your current directory is in a workspace, the workspace -configuration is implicitly set, and prefix is set to the root workspace.

-

Following is a quick example on how to use the npm run command in the context -of nested workspaces. For a project containing multiple workspaces, e.g:

-
.
-+-- package.json
-`-- packages
-   +-- a
-   |   `-- package.json
-   `-- b
-       `-- package.json
-
-

By running a command using the workspace option, it's possible to run the -given command in the context of that specific workspace. e.g:

-
npm run test --workspace=a
-
-

You could also run the command within the workspace.

-
cd packages/a && npm run test
-
-

Either will run the test script defined within the -./packages/a/package.json file.

-

Please note that you can also specify this argument multiple times in the -command-line in order to target multiple workspaces, e.g:

-
npm run test --workspace=a --workspace=b
-
-

Or run the command for each workspace within the 'packages' folder:

-
npm run test --workspace=packages
-
-

It's also possible to use the workspaces (plural) configuration option to -enable the same behavior but running that command in the context of all -configured workspaces. e.g:

-
npm run test --workspaces
-
-

Will run the test script in both ./packages/a and ./packages/b.

-

Commands will be run in each workspace in the order they appear in your package.json

-
{
-  "workspaces": [ "packages/a", "packages/b" ]
-}
-
-

Order of run is different with:

-
{
-  "workspaces": [ "packages/b", "packages/a" ]
-}
-
-

Ignoring missing scripts

-

It is not required for all of the workspaces to implement scripts run with the npm run command.

-

By running the command with the --if-present flag, npm will ignore workspaces missing target script.

-
npm run test --workspaces --if-present
-
-

See also

-
- - -
- - - - \ No newline at end of file diff --git a/node_modules/npm/index.js b/node_modules/npm/index.js deleted file mode 100644 index 5447643..0000000 --- a/node_modules/npm/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if (require.main === module) { - require('./lib/cli.js')(process) -} else { - throw new Error('The programmatic API was removed in npm v8.0.0') -} diff --git a/node_modules/npm/lib/arborist-cmd.js b/node_modules/npm/lib/arborist-cmd.js deleted file mode 100644 index 42699ec..0000000 --- a/node_modules/npm/lib/arborist-cmd.js +++ /dev/null @@ -1,53 +0,0 @@ -const log = require('./utils/log-shim.js') - -// This is the base for all commands whose execWorkspaces just gets -// a list of workspace names and passes it on to new Arborist() to -// be able to run a filtered Arborist.reify() at some point. - -const BaseCommand = require('./base-command.js') -class ArboristCmd extends BaseCommand { - get isArboristCmd () { - return true - } - - static params = [ - 'workspace', - 'workspaces', - 'include-workspace-root', - 'install-links', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - constructor (npm) { - super(npm) - - const { config } = this.npm - - // when location isn't set and global isn't true check for a package.json at - // the localPrefix and set the location to project if found - const locationProject = config.get('location') === 'project' || ( - config.isDefault('location') - // this is different then `npm.global` which falls back to checking - // location which we do not want to use here - && !config.get('global') - && npm.localPackage - ) - - // if audit is not set and we are in global mode and location is not project - // and we assume its not a project related context, then we set audit=false - if (config.isDefault('audit') && (this.npm.global || !locationProject)) { - config.set('audit', false) - } else if (this.npm.global && config.get('audit')) { - log.warn('config', 'includes both --global and --audit, which is currently unsupported.') - } - } - - async execWorkspaces (args) { - await this.setWorkspaces() - return this.exec(args) - } -} - -module.exports = ArboristCmd diff --git a/node_modules/npm/lib/base-command.js b/node_modules/npm/lib/base-command.js deleted file mode 100644 index e763820..0000000 --- a/node_modules/npm/lib/base-command.js +++ /dev/null @@ -1,165 +0,0 @@ -// Base class for npm commands - -const { relative } = require('path') - -const { definitions } = require('@npmcli/config/lib/definitions') -const getWorkspaces = require('./workspaces/get-workspaces.js') -const { aliases: cmdAliases } = require('./utils/cmd-list') - -class BaseCommand { - static workspaces = false - static ignoreImplicitWorkspace = true - - // these are all overridden by individual commands - static name = null - static description = null - static params = null - - // this is a static so that we can read from it without instantiating a command - // which would require loading the config - static get describeUsage () { - const seenExclusive = new Set() - const wrapWidth = 80 - const { description, usage = [''], name, params } = this - - const fullUsage = [ - `${description}`, - '', - 'Usage:', - ...usage.map(u => `npm ${name} ${u}`.trim()), - ] - - if (params) { - let results = '' - let line = '' - for (const param of params) { - /* istanbul ignore next */ - if (seenExclusive.has(param)) { - continue - } - const { exclusive } = definitions[param] - let paramUsage = `${definitions[param].usage}` - if (exclusive) { - const exclusiveParams = [paramUsage] - seenExclusive.add(param) - for (const e of exclusive) { - seenExclusive.add(e) - exclusiveParams.push(definitions[e].usage) - } - paramUsage = `${exclusiveParams.join('|')}` - } - paramUsage = `[${paramUsage}]` - if (line.length + paramUsage.length > wrapWidth) { - results = [results, line].filter(Boolean).join('\n') - line = '' - } - line = [line, paramUsage].filter(Boolean).join(' ') - } - fullUsage.push('') - fullUsage.push('Options:') - fullUsage.push([results, line].filter(Boolean).join('\n')) - } - - const aliases = Object.entries(cmdAliases).reduce((p, [k, v]) => { - return p.concat(v === name ? k : []) - }, []) - - if (aliases.length) { - const plural = aliases.length === 1 ? '' : 'es' - fullUsage.push('') - fullUsage.push(`alias${plural}: ${aliases.join(', ')}`) - } - - fullUsage.push('') - fullUsage.push(`Run "npm help ${name}" for more info`) - - return fullUsage.join('\n') - } - - constructor (npm) { - this.npm = npm - - const { config } = this.npm - - if (!this.constructor.skipConfigValidation) { - config.validate() - } - - if (config.get('workspaces') === false && config.get('workspace').length) { - throw new Error('Can not use --no-workspaces and --workspace at the same time') - } - } - - get name () { - return this.constructor.name - } - - get description () { - return this.constructor.description - } - - get params () { - return this.constructor.params - } - - get usage () { - return this.constructor.describeUsage - } - - usageError (prefix = '') { - if (prefix) { - prefix += '\n\n' - } - return Object.assign(new Error(`\n${prefix}${this.usage}`), { - code: 'EUSAGE', - }) - } - - async cmdExec (args) { - const { config } = this.npm - - if (config.get('usage')) { - return this.npm.output(this.usage) - } - - const hasWsConfig = config.get('workspaces') || config.get('workspace').length - // if cwd is a workspace, the default is set to [that workspace] - const implicitWs = config.get('workspace', 'default').length - - // (-ws || -w foo) && (cwd is not a workspace || command is not ignoring implicit workspaces) - if (hasWsConfig && (!implicitWs || !this.constructor.ignoreImplicitWorkspace)) { - if (this.npm.global) { - throw new Error('Workspaces not supported for global packages') - } - if (!this.constructor.workspaces) { - throw Object.assign(new Error('This command does not support workspaces.'), { - code: 'ENOWORKSPACES', - }) - } - return this.execWorkspaces(args) - } - - return this.exec(args) - } - - async setWorkspaces () { - const includeWorkspaceRoot = this.isArboristCmd - ? false - : this.npm.config.get('include-workspace-root') - - const prefixInsideCwd = relative(this.npm.localPrefix, process.cwd()).startsWith('..') - const relativeFrom = prefixInsideCwd ? this.npm.localPrefix : process.cwd() - - const filters = this.npm.config.get('workspace') - const ws = await getWorkspaces(filters, { - path: this.npm.localPrefix, - includeWorkspaceRoot, - relativeFrom, - }) - - this.workspaces = ws - this.workspaceNames = [...ws.keys()] - this.workspacePaths = [...ws.values()] - } -} -module.exports = BaseCommand diff --git a/node_modules/npm/lib/cli-entry.js b/node_modules/npm/lib/cli-entry.js deleted file mode 100644 index aad06e0..0000000 --- a/node_modules/npm/lib/cli-entry.js +++ /dev/null @@ -1,74 +0,0 @@ -/* eslint-disable max-len */ - -// Separated out for easier unit testing -module.exports = async (process, validateEngines) => { - // set it here so that regardless of what happens later, we don't - // leak any private CLI configs to other programs - process.title = 'npm' - - // if npm is called as "npmg" or "npm_g", then run in global mode. - if (process.argv[1][process.argv[1].length - 1] === 'g') { - process.argv.splice(1, 1, 'npm', '-g') - } - - const satisfies = require('semver/functions/satisfies') - const exitHandler = require('./utils/exit-handler.js') - const Npm = require('./npm.js') - const npm = new Npm() - exitHandler.setNpm(npm) - - // only log node and npm paths in argv initially since argv can contain sensitive info. a cleaned version will be logged later - const log = require('./utils/log-shim.js') - log.verbose('cli', process.argv.slice(0, 2).join(' ')) - log.info('using', 'npm@%s', npm.version) - log.info('using', 'node@%s', process.version) - - // At this point we've required a few files and can be pretty sure we dont contain invalid syntax for this version of node. It's possible a lazy require would, but that's unlikely enough that it's not worth catching anymore and we attach the more important exit handlers. - validateEngines.off() - process.on('uncaughtException', exitHandler) - process.on('unhandledRejection', exitHandler) - - // It is now safe to log a warning if they are using a version of node that is not going to fail on syntax errors but is still unsupported and untested and might not work reliably. This is safe to use the logger now which we want since this will show up in the error log too. - if (!satisfies(validateEngines.node, validateEngines.engines)) { - log.warn('cli', validateEngines.unsupportedMessage) - } - - let cmd - // Now actually fire up npm and run the command. - // This is how to use npm programmatically: - try { - await npm.load() - - // npm -v - if (npm.config.get('version', 'cli')) { - npm.output(npm.version) - return exitHandler() - } - - // npm --versions - if (npm.config.get('versions', 'cli')) { - npm.argv = ['version'] - npm.config.set('usage', false, 'cli') - } - - cmd = npm.argv.shift() - if (!cmd) { - npm.output(npm.usage) - process.exitCode = 1 - return exitHandler() - } - - await npm.exec(cmd) - return exitHandler() - } catch (err) { - if (err.code === 'EUNKNOWNCOMMAND') { - const didYouMean = require('./utils/did-you-mean.js') - const suggestions = await didYouMean(npm.localPrefix, cmd) - npm.output(`Unknown command: "${cmd}"${suggestions}\n`) - npm.output('To see a list of supported npm commands, run:\n npm help') - process.exitCode = 1 - return exitHandler() - } - return exitHandler(err) - } -} diff --git a/node_modules/npm/lib/cli.js b/node_modules/npm/lib/cli.js deleted file mode 100644 index c85ecb6..0000000 --- a/node_modules/npm/lib/cli.js +++ /dev/null @@ -1,4 +0,0 @@ -const validateEngines = require('./es6/validate-engines.js') -const cliEntry = require('path').resolve(__dirname, 'cli-entry.js') - -module.exports = (process) => validateEngines(process, () => require(cliEntry)) diff --git a/node_modules/npm/lib/commands/access.js b/node_modules/npm/lib/commands/access.js deleted file mode 100644 index 99c1264..0000000 --- a/node_modules/npm/lib/commands/access.js +++ /dev/null @@ -1,222 +0,0 @@ -const libnpmaccess = require('libnpmaccess') -const npa = require('npm-package-arg') -const pkgJson = require('@npmcli/package-json') -const localeCompare = require('@isaacs/string-locale-compare')('en') - -const otplease = require('../utils/otplease.js') -const getIdentity = require('../utils/get-identity.js') -const BaseCommand = require('../base-command.js') - -const commands = [ - 'get', - 'grant', - 'list', - 'revoke', - 'set', -] - -const setCommands = [ - 'status=public', - 'status=private', - 'mfa=none', - 'mfa=publish', - 'mfa=automation', - '2fa=none', - '2fa=publish', - '2fa=automation', -] - -class Access extends BaseCommand { - static description = 'Set access level on published packages' - static name = 'access' - static params = [ - 'json', - 'otp', - 'registry', - ] - - static usage = [ - 'list packages [|| []', - 'list collaborators [ []]', - 'get status []', - 'set status=public|private []', - 'set mfa=none|publish|automation []', - 'grant []', - 'revoke []', - ] - - static async completion (opts) { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - return commands - } - - if (argv.length === 3) { - switch (argv[2]) { - case 'grant': - return ['read-only', 'read-write'] - case 'revoke': - return [] - case 'list': - case 'ls': - return ['packages', 'collaborators'] - case 'get': - return ['status'] - case 'set': - return setCommands - default: - throw new Error(argv[2] + ' not recognized') - } - } - } - - async exec ([cmd, subcmd, ...args]) { - if (!cmd) { - throw this.usageError() - } - if (!commands.includes(cmd)) { - throw this.usageError(`${cmd} is not a valid access command`) - } - // All commands take at least one more parameter so we can do this check up front - if (!subcmd) { - throw this.usageError() - } - - switch (cmd) { - case 'grant': - if (!['read-only', 'read-write'].includes(subcmd)) { - throw this.usageError('grant must be either `read-only` or `read-write`') - } - if (!args[0]) { - throw this.usageError('`` argument is required') - } - return this.#grant(subcmd, args[0], args[1]) - case 'revoke': - return this.#revoke(subcmd, args[0]) - case 'list': - case 'ls': - if (subcmd === 'packages') { - return this.#listPackages(args[0], args[1]) - } - if (subcmd === 'collaborators') { - return this.#listCollaborators(args[0], args[1]) - } - throw this.usageError(`list ${subcmd} is not a valid access command`) - case 'get': - if (subcmd !== 'status') { - throw this.usageError(`get ${subcmd} is not a valid access command`) - } - return this.#getStatus(args[0]) - case 'set': - if (!setCommands.includes(subcmd)) { - throw this.usageError(`set ${subcmd} is not a valid access command`) - } - return this.#set(subcmd, args[0]) - } - } - - async #grant (permissions, scope, pkg) { - await libnpmaccess.setPermissions(scope, pkg, permissions, this.npm.flatOptions) - } - - async #revoke (scope, pkg) { - await libnpmaccess.removePermissions(scope, pkg, this.npm.flatOptions) - } - - async #listPackages (owner, pkg) { - if (!owner) { - owner = await getIdentity(this.npm, this.npm.flatOptions) - } - const pkgs = await libnpmaccess.getPackages(owner, this.npm.flatOptions) - this.#output(pkgs, pkg) - } - - async #listCollaborators (pkg, user) { - const pkgName = await this.#getPackage(pkg, false) - const collabs = await libnpmaccess.getCollaborators(pkgName, this.npm.flatOptions) - this.#output(collabs, user) - } - - async #getStatus (pkg) { - const pkgName = await this.#getPackage(pkg, false) - const visibility = await libnpmaccess.getVisibility(pkgName, this.npm.flatOptions) - this.#output({ [pkgName]: visibility.public ? 'public' : 'private' }) - } - - async #set (subcmd, pkg) { - const [subkey, subval] = subcmd.split('=') - switch (subkey) { - case 'mfa': - case '2fa': - return this.#setMfa(pkg, subval) - case 'status': - return this.#setStatus(pkg, subval) - } - } - - async #setMfa (pkg, level) { - const pkgName = await this.#getPackage(pkg, false) - await otplease(this.npm, this.npm.flatOptions, (opts) => { - return libnpmaccess.setMfa(pkgName, level, opts) - }) - } - - async #setStatus (pkg, status) { - // only scoped packages can have their access changed - const pkgName = await this.#getPackage(pkg, true) - if (status === 'private') { - status = 'restricted' - } - await otplease(this.npm, this.npm.flatOptions, (opts) => { - return libnpmaccess.setAccess(pkgName, status, opts) - }) - return this.#getStatus(pkgName) - } - - async #getPackage (name, requireScope) { - if (!name) { - try { - const { content } = await pkgJson.normalize(this.npm.prefix) - name = content.name - } catch (err) { - if (err.code === 'ENOENT') { - throw Object.assign(new Error('no package name given and no package.json found'), { - code: 'ENOENT', - }) - } else { - throw err - } - } - } - - const spec = npa(name) - if (requireScope && !spec.scope) { - throw this.usageError('This command is only available for scoped packages.') - } - return name - } - - #output (items, limiter) { - const output = {} - const lookup = { - __proto__: null, - read: 'read-only', - write: 'read-write', - } - for (const item in items) { - const val = items[item] - output[item] = lookup[val] || val - } - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify(output, null, 2)) - } else { - for (const item of Object.keys(output).sort(localeCompare)) { - if (!limiter || limiter === item) { - this.npm.output(`${item}: ${output[item]}`) - } - } - } - } -} - -module.exports = Access diff --git a/node_modules/npm/lib/commands/adduser.js b/node_modules/npm/lib/commands/adduser.js deleted file mode 100644 index cd4cba6..0000000 --- a/node_modules/npm/lib/commands/adduser.js +++ /dev/null @@ -1,51 +0,0 @@ -const log = require('../utils/log-shim.js') -const replaceInfo = require('../utils/replace-info.js') -const auth = require('../utils/auth.js') - -const BaseCommand = require('../base-command.js') - -class AddUser extends BaseCommand { - static description = 'Add a registry user account' - static name = 'adduser' - static params = [ - 'registry', - 'scope', - 'auth-type', - ] - - async exec (args) { - const scope = this.npm.config.get('scope') - let registry = this.npm.config.get('registry') - - if (scope) { - const scopedRegistry = this.npm.config.get(`${scope}:registry`) - const cliRegistry = this.npm.config.get('registry', 'cli') - if (scopedRegistry && !cliRegistry) { - registry = scopedRegistry - } - } - - const creds = this.npm.config.getCredentialsByURI(registry) - - log.disableProgress() - log.notice('', `Log in on ${replaceInfo(registry)}`) - - const { message, newCreds } = await auth.adduser(this.npm, { - ...this.npm.flatOptions, - creds, - registry, - }) - - this.npm.config.delete('_token', 'user') // prevent legacy pollution - this.npm.config.setCredentialsByURI(registry, newCreds) - - if (scope) { - this.npm.config.set(scope + ':registry', registry, 'user') - } - - await this.npm.config.save('user') - - this.npm.output(message) - } -} -module.exports = AddUser diff --git a/node_modules/npm/lib/commands/audit.js b/node_modules/npm/lib/commands/audit.js deleted file mode 100644 index 8c10a36..0000000 --- a/node_modules/npm/lib/commands/audit.js +++ /dev/null @@ -1,511 +0,0 @@ -const npmAuditReport = require('npm-audit-report') -const fetch = require('npm-registry-fetch') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const npa = require('npm-package-arg') -const pacote = require('pacote') -const pMap = require('p-map') -const tufClient = require('@sigstore/tuf') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -const auditError = require('../utils/audit-error.js') -const log = require('../utils/log-shim.js') -const reifyFinish = require('../utils/reify-finish.js') - -const sortAlphabetically = (a, b) => localeCompare(a.name, b.name) - -class VerifySignatures { - constructor (tree, filterSet, npm, opts) { - this.tree = tree - this.filterSet = filterSet - this.npm = npm - this.opts = opts - this.keys = new Map() - this.invalid = [] - this.missing = [] - this.checkedPackages = new Set() - this.auditedWithKeysCount = 0 - this.verifiedSignatureCount = 0 - this.verifiedAttestationCount = 0 - this.exitCode = 0 - } - - async run () { - const start = process.hrtime.bigint() - - // Find all deps in tree - const { edges, registries } = this.getEdgesOut(this.tree.inventory.values(), this.filterSet) - if (edges.size === 0) { - throw new Error('found no installed dependencies to audit') - } - - const tuf = await tufClient.initTUF({ - cachePath: this.opts.tufCache, - retry: this.opts.retry, - timeout: this.opts.timeout, - }) - await Promise.all([...registries].map(registry => this.setKeys({ registry, tuf }))) - - const progress = log.newItem('verifying registry signatures', edges.size) - const mapper = async (edge) => { - progress.completeWork(1) - await this.getVerifiedInfo(edge) - } - await pMap(edges, mapper, { concurrency: 20, stopOnError: true }) - - // Didn't find any dependencies that could be verified, e.g. only local - // deps, missing version, not on a registry etc. - if (!this.auditedWithKeysCount) { - throw new Error('found no dependencies to audit that were installed from ' + - 'a supported registry') - } - - const invalid = this.invalid.sort(sortAlphabetically) - const missing = this.missing.sort(sortAlphabetically) - - const hasNoInvalidOrMissing = invalid.length === 0 && missing.length === 0 - - if (!hasNoInvalidOrMissing) { - process.exitCode = 1 - } - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify({ - invalid, - missing, - }, null, 2)) - return - } - const end = process.hrtime.bigint() - const elapsed = end - start - - const auditedPlural = this.auditedWithKeysCount > 1 ? 's' : '' - const timing = `audited ${this.auditedWithKeysCount} package${auditedPlural} in ` + - `${Math.floor(Number(elapsed) / 1e9)}s` - this.npm.output(timing) - this.npm.output('') - - const verifiedBold = this.npm.chalk.bold('verified') - if (this.verifiedSignatureCount) { - if (this.verifiedSignatureCount === 1) { - /* eslint-disable-next-line max-len */ - this.npm.output(`${this.verifiedSignatureCount} package has a ${verifiedBold} registry signature`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`${this.verifiedSignatureCount} packages have ${verifiedBold} registry signatures`) - } - this.npm.output('') - } - - if (this.verifiedAttestationCount) { - if (this.verifiedAttestationCount === 1) { - /* eslint-disable-next-line max-len */ - this.npm.output(`${this.verifiedAttestationCount} package has a ${verifiedBold} attestation`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`${this.verifiedAttestationCount} packages have ${verifiedBold} attestations`) - } - this.npm.output('') - } - - if (missing.length) { - const missingClr = this.npm.chalk.bold(this.npm.chalk.red('missing')) - if (missing.length === 1) { - /* eslint-disable-next-line max-len */ - this.npm.output(`1 package has a ${missingClr} registry signature but the registry is providing signing keys:`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`${missing.length} packages have ${missingClr} registry signatures but the registry is providing signing keys:`) - } - this.npm.output('') - missing.map(m => - this.npm.output(`${this.npm.chalk.red(`${m.name}@${m.version}`)} (${m.registry})`) - ) - } - - if (invalid.length) { - if (missing.length) { - this.npm.output('') - } - const invalidClr = this.npm.chalk.bold(this.npm.chalk.red('invalid')) - // We can have either invalid signatures or invalid provenance - const invalidSignatures = this.invalid.filter(i => i.code === 'EINTEGRITYSIGNATURE') - if (invalidSignatures.length) { - if (invalidSignatures.length === 1) { - this.npm.output(`1 package has an ${invalidClr} registry signature:`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`${invalidSignatures.length} packages have ${invalidClr} registry signatures:`) - } - this.npm.output('') - invalidSignatures.map(i => - this.npm.output(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) - ) - this.npm.output('') - } - - const invalidAttestations = this.invalid.filter(i => i.code === 'EATTESTATIONVERIFY') - if (invalidAttestations.length) { - if (invalidAttestations.length === 1) { - this.npm.output(`1 package has an ${invalidClr} attestation:`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`${invalidAttestations.length} packages have ${invalidClr} attestations:`) - } - this.npm.output('') - invalidAttestations.map(i => - this.npm.output(`${this.npm.chalk.red(`${i.name}@${i.version}`)} (${i.registry})`) - ) - this.npm.output('') - } - - if (invalid.length === 1) { - /* eslint-disable-next-line max-len */ - this.npm.output(`Someone might have tampered with this package since it was published on the registry!`) - } else { - /* eslint-disable-next-line max-len */ - this.npm.output(`Someone might have tampered with these packages since they were published on the registry!`) - } - this.npm.output('') - } - } - - getEdgesOut (nodes, filterSet) { - const edges = new Set() - const registries = new Set() - for (const node of nodes) { - for (const edge of node.edgesOut.values()) { - const filteredOut = - edge.from - && filterSet - && filterSet.size > 0 - && !filterSet.has(edge.from.target) - - if (!filteredOut) { - const spec = this.getEdgeSpec(edge) - if (spec) { - // Prefetch and cache public keys from used registries - registries.add(this.getSpecRegistry(spec)) - } - edges.add(edge) - } - } - } - return { edges, registries } - } - - async setKeys ({ registry, tuf }) { - const { host, pathname } = new URL(registry) - // Strip any trailing slashes from pathname - const regKey = `${host}${pathname.replace(/\/$/, '')}/keys.json` - let keys = await tuf.getTarget(regKey) - .then((target) => JSON.parse(target)) - .then(({ keys: ks }) => ks.map((key) => ({ - ...key, - keyid: key.keyId, - pemkey: `-----BEGIN PUBLIC KEY-----\n${key.publicKey.rawBytes}\n-----END PUBLIC KEY-----`, - expires: key.publicKey.validFor.end || null, - }))).catch(err => { - if (err.code === 'TUF_FIND_TARGET_ERROR') { - return null - } else { - throw err - } - }) - - // If keys not found in Sigstore TUF repo, fallback to registry keys API - if (!keys) { - keys = await fetch.json('/-/npm/v1/keys', { - ...this.npm.flatOptions, - registry, - }).then(({ keys: ks }) => ks.map((key) => ({ - ...key, - pemkey: `-----BEGIN PUBLIC KEY-----\n${key.key}\n-----END PUBLIC KEY-----`, - }))).catch(err => { - if (err.code === 'E404' || err.code === 'E400') { - return null - } else { - throw err - } - }) - } - - if (keys) { - this.keys.set(registry, keys) - } - } - - getEdgeType (edge) { - return edge.optional ? 'optionalDependencies' - : edge.peer ? 'peerDependencies' - : edge.dev ? 'devDependencies' - : 'dependencies' - } - - getEdgeSpec (edge) { - let name = edge.name - try { - name = npa(edge.spec).subSpec.name - } catch { - // leave it as edge.name - } - try { - return npa(`${name}@${edge.spec}`) - } catch { - // Skip packages with invalid spec - } - } - - buildRegistryConfig (registry) { - const keys = this.keys.get(registry) || [] - const parsedRegistry = new URL(registry) - const regKey = `//${parsedRegistry.host}${parsedRegistry.pathname}` - return { - [`${regKey}:_keys`]: keys, - } - } - - getSpecRegistry (spec) { - return fetch.pickRegistry(spec, this.npm.flatOptions) - } - - getValidPackageInfo (edge) { - const type = this.getEdgeType(edge) - // Skip potentially optional packages that are not on disk, as these could - // be omitted during install - if (edge.error === 'MISSING' && type !== 'dependencies') { - return - } - - const spec = this.getEdgeSpec(edge) - // Skip invalid version requirements - if (!spec) { - return - } - const node = edge.to || edge - const { version } = node.package || {} - - if (node.isWorkspace || // Skip local workspaces packages - !version || // Skip packages that don't have a installed version, e.g. optonal dependencies - !spec.registry) { // Skip if not from registry, e.g. git package - return - } - - for (const omitType of this.npm.config.get('omit')) { - if (node[omitType]) { - return - } - } - - return { - name: spec.name, - version, - type, - location: node.location, - registry: this.getSpecRegistry(spec), - } - } - - async verifySignatures (name, version, registry) { - const { - _integrity: integrity, - _signatures, - _attestations, - _resolved: resolved, - } = await pacote.manifest(`${name}@${version}`, { - verifySignatures: true, - verifyAttestations: true, - ...this.buildRegistryConfig(registry), - ...this.npm.flatOptions, - }) - const signatures = _signatures || [] - const result = { - integrity, - signatures, - attestations: _attestations, - resolved, - } - return result - } - - async getVerifiedInfo (edge) { - const info = this.getValidPackageInfo(edge) - if (!info) { - return - } - const { name, version, location, registry, type } = info - if (this.checkedPackages.has(location)) { - // we already did or are doing this one - return - } - this.checkedPackages.add(location) - - // We only "audit" or verify the signature, or the presence of it, on - // packages whose registry returns signing keys - const keys = this.keys.get(registry) || [] - if (keys.length) { - this.auditedWithKeysCount += 1 - } - - try { - const { integrity, signatures, attestations, resolved } = await this.verifySignatures( - name, version, registry - ) - - // Currently we only care about missing signatures on registries that provide a public key - // We could make this configurable in the future with a strict/paranoid mode - if (signatures.length) { - this.verifiedSignatureCount += 1 - } else if (keys.length) { - this.missing.push({ - integrity, - location, - name, - registry, - resolved, - version, - }) - } - - // Track verified attestations separately to registry signatures, as all - // packages on registries with signing keys are expected to have registry - // signatures, but not all packages have provenance and publish attestations. - if (attestations) { - this.verifiedAttestationCount += 1 - } - } catch (e) { - if (e.code === 'EINTEGRITYSIGNATURE' || e.code === 'EATTESTATIONVERIFY') { - this.invalid.push({ - code: e.code, - message: e.message, - integrity: e.integrity, - keyid: e.keyid, - location, - name, - registry, - resolved: e.resolved, - signature: e.signature, - predicateType: e.predicateType, - type, - version, - }) - } else { - throw e - } - } - } -} - -class Audit extends ArboristWorkspaceCmd { - static description = 'Run a security audit' - static name = 'audit' - static params = [ - 'audit-level', - 'dry-run', - 'force', - 'json', - 'package-lock-only', - 'package-lock', - 'omit', - 'include', - 'foreground-scripts', - 'ignore-scripts', - ...super.params, - ] - - static usage = ['[fix|signatures]'] - - static async completion (opts) { - const argv = opts.conf.argv.remain - - if (argv.length === 2) { - return ['fix', 'signatures'] - } - - switch (argv[2]) { - case 'fix': - case 'signatures': - return [] - default: - throw Object.assign(new Error(argv[2] + ' not recognized'), { - code: 'EUSAGE', - }) - } - } - - async exec (args) { - if (args[0] === 'signatures') { - await this.auditSignatures() - } else { - await this.auditAdvisories(args) - } - } - - async auditAdvisories (args) { - const fix = args[0] === 'fix' - if (this.npm.config.get('package-lock') === false && fix) { - throw this.usageError('fix can not be used without a package-lock') - } - const reporter = this.npm.config.get('json') ? 'json' : 'detail' - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - audit: true, - path: this.npm.prefix, - reporter, - workspaces: this.workspaceNames, - } - - const arb = new Arborist(opts) - await arb.audit({ fix }) - if (fix) { - await reifyFinish(this.npm, arb) - } else { - // will throw if there's an error, because this is an audit command - auditError(this.npm, arb.auditReport) - const result = npmAuditReport(arb.auditReport, { - ...opts, - chalk: this.npm.chalk, - }) - process.exitCode = process.exitCode || result.exitCode - this.npm.output(result.report) - } - } - - async auditSignatures () { - if (this.npm.global) { - throw Object.assign( - new Error('`npm audit signatures` does not support global packages'), { - code: 'EAUDITGLOBAL', - } - ) - } - - log.verbose('loading installed dependencies') - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: this.npm.prefix, - workspaces: this.workspaceNames, - } - - const arb = new Arborist(opts) - const tree = await arb.loadActual() - let filterSet = new Set() - if (opts.workspaces && opts.workspaces.length) { - filterSet = - arb.workspaceDependencySet( - tree, - opts.workspaces, - this.npm.flatOptions.includeWorkspaceRoot - ) - } else if (!this.npm.flatOptions.workspacesEnabled) { - filterSet = - arb.excludeWorkspacesDependencySet(tree) - } - - const verify = new VerifySignatures(tree, filterSet, this.npm, { ...opts }) - await verify.run() - } -} - -module.exports = Audit diff --git a/node_modules/npm/lib/commands/bugs.js b/node_modules/npm/lib/commands/bugs.js deleted file mode 100644 index 44926af..0000000 --- a/node_modules/npm/lib/commands/bugs.js +++ /dev/null @@ -1,34 +0,0 @@ -const PackageUrlCmd = require('../package-url-cmd.js') - -class Bugs extends PackageUrlCmd { - static description = 'Report bugs for a package in a web browser' - static name = 'bugs' - - getUrl (spec, mani) { - if (mani.bugs) { - if (typeof mani.bugs === 'string') { - return mani.bugs - } - - if (typeof mani.bugs === 'object' && mani.bugs.url) { - return mani.bugs.url - } - - if (typeof mani.bugs === 'object' && mani.bugs.email) { - return `mailto:${mani.bugs.email}` - } - } - - // try to get it from the repo, if possible - const info = this.hostedFromMani(mani) - const infoUrl = info?.bugs() - if (infoUrl) { - return infoUrl - } - - // just send them to the website, hopefully that has some info! - return `https://www.npmjs.com/package/${mani.name}` - } -} - -module.exports = Bugs diff --git a/node_modules/npm/lib/commands/cache.js b/node_modules/npm/lib/commands/cache.js deleted file mode 100644 index 50bb35e..0000000 --- a/node_modules/npm/lib/commands/cache.js +++ /dev/null @@ -1,213 +0,0 @@ -const cacache = require('cacache') -const pacote = require('pacote') -const fs = require('fs/promises') -const { join } = require('path') -const semver = require('semver') -const BaseCommand = require('../base-command.js') -const npa = require('npm-package-arg') -const jsonParse = require('json-parse-even-better-errors') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const log = require('../utils/log-shim') - -const searchCachePackage = async (path, parsed, cacheKeys) => { - /* eslint-disable-next-line max-len */ - const searchMFH = new RegExp(`^make-fetch-happen:request-cache:.*(?', - 'clean []', - 'ls [@]', - 'verify', - ] - - static async completion (opts) { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - return ['add', 'clean', 'verify', 'ls'] - } - - // TODO - eventually... - switch (argv[2]) { - case 'verify': - case 'clean': - case 'add': - case 'ls': - return [] - } - } - - async exec (args) { - const cmd = args.shift() - switch (cmd) { - case 'rm': case 'clear': case 'clean': - return await this.clean(args) - case 'add': - return await this.add(args) - case 'verify': case 'check': - return await this.verify() - case 'ls': - return await this.ls(args) - default: - throw this.usageError() - } - } - - // npm cache clean [pkg]* - async clean (args) { - const cachePath = join(this.npm.cache, '_cacache') - if (args.length === 0) { - if (!this.npm.config.get('force')) { - throw new Error(`As of npm@5, the npm cache self-heals from corruption issues - by treating integrity mismatches as cache misses. As a result, - data extracted from the cache is guaranteed to be valid. If you - want to make sure everything is consistent, use \`npm cache verify\` - instead. Deleting the cache can only make npm go slower, and is - not likely to correct any problems you may be encountering! - - On the other hand, if you're debugging an issue with the installer, - or race conditions that depend on the timing of writing to an empty - cache, you can use \`npm install --cache /tmp/empty-cache\` to use a - temporary cache instead of nuking the actual one. - - If you're sure you want to delete the entire cache, rerun this command - with --force.`) - } - return fs.rm(cachePath, { recursive: true, force: true }) - } - for (const key of args) { - let entry - try { - entry = await cacache.get(cachePath, key) - } catch (err) { - log.warn(`Not Found: ${key}`) - break - } - this.npm.output(`Deleted: ${key}`) - await cacache.rm.entry(cachePath, key) - // XXX this could leave other entries without content! - await cacache.rm.content(cachePath, entry.integrity) - } - } - - // npm cache add ... - // npm cache add ... - // npm cache add ... - // npm cache add ... - async add (args) { - log.silly('cache add', 'args', args) - if (args.length === 0) { - throw this.usageError('First argument to `add` is required') - } - - return Promise.all(args.map(spec => { - log.silly('cache add', 'spec', spec) - // we ask pacote for the thing, and then just throw the data - // away so that it tee-pipes it into the cache like it does - // for a normal request. - return pacote.tarball.stream(spec, stream => { - stream.resume() - return stream.promise() - }, { ...this.npm.flatOptions }) - })) - } - - async verify () { - const cache = join(this.npm.cache, '_cacache') - const prefix = cache.indexOf(process.env.HOME) === 0 - ? `~${cache.slice(process.env.HOME.length)}` - : cache - const stats = await cacache.verify(cache) - this.npm.output(`Cache verified and compressed (${prefix})`) - this.npm.output(`Content verified: ${stats.verifiedContent} (${stats.keptSize} bytes)`) - if (stats.badContentCount) { - this.npm.output(`Corrupted content removed: ${stats.badContentCount}`) - } - if (stats.reclaimedCount) { - /* eslint-disable-next-line max-len */ - this.npm.output(`Content garbage-collected: ${stats.reclaimedCount} (${stats.reclaimedSize} bytes)`) - } - if (stats.missingContent) { - this.npm.output(`Missing content: ${stats.missingContent}`) - } - this.npm.output(`Index entries: ${stats.totalEntries}`) - this.npm.output(`Finished in ${stats.runTime.total / 1000}s`) - } - - // npm cache ls [--package ...] - async ls (specs) { - const cachePath = join(this.npm.cache, '_cacache') - const cacheKeys = Object.keys(await cacache.ls(cachePath)) - if (specs.length > 0) { - // get results for each package spec specified - const results = new Set() - for (const spec of specs) { - const parsed = npa(spec) - if (parsed.rawSpec !== '' && parsed.type === 'tag') { - throw this.usageError('Cannot list cache keys for a tagged package.') - } - const keySet = await searchCachePackage(cachePath, parsed, cacheKeys) - for (const key of keySet) { - results.add(key) - } - } - [...results].sort(localeCompare).forEach(key => this.npm.output(key)) - return - } - cacheKeys.sort(localeCompare).forEach(key => this.npm.output(key)) - } -} - -module.exports = Cache diff --git a/node_modules/npm/lib/commands/ci.js b/node_modules/npm/lib/commands/ci.js deleted file mode 100644 index 706b77a..0000000 --- a/node_modules/npm/lib/commands/ci.js +++ /dev/null @@ -1,117 +0,0 @@ -const reifyFinish = require('../utils/reify-finish.js') -const runScript = require('@npmcli/run-script') -const fs = require('fs/promises') -const log = require('../utils/log-shim.js') -const validateLockfile = require('../utils/validate-lockfile.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -class CI extends ArboristWorkspaceCmd { - static description = 'Clean install a project' - static name = 'ci' - - // These are in the order they will show up in when running "-h" - static params = [ - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'omit', - 'include', - 'strict-peer-deps', - 'foreground-scripts', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - ...super.params, - ] - - async exec () { - if (this.npm.global) { - throw Object.assign(new Error('`npm ci` does not work for global packages'), { - code: 'ECIGLOBAL', - }) - } - - const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - packageLock: true, // npm ci should never skip lock files - path: where, - save: false, // npm ci should never modify the lockfile or package.json - workspaces: this.workspaceNames, - } - - const arb = new Arborist(opts) - await arb.loadVirtual().catch(er => { - log.verbose('loadVirtual', er.stack) - const msg = - 'The `npm ci` command can only install with an existing package-lock.json or\n' + - 'npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or\n' + - 'later to generate a package-lock.json file, then try again.' - throw this.usageError(msg) - }) - - // retrieves inventory of packages from loaded virtual tree (lock file) - const virtualInventory = new Map(arb.virtualTree.inventory) - - // build ideal tree step needs to come right after retrieving the virtual - // inventory since it's going to erase the previous ref to virtualTree - await arb.buildIdealTree() - - // verifies that the packages from the ideal tree will match - // the same versions that are present in the virtual tree (lock file) - // throws a validation error in case of mismatches - const errors = validateLockfile(virtualInventory, arb.idealTree.inventory) - if (errors.length) { - throw this.usageError( - '`npm ci` can only install packages when your package.json and ' + - 'package-lock.json or npm-shrinkwrap.json are in sync. Please ' + - 'update your lock file with `npm install` ' + - 'before continuing.\n\n' + - errors.join('\n') - ) - } - - // Only remove node_modules after we've successfully loaded the virtual - // tree and validated the lockfile - await this.npm.time('npm-ci:rm', async () => { - const path = `${where}/node_modules` - // get the list of entries so we can skip the glob for performance - const entries = await fs.readdir(path, null).catch(er => []) - return Promise.all(entries.map(f => fs.rm(`${path}/${f}`, { force: true, recursive: true }))) - }) - - await arb.reify(opts) - - const ignoreScripts = this.npm.config.get('ignore-scripts') - // run the same set of scripts that `npm install` runs. - if (!ignoreScripts) { - const scripts = [ - 'preinstall', - 'install', - 'postinstall', - 'prepublish', // XXX should we remove this finally?? - 'preprepare', - 'prepare', - 'postprepare', - ] - const scriptShell = this.npm.config.get('script-shell') || undefined - for (const event of scripts) { - await runScript({ - path: where, - args: [], - scriptShell, - stdio: 'inherit', - banner: !this.npm.silent, - event, - }) - } - } - await reifyFinish(this.npm, arb) - } -} - -module.exports = CI diff --git a/node_modules/npm/lib/commands/completion.js b/node_modules/npm/lib/commands/completion.js deleted file mode 100644 index 59113c5..0000000 --- a/node_modules/npm/lib/commands/completion.js +++ /dev/null @@ -1,283 +0,0 @@ -// Each command has a completion function that takes an options object and a cb -// The callback gets called with an error and an array of possible completions. -// The options object is built up based on the environment variables set by -// zsh or bash when calling a function for completion, based on the cursor -// position and the command line thus far. These are: -// COMP_CWORD: the index of the "word" in the command line being completed -// COMP_LINE: the full command line thusfar as a string -// COMP_POINT: the cursor index at the point of triggering completion -// -// We parse the command line with nopt, like npm does, and then create an -// options object containing: -// words: array of words in the command line -// w: the index of the word being completed (ie, COMP_CWORD) -// word: the word being completed -// line: the COMP_LINE -// lineLength -// point: the COMP_POINT, usually equal to line length, but not always, eg if -// the user has pressed the left-arrow to complete an earlier word -// partialLine: the line up to the point -// partialWord: the word being completed (which might be ''), up to the point -// conf: a nopt parse of the command line -// -// When the implementation completion method returns its list of strings, -// and arrays of strings, we filter that by any that start with the -// partialWord, since only those can possibly be valid matches. -// -// Matches are wrapped with ' to escape them, if necessary, and then printed -// one per line for the shell completion method to consume in IFS=$'\n' mode -// as an array. -// - -const fs = require('fs/promises') -const nopt = require('nopt') -const { resolve } = require('path') - -const Npm = require('../npm.js') -const { definitions, shorthands } = require('@npmcli/config/lib/definitions') -const { commands, aliases, deref } = require('../utils/cmd-list.js') -const configNames = Object.keys(definitions) -const shorthandNames = Object.keys(shorthands) -const allConfs = configNames.concat(shorthandNames) -const { isWindowsShell } = require('../utils/is-windows.js') -const fileExists = (file) => fs.stat(file).then(s => s.isFile()).catch(() => false) - -const BaseCommand = require('../base-command.js') - -class Completion extends BaseCommand { - static description = 'Tab Completion for npm' - static name = 'completion' - - // completion for the completion command - static async completion (opts) { - if (opts.w > 2) { - return - } - - const [bashExists, zshExists] = await Promise.all([ - fileExists(resolve(process.env.HOME, '.bashrc')), - fileExists(resolve(process.env.HOME, '.zshrc')), - ]) - const out = [] - if (zshExists) { - out.push(['>>', '~/.zshrc']) - } - - if (bashExists) { - out.push(['>>', '~/.bashrc']) - } - - return out - } - - async exec (args) { - if (isWindowsShell) { - const msg = 'npm completion supported only in MINGW / Git bash on Windows' - throw Object.assign(new Error(msg), { - code: 'ENOTSUP', - }) - } - - const { COMP_CWORD, COMP_LINE, COMP_POINT, COMP_FISH } = process.env - - // if the COMP_* isn't in the env, then just dump the script. - if (COMP_CWORD === undefined || COMP_LINE === undefined || COMP_POINT === undefined) { - return dumpScript(resolve(this.npm.npmRoot, 'lib', 'utils', 'completion.sh')) - } - - // ok we're actually looking at the envs and outputting the suggestions - // get the partial line and partial word, - // if the point isn't at the end. - // ie, tabbing at: npm foo b|ar - const w = +COMP_CWORD - const words = args.map(unescape) - const word = words[w] - const line = COMP_LINE - const point = +COMP_POINT - const partialLine = line.slice(0, point) - const partialWords = words.slice(0, w) - - // figure out where in that last word the point is. - const partialWordRaw = args[w] - let i = partialWordRaw.length - while (partialWordRaw.slice(0, i) !== partialLine.slice(-1 * i) && i > 0) { - i-- - } - - const partialWord = unescape(partialWordRaw.slice(0, i)) - partialWords.push(partialWord) - - const opts = { - isFish: COMP_FISH === 'true', - words, - w, - word, - line, - lineLength: line.length, - point, - partialLine, - partialWords, - partialWord, - raw: args, - } - - if (partialWords.slice(0, -1).indexOf('--') === -1) { - if (word.charAt(0) === '-') { - return this.wrap(opts, configCompl(opts)) - } - - if (words[w - 1] && - words[w - 1].charAt(0) === '-' && - !isFlag(words[w - 1])) { - // awaiting a value for a non-bool config. - // don't even try to do this for now - return this.wrap(opts, configValueCompl(opts)) - } - } - - // try to find the npm command. - // it's the first thing after all the configs. - // take a little shortcut and use npm's arg parsing logic. - // don't have to worry about the last arg being implicitly - // boolean'ed, since the last block will catch that. - const types = Object.entries(definitions).reduce((acc, [key, def]) => { - acc[key] = def.type - return acc - }, {}) - const parsed = opts.conf = - nopt(types, shorthands, partialWords.slice(0, -1), 0) - // check if there's a command already. - const cmd = parsed.argv.remain[1] - if (!cmd) { - return this.wrap(opts, cmdCompl(opts, this.npm)) - } - - Object.keys(parsed).forEach(k => this.npm.config.set(k, parsed[k])) - - // at this point, if words[1] is some kind of npm command, - // then complete on it. - // otherwise, do nothing - try { - const { completion } = Npm.cmd(cmd) - if (completion) { - const comps = await completion(opts, this.npm) - return this.wrap(opts, comps) - } - } catch { - // it wasnt a valid command, so do nothing - } - } - - // The command should respond with an array. Loop over that, - // wrapping quotes around any that have spaces, and writing - // them to stdout. - // If any of the items are arrays, then join them with a space. - // Ie, returning ['a', 'b c', ['d', 'e']] would allow it to expand - // to: 'a', 'b c', or 'd' 'e' - wrap (opts, compls) { - // TODO this was dead code, leaving it in case we find some command we - // forgot that requires this. if so *that command should fix its - // completions* - // compls = compls.map(w => !/\s+/.test(w) ? w : '\'' + w + '\'') - - if (opts.partialWord) { - compls = compls.filter(c => c.startsWith(opts.partialWord)) - } - - if (compls.length > 0) { - this.npm.output(compls.join('\n')) - } - } -} - -const dumpScript = async (p) => { - const d = (await fs.readFile(p, 'utf8')).replace(/^#!.*?\n/, '') - await new Promise((res, rej) => { - let done = false - process.stdout.on('error', er => { - if (done) { - return - } - - done = true - - // Darwin is a pain sometimes. - // - // This is necessary because the "source" or "." program in - // bash on OS X closes its file argument before reading - // from it, meaning that you get exactly 1 write, which will - // work most of the time, and will always raise an EPIPE. - // - // Really, one should not be tossing away EPIPE errors, or any - // errors, so casually. But, without this, `. <(npm completion)` - // can never ever work on OS X. - // TODO Ignoring coverage, see 'non EPIPE errors cause failures' test. - /* istanbul ignore next */ - if (er.errno === 'EPIPE') { - res() - } else { - rej(er) - } - }) - - process.stdout.write(d, () => { - if (done) { - return - } - - done = true - res() - }) - }) -} - -const unescape = w => w.charAt(0) === '\'' ? w.replace(/^'|'$/g, '') - : w.replace(/\\ /g, ' ') - -// the current word has a dash. Return the config names, -// with the same number of dashes as the current word has. -const configCompl = opts => { - const word = opts.word - const split = word.match(/^(-+)((?:no-)*)(.*)$/) - const dashes = split[1] - const no = split[2] - const flags = configNames.filter(isFlag) - return allConfs.map(c => dashes + c) - .concat(flags.map(f => dashes + (no || 'no-') + f)) -} - -// expand with the valid values of various config values. -// not yet implemented. -const configValueCompl = opts => [] - -// check if the thing is a flag or not. -const isFlag = word => { - // shorthands never take args. - const split = word.match(/^(-*)((?:no-)+)?(.*)$/) - const no = split[2] - const conf = split[3] - const { type } = definitions[conf] - return no || - type === Boolean || - (Array.isArray(type) && type.includes(Boolean)) || - shorthands[conf] -} - -// complete against the npm commands -// if they all resolve to the same thing, just return the thing it already is -const cmdCompl = (opts, npm) => { - const allCommands = commands.concat(Object.keys(aliases)) - const matches = allCommands.filter(c => c.startsWith(opts.partialWord)) - if (!matches.length) { - return matches - } - - const derefs = new Set([...matches.map(c => deref(c))]) - if (derefs.size === 1) { - return [...derefs] - } - - return allCommands -} - -module.exports = Completion diff --git a/node_modules/npm/lib/commands/config.js b/node_modules/npm/lib/commands/config.js deleted file mode 100644 index 8e8358f..0000000 --- a/node_modules/npm/lib/commands/config.js +++ /dev/null @@ -1,378 +0,0 @@ -const { mkdir, readFile, writeFile } = require('fs/promises') -const { dirname, resolve } = require('path') -const { spawn } = require('child_process') -const { EOL } = require('os') -const ini = require('ini') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const pkgJson = require('@npmcli/package-json') -const { defaults, definitions } = require('@npmcli/config/lib/definitions') -const log = require('../utils/log-shim.js') - -// These are the configs that we can nerf-dart. Not all of them currently even -// *have* config definitions so we have to explicitly validate them here -const nerfDarts = [ - '_auth', - '_authToken', - 'username', - '_password', - 'email', - 'certfile', - 'keyfile', -] - -// take an array of `[key, value, k2=v2, k3, v3, ...]` and turn into -// { key: value, k2: v2, k3: v3 } -const keyValues = args => { - const kv = {} - for (let i = 0; i < args.length; i++) { - const arg = args[i].split('=') - const key = arg.shift() - const val = arg.length ? arg.join('=') - : i < args.length - 1 ? args[++i] - : '' - kv[key.trim()] = val.trim() - } - return kv -} - -const publicVar = k => { - // _password - if (k.startsWith('_')) { - return false - } - // //localhost:8080/:_password - if (k.startsWith('//') && k.includes(':_')) { - return false - } - return true -} - -const BaseCommand = require('../base-command.js') -class Config extends BaseCommand { - static description = 'Manage the npm configuration files' - static name = 'config' - static usage = [ - 'set = [= ...]', - 'get [ [ ...]]', - 'delete [ ...]', - 'list [--json]', - 'edit', - 'fix', - ] - - static params = [ - 'json', - 'global', - 'editor', - 'location', - 'long', - ] - - static ignoreImplicitWorkspace = false - - static skipConfigValidation = true - - static async completion (opts) { - const argv = opts.conf.argv.remain - if (argv[1] !== 'config') { - argv.unshift('config') - } - - if (argv.length === 2) { - const cmds = ['get', 'set', 'delete', 'ls', 'rm', 'edit', 'fix'] - if (opts.partialWord !== 'l') { - cmds.push('list') - } - - return cmds - } - - const action = argv[2] - switch (action) { - case 'set': - // todo: complete with valid values, if possible. - if (argv.length > 3) { - return [] - } - - // fallthrough - /* eslint no-fallthrough:0 */ - case 'get': - case 'delete': - case 'rm': - return Object.keys(definitions) - case 'edit': - case 'list': - case 'ls': - case 'fix': - default: - return [] - } - } - - async exec ([action, ...args]) { - log.disableProgress() - try { - switch (action) { - case 'set': - await this.set(args) - break - case 'get': - await this.get(args) - break - case 'delete': - case 'rm': - case 'del': - await this.del(args) - break - case 'list': - case 'ls': - await (this.npm.flatOptions.json ? this.listJson() : this.list()) - break - case 'edit': - await this.edit() - break - case 'fix': - await this.fix() - break - default: - throw this.usageError() - } - } finally { - log.enableProgress() - } - } - - async set (args) { - if (!args.length) { - throw this.usageError() - } - - const where = this.npm.flatOptions.location - for (const [key, val] of Object.entries(keyValues(args))) { - log.info('config', 'set %j %j', key, val) - const baseKey = key.split(':').pop() - if (!this.npm.config.definitions[baseKey] && !nerfDarts.includes(baseKey)) { - throw new Error(`\`${baseKey}\` is not a valid npm option`) - } - const deprecated = this.npm.config.definitions[baseKey]?.deprecated - if (deprecated) { - throw new Error( - `The \`${baseKey}\` option is deprecated, and can not be set in this way${deprecated}` - ) - } - - if (val === '') { - this.npm.config.delete(key, where) - } else { - this.npm.config.set(key, val, where) - } - - if (!this.npm.config.validate(where)) { - log.warn('config', 'omitting invalid config values') - } - } - - await this.npm.config.save(where) - } - - async get (keys) { - if (!keys.length) { - return this.list() - } - - const out = [] - for (const key of keys) { - if (!publicVar(key)) { - throw new Error(`The ${key} option is protected, and can not be retrieved in this way`) - } - - const pref = keys.length > 1 ? `${key}=` : '' - out.push(pref + this.npm.config.get(key)) - } - this.npm.output(out.join('\n')) - } - - async del (keys) { - if (!keys.length) { - throw this.usageError() - } - - const where = this.npm.flatOptions.location - for (const key of keys) { - this.npm.config.delete(key, where) - } - await this.npm.config.save(where) - } - - async edit () { - const e = this.npm.flatOptions.editor - const where = this.npm.flatOptions.location - const file = this.npm.config.data.get(where).source - - // save first, just to make sure it's synced up - // this also removes all the comments from the last time we edited it. - await this.npm.config.save(where) - - const data = ( - await readFile(file, 'utf8').catch(() => '') - ).replace(/\r\n/g, '\n') - const entries = Object.entries(defaults) - const defData = entries.reduce((str, [key, val]) => { - const obj = { [key]: val } - const i = ini.stringify(obj) - .replace(/\r\n/g, '\n') // normalizes output from ini.stringify - .replace(/\n$/m, '') - .replace(/^/g, '; ') - .replace(/\n/g, '\n; ') - .split('\n') - return str + '\n' + i - }, '') - - const tmpData = `;;;; -; npm ${where}config file: ${file} -; this is a simple ini-formatted file -; lines that start with semi-colons are comments -; run \`npm help 7 config\` for documentation of the various options -; -; Configs like \`@scope:registry\` map a scope to a given registry url. -; -; Configs like \`///:_authToken\` are auth that is restricted -; to the registry host specified. - -${data.split('\n').sort(localeCompare).join('\n').trim()} - -;;;; -; all available options shown below with default values -;;;; - -${defData} -`.split('\n').join(EOL) - await mkdir(dirname(file), { recursive: true }) - await writeFile(file, tmpData, 'utf8') - await new Promise((res, rej) => { - const [bin, ...args] = e.split(/\s+/) - const editor = spawn(bin, [...args, file], { stdio: 'inherit' }) - editor.on('exit', (code) => { - if (code) { - return rej(new Error(`editor process exited with code: ${code}`)) - } - return res() - }) - }) - } - - async fix () { - let problems - - try { - this.npm.config.validate() - return // if validate doesn't throw we have nothing to do - } catch (err) { - // coverage skipped because we don't need to test rethrowing errors - // istanbul ignore next - if (err.code !== 'ERR_INVALID_AUTH') { - throw err - } - - problems = err.problems - } - - if (!this.npm.config.isDefault('location')) { - problems = problems.filter((problem) => { - return problem.where === this.npm.config.get('location') - }) - } - - this.npm.config.repair(problems) - const locations = [] - - this.npm.output('The following configuration problems have been repaired:\n') - const summary = problems.map(({ action, from, to, key, where }) => { - // coverage disabled for else branch because it is intentionally omitted - // istanbul ignore else - if (action === 'rename') { - // we keep track of which configs were modified here so we know what to save later - locations.push(where) - return `~ \`${from}\` renamed to \`${to}\` in ${where} config` - } else if (action === 'delete') { - locations.push(where) - return `- \`${key}\` deleted from ${where} config` - } - }).join('\n') - this.npm.output(summary) - - return await Promise.all(locations.map((location) => this.npm.config.save(location))) - } - - async list () { - const msg = [] - // long does not have a flattener - const long = this.npm.config.get('long') - for (const [where, { data, source }] of this.npm.config.data.entries()) { - if (where === 'default' && !long) { - continue - } - - const keys = Object.keys(data).sort(localeCompare) - if (!keys.length) { - continue - } - - msg.push(`; "${where}" config from ${source}`, '') - for (const k of keys) { - const v = publicVar(k) ? JSON.stringify(data[k]) : '(protected)' - const src = this.npm.config.find(k) - const overridden = src !== where - msg.push((overridden ? '; ' : '') + - `${k} = ${v} ${overridden ? `; overridden by ${src}` : ''}`) - } - msg.push('') - } - - if (!long) { - msg.push( - `; node bin location = ${process.execPath}`, - `; node version = ${process.version}`, - `; npm local prefix = ${this.npm.localPrefix}`, - `; npm version = ${this.npm.version}`, - `; cwd = ${process.cwd()}`, - `; HOME = ${process.env.HOME}`, - '; Run `npm config ls -l` to show all defaults.' - ) - msg.push('') - } - - if (!this.npm.global) { - const { content } = await pkgJson.normalize(this.npm.prefix).catch(() => ({ content: {} })) - - if (content.publishConfig) { - const pkgPath = resolve(this.npm.prefix, 'package.json') - msg.push(`; "publishConfig" from ${pkgPath}`) - msg.push('; This set of config values will be used at publish-time.', '') - const pkgKeys = Object.keys(content.publishConfig).sort(localeCompare) - for (const k of pkgKeys) { - const v = publicVar(k) ? JSON.stringify(content.publishConfig[k]) : '(protected)' - msg.push(`${k} = ${v}`) - } - msg.push('') - } - } - - this.npm.output(msg.join('\n').trim()) - } - - async listJson () { - const publicConf = {} - for (const key in this.npm.config.list[0]) { - if (!publicVar(key)) { - continue - } - - publicConf[key] = this.npm.config.get(key) - } - this.npm.output(JSON.stringify(publicConf, null, 2)) - } -} - -module.exports = Config diff --git a/node_modules/npm/lib/commands/dedupe.js b/node_modules/npm/lib/commands/dedupe.js deleted file mode 100644 index 0d0e266..0000000 --- a/node_modules/npm/lib/commands/dedupe.js +++ /dev/null @@ -1,52 +0,0 @@ -// dedupe duplicated packages, or find them in the tree -const reifyFinish = require('../utils/reify-finish.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -class Dedupe extends ArboristWorkspaceCmd { - static description = 'Reduce duplication in the package tree' - static name = 'dedupe' - static params = [ - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'strict-peer-deps', - 'package-lock', - 'omit', - 'include', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - ...super.params, - ] - - async exec (args) { - if (this.npm.global) { - const er = new Error('`npm dedupe` does not work in global mode.') - er.code = 'EDEDUPEGLOBAL' - throw er - } - - const dryRun = this.npm.config.get('dry-run') - const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: where, - dryRun, - // Saving during dedupe would only update if one of your direct - // dependencies was also duplicated somewhere in your tree. It would be - // confusing if running this were to also update your package.json. In - // order to reduce potential confusion we set this to false. - save: false, - workspaces: this.workspaceNames, - } - const arb = new Arborist(opts) - await arb.dedupe(opts) - await reifyFinish(this.npm, arb) - } -} - -module.exports = Dedupe diff --git a/node_modules/npm/lib/commands/deprecate.js b/node_modules/npm/lib/commands/deprecate.js deleted file mode 100644 index bdce313..0000000 --- a/node_modules/npm/lib/commands/deprecate.js +++ /dev/null @@ -1,73 +0,0 @@ -const fetch = require('npm-registry-fetch') -const otplease = require('../utils/otplease.js') -const npa = require('npm-package-arg') -const semver = require('semver') -const getIdentity = require('../utils/get-identity.js') -const libaccess = require('libnpmaccess') -const BaseCommand = require('../base-command.js') - -class Deprecate extends BaseCommand { - static description = 'Deprecate a version of a package' - static name = 'deprecate' - static usage = [' '] - static params = [ - 'registry', - 'otp', - ] - - static ignoreImplicitWorkspace = true - - static async completion (opts, npm) { - if (opts.conf.argv.remain.length > 1) { - return [] - } - - const username = await getIdentity(npm, npm.flatOptions) - const packages = await libaccess.getPackages(username, npm.flatOptions) - return Object.keys(packages) - .filter((name) => - packages[name] === 'write' && - (opts.conf.argv.remain.length === 0 || - name.startsWith(opts.conf.argv.remain[0]))) - } - - async exec ([pkg, msg]) { - // msg == null because '' is a valid value, it indicates undeprecate - if (!pkg || msg == null) { - throw this.usageError() - } - - // fetch the data and make sure it exists. - const p = npa(pkg) - const spec = p.rawSpec === '*' ? '*' : p.fetchSpec - - if (semver.validRange(spec, true) === null) { - throw new Error(`invalid version range: ${spec}`) - } - - const uri = '/' + p.escapedName - const packument = await fetch.json(uri, { - ...this.npm.flatOptions, - spec: p, - query: { write: true }, - }) - - const versions = Object.keys(packument.versions) - .filter(v => semver.satisfies(v, spec, { includePrerelease: true })) - - if (versions.length) { - for (const v of versions) { - packument.versions[v].deprecated = msg - } - return otplease(this.npm, this.npm.flatOptions, opts => fetch(uri, { - ...opts, - spec: p, - method: 'PUT', - body: packument, - ignoreBody: true, - })) - } - } -} - -module.exports = Deprecate diff --git a/node_modules/npm/lib/commands/diff.js b/node_modules/npm/lib/commands/diff.js deleted file mode 100644 index 64d81d5..0000000 --- a/node_modules/npm/lib/commands/diff.js +++ /dev/null @@ -1,291 +0,0 @@ -const { resolve } = require('path') -const semver = require('semver') -const libnpmdiff = require('libnpmdiff') -const npa = require('npm-package-arg') -const pacote = require('pacote') -const pickManifest = require('npm-pick-manifest') -const log = require('../utils/log-shim') -const pkgJson = require('@npmcli/package-json') -const BaseCommand = require('../base-command.js') - -class Diff extends BaseCommand { - static description = 'The registry diff command' - static name = 'diff' - static usage = [ - '[...]', - ] - - static params = [ - 'diff', - 'diff-name-only', - 'diff-unified', - 'diff-ignore-all-space', - 'diff-no-prefix', - 'diff-src-prefix', - 'diff-dst-prefix', - 'diff-text', - 'global', - 'tag', - 'workspace', - 'workspaces', - 'include-workspace-root', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args) { - const specs = this.npm.config.get('diff').filter(d => d) - if (specs.length > 2) { - throw this.usageError(`Can't use more than two --diff arguments.`) - } - - // execWorkspaces may have set this already - if (!this.prefix) { - this.prefix = this.npm.prefix - } - - // this is the "top" directory, one up from node_modules - // in global mode we have to walk one up from globalDir because our - // node_modules is sometimes under ./lib, and in global mode we're only ever - // walking through node_modules (because we will have been given a package - // name already) - if (this.npm.global) { - this.top = resolve(this.npm.globalDir, '..') - } else { - this.top = this.prefix - } - - const [a, b] = await this.retrieveSpecs(specs) - log.info('diff', { src: a, dst: b }) - - const res = await libnpmdiff([a, b], { - ...this.npm.flatOptions, - diffFiles: args, - where: this.top, - }) - return this.npm.output(res) - } - - async execWorkspaces (args) { - await this.setWorkspaces() - for (const workspacePath of this.workspacePaths) { - this.top = workspacePath - this.prefix = workspacePath - await this.exec(args) - } - } - - // get the package name from the packument at `path` - // throws if no packument is present OR if it does not have `name` attribute - async packageName (path) { - let name - try { - const { content: pkg } = await pkgJson.normalize(this.prefix) - name = pkg.name - } catch (e) { - log.verbose('diff', 'could not read project dir package.json') - } - - if (!name) { - throw this.usageError('Needs multiple arguments to compare or run from a project dir.') - } - - return name - } - - async retrieveSpecs ([a, b]) { - if (a && b) { - const specs = await this.convertVersionsToSpecs([a, b]) - return this.findVersionsByPackageName(specs) - } - - // no arguments, defaults to comparing cwd - // to its latest published registry version - if (!a) { - const pkgName = await this.packageName(this.prefix) - return [ - `${pkgName}@${this.npm.config.get('tag')}`, - `file:${this.prefix.replace(/#/g, '%23')}`, - ] - } - - // single argument, used to compare wanted versions of an - // installed dependency or to compare the cwd to a published version - let noPackageJson - let pkgName - try { - const { content: pkg } = await pkgJson.normalize(this.prefix) - pkgName = pkg.name - } catch (e) { - log.verbose('diff', 'could not read project dir package.json') - noPackageJson = true - } - - const missingPackageJson = - this.usageError('Needs multiple arguments to compare or run from a project dir.') - - // using a valid semver range, that means it should just diff - // the cwd against a published version to the registry using the - // same project name and the provided semver range - if (semver.validRange(a)) { - if (!pkgName) { - throw missingPackageJson - } - return [ - `${pkgName}@${a}`, - `file:${this.prefix.replace(/#/g, '%23')}`, - ] - } - - // when using a single package name as arg and it's part of the current - // install tree, then retrieve the current installed version and compare - // it against the same value `npm outdated` would suggest you to update to - const spec = npa(a) - if (spec.registry) { - let actualTree - let node - const Arborist = require('@npmcli/arborist') - try { - const opts = { - ...this.npm.flatOptions, - path: this.top, - } - const arb = new Arborist(opts) - actualTree = await arb.loadActual(opts) - node = actualTree && - actualTree.inventory.query('name', spec.name) - .values().next().value - } catch (e) { - log.verbose('diff', 'failed to load actual install tree') - } - - if (!node || !node.name || !node.package || !node.package.version) { - if (noPackageJson) { - throw missingPackageJson - } - return [ - `${spec.name}@${spec.fetchSpec}`, - `file:${this.prefix.replace(/#/g, '%23')}`, - ] - } - - const tryRootNodeSpec = () => - (actualTree && actualTree.edgesOut.get(spec.name) || {}).spec - - const tryAnySpec = () => { - for (const edge of node.edgesIn) { - return edge.spec - } - } - - const aSpec = `file:${node.realpath.replace(/#/g, '%23')}` - - // finds what version of the package to compare against, if a exact - // version or tag was passed than it should use that, otherwise - // work from the top of the arborist tree to find the original semver - // range declared in the package that depends on the package. - let bSpec - if (spec.rawSpec !== '*') { - bSpec = spec.rawSpec - } else { - const bTargetVersion = - tryRootNodeSpec() - || tryAnySpec() - - // figure out what to compare against, - // follows same logic to npm outdated "Wanted" results - const packument = await pacote.packument(spec, { - ...this.npm.flatOptions, - preferOnline: true, - }) - bSpec = pickManifest( - packument, - bTargetVersion, - { ...this.npm.flatOptions } - ).version - } - - return [ - `${spec.name}@${aSpec}`, - `${spec.name}@${bSpec}`, - ] - } else if (spec.type === 'directory') { - return [ - `file:${spec.fetchSpec.replace(/#/g, '%23')}`, - `file:${this.prefix.replace(/#/g, '%23')}`, - ] - } else { - throw this.usageError(`Spec type ${spec.type} not supported.`) - } - } - - async convertVersionsToSpecs ([a, b]) { - const semverA = semver.validRange(a) - const semverB = semver.validRange(b) - - // both specs are semver versions, assume current project dir name - if (semverA && semverB) { - let pkgName - try { - const { content: pkg } = await pkgJson.normalize(this.prefix) - pkgName = pkg.name - } catch (e) { - log.verbose('diff', 'could not read project dir package.json') - } - - if (!pkgName) { - throw this.usageError('Needs to be run from a project dir in order to diff two versions.') - } - - return [`${pkgName}@${a}`, `${pkgName}@${b}`] - } - - // otherwise uses the name from the other arg to - // figure out the spec.name of what to compare - if (!semverA && semverB) { - return [a, `${npa(a).name}@${b}`] - } - - if (semverA && !semverB) { - return [`${npa(b).name}@${a}`, b] - } - - // no valid semver ranges used - return [a, b] - } - - async findVersionsByPackageName (specs) { - let actualTree - const Arborist = require('@npmcli/arborist') - try { - const opts = { - ...this.npm.flatOptions, - path: this.top, - } - const arb = new Arborist(opts) - actualTree = await arb.loadActual(opts) - } catch (e) { - log.verbose('diff', 'failed to load actual install tree') - } - - return specs.map(i => { - const spec = npa(i) - if (spec.rawSpec !== '*') { - return i - } - - const node = actualTree - && actualTree.inventory.query('name', spec.name) - .values().next().value - - const res = !node || !node.package || !node.package.version - ? spec.fetchSpec - : `file:${node.realpath.replace(/#/g, '%23')}` - - return `${spec.name}@${res}` - }) - } -} - -module.exports = Diff diff --git a/node_modules/npm/lib/commands/dist-tag.js b/node_modules/npm/lib/commands/dist-tag.js deleted file mode 100644 index 15f9622..0000000 --- a/node_modules/npm/lib/commands/dist-tag.js +++ /dev/null @@ -1,205 +0,0 @@ -const npa = require('npm-package-arg') -const regFetch = require('npm-registry-fetch') -const semver = require('semver') -const log = require('../utils/log-shim') -const otplease = require('../utils/otplease.js') -const pkgJson = require('@npmcli/package-json') -const BaseCommand = require('../base-command.js') - -class DistTag extends BaseCommand { - static description = 'Modify package distribution tags' - static params = ['workspace', 'workspaces', 'include-workspace-root'] - static name = 'dist-tag' - static usage = [ - 'add []', - 'rm ', - 'ls []', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - static async completion (opts) { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - return ['add', 'rm', 'ls'] - } - - switch (argv[2]) { - default: - return [] - } - } - - async exec ([cmdName, pkg, tag]) { - const opts = { - ...this.npm.flatOptions, - } - - if (['add', 'a', 'set', 's'].includes(cmdName)) { - return this.add(pkg, tag, opts) - } - - if (['rm', 'r', 'del', 'd', 'remove'].includes(cmdName)) { - return this.remove(pkg, tag, opts) - } - - if (['ls', 'l', 'sl', 'list'].includes(cmdName)) { - return this.list(pkg, opts) - } - - if (!pkg) { - // when only using the pkg name the default behavior - // should be listing the existing tags - return this.list(cmdName, opts) - } else { - throw this.usageError() - } - } - - async execWorkspaces ([cmdName, pkg, tag]) { - // cmdName is some form of list - // pkg is one of: - // - unset - // - . - // - .@version - if (['ls', 'l', 'sl', 'list'].includes(cmdName) && (!pkg || pkg === '.' || /^\.@/.test(pkg))) { - return this.listWorkspaces() - } - - // pkg is unset - // cmdName is one of: - // - unset - // - . - // - .@version - if (!pkg && (!cmdName || cmdName === '.' || /^\.@/.test(cmdName))) { - return this.listWorkspaces() - } - - // anything else is just a regular dist-tag command - // so we fallback to the non-workspaces implementation - log.warn('dist-tag', 'Ignoring workspaces for specified package') - return this.exec([cmdName, pkg, tag]) - } - - async add (spec, tag, opts) { - spec = npa(spec || '') - const version = spec.rawSpec - const defaultTag = tag || this.npm.config.get('tag') - - log.verbose('dist-tag add', defaultTag, 'to', spec.name + '@' + version) - - if (!spec.name || !version || !defaultTag) { - throw this.usageError('must provide a spec with a name and version, and a tag to add') - } - - const t = defaultTag.trim() - - if (semver.validRange(t)) { - throw new Error('Tag name must not be a valid SemVer range: ' + t) - } - - const tags = await this.fetchTags(spec, opts) - if (tags[t] === version) { - log.warn('dist-tag add', t, 'is already set to version', version) - return - } - tags[t] = version - const url = - `/-/package/${spec.escapedName}/dist-tags/${encodeURIComponent(t)}` - const reqOpts = { - ...opts, - method: 'PUT', - body: JSON.stringify(version), - headers: { - 'content-type': 'application/json', - }, - spec, - } - await otplease(this.npm, reqOpts, o => regFetch(url, o)) - this.npm.output(`+${t}: ${spec.name}@${version}`) - } - - async remove (spec, tag, opts) { - spec = npa(spec || '') - log.verbose('dist-tag del', tag, 'from', spec.name) - - if (!spec.name) { - throw this.usageError() - } - - const tags = await this.fetchTags(spec, opts) - if (!tags[tag]) { - log.info('dist-tag del', tag, 'is not a dist-tag on', spec.name) - throw new Error(tag + ' is not a dist-tag on ' + spec.name) - } - const version = tags[tag] - delete tags[tag] - const url = - `/-/package/${spec.escapedName}/dist-tags/${encodeURIComponent(tag)}` - const reqOpts = { - ...opts, - method: 'DELETE', - spec, - } - await otplease(this.npm, reqOpts, o => regFetch(url, o)) - this.npm.output(`-${tag}: ${spec.name}@${version}`) - } - - async list (spec, opts) { - if (!spec) { - if (this.npm.global) { - throw this.usageError() - } - const { content: { name } } = await pkgJson.normalize(this.npm.prefix) - if (!name) { - throw this.usageError() - } - - return this.list(name, opts) - } - spec = npa(spec) - - try { - const tags = await this.fetchTags(spec, opts) - const msg = - Object.keys(tags).map(k => `${k}: ${tags[k]}`).sort().join('\n') - this.npm.output(msg) - return tags - } catch (err) { - log.error('dist-tag ls', "Couldn't get dist-tag data for", spec) - throw err - } - } - - async listWorkspaces () { - await this.setWorkspaces() - - for (const name of this.workspaceNames) { - try { - this.npm.output(`${name}:`) - await this.list(npa(name), this.npm.flatOptions) - } catch (err) { - // set the exitCode directly, but ignore the error - // since it will have already been logged by this.list() - process.exitCode = 1 - } - } - } - - async fetchTags (spec, opts) { - const data = await regFetch.json( - `/-/package/${spec.escapedName}/dist-tags`, - { ...opts, 'prefer-online': true, spec } - ) - if (data && typeof data === 'object') { - delete data._etag - } - if (!data || !Object.keys(data).length) { - throw new Error('No dist-tags found for ' + spec.name) - } - - return data - } -} -module.exports = DistTag diff --git a/node_modules/npm/lib/commands/docs.js b/node_modules/npm/lib/commands/docs.js deleted file mode 100644 index 5d20215..0000000 --- a/node_modules/npm/lib/commands/docs.js +++ /dev/null @@ -1,19 +0,0 @@ -const PackageUrlCmd = require('../package-url-cmd.js') -class Docs extends PackageUrlCmd { - static description = 'Open documentation for a package in a web browser' - static name = 'docs' - - getUrl (spec, mani) { - if (mani.homepage) { - return mani.homepage - } - - const info = this.hostedFromMani(mani) - if (info) { - return info.docs() - } - - return `https://www.npmjs.com/package/${mani.name}` - } -} -module.exports = Docs diff --git a/node_modules/npm/lib/commands/doctor.js b/node_modules/npm/lib/commands/doctor.js deleted file mode 100644 index 2a528d4..0000000 --- a/node_modules/npm/lib/commands/doctor.js +++ /dev/null @@ -1,419 +0,0 @@ -const cacache = require('cacache') -const fs = require('fs') -const fetch = require('make-fetch-happen') -const Table = require('cli-table3') -const which = require('which') -const pacote = require('pacote') -const { resolve } = require('path') -const semver = require('semver') -const { promisify } = require('util') -const log = require('../utils/log-shim.js') -const ping = require('../utils/ping.js') -const { defaults } = require('@npmcli/config/lib/definitions') -const lstat = promisify(fs.lstat) -const readdir = promisify(fs.readdir) -const access = promisify(fs.access) -const { R_OK, W_OK, X_OK } = fs.constants - -const maskLabel = mask => { - const label = [] - if (mask & R_OK) { - label.push('readable') - } - - if (mask & W_OK) { - label.push('writable') - } - - if (mask & X_OK) { - label.push('executable') - } - - return label.join(', ') -} - -const subcommands = [ - { - groups: ['ping', 'registry'], - title: 'npm ping', - cmd: 'checkPing', - }, { - groups: ['versions'], - title: 'npm -v', - cmd: 'getLatestNpmVersion', - }, { - groups: ['versions'], - title: 'node -v', - cmd: 'getLatestNodejsVersion', - }, { - groups: ['registry'], - title: 'npm config get registry', - cmd: 'checkNpmRegistry', - }, { - groups: ['environment'], - title: 'git executable in PATH', - cmd: 'getGitPath', - }, { - groups: ['environment'], - title: 'global bin folder in PATH', - cmd: 'getBinPath', - }, { - groups: ['permissions', 'cache'], - title: 'Perms check on cached files', - cmd: 'checkCachePermission', - windows: false, - }, { - groups: ['permissions'], - title: 'Perms check on local node_modules', - cmd: 'checkLocalModulesPermission', - windows: false, - }, { - groups: ['permissions'], - title: 'Perms check on global node_modules', - cmd: 'checkGlobalModulesPermission', - windows: false, - }, { - groups: ['permissions'], - title: 'Perms check on local bin folder', - cmd: 'checkLocalBinPermission', - windows: false, - }, { - groups: ['permissions'], - title: 'Perms check on global bin folder', - cmd: 'checkGlobalBinPermission', - windows: false, - }, { - groups: ['cache'], - title: 'Verify cache contents', - cmd: 'verifyCachedFiles', - windows: false, - }, - // TODO: - // group === 'dependencies'? - // - ensure arborist.loadActual() runs without errors and no invalid edges - // - ensure package-lock.json matches loadActual() - // - verify loadActual without hidden lock file matches hidden lockfile - // group === '???' - // - verify all local packages have bins linked - // What is the fix for these? -] -const BaseCommand = require('../base-command.js') -class Doctor extends BaseCommand { - static description = 'Check the health of your npm environment' - static name = 'doctor' - static params = ['registry'] - static ignoreImplicitWorkspace = false - static usage = [`[${subcommands.flatMap(s => s.groups) - .filter((value, index, self) => self.indexOf(value) === index) - .join('] [')}]`] - - static subcommands = subcommands - - // minimum width of check column, enough for the word `Check` - #checkWidth = 5 - - async exec (args) { - log.info('Running checkup') - let allOk = true - - const actions = this.actions(args) - this.#checkWidth = actions.reduce((length, item) => - Math.max(item.title.length, length), this.#checkWidth) - - if (!this.npm.silent) { - this.output(['Check', 'Value', 'Recommendation/Notes'].map(h => this.npm.chalk.underline(h))) - } - // Do the actual work - for (const { title, cmd } of actions) { - const item = [title] - try { - item.push(true, await this[cmd]()) - } catch (err) { - item.push(false, err) - } - if (!item[1]) { - allOk = false - item[0] = this.npm.chalk.red(item[0]) - item[1] = this.npm.chalk.red('not ok') - item[2] = this.npm.chalk.magenta(String(item[2])) - } else { - item[1] = this.npm.chalk.green('ok') - } - if (!this.npm.silent) { - this.output(item) - } - } - - if (!allOk) { - if (this.npm.silent) { - /* eslint-disable-next-line max-len */ - throw new Error('Some problems found. Check logs or disable silent mode for recommendations.') - } else { - throw new Error('Some problems found. See above for recommendations.') - } - } - } - - async checkPing () { - const tracker = log.newItem('checkPing', 1) - tracker.info('checkPing', 'Pinging registry') - try { - await ping({ ...this.npm.flatOptions, retry: false }) - return '' - } catch (er) { - if (/^E\d{3}$/.test(er.code || '')) { - throw er.code.slice(1) + ' ' + er.message - } else { - throw er.message - } - } finally { - tracker.finish() - } - } - - async getLatestNpmVersion () { - const tracker = log.newItem('getLatestNpmVersion', 1) - tracker.info('getLatestNpmVersion', 'Getting npm package information') - try { - const latest = (await pacote.manifest('npm@latest', this.npm.flatOptions)).version - if (semver.gte(this.npm.version, latest)) { - return `current: v${this.npm.version}, latest: v${latest}` - } else { - throw `Use npm v${latest}` - } - } finally { - tracker.finish() - } - } - - async getLatestNodejsVersion () { - // XXX get the latest in the current major as well - const current = process.version - const currentRange = `^${current}` - const url = 'https://nodejs.org/dist/index.json' - const tracker = log.newItem('getLatestNodejsVersion', 1) - tracker.info('getLatestNodejsVersion', 'Getting Node.js release information') - try { - const res = await fetch(url, { method: 'GET', ...this.npm.flatOptions }) - const data = await res.json() - let maxCurrent = '0.0.0' - let maxLTS = '0.0.0' - for (const { lts, version } of data) { - if (lts && semver.gt(version, maxLTS)) { - maxLTS = version - } - - if (semver.satisfies(version, currentRange) && semver.gt(version, maxCurrent)) { - maxCurrent = version - } - } - const recommended = semver.gt(maxCurrent, maxLTS) ? maxCurrent : maxLTS - if (semver.gte(process.version, recommended)) { - return `current: ${current}, recommended: ${recommended}` - } else { - throw `Use node ${recommended} (current: ${current})` - } - } finally { - tracker.finish() - } - } - - async getBinPath (dir) { - const tracker = log.newItem('getBinPath', 1) - tracker.info('getBinPath', 'Finding npm global bin in your PATH') - if (!process.env.PATH.includes(this.npm.globalBin)) { - throw new Error(`Add ${this.npm.globalBin} to your $PATH`) - } - return this.npm.globalBin - } - - async checkCachePermission () { - return this.checkFilesPermission(this.npm.cache, true, R_OK) - } - - async checkLocalModulesPermission () { - return this.checkFilesPermission(this.npm.localDir, true, R_OK | W_OK, true) - } - - async checkGlobalModulesPermission () { - return this.checkFilesPermission(this.npm.globalDir, false, R_OK) - } - - async checkLocalBinPermission () { - return this.checkFilesPermission(this.npm.localBin, false, R_OK | W_OK | X_OK, true) - } - - async checkGlobalBinPermission () { - return this.checkFilesPermission(this.npm.globalBin, false, X_OK) - } - - async checkFilesPermission (root, shouldOwn, mask, missingOk) { - let ok = true - - const tracker = log.newItem(root, 1) - - try { - const uid = process.getuid() - const gid = process.getgid() - const files = new Set([root]) - for (const f of files) { - tracker.silly('checkFilesPermission', f.slice(root.length + 1)) - const st = await lstat(f).catch(er => { - // if it can't be missing, or if it can and the error wasn't that it was missing - if (!missingOk || er.code !== 'ENOENT') { - ok = false - tracker.warn('checkFilesPermission', 'error getting info for ' + f) - } - }) - - tracker.completeWork(1) - - if (!st) { - continue - } - - if (shouldOwn && (uid !== st.uid || gid !== st.gid)) { - tracker.warn('checkFilesPermission', 'should be owner of ' + f) - ok = false - } - - if (!st.isDirectory() && !st.isFile()) { - continue - } - - try { - await access(f, mask) - } catch (er) { - ok = false - const msg = `Missing permissions on ${f} (expect: ${maskLabel(mask)})` - tracker.error('checkFilesPermission', msg) - continue - } - - if (st.isDirectory()) { - const entries = await readdir(f).catch(er => { - ok = false - tracker.warn('checkFilesPermission', 'error reading directory ' + f) - return [] - }) - for (const entry of entries) { - files.add(resolve(f, entry)) - } - } - } - } finally { - tracker.finish() - if (!ok) { - throw ( - `Check the permissions of files in ${root}` + - (shouldOwn ? ' (should be owned by current user)' : '') - ) - } else { - return '' - } - } - } - - async getGitPath () { - const tracker = log.newItem('getGitPath', 1) - tracker.info('getGitPath', 'Finding git in your PATH') - try { - return await which('git').catch(er => { - tracker.warn(er) - throw new Error("Install git and ensure it's in your PATH.") - }) - } finally { - tracker.finish() - } - } - - async verifyCachedFiles () { - const tracker = log.newItem('verifyCachedFiles', 1) - tracker.info('verifyCachedFiles', 'Verifying the npm cache') - try { - const stats = await cacache.verify(this.npm.flatOptions.cache) - const { badContentCount, reclaimedCount, missingContent, reclaimedSize } = stats - if (badContentCount || reclaimedCount || missingContent) { - if (badContentCount) { - tracker.warn('verifyCachedFiles', `Corrupted content removed: ${badContentCount}`) - } - - if (reclaimedCount) { - tracker.warn( - 'verifyCachedFiles', - `Content garbage-collected: ${reclaimedCount} (${reclaimedSize} bytes)` - ) - } - - if (missingContent) { - tracker.warn('verifyCachedFiles', `Missing content: ${missingContent}`) - } - - tracker.warn('verifyCachedFiles', 'Cache issues have been fixed') - } - tracker.info( - 'verifyCachedFiles', - `Verification complete. Stats: ${JSON.stringify(stats, null, 2)}` - ) - return `verified ${stats.verifiedContent} tarballs` - } finally { - tracker.finish() - } - } - - async checkNpmRegistry () { - if (this.npm.flatOptions.registry !== defaults.registry) { - throw `Try \`npm config set registry=${defaults.registry}\`` - } else { - return `using default registry (${defaults.registry})` - } - } - - output (row) { - const t = new Table({ - chars: { - top: '', - 'top-mid': '', - 'top-left': '', - 'top-right': '', - bottom: '', - 'bottom-mid': '', - 'bottom-left': '', - 'bottom-right': '', - left: '', - 'left-mid': '', - mid: '', - 'mid-mid': '', - right: '', - 'right-mid': '', - middle: ' ', - }, - style: { - 'padding-left': 0, - 'padding-right': 0, - // setting border here is not necessary visually since we've already - // zeroed out all the chars above, but without it cli-table3 will wrap - // some of the separator spaces with ansi codes which show up in - // snapshots. - border: 0, - }, - colWidths: [this.#checkWidth, 6], - }) - t.push(row) - this.npm.output(t.toString()) - } - - actions (params) { - return this.constructor.subcommands.filter(subcmd => { - if (process.platform === 'win32' && subcmd.windows === false) { - return false - } - if (params.length) { - return params.some(param => subcmd.groups.includes(param)) - } - return true - }) - } -} - -module.exports = Doctor diff --git a/node_modules/npm/lib/commands/edit.js b/node_modules/npm/lib/commands/edit.js deleted file mode 100644 index fbc7840..0000000 --- a/node_modules/npm/lib/commands/edit.js +++ /dev/null @@ -1,76 +0,0 @@ -// npm edit -// open the package folder in the $EDITOR - -const { resolve } = require('path') -const fs = require('graceful-fs') -const cp = require('child_process') -const completion = require('../utils/completion/installed-shallow.js') -const BaseCommand = require('../base-command.js') - -const splitPackageNames = (path) => { - return path.split('/') - // combine scoped parts - .reduce((parts, part) => { - if (parts.length === 0) { - return [part] - } - - const lastPart = parts[parts.length - 1] - // check if previous part is the first part of a scoped package - if (lastPart[0] === '@' && !lastPart.includes('/')) { - parts[parts.length - 1] += '/' + part - } else { - parts.push(part) - } - - return parts - }, []) - .join('/node_modules/') - .replace(/(\/node_modules)+/, '/node_modules') -} - -class Edit extends BaseCommand { - static description = 'Edit an installed package' - static name = 'edit' - static usage = ['[/...]'] - static params = ['editor'] - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - return completion(npm, opts) - } - - async exec (args) { - if (args.length !== 1) { - throw this.usageError() - } - - const path = splitPackageNames(args[0]) - const dir = resolve(this.npm.dir, path) - - // graceful-fs does not promisify - await new Promise((res, rej) => { - fs.lstat(dir, (err) => { - if (err) { - return rej(err) - } - const [bin, ...spawnArgs] = this.npm.config.get('editor').split(/\s+/) - const editor = cp.spawn(bin, [...spawnArgs, dir], { stdio: 'inherit' }) - editor.on('exit', async (code) => { - if (code) { - return rej(new Error(`editor process exited with code: ${code}`)) - } - try { - await this.npm.exec('rebuild', [dir]) - } catch (execErr) { - rej(execErr) - } - res() - }) - }) - }) - } -} -module.exports = Edit diff --git a/node_modules/npm/lib/commands/exec.js b/node_modules/npm/lib/commands/exec.js deleted file mode 100644 index d532eca..0000000 --- a/node_modules/npm/lib/commands/exec.js +++ /dev/null @@ -1,106 +0,0 @@ -const { resolve } = require('path') -const libexec = require('libnpmexec') -const BaseCommand = require('../base-command.js') - -class Exec extends BaseCommand { - static description = 'Run a command from a local or remote npm package' - static params = [ - 'package', - 'call', - 'workspace', - 'workspaces', - 'include-workspace-root', - ] - - static name = 'exec' - static usage = [ - '-- [@] [args...]', - '--package=[@] -- [args...]', - '-c \' [args...]\'', - '--package=foo -c \' [args...]\'', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - static isShellout = true - - async exec (args) { - return this.callExec(args) - } - - async execWorkspaces (args) { - await this.setWorkspaces() - - for (const [name, path] of this.workspaces) { - const locationMsg = - `in workspace ${this.npm.chalk.green(name)} at location:\n${this.npm.chalk.dim(path)}` - await this.callExec(args, { name, locationMsg, runPath: path }) - } - } - - async callExec (args, { name, locationMsg, runPath } = {}) { - // This is where libnpmexec will look for locally installed packages at the project level - const localPrefix = this.npm.localPrefix - // This is where libnpmexec will look for locally installed packages at the workspace level - let localBin = this.npm.localBin - let path = localPrefix - - // This is where libnpmexec will actually run the scripts from - if (!runPath) { - runPath = process.cwd() - } else { - // We have to consider if the workspace has its own separate versions - // libnpmexec will walk up to localDir after looking here - localBin = resolve(this.npm.localDir, name, 'node_modules', '.bin') - // We also need to look for `bin` entries in the workspace package.json - // libnpmexec will NOT look in the project root for the bin entry - path = runPath - } - - const call = this.npm.config.get('call') - let globalPath - const { - flatOptions, - globalBin, - globalDir, - chalk, - } = this.npm - const output = this.npm.output.bind(this.npm) - const scriptShell = this.npm.config.get('script-shell') || undefined - const packages = this.npm.config.get('package') - const yes = this.npm.config.get('yes') - // --prefix sets both of these to the same thing, meaning the global prefix - // is invalid (i.e. no lib/node_modules). This is not a trivial thing to - // untangle and fix so we work around it here. - if (this.npm.localPrefix !== this.npm.globalPrefix) { - globalPath = resolve(globalDir, '..') - } - - if (call && args.length) { - throw this.usageError() - } - - return libexec({ - ...flatOptions, - // we explicitly set packageLockOnly to false because if it's true - // when we try to install a missing package, we won't actually install it - packageLockOnly: false, - // copy args so they dont get mutated - args: [...args], - call, - chalk, - globalBin, - globalPath, - localBin, - locationMsg, - output, - packages, - path, - runPath, - scriptShell, - yes, - }) - } -} - -module.exports = Exec diff --git a/node_modules/npm/lib/commands/explain.js b/node_modules/npm/lib/commands/explain.js deleted file mode 100644 index 403274d..0000000 --- a/node_modules/npm/lib/commands/explain.js +++ /dev/null @@ -1,128 +0,0 @@ -const { explainNode } = require('../utils/explain-dep.js') -const npa = require('npm-package-arg') -const semver = require('semver') -const { relative, resolve } = require('path') -const validName = require('validate-npm-package-name') -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -class Explain extends ArboristWorkspaceCmd { - static description = 'Explain installed packages' - static name = 'explain' - static usage = [''] - static params = [ - 'json', - 'workspace', - ] - - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - const completion = require('../utils/completion/installed-deep.js') - return completion(npm, opts) - } - - async exec (args) { - if (!args.length) { - throw this.usageError() - } - - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ path: this.npm.prefix, ...this.npm.flatOptions }) - const tree = await arb.loadActual() - - if (this.npm.flatOptions.workspacesEnabled - && this.workspaceNames - && this.workspaceNames.length - ) { - this.filterSet = arb.workspaceDependencySet(tree, this.workspaceNames) - } else if (!this.npm.flatOptions.workspacesEnabled) { - this.filterSet = - arb.excludeWorkspacesDependencySet(tree) - } - - const nodes = new Set() - for (const arg of args) { - for (const node of this.getNodes(tree, arg)) { - const filteredOut = this.filterSet - && this.filterSet.size > 0 - && !this.filterSet.has(node) - if (!filteredOut) { - nodes.add(node) - } - } - } - if (nodes.size === 0) { - throw new Error(`No dependencies found matching ${args.join(', ')}`) - } - - const expls = [] - for (const node of nodes) { - const { extraneous, dev, optional, devOptional, peer, inBundle, overridden } = node - const expl = node.explain() - if (extraneous) { - expl.extraneous = true - } else { - expl.dev = dev - expl.optional = optional - expl.devOptional = devOptional - expl.peer = peer - expl.bundled = inBundle - expl.overridden = overridden - } - expls.push(expl) - } - - if (this.npm.flatOptions.json) { - this.npm.output(JSON.stringify(expls, null, 2)) - } else { - this.npm.output(expls.map(expl => { - return explainNode(expl, Infinity, this.npm.chalk) - }).join('\n\n')) - } - } - - getNodes (tree, arg) { - // if it's just a name, return packages by that name - const { validForOldPackages: valid } = validName(arg) - if (valid) { - return tree.inventory.query('packageName', arg) - } - - // if it's a location, get that node - const maybeLoc = arg.replace(/\\/g, '/').replace(/\/+$/, '') - const nodeByLoc = tree.inventory.get(maybeLoc) - if (nodeByLoc) { - return [nodeByLoc] - } - - // maybe a path to a node_modules folder - const maybePath = relative(this.npm.prefix, resolve(maybeLoc)) - .replace(/\\/g, '/').replace(/\/+$/, '') - const nodeByPath = tree.inventory.get(maybePath) - if (nodeByPath) { - return [nodeByPath] - } - - // otherwise, try to select all matching nodes - try { - return this.getNodesByVersion(tree, arg) - } catch (er) { - return [] - } - } - - getNodesByVersion (tree, arg) { - const spec = npa(arg, this.npm.prefix) - if (spec.type !== 'version' && spec.type !== 'range') { - return [] - } - - return tree.inventory.filter(node => { - return node.package.name === spec.name && - semver.satisfies(node.package.version, spec.rawSpec) - }) - } -} -module.exports = Explain diff --git a/node_modules/npm/lib/commands/explore.js b/node_modules/npm/lib/commands/explore.js deleted file mode 100644 index 7a03ea4..0000000 --- a/node_modules/npm/lib/commands/explore.js +++ /dev/null @@ -1,79 +0,0 @@ -// npm explore [@] -// open a subshell to the package folder. - -const pkgJson = require('@npmcli/package-json') -const runScript = require('@npmcli/run-script') -const { join, relative } = require('path') -const log = require('../utils/log-shim.js') -const completion = require('../utils/completion/installed-shallow.js') -const BaseCommand = require('../base-command.js') - -class Explore extends BaseCommand { - static description = 'Browse an installed package' - static name = 'explore' - static usage = [' [ -- ]'] - static params = ['shell'] - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - return completion(npm, opts) - } - - async exec (args) { - if (args.length < 1 || !args[0]) { - throw this.usageError() - } - - const pkgname = args.shift() - - // detect and prevent any .. shenanigans - const path = join(this.npm.dir, join('/', pkgname)) - if (relative(path, this.npm.dir) === '') { - throw this.usageError() - } - - // run as if running a script named '_explore', which we set to either - // the set of arguments, or the shell config, and let @npmcli/run-script - // handle all the escaping and PATH setup stuff. - - const { content: pkg } = await pkgJson.normalize(path).catch(er => { - log.error('explore', `It doesn't look like ${pkgname} is installed.`) - throw er - }) - - const { shell } = this.npm.flatOptions - pkg.scripts = { - ...(pkg.scripts || {}), - _explore: args.join(' ').trim() || shell, - } - - if (!args.length) { - this.npm.output(`\nExploring ${path}\nType 'exit' or ^D when finished\n`) - } - log.disableProgress() - try { - return await runScript({ - ...this.npm.flatOptions, - pkg, - banner: false, - path, - event: '_explore', - stdio: 'inherit', - }).catch(er => { - process.exitCode = typeof er.code === 'number' && er.code !== 0 ? er.code - : 1 - // if it's not an exit error, or non-interactive, throw it - const isProcExit = er.message === 'command failed' && - (typeof er.code === 'number' || /^SIG/.test(er.signal || '')) - if (args.length || !isProcExit) { - throw er - } - }) - } finally { - log.enableProgress() - } - } -} -module.exports = Explore diff --git a/node_modules/npm/lib/commands/find-dupes.js b/node_modules/npm/lib/commands/find-dupes.js deleted file mode 100644 index 2e06e8b..0000000 --- a/node_modules/npm/lib/commands/find-dupes.js +++ /dev/null @@ -1,27 +0,0 @@ -// dedupe duplicated packages, or find them in the tree -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -class FindDupes extends ArboristWorkspaceCmd { - static description = 'Find duplication in the package tree' - static name = 'find-dupes' - static params = [ - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'strict-peer-deps', - 'package-lock', - 'omit', - 'include', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - ...super.params, - ] - - async exec (args) { - this.npm.config.set('dry-run', true) - return this.npm.exec('dedupe', []) - } -} -module.exports = FindDupes diff --git a/node_modules/npm/lib/commands/fund.js b/node_modules/npm/lib/commands/fund.js deleted file mode 100644 index 2804d36..0000000 --- a/node_modules/npm/lib/commands/fund.js +++ /dev/null @@ -1,225 +0,0 @@ -const archy = require('archy') -const pacote = require('pacote') -const semver = require('semver') -const npa = require('npm-package-arg') -const { depth } = require('treeverse') -const { readTree: getFundingInfo, normalizeFunding, isValidFunding } = require('libnpmfund') - -const openUrl = require('../utils/open-url.js') -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -const getPrintableName = ({ name, version }) => { - const printableVersion = version ? `@${version}` : '' - return `${name}${printableVersion}` -} - -const errCode = (msg, code) => Object.assign(new Error(msg), { code }) - -class Fund extends ArboristWorkspaceCmd { - static description = 'Retrieve funding information' - static name = 'fund' - static params = ['json', 'browser', 'unicode', 'workspace', 'which'] - static usage = ['[]'] - - // XXX: maybe worth making this generic for all commands? - usageMessage (paramsObj = {}) { - let msg = `\`npm ${this.constructor.name}` - const params = Object.entries(paramsObj) - if (params.length) { - msg += ` ${this.constructor.usage}` - } - for (const [key, value] of params) { - msg += ` --${key}=${value}` - } - return `${msg}\`` - } - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - const completion = require('../utils/completion/installed-deep.js') - return completion(npm, opts) - } - - async exec (args) { - const spec = args[0] - - let fundingSourceNumber = this.npm.config.get('which') - if (fundingSourceNumber != null) { - fundingSourceNumber = parseInt(fundingSourceNumber, 10) - if (isNaN(fundingSourceNumber) || fundingSourceNumber < 1) { - throw errCode( - `${this.usageMessage({ which: 'fundingSourceNumber' })} must be given a positive integer`, - 'EFUNDNUMBER' - ) - } - } - - if (this.npm.global) { - throw errCode( - `${this.usageMessage()} does not support global packages`, - 'EFUNDGLOBAL' - ) - } - - const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ ...this.npm.flatOptions, path: where }) - const tree = await arb.loadActual() - - if (spec) { - await this.openFundingUrl({ - path: where, - tree, - spec, - fundingSourceNumber, - }) - return - } - - // TODO: add !workspacesEnabled option handling to libnpmfund - const fundingInfo = getFundingInfo(tree, { - ...this.flatOptions, - Arborist, - workspaces: this.workspaceNames, - }) - - if (this.npm.config.get('json')) { - this.npm.output(this.printJSON(fundingInfo)) - } else { - this.npm.output(this.printHuman(fundingInfo)) - } - } - - printJSON (fundingInfo) { - return JSON.stringify(fundingInfo, null, 2) - } - - printHuman (fundingInfo) { - const unicode = this.npm.config.get('unicode') - const seenUrls = new Map() - - const tree = obj => archy(obj, '', { unicode }) - - const result = depth({ - tree: fundingInfo, - - // composes human readable package name - // and creates a new archy item for readable output - visit: ({ name, version, funding }) => { - const [fundingSource] = [].concat(normalizeFunding(funding)).filter(isValidFunding) - const { url } = fundingSource || {} - const pkgRef = getPrintableName({ name, version }) - let item = { - label: pkgRef, - } - - if (url) { - item.label = tree({ - label: this.npm.chalk.bgBlack.white(url), - nodes: [pkgRef], - }).trim() - - // stacks all packages together under the same item - if (seenUrls.has(url)) { - item = seenUrls.get(url) - item.label += `, ${pkgRef}` - return null - } else { - seenUrls.set(url, item) - } - } - - return item - }, - - // puts child nodes back into returned archy - // output while also filtering out missing items - leave: (item, children) => { - if (item) { - item.nodes = children.filter(Boolean) - } - - return item - }, - - // turns tree-like object return by libnpmfund - // into children to be properly read by treeverse - getChildren: node => - Object.keys(node.dependencies || {}).map(key => ({ - name: key, - ...node.dependencies[key], - })), - }) - - const res = tree(result) - return this.npm.chalk.reset(res) - } - - async openFundingUrl ({ path, tree, spec, fundingSourceNumber }) { - const arg = npa(spec, path) - - const retrievePackageMetadata = () => { - if (arg.type === 'directory') { - if (tree.path === arg.fetchSpec) { - // matches cwd, e.g: npm fund . - return tree.package - } else { - // matches any file path within current arborist inventory - for (const item of tree.inventory.values()) { - if (item.path === arg.fetchSpec) { - return item.package - } - } - } - } else { - // tries to retrieve a package from arborist inventory - // by matching resulted package name from the provided spec - const [item] = [...tree.inventory.query('name', arg.name)] - .filter(i => semver.valid(i.package.version)) - .sort((a, b) => semver.rcompare(a.package.version, b.package.version)) - - if (item) { - return item.package - } - } - } - - const { funding } = - retrievePackageMetadata() || - (await pacote.manifest(arg, this.npm.flatOptions).catch(() => ({}))) - - const validSources = [].concat(normalizeFunding(funding)).filter(isValidFunding) - - if (!validSources.length) { - throw errCode(`No valid funding method available for: ${spec}`, 'ENOFUND') - } - - const fundSource = fundingSourceNumber - ? validSources[fundingSourceNumber - 1] - : validSources.length === 1 ? validSources[0] - : null - - if (fundSource) { - return openUrl(this.npm, ...this.urlMessage(fundSource)) - } - - const ambiguousUrlMsg = [ - ...validSources.map((s, i) => `${i + 1}: ${this.urlMessage(s).reverse().join(': ')}`), - `Run ${this.usageMessage({ which: '1' })}` + - ', for example, to open the first funding URL listed in that package', - ] - if (fundingSourceNumber) { - ambiguousUrlMsg.unshift(`--which=${fundingSourceNumber} is not a valid index`) - } - this.npm.output(ambiguousUrlMsg.join('\n')) - } - - urlMessage (source) { - const { type, url } = source - const typePrefix = type ? `${type} funding` : 'Funding' - const message = `${typePrefix} available at the following URL` - return [url, message] - } -} -module.exports = Fund diff --git a/node_modules/npm/lib/commands/get.js b/node_modules/npm/lib/commands/get.js deleted file mode 100644 index 4bf5d2c..0000000 --- a/node_modules/npm/lib/commands/get.js +++ /dev/null @@ -1,22 +0,0 @@ -const Npm = require('../npm.js') -const BaseCommand = require('../base-command.js') - -class Get extends BaseCommand { - static description = 'Get a value from the npm configuration' - static name = 'get' - static usage = ['[ ...] (See `npm config`)'] - static params = ['long'] - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts) { - const Config = Npm.cmd('config') - return Config.completion(opts) - } - - async exec (args) { - return this.npm.exec('config', ['get'].concat(args)) - } -} -module.exports = Get diff --git a/node_modules/npm/lib/commands/help-search.js b/node_modules/npm/lib/commands/help-search.js deleted file mode 100644 index 273807c..0000000 --- a/node_modules/npm/lib/commands/help-search.js +++ /dev/null @@ -1,194 +0,0 @@ -const { readFile } = require('fs/promises') -const path = require('path') -const { glob } = require('glob') -const BaseCommand = require('../base-command.js') - -const globify = pattern => pattern.split('\\').join('/') - -class HelpSearch extends BaseCommand { - static description = 'Search npm help documentation' - static name = 'help-search' - static usage = [''] - static params = ['long'] - - async exec (args) { - if (!args.length) { - throw this.usageError() - } - - const docPath = path.resolve(this.npm.npmRoot, 'docs/content') - let files = await glob(`${globify(docPath)}/*/*.md`) - // preserve glob@8 behavior - files = files.sort((a, b) => a.localeCompare(b, 'en')) - const data = await this.readFiles(files) - const results = await this.searchFiles(args, data, files) - const formatted = this.formatResults(args, results) - if (!formatted.trim()) { - this.npm.output(`No matches in help for: ${args.join(' ')}\n`) - } else { - this.npm.output(formatted) - } - } - - async readFiles (files) { - const res = {} - await Promise.all(files.map(async file => { - res[file] = (await readFile(file, 'utf8')) - .replace(/^---\n(.*\n)*?---\n/, '').trim() - })) - return res - } - - async searchFiles (args, data, files) { - const results = [] - for (const [file, content] of Object.entries(data)) { - const lowerCase = content.toLowerCase() - // skip if no matches at all - if (!args.some(a => lowerCase.includes(a.toLowerCase()))) { - continue - } - - const lines = content.split(/\n+/) - - // if a line has a search term, then skip it and the next line. - // if the next line has a search term, then skip all 3 - // otherwise, set the line to null. then remove the nulls. - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - const nextLine = lines[i + 1] - let match = false - if (nextLine) { - match = args.some(a => - nextLine.toLowerCase().includes(a.toLowerCase())) - if (match) { - // skip over the next line, and the line after it. - i += 2 - continue - } - } - - match = args.some(a => line.toLowerCase().includes(a.toLowerCase())) - - if (match) { - // skip over the next line - i++ - continue - } - - lines[i] = null - } - - // now squish any string of nulls into a single null - const pruned = lines.reduce((l, r) => { - if (!(r === null && l[l.length - 1] === null)) { - l.push(r) - } - - return l - }, []) - - if (pruned[pruned.length - 1] === null) { - pruned.pop() - } - - if (pruned[0] === null) { - pruned.shift() - } - - // now count how many args were found - const found = {} - let totalHits = 0 - for (const line of pruned) { - for (const arg of args) { - const hit = (line || '').toLowerCase() - .split(arg.toLowerCase()).length - 1 - - if (hit > 0) { - found[arg] = (found[arg] || 0) + hit - totalHits += hit - } - } - } - - const cmd = 'npm help ' + - path.basename(file, '.md').replace(/^npm-/, '') - results.push({ - file, - cmd, - lines: pruned, - found: Object.keys(found), - hits: found, - totalHits, - }) - } - - // sort results by number of results found, then by number of hits - // then by number of matching lines - - // coverage is ignored here because the contents of results are - // nondeterministic due to either glob or readFiles or Object.entries - return results.sort(/* istanbul ignore next */ (a, b) => - a.found.length > b.found.length ? -1 - : a.found.length < b.found.length ? 1 - : a.totalHits > b.totalHits ? -1 - : a.totalHits < b.totalHits ? 1 - : a.lines.length > b.lines.length ? -1 - : a.lines.length < b.lines.length ? 1 - : 0).slice(0, 10) - } - - formatResults (args, results) { - const cols = Math.min(process.stdout.columns || Infinity, 80) + 1 - - const output = results.map(res => { - const out = [res.cmd] - const r = Object.keys(res.hits) - .map(k => `${k}:${res.hits[k]}`) - .sort((a, b) => a > b ? 1 : -1) - .join(' ') - - out.push(' '.repeat((Math.max(1, cols - out.join(' ').length - r.length - 1)))) - out.push(r) - - if (!this.npm.config.get('long')) { - return out.join('') - } - - out.unshift('\n\n') - out.push('\n') - out.push('-'.repeat(cols - 1) + '\n') - res.lines.forEach((line, i) => { - if (line === null || i > 3) { - return - } - - const hilitLine = [] - for (const arg of args) { - const finder = line.toLowerCase().split(arg.toLowerCase()) - let p = 0 - for (const f of finder) { - hilitLine.push(line.slice(p, p + f.length)) - const word = line.slice(p + f.length, p + f.length + arg.length) - const hilit = this.npm.chalk.bgBlack.red(word) - hilitLine.push(hilit) - p += f.length + arg.length - } - } - out.push(hilitLine.join('') + '\n') - }) - - return out.join('') - }).join('\n') - - const finalOut = results.length && !this.npm.config.get('long') - ? 'Top hits for ' + (args.map(JSON.stringify).join(' ')) + '\n' + - '—'.repeat(cols - 1) + '\n' + - output + '\n' + - '—'.repeat(cols - 1) + '\n' + - '(run with -l or --long to see more context)' - : output - - return finalOut.trim() - } -} -module.exports = HelpSearch diff --git a/node_modules/npm/lib/commands/help.js b/node_modules/npm/lib/commands/help.js deleted file mode 100644 index 39c580f..0000000 --- a/node_modules/npm/lib/commands/help.js +++ /dev/null @@ -1,113 +0,0 @@ -const spawn = require('@npmcli/promise-spawn') -const path = require('path') -const openUrl = require('../utils/open-url.js') -const { glob } = require('glob') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const { deref } = require('../utils/cmd-list.js') - -const globify = pattern => pattern.split('\\').join('/') -const BaseCommand = require('../base-command.js') - -// Strips out the number from foo.7 or foo.7. or foo.7.tgz -// We don't currently compress our man pages but if we ever did this would -// seamlessly continue supporting it -const manNumberRegex = /\.(\d+)(\.[^/\\]*)?$/ -// hardcoded names for mansections -// XXX: these are used in the docs workspace and should be exported -// from npm so section names can changed more easily -const manSectionNames = { - 1: 'commands', - 5: 'configuring-npm', - 7: 'using-npm', -} - -class Help extends BaseCommand { - static description = 'Get help on npm' - static name = 'help' - static usage = [' []'] - static params = ['viewer'] - - static async completion (opts, npm) { - if (opts.conf.argv.remain.length > 2) { - return [] - } - const g = path.resolve(npm.npmRoot, 'man/man[0-9]/*.[0-9]') - let files = await glob(globify(g)) - // preserve glob@8 behavior - files = files.sort((a, b) => a.localeCompare(b, 'en')) - - return Object.keys(files.reduce(function (acc, file) { - file = path.basename(file).replace(/\.[0-9]+$/, '') - file = file.replace(/^npm-/, '') - acc[file] = true - return acc - }, { help: true })) - } - - async exec (args) { - // By default we search all of our man subdirectories, but if the user has - // asked for a specific one we limit the search to just there - const manSearch = /^\d+$/.test(args[0]) ? `man${args.shift()}` : 'man*' - - if (!args.length) { - return this.npm.output(this.npm.usage) - } - - // npm help foo bar baz: search topics - if (args.length > 1) { - return this.helpSearch(args) - } - - // `npm help package.json` - const arg = (deref(args[0]) || args[0]).replace('.json', '-json') - - // find either section.n or npm-section.n - const f = globify(path.resolve(this.npm.npmRoot, `man/${manSearch}/?(npm-)${arg}.[0-9]*`)) - - const [man] = await glob(f).then(r => r.sort((a, b) => { - // Because the glob is (subtly) different from manNumberRegex, - // we can't rely on it passing. - const aManNumberMatch = a.match(manNumberRegex)?.[1] || 999 - const bManNumberMatch = b.match(manNumberRegex)?.[1] || 999 - if (aManNumberMatch !== bManNumberMatch) { - return aManNumberMatch - bManNumberMatch - } - return localeCompare(a, b) - })) - - return man ? this.viewMan(man) : this.helpSearch(args) - } - - helpSearch (args) { - return this.npm.exec('help-search', args) - } - - async viewMan (man) { - const viewer = this.npm.config.get('viewer') - - if (viewer === 'browser') { - return openUrl(this.npm, this.htmlMan(man), 'help available at the following URL', true) - } - - let args = ['man', [man]] - if (viewer === 'woman') { - args = ['emacsclient', ['-e', `(woman-find-file '${man}')`]] - } - - return spawn(...args, { stdio: 'inherit' }).catch(err => { - if (err.code) { - throw new Error(`help process exited with code: ${err.code}`) - } else { - throw err - } - }) - } - - // Returns the path to the html version of the man page - htmlMan (man) { - const sect = manSectionNames[man.match(manNumberRegex)[1]] - const f = path.basename(man).replace(manNumberRegex, '') - return 'file:///' + path.resolve(this.npm.npmRoot, `docs/output/${sect}/${f}.html`) - } -} -module.exports = Help diff --git a/node_modules/npm/lib/commands/hook.js b/node_modules/npm/lib/commands/hook.js deleted file mode 100644 index b0f52a8..0000000 --- a/node_modules/npm/lib/commands/hook.js +++ /dev/null @@ -1,125 +0,0 @@ -const hookApi = require('libnpmhook') -const otplease = require('../utils/otplease.js') -const relativeDate = require('tiny-relative-date') -const Table = require('cli-table3') - -const BaseCommand = require('../base-command.js') -class Hook extends BaseCommand { - static description = 'Manage registry hooks' - static name = 'hook' - static params = [ - 'registry', - 'otp', - ] - - static usage = [ - 'add [--type=]', - 'ls [pkg]', - 'rm ', - 'update ', - ] - - async exec (args) { - return otplease(this.npm, { ...this.npm.flatOptions }, (opts) => { - switch (args[0]) { - case 'add': - return this.add(args[1], args[2], args[3], opts) - case 'ls': - return this.ls(args[1], opts) - case 'rm': - return this.rm(args[1], opts) - case 'update': - case 'up': - return this.update(args[1], args[2], args[3], opts) - default: - throw this.usageError() - } - }) - } - - async add (pkg, uri, secret, opts) { - const hook = await hookApi.add(pkg, uri, secret, opts) - if (opts.json) { - this.npm.output(JSON.stringify(hook, null, 2)) - } else if (opts.parseable) { - this.npm.output(Object.keys(hook).join('\t')) - this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) - } else if (!this.npm.silent) { - this.npm.output(`+ ${this.hookName(hook)} ${opts.unicode ? ' ➜ ' : ' -> '} ${hook.endpoint}`) - } - } - - async ls (pkg, opts) { - const hooks = await hookApi.ls({ ...opts, package: pkg }) - if (opts.json) { - this.npm.output(JSON.stringify(hooks, null, 2)) - } else if (opts.parseable) { - this.npm.output(Object.keys(hooks[0]).join('\t')) - hooks.forEach(hook => { - this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) - }) - } else if (!hooks.length) { - this.npm.output("You don't have any hooks configured yet.") - } else if (!this.npm.silent) { - if (hooks.length === 1) { - this.npm.output('You have one hook configured.') - } else { - this.npm.output(`You have ${hooks.length} hooks configured.`) - } - - const table = new Table({ head: ['id', 'target', 'endpoint'] }) - hooks.forEach((hook) => { - table.push([ - { rowSpan: 2, content: hook.id }, - this.hookName(hook), - hook.endpoint, - ]) - if (hook.last_delivery) { - table.push([ - { - colSpan: 1, - content: `triggered ${relativeDate(hook.last_delivery)}`, - }, - hook.response_code, - ]) - } else { - table.push([{ colSpan: 2, content: 'never triggered' }]) - } - }) - this.npm.output(table.toString()) - } - } - - async rm (id, opts) { - const hook = await hookApi.rm(id, opts) - if (opts.json) { - this.npm.output(JSON.stringify(hook, null, 2)) - } else if (opts.parseable) { - this.npm.output(Object.keys(hook).join('\t')) - this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) - } else if (!this.npm.silent) { - this.npm.output(`- ${this.hookName(hook)} ${opts.unicode ? ' ✘ ' : ' X '} ${hook.endpoint}`) - } - } - - async update (id, uri, secret, opts) { - const hook = await hookApi.update(id, uri, secret, opts) - if (opts.json) { - this.npm.output(JSON.stringify(hook, null, 2)) - } else if (opts.parseable) { - this.npm.output(Object.keys(hook).join('\t')) - this.npm.output(Object.keys(hook).map(k => hook[k]).join('\t')) - } else if (!this.npm.silent) { - this.npm.output(`+ ${this.hookName(hook)} ${opts.unicode ? ' ➜ ' : ' -> '} ${hook.endpoint}`) - } - } - - hookName (hook) { - let target = hook.name - if (hook.type === 'owner') { - target = '~' + target - } - return target - } -} -module.exports = Hook diff --git a/node_modules/npm/lib/commands/init.js b/node_modules/npm/lib/commands/init.js deleted file mode 100644 index 030c973..0000000 --- a/node_modules/npm/lib/commands/init.js +++ /dev/null @@ -1,247 +0,0 @@ -const fs = require('fs') -const { relative, resolve } = require('path') -const { mkdir } = require('fs/promises') -const initJson = require('init-package-json') -const npa = require('npm-package-arg') -const libexec = require('libnpmexec') -const mapWorkspaces = require('@npmcli/map-workspaces') -const PackageJson = require('@npmcli/package-json') -const log = require('../utils/log-shim.js') -const updateWorkspaces = require('../workspaces/update-workspaces.js') - -const posixPath = p => p.split('\\').join('/') - -const BaseCommand = require('../base-command.js') - -class Init extends BaseCommand { - static description = 'Create a package.json file' - static params = [ - 'init-author-name', - 'init-author-url', - 'init-license', - 'init-module', - 'init-version', - 'yes', - 'force', - 'scope', - 'workspace', - 'workspaces', - 'workspaces-update', - 'include-workspace-root', - ] - - static name = 'init' - static usage = [ - ' (same as `npx `)', - '<@scope> (same as `npx <@scope>/create`)', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args) { - // npm exec style - if (args.length) { - return await this.execCreate(args) - } - - // no args, uses classic init-package-json boilerplate - await this.template() - } - - async execWorkspaces (args) { - // if the root package is uninitiated, take care of it first - if (this.npm.flatOptions.includeWorkspaceRoot) { - await this.exec(args) - } - - // reads package.json for the top-level folder first, by doing this we - // ensure the command throw if no package.json is found before trying - // to create a workspace package.json file or its folders - const { content: pkg } = await PackageJson.normalize(this.npm.localPrefix).catch(err => { - if (err.code === 'ENOENT') { - log.warn('Missing package.json. Try with `--include-workspace-root`.') - } - throw err - }) - - // these are workspaces that are being created, so we cant use - // this.setWorkspaces() - const filters = this.npm.config.get('workspace') - const wPath = filterArg => resolve(this.npm.localPrefix, filterArg) - - const workspacesPaths = [] - // npm-exec style, runs in the context of each workspace filter - if (args.length) { - for (const filterArg of filters) { - const path = wPath(filterArg) - await mkdir(path, { recursive: true }) - workspacesPaths.push(path) - await this.execCreate(args, path) - await this.setWorkspace(pkg, path) - } - return - } - - // no args, uses classic init-package-json boilerplate - for (const filterArg of filters) { - const path = wPath(filterArg) - await mkdir(path, { recursive: true }) - workspacesPaths.push(path) - await this.template(path) - await this.setWorkspace(pkg, path) - } - - // reify packages once all workspaces have been initialized - await this.update(workspacesPaths) - } - - async execCreate (args, path = process.cwd()) { - const [initerName, ...otherArgs] = args - let packageName = initerName - - // Only a scope, possibly with a version - if (/^@[^/]+$/.test(initerName)) { - const [, scope, version] = initerName.split('@') - packageName = `@${scope}/create` - if (version) { - packageName = `${packageName}@${version}` - } - } else { - const req = npa(initerName) - if (req.type === 'git' && req.hosted) { - const { user, project } = req.hosted - packageName = initerName.replace(`${user}/${project}`, `${user}/create-${project}`) - } else if (req.registry) { - packageName = `${req.name.replace(/^(@[^/]+\/)?/, '$1create-')}@${req.rawSpec}` - } else { - throw Object.assign(new Error( - 'Unrecognized initializer: ' + initerName + - '\nFor more package binary executing power check out `npx`:' + - '\nhttps://docs.npmjs.com/cli/commands/npx' - ), { code: 'EUNSUPPORTED' }) - } - } - - const newArgs = [packageName, ...otherArgs] - const { - flatOptions, - localBin, - globalBin, - chalk, - } = this.npm - const output = this.npm.output.bind(this.npm) - const runPath = path - const scriptShell = this.npm.config.get('script-shell') || undefined - const yes = this.npm.config.get('yes') - - await libexec({ - ...flatOptions, - args: newArgs, - localBin, - globalBin, - output, - chalk, - path, - runPath, - scriptShell, - yes, - }) - } - - async template (path = process.cwd()) { - log.pause() - log.disableProgress() - - const initFile = this.npm.config.get('init-module') - if (!this.npm.config.get('yes') && !this.npm.config.get('force')) { - this.npm.output([ - 'This utility will walk you through creating a package.json file.', - 'It only covers the most common items, and tries to guess sensible defaults.', - '', - 'See `npm help init` for definitive documentation on these fields', - 'and exactly what they do.', - '', - 'Use `npm install ` afterwards to install a package and', - 'save it as a dependency in the package.json file.', - '', - 'Press ^C at any time to quit.', - ].join('\n')) - } - - try { - const data = await initJson(path, initFile, this.npm.config) - log.silly('package data', data) - return data - } catch (er) { - if (er.message === 'canceled') { - log.warn('init', 'canceled') - } else { - throw er - } - } finally { - log.resume() - log.enableProgress() - } - } - - async setWorkspace (pkg, workspacePath) { - const workspaces = await mapWorkspaces({ cwd: this.npm.localPrefix, pkg }) - - // skip setting workspace if current package.json glob already satisfies it - for (const wPath of workspaces.values()) { - if (wPath === workspacePath) { - return - } - } - - // if a create-pkg didn't generate a package.json at the workspace - // folder level, it might not be recognized as a workspace by - // mapWorkspaces, so we're just going to avoid touching the - // top-level package.json - try { - fs.statSync(resolve(workspacePath, 'package.json')) - } catch (err) { - return - } - - const pkgJson = await PackageJson.load(this.npm.localPrefix) - - pkgJson.update({ - workspaces: [ - ...(pkgJson.content.workspaces || []), - posixPath(relative(this.npm.localPrefix, workspacePath)), - ], - }) - - await pkgJson.save() - } - - async update (workspacesPaths) { - // translate workspaces paths into an array containing workspaces names - const workspaces = [] - for (const path of workspacesPaths) { - const { content: { name } } = await PackageJson.normalize(path).catch(() => ({ content: {} })) - - if (name) { - workspaces.push(name) - } - } - - const { - config, - flatOptions, - localPrefix, - } = this.npm - - await updateWorkspaces({ - config, - flatOptions, - localPrefix, - npm: this.npm, - workspaces, - }) - } -} - -module.exports = Init diff --git a/node_modules/npm/lib/commands/install-ci-test.js b/node_modules/npm/lib/commands/install-ci-test.js deleted file mode 100644 index f7a357b..0000000 --- a/node_modules/npm/lib/commands/install-ci-test.js +++ /dev/null @@ -1,15 +0,0 @@ -// npm install-ci-test -// Runs `npm ci` and then runs `npm test` - -const CI = require('./ci.js') - -class InstallCITest extends CI { - static description = 'Install a project with a clean slate and run tests' - static name = 'install-ci-test' - - async exec (args) { - await this.npm.exec('ci', args) - return this.npm.exec('test', []) - } -} -module.exports = InstallCITest diff --git a/node_modules/npm/lib/commands/install-test.js b/node_modules/npm/lib/commands/install-test.js deleted file mode 100644 index 11f22e5..0000000 --- a/node_modules/npm/lib/commands/install-test.js +++ /dev/null @@ -1,15 +0,0 @@ -// npm install-test -// Runs `npm install` and then runs `npm test` - -const Install = require('./install.js') - -class InstallTest extends Install { - static description = 'Install package(s) and run tests' - static name = 'install-test' - - async exec (args) { - await this.npm.exec('install', args) - return this.npm.exec('test', []) - } -} -module.exports = InstallTest diff --git a/node_modules/npm/lib/commands/install.js b/node_modules/npm/lib/commands/install.js deleted file mode 100644 index 6687ec4..0000000 --- a/node_modules/npm/lib/commands/install.js +++ /dev/null @@ -1,178 +0,0 @@ -/* eslint-disable camelcase */ -const fs = require('fs') -const util = require('util') -const readdir = util.promisify(fs.readdir) -const reifyFinish = require('../utils/reify-finish.js') -const log = require('../utils/log-shim.js') -const { resolve, join } = require('path') -const runScript = require('@npmcli/run-script') -const pacote = require('pacote') -const checks = require('npm-install-checks') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Install extends ArboristWorkspaceCmd { - static description = 'Install a package' - static name = 'install' - - // These are in the order they will show up in when running "-h" - // If adding to this list, consider adding also to ci.js - static params = [ - 'save', - 'save-exact', - 'global', - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'omit', - 'include', - 'strict-peer-deps', - 'prefer-dedupe', - 'package-lock', - 'package-lock-only', - 'foreground-scripts', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - 'cpu', - 'os', - ...super.params, - ] - - static usage = ['[ ...]'] - - static async completion (opts) { - const { partialWord } = opts - // install can complete to a folder with a package.json, or any package. - // if it has a slash, then it's gotta be a folder - // if it starts with https?://, then just give up, because it's a url - if (/^https?:\/\//.test(partialWord)) { - // do not complete to URLs - return [] - } - - if (/\//.test(partialWord)) { - // Complete fully to folder if there is exactly one match and it - // is a folder containing a package.json file. If that is not the - // case we return 0 matches, which will trigger the default bash - // complete. - const lastSlashIdx = partialWord.lastIndexOf('/') - const partialName = partialWord.slice(lastSlashIdx + 1) - const partialPath = partialWord.slice(0, lastSlashIdx) || '/' - - const isDirMatch = async sibling => { - if (sibling.slice(0, partialName.length) !== partialName) { - return false - } - - try { - const contents = await readdir(join(partialPath, sibling)) - const result = (contents.indexOf('package.json') !== -1) - return result - } catch (er) { - return false - } - } - - try { - const siblings = await readdir(partialPath) - const matches = [] - for (const sibling of siblings) { - if (await isDirMatch(sibling)) { - matches.push(sibling) - } - } - if (matches.length === 1) { - return [join(partialPath, matches[0])] - } - // no matches - return [] - } catch (er) { - return [] // invalid dir: no matching - } - } - // Note: there used to be registry completion here, - // but it stopped making sense somewhere around - // 50,000 packages on the registry - } - - async exec (args) { - // the /path/to/node_modules/.. - const globalTop = resolve(this.npm.globalDir, '..') - const ignoreScripts = this.npm.config.get('ignore-scripts') - const isGlobalInstall = this.npm.global - const where = isGlobalInstall ? globalTop : this.npm.prefix - const forced = this.npm.config.get('force') - const scriptShell = this.npm.config.get('script-shell') || undefined - - // be very strict about engines when trying to update npm itself - const npmInstall = args.find(arg => arg.startsWith('npm@') || arg === 'npm') - if (isGlobalInstall && npmInstall) { - const npmOptions = this.npm.flatOptions - const npmManifest = await pacote.manifest(npmInstall, npmOptions) - try { - checks.checkEngine(npmManifest, npmManifest.version, process.version) - } catch (e) { - if (forced) { - log.warn( - 'install', - /* eslint-disable-next-line max-len */ - `Forcing global npm install with incompatible version ${npmManifest.version} into node ${process.version}` - ) - } else { - throw e - } - } - } - - // don't try to install the prefix into itself - args = args.filter(a => resolve(a) !== this.npm.prefix) - - // `npm i -g` => "install this package globally" - if (where === globalTop && !args.length) { - args = ['.'] - } - - // throw usage error if trying to install empty package - // name to global space, e.g: `npm i -g ""` - if (where === globalTop && !args.every(Boolean)) { - throw this.usageError() - } - - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - auditLevel: null, - path: where, - add: args, - workspaces: this.workspaceNames, - } - const arb = new Arborist(opts) - await arb.reify(opts) - - if (!args.length && !isGlobalInstall && !ignoreScripts) { - const scripts = [ - 'preinstall', - 'install', - 'postinstall', - 'prepublish', // XXX(npm9) should we remove this finally?? - 'preprepare', - 'prepare', - 'postprepare', - ] - for (const event of scripts) { - await runScript({ - path: where, - args: [], - scriptShell, - stdio: 'inherit', - banner: !this.npm.silent, - event, - }) - } - } - await reifyFinish(this.npm, arb) - } -} -module.exports = Install diff --git a/node_modules/npm/lib/commands/link.js b/node_modules/npm/lib/commands/link.js deleted file mode 100644 index cdc2485..0000000 --- a/node_modules/npm/lib/commands/link.js +++ /dev/null @@ -1,192 +0,0 @@ -const fs = require('fs') -const util = require('util') -const readdir = util.promisify(fs.readdir) -const { resolve } = require('path') - -const npa = require('npm-package-arg') -const pkgJson = require('@npmcli/package-json') -const semver = require('semver') - -const reifyFinish = require('../utils/reify-finish.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Link extends ArboristWorkspaceCmd { - static description = 'Symlink a package folder' - static name = 'link' - static usage = [ - '[]', - ] - - static params = [ - 'save', - 'save-exact', - 'global', - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'strict-peer-deps', - 'package-lock', - 'omit', - 'include', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - ...super.params, - ] - - static async completion (opts, npm) { - const dir = npm.globalDir - const files = await readdir(dir) - return files.filter(f => !/^[._-]/.test(f)) - } - - async exec (args) { - if (this.npm.global) { - throw Object.assign( - new Error( - 'link should never be --global.\n' + - 'Please re-run this command with --local' - ), - { code: 'ELINKGLOBAL' } - ) - } - // install-links is implicitly false when running `npm link` - this.npm.config.set('install-links', false) - - // link with no args: symlink the folder to the global location - // link with package arg: symlink the global to the local - args = args.filter(a => resolve(a) !== this.npm.prefix) - return args.length - ? this.linkInstall(args) - : this.linkPkg() - } - - async linkInstall (args) { - // load current packages from the global space, - // and then add symlinks installs locally - const globalTop = resolve(this.npm.globalDir, '..') - const Arborist = require('@npmcli/arborist') - const globalOpts = { - ...this.npm.flatOptions, - Arborist, - path: globalTop, - global: true, - prune: false, - } - const globalArb = new Arborist(globalOpts) - - // get only current top-level packages from the global space - const globals = await globalArb.loadActual({ - filter: (node, kid) => - !node.isRoot || args.some(a => npa(a).name === kid), - }) - - // any extra arg that is missing from the current - // global space should be reified there first - const missing = this.missingArgsFromTree(globals, args) - if (missing.length) { - await globalArb.reify({ - ...globalOpts, - add: missing, - }) - } - - // get a list of module names that should be linked in the local prefix - const names = [] - for (const a of args) { - const arg = npa(a) - if (arg.type === 'directory') { - const { content } = await pkgJson.normalize(arg.fetchSpec) - names.push(content.name) - } else { - names.push(arg.name) - } - } - - // npm link should not save=true by default unless you're - // using any of --save-dev or other types - const save = - Boolean( - (this.npm.config.find('save') !== 'default' && - this.npm.config.get('save')) || - this.npm.config.get('save-optional') || - this.npm.config.get('save-peer') || - this.npm.config.get('save-dev') || - this.npm.config.get('save-prod') - ) - // create a new arborist instance for the local prefix and - // reify all the pending names as symlinks there - const localArb = new Arborist({ - ...this.npm.flatOptions, - prune: false, - path: this.npm.prefix, - save, - }) - await localArb.reify({ - ...this.npm.flatOptions, - prune: false, - path: this.npm.prefix, - add: names.map(l => `file:${resolve(globalTop, 'node_modules', l).replace(/#/g, '%23')}`), - save, - workspaces: this.workspaceNames, - }) - - await reifyFinish(this.npm, localArb) - } - - async linkPkg () { - const wsp = this.workspacePaths - const paths = wsp && wsp.length ? wsp : [this.npm.prefix] - const add = paths.map(path => `file:${path.replace(/#/g, '%23')}`) - const globalTop = resolve(this.npm.globalDir, '..') - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ - ...this.npm.flatOptions, - Arborist, - path: globalTop, - global: true, - }) - await arb.reify({ - add, - }) - await reifyFinish(this.npm, arb) - } - - // Returns a list of items that can't be fulfilled by - // things found in the current arborist inventory - missingArgsFromTree (tree, args) { - if (tree.isLink) { - return this.missingArgsFromTree(tree.target, args) - } - - const foundNodes = [] - const missing = args.filter(a => { - const arg = npa(a) - const nodes = tree.children.values() - const argFound = [...nodes].every(node => { - // TODO: write tests for unmatching version specs, this is hard to test - // atm but should be simple once we have a mocked registry again - if (arg.name !== node.name /* istanbul ignore next */ || ( - arg.version && - /* istanbul ignore next */ - !semver.satisfies(node.version, arg.version) - )) { - foundNodes.push(node) - return true - } - }) - return argFound - }) - - // remote nodes from the loaded tree in order - // to avoid dropping them later when reifying - for (const node of foundNodes) { - node.parent = null - } - - return missing - } -} -module.exports = Link diff --git a/node_modules/npm/lib/commands/ll.js b/node_modules/npm/lib/commands/ll.js deleted file mode 100644 index 99a144f..0000000 --- a/node_modules/npm/lib/commands/ll.js +++ /dev/null @@ -1,13 +0,0 @@ -const LS = require('./ls.js') - -class LL extends LS { - static name = 'll' - static usage = ['[[<@scope>/] ...]'] - - async exec (args) { - this.npm.config.set('long', true) - return super.exec(args) - } -} - -module.exports = LL diff --git a/node_modules/npm/lib/commands/login.js b/node_modules/npm/lib/commands/login.js deleted file mode 100644 index dc4ed8a..0000000 --- a/node_modules/npm/lib/commands/login.js +++ /dev/null @@ -1,51 +0,0 @@ -const log = require('../utils/log-shim.js') -const replaceInfo = require('../utils/replace-info.js') -const auth = require('../utils/auth.js') - -const BaseCommand = require('../base-command.js') - -class Login extends BaseCommand { - static description = 'Login to a registry user account' - static name = 'login' - static params = [ - 'registry', - 'scope', - 'auth-type', - ] - - async exec (args) { - const scope = this.npm.config.get('scope') - let registry = this.npm.config.get('registry') - - if (scope) { - const scopedRegistry = this.npm.config.get(`${scope}:registry`) - const cliRegistry = this.npm.config.get('registry', 'cli') - if (scopedRegistry && !cliRegistry) { - registry = scopedRegistry - } - } - - const creds = this.npm.config.getCredentialsByURI(registry) - - log.disableProgress() - log.notice('', `Log in on ${replaceInfo(registry)}`) - - const { message, newCreds } = await auth.login(this.npm, { - ...this.npm.flatOptions, - creds, - registry, - }) - - this.npm.config.delete('_token', 'user') // prevent legacy pollution - this.npm.config.setCredentialsByURI(registry, newCreds) - - if (scope) { - this.npm.config.set(scope + ':registry', registry, 'user') - } - - await this.npm.config.save('user') - - this.npm.output(message) - } -} -module.exports = Login diff --git a/node_modules/npm/lib/commands/logout.js b/node_modules/npm/lib/commands/logout.js deleted file mode 100644 index 6655809..0000000 --- a/node_modules/npm/lib/commands/logout.js +++ /dev/null @@ -1,49 +0,0 @@ -const npmFetch = require('npm-registry-fetch') -const { getAuth } = npmFetch -const log = require('../utils/log-shim') -const BaseCommand = require('../base-command.js') - -class Logout extends BaseCommand { - static description = 'Log out of the registry' - static name = 'logout' - static params = [ - 'registry', - 'scope', - ] - - async exec (args) { - const registry = this.npm.config.get('registry') - const scope = this.npm.config.get('scope') - const regRef = scope ? `${scope}:registry` : 'registry' - const reg = this.npm.config.get(regRef) || registry - - const auth = getAuth(reg, this.npm.flatOptions) - - const level = this.npm.config.find(`${auth.regKey}:${auth.authKey}`) - - // find the config level and only delete from there - if (auth.token) { - log.verbose('logout', `clearing token for ${reg}`) - await npmFetch(`/-/user/token/${encodeURIComponent(auth.token)}`, { - ...this.npm.flatOptions, - registry: reg, - method: 'DELETE', - ignoreBody: true, - }) - } else if (auth.isBasicAuth) { - log.verbose('logout', `clearing user credentials for ${reg}`) - } else { - const msg = `not logged in to ${reg}, so can't log out!` - throw Object.assign(new Error(msg), { code: 'ENEEDAUTH' }) - } - - if (scope) { - this.npm.config.delete(regRef, level) - } - - this.npm.config.clearCredentialsByURI(reg, level) - - await this.npm.config.save(level) - } -} -module.exports = Logout diff --git a/node_modules/npm/lib/commands/ls.js b/node_modules/npm/lib/commands/ls.js deleted file mode 100644 index 3f9775c..0000000 --- a/node_modules/npm/lib/commands/ls.js +++ /dev/null @@ -1,573 +0,0 @@ -const { resolve, relative, sep } = require('path') -const relativePrefix = `.${sep}` -const { EOL } = require('os') - -const archy = require('archy') -const { breadth } = require('treeverse') -const npa = require('npm-package-arg') - -const _depth = Symbol('depth') -const _dedupe = Symbol('dedupe') -const _filteredBy = Symbol('filteredBy') -const _include = Symbol('include') -const _invalid = Symbol('invalid') -const _name = Symbol('name') -const _missing = Symbol('missing') -const _parent = Symbol('parent') -const _problems = Symbol('problems') -const _required = Symbol('required') -const _type = Symbol('type') -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -const localeCompare = require('@isaacs/string-locale-compare')('en') - -class LS extends ArboristWorkspaceCmd { - static description = 'List installed packages' - static name = 'ls' - static usage = [''] - static params = [ - 'all', - 'json', - 'long', - 'parseable', - 'global', - 'depth', - 'omit', - 'include', - 'link', - 'package-lock-only', - 'unicode', - ...super.params, - ] - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - const completion = require('../utils/completion/installed-deep.js') - return completion(npm, opts) - } - - async exec (args) { - const all = this.npm.config.get('all') - const chalk = this.npm.chalk - const depth = this.npm.config.get('depth') - const global = this.npm.global - const json = this.npm.config.get('json') - const link = this.npm.config.get('link') - const long = this.npm.config.get('long') - const omit = this.npm.flatOptions.omit - const parseable = this.npm.config.get('parseable') - const unicode = this.npm.config.get('unicode') - const packageLockOnly = this.npm.config.get('package-lock-only') - const workspacesEnabled = this.npm.flatOptions.workspacesEnabled - - const path = global ? resolve(this.npm.globalDir, '..') : this.npm.prefix - - const Arborist = require('@npmcli/arborist') - - const arb = new Arborist({ - global, - ...this.npm.flatOptions, - legacyPeerDeps: false, - path, - }) - const tree = await this.initTree({ arb, args, packageLockOnly }) - - // filters by workspaces nodes when using -w - // We only have to filter the first layer of edges, so we don't - // explore anything that isn't part of the selected workspace set. - let wsNodes - if (this.workspaceNames && this.workspaceNames.length) { - wsNodes = arb.workspaceNodes(tree, this.workspaceNames) - } - const filterBySelectedWorkspaces = edge => { - if (!workspacesEnabled - && edge.from.isProjectRoot - && edge.to.isWorkspace - ) { - return false - } - - if (!wsNodes || !wsNodes.length) { - return true - } - - if (this.npm.flatOptions.includeWorkspaceRoot - && edge.to && !edge.to.isWorkspace) { - return true - } - - if (edge.from.isProjectRoot) { - return (edge.to - && edge.to.isWorkspace - && wsNodes.includes(edge.to.target)) - } - - return true - } - - const seenItems = new Set() - const seenNodes = new Map() - const problems = new Set() - - // defines special handling of printed depth when filtering with args - const filterDefaultDepth = depth === null ? Infinity : depth - const depthToPrint = (all || args.length) - ? filterDefaultDepth - : (depth || 0) - - // add root node of tree to list of seenNodes - seenNodes.set(tree.path, tree) - - // tree traversal happens here, using treeverse.breadth - const result = await breadth({ - tree, - // recursive method, `node` is going to be the current elem (starting from - // the `tree` obj) that was just visited in the `visit` method below - // `nodeResult` is going to be the returned `item` from `visit` - getChildren (node, nodeResult) { - const seenPaths = new Set() - const workspace = node.isWorkspace - const currentDepth = workspace ? 0 : node[_depth] - const shouldSkipChildren = - !(node instanceof Arborist.Node) || (currentDepth > depthToPrint) - return (shouldSkipChildren) - ? [] - : [...(node.target).edgesOut.values()] - .filter(filterBySelectedWorkspaces) - .filter(currentDepth === 0 ? filterByEdgesTypes({ - link, - omit, - }) : () => true) - .map(mapEdgesToNodes({ seenPaths })) - .concat(appendExtraneousChildren({ node, seenPaths })) - .sort(sortAlphabetically) - .map(augmentNodesWithMetadata({ - args, - currentDepth, - nodeResult, - seenNodes, - })) - }, - // visit each `node` of the `tree`, returning an `item` - these are - // the elements that will be used to build the final output - visit (node) { - node[_problems] = getProblems(node, { global }) - - const item = json - ? getJsonOutputItem(node, { global, long }) - : parseable - ? null - : getHumanOutputItem(node, { args, chalk, global, long }) - - // loop through list of node problems to add them to global list - if (node[_include]) { - for (const problem of node[_problems]) { - problems.add(problem) - } - } - - seenItems.add(item) - - // return a promise so we don't blow the stack - return Promise.resolve(item) - }, - }) - - // handle the special case of a broken package.json in the root folder - const [rootError] = tree.errors.filter(e => - e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json')) - - this.npm.outputBuffer( - json ? jsonOutput({ path, problems, result, rootError, seenItems }) : - parseable ? parseableOutput({ seenNodes, global, long }) : - humanOutput({ chalk, result, seenItems, unicode }) - ) - - // if filtering items, should exit with error code on no results - if (result && !result[_include] && args.length) { - process.exitCode = 1 - } - - if (rootError) { - throw Object.assign( - new Error('Failed to parse root package.json'), - { code: 'EJSONPARSE' } - ) - } - - const shouldThrow = problems.size && - ![...problems].every(problem => problem.startsWith('extraneous:')) - - if (shouldThrow) { - throw Object.assign( - new Error([...problems].join(EOL)), - { code: 'ELSPROBLEMS' } - ) - } - } - - async initTree ({ arb, args, packageLockOnly }) { - const tree = await ( - packageLockOnly - ? arb.loadVirtual() - : arb.loadActual() - ) - - tree[_include] = args.length === 0 - tree[_depth] = 0 - - return tree - } -} -module.exports = LS - -const isGitNode = (node) => { - if (!node.resolved) { - return - } - - try { - const { type } = npa(node.resolved) - return type === 'git' || type === 'hosted' - } catch (err) { - return false - } -} - -const isOptional = (node) => - node[_type] === 'optional' || node[_type] === 'peerOptional' - -const isExtraneous = (node, { global }) => - node.extraneous && !global - -const getProblems = (node, { global }) => { - const problems = new Set() - - if (node[_missing] && !isOptional(node)) { - problems.add(`missing: ${node.pkgid}, required by ${node[_missing]}`) - } - - if (node[_invalid]) { - problems.add(`invalid: ${node.pkgid} ${node.path}`) - } - - if (isExtraneous(node, { global })) { - problems.add(`extraneous: ${node.pkgid} ${node.path}`) - } - - return problems -} - -// annotates _parent and _include metadata into the resulting -// item obj allowing for filtering out results during output -const augmentItemWithIncludeMetadata = (node, item) => { - item[_parent] = node[_parent] - item[_include] = node[_include] - - // append current item to its parent.nodes which is the - // structure expected by archy in order to print tree - if (node[_include]) { - // includes all ancestors of included node - let p = node[_parent] - while (p) { - p[_include] = true - p = p[_parent] - } - } - - return item -} - -const getHumanOutputItem = (node, { args, chalk, global, long }) => { - const { pkgid, path } = node - const workspacePkgId = chalk.green(pkgid) - let printable = node.isWorkspace ? workspacePkgId : pkgid - - // special formatting for top-level package name - if (node.isRoot) { - const hasNoPackageJson = !Object.keys(node.package).length - if (hasNoPackageJson || global) { - printable = path - } else { - printable += `${long ? EOL : ' '}${path}` - } - } - - const highlightDepName = args.length && node[_filteredBy] - const missingColor = isOptional(node) - ? chalk.yellow.bgBlack - : chalk.red.bgBlack - const missingMsg = `UNMET ${isOptional(node) ? 'OPTIONAL ' : ''}DEPENDENCY` - const targetLocation = node.root - ? relative(node.root.realpath, node.realpath) - : node.targetLocation - const invalid = node[_invalid] - ? `invalid: ${node[_invalid]}` - : '' - const label = - ( - node[_missing] - ? missingColor(missingMsg) + ' ' - : '' - ) + - `${highlightDepName ? chalk.yellow.bgBlack(printable) : printable}` + - ( - node[_dedupe] - ? ' ' + chalk.gray('deduped') - : '' - ) + - ( - invalid - ? ' ' + chalk.red.bgBlack(invalid) - : '' - ) + - ( - isExtraneous(node, { global }) - ? ' ' + chalk.green.bgBlack('extraneous') - : '' - ) + - ( - node.overridden - ? ' ' + chalk.gray('overridden') - : '' - ) + - (isGitNode(node) ? ` (${node.resolved})` : '') + - (node.isLink ? ` -> ${relativePrefix}${targetLocation}` : '') + - (long ? `${EOL}${node.package.description || ''}` : '') - - return augmentItemWithIncludeMetadata(node, { label, nodes: [] }) -} - -const getJsonOutputItem = (node, { global, long }) => { - const item = {} - - if (node.version) { - item.version = node.version - } - - if (node.resolved) { - item.resolved = node.resolved - } - - // if the node is the project root, do not add the overridden flag. the project root can't be - // overridden anyway, and if we add the flag it causes undesirable behavior when `npm ls --json` - // is ran in an empty directory since we end up printing an object with only an overridden prop - if (!node.isProjectRoot) { - item.overridden = node.overridden - } - - item[_name] = node.name - - // special formatting for top-level package name - const hasPackageJson = - node && node.package && Object.keys(node.package).length - if (node.isRoot && hasPackageJson) { - item.name = node.package.name || node.name - } - - if (long && !node[_missing]) { - item.name = item[_name] - const { dependencies, ...packageInfo } = node.package - Object.assign(item, packageInfo) - item.extraneous = false - item.path = node.path - item._dependencies = { - ...node.package.dependencies, - ...node.package.optionalDependencies, - } - item.devDependencies = node.package.devDependencies || {} - item.peerDependencies = node.package.peerDependencies || {} - } - - // augment json output items with extra metadata - if (isExtraneous(node, { global })) { - item.extraneous = true - } - - if (node[_invalid]) { - item.invalid = node[_invalid] - } - - if (node[_missing] && !isOptional(node)) { - item.required = node[_required] - item.missing = true - } - if (node[_include] && node[_problems] && node[_problems].size) { - item.problems = [...node[_problems]] - } - - return augmentItemWithIncludeMetadata(node, item) -} - -const filterByEdgesTypes = ({ link, omit }) => (edge) => { - for (const omitType of omit) { - if (edge[omitType]) { - return false - } - } - return link ? edge.to && edge.to.isLink : true -} - -const appendExtraneousChildren = ({ node, seenPaths }) => - // extraneous children are not represented - // in edges out, so here we add them to the list: - [...node.children.values()] - .filter(i => !seenPaths.has(i.path) && i.extraneous) - -const mapEdgesToNodes = ({ seenPaths }) => (edge) => { - let node = edge.to - - // if the edge is linking to a missing node, we go ahead - // and create a new obj that will represent the missing node - if (edge.missing || (edge.optional && !node)) { - const { name, spec } = edge - const pkgid = `${name}@${spec}` - node = { name, pkgid, [_missing]: edge.from.pkgid } - } - - // keeps track of a set of seen paths to avoid the edge case in which a tree - // item would appear twice given that it's a children of an extraneous item, - // so it's marked extraneous but it will ALSO show up in edgesOuts of - // its parent so it ends up as two diff nodes if we don't track it - if (node.path) { - seenPaths.add(node.path) - } - - node[_required] = edge.spec || '*' - node[_type] = edge.type - - if (edge.invalid) { - const spec = JSON.stringify(node[_required]) - const from = edge.from.location || 'the root project' - node[_invalid] = (node[_invalid] ? node[_invalid] + ', ' : '') + - (`${spec} from ${from}`) - } - - return node -} - -const filterByPositionalArgs = (args, { node }) => - args.length > 0 ? args.some( - (spec) => (node.satisfies && node.satisfies(spec)) - ) : true - -const augmentNodesWithMetadata = ({ - args, - currentDepth, - nodeResult, - seenNodes, -}) => (node) => { - // if the original edge was a deduped dep, treeverse will fail to - // revisit that node in tree traversal logic, so we make it so that - // we have a diff obj for deduped nodes: - if (seenNodes.has(node.path)) { - const { realpath, root } = node - const targetLocation = root ? relative(root.realpath, realpath) - : node.targetLocation - node = { - name: node.name, - version: node.version, - pkgid: node.pkgid, - package: node.package, - path: node.path, - isLink: node.isLink, - realpath: node.realpath, - targetLocation, - [_type]: node[_type], - [_invalid]: node[_invalid], - [_missing]: node[_missing], - // if it's missing, it's not deduped, it's just missing - [_dedupe]: !node[_missing], - } - } else { - // keeps track of already seen nodes in order to check for dedupes - seenNodes.set(node.path, node) - } - - // _parent is going to be a ref to a treeverse-visited node (returned from - // getHumanOutputItem, getJsonOutputItem, etc) so that we have an easy - // shortcut to place new nodes in their right place during tree traversal - node[_parent] = nodeResult - // _include is the property that allow us to filter based on position args - // e.g: `npm ls foo`, `npm ls simple-output@2` - // _filteredBy is used to apply extra color info to the item that - // was used in args in order to filter - node[_filteredBy] = node[_include] = - filterByPositionalArgs(args, { node: seenNodes.get(node.path) }) - // _depth keeps track of how many levels deep tree traversal currently is - // so that we can `npm ls --depth=1` - node[_depth] = currentDepth + 1 - - return node -} - -const sortAlphabetically = ({ pkgid: a }, { pkgid: b }) => localeCompare(a, b) - -const humanOutput = ({ chalk, result, seenItems, unicode }) => { - // we need to traverse the entire tree in order to determine which items - // should be included (since a nested transitive included dep will make it - // so that all its ancestors should be displayed) - // here is where we put items in their expected place for archy output - for (const item of seenItems) { - if (item[_include] && item[_parent]) { - item[_parent].nodes.push(item) - } - } - - if (!result.nodes.length) { - result.nodes = ['(empty)'] - } - - const archyOutput = archy(result, '', { unicode }) - return chalk.reset(archyOutput) -} - -const jsonOutput = ({ path, problems, result, rootError, seenItems }) => { - if (problems.size) { - result.problems = [...problems] - } - - if (rootError) { - result.problems = [ - ...(result.problems || []), - ...[`error in ${path}: Failed to parse root package.json`], - ] - result.invalid = true - } - - // we need to traverse the entire tree in order to determine which items - // should be included (since a nested transitive included dep will make it - // so that all its ancestors should be displayed) - // here is where we put items in their expected place for json output - for (const item of seenItems) { - // append current item to its parent item.dependencies obj in order - // to provide a json object structure that represents the installed tree - if (item[_include] && item[_parent]) { - if (!item[_parent].dependencies) { - item[_parent].dependencies = {} - } - - item[_parent].dependencies[item[_name]] = item - } - } - - return JSON.stringify(result, null, 2) -} - -const parseableOutput = ({ global, long, seenNodes }) => { - let out = '' - for (const node of seenNodes.values()) { - if (node.path && node[_include]) { - out += node.path - if (long) { - out += `:${node.pkgid}` - out += node.path !== node.realpath ? `:${node.realpath}` : '' - out += isExtraneous(node, { global }) ? ':EXTRANEOUS' : '' - out += node[_invalid] ? ':INVALID' : '' - out += node.overridden ? ':OVERRIDDEN' : '' - } - out += EOL - } - } - return out.trim() -} diff --git a/node_modules/npm/lib/commands/org.js b/node_modules/npm/lib/commands/org.js deleted file mode 100644 index 1f32d41..0000000 --- a/node_modules/npm/lib/commands/org.js +++ /dev/null @@ -1,155 +0,0 @@ -const liborg = require('libnpmorg') -const otplease = require('../utils/otplease.js') -const Table = require('cli-table3') -const BaseCommand = require('../base-command.js') - -class Org extends BaseCommand { - static description = 'Manage orgs' - static name = 'org' - static usage = [ - 'set orgname username [developer | admin | owner]', - 'rm orgname username', - 'ls orgname []', - ] - - static params = ['registry', 'otp', 'json', 'parseable'] - - static async completion (opts) { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - return ['set', 'rm', 'ls'] - } - - switch (argv[2]) { - case 'ls': - case 'add': - case 'rm': - case 'set': - return [] - default: - throw new Error(argv[2] + ' not recognized') - } - } - - async exec ([cmd, orgname, username, role]) { - return otplease(this.npm, { - ...this.npm.flatOptions, - }, opts => { - switch (cmd) { - case 'add': - case 'set': - return this.set(orgname, username, role, opts) - case 'rm': - return this.rm(orgname, username, opts) - case 'ls': - return this.ls(orgname, username, opts) - default: - throw this.usageError() - } - }) - } - - async set (org, user, role, opts) { - role = role || 'developer' - if (!org) { - throw new Error('First argument `orgname` is required.') - } - - if (!user) { - throw new Error('Second argument `username` is required.') - } - - if (!['owner', 'admin', 'developer'].find(x => x === role)) { - throw new Error( - /* eslint-disable-next-line max-len */ - 'Third argument `role` must be one of `owner`, `admin`, or `developer`, with `developer` being the default value if omitted.' - ) - } - - const memDeets = await liborg.set(org, user, role, opts) - if (opts.json) { - this.npm.output(JSON.stringify(memDeets, null, 2)) - } else if (opts.parseable) { - this.npm.output(['org', 'orgsize', 'user', 'role'].join('\t')) - this.npm.output( - [memDeets.org.name, memDeets.org.size, memDeets.user, memDeets.role].join('\t') - ) - } else if (!this.npm.silent) { - this.npm.output( - `Added ${memDeets.user} as ${memDeets.role} to ${memDeets.org.name}. You now have ${ - memDeets.org.size - } member${memDeets.org.size === 1 ? '' : 's'} in this org.` - ) - } - - return memDeets - } - - async rm (org, user, opts) { - if (!org) { - throw new Error('First argument `orgname` is required.') - } - - if (!user) { - throw new Error('Second argument `username` is required.') - } - - await liborg.rm(org, user, opts) - const roster = await liborg.ls(org, opts) - user = user.replace(/^[~@]?/, '') - org = org.replace(/^[~@]?/, '') - const userCount = Object.keys(roster).length - if (opts.json) { - this.npm.output( - JSON.stringify({ - user, - org, - userCount, - deleted: true, - }) - ) - } else if (opts.parseable) { - this.npm.output(['user', 'org', 'userCount', 'deleted'].join('\t')) - this.npm.output([user, org, userCount, true].join('\t')) - } else if (!this.npm.silent) { - this.npm.output( - `Successfully removed ${user} from ${org}. You now have ${userCount} member${ - userCount === 1 ? '' : 's' - } in this org.` - ) - } - } - - async ls (org, user, opts) { - if (!org) { - throw new Error('First argument `orgname` is required.') - } - - let roster = await liborg.ls(org, opts) - if (user) { - const newRoster = {} - if (roster[user]) { - newRoster[user] = roster[user] - } - - roster = newRoster - } - if (opts.json) { - this.npm.output(JSON.stringify(roster, null, 2)) - } else if (opts.parseable) { - this.npm.output(['user', 'role'].join('\t')) - Object.keys(roster).forEach(u => { - this.npm.output([u, roster[u]].join('\t')) - }) - } else if (!this.npm.silent) { - const table = new Table({ head: ['user', 'role'] }) - Object.keys(roster) - .sort() - .forEach(u => { - table.push([u, roster[u]]) - }) - this.npm.output(table.toString()) - } - } -} -module.exports = Org diff --git a/node_modules/npm/lib/commands/outdated.js b/node_modules/npm/lib/commands/outdated.js deleted file mode 100644 index 9b9283e..0000000 --- a/node_modules/npm/lib/commands/outdated.js +++ /dev/null @@ -1,369 +0,0 @@ -const os = require('os') -const { resolve } = require('path') -const pacote = require('pacote') -const table = require('text-table') -const npa = require('npm-package-arg') -const pickManifest = require('npm-pick-manifest') -const localeCompare = require('@isaacs/string-locale-compare')('en') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') - -class Outdated extends ArboristWorkspaceCmd { - static description = 'Check for outdated packages' - static name = 'outdated' - static usage = ['[ ...]'] - static params = [ - 'all', - 'json', - 'long', - 'parseable', - 'global', - 'workspace', - ] - - async exec (args) { - const { default: stripAnsi } = await import('strip-ansi') - const global = resolve(this.npm.globalDir, '..') - const where = this.npm.global - ? global - : this.npm.prefix - - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ - ...this.npm.flatOptions, - path: where, - }) - - this.edges = new Set() - this.list = [] - this.tree = await arb.loadActual() - - if (this.workspaceNames && this.workspaceNames.length) { - this.filterSet = - arb.workspaceDependencySet( - this.tree, - this.workspaceNames, - this.npm.flatOptions.includeWorkspaceRoot - ) - } else if (!this.npm.flatOptions.workspacesEnabled) { - this.filterSet = - arb.excludeWorkspacesDependencySet(this.tree) - } - - if (args.length !== 0) { - // specific deps - for (let i = 0; i < args.length; i++) { - const nodes = this.tree.inventory.query('name', args[i]) - this.getEdges(nodes, 'edgesIn') - } - } else { - if (this.npm.config.get('all')) { - // all deps in tree - const nodes = this.tree.inventory.values() - this.getEdges(nodes, 'edgesOut') - } - // top-level deps - this.getEdges() - } - - await Promise.all(Array.from(this.edges).map((edge) => { - return this.getOutdatedInfo(edge) - })) - - // sorts list alphabetically - const outdated = this.list.sort((a, b) => localeCompare(a.name, b.name)) - - if (outdated.length > 0) { - process.exitCode = 1 - } - - // return if no outdated packages - if (outdated.length === 0 && !this.npm.config.get('json')) { - return - } - - // display results - if (this.npm.config.get('json')) { - this.npm.output(this.makeJSON(outdated)) - } else if (this.npm.config.get('parseable')) { - this.npm.output(this.makeParseable(outdated)) - } else { - const outList = outdated.map(x => this.makePretty(x)) - const outHead = ['Package', - 'Current', - 'Wanted', - 'Latest', - 'Location', - 'Depended by', - ] - - if (this.npm.config.get('long')) { - outHead.push('Package Type', 'Homepage') - } - const outTable = [outHead].concat(outList) - - outTable[0] = outTable[0].map(heading => this.npm.chalk.underline(heading)) - - const tableOpts = { - align: ['l', 'r', 'r', 'r', 'l'], - stringLength: s => stripAnsi(s).length, - } - this.npm.output(table(outTable, tableOpts)) - } - } - - getEdges (nodes, type) { - // when no nodes are provided then it should only read direct deps - // from the root node and its workspaces direct dependencies - if (!nodes) { - this.getEdgesOut(this.tree) - this.getWorkspacesEdges() - return - } - - for (const node of nodes) { - type === 'edgesOut' - ? this.getEdgesOut(node) - : this.getEdgesIn(node) - } - } - - getEdgesIn (node) { - for (const edge of node.edgesIn) { - this.trackEdge(edge) - } - } - - getEdgesOut (node) { - // TODO: normalize usage of edges and avoid looping through nodes here - if (this.npm.global) { - for (const child of node.children.values()) { - this.trackEdge(child) - } - } else { - for (const edge of node.edgesOut.values()) { - this.trackEdge(edge) - } - } - } - - trackEdge (edge) { - const filteredOut = - edge.from - && this.filterSet - && this.filterSet.size > 0 - && !this.filterSet.has(edge.from.target) - - if (filteredOut) { - return - } - - this.edges.add(edge) - } - - getWorkspacesEdges (node) { - if (this.npm.global) { - return - } - - for (const edge of this.tree.edgesOut.values()) { - const workspace = edge - && edge.to - && edge.to.target - && edge.to.target.isWorkspace - - if (workspace) { - this.getEdgesOut(edge.to.target) - } - } - } - - async getPackument (spec) { - const packument = await pacote.packument(spec, { - ...this.npm.flatOptions, - fullMetadata: this.npm.config.get('long'), - preferOnline: true, - }) - return packument - } - - async getOutdatedInfo (edge) { - let alias = false - try { - alias = npa(edge.spec).subSpec - } catch (err) { - // ignore errors, no alias - } - const spec = npa(alias ? alias.name : edge.name) - const node = edge.to || edge - const { path, location } = node - const { version: current } = node.package || {} - - const type = edge.optional ? 'optionalDependencies' - : edge.peer ? 'peerDependencies' - : edge.dev ? 'devDependencies' - : 'dependencies' - - for (const omitType of this.npm.flatOptions.omit) { - if (node[omitType]) { - return - } - } - - // deps different from prod not currently - // on disk are not included in the output - if (edge.error === 'MISSING' && type !== 'dependencies') { - return - } - - try { - const packument = await this.getPackument(spec) - const expected = alias ? alias.fetchSpec : edge.spec - // if it's not a range, version, or tag, skip it - try { - if (!npa(`${edge.name}@${edge.spec}`).registry) { - return null - } - } catch (err) { - return null - } - const wanted = pickManifest(packument, expected, this.npm.flatOptions) - const latest = pickManifest(packument, '*', this.npm.flatOptions) - - if ( - !current || - current !== wanted.version || - wanted.version !== latest.version - ) { - const dependent = edge.from ? - this.maybeWorkspaceName(edge.from) - : 'global' - - this.list.push({ - name: alias ? edge.spec.replace('npm', edge.name) : edge.name, - path, - type, - current, - location, - wanted: wanted.version, - latest: latest.version, - dependent, - homepage: packument.homepage, - }) - } - } catch (err) { - // silently catch and ignore ETARGET, E403 & - // E404 errors, deps are just skipped - if (!( - err.code === 'ETARGET' || - err.code === 'E403' || - err.code === 'E404') - ) { - throw err - } - } - } - - maybeWorkspaceName (node) { - if (!node.isWorkspace) { - return node.name - } - - const humanOutput = - !this.npm.config.get('json') && !this.npm.config.get('parseable') - - const workspaceName = - humanOutput - ? node.pkgid - : node.name - - return humanOutput - ? this.npm.chalk.green(workspaceName) - : workspaceName - } - - // formatting functions - makePretty (dep) { - const { - current = 'MISSING', - location = '-', - homepage = '', - name, - wanted, - latest, - type, - dependent, - } = dep - - const columns = [name, current, wanted, latest, location, dependent] - - if (this.npm.config.get('long')) { - columns[6] = type - columns[7] = homepage - } - - columns[0] = this.npm.chalk[current === wanted ? 'yellow' : 'red'](columns[0]) // current - columns[2] = this.npm.chalk.green(columns[2]) // wanted - columns[3] = this.npm.chalk.magenta(columns[3]) // latest - - return columns - } - - // --parseable creates output like this: - // :::: - makeParseable (list) { - return list.map(dep => { - const { - name, - current, - wanted, - latest, - path, - dependent, - type, - homepage, - } = dep - const out = [ - path, - name + '@' + wanted, - current ? (name + '@' + current) : 'MISSING', - name + '@' + latest, - dependent, - ] - if (this.npm.config.get('long')) { - out.push(type, homepage) - } - - return out.join(':') - }).join(os.EOL) - } - - makeJSON (list) { - const out = {} - list.forEach(dep => { - const { - name, - current, - wanted, - latest, - path, - type, - dependent, - homepage, - } = dep - out[name] = { - current, - wanted, - latest, - dependent, - location: path, - } - if (this.npm.config.get('long')) { - out[name].type = type - out[name].homepage = homepage - } - }) - return JSON.stringify(out, null, 2) - } -} -module.exports = Outdated diff --git a/node_modules/npm/lib/commands/owner.js b/node_modules/npm/lib/commands/owner.js deleted file mode 100644 index 5b54dd4..0000000 --- a/node_modules/npm/lib/commands/owner.js +++ /dev/null @@ -1,232 +0,0 @@ -const npa = require('npm-package-arg') -const npmFetch = require('npm-registry-fetch') -const pacote = require('pacote') -const log = require('../utils/log-shim') -const otplease = require('../utils/otplease.js') -const pkgJson = require('@npmcli/package-json') -const BaseCommand = require('../base-command.js') - -const readJson = async (path) => { - try { - const { content } = await pkgJson.normalize(path) - return content - } catch { - return {} - } -} - -class Owner extends BaseCommand { - static description = 'Manage package owners' - static name = 'owner' - static params = [ - 'registry', - 'otp', - 'workspace', - 'workspaces', - ] - - static usage = [ - 'add ', - 'rm ', - 'ls ', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - static async completion (opts, npm) { - const argv = opts.conf.argv.remain - if (argv.length > 3) { - return [] - } - - if (argv[1] !== 'owner') { - argv.unshift('owner') - } - - if (argv.length === 2) { - return ['add', 'rm', 'ls'] - } - - // reaches registry in order to autocomplete rm - if (argv[2] === 'rm') { - if (npm.global) { - return [] - } - const { name } = await readJson(npm.prefix) - if (!name) { - return [] - } - - const spec = npa(name) - const data = await pacote.packument(spec, { - ...npm.flatOptions, - fullMetadata: true, - }) - if (data && data.maintainers && data.maintainers.length) { - return data.maintainers.map(m => m.name) - } - } - return [] - } - - async exec ([action, ...args]) { - if (action === 'ls' || action === 'list') { - await this.ls(args[0]) - } else if (action === 'add') { - await this.changeOwners(args[0], args[1], 'add') - } else if (action === 'rm' || action === 'remove') { - await this.changeOwners(args[0], args[1], 'rm') - } else { - throw this.usageError() - } - } - - async execWorkspaces ([action, ...args]) { - await this.setWorkspaces() - // ls pkg or owner add/rm package - if ((action === 'ls' && args.length > 0) || args.length > 1) { - const implicitWorkspaces = this.npm.config.get('workspace', 'default') - if (implicitWorkspaces.length === 0) { - log.warn(`Ignoring specified workspace(s)`) - } - return this.exec([action, ...args]) - } - - for (const [name] of this.workspaces) { - if (action === 'ls' || action === 'list') { - await this.ls(name) - } else if (action === 'add') { - await this.changeOwners(args[0], name, 'add') - } else if (action === 'rm' || action === 'remove') { - await this.changeOwners(args[0], name, 'rm') - } else { - throw this.usageError() - } - } - } - - async ls (pkg) { - pkg = await this.getPkg(this.npm.prefix, pkg) - const spec = npa(pkg) - - try { - const packumentOpts = { ...this.npm.flatOptions, fullMetadata: true, preferOnline: true } - const { maintainers } = await pacote.packument(spec, packumentOpts) - if (!maintainers || !maintainers.length) { - this.npm.output('no admin found') - } else { - this.npm.output(maintainers.map(m => `${m.name} <${m.email}>`).join('\n')) - } - } catch (err) { - log.error('owner ls', "Couldn't get owner data", npmFetch.cleanUrl(pkg)) - throw err - } - } - - async getPkg (prefix, pkg) { - if (!pkg) { - if (this.npm.global) { - throw this.usageError() - } - const { name } = await readJson(prefix) - if (!name) { - throw this.usageError() - } - - return name - } - return pkg - } - - async changeOwners (user, pkg, addOrRm) { - if (!user) { - throw this.usageError() - } - - pkg = await this.getPkg(this.npm.prefix, pkg) - log.verbose(`owner ${addOrRm}`, '%s to %s', user, pkg) - - const spec = npa(pkg) - const uri = `/-/user/org.couchdb.user:${encodeURIComponent(user)}` - let u - - try { - u = await npmFetch.json(uri, this.npm.flatOptions) - } catch (err) { - log.error('owner mutate', `Error getting user data for ${user}`) - throw err - } - - // normalize user data - u = { name: u.name, email: u.email } - - const data = await pacote.packument(spec, { - ...this.npm.flatOptions, - fullMetadata: true, - preferOnline: true, - }) - - const owners = data.maintainers || [] - let maintainers - if (addOrRm === 'add') { - const existing = owners.find(o => o.name === u.name) - if (existing) { - log.info( - 'owner add', - `Already a package owner: ${existing.name} <${existing.email}>` - ) - return - } - maintainers = [ - ...owners, - u, - ] - } else { - maintainers = owners.filter(o => o.name !== u.name) - - if (maintainers.length === owners.length) { - log.info('owner rm', 'Not a package owner: ' + u.name) - return false - } - - if (!maintainers.length) { - throw Object.assign( - new Error( - 'Cannot remove all owners of a package. Add someone else first.' - ), - { code: 'EOWNERRM' } - ) - } - } - - const dataPath = `/${spec.escapedName}/-rev/${encodeURIComponent(data._rev)}` - try { - const res = await otplease(this.npm, this.npm.flatOptions, opts => { - return npmFetch.json(dataPath, { - ...opts, - method: 'PUT', - body: { - _id: data._id, - _rev: data._rev, - maintainers, - }, - spec, - }) - }) - if (addOrRm === 'add') { - this.npm.output(`+ ${user} (${spec.name})`) - } else { - this.npm.output(`- ${user} (${spec.name})`) - } - return res - } catch (err) { - throw Object.assign( - new Error('Failed to update package: ' + JSON.stringify(err.message)), - { code: 'EOWNERMUTATE' } - ) - } - } -} - -module.exports = Owner diff --git a/node_modules/npm/lib/commands/pack.js b/node_modules/npm/lib/commands/pack.js deleted file mode 100644 index 74e80e5..0000000 --- a/node_modules/npm/lib/commands/pack.js +++ /dev/null @@ -1,83 +0,0 @@ -const pacote = require('pacote') -const libpack = require('libnpmpack') -const npa = require('npm-package-arg') -const log = require('../utils/log-shim') -const { getContents, logTar } = require('../utils/tar.js') -const BaseCommand = require('../base-command.js') - -class Pack extends BaseCommand { - static description = 'Create a tarball from a package' - static name = 'pack' - static params = [ - 'dry-run', - 'json', - 'pack-destination', - 'workspace', - 'workspaces', - 'include-workspace-root', - ] - - static usage = [''] - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args) { - if (args.length === 0) { - args = ['.'] - } - - const unicode = this.npm.config.get('unicode') - const json = this.npm.config.get('json') - - // Get the manifests and filenames first so we can bail early on manifest - // errors before making any tarballs - const manifests = [] - for (const arg of args) { - const spec = npa(arg) - const manifest = await pacote.manifest(spec, this.npm.flatOptions) - if (!manifest._id) { - throw new Error('Invalid package, must have name and version') - } - manifests.push({ arg, manifest }) - } - - // Load tarball names up for printing afterward to isolate from the - // noise generated during packing - const tarballs = [] - for (const { arg, manifest } of manifests) { - const tarballData = await libpack(arg, { - ...this.npm.flatOptions, - prefix: this.npm.localPrefix, - workspaces: this.workspacePaths, - }) - const pkgContents = await getContents(manifest, tarballData) - tarballs.push(pkgContents) - } - - if (json) { - this.npm.output(JSON.stringify(tarballs, null, 2)) - return - } - - for (const tar of tarballs) { - logTar(tar, { unicode }) - this.npm.output(tar.filename.replace(/^@/, '').replace(/\//, '-')) - } - } - - async execWorkspaces (args) { - // If they either ask for nothing, or explicitly include '.' in the args, - // we effectively translate that into each workspace requested - - const useWorkspaces = args.length === 0 || args.includes('.') - - if (!useWorkspaces) { - log.warn('Ignoring workspaces for specified package(s)') - return this.exec(args) - } - - await this.setWorkspaces() - return this.exec([...this.workspacePaths, ...args.filter(a => a !== '.')]) - } -} -module.exports = Pack diff --git a/node_modules/npm/lib/commands/ping.js b/node_modules/npm/lib/commands/ping.js deleted file mode 100644 index c79e6a9..0000000 --- a/node_modules/npm/lib/commands/ping.js +++ /dev/null @@ -1,29 +0,0 @@ -const { cleanUrl } = require('npm-registry-fetch') -const log = require('../utils/log-shim') -const pingUtil = require('../utils/ping.js') -const BaseCommand = require('../base-command.js') - -class Ping extends BaseCommand { - static description = 'Ping npm registry' - static params = ['registry'] - static name = 'ping' - - async exec (args) { - const cleanRegistry = cleanUrl(this.npm.config.get('registry')) - log.notice('PING', cleanRegistry) - const start = Date.now() - const details = await pingUtil({ ...this.npm.flatOptions }) - const time = Date.now() - start - log.notice('PONG', `${time}ms`) - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify({ - registry: cleanRegistry, - time, - details, - }, null, 2)) - } else if (Object.keys(details).length) { - log.notice('PONG', `${JSON.stringify(details, null, 2)}`) - } - } -} -module.exports = Ping diff --git a/node_modules/npm/lib/commands/pkg.js b/node_modules/npm/lib/commands/pkg.js deleted file mode 100644 index 49a6682..0000000 --- a/node_modules/npm/lib/commands/pkg.js +++ /dev/null @@ -1,148 +0,0 @@ -const PackageJson = require('@npmcli/package-json') -const BaseCommand = require('../base-command.js') -const Queryable = require('../utils/queryable.js') - -class Pkg extends BaseCommand { - static description = 'Manages your package.json' - static name = 'pkg' - static usage = [ - 'set = [= ...]', - 'get [ [ ...]]', - 'delete [ ...]', - 'set [[].= ...]', - 'set [[].= ...]', - 'fix', - ] - - static params = [ - 'force', - 'json', - 'workspace', - 'workspaces', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args, { prefix } = {}) { - if (!prefix) { - this.prefix = this.npm.localPrefix - } else { - this.prefix = prefix - } - - if (this.npm.global) { - throw Object.assign( - new Error(`There's no package.json file to manage on global mode`), - { code: 'EPKGGLOBAL' } - ) - } - - const [cmd, ..._args] = args - switch (cmd) { - case 'get': - return this.get(_args) - case 'set': - return this.set(_args) - case 'delete': - return this.delete(_args) - case 'fix': - return this.fix(_args) - default: - throw this.usageError() - } - } - - async execWorkspaces (args) { - await this.setWorkspaces() - const result = {} - for (const [workspaceName, workspacePath] of this.workspaces.entries()) { - this.prefix = workspacePath - result[workspaceName] = await this.exec(args, { prefix: workspacePath }) - } - // when running in workspaces names, make sure to key by workspace - // name the results of each value retrieved in each ws - this.npm.output(JSON.stringify(result, null, 2)) - } - - async get (args) { - const pkgJson = await PackageJson.load(this.prefix) - - const { content } = pkgJson - let result = !args.length && content - - if (!result) { - const q = new Queryable(content) - result = q.query(args) - - // in case there's only a single result from the query - // just prints that one element to stdout - if (Object.keys(result).length === 1) { - result = result[args] - } - } - - // only outputs if not running with workspaces config - // execWorkspaces will handle the output otherwise - if (!this.workspaces) { - this.npm.output(JSON.stringify(result, null, 2)) - } - - return result - } - - async set (args) { - const setError = () => - this.usageError('npm pkg set expects a key=value pair of args.') - - if (!args.length) { - throw setError() - } - - const force = this.npm.config.get('force') - const json = this.npm.config.get('json') - const pkgJson = await PackageJson.load(this.prefix) - const q = new Queryable(pkgJson.content) - for (const arg of args) { - const [key, ...rest] = arg.split('=') - const value = rest.join('=') - if (!key || !value) { - throw setError() - } - - q.set(key, json ? JSON.parse(value) : value, { force }) - } - - pkgJson.update(q.toJSON()) - await pkgJson.save() - } - - async delete (args) { - const setError = () => - this.usageError('npm pkg delete expects key args.') - - if (!args.length) { - throw setError() - } - - const pkgJson = await PackageJson.load(this.prefix) - const q = new Queryable(pkgJson.content) - for (const key of args) { - if (!key) { - throw setError() - } - - q.delete(key) - } - - pkgJson.update(q.toJSON()) - await pkgJson.save() - } - - async fix () { - const pkgJson = await PackageJson.fix(this.prefix) - await pkgJson.save() - } -} - -module.exports = Pkg diff --git a/node_modules/npm/lib/commands/prefix.js b/node_modules/npm/lib/commands/prefix.js deleted file mode 100644 index 264b819..0000000 --- a/node_modules/npm/lib/commands/prefix.js +++ /dev/null @@ -1,13 +0,0 @@ -const BaseCommand = require('../base-command.js') - -class Prefix extends BaseCommand { - static description = 'Display prefix' - static name = 'prefix' - static params = ['global'] - static usage = ['[-g]'] - - async exec (args) { - return this.npm.output(this.npm.prefix) - } -} -module.exports = Prefix diff --git a/node_modules/npm/lib/commands/profile.js b/node_modules/npm/lib/commands/profile.js deleted file mode 100644 index a7d4ac2..0000000 --- a/node_modules/npm/lib/commands/profile.js +++ /dev/null @@ -1,407 +0,0 @@ -const inspect = require('util').inspect -const { URL } = require('url') -const log = require('../utils/log-shim.js') -const npmProfile = require('npm-profile') -const qrcodeTerminal = require('qrcode-terminal') -const Table = require('cli-table3') - -const otplease = require('../utils/otplease.js') -const pulseTillDone = require('../utils/pulse-till-done.js') -const readUserInfo = require('../utils/read-user-info.js') - -const qrcode = url => - new Promise((resolve) => qrcodeTerminal.generate(url, resolve)) - -const knownProfileKeys = [ - 'name', - 'email', - 'two-factor auth', - 'fullname', - 'homepage', - 'freenode', - 'twitter', - 'github', - 'created', - 'updated', -] - -const writableProfileKeys = [ - 'email', - 'password', - 'fullname', - 'homepage', - 'freenode', - 'twitter', - 'github', -] - -const BaseCommand = require('../base-command.js') -class Profile extends BaseCommand { - static description = 'Change settings on your registry profile' - static name = 'profile' - static usage = [ - 'enable-2fa [auth-only|auth-and-writes]', - 'disable-2fa', - 'get []', - 'set ', - ] - - static params = [ - 'registry', - 'json', - 'parseable', - 'otp', - ] - - static async completion (opts) { - var argv = opts.conf.argv.remain - - if (!argv[2]) { - return ['enable-2fa', 'disable-2fa', 'get', 'set'] - } - - switch (argv[2]) { - case 'enable-2fa': - case 'enable-tfa': - return ['auth-and-writes', 'auth-only'] - - case 'disable-2fa': - case 'disable-tfa': - case 'get': - case 'set': - return [] - default: - throw new Error(argv[2] + ' not recognized') - } - } - - async exec (args) { - if (args.length === 0) { - throw this.usageError() - } - - log.gauge.show('profile') - - const [subcmd, ...opts] = args - - switch (subcmd) { - case 'enable-2fa': - case 'enable-tfa': - case 'enable2fa': - case 'enabletfa': - return this.enable2fa(opts) - case 'disable-2fa': - case 'disable-tfa': - case 'disable2fa': - case 'disabletfa': - return this.disable2fa() - case 'get': - return this.get(opts) - case 'set': - return this.set(opts) - default: - throw new Error('Unknown profile command: ' + subcmd) - } - } - - async get (args) { - const tfa = 'two-factor auth' - const info = await pulseTillDone.withPromise( - npmProfile.get({ ...this.npm.flatOptions }) - ) - - if (!info.cidr_whitelist) { - delete info.cidr_whitelist - } - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify(info, null, 2)) - return - } - - // clean up and format key/values for output - const cleaned = {} - for (const key of knownProfileKeys) { - cleaned[key] = info[key] || '' - } - - const unknownProfileKeys = Object.keys(info).filter((k) => !(k in cleaned)) - for (const key of unknownProfileKeys) { - cleaned[key] = info[key] || '' - } - - delete cleaned.tfa - delete cleaned.email_verified - cleaned.email += info.email_verified ? ' (verified)' : '(unverified)' - - if (info.tfa && !info.tfa.pending) { - cleaned[tfa] = info.tfa.mode - } else { - cleaned[tfa] = 'disabled' - } - - if (args.length) { - const values = args // comma or space separated - .join(',') - .split(/,/) - .filter((arg) => arg.trim() !== '') - .map((arg) => cleaned[arg]) - .join('\t') - this.npm.output(values) - } else { - if (this.npm.config.get('parseable')) { - for (const key of Object.keys(info)) { - if (key === 'tfa') { - this.npm.output(`${key}\t${cleaned[tfa]}`) - } else { - this.npm.output(`${key}\t${info[key]}`) - } - } - } else { - const table = new Table() - for (const key of Object.keys(cleaned)) { - table.push({ [this.npm.chalk.bold(key)]: cleaned[key] }) - } - - this.npm.output(table.toString()) - } - } - } - - async set (args) { - const conf = { ...this.npm.flatOptions } - const prop = (args[0] || '').toLowerCase().trim() - - let value = args.length > 1 ? args.slice(1).join(' ') : null - - const readPasswords = async () => { - const newpassword = await readUserInfo.password('New password: ') - const confirmedpassword = await readUserInfo.password(' Again: ') - - if (newpassword !== confirmedpassword) { - log.warn('profile', 'Passwords do not match, please try again.') - return readPasswords() - } - - return newpassword - } - - if (prop !== 'password' && value === null) { - throw new Error('npm profile set ') - } - - if (prop === 'password' && value !== null) { - throw new Error( - 'npm profile set password\n' + - 'Do not include your current or new passwords on the command line.') - } - - if (writableProfileKeys.indexOf(prop) === -1) { - throw new Error(`"${prop}" is not a property we can set. ` + - `Valid properties are: ` + writableProfileKeys.join(', ')) - } - - if (prop === 'password') { - const current = await readUserInfo.password('Current password: ') - const newpassword = await readPasswords() - - value = { old: current, new: newpassword } - } - - // FIXME: Work around to not clear everything other than what we're setting - const user = await pulseTillDone.withPromise(npmProfile.get(conf)) - const newUser = {} - - for (const key of writableProfileKeys) { - newUser[key] = user[key] - } - - newUser[prop] = value - - const result = await otplease(this.npm, conf, c => npmProfile.set(newUser, c)) - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify({ [prop]: result[prop] }, null, 2)) - } else if (this.npm.config.get('parseable')) { - this.npm.output(prop + '\t' + result[prop]) - } else if (result[prop] != null) { - this.npm.output('Set', prop, 'to', result[prop]) - } else { - this.npm.output('Set', prop) - } - } - - async enable2fa (args) { - if (args.length > 1) { - throw new Error('npm profile enable-2fa [auth-and-writes|auth-only]') - } - - const mode = args[0] || 'auth-and-writes' - if (mode !== 'auth-only' && mode !== 'auth-and-writes') { - throw new Error( - `Invalid two-factor authentication mode "${mode}".\n` + - 'Valid modes are:\n' + - ' auth-only - Require two-factor authentication only when logging in\n' + - ' auth-and-writes - Require two-factor authentication when logging in ' + - 'AND when publishing' - ) - } - - if (this.npm.config.get('json') || this.npm.config.get('parseable')) { - throw new Error( - 'Enabling two-factor authentication is an interactive operation and ' + - (this.npm.config.get('json') ? 'JSON' : 'parseable') + ' output mode is not available' - ) - } - - const info = { - tfa: { - mode: mode, - }, - } - - // if they're using legacy auth currently then we have to - // update them to a bearer token before continuing. - const creds = this.npm.config.getCredentialsByURI(this.npm.config.get('registry')) - const auth = {} - - if (creds.token) { - auth.token = creds.token - } else if (creds.username) { - auth.basic = { username: creds.username, password: creds.password } - } else if (creds.auth) { - const basic = Buffer.from(creds.auth, 'base64').toString().split(':', 2) - auth.basic = { username: basic[0], password: basic[1] } - } - - if (!auth.basic && !auth.token) { - throw new Error( - 'You need to be logged in to registry ' + - `${this.npm.config.get('registry')} in order to enable 2fa` - ) - } - - if (auth.basic) { - log.info('profile', 'Updating authentication to bearer token') - const result = await npmProfile.createToken( - auth.basic.password, false, [], { ...this.npm.flatOptions } - ) - - if (!result.token) { - throw new Error( - `Your registry ${this.npm.config.get('registry')} does not seem to ` + - 'support bearer tokens. Bearer tokens are required for ' + - 'two-factor authentication' - ) - } - - this.npm.config.setCredentialsByURI( - this.npm.config.get('registry'), - { token: result.token } - ) - await this.npm.config.save('user') - } - - log.notice('profile', 'Enabling two factor authentication for ' + mode) - const password = await readUserInfo.password() - info.tfa.password = password - - log.info('profile', 'Determine if tfa is pending') - const userInfo = await pulseTillDone.withPromise( - npmProfile.get({ ...this.npm.flatOptions }) - ) - - const conf = { ...this.npm.flatOptions } - if (userInfo && userInfo.tfa && userInfo.tfa.pending) { - log.info('profile', 'Resetting two-factor authentication') - await pulseTillDone.withPromise( - npmProfile.set({ tfa: { password, mode: 'disable' } }, conf) - ) - } else if (userInfo && userInfo.tfa) { - if (!conf.otp) { - conf.otp = await readUserInfo.otp( - 'Enter one-time password: ' - ) - } - } - - log.info('profile', 'Setting two-factor authentication to ' + mode) - const challenge = await pulseTillDone.withPromise( - npmProfile.set(info, conf) - ) - - if (challenge.tfa === null) { - this.npm.output('Two factor authentication mode changed to: ' + mode) - return - } - - const badResponse = typeof challenge.tfa !== 'string' - || !/^otpauth:[/][/]/.test(challenge.tfa) - if (badResponse) { - throw new Error( - 'Unknown error enabling two-factor authentication. Expected otpauth URL' + - ', got: ' + inspect(challenge.tfa) - ) - } - - const otpauth = new URL(challenge.tfa) - const secret = otpauth.searchParams.get('secret') - const code = await qrcode(challenge.tfa) - - this.npm.output( - 'Scan into your authenticator app:\n' + code + '\n Or enter code:', secret - ) - - const interactiveOTP = - await readUserInfo.otp('And an OTP code from your authenticator: ') - - log.info('profile', 'Finalizing two-factor authentication') - - const result = await npmProfile.set({ tfa: [interactiveOTP] }, conf) - - this.npm.output( - '2FA successfully enabled. Below are your recovery codes, ' + - 'please print these out.' - ) - this.npm.output( - 'You will need these to recover access to your account ' + - 'if you lose your authentication device.' - ) - - for (const tfaCode of result.tfa) { - this.npm.output('\t' + tfaCode) - } - } - - async disable2fa (args) { - const conf = { ...this.npm.flatOptions } - const info = await pulseTillDone.withPromise(npmProfile.get(conf)) - - if (!info.tfa || info.tfa.pending) { - this.npm.output('Two factor authentication not enabled.') - return - } - - const password = await readUserInfo.password() - - if (!conf.otp) { - const msg = 'Enter one-time password: ' - conf.otp = await readUserInfo.otp(msg) - } - - log.info('profile', 'disabling tfa') - - await pulseTillDone.withPromise(npmProfile.set({ - tfa: { password: password, mode: 'disable' }, - }, conf)) - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify({ tfa: false }, null, 2)) - } else if (this.npm.config.get('parseable')) { - this.npm.output('tfa\tfalse') - } else { - this.npm.output('Two factor authentication disabled.') - } - } -} -module.exports = Profile diff --git a/node_modules/npm/lib/commands/prune.js b/node_modules/npm/lib/commands/prune.js deleted file mode 100644 index 189fc29..0000000 --- a/node_modules/npm/lib/commands/prune.js +++ /dev/null @@ -1,33 +0,0 @@ -// prune extraneous packages -const reifyFinish = require('../utils/reify-finish.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Prune extends ArboristWorkspaceCmd { - static description = 'Remove extraneous packages' - static name = 'prune' - static params = [ - 'omit', - 'include', - 'dry-run', - 'json', - 'foreground-scripts', - 'ignore-scripts', - ...super.params, - ] - - static usage = ['[[<@scope>/]...]'] - - async exec () { - const where = this.npm.prefix - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: where, - workspaces: this.workspaceNames, - } - const arb = new Arborist(opts) - await arb.prune(opts) - await reifyFinish(this.npm, arb) - } -} -module.exports = Prune diff --git a/node_modules/npm/lib/commands/publish.js b/node_modules/npm/lib/commands/publish.js deleted file mode 100644 index 7b3e930..0000000 --- a/node_modules/npm/lib/commands/publish.js +++ /dev/null @@ -1,225 +0,0 @@ -const log = require('../utils/log-shim.js') -const semver = require('semver') -const pack = require('libnpmpack') -const libpub = require('libnpmpublish').publish -const runScript = require('@npmcli/run-script') -const pacote = require('pacote') -const npa = require('npm-package-arg') -const npmFetch = require('npm-registry-fetch') -const replaceInfo = require('../utils/replace-info.js') - -const otplease = require('../utils/otplease.js') -const { getContents, logTar } = require('../utils/tar.js') - -// for historical reasons, publishConfig in package.json can contain ANY config -// keys that npm supports in .npmrc files and elsewhere. We *may* want to -// revisit this at some point, and have a minimal set that's a SemVer-major -// change that ought to get a RFC written on it. -const { flatten } = require('@npmcli/config/lib/definitions') -const pkgJson = require('@npmcli/package-json') - -const BaseCommand = require('../base-command.js') -class Publish extends BaseCommand { - static description = 'Publish a package' - static name = 'publish' - static params = [ - 'tag', - 'access', - 'dry-run', - 'otp', - 'workspace', - 'workspaces', - 'include-workspace-root', - 'provenance', - ] - - static usage = [''] - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args) { - if (args.length === 0) { - args = ['.'] - } - if (args.length !== 1) { - throw this.usageError() - } - - log.verbose('publish', replaceInfo(args)) - - const unicode = this.npm.config.get('unicode') - const dryRun = this.npm.config.get('dry-run') - const json = this.npm.config.get('json') - const defaultTag = this.npm.config.get('tag') - const ignoreScripts = this.npm.config.get('ignore-scripts') - const { silent } = this.npm - - if (semver.validRange(defaultTag)) { - throw new Error('Tag name must not be a valid SemVer range: ' + defaultTag.trim()) - } - - const opts = { ...this.npm.flatOptions, progress: false } - log.disableProgress() - - // you can publish name@version, ./foo.tgz, etc. - // even though the default is the 'file:.' cwd. - const spec = npa(args[0]) - let manifest = await this.getManifest(spec, opts) - - // only run scripts for directory type publishes - if (spec.type === 'directory' && !ignoreScripts) { - await runScript({ - event: 'prepublishOnly', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: !silent, - }) - } - - // we pass dryRun: true to libnpmpack so it doesn't write the file to disk - const tarballData = await pack(spec, { - ...opts, - dryRun: true, - prefix: this.npm.localPrefix, - workspaces: this.workspacePaths, - }) - const pkgContents = await getContents(manifest, tarballData) - - // The purpose of re-reading the manifest is in case it changed, - // so that we send the latest and greatest thing to the registry - // note that publishConfig might have changed as well! - manifest = await this.getManifest(spec, opts, true) - - // JSON already has the package contents - if (!json) { - logTar(pkgContents, { unicode }) - } - - const resolved = npa.resolve(manifest.name, manifest.version) - const registry = npmFetch.pickRegistry(resolved, opts) - const creds = this.npm.config.getCredentialsByURI(registry) - const noCreds = !(creds.token || creds.username || creds.certfile && creds.keyfile) - const outputRegistry = replaceInfo(registry) - - if (noCreds) { - const msg = `This command requires you to be logged in to ${outputRegistry}` - if (dryRun) { - log.warn('', `${msg} (dry-run)`) - } else { - throw Object.assign(new Error(msg), { code: 'ENEEDAUTH' }) - } - } - - const access = opts.access === null ? 'default' : opts.access - let msg = `Publishing to ${outputRegistry} with tag ${defaultTag} and ${access} access` - if (dryRun) { - msg = `${msg} (dry-run)` - } - - log.notice('', msg) - - if (!dryRun) { - await otplease(this.npm, opts, o => libpub(manifest, tarballData, o)) - } - - if (spec.type === 'directory' && !ignoreScripts) { - await runScript({ - event: 'publish', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: !silent, - }) - - await runScript({ - event: 'postpublish', - path: spec.fetchSpec, - stdio: 'inherit', - pkg: manifest, - banner: !silent, - }) - } - - if (!this.suppressOutput) { - if (!silent && json) { - this.npm.output(JSON.stringify(pkgContents, null, 2)) - } else if (!silent) { - this.npm.output(`+ ${pkgContents.id}`) - } - } - - return pkgContents - } - - async execWorkspaces (args) { - // Suppresses JSON output in publish() so we can handle it here - this.suppressOutput = true - - const results = {} - const json = this.npm.config.get('json') - const { silent } = this.npm - await this.setWorkspaces() - - for (const [name, workspace] of this.workspaces.entries()) { - let pkgContents - try { - pkgContents = await this.exec([workspace]) - } catch (err) { - if (err.code === 'EPRIVATE') { - log.warn( - 'publish', - `Skipping workspace ${ - this.npm.chalk.green(name) - }, marked as ${ - this.npm.chalk.bold('private') - }` - ) - continue - } - throw err - } - // This needs to be in-line w/ the rest of the output that non-JSON - // publish generates - if (!silent && !json) { - this.npm.output(`+ ${pkgContents.id}`) - } else { - results[name] = pkgContents - } - } - - if (!silent && json) { - this.npm.output(JSON.stringify(results, null, 2)) - } - } - - // if it's a directory, read it from the file system - // otherwise, get the full metadata from whatever it is - // XXX can't pacote read the manifest from a directory? - async getManifest (spec, opts, logWarnings = false) { - let manifest - if (spec.type === 'directory') { - const changes = [] - const pkg = await pkgJson.fix(spec.fetchSpec, { changes }) - if (changes.length && logWarnings) { - /* eslint-disable-next-line max-len */ - log.warn('publish', 'npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.') - log.warn('publish', `errors corrected:\n${changes.join('\n')}`) - } - // Prepare is the special function for publishing, different than normalize - const { content } = await pkg.prepare() - manifest = content - } else { - manifest = await pacote.manifest(spec, { - ...opts, - fullmetadata: true, - fullReadJson: true, - }) - } - if (manifest.publishConfig) { - flatten(manifest.publishConfig, opts) - } - return manifest - } -} -module.exports = Publish diff --git a/node_modules/npm/lib/commands/query.js b/node_modules/npm/lib/commands/query.js deleted file mode 100644 index 68aa1fa..0000000 --- a/node_modules/npm/lib/commands/query.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -const { resolve } = require('path') -const BaseCommand = require('../base-command.js') -const log = require('../utils/log-shim.js') - -class QuerySelectorItem { - constructor (node) { - // all enumerable properties from the target - Object.assign(this, node.target.package) - - // append extra info - this.pkgid = node.target.pkgid - this.location = node.target.location - this.path = node.target.path - this.realpath = node.target.realpath - this.resolved = node.target.resolved - this.from = [] - this.to = [] - this.dev = node.target.dev - this.inBundle = node.target.inBundle - this.deduped = this.from.length > 1 - this.overridden = node.overridden - this.queryContext = node.queryContext - for (const edge of node.target.edgesIn) { - this.from.push(edge.from.location) - } - for (const [, edge] of node.target.edgesOut) { - if (edge.to) { - this.to.push(edge.to.location) - } - } - } -} - -class Query extends BaseCommand { - #response = [] // response is the query response - #seen = new Set() // paths we've seen so we can keep response deduped - - static description = 'Retrieve a filtered list of packages' - static name = 'query' - static usage = [''] - - static workspaces = true - static ignoreImplicitWorkspace = false - - static params = [ - 'global', - 'workspace', - 'workspaces', - 'include-workspace-root', - 'package-lock-only', - ] - - get parsedResponse () { - return JSON.stringify(this.#response, null, 2) - } - - async exec (args) { - // one dir up from wherever node_modules lives - const where = resolve(this.npm.dir, '..') - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: where, - forceActual: true, - } - const arb = new Arborist(opts) - let tree - if (this.npm.config.get('package-lock-only')) { - try { - tree = await arb.loadVirtual() - } catch (err) { - log.verbose('loadVirtual', err.stack) - /* eslint-disable-next-line max-len */ - throw this.usageError('A package lock or shrinkwrap file is required in package-lock-only mode') - } - } else { - tree = await arb.loadActual(opts) - } - const items = await tree.querySelectorAll(args[0], this.npm.flatOptions) - this.buildResponse(items) - - this.npm.output(this.parsedResponse) - } - - async execWorkspaces (args) { - await this.setWorkspaces() - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: this.npm.prefix, - } - const arb = new Arborist(opts) - const tree = await arb.loadActual(opts) - for (const workspacePath of this.workspacePaths) { - let items - if (workspacePath === tree.root.path) { - // include-workspace-root - items = await tree.querySelectorAll(args[0]) - } else { - const [workspace] = await tree.querySelectorAll(`.workspace:path(${workspacePath})`) - items = await workspace.target.querySelectorAll(args[0], this.npm.flatOptions) - } - this.buildResponse(items) - } - this.npm.output(this.parsedResponse) - } - - // builds a normalized inventory - buildResponse (items) { - for (const node of items) { - if (!this.#seen.has(node.target.location)) { - const item = new QuerySelectorItem(node) - this.#response.push(item) - this.#seen.add(item.location) - } - } - } -} - -module.exports = Query diff --git a/node_modules/npm/lib/commands/rebuild.js b/node_modules/npm/lib/commands/rebuild.js deleted file mode 100644 index 8af96f7..0000000 --- a/node_modules/npm/lib/commands/rebuild.js +++ /dev/null @@ -1,82 +0,0 @@ -const { resolve } = require('path') -const npa = require('npm-package-arg') -const semver = require('semver') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Rebuild extends ArboristWorkspaceCmd { - static description = 'Rebuild a package' - static name = 'rebuild' - static params = [ - 'global', - 'bin-links', - 'foreground-scripts', - 'ignore-scripts', - ...super.params, - ] - - static usage = ['[] ...]'] - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - const completion = require('../utils/completion/installed-deep.js') - return completion(npm, opts) - } - - async exec (args) { - const globalTop = resolve(this.npm.globalDir, '..') - const where = this.npm.global ? globalTop : this.npm.prefix - const Arborist = require('@npmcli/arborist') - const arb = new Arborist({ - ...this.npm.flatOptions, - path: where, - // TODO when extending ReifyCmd - // workspaces: this.workspaceNames, - }) - - if (args.length) { - // get the set of nodes matching the name that we want rebuilt - const tree = await arb.loadActual() - const specs = args.map(arg => { - const spec = npa(arg) - if (spec.rawSpec === '*') { - return spec - } - - if (spec.type !== 'range' && spec.type !== 'version' && spec.type !== 'directory') { - throw new Error('`npm rebuild` only supports SemVer version/range specifiers') - } - - return spec - }) - const nodes = tree.inventory.filter(node => this.isNode(specs, node)) - - await arb.rebuild({ nodes }) - } else { - await arb.rebuild() - } - - this.npm.output('rebuilt dependencies successfully') - } - - isNode (specs, node) { - return specs.some(spec => { - if (spec.type === 'directory') { - return node.path === spec.fetchSpec - } - - if (spec.name !== node.name) { - return false - } - - if (spec.rawSpec === '' || spec.rawSpec === '*') { - return true - } - - const { version } = node.package - // TODO: add tests for a package with missing version - return semver.satisfies(version, spec.fetchSpec) - }) - } -} -module.exports = Rebuild diff --git a/node_modules/npm/lib/commands/repo.js b/node_modules/npm/lib/commands/repo.js deleted file mode 100644 index b89b74c..0000000 --- a/node_modules/npm/lib/commands/repo.js +++ /dev/null @@ -1,54 +0,0 @@ -const { URL } = require('url') - -const PackageUrlCmd = require('../package-url-cmd.js') -class Repo extends PackageUrlCmd { - static description = 'Open package repository page in the browser' - static name = 'repo' - - getUrl (spec, mani) { - const r = mani.repository - const rurl = !r ? null - : typeof r === 'string' ? r - : typeof r === 'object' && typeof r.url === 'string' ? r.url - : null - - if (!rurl) { - throw Object.assign(new Error('no repository'), { - pkgid: spec, - }) - } - - const info = this.hostedFromMani(mani) - const url = info ? - info.browse(mani.repository.directory) : unknownHostedUrl(rurl) - - if (!url) { - throw Object.assign(new Error('no repository: could not get url'), { - pkgid: spec, - }) - } - return url - } -} -module.exports = Repo - -const unknownHostedUrl = url => { - try { - const { - protocol, - hostname, - pathname, - } = new URL(url) - - /* istanbul ignore next - URL ctor should prevent this */ - if (!protocol || !hostname) { - return null - } - - const proto = /(git\+)http:$/.test(protocol) ? 'http:' : 'https:' - const path = pathname.replace(/\.git$/, '') - return `${proto}//${hostname}${path}` - } catch (e) { - return null - } -} diff --git a/node_modules/npm/lib/commands/restart.js b/node_modules/npm/lib/commands/restart.js deleted file mode 100644 index 7ca2eb3..0000000 --- a/node_modules/npm/lib/commands/restart.js +++ /dev/null @@ -1,13 +0,0 @@ -const LifecycleCmd = require('../lifecycle-cmd.js') - -// This ends up calling run-script(['restart', ...args]) -class Restart extends LifecycleCmd { - static description = 'Restart a package' - static name = 'restart' - static params = [ - 'ignore-scripts', - 'script-shell', - ] -} - -module.exports = Restart diff --git a/node_modules/npm/lib/commands/root.js b/node_modules/npm/lib/commands/root.js deleted file mode 100644 index 7749c60..0000000 --- a/node_modules/npm/lib/commands/root.js +++ /dev/null @@ -1,11 +0,0 @@ -const BaseCommand = require('../base-command.js') -class Root extends BaseCommand { - static description = 'Display npm root' - static name = 'root' - static params = ['global'] - - async exec () { - this.npm.output(this.npm.dir) - } -} -module.exports = Root diff --git a/node_modules/npm/lib/commands/run-script.js b/node_modules/npm/lib/commands/run-script.js deleted file mode 100644 index 75f00a4..0000000 --- a/node_modules/npm/lib/commands/run-script.js +++ /dev/null @@ -1,249 +0,0 @@ -const runScript = require('@npmcli/run-script') -const { isServerPackage } = runScript -const pkgJson = require('@npmcli/package-json') -const log = require('../utils/log-shim.js') -const didYouMean = require('../utils/did-you-mean.js') -const { isWindowsShell } = require('../utils/is-windows.js') - -const cmdList = [ - 'publish', - 'install', - 'uninstall', - 'test', - 'stop', - 'start', - 'restart', - 'version', -].reduce((l, p) => l.concat(['pre' + p, p, 'post' + p]), []) - -const BaseCommand = require('../base-command.js') -class RunScript extends BaseCommand { - static description = 'Run arbitrary package scripts' - static params = [ - 'workspace', - 'workspaces', - 'include-workspace-root', - 'if-present', - 'ignore-scripts', - 'foreground-scripts', - 'script-shell', - ] - - static name = 'run-script' - static usage = [' [-- ]'] - static workspaces = true - static ignoreImplicitWorkspace = false - static isShellout = true - - static async completion (opts, npm) { - const argv = opts.conf.argv.remain - if (argv.length === 2) { - const { content: { scripts = {} } } = await pkgJson.normalize(npm.localPrefix) - .catch(er => ({ content: {} })) - if (opts.isFish) { - return Object.keys(scripts).map(s => `${s}\t${scripts[s].slice(0, 30)}`) - } - return Object.keys(scripts) - } - } - - async exec (args) { - if (args.length) { - return this.run(args) - } else { - return this.list(args) - } - } - - async execWorkspaces (args) { - if (args.length) { - return this.runWorkspaces(args) - } else { - return this.listWorkspaces(args) - } - } - - async run ([event, ...args], { path = this.npm.localPrefix, pkg } = {}) { - // this || undefined is because runScript will be unhappy with the default - // null value - const scriptShell = this.npm.config.get('script-shell') || undefined - - if (!pkg) { - const { content } = await pkgJson.normalize(path) - pkg = content - } - const { scripts = {} } = pkg - - if (event === 'restart' && !scripts.restart) { - scripts.restart = 'npm stop --if-present && npm start' - } else if (event === 'env' && !scripts.env) { - scripts.env = isWindowsShell ? 'SET' : 'env' - } - - pkg.scripts = scripts - - if ( - !Object.prototype.hasOwnProperty.call(scripts, event) && - !(event === 'start' && (await isServerPackage(path))) - ) { - if (this.npm.config.get('if-present')) { - return - } - - const suggestions = await didYouMean(path, event) - throw new Error( - `Missing script: "${event}"${suggestions}\n\nTo see a list of scripts, run:\n npm run` - ) - } - - // positional args only added to the main event, not pre/post - const events = [[event, args]] - if (!this.npm.config.get('ignore-scripts')) { - if (scripts[`pre${event}`]) { - events.unshift([`pre${event}`, []]) - } - - if (scripts[`post${event}`]) { - events.push([`post${event}`, []]) - } - } - - const opts = { - path, - args, - scriptShell, - stdio: 'inherit', - pkg, - banner: !this.npm.silent, - } - - for (const [ev, evArgs] of events) { - await runScript({ - ...opts, - event: ev, - args: evArgs, - }) - } - } - - async list (args, path) { - /* eslint-disable-next-line max-len */ - const { content: { scripts, name, _id } } = await pkgJson.normalize(path || this.npm.localPrefix) - const pkgid = _id || name - - if (!scripts) { - return [] - } - - const allScripts = Object.keys(scripts) - if (this.npm.silent) { - return allScripts - } - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify(scripts, null, 2)) - return allScripts - } - - if (this.npm.config.get('parseable')) { - for (const [script, cmd] of Object.entries(scripts)) { - this.npm.output(`${script}:${cmd}`) - } - - return allScripts - } - - const indent = '\n ' - const prefix = ' ' - const cmds = [] - const runScripts = [] - for (const script of allScripts) { - const list = cmdList.includes(script) ? cmds : runScripts - list.push(script) - } - const colorize = this.npm.chalk - - if (cmds.length) { - this.npm.output( - `${colorize.reset(colorize.bold('Lifecycle scripts'))} included in ${colorize.green( - pkgid - )}:` - ) - } - - for (const script of cmds) { - this.npm.output(prefix + script + indent + colorize.dim(scripts[script])) - } - - if (!cmds.length && runScripts.length) { - this.npm.output( - `${colorize.bold('Scripts')} available in ${colorize.green(pkgid)} via \`${colorize.blue( - 'npm run-script' - )}\`:` - ) - } else if (runScripts.length) { - this.npm.output(`\navailable via \`${colorize.blue('npm run-script')}\`:`) - } - - for (const script of runScripts) { - this.npm.output(prefix + script + indent + colorize.dim(scripts[script])) - } - - this.npm.output('') - return allScripts - } - - async runWorkspaces (args, filters) { - const res = [] - await this.setWorkspaces() - - for (const workspacePath of this.workspacePaths) { - const { content: pkg } = await pkgJson.normalize(workspacePath) - const runResult = await this.run(args, { - path: workspacePath, - pkg, - }).catch(err => { - log.error(`Lifecycle script \`${args[0]}\` failed with error:`) - log.error(err) - log.error(` in workspace: ${pkg._id || pkg.name}`) - log.error(` at location: ${workspacePath}`) - process.exitCode = 1 - }) - res.push(runResult) - } - } - - async listWorkspaces (args, filters) { - await this.setWorkspaces() - - if (this.npm.silent) { - return - } - - if (this.npm.config.get('json')) { - const res = {} - for (const workspacePath of this.workspacePaths) { - const { content: { scripts, name } } = await pkgJson.normalize(workspacePath) - res[name] = { ...scripts } - } - this.npm.output(JSON.stringify(res, null, 2)) - return - } - - if (this.npm.config.get('parseable')) { - for (const workspacePath of this.workspacePaths) { - const { content: { scripts, name } } = await pkgJson.normalize(workspacePath) - for (const [script, cmd] of Object.entries(scripts || {})) { - this.npm.output(`${name}:${script}:${cmd}`) - } - } - return - } - - for (const workspacePath of this.workspacePaths) { - await this.list(args, workspacePath) - } - } -} - -module.exports = RunScript diff --git a/node_modules/npm/lib/commands/sbom.js b/node_modules/npm/lib/commands/sbom.js deleted file mode 100644 index 311dfbc..0000000 --- a/node_modules/npm/lib/commands/sbom.js +++ /dev/null @@ -1,155 +0,0 @@ -'use strict' - -const { EOL } = require('os') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const BaseCommand = require('../base-command.js') -const log = require('../utils/log-shim.js') -const { cyclonedxOutput } = require('../utils/sbom-cyclonedx.js') -const { spdxOutput } = require('../utils/sbom-spdx.js') - -const SBOM_FORMATS = ['cyclonedx', 'spdx'] - -class SBOM extends BaseCommand { - #response = {} // response is the sbom response - - static description = 'Generate a Software Bill of Materials (SBOM)' - static name = 'sbom' - static workspaces = true - - static params = [ - 'omit', - 'package-lock-only', - 'sbom-format', - 'sbom-type', - 'workspace', - 'workspaces', - ] - - get #parsedResponse () { - return JSON.stringify(this.#response, null, 2) - } - - async exec () { - const sbomFormat = this.npm.config.get('sbom-format') - const packageLockOnly = this.npm.config.get('package-lock-only') - - if (!sbomFormat) { - /* eslint-disable-next-line max-len */ - throw this.usageError(`Must specify --sbom-format flag with one of: ${SBOM_FORMATS.join(', ')}.`) - } - - const Arborist = require('@npmcli/arborist') - - const opts = { - ...this.npm.flatOptions, - path: this.npm.prefix, - forceActual: true, - } - const arb = new Arborist(opts) - - let tree - if (packageLockOnly) { - try { - tree = await arb.loadVirtual(opts) - } catch (err) { - /* eslint-disable-next-line max-len */ - throw this.usageError('A package lock or shrinkwrap file is required in package-lock-only mode') - } - } else { - tree = await arb.loadActual(opts) - } - - // Collect the list of selected workspaces in the project - let wsNodes - if (this.workspaceNames && this.workspaceNames.length) { - wsNodes = arb.workspaceNodes(tree, this.workspaceNames) - } - - // Build the selector and query the tree for the list of nodes - const selector = this.#buildSelector({ wsNodes }) - log.info('sbom', `Using dependency selector: ${selector}`) - const items = await tree.querySelectorAll(selector) - - const errors = new Set() - for (const node of items) { - detectErrors(node).forEach(error => errors.add(error)) - } - - if (errors.size > 0) { - throw Object.assign( - new Error([...errors].join(EOL)), - { code: 'ESBOMPROBLEMS' } - ) - } - - // Populate the response with the list of unique nodes (sorted by location) - this.#buildResponse( - items - .sort((a, b) => localeCompare(a.location, b.location)) - ) - this.npm.output(this.#parsedResponse) - } - - async execWorkspaces (args) { - await this.setWorkspaces() - return this.exec(args) - } - - // Build the selector from all of the specified filter options - #buildSelector ({ wsNodes }) { - let selector - const omit = this.npm.flatOptions.omit - const workspacesEnabled = this.npm.flatOptions.workspacesEnabled - - // If omit is specified, omit all nodes and their children which match the - // specified selectors - const omits = omit.reduce((acc, o) => `${acc}:not(.${o})`, '') - - if (!workspacesEnabled) { - // If workspaces are disabled, omit all workspace nodes and their children - selector = `:root > :not(.workspace)${omits},:root > :not(.workspace) *${omits},:extraneous` - } else if (wsNodes && wsNodes.length > 0) { - // If one or more workspaces are selected, select only those workspaces and their children - selector = wsNodes.map(ws => `#${ws.name},#${ws.name} *${omits}`).join(',') - } else { - selector = `:root *${omits},:extraneous` - } - - // Always include the root node - return `:root,${selector}` - } - - // builds a normalized inventory - #buildResponse (items) { - const sbomFormat = this.npm.config.get('sbom-format') - const packageType = this.npm.config.get('sbom-type') - const packageLockOnly = this.npm.config.get('package-lock-only') - - this.#response = - sbomFormat === 'cyclonedx' - ? cyclonedxOutput({ npm: this.npm, nodes: items, packageType, packageLockOnly }) - : spdxOutput({ npm: this.npm, nodes: items, packageType }) - } -} - -const detectErrors = (node) => { - const errors = [] - - // Look for missing dependencies (that are NOT optional), or invalid dependencies - for (const edge of node.edgesOut.values()) { - if (edge.missing && !(edge.type === 'optional' || edge.type === 'peerOptional')) { - errors.push(`missing: ${edge.name}@${edge.spec}, required by ${edge.from.pkgid}`) - } - - if (edge.invalid) { - /* istanbul ignore next */ - const spec = edge.spec || '*' - const from = edge.from.pkgid - errors.push(`invalid: ${edge.to.pkgid}, ${spec} required by ${from}`) - } - } - - return errors -} - -module.exports = SBOM diff --git a/node_modules/npm/lib/commands/search.js b/node_modules/npm/lib/commands/search.js deleted file mode 100644 index 2af4daa..0000000 --- a/node_modules/npm/lib/commands/search.js +++ /dev/null @@ -1,114 +0,0 @@ -const { Minipass } = require('minipass') -const Pipeline = require('minipass-pipeline') -const libSearch = require('libnpmsearch') -const log = require('../utils/log-shim.js') - -const formatSearchStream = require('../utils/format-search-stream.js') - -function filter (data, include, exclude) { - const words = [data.name] - .concat(data.maintainers.map(m => `=${m.username}`)) - .concat(data.keywords || []) - .map(f => f && f.trim && f.trim()) - .filter(f => f) - .join(' ') - .toLowerCase() - - if (exclude.find(e => match(words, e))) { - return false - } - - return true -} - -function match (words, pattern) { - if (pattern.startsWith('/')) { - if (pattern.endsWith('/')) { - pattern = pattern.slice(0, -1) - } - pattern = new RegExp(pattern.slice(1)) - return words.match(pattern) - } - return words.indexOf(pattern) !== -1 -} - -const BaseCommand = require('../base-command.js') -class Search extends BaseCommand { - static description = 'Search for packages' - static name = 'search' - static params = [ - 'long', - 'json', - 'color', - 'parseable', - 'description', - 'searchopts', - 'searchexclude', - 'registry', - 'prefer-online', - 'prefer-offline', - 'offline', - ] - - static usage = ['[search terms ...]'] - - async exec (args) { - const opts = { - ...this.npm.flatOptions, - ...this.npm.flatOptions.search, - include: args.map(s => s.toLowerCase()).filter(s => s), - exclude: this.npm.flatOptions.search.exclude.split(/\s+/), - } - - if (opts.include.length === 0) { - throw new Error('search must be called with arguments') - } - - // Used later to figure out whether we had any packages go out - let anyOutput = false - - class FilterStream extends Minipass { - constructor () { - super({ objectMode: true }) - } - - write (pkg) { - if (filter(pkg, opts.include, opts.exclude)) { - super.write(pkg) - } - } - } - - const filterStream = new FilterStream() - - const { default: stripAnsi } = await import('strip-ansi') - // Grab a configured output stream that will spit out packages in the desired format. - const outputStream = await formatSearchStream({ - args, // --searchinclude options are not highlighted - ...opts, - }, stripAnsi) - - log.silly('search', 'searching packages') - const p = new Pipeline( - libSearch.stream(opts.include, opts), - filterStream, - outputStream - ) - - p.on('data', chunk => { - if (!anyOutput) { - anyOutput = true - } - this.npm.output(chunk.toString('utf8')) - }) - - await p.promise() - if (!anyOutput && !this.npm.config.get('json') && !this.npm.config.get('parseable')) { - this.npm.output('No matches found for ' + (args.map(JSON.stringify).join(' '))) - } - - log.silly('search', 'search completed') - log.clearProgress() - } -} -module.exports = Search diff --git a/node_modules/npm/lib/commands/set.js b/node_modules/npm/lib/commands/set.js deleted file mode 100644 index f315d18..0000000 --- a/node_modules/npm/lib/commands/set.js +++ /dev/null @@ -1,25 +0,0 @@ -const Npm = require('../npm.js') -const BaseCommand = require('../base-command.js') - -class Set extends BaseCommand { - static description = 'Set a value in the npm configuration' - static name = 'set' - static usage = ['= [= ...] (See `npm config`)'] - static params = ['global', 'location'] - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts) { - const Config = Npm.cmd('config') - return Config.completion(opts) - } - - async exec (args) { - if (!args.length) { - throw this.usageError() - } - return this.npm.exec('config', ['set'].concat(args)) - } -} -module.exports = Set diff --git a/node_modules/npm/lib/commands/shrinkwrap.js b/node_modules/npm/lib/commands/shrinkwrap.js deleted file mode 100644 index c6d817d..0000000 --- a/node_modules/npm/lib/commands/shrinkwrap.js +++ /dev/null @@ -1,71 +0,0 @@ -const { resolve, basename } = require('path') -const { unlink } = require('fs').promises -const log = require('../utils/log-shim') -const BaseCommand = require('../base-command.js') -class Shrinkwrap extends BaseCommand { - static description = 'Lock down dependency versions for publication' - static name = 'shrinkwrap' - static ignoreImplicitWorkspace = false - - async exec () { - // if has a npm-shrinkwrap.json, nothing to do - // if has a package-lock.json, rename to npm-shrinkwrap.json - // if has neither, load the actual tree and save that as npm-shrinkwrap.json - // - // loadVirtual, fall back to loadActual - // rename shrinkwrap file type, and tree.meta.save() - if (this.npm.global) { - const er = new Error('`npm shrinkwrap` does not work for global packages') - er.code = 'ESHRINKWRAPGLOBAL' - throw er - } - - const Arborist = require('@npmcli/arborist') - const path = this.npm.prefix - const sw = resolve(path, 'npm-shrinkwrap.json') - const arb = new Arborist({ ...this.npm.flatOptions, path }) - const tree = await arb.loadVirtual().catch(() => arb.loadActual()) - const { meta } = tree - const newFile = meta.hiddenLockfile || !meta.loadedFromDisk - const oldFilename = meta.filename - const notSW = !newFile && basename(oldFilename) !== 'npm-shrinkwrap.json' - - // The computed lockfile version of a hidden lockfile is always 3 - // even if the actual value of the property is a different. - // When shrinkwrap is run with only a hidden lockfile we want to - // set the shrinkwrap lockfile version as whatever was explicitly - // requested with a fallback to the actual value from the hidden - // lockfile. - if (meta.hiddenLockfile) { - meta.lockfileVersion = arb.options.lockfileVersion || - meta.originalLockfileVersion - } - meta.hiddenLockfile = false - meta.filename = sw - await meta.save() - - const updatedVersion = meta.originalLockfileVersion !== meta.lockfileVersion - ? meta.lockfileVersion - : null - - if (newFile) { - let message = 'created a lockfile as npm-shrinkwrap.json' - if (updatedVersion) { - message += ` with version ${updatedVersion}` - } - log.notice('', message) - } else if (notSW) { - await unlink(oldFilename) - let message = 'package-lock.json has been renamed to npm-shrinkwrap.json' - if (updatedVersion) { - message += ` and updated to version ${updatedVersion}` - } - log.notice('', message) - } else if (updatedVersion) { - log.notice('', `npm-shrinkwrap.json updated to version ${updatedVersion}`) - } else { - log.notice('', 'npm-shrinkwrap.json up to date') - } - } -} -module.exports = Shrinkwrap diff --git a/node_modules/npm/lib/commands/star.js b/node_modules/npm/lib/commands/star.js deleted file mode 100644 index 20039bf..0000000 --- a/node_modules/npm/lib/commands/star.js +++ /dev/null @@ -1,71 +0,0 @@ -const fetch = require('npm-registry-fetch') -const npa = require('npm-package-arg') -const log = require('../utils/log-shim') -const getIdentity = require('../utils/get-identity') - -const BaseCommand = require('../base-command.js') -class Star extends BaseCommand { - static description = 'Mark your favorite packages' - static name = 'star' - static usage = ['[...]'] - static params = [ - 'registry', - 'unicode', - 'otp', - ] - - static ignoreImplicitWorkspace = false - - async exec (args) { - if (!args.length) { - throw this.usageError() - } - - // if we're unstarring, then show an empty star image - // otherwise, show the full star image - const unicode = this.npm.config.get('unicode') - const full = unicode ? '\u2605 ' : '(*)' - const empty = unicode ? '\u2606 ' : '( )' - const show = this.name === 'star' ? full : empty - - const pkgs = args.map(npa) - const username = await getIdentity(this.npm, this.npm.flatOptions) - - for (const pkg of pkgs) { - const fullData = await fetch.json(pkg.escapedName, { - ...this.npm.flatOptions, - spec: pkg, - query: { write: true }, - preferOnline: true, - }) - - const body = { - _id: fullData._id, - _rev: fullData._rev, - users: fullData.users || {}, - } - - if (this.name === 'star') { - log.info('star', 'starring', body._id) - body.users[username] = true - log.verbose('star', 'starring', body) - } else { - delete body.users[username] - log.info('unstar', 'unstarring', body._id) - log.verbose('unstar', 'unstarring', body) - } - - const data = await fetch.json(pkg.escapedName, { - ...this.npm.flatOptions, - spec: pkg, - method: 'PUT', - body, - }) - - this.npm.output(show + ' ' + pkg.name) - log.verbose('star', data) - return data - } - } -} -module.exports = Star diff --git a/node_modules/npm/lib/commands/stars.js b/node_modules/npm/lib/commands/stars.js deleted file mode 100644 index 4214134..0000000 --- a/node_modules/npm/lib/commands/stars.js +++ /dev/null @@ -1,38 +0,0 @@ -const fetch = require('npm-registry-fetch') -const log = require('../utils/log-shim') -const getIdentity = require('../utils/get-identity.js') - -const BaseCommand = require('../base-command.js') -class Stars extends BaseCommand { - static description = 'View packages marked as favorites' - static name = 'stars' - static usage = ['[]'] - static params = ['registry'] - static ignoreImplicitWorkspace = false - - async exec ([user]) { - try { - if (!user) { - user = await getIdentity(this.npm, this.npm.flatOptions) - } - - const { rows } = await fetch.json('/-/_view/starredByUser', { - ...this.npm.flatOptions, - query: { key: `"${user}"` }, - }) - if (rows.length === 0) { - log.warn('stars', 'user has not starred any packages') - } - - for (const row of rows) { - this.npm.output(row.value) - } - } catch (err) { - if (err.code === 'ENEEDAUTH') { - log.warn('stars', 'auth is required to look up your username') - } - throw err - } - } -} -module.exports = Stars diff --git a/node_modules/npm/lib/commands/start.js b/node_modules/npm/lib/commands/start.js deleted file mode 100644 index a16eade..0000000 --- a/node_modules/npm/lib/commands/start.js +++ /dev/null @@ -1,13 +0,0 @@ -const LifecycleCmd = require('../lifecycle-cmd.js') - -// This ends up calling run-script(['start', ...args]) -class Start extends LifecycleCmd { - static description = 'Start a package' - static name = 'start' - static params = [ - 'ignore-scripts', - 'script-shell', - ] -} - -module.exports = Start diff --git a/node_modules/npm/lib/commands/stop.js b/node_modules/npm/lib/commands/stop.js deleted file mode 100644 index ae3031f..0000000 --- a/node_modules/npm/lib/commands/stop.js +++ /dev/null @@ -1,13 +0,0 @@ -const LifecycleCmd = require('../lifecycle-cmd.js') - -// This ends up calling run-script(['stop', ...args]) -class Stop extends LifecycleCmd { - static description = 'Stop a package' - static name = 'stop' - static params = [ - 'ignore-scripts', - 'script-shell', - ] -} - -module.exports = Stop diff --git a/node_modules/npm/lib/commands/team.js b/node_modules/npm/lib/commands/team.js deleted file mode 100644 index 3c6cf30..0000000 --- a/node_modules/npm/lib/commands/team.js +++ /dev/null @@ -1,154 +0,0 @@ -const columns = require('cli-columns') -const libteam = require('libnpmteam') - -const otplease = require('../utils/otplease.js') - -const BaseCommand = require('../base-command.js') -class Team extends BaseCommand { - static description = 'Manage organization teams and team memberships' - static name = 'team' - static usage = [ - 'create [--otp ]', - 'destroy [--otp ]', - 'add [--otp ]', - 'rm [--otp ]', - 'ls |', - ] - - static params = [ - 'registry', - 'otp', - 'parseable', - 'json', - ] - - static ignoreImplicitWorkspace = false - - static async completion (opts) { - const { conf: { argv: { remain: argv } } } = opts - const subcommands = ['create', 'destroy', 'add', 'rm', 'ls'] - - if (argv.length === 2) { - return subcommands - } - - if (subcommands.includes(argv[2])) { - return [] - } - - throw new Error(argv[2] + ' not recognized') - } - - async exec ([cmd, entity = '', user = '']) { - // Entities are in the format : - // XXX: "description" option to libnpmteam is used as a description of the - // team, but in npm's options, this is a boolean meaning "show the - // description in npm search output". Hence its being set to null here. - await otplease(this.npm, { ...this.npm.flatOptions }, opts => { - entity = entity.replace(/^@/, '') - switch (cmd) { - case 'create': return this.create(entity, opts) - case 'destroy': return this.destroy(entity, opts) - case 'add': return this.add(entity, user, opts) - case 'rm': return this.rm(entity, user, opts) - case 'ls': { - const match = entity.match(/[^:]+:.+/) - if (match) { - return this.listUsers(entity, opts) - } else { - return this.listTeams(entity, opts) - } - } - default: - throw this.usageError() - } - }) - } - - async create (entity, opts) { - await libteam.create(entity, opts) - if (opts.json) { - this.npm.output(JSON.stringify({ - created: true, - team: entity, - })) - } else if (opts.parseable) { - this.npm.output(`${entity}\tcreated`) - } else if (!this.npm.silent) { - this.npm.output(`+@${entity}`) - } - } - - async destroy (entity, opts) { - await libteam.destroy(entity, opts) - if (opts.json) { - this.npm.output(JSON.stringify({ - deleted: true, - team: entity, - })) - } else if (opts.parseable) { - this.npm.output(`${entity}\tdeleted`) - } else if (!this.npm.silent) { - this.npm.output(`-@${entity}`) - } - } - - async add (entity, user, opts) { - await libteam.add(user, entity, opts) - if (opts.json) { - this.npm.output(JSON.stringify({ - added: true, - team: entity, - user, - })) - } else if (opts.parseable) { - this.npm.output(`${user}\t${entity}\tadded`) - } else if (!this.npm.silent) { - this.npm.output(`${user} added to @${entity}`) - } - } - - async rm (entity, user, opts) { - await libteam.rm(user, entity, opts) - if (opts.json) { - this.npm.output(JSON.stringify({ - removed: true, - team: entity, - user, - })) - } else if (opts.parseable) { - this.npm.output(`${user}\t${entity}\tremoved`) - } else if (!this.npm.silent) { - this.npm.output(`${user} removed from @${entity}`) - } - } - - async listUsers (entity, opts) { - const users = (await libteam.lsUsers(entity, opts)).sort() - if (opts.json) { - this.npm.output(JSON.stringify(users, null, 2)) - } else if (opts.parseable) { - this.npm.output(users.join('\n')) - } else if (!this.npm.silent) { - const plural = users.length === 1 ? '' : 's' - const more = users.length === 0 ? '' : ':\n' - this.npm.output(`\n@${entity} has ${users.length} user${plural}${more}`) - this.npm.output(columns(users, { padding: 1 })) - } - } - - async listTeams (entity, opts) { - const teams = (await libteam.lsTeams(entity, opts)).sort() - if (opts.json) { - this.npm.output(JSON.stringify(teams, null, 2)) - } else if (opts.parseable) { - this.npm.output(teams.join('\n')) - } else if (!this.npm.silent) { - const plural = teams.length === 1 ? '' : 's' - const more = teams.length === 0 ? '' : ':\n' - this.npm.output(`\n@${entity} has ${teams.length} team${plural}${more}`) - this.npm.output(columns(teams.map(t => `@${t}`), { padding: 1 })) - } - } -} -module.exports = Team diff --git a/node_modules/npm/lib/commands/test.js b/node_modules/npm/lib/commands/test.js deleted file mode 100644 index eccc47f..0000000 --- a/node_modules/npm/lib/commands/test.js +++ /dev/null @@ -1,13 +0,0 @@ -const LifecycleCmd = require('../lifecycle-cmd.js') - -// This ends up calling run-script(['test', ...args]) -class Test extends LifecycleCmd { - static description = 'Test a package' - static name = 'test' - static params = [ - 'ignore-scripts', - 'script-shell', - ] -} - -module.exports = Test diff --git a/node_modules/npm/lib/commands/token.js b/node_modules/npm/lib/commands/token.js deleted file mode 100644 index dc1df6e..0000000 --- a/node_modules/npm/lib/commands/token.js +++ /dev/null @@ -1,229 +0,0 @@ -const Table = require('cli-table3') -const log = require('../utils/log-shim.js') -const profile = require('npm-profile') - -const otplease = require('../utils/otplease.js') -const pulseTillDone = require('../utils/pulse-till-done.js') -const readUserInfo = require('../utils/read-user-info.js') - -const BaseCommand = require('../base-command.js') -class Token extends BaseCommand { - static description = 'Manage your authentication tokens' - static name = 'token' - static usage = ['list', 'revoke ', 'create [--read-only] [--cidr=list]'] - static params = ['read-only', 'cidr', 'registry', 'otp'] - - static async completion (opts) { - const argv = opts.conf.argv.remain - const subcommands = ['list', 'revoke', 'create'] - if (argv.length === 2) { - return subcommands - } - - if (subcommands.includes(argv[2])) { - return [] - } - - throw new Error(argv[2] + ' not recognized') - } - - async exec (args) { - log.gauge.show('token') - if (args.length === 0) { - return this.list() - } - switch (args[0]) { - case 'list': - case 'ls': - return this.list() - case 'delete': - case 'revoke': - case 'remove': - case 'rm': - return this.rm(args.slice(1)) - case 'create': - return this.create(args.slice(1)) - default: - throw this.usageError(`${args[0]} is not a recognized subcommand.`) - } - } - - async list () { - const conf = this.config() - log.info('token', 'getting list') - const tokens = await pulseTillDone.withPromise(profile.listTokens(conf)) - if (conf.json) { - this.npm.output(JSON.stringify(tokens, null, 2)) - return - } else if (conf.parseable) { - this.npm.output(['key', 'token', 'created', 'readonly', 'CIDR whitelist'].join('\t')) - tokens.forEach(token => { - this.npm.output( - [ - token.key, - token.token, - token.created, - token.readonly ? 'true' : 'false', - token.cidr_whitelist ? token.cidr_whitelist.join(',') : '', - ].join('\t') - ) - }) - return - } - this.generateTokenIds(tokens, 6) - const idWidth = tokens.reduce((acc, token) => Math.max(acc, token.id.length), 0) - const table = new Table({ - head: ['id', 'token', 'created', 'readonly', 'CIDR whitelist'], - colWidths: [Math.max(idWidth, 2) + 2, 9, 12, 10], - }) - tokens.forEach(token => { - table.push([ - token.id, - token.token + '…', - String(token.created).slice(0, 10), - token.readonly ? 'yes' : 'no', - token.cidr_whitelist ? token.cidr_whitelist.join(', ') : '', - ]) - }) - this.npm.output(table.toString()) - } - - async rm (args) { - if (args.length === 0) { - throw this.usageError('`` argument is required.') - } - - const conf = this.config() - const toRemove = [] - const progress = log.newItem('removing tokens', toRemove.length) - progress.info('token', 'getting existing list') - const tokens = await pulseTillDone.withPromise(profile.listTokens(conf)) - args.forEach(id => { - const matches = tokens.filter(token => token.key.indexOf(id) === 0) - if (matches.length === 1) { - toRemove.push(matches[0].key) - } else if (matches.length > 1) { - throw new Error( - /* eslint-disable-next-line max-len */ - `Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm token list\`.` - ) - } else { - const tokenMatches = tokens.some(t => id.indexOf(t.token) === 0) - if (!tokenMatches) { - throw new Error(`Unknown token id or value "${id}".`) - } - - toRemove.push(id) - } - }) - await Promise.all( - toRemove.map(key => { - return otplease(this.npm, conf, c => profile.removeToken(key, c)) - }) - ) - if (conf.json) { - this.npm.output(JSON.stringify(toRemove)) - } else if (conf.parseable) { - this.npm.output(toRemove.join('\t')) - } else { - this.npm.output('Removed ' + toRemove.length + ' token' + (toRemove.length !== 1 ? 's' : '')) - } - } - - async create (args) { - const conf = this.config() - const cidr = conf.cidr - const readonly = conf.readOnly - - const password = await readUserInfo.password() - const validCIDR = await this.validateCIDRList(cidr) - log.info('token', 'creating') - const result = await pulseTillDone.withPromise( - otplease(this.npm, conf, c => profile.createToken(password, readonly, validCIDR, c)) - ) - delete result.key - delete result.updated - if (conf.json) { - this.npm.output(JSON.stringify(result)) - } else if (conf.parseable) { - Object.keys(result).forEach(k => this.npm.output(k + '\t' + result[k])) - } else { - const table = new Table() - for (const k of Object.keys(result)) { - table.push({ [this.npm.chalk.bold(k)]: String(result[k]) }) - } - this.npm.output(table.toString()) - } - } - - config () { - const conf = { ...this.npm.flatOptions } - const creds = this.npm.config.getCredentialsByURI(conf.registry) - if (creds.token) { - conf.auth = { token: creds.token } - } else if (creds.username) { - conf.auth = { - basic: { - username: creds.username, - password: creds.password, - }, - } - } else if (creds.auth) { - const auth = Buffer.from(creds.auth, 'base64').toString().split(':', 2) - conf.auth = { - basic: { - username: auth[0], - password: auth[1], - }, - } - } else { - conf.auth = {} - } - - if (conf.otp) { - conf.auth.otp = conf.otp - } - return conf - } - - invalidCIDRError (msg) { - return Object.assign(new Error(msg), { code: 'EINVALIDCIDR' }) - } - - generateTokenIds (tokens, minLength) { - const byId = {} - for (const token of tokens) { - token.id = token.key - for (let ii = minLength; ii < token.key.length; ++ii) { - const match = tokens.some( - ot => ot !== token && ot.key.slice(0, ii) === token.key.slice(0, ii) - ) - if (!match) { - token.id = token.key.slice(0, ii) - break - } - } - byId[token.id] = token - } - return byId - } - - async validateCIDRList (cidrs) { - const { v4: isCidrV4, v6: isCidrV6 } = await import('is-cidr') - const maybeList = [].concat(cidrs).filter(Boolean) - const list = maybeList.length === 1 ? maybeList[0].split(/,\s*/) : maybeList - for (const cidr of list) { - if (isCidrV6(cidr)) { - throw this.invalidCIDRError( - 'CIDR whitelist can only contain IPv4 addresses, ' + cidr + ' is IPv6' - ) - } - - if (!isCidrV4(cidr)) { - throw this.invalidCIDRError('CIDR whitelist contains invalid CIDR entry: ' + cidr) - } - } - return list - } -} -module.exports = Token diff --git a/node_modules/npm/lib/commands/uninstall.js b/node_modules/npm/lib/commands/uninstall.js deleted file mode 100644 index 07775ef..0000000 --- a/node_modules/npm/lib/commands/uninstall.js +++ /dev/null @@ -1,56 +0,0 @@ -const { resolve } = require('path') -const pkgJson = require('@npmcli/package-json') - -const reifyFinish = require('../utils/reify-finish.js') -const completion = require('../utils/completion/installed-shallow.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Uninstall extends ArboristWorkspaceCmd { - static description = 'Remove a package' - static name = 'uninstall' - static params = ['save', 'global', ...super.params] - static usage = ['[<@scope>/]...'] - static ignoreImplicitWorkspace = false - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - return completion(npm, opts) - } - - async exec (args) { - if (!args.length) { - if (!this.npm.global) { - throw new Error('Must provide a package name to remove') - } else { - try { - const { content: pkg } = await pkgJson.normalize(this.npm.localPrefix) - args.push(pkg.name) - } catch (er) { - if (er.code !== 'ENOENT' && er.code !== 'ENOTDIR') { - throw er - } else { - throw this.usageError() - } - } - } - } - - // the /path/to/node_modules/.. - const path = this.npm.global - ? resolve(this.npm.globalDir, '..') - : this.npm.localPrefix - - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path, - rm: args, - workspaces: this.workspaceNames, - } - const arb = new Arborist(opts) - await arb.reify(opts) - await reifyFinish(this.npm, arb) - } -} -module.exports = Uninstall diff --git a/node_modules/npm/lib/commands/unpublish.js b/node_modules/npm/lib/commands/unpublish.js deleted file mode 100644 index a9c2090..0000000 --- a/node_modules/npm/lib/commands/unpublish.js +++ /dev/null @@ -1,171 +0,0 @@ -const libaccess = require('libnpmaccess') -const libunpub = require('libnpmpublish').unpublish -const npa = require('npm-package-arg') -const pacote = require('pacote') -const pkgJson = require('@npmcli/package-json') - -const { flatten } = require('@npmcli/config/lib/definitions') -const getIdentity = require('../utils/get-identity.js') -const log = require('../utils/log-shim') -const otplease = require('../utils/otplease.js') - -const LAST_REMAINING_VERSION_ERROR = 'Refusing to delete the last version of the package. ' + -'It will block from republishing a new version for 24 hours.\n' + -'Run with --force to do this.' - -const BaseCommand = require('../base-command.js') -class Unpublish extends BaseCommand { - static description = 'Remove a package from the registry' - static name = 'unpublish' - static params = ['dry-run', 'force', 'workspace', 'workspaces'] - static usage = ['[]'] - static workspaces = true - static ignoreImplicitWorkspace = false - - static async getKeysOfVersions (name, opts) { - const packument = await pacote.packument(name, { - ...opts, - spec: name, - query: { write: true }, - }) - return Object.keys(packument.versions) - } - - static async completion (args, npm) { - const { partialWord, conf } = args - - if (conf.argv.remain.length >= 3) { - return [] - } - - const opts = { ...npm.flatOptions } - const username = await getIdentity(npm, { ...opts }).catch(() => null) - if (!username) { - return [] - } - - const access = await libaccess.getPackages(username, opts) - // do a bit of filtering at this point, so that we don't need - // to fetch versions for more than one thing, but also don't - // accidentally unpublish a whole project - let pkgs = Object.keys(access) - if (!partialWord || !pkgs.length) { - return pkgs - } - - const pp = npa(partialWord).name - pkgs = pkgs.filter(p => !p.indexOf(pp)) - if (pkgs.length > 1) { - return pkgs - } - - const versions = await Unpublish.getKeysOfVersions(pkgs[0], opts) - if (!versions.length) { - return pkgs - } else { - return versions.map(v => `${pkgs[0]}@${v}`) - } - } - - async exec (args, { localPrefix } = {}) { - if (args.length > 1) { - throw this.usageError() - } - - // workspace mode - if (!localPrefix) { - localPrefix = this.npm.localPrefix - } - - const force = this.npm.config.get('force') - const { silent } = this.npm - const dryRun = this.npm.config.get('dry-run') - - let spec - if (args.length) { - spec = npa(args[0]) - if (spec.type !== 'version' && spec.rawSpec !== '*') { - throw this.usageError( - 'Can only unpublish a single version, or the entire project.\n' + - 'Tags and ranges are not supported.' - ) - } - } - - log.silly('unpublish', 'args[0]', args[0]) - log.silly('unpublish', 'spec', spec) - - if (spec?.rawSpec === '*' && !force) { - throw this.usageError( - 'Refusing to delete entire project.\n' + - 'Run with --force to do this.' - ) - } - - const opts = { ...this.npm.flatOptions } - - let manifest - try { - const { content } = await pkgJson.prepare(localPrefix) - manifest = content - } catch (err) { - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { - if (!spec) { - // We needed a local package.json to figure out what package to - // unpublish - throw this.usageError() - } - } else { - // folks should know if ANY local package.json had a parsing error. - // They may be relying on `publishConfig` to be loading and we don't - // want to ignore errors in that case. - throw err - } - } - - let pkgVersion // for cli output - if (spec) { - pkgVersion = spec.type === 'version' ? `@${spec.rawSpec}` : '' - } else { - spec = npa.resolve(manifest.name, manifest.version) - log.verbose('unpublish', manifest) - pkgVersion = manifest.version ? `@${manifest.version}` : '' - if (!manifest.version && !force) { - throw this.usageError( - 'Refusing to delete entire project.\n' + - 'Run with --force to do this.' - ) - } - } - - // If localPrefix has a package.json with a name that matches the package - // being unpublished, load up the publishConfig - if (manifest?.name === spec.name && manifest.publishConfig) { - flatten(manifest.publishConfig, opts) - } - - const versions = await Unpublish.getKeysOfVersions(spec.name, opts) - if (versions.length === 1 && spec.rawSpec === versions[0] && !force) { - throw this.usageError(LAST_REMAINING_VERSION_ERROR) - } - if (versions.length === 1) { - pkgVersion = '' - } - - if (!dryRun) { - await otplease(this.npm, opts, o => libunpub(spec, o)) - } - if (!silent) { - this.npm.output(`- ${spec.name}${pkgVersion}`) - } - } - - async execWorkspaces (args) { - await this.setWorkspaces() - - for (const path of this.workspacePaths) { - await this.exec(args, { localPrefix: path }) - } - } -} -module.exports = Unpublish diff --git a/node_modules/npm/lib/commands/unstar.js b/node_modules/npm/lib/commands/unstar.js deleted file mode 100644 index cbcb736..0000000 --- a/node_modules/npm/lib/commands/unstar.js +++ /dev/null @@ -1,7 +0,0 @@ -const Star = require('./star.js') - -class Unstar extends Star { - static description = 'Remove an item from your favorite packages' - static name = 'unstar' -} -module.exports = Unstar diff --git a/node_modules/npm/lib/commands/update.js b/node_modules/npm/lib/commands/update.js deleted file mode 100644 index 43d031c..0000000 --- a/node_modules/npm/lib/commands/update.js +++ /dev/null @@ -1,69 +0,0 @@ -const path = require('path') - -const log = require('../utils/log-shim.js') - -const reifyFinish = require('../utils/reify-finish.js') - -const ArboristWorkspaceCmd = require('../arborist-cmd.js') -class Update extends ArboristWorkspaceCmd { - static description = 'Update packages' - static name = 'update' - - static params = [ - 'save', - 'global', - 'install-strategy', - 'legacy-bundling', - 'global-style', - 'omit', - 'include', - 'strict-peer-deps', - 'package-lock', - 'foreground-scripts', - 'ignore-scripts', - 'audit', - 'bin-links', - 'fund', - 'dry-run', - ...super.params, - ] - - static usage = ['[...]'] - - // TODO - /* istanbul ignore next */ - static async completion (opts, npm) { - const completion = require('../utils/completion/installed-deep.js') - return completion(npm, opts) - } - - async exec (args) { - const update = args.length === 0 ? true : args - const global = path.resolve(this.npm.globalDir, '..') - const where = this.npm.global ? global : this.npm.prefix - - // In the context of `npm update` the save - // config value should default to `false` - const save = this.npm.config.isDefault('save') - ? false - : this.npm.config.get('save') - - if (this.npm.config.get('depth')) { - log.warn('update', 'The --depth option no longer has any effect. See RFC0019.\n' + - 'https://github.com/npm/rfcs/blob/latest/implemented/0019-remove-update-depth-option.md') - } - - const Arborist = require('@npmcli/arborist') - const opts = { - ...this.npm.flatOptions, - path: where, - save, - workspaces: this.workspaceNames, - } - const arb = new Arborist(opts) - - await arb.reify({ ...opts, update }) - await reifyFinish(this.npm, arb) - } -} -module.exports = Update diff --git a/node_modules/npm/lib/commands/version.js b/node_modules/npm/lib/commands/version.js deleted file mode 100644 index 029a6fd..0000000 --- a/node_modules/npm/lib/commands/version.js +++ /dev/null @@ -1,156 +0,0 @@ -const libnpmversion = require('libnpmversion') -const { resolve } = require('path') -const { promisify } = require('util') -const readFile = promisify(require('fs').readFile) - -const updateWorkspaces = require('../workspaces/update-workspaces.js') -const BaseCommand = require('../base-command.js') - -class Version extends BaseCommand { - static description = 'Bump a package version' - static name = 'version' - static params = [ - 'allow-same-version', - 'commit-hooks', - 'git-tag-version', - 'json', - 'preid', - 'sign-git-tag', - 'workspace', - 'workspaces', - 'workspaces-update', - 'include-workspace-root', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - - /* eslint-disable-next-line max-len */ - static usage = ['[ | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git]'] - - static async completion (opts) { - const { - conf: { - argv: { remain }, - }, - } = opts - if (remain.length > 2) { - return [] - } - - return [ - 'major', - 'minor', - 'patch', - 'premajor', - 'preminor', - 'prepatch', - 'prerelease', - 'from-git', - ] - } - - async exec (args) { - switch (args.length) { - case 0: - return this.list() - case 1: - return this.change(args) - default: - throw this.usageError() - } - } - - async execWorkspaces (args) { - switch (args.length) { - case 0: - return this.listWorkspaces() - case 1: - return this.changeWorkspaces(args) - default: - throw this.usageError() - } - } - - async change (args) { - const prefix = this.npm.config.get('tag-version-prefix') - const version = await libnpmversion(args[0], { - ...this.npm.flatOptions, - path: this.npm.prefix, - }) - return this.npm.output(`${prefix}${version}`) - } - - async changeWorkspaces (args) { - const prefix = this.npm.config.get('tag-version-prefix') - await this.setWorkspaces() - const updatedWorkspaces = [] - for (const [name, path] of this.workspaces) { - this.npm.output(name) - const version = await libnpmversion(args[0], { - ...this.npm.flatOptions, - 'git-tag-version': false, - path, - }) - updatedWorkspaces.push(name) - this.npm.output(`${prefix}${version}`) - } - return this.update(updatedWorkspaces) - } - - async list (results = {}) { - const pj = resolve(this.npm.prefix, 'package.json') - - const pkg = await readFile(pj, 'utf8') - .then(data => JSON.parse(data)) - .catch(() => ({})) - - if (pkg.name && pkg.version) { - results[pkg.name] = pkg.version - } - - results.npm = this.npm.version - for (const [key, version] of Object.entries(process.versions)) { - results[key] = version - } - - if (this.npm.config.get('json')) { - this.npm.output(JSON.stringify(results, null, 2)) - } else { - this.npm.output(results) - } - } - - async listWorkspaces () { - const results = {} - await this.setWorkspaces() - for (const path of this.workspacePaths) { - const pj = resolve(path, 'package.json') - // setWorkspaces has already parsed package.json so we know it won't error - const pkg = await readFile(pj, 'utf8').then(data => JSON.parse(data)) - - if (pkg.name && pkg.version) { - results[pkg.name] = pkg.version - } - } - return this.list(results) - } - - async update (workspaces) { - const { - config, - flatOptions, - localPrefix, - } = this.npm - - await updateWorkspaces({ - config, - flatOptions, - localPrefix, - npm: this.npm, - workspaces, - }) - } -} - -module.exports = Version diff --git a/node_modules/npm/lib/commands/view.js b/node_modules/npm/lib/commands/view.js deleted file mode 100644 index f118184..0000000 --- a/node_modules/npm/lib/commands/view.js +++ /dev/null @@ -1,510 +0,0 @@ -const columns = require('cli-columns') -const fs = require('fs') -const jsonParse = require('json-parse-even-better-errors') -const log = require('../utils/log-shim.js') -const npa = require('npm-package-arg') -const { resolve } = require('path') -const formatBytes = require('../utils/format-bytes.js') -const relativeDate = require('tiny-relative-date') -const semver = require('semver') -const { inspect, promisify } = require('util') -const { packument } = require('pacote') - -const readFile = promisify(fs.readFile) -const readJson = async file => jsonParse(await readFile(file, 'utf8')) - -const Queryable = require('../utils/queryable.js') -const BaseCommand = require('../base-command.js') -class View extends BaseCommand { - static description = 'View registry info' - static name = 'view' - static params = [ - 'json', - 'workspace', - 'workspaces', - 'include-workspace-root', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - static usage = ['[] [[.subfield]...]'] - - static async completion (opts, npm) { - if (opts.conf.argv.remain.length <= 2) { - // There used to be registry completion here, but it stopped - // making sense somewhere around 50,000 packages on the registry - return - } - // have the package, get the fields - const config = { - ...npm.flatOptions, - fullMetadata: true, - preferOnline: true, - } - const spec = npa(opts.conf.argv.remain[2]) - const pckmnt = await packument(spec, config) - const defaultTag = npm.config.get('tag') - const dv = pckmnt.versions[pckmnt['dist-tags'][defaultTag]] - pckmnt.versions = Object.keys(pckmnt.versions).sort(semver.compareLoose) - - return getFields(pckmnt).concat(getFields(dv)) - - function getFields (d, f, pref) { - f = f || [] - pref = pref || [] - Object.keys(d).forEach((k) => { - if (k.charAt(0) === '_' || k.indexOf('.') !== -1) { - return - } - const p = pref.concat(k).join('.') - f.push(p) - if (Array.isArray(d[k])) { - d[k].forEach((val, i) => { - const pi = p + '[' + i + ']' - if (val && typeof val === 'object') { - getFields(val, f, [p]) - } else { - f.push(pi) - } - }) - return - } - if (typeof d[k] === 'object') { - getFields(d[k], f, [p]) - } - }) - return f - } - } - - async exec (args) { - if (!args.length) { - args = ['.'] - } - let pkg = args.shift() - const local = /^\.@/.test(pkg) || pkg === '.' - - if (local) { - if (this.npm.global) { - throw new Error('Cannot use view command in global mode.') - } - const dir = this.npm.prefix - const manifest = await readJson(resolve(dir, 'package.json')) - if (!manifest.name) { - throw new Error('Invalid package.json, no "name" field') - } - // put the version back if it existed - pkg = `${manifest.name}${pkg.slice(1)}` - } - - let wholePackument = false - if (!args.length) { - args = [''] - wholePackument = true - } - const [pckmnt, data] = await this.getData(pkg, args) - - if (!this.npm.config.get('json') && wholePackument) { - // pretty view (entire packument) - data.map((v) => this.prettyView(pckmnt, v[Object.keys(v)[0]][''])) - } else { - // JSON formatted output (JSON or specific attributes from packument) - let reducedData = data.reduce(reducer, {}) - if (wholePackument) { - // No attributes - reducedData = cleanBlanks(reducedData) - log.silly('view', reducedData) - } - // disable the progress bar entirely, as we can't meaningfully update it - // if we may have partial lines printed. - log.disableProgress() - - const msg = await this.jsonData(reducedData, pckmnt._id) - if (msg !== '') { - this.npm.output(msg) - } - } - } - - async execWorkspaces (args) { - if (!args.length) { - args = ['.'] - } - - const pkg = args.shift() - - const local = /^\.@/.test(pkg) || pkg === '.' - if (!local) { - log.warn('Ignoring workspaces for specified package(s)') - return this.exec([pkg, ...args]) - } - let wholePackument = false - if (!args.length) { - wholePackument = true - args = [''] // getData relies on this - } - const results = {} - await this.setWorkspaces() - for (const name of this.workspaceNames) { - const wsPkg = `${name}${pkg.slice(1)}` - const [pckmnt, data] = await this.getData(wsPkg, args) - - let reducedData = data.reduce(reducer, {}) - if (wholePackument) { - // No attributes - reducedData = cleanBlanks(reducedData) - log.silly('view', reducedData) - } - - if (!this.npm.config.get('json')) { - if (wholePackument) { - data.map((v) => this.prettyView(pckmnt, v[Object.keys(v)[0]][''])) - } else { - this.npm.output(`${name}:`) - const msg = await this.jsonData(reducedData, pckmnt._id) - if (msg !== '') { - this.npm.output(msg) - } - } - } else { - const msg = await this.jsonData(reducedData, pckmnt._id) - if (msg !== '') { - results[name] = JSON.parse(msg) - } - } - } - if (Object.keys(results).length > 0) { - this.npm.output(JSON.stringify(results, null, 2)) - } - } - - async getData (pkg, args) { - const opts = { - ...this.npm.flatOptions, - preferOnline: true, - fullMetadata: true, - } - - const spec = npa(pkg) - - // get the data about this package - let version = this.npm.config.get('tag') - // rawSpec is the git url if this is from git - if (spec.type !== 'git' && spec.type !== 'directory' && spec.rawSpec !== '*') { - version = spec.rawSpec - } - - const pckmnt = await packument(spec, opts) - - if (pckmnt['dist-tags']?.[version]) { - version = pckmnt['dist-tags'][version] - } - - if (pckmnt.time && pckmnt.time.unpublished) { - const u = pckmnt.time.unpublished - const er = new Error(`Unpublished on ${u.time}`) - er.statusCode = 404 - er.code = 'E404' - er.pkgid = pckmnt._id - throw er - } - - const data = [] - const versions = pckmnt.versions || {} - pckmnt.versions = Object.keys(versions).sort(semver.compareLoose) - - // remove readme unless we asked for it - if (args.indexOf('readme') === -1) { - delete pckmnt.readme - } - - Object.keys(versions).forEach((v) => { - if (semver.satisfies(v, version, true)) { - args.forEach(arg => { - // remove readme unless we asked for it - if (args.indexOf('readme') !== -1) { - delete versions[v].readme - } - - data.push(showFields(pckmnt, versions[v], arg)) - }) - } - }) - - // No data has been pushed because no data is matching the specified version - if (data.length === 0 && version !== 'latest') { - const er = new Error(`No match found for version ${version}`) - er.statusCode = 404 - er.code = 'E404' - er.pkgid = `${pckmnt._id}@${version}` - throw er - } - - if ( - !this.npm.config.get('json') && - args.length === 1 && - args[0] === '' - ) { - pckmnt.version = version - } - - return [pckmnt, data] - } - - async jsonData (data, name) { - const versions = Object.keys(data) - let msg = '' - let msgJson = [] - const includeVersions = versions.length > 1 - let includeFields - const json = this.npm.config.get('json') - - versions.forEach((v) => { - const fields = Object.keys(data[v]) - includeFields = includeFields || (fields.length > 1) - if (json) { - msgJson.push({}) - } - fields.forEach((f) => { - let d = cleanup(data[v][f]) - if (fields.length === 1 && json) { - msgJson[msgJson.length - 1][f] = d - } - - if (includeVersions || includeFields || typeof d !== 'string') { - if (json) { - msgJson[msgJson.length - 1][f] = d - } else { - d = inspect(d, { - showHidden: false, - depth: 5, - colors: this.npm.color, - maxArrayLength: null, - }) - } - } else if (typeof d === 'string' && json) { - d = JSON.stringify(d) - } - - if (!json) { - if (f && includeFields) { - f += ' = ' - } - msg += (includeVersions ? name + '@' + v + ' ' : '') + - (includeFields ? f : '') + d + '\n' - } - }) - }) - - if (json) { - if (msgJson.length && Object.keys(msgJson[0]).length === 1) { - const k = Object.keys(msgJson[0])[0] - msgJson = msgJson.map(m => m[k]) - } - if (msgJson.length === 1) { - msg = JSON.stringify(msgJson[0], null, 2) + '\n' - } else if (msgJson.length > 1) { - msg = JSON.stringify(msgJson, null, 2) + '\n' - } - } - - return msg.trim() - } - - prettyView (packu, manifest) { - // More modern, pretty printing of default view - const unicode = this.npm.config.get('unicode') - const chalk = this.npm.chalk - const tags = [] - - Object.keys(packu['dist-tags']).forEach((t) => { - const version = packu['dist-tags'][t] - tags.push(`${chalk.bold.green(t)}: ${version}`) - }) - const unpackedSize = manifest.dist.unpackedSize && - formatBytes(manifest.dist.unpackedSize, true) - const licenseField = manifest.license || 'Proprietary' - const info = { - name: chalk.green(manifest.name), - version: chalk.green(manifest.version), - bins: Object.keys(manifest.bin || {}), - versions: chalk.yellow(packu.versions.length + ''), - description: manifest.description, - deprecated: manifest.deprecated, - keywords: packu.keywords || [], - license: typeof licenseField === 'string' - ? licenseField - : (licenseField.type || 'Proprietary'), - deps: Object.keys(manifest.dependencies || {}).map((dep) => { - return `${chalk.yellow(dep)}: ${manifest.dependencies[dep]}` - }), - publisher: manifest._npmUser && unparsePerson({ - name: chalk.yellow(manifest._npmUser.name), - email: chalk.cyan(manifest._npmUser.email), - }), - modified: !packu.time ? undefined - : chalk.yellow(relativeDate(packu.time[manifest.version])), - maintainers: (packu.maintainers || []).map((u) => unparsePerson({ - name: chalk.yellow(u.name), - email: chalk.cyan(u.email), - })), - repo: ( - manifest.bugs && (manifest.bugs.url || manifest.bugs) - ) || ( - manifest.repository && (manifest.repository.url || manifest.repository) - ), - site: ( - manifest.homepage && (manifest.homepage.url || manifest.homepage) - ), - tags, - tarball: chalk.cyan(manifest.dist.tarball), - shasum: chalk.yellow(manifest.dist.shasum), - integrity: - manifest.dist.integrity && chalk.yellow(manifest.dist.integrity), - fileCount: - manifest.dist.fileCount && chalk.yellow(manifest.dist.fileCount), - unpackedSize: unpackedSize && chalk.yellow(unpackedSize), - } - if (info.license.toLowerCase().trim() === 'proprietary') { - info.license = chalk.bold.red(info.license) - } else { - info.license = chalk.green(info.license) - } - - this.npm.output('') - this.npm.output( - chalk.underline.bold(`${info.name}@${info.version}`) + - ' | ' + info.license + - ' | deps: ' + (info.deps.length ? chalk.cyan(info.deps.length) : chalk.green('none')) + - ' | versions: ' + info.versions - ) - info.description && this.npm.output(info.description) - if (info.repo || info.site) { - info.site && this.npm.output(chalk.cyan(info.site)) - } - - const warningSign = unicode ? ' ⚠️ ' : '!!' - info.deprecated && this.npm.output( - `\n${chalk.bold.red('DEPRECATED')}${ - warningSign - } - ${info.deprecated}` - ) - - if (info.keywords.length) { - this.npm.output('') - this.npm.output('keywords:', chalk.yellow(info.keywords.join(', '))) - } - - if (info.bins.length) { - this.npm.output('') - this.npm.output('bin:', chalk.yellow(info.bins.join(', '))) - } - - this.npm.output('') - this.npm.output('dist') - this.npm.output('.tarball:', info.tarball) - this.npm.output('.shasum:', info.shasum) - info.integrity && this.npm.output('.integrity:', info.integrity) - info.unpackedSize && this.npm.output('.unpackedSize:', info.unpackedSize) - - const maxDeps = 24 - if (info.deps.length) { - this.npm.output('') - this.npm.output('dependencies:') - this.npm.output(columns(info.deps.slice(0, maxDeps), { padding: 1 })) - if (info.deps.length > maxDeps) { - this.npm.output(`(...and ${info.deps.length - maxDeps} more.)`) - } - } - - if (info.maintainers && info.maintainers.length) { - this.npm.output('') - this.npm.output('maintainers:') - info.maintainers.forEach((u) => this.npm.output('-', u)) - } - - this.npm.output('') - this.npm.output('dist-tags:') - this.npm.output(columns(info.tags)) - - if (info.publisher || info.modified) { - let publishInfo = 'published' - if (info.modified) { - publishInfo += ` ${info.modified}` - } - if (info.publisher) { - publishInfo += ` by ${info.publisher}` - } - this.npm.output('') - this.npm.output(publishInfo) - } - } -} -module.exports = View - -function cleanBlanks (obj) { - const clean = {} - Object.keys(obj).forEach((version) => { - clean[version] = obj[version][''] - }) - return clean -} - -// takes an array of objects and merges them into one object -function reducer (acc, cur) { - if (cur) { - Object.keys(cur).forEach((v) => { - acc[v] = acc[v] || {} - Object.keys(cur[v]).forEach((t) => { - acc[v][t] = cur[v][t] - }) - }) - } - - return acc -} - -// return whatever was printed -function showFields (data, version, fields) { - const o = {} - ;[data, version].forEach((s) => { - Object.keys(s).forEach((k) => { - o[k] = s[k] - }) - }) - - const queryable = new Queryable(o) - const s = queryable.query(fields) - const res = { [version.version]: s } - - if (s) { - return res - } -} - -function cleanup (data) { - if (Array.isArray(data)) { - return data.map(cleanup) - } - - if (!data || typeof data !== 'object') { - return data - } - - const keys = Object.keys(data) - if (keys.length <= 3 && - data.name && - (keys.length === 1 || - (keys.length === 3 && data.email && data.url) || - (keys.length === 2 && (data.email || data.url)))) { - data = unparsePerson(data) - } - - return data -} - -function unparsePerson (d) { - return d.name + - (d.email ? ' <' + d.email + '>' : '') + - (d.url ? ' (' + d.url + ')' : '') -} diff --git a/node_modules/npm/lib/commands/whoami.js b/node_modules/npm/lib/commands/whoami.js deleted file mode 100644 index 154cc87..0000000 --- a/node_modules/npm/lib/commands/whoami.js +++ /dev/null @@ -1,16 +0,0 @@ -const getIdentity = require('../utils/get-identity.js') - -const BaseCommand = require('../base-command.js') -class Whoami extends BaseCommand { - static description = 'Display npm username' - static name = 'whoami' - static params = ['registry'] - - async exec (args) { - const username = await getIdentity(this.npm, { ...this.npm.flatOptions }) - this.npm.output( - this.npm.config.get('json') ? JSON.stringify(username) : username - ) - } -} -module.exports = Whoami diff --git a/node_modules/npm/lib/es6/validate-engines.js b/node_modules/npm/lib/es6/validate-engines.js deleted file mode 100644 index cf5315a..0000000 --- a/node_modules/npm/lib/es6/validate-engines.js +++ /dev/null @@ -1,49 +0,0 @@ -// This is separate to indicate that it should contain code we expect to work in -// all versions of node >= 6. This is a best effort to catch syntax errors to -// give users a good error message if they are using a node version that doesn't -// allow syntax we are using such as private properties, etc. This file is -// linted with ecmaVersion=6 so we don't use invalid syntax, which is set in the -// .eslintrc.local.json file - -const { engines: { node: engines }, version } = require('../../package.json') -const npm = `v${version}` - -module.exports = (process, getCli) => { - const node = process.version - - /* eslint-disable-next-line max-len */ - const unsupportedMessage = `npm ${npm} does not support Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` - - /* eslint-disable-next-line max-len */ - const brokenMessage = `ERROR: npm ${npm} is known not to run on Node.js ${node}. This version of npm supports the following node versions: \`${engines}\`. You can find the latest version at https://nodejs.org/.` - - // coverage ignored because this is only hit in very unsupported node versions - // and it's a best effort attempt to show something nice in those cases - /* istanbul ignore next */ - const syntaxErrorHandler = (err) => { - if (err instanceof SyntaxError) { - // eslint-disable-next-line no-console - console.error(`${brokenMessage}\n\nERROR:`) - // eslint-disable-next-line no-console - console.error(err) - return process.exit(1) - } - throw err - } - - process.on('uncaughtException', syntaxErrorHandler) - process.on('unhandledRejection', syntaxErrorHandler) - - // require this only after setting up the error handlers - const cli = getCli() - return cli(process, { - node, - npm, - engines, - unsupportedMessage, - off: () => { - process.off('uncaughtException', syntaxErrorHandler) - process.off('unhandledRejection', syntaxErrorHandler) - }, - }) -} diff --git a/node_modules/npm/lib/lifecycle-cmd.js b/node_modules/npm/lib/lifecycle-cmd.js deleted file mode 100644 index 848771a..0000000 --- a/node_modules/npm/lib/lifecycle-cmd.js +++ /dev/null @@ -1,19 +0,0 @@ -// The implementation of commands that are just "run a script" -// restart, start, stop, test - -const BaseCommand = require('./base-command.js') -class LifecycleCmd extends BaseCommand { - static usage = ['[-- ]'] - static isShellout = true - static workspaces = true - static ignoreImplicitWorkspace = false - - async exec (args) { - return this.npm.exec('run-script', [this.constructor.name, ...args]) - } - - async execWorkspaces (args) { - return this.npm.exec('run-script', [this.constructor.name, ...args]) - } -} -module.exports = LifecycleCmd diff --git a/node_modules/npm/lib/npm.js b/node_modules/npm/lib/npm.js deleted file mode 100644 index 3322131..0000000 --- a/node_modules/npm/lib/npm.js +++ /dev/null @@ -1,485 +0,0 @@ -const { resolve, dirname, join } = require('path') -const Config = require('@npmcli/config') -const which = require('which') -const fs = require('fs/promises') - -// Patch the global fs module here at the app level -require('graceful-fs').gracefulify(require('fs')) - -const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions') -const usage = require('./utils/npm-usage.js') -const LogFile = require('./utils/log-file.js') -const Timers = require('./utils/timers.js') -const Display = require('./utils/display.js') -const log = require('./utils/log-shim') -const replaceInfo = require('./utils/replace-info.js') -const updateNotifier = require('./utils/update-notifier.js') -const pkg = require('../package.json') -const { deref } = require('./utils/cmd-list.js') - -class Npm { - static get version () { - return pkg.version - } - - static cmd (c) { - const command = deref(c) - if (!command) { - throw Object.assign(new Error(`Unknown command ${c}`), { - code: 'EUNKNOWNCOMMAND', - }) - } - return require(`./commands/${command}.js`) - } - - updateNotification = null - loadErr = null - argv = [] - - #command = null - #runId = new Date().toISOString().replace(/[.:]/g, '_') - #loadPromise = null - #title = 'npm' - #argvClean = [] - #npmRoot = null - #warnedNonDashArg = false - - #chalk = null - #logChalk = null - #noColorChalk = null - - #outputBuffer = [] - #logFile = new LogFile() - #display = new Display() - #timers = new Timers({ - start: 'npm', - listener: (name, ms) => { - const args = ['timing', name, `Completed in ${ms}ms`] - this.#logFile.log(...args) - this.#display.log(...args) - }, - }) - - // all these options are only used by tests in order to make testing more - // closely resemble real world usage. for now, npm has no programmatic API so - // it is ok to add stuff here, but we should not rely on it more than - // necessary. XXX: make these options not necessary by refactoring @npmcli/config - // - npmRoot: this is where npm looks for docs files and the builtin config - // - argv: this allows tests to extend argv in the same way the argv would - // be passed in via a CLI arg. - // - excludeNpmCwd: this is a hack to get @npmcli/config to stop walking up - // dirs to set a local prefix when it encounters the `npmRoot`. this - // allows tests created by tap inside this repo to not set the local - // prefix to `npmRoot` since that is the first dir it would encounter when - // doing implicit detection - constructor ({ npmRoot = dirname(__dirname), argv = [], excludeNpmCwd = false } = {}) { - this.#npmRoot = npmRoot - this.config = new Config({ - npmPath: this.#npmRoot, - definitions, - flatten, - shorthands, - argv: [...process.argv, ...argv], - excludeNpmCwd, - }) - } - - get version () { - return this.constructor.version - } - - setCmd (cmd) { - const Command = Npm.cmd(cmd) - const command = new Command(this) - - // since 'test', 'start', 'stop', etc. commands re-enter this function - // to call the run-script command, we need to only set it one time. - if (!this.#command) { - this.#command = command - process.env.npm_command = this.command - } - - return command - } - - // Call an npm command - // TODO: tests are currently the only time the second - // parameter of args is used. When called via `lib/cli.js` the config is - // loaded and this.argv is set to the remaining command line args. We should - // consider testing the CLI the same way it is used and not allow args to be - // passed in directly. - async exec (cmd, args = this.argv) { - const command = this.setCmd(cmd) - - const timeEnd = this.time(`command:${cmd}`) - - // this is async but we dont await it, since its ok if it doesnt - // finish before the command finishes running. it uses command and argv - // so it must be initiated here, after the command name is set - // eslint-disable-next-line promise/catch-or-return - updateNotifier(this).then((msg) => (this.updateNotification = msg)) - - // Options are prefixed by a hyphen-minus (-, \u2d). - // Other dash-type chars look similar but are invalid. - if (!this.#warnedNonDashArg) { - const nonDashArgs = args.filter(a => /^[\u2010-\u2015\u2212\uFE58\uFE63\uFF0D]/.test(a)) - if (nonDashArgs.length) { - this.#warnedNonDashArg = true - log.error( - 'arg', - 'Argument starts with non-ascii dash, this is probably invalid:', - nonDashArgs.join(', ') - ) - } - } - - return command.cmdExec(args).finally(timeEnd) - } - - async load () { - if (!this.#loadPromise) { - this.#loadPromise = this.time('npm:load', () => this.#load().catch((er) => { - this.loadErr = er - throw er - })) - } - return this.#loadPromise - } - - get loaded () { - return this.config.loaded - } - - // This gets called at the end of the exit handler and - // during any tests to cleanup all of our listeners - // Everything in here should be synchronous - unload () { - this.#timers.off() - this.#display.off() - this.#logFile.off() - } - - time (name, fn) { - return this.#timers.time(name, fn) - } - - writeTimingFile () { - this.#timers.writeFile({ - id: this.#runId, - command: this.#argvClean, - logfiles: this.logFiles, - version: this.version, - }) - } - - get title () { - return this.#title - } - - set title (t) { - process.title = t - this.#title = t - } - - async #load () { - await this.time('npm:load:whichnode', async () => { - // TODO should we throw here? - const node = await which(process.argv[0]).catch(() => {}) - if (node && node.toUpperCase() !== process.execPath.toUpperCase()) { - log.verbose('node symlink', node) - process.execPath = node - this.config.execPath = node - } - }) - - await this.time('npm:load:configload', () => this.config.load()) - - // get createSupportsColor from chalk directly if this lands - // https://github.com/chalk/chalk/pull/600 - const [{ Chalk }, { createSupportsColor }] = await Promise.all([ - import('chalk'), - import('supports-color'), - ]) - this.#noColorChalk = new Chalk({ level: 0 }) - // we get the chalk level based on a null stream meaning chalk will only use - // what it knows about the environment to get color support since we already - // determined in our definitions that we want to show colors. - const level = Math.max(createSupportsColor(null).level, 1) - this.#chalk = this.color ? new Chalk({ level }) : this.#noColorChalk - this.#logChalk = this.logColor ? new Chalk({ level }) : this.#noColorChalk - - // mkdir this separately since the logs dir can be set to - // a different location. if this fails, then we don't have - // a cache dir, but we don't want to fail immediately since - // the command might not need a cache dir (like `npm --version`) - await this.time('npm:load:mkdirpcache', () => - fs.mkdir(this.cache, { recursive: true }) - .catch((e) => log.verbose('cache', `could not create cache: ${e}`))) - - // it's ok if this fails. user might have specified an invalid dir - // which we will tell them about at the end - if (this.config.get('logs-max') > 0) { - await this.time('npm:load:mkdirplogs', () => - fs.mkdir(this.logsDir, { recursive: true }) - .catch((e) => log.verbose('logfile', `could not create logs-dir: ${e}`))) - } - - // note: this MUST be shorter than the actual argv length, because it - // uses the same memory, so node will truncate it if it's too long. - this.time('npm:load:setTitle', () => { - const { parsedArgv: { cooked, remain } } = this.config - this.argv = remain - // Secrets are mostly in configs, so title is set using only the positional args - // to keep those from being leaked. - this.title = ['npm'].concat(replaceInfo(remain)).join(' ').trim() - // The cooked argv is also logged separately for debugging purposes. It is - // cleaned as a best effort by replacing known secrets like basic auth - // password and strings that look like npm tokens. XXX: for this to be - // safer the config should create a sanitized version of the argv as it - // has the full context of what each option contains. - this.#argvClean = replaceInfo(cooked) - log.verbose('title', this.title) - log.verbose('argv', this.#argvClean.map(JSON.stringify).join(' ')) - }) - - this.time('npm:load:display', () => { - this.#display.load({ - // Use logColor since that is based on stderr - color: this.logColor, - chalk: this.logChalk, - progress: this.flatOptions.progress, - silent: this.silent, - timing: this.config.get('timing'), - loglevel: this.config.get('loglevel'), - unicode: this.config.get('unicode'), - heading: this.config.get('heading'), - }) - process.env.COLOR = this.color ? '1' : '0' - }) - - this.time('npm:load:logFile', () => { - this.#logFile.load({ - path: this.logPath, - logsMax: this.config.get('logs-max'), - }) - log.verbose('logfile', this.#logFile.files[0] || 'no logfile created') - }) - - this.time('npm:load:timers', () => - this.#timers.load({ - path: this.config.get('timing') ? this.logPath : null, - }) - ) - - this.time('npm:load:configScope', () => { - const configScope = this.config.get('scope') - if (configScope && !/^@/.test(configScope)) { - this.config.set('scope', `@${configScope}`, this.config.find('scope')) - } - }) - - if (this.config.get('force')) { - log.warn('using --force', 'Recommended protections disabled.') - } - } - - get isShellout () { - return this.#command?.constructor?.isShellout - } - - get command () { - return this.#command?.name - } - - get flatOptions () { - const { flat } = this.config - flat.nodeVersion = process.version - flat.npmVersion = pkg.version - if (this.command) { - flat.npmCommand = this.command - } - return flat - } - - // color and logColor are a special derived values that takes into - // consideration not only the config, but whether or not we are operating - // in a tty with the associated output (stdout/stderr) - get color () { - return this.flatOptions.color - } - - get logColor () { - return this.flatOptions.logColor - } - - get noColorChalk () { - return this.#noColorChalk - } - - get chalk () { - return this.#chalk - } - - get logChalk () { - return this.#logChalk - } - - get global () { - return this.config.get('global') || this.config.get('location') === 'global' - } - - get silent () { - return this.flatOptions.silent - } - - get lockfileVersion () { - return 2 - } - - get unfinishedTimers () { - return this.#timers.unfinished - } - - get finishedTimers () { - return this.#timers.finished - } - - get started () { - return this.#timers.started - } - - get logFiles () { - return this.#logFile.files - } - - get logsDir () { - return this.config.get('logs-dir') || join(this.cache, '_logs') - } - - get logPath () { - return resolve(this.logsDir, `${this.#runId}-`) - } - - get timingFile () { - return this.#timers.file - } - - get npmRoot () { - return this.#npmRoot - } - - get cache () { - return this.config.get('cache') - } - - set cache (r) { - this.config.set('cache', r) - } - - get globalPrefix () { - return this.config.globalPrefix - } - - set globalPrefix (r) { - this.config.globalPrefix = r - } - - get localPrefix () { - return this.config.localPrefix - } - - set localPrefix (r) { - this.config.localPrefix = r - } - - get localPackage () { - return this.config.localPackage - } - - get globalDir () { - return process.platform !== 'win32' - ? resolve(this.globalPrefix, 'lib', 'node_modules') - : resolve(this.globalPrefix, 'node_modules') - } - - get localDir () { - return resolve(this.localPrefix, 'node_modules') - } - - get dir () { - return this.global ? this.globalDir : this.localDir - } - - get globalBin () { - const b = this.globalPrefix - return process.platform !== 'win32' ? resolve(b, 'bin') : b - } - - get localBin () { - return resolve(this.dir, '.bin') - } - - get bin () { - return this.global ? this.globalBin : this.localBin - } - - get prefix () { - return this.global ? this.globalPrefix : this.localPrefix - } - - set prefix (r) { - const k = this.global ? 'globalPrefix' : 'localPrefix' - this[k] = r - } - - get usage () { - return usage(this) - } - - // output to stdout in a progress bar compatible way - output (...msg) { - log.clearProgress() - // eslint-disable-next-line no-console - console.log(...msg) - log.showProgress() - } - - outputBuffer (item) { - this.#outputBuffer.push(item) - } - - flushOutput (jsonError) { - if (!jsonError && !this.#outputBuffer.length) { - return - } - - if (this.config.get('json')) { - const jsonOutput = this.#outputBuffer.reduce((acc, item) => { - if (typeof item === 'string') { - // try to parse it as json in case its a string - try { - item = JSON.parse(item) - } catch { - return acc - } - } - return { ...acc, ...item } - }, {}) - this.output(JSON.stringify({ ...jsonOutput, ...jsonError }, null, 2)) - } else { - for (const item of this.#outputBuffer) { - this.output(item) - } - } - - this.#outputBuffer.length = 0 - } - - outputError (...msg) { - log.clearProgress() - // eslint-disable-next-line no-console - console.error(...msg) - log.showProgress() - } -} -module.exports = Npm diff --git a/node_modules/npm/lib/package-url-cmd.js b/node_modules/npm/lib/package-url-cmd.js deleted file mode 100644 index 250b46e..0000000 --- a/node_modules/npm/lib/package-url-cmd.js +++ /dev/null @@ -1,65 +0,0 @@ -// Base command for opening urls from a package manifest (bugs, docs, repo) - -const pacote = require('pacote') -const hostedGitInfo = require('hosted-git-info') - -const openUrl = require('./utils/open-url.js') -const log = require('./utils/log-shim') - -const BaseCommand = require('./base-command.js') -class PackageUrlCommand extends BaseCommand { - static params = [ - 'browser', - 'registry', - 'workspace', - 'workspaces', - 'include-workspace-root', - ] - - static workspaces = true - static ignoreImplicitWorkspace = false - static usage = ['[ [ ...]]'] - - async exec (args) { - if (!args || !args.length) { - args = ['.'] - } - - for (const arg of args) { - // XXX It is very odd that `where` is how pacote knows to look anywhere - // other than the cwd. - const opts = { - ...this.npm.flatOptions, - where: this.npm.localPrefix, - fullMetadata: true, - } - const mani = await pacote.manifest(arg, opts) - const url = this.getUrl(arg, mani) - log.silly(this.name, 'url', url) - await openUrl(this.npm, url, `${mani.name} ${this.name} available at the following URL`) - } - } - - async execWorkspaces (args) { - if (args && args.length) { - return this.exec(args) - } - await this.setWorkspaces() - return this.exec(this.workspacePaths) - } - - // given a manifest, try to get the hosted git info from it based on - // repository (if a string) or repository.url (if an object) returns null - // if it's not a valid repo, or not a known hosted repo - hostedFromMani (mani) { - const r = mani.repository - const rurl = !r ? null - : typeof r === 'string' ? r - : typeof r === 'object' && typeof r.url === 'string' ? r.url - : null - - // hgi returns undefined sometimes, but let's always return null here - return (rurl && hostedGitInfo.fromUrl(rurl.replace(/^git\+/, ''))) || null - } -} -module.exports = PackageUrlCommand diff --git a/node_modules/npm/lib/utils/audit-error.js b/node_modules/npm/lib/utils/audit-error.js deleted file mode 100644 index aaf3556..0000000 --- a/node_modules/npm/lib/utils/audit-error.js +++ /dev/null @@ -1,40 +0,0 @@ -const log = require('./log-shim') -const replaceInfo = require('./replace-info.js') - -// print an error or just nothing if the audit report has an error -// this is called by the audit command, and by the reify-output util -// prints a JSON version of the error if it's --json -// returns 'true' if there was an error, false otherwise - -const auditError = (npm, report) => { - if (!report || !report.error) { - return false - } - - if (npm.command !== 'audit') { - return true - } - - const { error } = report - - // ok, we care about it, then - log.warn('audit', error.message) - const { body: errBody } = error - const body = Buffer.isBuffer(errBody) ? errBody.toString() : errBody - if (npm.flatOptions.json) { - npm.output(JSON.stringify({ - message: error.message, - method: error.method, - uri: replaceInfo(error.uri), - headers: error.headers, - statusCode: error.statusCode, - body, - }, null, 2)) - } else { - npm.output(body) - } - - throw 'audit endpoint returned an error' -} - -module.exports = auditError diff --git a/node_modules/npm/lib/utils/auth.js b/node_modules/npm/lib/utils/auth.js deleted file mode 100644 index 729ce32..0000000 --- a/node_modules/npm/lib/utils/auth.js +++ /dev/null @@ -1,100 +0,0 @@ -const profile = require('npm-profile') -const log = require('../utils/log-shim') -const openUrlPrompt = require('../utils/open-url-prompt.js') -const read = require('../utils/read-user-info.js') -const otplease = require('../utils/otplease.js') - -const adduser = async (npm, { creds, ...opts }) => { - const authType = npm.config.get('auth-type') - let res - if (authType === 'web') { - try { - res = await profile.adduserWeb((url, emitter) => { - openUrlPrompt( - npm, - url, - 'Create your account at', - 'Press ENTER to open in the browser...', - emitter - ) - }, opts) - } catch (err) { - if (err.code === 'ENYI') { - log.verbose('web add user not supported, trying couch') - } else { - throw err - } - } - } - - // auth type !== web or ENYI error w/ web adduser - if (!res) { - const username = await read.username('Username:', creds.username) - const password = await read.password('Password:', creds.password) - const email = await read.email('Email: (this IS public) ', creds.email) - // npm registry quirk: If you "add" an existing user with their current - // password, it's effectively a login, and if that account has otp you'll - // be prompted for it. - res = await otplease(npm, opts, (reqOpts) => - profile.adduserCouch(username, email, password, opts) - ) - } - - // We don't know the username if it was a web login, all we can reliably log is scope and registry - const message = `Logged in${opts.scope ? ` to scope ${opts.scope}` : ''} on ${opts.registry}.` - - log.info('adduser', message) - - return { - message, - newCreds: { token: res.token }, - } -} - -const login = async (npm, { creds, ...opts }) => { - const authType = npm.config.get('auth-type') - let res - if (authType === 'web') { - try { - res = await profile.loginWeb((url, emitter) => { - openUrlPrompt( - npm, - url, - 'Login at', - 'Press ENTER to open in the browser...', - emitter - ) - }, opts) - } catch (err) { - if (err.code === 'ENYI') { - log.verbose('web login not supported, trying couch') - } else { - throw err - } - } - } - - // auth type !== web or ENYI error w/ web login - if (!res) { - const username = await read.username('Username:', creds.username) - const password = await read.password('Password:', creds.password) - res = await otplease(npm, opts, (reqOpts) => - profile.loginCouch(username, password, reqOpts) - ) - } - - // We don't know the username if it was a web login, all we can reliably log is scope and registry - const message = `Logged in${opts.scope ? ` to scope ${opts.scope}` : ''} on ${opts.registry}.` - - log.info('login', message) - - return { - message, - newCreds: { token: res.token }, - } -} - -module.exports = { - adduser, - login, -} diff --git a/node_modules/npm/lib/utils/cmd-list.js b/node_modules/npm/lib/utils/cmd-list.js deleted file mode 100644 index 9017b2b..0000000 --- a/node_modules/npm/lib/utils/cmd-list.js +++ /dev/null @@ -1,178 +0,0 @@ -const abbrev = require('abbrev') - -// These correspond to filenames in lib/commands -// Please keep this list sorted alphabetically -const commands = [ - 'access', - 'adduser', - 'audit', - 'bugs', - 'cache', - 'ci', - 'completion', - 'config', - 'dedupe', - 'deprecate', - 'diff', - 'dist-tag', - 'docs', - 'doctor', - 'edit', - 'exec', - 'explain', - 'explore', - 'find-dupes', - 'fund', - 'get', - 'help', - 'help-search', - 'hook', - 'init', - 'install', - 'install-ci-test', - 'install-test', - 'link', - 'll', - 'login', - 'logout', - 'ls', - 'org', - 'outdated', - 'owner', - 'pack', - 'ping', - 'pkg', - 'prefix', - 'profile', - 'prune', - 'publish', - 'query', - 'rebuild', - 'repo', - 'restart', - 'root', - 'run-script', - 'sbom', - 'search', - 'set', - 'shrinkwrap', - 'star', - 'stars', - 'start', - 'stop', - 'team', - 'test', - 'token', - 'uninstall', - 'unpublish', - 'unstar', - 'update', - 'version', - 'view', - 'whoami', -] - -// These must resolve to an entry in commands -const aliases = { - - // aliases - author: 'owner', - home: 'docs', - issues: 'bugs', - info: 'view', - show: 'view', - find: 'search', - add: 'install', - unlink: 'uninstall', - remove: 'uninstall', - rm: 'uninstall', - r: 'uninstall', - - // short names for common things - un: 'uninstall', - rb: 'rebuild', - list: 'ls', - ln: 'link', - create: 'init', - i: 'install', - it: 'install-test', - cit: 'install-ci-test', - up: 'update', - c: 'config', - s: 'search', - se: 'search', - tst: 'test', - t: 'test', - ddp: 'dedupe', - v: 'view', - run: 'run-script', - 'clean-install': 'ci', - 'clean-install-test': 'install-ci-test', - x: 'exec', - why: 'explain', - la: 'll', - verison: 'version', - ic: 'ci', - - // typos - innit: 'init', - // manually abbrev so that install-test doesn't make insta stop working - in: 'install', - ins: 'install', - inst: 'install', - insta: 'install', - instal: 'install', - isnt: 'install', - isnta: 'install', - isntal: 'install', - isntall: 'install', - 'install-clean': 'ci', - 'isntall-clean': 'ci', - hlep: 'help', - 'dist-tags': 'dist-tag', - upgrade: 'update', - udpate: 'update', - rum: 'run-script', - sit: 'install-ci-test', - urn: 'run-script', - ogr: 'org', - 'add-user': 'adduser', -} - -const deref = (c) => { - if (!c) { - return - } - - // Translate camelCase to snake-case (i.e. installTest to install-test) - if (c.match(/[A-Z]/)) { - c = c.replace(/([A-Z])/g, m => '-' + m.toLowerCase()) - } - - // if they asked for something exactly we are done - if (commands.includes(c)) { - return c - } - - // if they asked for a direct alias - if (aliases[c]) { - return aliases[c] - } - - const abbrevs = abbrev(commands.concat(Object.keys(aliases))) - - // first deref the abbrev, if there is one - // then resolve any aliases - // so `npm install-cl` will resolve to `install-clean` then to `ci` - let a = abbrevs[c] - while (aliases[a]) { - a = aliases[a] - } - return a -} - -module.exports = { - aliases, - commands, - deref, -} diff --git a/node_modules/npm/lib/utils/completion.fish b/node_modules/npm/lib/utils/completion.fish deleted file mode 100644 index 5e274ad..0000000 --- a/node_modules/npm/lib/utils/completion.fish +++ /dev/null @@ -1,40 +0,0 @@ -# npm completions for Fish shell -# This script is a work in progress and does not fall under the normal semver contract as the rest of npm. - -# __fish_npm_needs_command taken from: -# https://stackoverflow.com/questions/16657803/creating-autocomplete-script-with-sub-commands -function __fish_npm_needs_command - set -l cmd (commandline -opc) - - if test (count $cmd) -eq 1 - return 0 - end - - return 1 -end - -# Taken from https://github.com/fish-shell/fish-shell/blob/HEAD/share/completions/npm.fish -function __fish_complete_npm -d "Complete the commandline using npm's 'completion' tool" - # tell npm we are fish shell - set -lx COMP_FISH true - if command -sq npm - # npm completion is bash-centric, so we need to translate fish's "commandline" stuff to bash's $COMP_* stuff - # COMP_LINE is an array with the words in the commandline - set -lx COMP_LINE (commandline -opc) - # COMP_CWORD is the index of the current word in COMP_LINE - # bash starts arrays with 0, so subtract 1 - set -lx COMP_CWORD (math (count $COMP_LINE) - 1) - # COMP_POINT is the index of point/cursor when the commandline is viewed as a string - set -lx COMP_POINT (commandline -C) - # If the cursor is after the last word, the empty token will disappear in the expansion - # Readd it - if test (commandline -ct) = "" - set COMP_CWORD (math $COMP_CWORD + 1) - set COMP_LINE $COMP_LINE "" - end - command npm completion -- $COMP_LINE 2>/dev/null - end -end - -# flush out what ships with fish -complete -e npm diff --git a/node_modules/npm/lib/utils/completion.sh b/node_modules/npm/lib/utils/completion.sh deleted file mode 100755 index a3e5143..0000000 --- a/node_modules/npm/lib/utils/completion.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -###-begin-npm-completion-### -# -# npm command completion script -# -# Installation: npm completion >> ~/.bashrc (or ~/.zshrc) -# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm -# - -if type complete &>/dev/null; then - _npm_completion () { - local words cword - if type _get_comp_words_by_ref &>/dev/null; then - _get_comp_words_by_ref -n = -n @ -n : -w words -i cword - else - cword="$COMP_CWORD" - words=("${COMP_WORDS[@]}") - fi - - local si="$IFS" - if ! IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \ - COMP_LINE="$COMP_LINE" \ - COMP_POINT="$COMP_POINT" \ - npm completion -- "${words[@]}" \ - 2>/dev/null)); then - local ret=$? - IFS="$si" - return $ret - fi - IFS="$si" - if type __ltrim_colon_completions &>/dev/null; then - __ltrim_colon_completions "${words[cword]}" - fi - } - complete -o default -F _npm_completion npm -elif type compdef &>/dev/null; then - _npm_completion() { - local si=$IFS - compadd -- $(COMP_CWORD=$((CURRENT-1)) \ - COMP_LINE=$BUFFER \ - COMP_POINT=0 \ - npm completion -- "${words[@]}" \ - 2>/dev/null) - IFS=$si - } - compdef _npm_completion npm -elif type compctl &>/dev/null; then - _npm_completion () { - local cword line point words si - read -Ac words - read -cn cword - let cword-=1 - read -l line - read -ln point - si="$IFS" - if ! IFS=$'\n' reply=($(COMP_CWORD="$cword" \ - COMP_LINE="$line" \ - COMP_POINT="$point" \ - npm completion -- "${words[@]}" \ - 2>/dev/null)); then - - local ret=$? - IFS="$si" - return $ret - fi - IFS="$si" - } - compctl -K _npm_completion npm -fi -###-end-npm-completion-### diff --git a/node_modules/npm/lib/utils/completion/installed-deep.js b/node_modules/npm/lib/utils/completion/installed-deep.js deleted file mode 100644 index 045708f..0000000 --- a/node_modules/npm/lib/utils/completion/installed-deep.js +++ /dev/null @@ -1,45 +0,0 @@ -const { resolve } = require('path') -const localeCompare = require('@isaacs/string-locale-compare')('en') - -const installedDeep = async (npm) => { - const Arborist = require('@npmcli/arborist') - const { - depth, - global, - prefix, - workspacesEnabled, - } = npm.flatOptions - - const getValues = (tree) => - [...tree.inventory.values()] - .filter(i => i.location !== '' && !i.isRoot) - .map(i => { - return i - }) - .filter(i => (i.depth - 1) <= depth) - .sort((a, b) => (a.depth - b.depth) || localeCompare(a.name, b.name)) - - const res = new Set() - const gArb = new Arborist({ - global: true, - path: resolve(npm.globalDir, '..'), - workspacesEnabled, - }) - const gTree = await gArb.loadActual({ global: true }) - - for (const node of getValues(gTree)) { - res.add(global ? node.name : [node.name, '-g']) - } - - if (!global) { - const arb = new Arborist({ global: false, path: prefix, workspacesEnabled }) - const tree = await arb.loadActual() - for (const node of getValues(tree)) { - res.add(node.name) - } - } - - return [...res] -} - -module.exports = installedDeep diff --git a/node_modules/npm/lib/utils/completion/installed-shallow.js b/node_modules/npm/lib/utils/completion/installed-shallow.js deleted file mode 100644 index d59318f..0000000 --- a/node_modules/npm/lib/utils/completion/installed-shallow.js +++ /dev/null @@ -1,19 +0,0 @@ -const { readdirScoped } = require('@npmcli/fs') - -const installedShallow = async (npm, opts) => { - const names = async global => { - const paths = await readdirScoped(global ? npm.globalDir : npm.localDir) - return paths.map(p => p.replace(/\\/g, '/')) - } - const { conf: { argv: { remain } } } = opts - if (remain.length > 3) { - return null - } - - const { global } = npm.flatOptions - const locals = global ? [] : await names(false) - const globals = (await names(true)).map(n => global ? n : `${n} -g`) - return [...locals, ...globals] -} - -module.exports = installedShallow diff --git a/node_modules/npm/lib/utils/did-you-mean.js b/node_modules/npm/lib/utils/did-you-mean.js deleted file mode 100644 index ff3c812..0000000 --- a/node_modules/npm/lib/utils/did-you-mean.js +++ /dev/null @@ -1,40 +0,0 @@ -const Npm = require('../npm') -const { distance } = require('fastest-levenshtein') -const pkgJson = require('@npmcli/package-json') -const { commands } = require('./cmd-list.js') - -const didYouMean = async (path, scmd) => { - const close = commands.filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && scmd !== cmd) - let best = [] - for (const str of close) { - const cmd = Npm.cmd(str) - best.push(` npm ${str} # ${cmd.description}`) - } - // We would already be suggesting this in `npm x` so omit them here - const runScripts = ['stop', 'start', 'test', 'restart'] - try { - const { content: { scripts, bin } } = await pkgJson.normalize(path) - best = best.concat( - Object.keys(scripts || {}) - .filter(cmd => distance(scmd, cmd) < scmd.length * 0.4 && !runScripts.includes(cmd)) - .map(str => ` npm run ${str} # run the "${str}" package script`), - Object.keys(bin || {}) - .filter(cmd => distance(scmd, cmd) < scmd.length * 0.4) - /* eslint-disable-next-line max-len */ - .map(str => ` npm exec ${str} # run the "${str}" command from either this or a remote npm package`) - ) - } catch (_) { - // gracefully ignore not being in a folder w/ a package.json - } - - if (best.length === 0) { - return '' - } - - const suggestion = - best.length === 1 - ? `\n\nDid you mean this?\n${best[0]}` - : `\n\nDid you mean one of these?\n${best.slice(0, 3).join('\n')}` - return suggestion -} -module.exports = didYouMean diff --git a/node_modules/npm/lib/utils/display.js b/node_modules/npm/lib/utils/display.js deleted file mode 100644 index a41bf90..0000000 --- a/node_modules/npm/lib/utils/display.js +++ /dev/null @@ -1,126 +0,0 @@ -const { inspect } = require('util') -const npmlog = require('npmlog') -const log = require('./log-shim.js') -const { explain } = require('./explain-eresolve.js') - -class Display { - #chalk = null - - constructor () { - // pause by default until config is loaded - this.on() - log.pause() - } - - on () { - process.on('log', this.#logHandler) - } - - off () { - process.off('log', this.#logHandler) - // Unbalanced calls to enable/disable progress - // will leave change listeners on the tracker - // This pretty much only happens in tests but - // this removes the event emitter listener warnings - log.tracker.removeAllListeners() - } - - load (config) { - const { - color, - chalk, - timing, - loglevel, - unicode, - progress, - silent, - heading = 'npm', - } = config - - this.#chalk = chalk - - // npmlog is still going away someday, so this is a hack to dynamically - // set the loglevel of timing based on the timing flag, instead of making - // a breaking change to npmlog. The result is that timing logs are never - // shown except when the --timing flag is set. We also need to change - // the index of the silly level since otherwise it is set to -Infinity - // and we can't go any lower than that. silent is still set to Infinify - // because we DO want silent to hide timing levels. This allows for the - // special case of getting timing information while hiding all CLI output - // in order to get perf information that might be affected by writing to - // a terminal. XXX(npmlog): this will be removed along with npmlog - log.levels.silly = -10000 - log.levels.timing = log.levels[loglevel] + (timing ? 1 : -1) - - log.level = loglevel - log.heading = heading - - if (color) { - log.enableColor() - } else { - log.disableColor() - } - - if (unicode) { - log.enableUnicode() - } else { - log.disableUnicode() - } - - // if it's silent, don't show progress - if (progress && !silent) { - log.enableProgress() - } else { - log.disableProgress() - } - - // Resume displaying logs now that we have config - log.resume() - } - - log (...args) { - this.#logHandler(...args) - } - - #logHandler = (level, ...args) => { - try { - this.#log(level, ...args) - } catch (ex) { - try { - // if it crashed once, it might again! - this.#npmlog('verbose', `attempt to log ${inspect(args)} crashed`, ex) - } catch (ex2) { - // eslint-disable-next-line no-console - console.error(`attempt to log ${inspect(args)} crashed`, ex, ex2) - } - } - } - - #log (...args) { - return this.#eresolveWarn(...args) || this.#npmlog(...args) - } - - // Explicitly call these on npmlog and not log shim - // This is the final place we should call npmlog before removing it. - #npmlog (level, ...args) { - npmlog[level](...args) - } - - // Also (and this is a really inexcusable kludge), we patch the - // log.warn() method so that when we see a peerDep override - // explanation from Arborist, we can replace the object with a - // highly abbreviated explanation of what's being overridden. - #eresolveWarn (level, heading, message, expl) { - if (level === 'warn' && - heading === 'ERESOLVE' && - expl && typeof expl === 'object' - ) { - this.#npmlog(level, heading, message) - this.#npmlog(level, '', explain(expl, this.#chalk, 2)) - // Return true to short circuit other log in chain - return true - } - } -} - -module.exports = Display diff --git a/node_modules/npm/lib/utils/error-message.js b/node_modules/npm/lib/utils/error-message.js deleted file mode 100644 index e3d6c35..0000000 --- a/node_modules/npm/lib/utils/error-message.js +++ /dev/null @@ -1,435 +0,0 @@ -const { format } = require('util') -const { resolve } = require('path') -const nameValidator = require('validate-npm-package-name') -const replaceInfo = require('./replace-info.js') -const { report } = require('./explain-eresolve.js') -const log = require('./log-shim') - -const messageText = msg => msg.map(line => line.slice(1).join(' ')).join('\n') - -const jsonError = (er, npm, { summary, detail }) => { - if (npm?.config.loaded && npm.config.get('json')) { - return { - error: { - code: er.code, - summary: messageText(summary), - detail: messageText(detail), - }, - } - } -} - -const errorMessage = (er, npm) => { - const short = [] - const detail = [] - const files = [] - - if (er.message) { - er.message = replaceInfo(er.message) - } - if (er.stack) { - er.stack = replaceInfo(er.stack) - } - - switch (er.code) { - case 'ERESOLVE': { - short.push(['ERESOLVE', er.message]) - detail.push(['', '']) - // XXX(display): error messages are logged so we use the logColor since that is based - // on stderr. This should be handled solely by the display layer so it could also be - // printed to stdout if necessary. - const { explanation, file } = report(er, npm.logChalk, npm.noColorChalk) - detail.push(['', explanation]) - files.push(['eresolve-report.txt', file]) - break - } - - case 'ENOLOCK': { - const cmd = npm.command || '' - short.push([cmd, 'This command requires an existing lockfile.']) - detail.push([cmd, 'Try creating one first with: npm i --package-lock-only']) - detail.push([cmd, `Original error: ${er.message}`]) - break - } - - case 'ENOAUDIT': - short.push(['audit', er.message]) - break - - case 'ECONNREFUSED': - short.push(['', er]) - detail.push([ - '', - [ - '\nIf you are behind a proxy, please make sure that the', - "'proxy' config is set properly. See: 'npm help config'", - ].join('\n'), - ]) - break - - case 'EACCES': - case 'EPERM': { - const isCachePath = - typeof er.path === 'string' && - npm.config.loaded && - er.path.startsWith(npm.config.get('cache')) - const isCacheDest = - typeof er.dest === 'string' && - npm.config.loaded && - er.dest.startsWith(npm.config.get('cache')) - - const { isWindows } = require('./is-windows.js') - - if (!isWindows && (isCachePath || isCacheDest)) { - // user probably doesn't need this, but still add it to the debug log - log.verbose(er.stack) - short.push([ - '', - [ - '', - 'Your cache folder contains root-owned files, due to a bug in', - 'previous versions of npm which has since been addressed.', - '', - 'To permanently fix this problem, please run:', - ` sudo chown -R ${process.getuid()}:${process.getgid()} ${JSON.stringify( - npm.config.get('cache') - )}`, - ].join('\n'), - ]) - } else { - short.push(['', er]) - detail.push([ - '', - [ - '\nThe operation was rejected by your operating system.', - isWindows - /* eslint-disable-next-line max-len */ - ? "It's possible that the file was already in use (by a text editor or antivirus),\n" + - 'or that you lack permissions to access it.' - /* eslint-disable-next-line max-len */ - : 'It is likely you do not have the permissions to access this file as the current user', - '\nIf you believe this might be a permissions issue, please double-check the', - 'permissions of the file and its containing directories, or try running', - 'the command again as root/Administrator.', - ].join('\n'), - ]) - } - break - } - - case 'ENOGIT': - short.push(['', er.message]) - detail.push([ - '', - ['', 'Failed using git.', 'Please check if you have git installed and in your PATH.'].join( - '\n' - ), - ]) - break - - case 'EJSONPARSE': - // Check whether we ran into a conflict in our own package.json - if (er.path === resolve(npm.prefix, 'package.json')) { - const { isDiff } = require('parse-conflict-json') - const txt = require('fs').readFileSync(er.path, 'utf8').replace(/\r\n/g, '\n') - if (isDiff(txt)) { - detail.push([ - '', - [ - 'Merge conflict detected in your package.json.', - '', - 'Please resolve the package.json conflict and retry.', - ].join('\n'), - ]) - break - } - } - short.push(['JSON.parse', er.message]) - detail.push([ - 'JSON.parse', - [ - 'Failed to parse JSON data.', - 'Note: package.json must be actual JSON, not just JavaScript.', - ].join('\n'), - ]) - break - - case 'EOTP': - case 'E401': - // E401 is for places where we accidentally neglect OTP stuff - if (er.code === 'EOTP' || /one-time pass/.test(er.message)) { - short.push(['', 'This operation requires a one-time password from your authenticator.']) - detail.push([ - '', - [ - 'You can provide a one-time password by passing --otp= to the command you ran.', - 'If you already provided a one-time password then it is likely that you either typoed', - 'it, or it timed out. Please try again.', - ].join('\n'), - ]) - } else { - // npm ERR! code E401 - // npm ERR! Unable to authenticate, need: Basic - const auth = - !er.headers || !er.headers['www-authenticate'] - ? [] - : er.headers['www-authenticate'].map(au => au.split(/[,\s]+/))[0] - - if (auth.includes('Bearer')) { - short.push([ - '', - 'Unable to authenticate, your authentication token seems to be invalid.', - ]) - detail.push([ - '', - ['To correct this please try logging in again with:', ' npm login'].join('\n'), - ]) - } else if (auth.includes('Basic')) { - short.push(['', 'Incorrect or missing password.']) - detail.push([ - '', - [ - 'If you were trying to login, change your password, create an', - 'authentication token or enable two-factor authentication then', - 'that means you likely typed your password in incorrectly.', - 'Please try again, or recover your password at:', - ' https://www.npmjs.com/forgot', - '', - 'If you were doing some other operation then your saved credentials are', - 'probably out of date. To correct this please try logging in again with:', - ' npm login', - ].join('\n'), - ]) - } else { - short.push(['', er.message || er]) - } - } - break - - case 'E404': - // There's no need to have 404 in the message as well. - short.push(['404', er.message.replace(/^404\s+/, '')]) - if (er.pkgid && er.pkgid !== '-') { - const pkg = er.pkgid.replace(/(?!^)@.*$/, '') - - detail.push(['404', '']) - detail.push(['404', '', `'${replaceInfo(er.pkgid)}' is not in this registry.`]) - - const valResult = nameValidator(pkg) - - if (!valResult.validForNewPackages) { - detail.push(['404', 'This package name is not valid, because', '']) - - const errorsArray = [...(valResult.errors || []), ...(valResult.warnings || [])] - errorsArray.forEach((item, idx) => detail.push(['404', ' ' + (idx + 1) + '. ' + item])) - } - - detail.push(['404', '\nNote that you can also install from a']) - detail.push(['404', 'tarball, folder, http url, or git url.']) - } - break - - case 'EPUBLISHCONFLICT': - short.push(['publish fail', 'Cannot publish over existing version.']) - detail.push(['publish fail', "Update the 'version' field in package.json and try again."]) - detail.push(['publish fail', '']) - detail.push(['publish fail', 'To automatically increment version numbers, see:']) - detail.push(['publish fail', ' npm help version']) - break - - case 'EISGIT': - short.push(['git', er.message]) - short.push(['git', ' ' + er.path]) - detail.push([ - 'git', - ['Refusing to remove it. Update manually,', 'or move it out of the way first.'].join('\n'), - ]) - break - - case 'EBADPLATFORM': { - const actual = er.current - const expected = { ...er.required } - const checkedKeys = [] - for (const key in expected) { - if (Array.isArray(expected[key]) && expected[key].length > 0) { - expected[key] = expected[key].join(',') - checkedKeys.push(key) - } else if (expected[key] === undefined || - Array.isArray(expected[key]) && expected[key].length === 0) { - delete expected[key] - delete actual[key] - } else { - checkedKeys.push(key) - } - } - - const longestKey = Math.max(...checkedKeys.map((key) => key.length)) - const detailEntry = [] - for (const key of checkedKeys) { - const padding = key.length === longestKey - ? 1 - : 1 + (longestKey - key.length) - - // padding + 1 because 'actual' is longer than 'valid' - detailEntry.push(`Valid ${key}:${' '.repeat(padding + 1)}${expected[key]}`) - detailEntry.push(`Actual ${key}:${' '.repeat(padding)}${actual[key]}`) - } - - short.push([ - 'notsup', - [ - format( - 'Unsupported platform for %s: wanted %j (current: %j)', - er.pkgid, - expected, - actual - ), - ].join('\n'), - ]) - detail.push([ - 'notsup', - detailEntry.join('\n'), - ]) - break - } - - case 'EEXIST': - short.push(['', er.message]) - short.push(['', 'File exists: ' + (er.dest || er.path)]) - detail.push(['', 'Remove the existing file and try again, or run npm']) - detail.push(['', 'with --force to overwrite files recklessly.']) - break - - case 'ENEEDAUTH': - short.push(['need auth', er.message]) - detail.push(['need auth', 'You need to authorize this machine using `npm adduser`']) - break - - case 'ECONNRESET': - case 'ENOTFOUND': - case 'ETIMEDOUT': - case 'ERR_SOCKET_TIMEOUT': - case 'EAI_FAIL': - short.push(['network', er.message]) - detail.push([ - 'network', - [ - 'This is a problem related to network connectivity.', - 'In most cases you are behind a proxy or have bad network settings.', - '\nIf you are behind a proxy, please make sure that the', - "'proxy' config is set properly. See: 'npm help config'", - ].join('\n'), - ]) - break - - case 'ETARGET': - short.push(['notarget', er.message]) - detail.push([ - 'notarget', - [ - 'In most cases you or one of your dependencies are requesting', - "a package version that doesn't exist.", - ].join('\n'), - ]) - break - - case 'E403': - short.push(['403', er.message]) - detail.push([ - '403', - [ - 'In most cases, you or one of your dependencies are requesting', - 'a package version that is forbidden by your security policy, or', - 'on a server you do not have access to.', - ].join('\n'), - ]) - break - - case 'EBADENGINE': - short.push(['engine', er.message]) - short.push(['engine', 'Not compatible with your version of node/npm: ' + er.pkgid]) - detail.push([ - 'notsup', - [ - 'Not compatible with your version of node/npm: ' + er.pkgid, - 'Required: ' + JSON.stringify(er.required), - 'Actual: ' + - JSON.stringify({ - npm: npm.version, - node: process.version, - }), - ].join('\n'), - ]) - break - - case 'ENOSPC': - short.push(['nospc', er.message]) - detail.push([ - 'nospc', - [ - 'There appears to be insufficient space on your system to finish.', - 'Clear up some disk space and try again.', - ].join('\n'), - ]) - break - - case 'EROFS': - short.push(['rofs', er.message]) - detail.push([ - 'rofs', - [ - 'Often virtualized file systems, or other file systems', - "that don't support symlinks, give this error.", - ].join('\n'), - ]) - break - - case 'ENOENT': - short.push(['enoent', er.message]) - detail.push([ - 'enoent', - [ - 'This is related to npm not being able to find a file.', - er.file ? "\nCheck if the file '" + er.file + "' is present." : '', - ].join('\n'), - ]) - break - - case 'EMISSINGARG': - case 'EUNKNOWNTYPE': - case 'EINVALIDTYPE': - case 'ETOOMANYARGS': - short.push(['typeerror', er.stack]) - detail.push([ - 'typeerror', - [ - 'This is an error with npm itself. Please report this error at:', - ' https://github.com/npm/cli/issues', - ].join('\n'), - ]) - break - - default: - short.push(['', er.message || er]) - if (er.signal) { - detail.push(['signal', er.signal]) - } - - if (er.cmd && Array.isArray(er.args)) { - detail.push(['command', ...[er.cmd, ...er.args.map(replaceInfo)]]) - } - - if (er.stdout) { - detail.push(['', er.stdout.trim()]) - } - - if (er.stderr) { - detail.push(['', er.stderr.trim()]) - } - - break - } - return { summary: short, detail, files, json: jsonError(er, npm, { summary: short, detail }) } -} - -module.exports = errorMessage diff --git a/node_modules/npm/lib/utils/exit-handler.js b/node_modules/npm/lib/utils/exit-handler.js deleted file mode 100644 index 25cecd1..0000000 --- a/node_modules/npm/lib/utils/exit-handler.js +++ /dev/null @@ -1,227 +0,0 @@ -const os = require('os') -const fs = require('fs') - -const log = require('./log-shim.js') -const errorMessage = require('./error-message.js') -const replaceInfo = require('./replace-info.js') - -let npm = null // set by the cli -let exitHandlerCalled = false -let showLogFileError = false - -process.on('exit', code => { - log.disableProgress() - - // process.emit is synchronous, so the timeEnd handler will run before the - // unfinished timer check below - process.emit('timeEnd', 'npm') - - const hasLoadedNpm = npm?.config.loaded - - // Unfinished timers can be read before config load - if (npm) { - for (const [name, timer] of npm.unfinishedTimers) { - log.verbose('unfinished npm timer', name, timer) - } - } - - if (!code) { - log.info('ok') - } else { - log.verbose('code', code) - } - - if (!exitHandlerCalled) { - process.exitCode = code || 1 - log.error('', 'Exit handler never called!') - // eslint-disable-next-line no-console - console.error('') - log.error('', 'This is an error with npm itself. Please report this error at:') - log.error('', ' ') - showLogFileError = true - } - - // npm must be loaded to know where the log file was written - if (hasLoadedNpm) { - // write the timing file now, this might do nothing based on the configs set. - // we need to call it here in case it errors so we dont tell the user - // about a timing file that doesn't exist - npm.writeTimingFile() - - const logsDir = npm.logsDir - const logFiles = npm.logFiles - - const timingDir = npm.timingDir - const timingFile = npm.timingFile - - const timing = npm.config.get('timing') - const logsMax = npm.config.get('logs-max') - - // Determine whether to show log file message and why it is - // being shown since in timing mode we always show the log file message - const logMethod = showLogFileError ? 'error' : timing ? 'info' : null - - if (logMethod) { - if (!npm.silent) { - // just a line break if not in silent mode - // eslint-disable-next-line no-console - console.error('') - } - - const message = [] - - if (timingFile) { - message.push(`Timing info written to: ${timingFile}`) - } else if (timing) { - message.push( - `The timing file was not written due to an error writing to the directory: ${timingDir}` - ) - } - - if (logFiles.length) { - message.push(`A complete log of this run can be found in: ${logFiles}`) - } else if (logsMax <= 0) { - // user specified no log file - message.push(`Log files were not written due to the config logs-max=${logsMax}`) - } else { - // could be an error writing to the directory - message.push( - `Log files were not written due to an error writing to the directory: ${logsDir}`, - 'You can rerun the command with `--loglevel=verbose` to see the logs in your terminal' - ) - } - - log[logMethod]('', message.join('\n')) - } - - // This removes any listeners npm setup, mostly for tests to avoid max listener warnings - npm.unload() - } - - // these are needed for the tests to have a clean slate in each test case - exitHandlerCalled = false - showLogFileError = false -}) - -const exitHandler = err => { - exitHandlerCalled = true - - log.disableProgress() - - const hasLoadedNpm = npm?.config.loaded - - if (!npm) { - err = err || new Error('Exit prior to setting npm in exit handler') - // eslint-disable-next-line no-console - console.error(err.stack || err.message) - return process.exit(1) - } - - if (!hasLoadedNpm) { - err = err || new Error('Exit prior to config file resolving.') - // eslint-disable-next-line no-console - console.error(err.stack || err.message) - } - - // only show the notification if it finished. - if (typeof npm.updateNotification === 'string') { - const { level } = log - log.level = 'notice' - log.notice('', npm.updateNotification) - log.level = level - } - - let exitCode = process.exitCode || 0 - let noLogMessage = exitCode !== 0 - let jsonError - - if (err) { - exitCode = 1 - // if we got a command that just shells out to something else, then it - // will presumably print its own errors and exit with a proper status - // code if there's a problem. If we got an error with a code=0, then... - // something else went wrong along the way, so maybe an npm problem? - const isShellout = npm.isShellout - const quietShellout = isShellout && typeof err.code === 'number' && err.code - if (quietShellout) { - exitCode = err.code - noLogMessage = true - } else if (typeof err === 'string') { - // XXX: we should stop throwing strings - log.error('', err) - noLogMessage = true - } else if (!(err instanceof Error)) { - log.error('weird error', err) - noLogMessage = true - } else { - if (!err.code) { - const matchErrorCode = err.message.match(/^(?:Error: )?(E[A-Z]+)/) - err.code = matchErrorCode && matchErrorCode[1] - } - - for (const k of ['type', 'stack', 'statusCode', 'pkgid']) { - const v = err[k] - if (v) { - log.verbose(k, replaceInfo(v)) - } - } - - log.verbose('cwd', process.cwd()) - log.verbose('', os.type() + ' ' + os.release()) - log.verbose('node', process.version) - log.verbose('npm ', 'v' + npm.version) - - for (const k of ['code', 'syscall', 'file', 'path', 'dest', 'errno']) { - const v = err[k] - if (v) { - log.error(k, v) - } - } - - const { summary, detail, json, files = [] } = errorMessage(err, npm) - jsonError = json - - for (let [file, content] of files) { - file = `${npm.logPath}${file}` - content = `'Log files:\n${npm.logFiles.join('\n')}\n\n${content.trim()}\n` - try { - fs.writeFileSync(file, content) - detail.push(['', `\n\nFor a full report see:\n${file}`]) - } catch (logFileErr) { - log.warn('', `Could not write error message to ${file} due to ${logFileErr}`) - } - } - - for (const errline of [...summary, ...detail]) { - log.error(...errline) - } - - if (typeof err.errno === 'number') { - exitCode = err.errno - } else if (typeof err.code === 'number') { - exitCode = err.code - } - } - } - - if (hasLoadedNpm) { - npm.flushOutput(jsonError) - } - - log.verbose('exit', exitCode || 0) - - showLogFileError = (hasLoadedNpm && npm.silent) || noLogMessage - ? false - : !!exitCode - - // explicitly call process.exit now so we don't hang on things like the - // update notifier, also flush stdout/err beforehand because process.exit doesn't - // wait for that to happen. - let flushed = 0 - const flush = [process.stderr, process.stdout] - const exit = () => ++flushed === flush.length && process.exit(exitCode) - flush.forEach((f) => f.write('', exit)) -} - -module.exports = exitHandler -module.exports.setNpm = n => (npm = n) diff --git a/node_modules/npm/lib/utils/explain-dep.js b/node_modules/npm/lib/utils/explain-dep.js deleted file mode 100644 index 86660d5..0000000 --- a/node_modules/npm/lib/utils/explain-dep.js +++ /dev/null @@ -1,135 +0,0 @@ -const { relative } = require('path') - -const explainNode = (node, depth, chalk) => - printNode(node, chalk) + - explainDependents(node, depth, chalk) + - explainLinksIn(node, depth, chalk) - -const colorType = (type, chalk) => { - const { red, yellow, cyan, magenta, blue, green, gray } = chalk - const style = type === 'extraneous' ? red - : type === 'dev' ? yellow - : type === 'optional' ? cyan - : type === 'peer' ? magenta - : type === 'bundled' ? blue - : type === 'workspace' ? green - : type === 'overridden' ? gray - : /* istanbul ignore next */ s => s - return style(type) -} - -const printNode = (node, chalk) => { - const { - name, - version, - location, - extraneous, - dev, - optional, - peer, - bundled, - isWorkspace, - overridden, - } = node - const { bold, dim, green } = chalk - const extra = [] - if (extraneous) { - extra.push(' ' + bold(colorType('extraneous', chalk))) - } - - if (dev) { - extra.push(' ' + bold(colorType('dev', chalk))) - } - - if (optional) { - extra.push(' ' + bold(colorType('optional', chalk))) - } - - if (peer) { - extra.push(' ' + bold(colorType('peer', chalk))) - } - - if (bundled) { - extra.push(' ' + bold(colorType('bundled', chalk))) - } - - if (overridden) { - extra.push(' ' + bold(colorType('overridden', chalk))) - } - - const pkgid = isWorkspace - ? green(`${name}@${version}`) - : `${bold(name)}@${bold(version)}` - - return `${pkgid}${extra.join('')}` + - (location ? dim(`\n${location}`) : '') -} - -const explainLinksIn = ({ linksIn }, depth, chalk) => { - if (!linksIn || !linksIn.length || depth <= 0) { - return '' - } - - const messages = linksIn.map(link => explainNode(link, depth - 1, chalk)) - const str = '\n' + messages.join('\n') - return str.split('\n').join('\n ') -} - -const explainDependents = ({ name, dependents }, depth, chalk) => { - if (!dependents || !dependents.length || depth <= 0) { - return '' - } - - const max = Math.ceil(depth / 2) - const messages = dependents.slice(0, max) - .map(edge => explainEdge(edge, depth, chalk)) - - // show just the names of the first 5 deps that overflowed the list - if (dependents.length > max) { - let len = 0 - const maxLen = 50 - const showNames = [] - for (let i = max; i < dependents.length; i++) { - const { from: { name: depName = 'the root project' } } = dependents[i] - len += depName.length - if (len >= maxLen && i < dependents.length - 1) { - showNames.push('...') - break - } - showNames.push(depName) - } - const show = `(${showNames.join(', ')})` - messages.push(`${dependents.length - max} more ${show}`) - } - - const str = '\n' + messages.join('\n') - return str.split('\n').join('\n ') -} - -const explainEdge = ({ name, type, bundled, from, spec, rawSpec, overridden }, depth, chalk) => { - const { bold } = chalk - let dep = type === 'workspace' - ? bold(relative(from.location, spec.slice('file:'.length))) - : `${bold(name)}@"${bold(spec)}"` - if (overridden) { - dep = `${colorType('overridden', chalk)} ${dep} (was "${rawSpec}")` - } - - const fromMsg = ` from ${explainFrom(from, depth, chalk)}` - - return (type === 'prod' ? '' : `${colorType(type, chalk)} `) + - (bundled ? `${colorType('bundled', chalk)} ` : '') + - `${dep}${fromMsg}` -} - -const explainFrom = (from, depth, chalk) => { - if (!from.name && !from.version) { - return 'the root project' - } - - return printNode(from, chalk) + - explainDependents(from, depth - 1, chalk) + - explainLinksIn(from, depth - 1, chalk) -} - -module.exports = { explainNode, printNode, explainEdge } diff --git a/node_modules/npm/lib/utils/explain-eresolve.js b/node_modules/npm/lib/utils/explain-eresolve.js deleted file mode 100644 index f3c6ae2..0000000 --- a/node_modules/npm/lib/utils/explain-eresolve.js +++ /dev/null @@ -1,71 +0,0 @@ -// this is called when an ERESOLVE error is caught in the exit-handler, -// or when there's a log.warn('eresolve', msg, explanation), to turn it -// into a human-intelligible explanation of what's wrong and how to fix. -const { explainEdge, explainNode, printNode } = require('./explain-dep.js') - -// expl is an explanation object that comes from Arborist. It looks like: -// Depth is how far we want to want to descend into the object making a report. -// The full report (ie, depth=Infinity) is always written to the cache folder -// at ${cache}/eresolve-report.txt along with full json. -const explain = (expl, chalk, depth) => { - const { edge, dep, current, peerConflict, currentEdge } = expl - - const out = [] - const whileInstalling = dep && dep.whileInstalling || - current && current.whileInstalling || - edge && edge.from && edge.from.whileInstalling - if (whileInstalling) { - out.push('While resolving: ' + printNode(whileInstalling, chalk)) - } - - // it "should" be impossible for an ERESOLVE explanation to lack both - // current and currentEdge, but better to have a less helpful error - // than a crashing failure. - if (current) { - out.push('Found: ' + explainNode(current, depth, chalk)) - } else if (peerConflict && peerConflict.current) { - out.push('Found: ' + explainNode(peerConflict.current, depth, chalk)) - } else if (currentEdge) { - out.push('Found: ' + explainEdge(currentEdge, depth, chalk)) - } else /* istanbul ignore else - should always have one */ if (edge) { - out.push('Found: ' + explainEdge(edge, depth, chalk)) - } - - out.push('\nCould not resolve dependency:\n' + - explainEdge(edge, depth, chalk)) - - if (peerConflict) { - const heading = '\nConflicting peer dependency:' - const pc = explainNode(peerConflict.peer, depth, chalk) - out.push(heading + ' ' + pc) - } - - return out.join('\n') -} - -// generate a full verbose report and tell the user how to fix it -const report = (expl, chalk, noColorChalk) => { - const flags = [ - expl.strictPeerDeps ? '--no-strict-peer-deps' : '', - '--force', - '--legacy-peer-deps', - ].filter(Boolean) - - const or = (arr) => arr.length <= 2 - ? arr.join(' or ') : - arr.map((v, i, l) => i + 1 === l.length ? `or ${v}` : v).join(', ') - - const fix = `Fix the upstream dependency conflict, or retry -this command with ${or(flags)} -to accept an incorrect (and potentially broken) dependency resolution.` - - return { - explanation: `${explain(expl, chalk, 4)}\n\n${fix}`, - file: `# npm resolution error report\n\n${explain(expl, noColorChalk, Infinity)}\n\n${fix}`, - } -} - -module.exports = { - explain, - report, -} diff --git a/node_modules/npm/lib/utils/format-bytes.js b/node_modules/npm/lib/utils/format-bytes.js deleted file mode 100644 index d293001..0000000 --- a/node_modules/npm/lib/utils/format-bytes.js +++ /dev/null @@ -1,30 +0,0 @@ -// Convert bytes to printable output, for file reporting in tarballs -// Only supports up to GB because that's way larger than anything the registry -// supports anyways. - -const formatBytes = (bytes, space = true) => { - let spacer = '' - if (space) { - spacer = ' ' - } - - if (bytes < 1000) { - // B - return `${bytes}${spacer}B` - } - - if (bytes < 1000000) { - // kB - return `${(bytes / 1000).toFixed(1)}${spacer}kB` - } - - if (bytes < 1000000000) { - // MB - return `${(bytes / 1000000).toFixed(1)}${spacer}MB` - } - - // GB - return `${(bytes / 1000000000).toFixed(1)}${spacer}GB` -} - -module.exports = formatBytes diff --git a/node_modules/npm/lib/utils/format-search-stream.js b/node_modules/npm/lib/utils/format-search-stream.js deleted file mode 100644 index cb29151..0000000 --- a/node_modules/npm/lib/utils/format-search-stream.js +++ /dev/null @@ -1,135 +0,0 @@ -const { Minipass } = require('minipass') -const columnify = require('columnify') - -// This module consumes package data in the following format: -// -// { -// name: String, -// description: String, -// maintainers: [{ username: String, email: String }], -// keywords: String | [String], -// version: String, -// date: Date // can be null, -// } -// -// The returned stream will format this package data -// into a byte stream of formatted, displayable output. - -module.exports = async (opts, clean) => { - return opts.json ? new JSONOutputStream() : new TextOutputStream(opts, clean) -} - -class JSONOutputStream extends Minipass { - #didFirst = false - - write (obj) { - if (!this.#didFirst) { - super.write('[\n') - this.#didFirst = true - } else { - super.write('\n,\n') - } - - return super.write(JSON.stringify(obj)) - } - - end () { - super.write(this.#didFirst ? ']\n' : '\n[]\n') - super.end() - } -} - -class TextOutputStream extends Minipass { - #clean - #opts - #line = 0 - - constructor (opts, clean) { - super() - this.#clean = clean - this.#opts = opts - } - - write (pkg) { - return super.write(this.#prettify(pkg)) - } - - #prettify (data) { - const pkg = { - author: data.maintainers.map((m) => `=${this.#clean(m.username)}`).join(' '), - date: 'prehistoric', - description: this.#clean(data.description ?? ''), - keywords: '', - name: this.#clean(data.name), - version: data.version, - } - if (Array.isArray(data.keywords)) { - pkg.keywords = data.keywords.map((k) => this.#clean(k)).join(' ') - } else if (typeof data.keywords === 'string') { - pkg.keywords = this.#clean(data.keywords.replace(/[,\s]+/, ' ')) - } - if (data.date) { - pkg.date = data.date.toISOString().split('T')[0] // remove time - } - - const columns = ['name', 'description', 'author', 'date', 'version', 'keywords'] - if (this.#opts.parseable) { - return columns.map((col) => pkg[col] && ('' + pkg[col]).replace(/\t/g, ' ')).join('\t') - } - - // stdout in tap is never a tty - /* istanbul ignore next */ - const maxWidth = process.stdout.isTTY ? process.stdout.getWindowSize()[0] : Infinity - let output = columnify( - [pkg], - { - include: columns, - showHeaders: ++this.#line <= 1, - columnSplitter: ' | ', - truncate: !this.#opts.long, - config: { - name: { minWidth: 25, maxWidth: 25, truncate: false, truncateMarker: '' }, - description: { minWidth: 20, maxWidth: 20 }, - author: { minWidth: 15, maxWidth: 15 }, - date: { maxWidth: 11 }, - version: { minWidth: 8, maxWidth: 8 }, - keywords: { maxWidth: Infinity }, - }, - } - ).split('\n').map(line => line.slice(0, maxWidth)).join('\n') - - if (!this.#opts.color) { - return output - } - - const colors = ['31m', '33m', '32m', '36m', '34m', '35m'] - - this.#opts.args.forEach((arg, i) => { - const markStart = String.fromCharCode(i % colors.length + 1) - const markEnd = String.fromCharCode(0) - - if (arg.charAt(0) === '/') { - output = output.replace( - new RegExp(arg.slice(1, -1), 'gi'), - bit => `${markStart}${bit}${markEnd}` - ) - } else { - // just a normal string, do the split/map thing - let p = 0 - - output = output.toLowerCase().split(arg.toLowerCase()).map(piece => { - piece = output.slice(p, p + piece.length) - p += piece.length - const mark = `${markStart}${output.slice(p, p + arg.length)}${markEnd}` - p += arg.length - return `${piece}${mark}` - }).join('') - } - }) - - for (let i = 1; i <= colors.length; i++) { - output = output.split(String.fromCharCode(i)).join(`\u001B[${colors[i - 1]}`) - } - return output.split('\u0000').join('\u001B[0m').trim() - } -} diff --git a/node_modules/npm/lib/utils/get-identity.js b/node_modules/npm/lib/utils/get-identity.js deleted file mode 100644 index d8f59da..0000000 --- a/node_modules/npm/lib/utils/get-identity.js +++ /dev/null @@ -1,26 +0,0 @@ -const npmFetch = require('npm-registry-fetch') - -module.exports = async (npm, opts) => { - const { registry } = opts - - // First, check if we have a user/pass-based auth - const creds = npm.config.getCredentialsByURI(registry) - if (creds.username) { - return creds.username - } - - // No username, but we have other credentials; fetch the username from registry - if (creds.token || creds.certfile && creds.keyfile) { - const registryData = await npmFetch.json('/-/whoami', { ...opts }) - if (typeof registryData?.username === 'string') { - return registryData.username - } - } - - // At this point, even if they have a credentials object, it doesn't have a - // valid token. - throw Object.assign( - new Error('This command requires you to be logged in.'), - { code: 'ENEEDAUTH' } - ) -} diff --git a/node_modules/npm/lib/utils/is-windows.js b/node_modules/npm/lib/utils/is-windows.js deleted file mode 100644 index 57f6599..0000000 --- a/node_modules/npm/lib/utils/is-windows.js +++ /dev/null @@ -1,6 +0,0 @@ -const isWindows = process.platform === 'win32' -const isWindowsShell = isWindows && - !/^MINGW(32|64)$/.test(process.env.MSYSTEM) && process.env.TERM !== 'cygwin' - -exports.isWindows = isWindows -exports.isWindowsShell = isWindowsShell diff --git a/node_modules/npm/lib/utils/log-file.js b/node_modules/npm/lib/utils/log-file.js deleted file mode 100644 index 84f8698..0000000 --- a/node_modules/npm/lib/utils/log-file.js +++ /dev/null @@ -1,236 +0,0 @@ -const os = require('os') -const { join, dirname, basename } = require('path') -const { format } = require('util') -const { glob } = require('glob') -const { Minipass } = require('minipass') -const fsMiniPass = require('fs-minipass') -const fs = require('fs/promises') -const log = require('./log-shim') - -const padZero = (n, length) => n.toString().padStart(length.toString().length, '0') -const globify = pattern => pattern.split('\\').join('/') - -class LogFiles { - // Default to a plain minipass stream so we can buffer - // initial writes before we know the cache location - #logStream = null - - // We cap log files at a certain number of log events per file. - // Note that each log event can write more than one line to the - // file. Then we rotate log files once this number of events is reached - #MAX_LOGS_PER_FILE = null - - // Now that we write logs continuously we need to have a backstop - // here for infinite loops that still log. This is also partially handled - // by the config.get('max-files') option, but this is a failsafe to - // prevent runaway log file creation - #MAX_FILES_PER_PROCESS = null - - #fileLogCount = 0 - #totalLogCount = 0 - #path = null - #logsMax = null - #files = [] - - constructor ({ - maxLogsPerFile = 50_000, - maxFilesPerProcess = 5, - } = {}) { - this.#MAX_LOGS_PER_FILE = maxLogsPerFile - this.#MAX_FILES_PER_PROCESS = maxFilesPerProcess - this.on() - } - - static format (count, level, title, ...args) { - let prefix = `${count} ${level}` - if (title) { - prefix += ` ${title}` - } - - return format(...args) - .split(/\r?\n/) - .reduce((lines, line) => - lines += prefix + (line ? ' ' : '') + line + os.EOL, - '' - ) - } - - on () { - this.#logStream = new Minipass() - process.on('log', this.#logHandler) - } - - off () { - process.off('log', this.#logHandler) - this.#endStream() - } - - load ({ path, logsMax = Infinity } = {}) { - // dir is user configurable and is required to exist so - // this can error if the dir is missing or not configured correctly - this.#path = path - this.#logsMax = logsMax - - // Log stream has already ended - if (!this.#logStream) { - return - } - - log.verbose('logfile', `logs-max:${logsMax} dir:${this.#path}`) - - // Pipe our initial stream to our new file stream and - // set that as the new log logstream for future writes - // if logs max is 0 then the user does not want a log file - if (this.#logsMax > 0) { - const initialFile = this.#openLogFile() - if (initialFile) { - this.#logStream = this.#logStream.pipe(initialFile) - } - } - - // Kickoff cleaning process, even if we aren't writing a logfile. - // This is async but it will always ignore the current logfile - // Return the result so it can be awaited in tests - return this.#cleanLogs() - } - - log (...args) { - this.#logHandler(...args) - } - - get files () { - return this.#files - } - - get #isBuffered () { - return this.#logStream instanceof Minipass - } - - #endStream (output) { - if (this.#logStream) { - this.#logStream.end(output) - this.#logStream = null - } - } - - #logHandler = (level, ...args) => { - // Ignore pause and resume events since we - // write everything to the log file - if (level === 'pause' || level === 'resume') { - return - } - - // If the stream is ended then do nothing - if (!this.#logStream) { - return - } - - const logOutput = this.#formatLogItem(level, ...args) - - if (this.#isBuffered) { - // Cant do anything but buffer the output if we dont - // have a file stream yet - this.#logStream.write(logOutput) - return - } - - // Open a new log file if we've written too many logs to this one - if (this.#fileLogCount >= this.#MAX_LOGS_PER_FILE) { - // Write last chunk to the file and close it - this.#endStream(logOutput) - if (this.#files.length >= this.#MAX_FILES_PER_PROCESS) { - // but if its way too many then we just stop listening - this.off() - } else { - // otherwise we are ready for a new file for the next event - this.#logStream = this.#openLogFile() - } - } else { - this.#logStream.write(logOutput) - } - } - - #formatLogItem (...args) { - this.#fileLogCount += 1 - return LogFiles.format(this.#totalLogCount++, ...args) - } - - #getLogFilePath (count = '') { - return `${this.#path}debug-${count}.log` - } - - #openLogFile () { - // Count in filename will be 0 indexed - const count = this.#files.length - - try { - // Pad with zeros so that our log files are always sorted properly - // We never want to write files ending in `-9.log` and `-10.log` because - // log file cleaning is done by deleting the oldest so in this example - // `-10.log` would be deleted next - const f = this.#getLogFilePath(padZero(count, this.#MAX_FILES_PER_PROCESS)) - // Some effort was made to make the async, but we need to write logs - // during process.on('exit') which has to be synchronous. So in order - // to never drop log messages, it is easiest to make it sync all the time - // and this was measured to be about 1.5% slower for 40k lines of output - const logStream = new fsMiniPass.WriteStreamSync(f, { flags: 'a' }) - if (count > 0) { - // Reset file log count if we are opening - // after our first file - this.#fileLogCount = 0 - } - this.#files.push(logStream.path) - return logStream - } catch (e) { - // If the user has a readonly logdir then we don't want to - // warn this on every command so it should be verbose - log.verbose('logfile', `could not be created: ${e}`) - } - } - - async #cleanLogs () { - // module to clean out the old log files - // this is a best-effort attempt. if a rm fails, we just - // log a message about it and move on. We do return a - // Promise that succeeds when we've tried to delete everything, - // just for the benefit of testing this function properly. - - try { - const logPath = this.#getLogFilePath() - const logGlob = join(dirname(logPath), basename(logPath) - // tell glob to only match digits - .replace(/\d/g, '[0123456789]') - // Handle the old (prior to 8.2.0) log file names which did not have a - // counter suffix - .replace(/-\.log$/, '*.log') - ) - - // Always ignore the currently written files - const files = await glob(globify(logGlob), { ignore: this.#files.map(globify), silent: true }) - const toDelete = files.length - this.#logsMax - - if (toDelete <= 0) { - return - } - - log.silly('logfile', `start cleaning logs, removing ${toDelete} files`) - - for (const file of files.slice(0, toDelete)) { - try { - await fs.rm(file, { force: true }) - } catch (e) { - log.silly('logfile', 'error removing log file', file, e) - } - } - } catch (e) { - // Disable cleanup failure warnings when log writing is disabled - if (this.#logsMax > 0) { - log.warn('logfile', 'error cleaning log files', e) - } - } finally { - log.silly('logfile', 'done cleaning log files') - } - } -} - -module.exports = LogFiles diff --git a/node_modules/npm/lib/utils/log-shim.js b/node_modules/npm/lib/utils/log-shim.js deleted file mode 100644 index 9d5a36d..0000000 --- a/node_modules/npm/lib/utils/log-shim.js +++ /dev/null @@ -1,59 +0,0 @@ -const NPMLOG = require('npmlog') -const PROCLOG = require('proc-log') - -// Sets getter and optionally a setter -// otherwise setting should throw -const accessors = (obj, set) => (k) => ({ - get: () => obj[k], - set: set ? (v) => (obj[k] = v) : () => { - throw new Error(`Cant set ${k}`) - }, -}) - -// Set the value to a bound function on the object -const value = (obj) => (k) => ({ - value: (...args) => obj[k].apply(obj, args), -}) - -const properties = { - // npmlog getters/setters - level: accessors(NPMLOG, true), - heading: accessors(NPMLOG, true), - levels: accessors(NPMLOG), - gauge: accessors(NPMLOG), - stream: accessors(NPMLOG), - tracker: accessors(NPMLOG), - progressEnabled: accessors(NPMLOG), - // npmlog methods - useColor: value(NPMLOG), - enableColor: value(NPMLOG), - disableColor: value(NPMLOG), - enableUnicode: value(NPMLOG), - disableUnicode: value(NPMLOG), - enableProgress: value(NPMLOG), - disableProgress: value(NPMLOG), - clearProgress: value(NPMLOG), - showProgress: value(NPMLOG), - newItem: value(NPMLOG), - newGroup: value(NPMLOG), - // proclog methods - notice: value(PROCLOG), - error: value(PROCLOG), - warn: value(PROCLOG), - info: value(PROCLOG), - verbose: value(PROCLOG), - http: value(PROCLOG), - silly: value(PROCLOG), - pause: value(PROCLOG), - resume: value(PROCLOG), -} - -const descriptors = Object.entries(properties).reduce((acc, [k, v]) => { - acc[k] = { enumerable: true, ...v(k) } - return acc -}, {}) - -// Create an object with the allowed properties rom npm log and all -// the logging methods from proc log -// XXX: this should go away and requires of this should be replaced with proc-log + new display -module.exports = Object.freeze(Object.defineProperties({}, descriptors)) diff --git a/node_modules/npm/lib/utils/npm-usage.js b/node_modules/npm/lib/utils/npm-usage.js deleted file mode 100644 index 1bd790c..0000000 --- a/node_modules/npm/lib/utils/npm-usage.js +++ /dev/null @@ -1,74 +0,0 @@ -const { commands } = require('./cmd-list') - -const COL_MAX = 60 -const COL_MIN = 24 -const COL_GUTTER = 16 -const INDENT = 4 - -const indent = (repeat = INDENT) => ' '.repeat(repeat) -const indentNewline = (repeat) => `\n${indent(repeat)}` - -module.exports = (npm) => { - const browser = npm.config.get('viewer') === 'browser' ? ' (in a browser)' : '' - const allCommands = npm.config.get('long') ? cmdUsages(npm.constructor) : cmdNames() - - return `npm - -Usage: - -npm install install all the dependencies in your project -npm install add the dependency to your project -npm test run this project's tests -npm run run the script named -npm -h quick help on -npm -l display usage info for all commands -npm help search for help on ${browser} -npm help npm more involved overview${browser} - -All commands: -${allCommands} - -Specify configs in the ini-formatted file: -${indent() + npm.config.get('userconfig')} -or on the command line via: npm --key=value - -More configuration info: npm help config -Configuration fields: npm help 7 config - -npm@${npm.version} ${npm.npmRoot}` -} - -const cmdNames = () => { - const out = [''] - - const line = !process.stdout.columns ? COL_MAX - : Math.min(COL_MAX, Math.max(process.stdout.columns - COL_GUTTER, COL_MIN)) - - let l = 0 - for (const c of commands) { - if (out[l].length + c.length + 2 < line) { - out[l] += ', ' + c - } else { - out[l++] += ',' - out[l] = c - } - } - - return indentNewline() + out.join(indentNewline()).slice(2) -} - -const cmdUsages = (Npm) => { - // return a string of : - let maxLen = 0 - const set = [] - for (const c of commands) { - set.push([c, Npm.cmd(c).describeUsage.split('\n')]) - maxLen = Math.max(maxLen, c.length) - } - - return set.map(([name, usageLines]) => { - const gutter = indent(maxLen - name.length + 1) - const usage = usageLines.join(indentNewline(INDENT + maxLen + 1)) - return indentNewline() + name + gutter + usage - }).join('\n') -} diff --git a/node_modules/npm/lib/utils/open-url-prompt.js b/node_modules/npm/lib/utils/open-url-prompt.js deleted file mode 100644 index 71a68c2..0000000 --- a/node_modules/npm/lib/utils/open-url-prompt.js +++ /dev/null @@ -1,69 +0,0 @@ -const readline = require('readline') -const open = require('./open-url.js') - -function print (npm, title, url) { - const json = npm.config.get('json') - - const message = json ? JSON.stringify({ title, url }) : `${title}:\n${url}` - - npm.output(message) -} - -// Prompt to open URL in browser if possible -const promptOpen = async (npm, url, title, prompt, emitter) => { - const browser = npm.config.get('browser') - const isInteractive = process.stdin.isTTY === true && process.stdout.isTTY === true - - try { - if (!/^https?:$/.test(new URL(url).protocol)) { - throw new Error() - } - } catch (_) { - throw new Error('Invalid URL: ' + url) - } - - print(npm, title, url) - - if (browser === false || !isInteractive) { - return - } - - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - }) - - const tryOpen = await new Promise(resolve => { - rl.on('SIGINT', () => { - rl.close() - resolve('SIGINT') - }) - - rl.question(prompt, () => { - resolve(true) - }) - - if (emitter && emitter.addListener) { - emitter.addListener('abort', () => { - rl.close() - - // clear the prompt line - npm.output('') - - resolve(false) - }) - } - }) - - if (tryOpen === 'SIGINT') { - throw new Error('canceled') - } - - if (!tryOpen) { - return - } - - await open(npm, url, 'Browser unavailable. Please open the URL manually') -} - -module.exports = promptOpen diff --git a/node_modules/npm/lib/utils/open-url.js b/node_modules/npm/lib/utils/open-url.js deleted file mode 100644 index 77bb1d0..0000000 --- a/node_modules/npm/lib/utils/open-url.js +++ /dev/null @@ -1,50 +0,0 @@ -const promiseSpawn = require('@npmcli/promise-spawn') - -const { URL } = require('url') - -// attempt to open URL in web-browser, print address otherwise: -const open = async (npm, url, errMsg, isFile) => { - url = encodeURI(url) - const browser = npm.config.get('browser') - - function printAlternateMsg () { - const json = npm.config.get('json') - const alternateMsg = json - ? JSON.stringify({ - title: errMsg, - url, - }, null, 2) - : `${errMsg}:\n ${url}\n` - - npm.output(alternateMsg) - } - - if (browser === false) { - printAlternateMsg() - return - } - - // We pass this in as true from the help command so we know we don't have to - // check the protocol - if (!isFile) { - try { - if (!/^https?:$/.test(new URL(url).protocol)) { - throw new Error() - } - } catch { - throw new Error('Invalid URL: ' + url) - } - } - - const command = browser === true ? null : browser - await promiseSpawn.open(url, { command }) - .catch((err) => { - if (err.code !== 127) { - throw err - } - - printAlternateMsg() - }) -} - -module.exports = open diff --git a/node_modules/npm/lib/utils/otplease.js b/node_modules/npm/lib/utils/otplease.js deleted file mode 100644 index b4aa167..0000000 --- a/node_modules/npm/lib/utils/otplease.js +++ /dev/null @@ -1,48 +0,0 @@ -const log = require('./log-shim') -async function otplease (npm, opts, fn) { - try { - return await fn(opts) - } catch (err) { - if (!process.stdin.isTTY || !process.stdout.isTTY) { - throw err - } - - if (isWebOTP(err)) { - log.disableProgress() - const webAuth = require('./web-auth') - const openUrlPrompt = require('./open-url-prompt') - - const openerPromise = (url, emitter) => - openUrlPrompt( - npm, - url, - 'Authenticate your account at', - 'Press ENTER to open in the browser...', - emitter - ) - const otp = await webAuth(openerPromise, err.body.authUrl, err.body.doneUrl, opts) - return await fn({ ...opts, otp }) - } - - if (isClassicOTP(err)) { - const readUserInfo = require('./read-user-info.js') - const otp = await readUserInfo.otp('This operation requires a one-time password.\nEnter OTP:') - return await fn({ ...opts, otp }) - } - - throw err - } -} - -function isWebOTP (err) { - if (err.code === 'EOTP' && err.body) { - return err.body.authUrl && err.body.doneUrl - } - return false -} - -function isClassicOTP (err) { - return err.code === 'EOTP' || (err.code === 'E401' && /one-time pass/.test(err.body)) -} - -module.exports = otplease diff --git a/node_modules/npm/lib/utils/ping.js b/node_modules/npm/lib/utils/ping.js deleted file mode 100644 index 00956d0..0000000 --- a/node_modules/npm/lib/utils/ping.js +++ /dev/null @@ -1,7 +0,0 @@ -// ping the npm registry -// used by the ping and doctor commands -const fetch = require('npm-registry-fetch') -module.exports = async (flatOptions) => { - const res = await fetch('/-/ping?write=true', flatOptions) - return res.json().catch(() => ({})) -} diff --git a/node_modules/npm/lib/utils/pulse-till-done.js b/node_modules/npm/lib/utils/pulse-till-done.js deleted file mode 100644 index 2229414..0000000 --- a/node_modules/npm/lib/utils/pulse-till-done.js +++ /dev/null @@ -1,26 +0,0 @@ -const log = require('./log-shim.js') - -let pulseTimer = null -const withPromise = async (promise) => { - pulseStart() - try { - return await promise - } finally { - pulseStop() - } -} - -const pulseStart = () => { - pulseTimer = pulseTimer || setInterval(() => { - log.gauge.pulse('') - }, 150) -} - -const pulseStop = () => { - clearInterval(pulseTimer) - pulseTimer = null -} - -module.exports = { - withPromise, -} diff --git a/node_modules/npm/lib/utils/queryable.js b/node_modules/npm/lib/utils/queryable.js deleted file mode 100644 index 69621d9..0000000 --- a/node_modules/npm/lib/utils/queryable.js +++ /dev/null @@ -1,308 +0,0 @@ -const util = require('util') -const _delete = Symbol('delete') -const _append = Symbol('append') - -const sqBracketsMatcher = str => str.match(/(.+)\[([^\]]+)\]\.?(.*)$/) - -// replaces any occurrence of an empty-brackets (e.g: []) with a special -// Symbol(append) to represent it, this is going to be useful for the setter -// method that will push values to the end of the array when finding these -const replaceAppendSymbols = str => { - const matchEmptyBracket = str.match(/^(.*)\[\]\.?(.*)$/) - - if (matchEmptyBracket) { - const [, pre, post] = matchEmptyBracket - return [...replaceAppendSymbols(pre), _append, post].filter(Boolean) - } - - return [str] -} - -const parseKeys = key => { - const sqBracketItems = new Set() - sqBracketItems.add(_append) - const parseSqBrackets = str => { - const index = sqBracketsMatcher(str) - - // once we find square brackets, we recursively parse all these - if (index) { - const preSqBracketPortion = index[1] - - // we want to have a `new String` wrapper here in order to differentiate - // between multiple occurrences of the same string, e.g: - // foo.bar[foo.bar] should split into { foo: { bar: { 'foo.bar': {} } } - /* eslint-disable-next-line no-new-wrappers */ - const foundKey = new String(index[2]) - const postSqBracketPortion = index[3] - - // we keep track of items found during this step to make sure - // we don't try to split-separate keys that were defined within - // square brackets, since the key name itself might contain dots - sqBracketItems.add(foundKey) - - // returns an array that contains either dot-separate items (that will - // be split apart during the next step OR the fully parsed keys - // read from square brackets, e.g: - // foo.bar[1.0.0].a.b -> ['foo.bar', '1.0.0', 'a.b'] - return [ - ...parseSqBrackets(preSqBracketPortion), - foundKey, - ...(postSqBracketPortion ? parseSqBrackets(postSqBracketPortion) : []), - ] - } - - // at the end of parsing, any usage of the special empty-bracket syntax - // (e.g: foo.array[]) has not yet been parsed, here we'll take care - // of parsing it and adding a special symbol to represent it in - // the resulting list of keys - return replaceAppendSymbols(str) - } - - const res = [] - // starts by parsing items defined as square brackets, those might be - // representing properties that have a dot in the name or just array - // indexes, e.g: foo[1.0.0] or list[0] - const sqBracketKeys = parseSqBrackets(key.trim()) - - for (const k of sqBracketKeys) { - // keys parsed from square brackets should just be added to list of - // resulting keys as they might have dots as part of the key - if (sqBracketItems.has(k)) { - res.push(k) - } else { - // splits the dot-sep property names and add them to the list of keys - /* eslint-disable-next-line no-new-wrappers */ - for (const splitKey of k.split('.')) { - res.push(String(splitKey)) - } - } - } - - // returns an ordered list of strings in which each entry - // represents a key in an object defined by the previous entry - return res -} - -const getter = ({ data, key }) => { - // keys are a list in which each entry represents the name of - // a property that should be walked through the object in order to - // return the final found value - const keys = parseKeys(key) - let _data = data - let label = '' - - for (const k of keys) { - // empty-bracket-shortcut-syntax is not supported on getter - if (k === _append) { - throw Object.assign(new Error('Empty brackets are not valid syntax for retrieving values.'), { - code: 'EINVALIDSYNTAX', - }) - } - - // extra logic to take into account printing array, along with its - // special syntax in which using a dot-sep property name after an - // arry will expand it's results, e.g: - // arr.name -> arr[0].name=value, arr[1].name=value, ... - const maybeIndex = Number(k) - if (Array.isArray(_data) && !Number.isInteger(maybeIndex)) { - _data = _data.reduce((acc, i, index) => { - acc[`${label}[${index}].${k}`] = i[k] - return acc - }, {}) - return _data - } else { - if (!Object.hasOwn(_data, k)) { - return undefined - } - _data = _data[k] - } - - label += k - } - - // these are some legacy expectations from - // the old API consumed by lib/view.js - if (Array.isArray(_data) && _data.length <= 1) { - _data = _data[0] - } - - return { - [key]: _data, - } -} - -const setter = ({ data, key, value, force }) => { - // setter goes to recursively transform the provided data obj, - // setting properties from the list of parsed keys, e.g: - // ['foo', 'bar', 'baz'] -> { foo: { bar: { baz: {} } } - const keys = parseKeys(key) - const setKeys = (_data, _key) => { - // handles array indexes, converting valid integers to numbers, - // note that occurrences of Symbol(append) will throw, - // so we just ignore these for now - let maybeIndex = Number.NaN - try { - maybeIndex = Number(_key) - } catch { - // leave it NaN - } - if (!Number.isNaN(maybeIndex)) { - _key = maybeIndex - } - - // creates new array in case key is an index - // and the array obj is not yet defined - const keyIsAnArrayIndex = _key === maybeIndex || _key === _append - const dataHasNoItems = !Object.keys(_data).length - if (keyIsAnArrayIndex && dataHasNoItems && !Array.isArray(_data)) { - _data = [] - } - - // converting from array to an object is also possible, in case the - // user is using force mode, we should also convert existing arrays - // to an empty object if the current _data is an array - if (force && Array.isArray(_data) && !keyIsAnArrayIndex) { - _data = { ..._data } - } - - // the _append key is a special key that is used to represent - // the empty-bracket notation, e.g: arr[] -> arr[arr.length] - if (_key === _append) { - if (!Array.isArray(_data)) { - throw Object.assign(new Error(`Can't use append syntax in non-Array element`), { - code: 'ENOAPPEND', - }) - } - _key = _data.length - } - - // retrieves the next data object to recursively iterate on, - // throws if trying to override a literal value or add props to an array - const next = () => { - const haveContents = !force && _data[_key] != null && value !== _delete - const shouldNotOverrideLiteralValue = !(typeof _data[_key] === 'object') - // if the next obj to recurse is an array and the next key to be - // appended to the resulting obj is not an array index, then it - // should throw since we can't append arbitrary props to arrays - const shouldNotAddPropsToArrays = - typeof keys[0] !== 'symbol' && Array.isArray(_data[_key]) && Number.isNaN(Number(keys[0])) - - const overrideError = haveContents && shouldNotOverrideLiteralValue - if (overrideError) { - throw Object.assign( - new Error(`Property ${_key} already exists and is not an Array or Object.`), - { code: 'EOVERRIDEVALUE' } - ) - } - - const addPropsToArrayError = haveContents && shouldNotAddPropsToArrays - if (addPropsToArrayError) { - throw Object.assign(new Error(`Can't add property ${key} to an Array.`), { - code: 'ENOADDPROP', - }) - } - - return typeof _data[_key] === 'object' ? _data[_key] || {} : {} - } - - // sets items from the parsed array of keys as objects, recurses to - // setKeys in case there are still items to be handled, otherwise it - // just sets the original value set by the user - if (keys.length) { - _data[_key] = setKeys(next(), keys.shift()) - } else { - // handles special deletion cases for obj props / array items - if (value === _delete) { - if (Array.isArray(_data)) { - _data.splice(_key, 1) - } else { - delete _data[_key] - } - } else { - // finally, sets the value in its right place - _data[_key] = value - } - } - - return _data - } - - setKeys(data, keys.shift()) -} - -class Queryable { - #data = null - - constructor (obj) { - if (!obj || typeof obj !== 'object') { - throw Object.assign(new Error('Queryable needs an object to query properties from.'), { - code: 'ENOQUERYABLEOBJ', - }) - } - - this.#data = obj - } - - query (queries) { - // this ugly interface here is meant to be a compatibility layer - // with the legacy API lib/view.js is consuming, if at some point - // we refactor that command then we can revisit making this nicer - if (queries === '') { - return { '': this.#data } - } - - const q = query => - getter({ - data: this.#data, - key: query, - }) - - if (Array.isArray(queries)) { - let res = {} - for (const query of queries) { - res = { ...res, ...q(query) } - } - return res - } else { - return q(queries) - } - } - - // return the value for a single query if found, otherwise returns undefined - get (query) { - const obj = this.query(query) - if (obj) { - return obj[query] - } - } - - // creates objects along the way for the provided `query` parameter - // and assigns `value` to the last property of the query chain - set (query, value, { force } = {}) { - setter({ - data: this.#data, - key: query, - value, - force, - }) - } - - // deletes the value of the property found at `query` - delete (query) { - setter({ - data: this.#data, - key: query, - value: _delete, - }) - } - - toJSON () { - return this.#data - } - - [util.inspect.custom] () { - return this.toJSON() - } -} - -module.exports = Queryable diff --git a/node_modules/npm/lib/utils/read-user-info.js b/node_modules/npm/lib/utils/read-user-info.js deleted file mode 100644 index 1cac8ee..0000000 --- a/node_modules/npm/lib/utils/read-user-info.js +++ /dev/null @@ -1,68 +0,0 @@ -const read = require('read') -const userValidate = require('npm-user-validate') -const log = require('./log-shim.js') - -exports.otp = readOTP -exports.password = readPassword -exports.username = readUsername -exports.email = readEmail - -const otpPrompt = `This command requires a one-time password (OTP) from your authenticator app. -Enter one below. You can also pass one on the command line by appending --otp=123456. -For more information, see: -https://docs.npmjs.com/getting-started/using-two-factor-authentication -Enter OTP: ` -const passwordPrompt = 'npm password: ' -const usernamePrompt = 'npm username: ' -const emailPrompt = 'email (this IS public): ' - -function readWithProgress (opts) { - log.clearProgress() - return read(opts).finally(() => log.showProgress()) -} - -function readOTP (msg = otpPrompt, otp, isRetry) { - if (isRetry && otp && /^[\d ]+$|^[A-Fa-f0-9]{64,64}$/.test(otp)) { - return otp.replace(/\s+/g, '') - } - - return readWithProgress({ prompt: msg, default: otp || '' }) - .then((rOtp) => readOTP(msg, rOtp, true)) -} - -function readPassword (msg = passwordPrompt, password, isRetry) { - if (isRetry && password) { - return password - } - - return readWithProgress({ prompt: msg, silent: true, default: password || '' }) - .then((rPassword) => readPassword(msg, rPassword, true)) -} - -function readUsername (msg = usernamePrompt, username, isRetry) { - if (isRetry && username) { - const error = userValidate.username(username) - if (error) { - log.warn(error.message) - } else { - return Promise.resolve(username.trim()) - } - } - - return readWithProgress({ prompt: msg, default: username || '' }) - .then((rUsername) => readUsername(msg, rUsername, true)) -} - -function readEmail (msg = emailPrompt, email, isRetry) { - if (isRetry && email) { - const error = userValidate.email(email) - if (error) { - log.warn(error.message) - } else { - return email.trim() - } - } - - return readWithProgress({ prompt: msg, default: email || '' }) - .then((username) => readEmail(msg, username, true)) -} diff --git a/node_modules/npm/lib/utils/reify-finish.js b/node_modules/npm/lib/utils/reify-finish.js deleted file mode 100644 index 9b43abc..0000000 --- a/node_modules/npm/lib/utils/reify-finish.js +++ /dev/null @@ -1,33 +0,0 @@ -const reifyOutput = require('./reify-output.js') -const ini = require('ini') -const { writeFile } = require('fs').promises -const { resolve } = require('path') - -const reifyFinish = async (npm, arb) => { - await saveBuiltinConfig(npm, arb) - reifyOutput(npm, arb) -} - -const saveBuiltinConfig = async (npm, arb) => { - const { options: { global }, actualTree } = arb - if (!global) { - return - } - - // if we are using a builtin config, and just installed npm as - // a top-level global package, we have to preserve that config. - const npmNode = actualTree.inventory.get('node_modules/npm') - if (!npmNode) { - return - } - - const builtinConf = npm.config.data.get('builtin') - if (builtinConf.loadError) { - return - } - - const content = ini.stringify(builtinConf.raw).trim() + '\n' - await writeFile(resolve(npmNode.path, 'npmrc'), content) -} - -module.exports = reifyFinish diff --git a/node_modules/npm/lib/utils/reify-output.js b/node_modules/npm/lib/utils/reify-output.js deleted file mode 100644 index 22036dc..0000000 --- a/node_modules/npm/lib/utils/reify-output.js +++ /dev/null @@ -1,185 +0,0 @@ -// pass in an arborist object, and it'll output the data about what -// was done, what was audited, etc. -// -// added ## packages, removed ## packages, and audited ## packages in 19.157s -// -// 1 package is looking for funding -// run `npm fund` for details -// -// found 37 vulnerabilities (5 low, 7 moderate, 25 high) -// run `npm audit fix` to fix them, or `npm audit` for details - -const log = require('./log-shim.js') -const { depth } = require('treeverse') -const ms = require('ms') -const npmAuditReport = require('npm-audit-report') -const { readTree: getFundingInfo } = require('libnpmfund') -const auditError = require('./audit-error.js') - -// TODO: output JSON if flatOptions.json is true -const reifyOutput = (npm, arb) => { - const { diff, actualTree } = arb - - // note: fails and crashes if we're running audit fix and there was an error - // which is a good thing, because there's no point printing all this other - // stuff in that case! - const auditReport = auditError(npm, arb.auditReport) ? null : arb.auditReport - - // don't print any info in --silent mode, but we still need to - // set the exitCode properly from the audit report, if we have one. - if (npm.silent) { - getAuditReport(npm, auditReport) - return - } - - const summary = { - added: 0, - removed: 0, - changed: 0, - audited: auditReport && !auditReport.error ? actualTree.inventory.size : 0, - funding: 0, - } - - if (diff) { - depth({ - tree: diff, - visit: d => { - switch (d.action) { - case 'REMOVE': - summary.removed++ - break - case 'ADD': - actualTree.inventory.has(d.ideal) && summary.added++ - break - case 'CHANGE': - summary.changed++ - break - default: - return - } - const node = d.actual || d.ideal - log.silly(d.action, node.location) - }, - getChildren: d => d.children, - }) - } - - if (npm.flatOptions.fund) { - const fundingInfo = getFundingInfo(actualTree, { countOnly: true }) - summary.funding = fundingInfo.length - } - - if (npm.flatOptions.json) { - if (auditReport) { - // call this to set the exit code properly - getAuditReport(npm, auditReport) - summary.audit = npm.command === 'audit' ? auditReport - : auditReport.toJSON().metadata - } - npm.output(JSON.stringify(summary, 0, 2)) - } else { - packagesChangedMessage(npm, summary) - packagesFundingMessage(npm, summary) - printAuditReport(npm, auditReport) - } -} - -// if we're running `npm audit fix`, then we print the full audit report -// at the end if there's still stuff, because it's silly for `npm audit` -// to tell you to run `npm audit` for details. otherwise, use the summary -// report. if we get here, we know it's not quiet or json. -// If the loglevel is silent, then we just run the report -// to get the exitCode set appropriately. -const printAuditReport = (npm, report) => { - const res = getAuditReport(npm, report) - if (!res || !res.report) { - return - } - npm.output(`\n${res.report}`) -} - -const getAuditReport = (npm, report) => { - if (!report) { - return - } - - // when in silent mode, we print nothing. the JSON output is - // going to just JSON.stringify() the report object. - const reporter = npm.silent ? 'quiet' - : npm.flatOptions.json ? 'quiet' - : npm.command !== 'audit' ? 'install' - : 'detail' - const defaultAuditLevel = npm.command !== 'audit' ? 'none' : 'low' - const auditLevel = npm.flatOptions.auditLevel || defaultAuditLevel - - const res = npmAuditReport(report, { - reporter, - ...npm.flatOptions, - auditLevel, - chalk: npm.chalk, - }) - if (npm.command === 'audit') { - process.exitCode = process.exitCode || res.exitCode - } - return res -} - -const packagesChangedMessage = (npm, { added, removed, changed, audited }) => { - const msg = ['\n'] - if (added === 0 && removed === 0 && changed === 0) { - msg.push('up to date') - if (audited) { - msg.push(', ') - } - } else { - if (added) { - msg.push(`added ${added} package${added === 1 ? '' : 's'}`) - } - - if (removed) { - if (added) { - msg.push(', ') - } - - if (added && !audited && !changed) { - msg.push('and ') - } - - msg.push(`removed ${removed} package${removed === 1 ? '' : 's'}`) - } - if (changed) { - if (added || removed) { - msg.push(', ') - } - - if (!audited && (added || removed)) { - msg.push('and ') - } - - msg.push(`changed ${changed} package${changed === 1 ? '' : 's'}`) - } - if (audited) { - msg.push(', and ') - } - } - if (audited) { - msg.push(`audited ${audited} package${audited === 1 ? '' : 's'}`) - } - - msg.push(` in ${ms(Date.now() - npm.started)}`) - npm.output(msg.join('')) -} - -const packagesFundingMessage = (npm, { funding }) => { - if (!funding) { - return - } - - npm.output('') - const pkg = funding === 1 ? 'package' : 'packages' - const is = funding === 1 ? 'is' : 'are' - npm.output(`${funding} ${pkg} ${is} looking for funding`) - npm.output(' run `npm fund` for details') -} - -module.exports = reifyOutput diff --git a/node_modules/npm/lib/utils/replace-info.js b/node_modules/npm/lib/utils/replace-info.js deleted file mode 100644 index b9ce619..0000000 --- a/node_modules/npm/lib/utils/replace-info.js +++ /dev/null @@ -1,31 +0,0 @@ -const { cleanUrl } = require('npm-registry-fetch') -const isString = (v) => typeof v === 'string' - -// split on \s|= similar to how nopt parses options -const splitAndReplace = (str) => { - // stateful regex, don't move out of this scope - const splitChars = /[\s=]/g - - let match = null - let result = '' - let index = 0 - while (match = splitChars.exec(str)) { - result += cleanUrl(str.slice(index, match.index)) + match[0] - index = splitChars.lastIndex - } - - return result + cleanUrl(str.slice(index)) -} - -// replaces auth info in an array of arguments or in a strings -function replaceInfo (arg) { - if (isString(arg)) { - return splitAndReplace(arg) - } else if (Array.isArray(arg)) { - return arg.map((a) => isString(a) ? splitAndReplace(a) : a) - } - - return arg -} - -module.exports = replaceInfo diff --git a/node_modules/npm/lib/utils/sbom-cyclonedx.js b/node_modules/npm/lib/utils/sbom-cyclonedx.js deleted file mode 100644 index 0a34089..0000000 --- a/node_modules/npm/lib/utils/sbom-cyclonedx.js +++ /dev/null @@ -1,201 +0,0 @@ -const crypto = require('crypto') -const normalizeData = require('normalize-package-data') -const parseLicense = require('spdx-expression-parse') -const npa = require('npm-package-arg') -const ssri = require('ssri') - -const CYCLONEDX_SCHEMA = 'http://cyclonedx.org/schema/bom-1.5.schema.json' -const CYCLONEDX_FORMAT = 'CycloneDX' -const CYCLONEDX_SCHEMA_VERSION = '1.5' - -const PROP_PATH = 'cdx:npm:package:path' -const PROP_BUNDLED = 'cdx:npm:package:bundled' -const PROP_DEVELOPMENT = 'cdx:npm:package:development' -const PROP_EXTRANEOUS = 'cdx:npm:package:extraneous' -const PROP_PRIVATE = 'cdx:npm:package:private' - -const REF_VCS = 'vcs' -const REF_WEBSITE = 'website' -const REF_ISSUE_TRACKER = 'issue-tracker' -const REF_DISTRIBUTION = 'distribution' - -const ALGO_MAP = { - sha1: 'SHA-1', - sha256: 'SHA-256', - sha384: 'SHA-384', - sha512: 'SHA-512', -} - -const cyclonedxOutput = ({ npm, nodes, packageType, packageLockOnly }) => { - const rootNode = nodes.find(node => node.isRoot) - const childNodes = nodes.filter(node => !node.isRoot && !node.isLink) - const uuid = crypto.randomUUID() - - const deps = [] - const seen = new Set() - for (let node of nodes) { - if (node.isLink) { - node = node.target - } - - if (seen.has(node)) { - continue - } - seen.add(node) - deps.push(toCyclonedxDependency(node, nodes)) - } - - const bom = { - $schema: CYCLONEDX_SCHEMA, - bomFormat: CYCLONEDX_FORMAT, - specVersion: CYCLONEDX_SCHEMA_VERSION, - serialNumber: `urn:uuid:${uuid}`, - version: 1, - metadata: { - timestamp: new Date().toISOString(), - lifecycles: [ - { phase: packageLockOnly ? 'pre-build' : 'build' }, - ], - tools: [ - { - vendor: 'npm', - name: 'cli', - version: npm.version, - }, - ], - component: toCyclonedxItem(rootNode, { packageType }), - }, - components: childNodes.map(toCyclonedxItem), - dependencies: deps, - } - - return bom -} - -const toCyclonedxItem = (node, { packageType }) => { - packageType = packageType || 'library' - - // Calculate purl from package spec - let spec = npa(node.pkgid) - spec = (spec.type === 'alias') ? spec.subSpec : spec - const purl = npa.toPurl(spec) + (isGitNode(node) ? `?vcs_url=${node.resolved}` : '') - - if (node.package) { - normalizeData(node.package) - } - - let parsedLicense - try { - let license = node.package?.license - if (license) { - if (typeof license === 'object') { - license = license.type - } - } - - parsedLicense = parseLicense(license) - } catch (err) { - parsedLicense = null - } - - const component = { - 'bom-ref': toCyclonedxID(node), - type: packageType, - name: node.name, - version: node.version, - scope: (node.optional || node.devOptional) ? 'optional' : 'required', - author: (typeof node.package?.author === 'object') - ? node.package.author.name - : (node.package?.author || undefined), - description: node.package?.description || undefined, - purl: purl, - properties: [{ - name: PROP_PATH, - value: node.location, - }], - externalReferences: [], - } - - if (node.integrity) { - const integrity = ssri.parse(node.integrity, { single: true }) - component.hashes = [{ - alg: ALGO_MAP[integrity.algorithm] || /* istanbul ignore next */ 'SHA-512', - content: integrity.hexDigest(), - }] - } - - if (node.dev === true) { - component.properties.push(prop(PROP_DEVELOPMENT)) - } - - if (node.package?.private === true) { - component.properties.push(prop(PROP_PRIVATE)) - } - - if (node.extraneous === true) { - component.properties.push(prop(PROP_EXTRANEOUS)) - } - - if (node.inBundle === true) { - component.properties.push(prop(PROP_BUNDLED)) - } - - if (!node.isLink && node.resolved) { - component.externalReferences.push(extRef(REF_DISTRIBUTION, node.resolved)) - } - - if (node.package?.repository?.url) { - component.externalReferences.push(extRef(REF_VCS, node.package.repository.url)) - } - - if (node.package?.homepage) { - component.externalReferences.push(extRef(REF_WEBSITE, node.package.homepage)) - } - - if (node.package?.bugs?.url) { - component.externalReferences.push(extRef(REF_ISSUE_TRACKER, node.package.bugs.url)) - } - - // If license is a single SPDX license, use the license field - if (parsedLicense?.license) { - component.licenses = [{ license: { id: parsedLicense.license } }] - // If license is a conjunction, use the expression field - } else if (parsedLicense?.conjunction) { - component.licenses = [{ expression: node.package.license }] - } - - return component -} - -const toCyclonedxDependency = (node, nodes) => { - return { - ref: toCyclonedxID(node), - dependsOn: [...node.edgesOut.values()] - // Filter out edges that are linking to nodes not in the list - .filter(edge => nodes.find(n => n === edge.to)) - .map(edge => toCyclonedxID(edge.to)) - .filter(id => id), - } -} - -const toCyclonedxID = (node) => `${node.packageName}@${node.version}` - -const prop = (name) => ({ name, value: 'true' }) - -const extRef = (type, url) => ({ type, url }) - -const isGitNode = (node) => { - if (!node.resolved) { - return - } - - try { - const { type } = npa(node.resolved) - return type === 'git' || type === 'hosted' - } catch (err) { - /* istanbul ignore next */ - return false - } -} - -module.exports = { cyclonedxOutput } diff --git a/node_modules/npm/lib/utils/sbom-spdx.js b/node_modules/npm/lib/utils/sbom-spdx.js deleted file mode 100644 index fdddd89..0000000 --- a/node_modules/npm/lib/utils/sbom-spdx.js +++ /dev/null @@ -1,182 +0,0 @@ - -const crypto = require('crypto') -const normalizeData = require('normalize-package-data') -const npa = require('npm-package-arg') -const ssri = require('ssri') - -const SPDX_SCHEMA_VERSION = 'SPDX-2.3' -const SPDX_DATA_LICENSE = 'CC0-1.0' -const SPDX_IDENTIFER = 'SPDXRef-DOCUMENT' - -const NO_ASSERTION = 'NOASSERTION' - -const REL_DESCRIBES = 'DESCRIBES' -const REL_PREREQ = 'PREREQUISITE_FOR' -const REL_OPTIONAL = 'OPTIONAL_DEPENDENCY_OF' -const REL_DEV = 'DEV_DEPENDENCY_OF' -const REL_DEP = 'DEPENDENCY_OF' - -const REF_CAT_PACKAGE_MANAGER = 'PACKAGE-MANAGER' -const REF_TYPE_PURL = 'purl' - -const spdxOutput = ({ npm, nodes, packageType }) => { - const rootNode = nodes.find(node => node.isRoot) - const childNodes = nodes.filter(node => !node.isRoot && !node.isLink) - const rootID = rootNode.pkgid - const uuid = crypto.randomUUID() - const ns = `http://spdx.org/spdxdocs/${npa(rootID).escapedName}-${rootNode.version}-${uuid}` - - const relationships = [] - const seen = new Set() - for (let node of nodes) { - if (node.isLink) { - node = node.target - } - - if (seen.has(node)) { - continue - } - seen.add(node) - - const rels = [...node.edgesOut.values()] - // Filter out edges that are linking to nodes not in the list - .filter(edge => nodes.find(n => n === edge.to)) - .map(edge => toSpdxRelationship(node, edge)) - .filter(rel => rel) - - relationships.push(...rels) - } - - const extraRelationships = nodes.filter(node => node.extraneous) - .map(node => toSpdxRelationship(rootNode, { to: node, type: 'optional' })) - - relationships.push(...extraRelationships) - - const bom = { - spdxVersion: SPDX_SCHEMA_VERSION, - dataLicense: SPDX_DATA_LICENSE, - SPDXID: SPDX_IDENTIFER, - name: rootID, - documentNamespace: ns, - creationInfo: { - created: new Date().toISOString(), - creators: [ - `Tool: npm/cli-${npm.version}`, - ], - }, - documentDescribes: [toSpdxID(rootNode)], - packages: [toSpdxItem(rootNode, { packageType }), ...childNodes.map(toSpdxItem)], - relationships: [ - { - spdxElementId: SPDX_IDENTIFER, - relatedSpdxElement: toSpdxID(rootNode), - relationshipType: REL_DESCRIBES, - }, - ...relationships, - ], - } - - return bom -} - -const toSpdxItem = (node, { packageType }) => { - normalizeData(node.package) - - // Calculate purl from package spec - let spec = npa(node.pkgid) - spec = (spec.type === 'alias') ? spec.subSpec : spec - const purl = npa.toPurl(spec) + (isGitNode(node) ? `?vcs_url=${node.resolved}` : '') - - /* For workspace nodes, use the location from their linkNode */ - let location = node.location - if (node.isWorkspace && node.linksIn.size > 0) { - location = node.linksIn.values().next().value.location - } - - let license = node.package?.license - if (license) { - if (typeof license === 'object') { - license = license.type - } - } - - const pkg = { - name: node.packageName, - SPDXID: toSpdxID(node), - versionInfo: node.version, - packageFileName: location, - description: node.package?.description || undefined, - primaryPackagePurpose: packageType ? packageType.toUpperCase() : undefined, - downloadLocation: (node.isLink ? undefined : node.resolved) || NO_ASSERTION, - filesAnalyzed: false, - homepage: node.package?.homepage || NO_ASSERTION, - licenseDeclared: license || NO_ASSERTION, - externalRefs: [ - { - referenceCategory: REF_CAT_PACKAGE_MANAGER, - referenceType: REF_TYPE_PURL, - referenceLocator: purl, - }, - ], - } - - if (node.integrity) { - const integrity = ssri.parse(node.integrity, { single: true }) - pkg.checksums = [{ - algorithm: integrity.algorithm.toUpperCase(), - checksumValue: integrity.hexDigest(), - }] - } - return pkg -} - -const toSpdxRelationship = (node, edge) => { - let type - switch (edge.type) { - case 'peer': - type = REL_PREREQ - break - case 'optional': - type = REL_OPTIONAL - break - case 'dev': - type = REL_DEV - break - default: - type = REL_DEP - } - - return { - spdxElementId: toSpdxID(edge.to), - relatedSpdxElement: toSpdxID(node), - relationshipType: type, - } -} - -const toSpdxID = (node) => { - let name = node.packageName - - // Strip leading @ for scoped packages - name = name.replace(/^@/, '') - - // Replace slashes with dots - name = name.replace(/\//g, '.') - - return `SPDXRef-Package-${name}-${node.version}` -} - -const isGitNode = (node) => { - if (!node.resolved) { - return - } - - try { - const { type } = npa(node.resolved) - return type === 'git' || type === 'hosted' - } catch (err) { - /* istanbul ignore next */ - return false - } -} - -module.exports = { spdxOutput } diff --git a/node_modules/npm/lib/utils/tar.js b/node_modules/npm/lib/utils/tar.js deleted file mode 100644 index c25fe71..0000000 --- a/node_modules/npm/lib/utils/tar.js +++ /dev/null @@ -1,132 +0,0 @@ -const tar = require('tar') -const ssri = require('ssri') -const log = require('./log-shim') -const formatBytes = require('./format-bytes.js') -const columnify = require('columnify') -const localeCompare = require('@isaacs/string-locale-compare')('en', { - sensitivity: 'case', - numeric: true, -}) - -const logTar = (tarball, opts = {}) => { - const { unicode = false } = opts - log.notice('') - log.notice('', `${unicode ? '📦 ' : 'package:'} ${tarball.name}@${tarball.version}`) - log.notice('=== Tarball Contents ===') - if (tarball.files.length) { - log.notice( - '', - columnify( - tarball.files - .map(f => { - const bytes = formatBytes(f.size, false) - return /^node_modules\//.test(f.path) ? null : { path: f.path, size: `${bytes}` } - }) - .filter(f => f), - { - include: ['size', 'path'], - showHeaders: false, - } - ) - ) - } - if (tarball.bundled.length) { - log.notice('=== Bundled Dependencies ===') - tarball.bundled.forEach(name => log.notice('', name)) - } - log.notice('=== Tarball Details ===') - log.notice( - '', - columnify( - [ - { name: 'name:', value: tarball.name }, - { name: 'version:', value: tarball.version }, - tarball.filename && { name: 'filename:', value: tarball.filename }, - { name: 'package size:', value: formatBytes(tarball.size) }, - { name: 'unpacked size:', value: formatBytes(tarball.unpackedSize) }, - { name: 'shasum:', value: tarball.shasum }, - { - name: 'integrity:', - value: - tarball.integrity.toString().slice(0, 20) + - '[...]' + - tarball.integrity.toString().slice(80), - }, - tarball.bundled.length && { name: 'bundled deps:', value: tarball.bundled.length }, - tarball.bundled.length && { - name: 'bundled files:', - value: tarball.entryCount - tarball.files.length, - }, - tarball.bundled.length && { name: 'own files:', value: tarball.files.length }, - { name: 'total files:', value: tarball.entryCount }, - ].filter(x => x), - { - include: ['name', 'value'], - showHeaders: false, - } - ) - ) - log.notice('', '') -} - -const getContents = async (manifest, tarball) => { - const files = [] - const bundled = new Set() - let totalEntries = 0 - let totalEntrySize = 0 - - // reads contents of tarball - const stream = tar.t({ - onentry (entry) { - totalEntries++ - totalEntrySize += entry.size - const p = entry.path - if (p.startsWith('package/node_modules/')) { - const name = p.match(/^package\/node_modules\/((?:@[^/]+\/)?[^/]+)/)[1] - bundled.add(name) - } - files.push({ - path: entry.path.replace(/^package\//, ''), - size: entry.size, - mode: entry.mode, - }) - }, - }) - stream.end(tarball) - - const integrity = await ssri.fromData(tarball, { - algorithms: ['sha1', 'sha512'], - }) - - const comparator = ({ path: a }, { path: b }) => localeCompare(a, b) - - const isUpper = str => { - const ch = str.charAt(0) - return ch === ch.toUpperCase() - } - - const uppers = files.filter(file => isUpper(file.path)) - const others = files.filter(file => !isUpper(file.path)) - - uppers.sort(comparator) - others.sort(comparator) - - const shasum = integrity.sha1[0].hexDigest() - return { - id: manifest._id || `${manifest.name}@${manifest.version}`, - name: manifest.name, - version: manifest.version, - size: tarball.length, - unpackedSize: totalEntrySize, - shasum, - integrity: ssri.parse(integrity.sha512[0]), - // @scope/packagename.tgz => scope-packagename.tgz - // we can safely use these global replace rules due to npm package naming rules - filename: `${manifest.name.replace('@', '').replace('/', '-')}-${manifest.version}.tgz`, - files: uppers.concat(others), - entryCount: totalEntries, - bundled: Array.from(bundled), - } -} - -module.exports = { logTar, getContents } diff --git a/node_modules/npm/lib/utils/timers.js b/node_modules/npm/lib/utils/timers.js deleted file mode 100644 index c215fe9..0000000 --- a/node_modules/npm/lib/utils/timers.js +++ /dev/null @@ -1,116 +0,0 @@ -const EE = require('events') -const fs = require('fs') -const log = require('./log-shim') - -// This is an event emiiter but on/off -// only listen on a single internal event that gets -// emitted whenever a timer ends -class Timers extends EE { - file = null - - #unfinished = new Map() - #finished = {} - #onTimeEnd = Symbol('onTimeEnd') - #initialListener = null - #initialTimer = null - - constructor ({ listener = null, start = 'npm' } = {}) { - super() - this.#initialListener = listener - this.#initialTimer = start - this.#init() - } - - get unfinished () { - return this.#unfinished - } - - get finished () { - return this.#finished - } - - #init () { - this.on() - if (this.#initialListener) { - this.on(this.#initialListener) - } - process.emit('time', this.#initialTimer) - this.started = this.#unfinished.get(this.#initialTimer) - } - - on (listener) { - if (listener) { - super.on(this.#onTimeEnd, listener) - } else { - process.on('time', this.#timeListener) - process.on('timeEnd', this.#timeEndListener) - } - } - - off (listener) { - if (listener) { - super.off(this.#onTimeEnd, listener) - } else { - this.removeAllListeners(this.#onTimeEnd) - process.off('time', this.#timeListener) - process.off('timeEnd', this.#timeEndListener) - } - } - - time (name, fn) { - process.emit('time', name) - const end = () => process.emit('timeEnd', name) - if (typeof fn === 'function') { - const res = fn() - return res && res.finally ? res.finally(end) : (end(), res) - } - return end - } - - load ({ path } = {}) { - if (path) { - this.file = `${path}timing.json` - } - } - - writeFile (metadata) { - if (!this.file) { - return - } - - try { - const globalStart = this.started - const globalEnd = this.#finished.npm || Date.now() - const content = { - metadata, - timers: this.#finished, - // add any unfinished timers with their relative start/end - unfinishedTimers: [...this.#unfinished.entries()].reduce((acc, [name, start]) => { - acc[name] = [start - globalStart, globalEnd - globalStart] - return acc - }, {}), - } - fs.writeFileSync(this.file, JSON.stringify(content) + '\n') - } catch (e) { - this.file = null - log.warn('timing', `could not write timing file: ${e}`) - } - } - - #timeListener = (name) => { - this.#unfinished.set(name, Date.now()) - } - - #timeEndListener = (name) => { - if (this.#unfinished.has(name)) { - const ms = Date.now() - this.#unfinished.get(name) - this.#finished[name] = ms - this.#unfinished.delete(name) - this.emit(this.#onTimeEnd, name, ms) - } else { - log.silly('timing', "Tried to end timer that doesn't exist:", name) - } - } -} - -module.exports = Timers diff --git a/node_modules/npm/lib/utils/update-notifier.js b/node_modules/npm/lib/utils/update-notifier.js deleted file mode 100644 index 1b3e21d..0000000 --- a/node_modules/npm/lib/utils/update-notifier.js +++ /dev/null @@ -1,126 +0,0 @@ -// print a banner telling the user to upgrade npm to latest -// but not in CI, and not if we're doing that already. -// Check daily for betas, and weekly otherwise. - -const ciInfo = require('ci-info') -const semver = require('semver') -const { stat, writeFile } = require('fs/promises') -const { resolve } = require('path') - -// update check frequency -const DAILY = 1000 * 60 * 60 * 24 -const WEEKLY = DAILY * 7 - -// don't put it in the _cacache folder, just in npm's cache -const lastCheckedFile = npm => - resolve(npm.flatOptions.cache, '../_update-notifier-last-checked') - -// Actual check for updates. This is a separate function so that we only load -// this if we are doing the actual update -const updateCheck = async (npm, spec, version, current) => { - const pacote = require('pacote') - - const mani = await pacote.manifest(`npm@${spec}`, { - // always prefer latest, even if doing --tag=whatever on the cmd - defaultTag: 'latest', - ...npm.flatOptions, - cache: false, - }).catch(() => null) - - // if pacote failed, give up - if (!mani) { - return null - } - - const latest = mani.version - - // if the current version is *greater* than latest, we're on a 'next' - // and should get the updates from that release train. - // Note that this isn't another http request over the network, because - // the packument will be cached by pacote from previous request. - if (semver.gt(version, latest) && spec === 'latest') { - return updateNotifier(npm, `^${version}`) - } - - // if we already have something >= the desired spec, then we're done - if (semver.gte(version, latest)) { - return null - } - - const useColor = npm.logColor - const chalk = npm.logChalk - - // ok! notify the user about this update they should get. - // The message is saved for printing at process exit so it will not get - // lost in any other messages being printed as part of the command. - const update = semver.parse(mani.version) - const type = update.major !== current.major ? 'major' - : update.minor !== current.minor ? 'minor' - : update.patch !== current.patch ? 'patch' - : 'prerelease' - const typec = type === 'major' ? chalk.red(type) - : type === 'minor' ? chalk.yellow(type) - : chalk.green(type) - const oldc = chalk.red(current) - const latestc = chalk.green(latest) - const changelog = `https://github.com/npm/cli/releases/tag/v${latest}` - const changelogc = !useColor ? `<${changelog}>` : chalk.cyan(changelog) - const cmd = `npm install -g npm@${latest}` - const cmdc = !useColor ? `\`${cmd}\`` : chalk.green(cmd) - const message = `\nNew ${typec} version of npm available! ` + - `${oldc} -> ${latestc}\n` + - `Changelog: ${changelogc}\n` + - `Run ${cmdc} to update!\n` - - return message -} - -const updateNotifier = async (npm, spec = 'latest') => { - // if we're on a prerelease train, then updates are coming fast - // check for a new one daily. otherwise, weekly. - const { version } = npm - const current = semver.parse(version) - - // if we're on a beta train, always get the next beta - if (current.prerelease.length) { - spec = `^${version}` - } - - // while on a beta train, get updates daily - const duration = spec !== 'latest' ? DAILY : WEEKLY - - const t = new Date(Date.now() - duration) - // if we don't have a file, then definitely check it. - const st = await stat(lastCheckedFile(npm)).catch(() => ({ mtime: t - 1 })) - - // if we've already checked within the specified duration, don't check again - if (!(t > st.mtime)) { - return null - } - - return updateCheck(npm, spec, version, current) -} - -// only update the notification timeout if we actually finished checking -module.exports = async npm => { - if ( - // opted out - !npm.config.get('update-notifier') - // global npm update - || (npm.flatOptions.global && - ['install', 'update'].includes(npm.command) && - npm.argv.some(arg => /^npm(@|$)/.test(arg))) - // CI - || ciInfo.isCI - ) { - return null - } - - const notification = await updateNotifier(npm) - - // intentional. do not await this. it's a best-effort update. if this - // fails, it's ok. might be using /dev/null as the cache or something weird - // like that. - writeFile(lastCheckedFile(npm), '').catch(() => {}) - return notification -} diff --git a/node_modules/npm/lib/utils/validate-lockfile.js b/node_modules/npm/lib/utils/validate-lockfile.js deleted file mode 100644 index 29161ec..0000000 --- a/node_modules/npm/lib/utils/validate-lockfile.js +++ /dev/null @@ -1,29 +0,0 @@ -// compares the inventory of package items in the tree -// that is about to be installed (idealTree) with the inventory -// of items stored in the package-lock file (virtualTree) -// -// Returns empty array if no errors found or an array populated -// with an entry for each validation error found. -function validateLockfile (virtualTree, idealTree) { - const errors = [] - - // loops through the inventory of packages resulted by ideal tree, - // for each package compares the versions with the version stored in the - // package-lock and adds an error to the list in case of mismatches - for (const [key, entry] of idealTree.entries()) { - const lock = virtualTree.get(key) - - if (!lock) { - errors.push(`Missing: ${entry.name}@${entry.version} from lock file`) - continue - } - - if (entry.version !== lock.version) { - errors.push(`Invalid: lock file's ${lock.name}@${lock.version} does ` + - `not satisfy ${entry.name}@${entry.version}`) - } - } - return errors -} - -module.exports = validateLockfile diff --git a/node_modules/npm/lib/utils/web-auth.js b/node_modules/npm/lib/utils/web-auth.js deleted file mode 100644 index ce55168..0000000 --- a/node_modules/npm/lib/utils/web-auth.js +++ /dev/null @@ -1,20 +0,0 @@ -const EventEmitter = require('events') -const { webAuthCheckLogin } = require('npm-profile') - -async function webAuth (opener, initialUrl, doneUrl, opts) { - const doneEmitter = new EventEmitter() - - const openPromise = opener(initialUrl, doneEmitter) - const webAuthCheckPromise = webAuthCheckLogin(doneUrl, { ...opts, cache: false }) - .then(authResult => { - // cancel open prompt if it's present - doneEmitter.emit('abort') - - return authResult.token - }) - - await openPromise - return await webAuthCheckPromise -} - -module.exports = webAuth diff --git a/node_modules/npm/lib/workspaces/get-workspaces.js b/node_modules/npm/lib/workspaces/get-workspaces.js deleted file mode 100644 index 59efb0e..0000000 --- a/node_modules/npm/lib/workspaces/get-workspaces.js +++ /dev/null @@ -1,54 +0,0 @@ -const { resolve, relative } = require('path') -const mapWorkspaces = require('@npmcli/map-workspaces') -const { minimatch } = require('minimatch') -const pkgJson = require('@npmcli/package-json') - -// minimatch wants forward slashes only for glob patterns -const globify = pattern => pattern.split('\\').join('/') - -// Returns an Map of paths to workspaces indexed by workspace name -// { foo => '/path/to/foo' } -const getWorkspaces = async (filters, { path, includeWorkspaceRoot, relativeFrom }) => { - // TODO we need a better error to be bubbled up here if this call fails - const { content: pkg } = await pkgJson.normalize(path) - const workspaces = await mapWorkspaces({ cwd: path, pkg }) - let res = new Map() - if (includeWorkspaceRoot) { - res.set(pkg.name, path) - } - - if (!filters.length) { - res = new Map([...res, ...workspaces]) - } - - for (const filterArg of filters) { - for (const [workspaceName, workspacePath] of workspaces.entries()) { - let relativePath = relative(relativeFrom, workspacePath) - if (filterArg.startsWith('./')) { - relativePath = `./${relativePath}` - } - const relativeFilter = relative(path, filterArg) - if (filterArg === workspaceName - || resolve(relativeFrom, filterArg) === workspacePath - || minimatch(relativePath, `${globify(relativeFilter)}/*`) - || minimatch(relativePath, `${globify(filterArg)}/*`) - ) { - res.set(workspaceName, workspacePath) - } - } - } - - if (!res.size) { - let msg = '!' - if (filters.length) { - msg = `:\n ${filters.reduce( - (acc, filterArg) => `${acc} --workspace=${filterArg}`, '')}` - } - - throw new Error(`No workspaces found${msg}`) - } - - return res -} - -module.exports = getWorkspaces diff --git a/node_modules/npm/lib/workspaces/update-workspaces.js b/node_modules/npm/lib/workspaces/update-workspaces.js deleted file mode 100644 index 892f366..0000000 --- a/node_modules/npm/lib/workspaces/update-workspaces.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict' - -const reifyFinish = require('../utils/reify-finish.js') - -async function updateWorkspaces ({ - config, - flatOptions, - localPrefix, - npm, - workspaces, -}) { - if (!flatOptions.workspacesUpdate || !workspaces.length) { - return - } - - // default behavior is to not save by default in order to avoid - // race condition problems when publishing multiple workspaces - // that have dependencies on one another, it might still be useful - // in some cases, which then need to set --save - const save = config.isDefault('save') - ? false - : config.get('save') - - // runs a minimalistic reify update, targeting only the workspaces - // that had version updates and skipping fund/audit/save - const opts = { - ...flatOptions, - audit: false, - fund: false, - path: localPrefix, - save, - } - const Arborist = require('@npmcli/arborist') - const arb = new Arborist(opts) - - await arb.reify({ ...opts, update: workspaces }) - await reifyFinish(npm, arb) -} - -module.exports = updateWorkspaces diff --git a/node_modules/npm/man/man1/npm-access.1 b/node_modules/npm/man/man1/npm-access.1 deleted file mode 100644 index 8058a03..0000000 --- a/node_modules/npm/man/man1/npm-access.1 +++ /dev/null @@ -1,115 +0,0 @@ -.TH "NPM-ACCESS" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-access\fR - Set access level on published packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm access list packages \[lB]|| \[lB]\[rB] -npm access list collaborators \[lB] \[lB]\[rB]\[rB] -npm access get status \[lB]\[rB] -npm access set status=public|private \[lB]\[rB] -npm access set mfa=none|publish|automation \[lB]\[rB] -npm access grant \[lB]\[rB] -npm access revoke \[lB]\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Used to set access controls on private packages. -.P -For all of the subcommands, \fBnpm access\fR will perform actions on the packages in the current working directory if no package name is passed to the subcommand. -.RS 0 -.IP \(bu 4 -public / restricted (deprecated): Set a package to be either publicly accessible or restricted. -.IP \(bu 4 -grant / revoke (deprecated): Add or remove the ability of users and teams to have read-only or read-write access to a package. -.IP \(bu 4 -2fa-required / 2fa-not-required (deprecated): Configure whether a package requires that anyone publishing it have two-factor authentication enabled on their account. -.IP \(bu 4 -ls-packages (deprecated): Show all of the packages a user or a team is able to access, along with the access level, except for read-only public packages (it won't print the whole registry listing) -.IP \(bu 4 -ls-collaborators (deprecated): Show all of the access privileges for a package. Will only show permissions for packages to which you have at least read access. If \fB\fR is passed in, the list is filtered only to teams \fIthat\fR user happens to belong to. -.IP \(bu 4 -edit (not implemented) -.RE 0 - -.SS "Details" -.P -\fBnpm access\fR always operates directly on the current registry, configurable from the command line using \fB--registry=\fR. -.P -Unscoped packages are \fIalways public\fR. -.P -Scoped packages \fIdefault to restricted\fR, but you can either publish them as public using \fBnpm publish --access=public\fR, or set their access as public using \fBnpm access public\fR after the initial publish. -.P -You must have privileges to set the access of a package: -.RS 0 -.IP \(bu 4 -You are an owner of an unscoped or scoped package. -.IP \(bu 4 -You are a member of the team that owns a scope. -.IP \(bu 4 -You have been given read-write privileges for a package, either as a member of a team or directly as an owner. -.RE 0 - -.P -If you have two-factor authentication enabled then you'll be prompted to provide a second factor, or may use the \fB--otp=...\fR option to specify it on the command line. -.P -If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use \fB--access=public\fR. -.P -Management of teams and team memberships is done with the \fBnpm team\fR command. -.SS "Configuration" -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "See Also" -.RS 0 -.IP \(bu 4 -\fB\fBlibnpmaccess\fR\fR \fI\(lahttps://npm.im/libnpmaccess\(ra\fR -.IP \(bu 4 -npm help team -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help registry -.RE 0 diff --git a/node_modules/npm/man/man1/npm-adduser.1 b/node_modules/npm/man/man1/npm-adduser.1 deleted file mode 100644 index 45feecd..0000000 --- a/node_modules/npm/man/man1/npm-adduser.1 +++ /dev/null @@ -1,91 +0,0 @@ -.TH "NPM-ADDUSER" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-adduser\fR - Add a registry user account -.SS "Synopsis" -.P -.RS 2 -.nf -npm adduser - -alias: add-user -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Create a new user in the specified registry, and save the credentials to the \fB.npmrc\fR file. If no registry is specified, the default registry will be used (see npm help registry). -.P -When using \fBlegacy\fR for your \fBauth-type\fR, the username, password, and email are read in from prompts. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBscope\fR" -.RS 0 -.IP \(bu 4 -Default: the scope of the current project, if any, or "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Associate an operation with a scope for a scoped registry. -.P -Useful when logging in to or out of a private registry: -.P -.RS 2 -.nf -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -.fi -.RE -.P -This will cause \fB@mycorp\fR to be mapped to the registry for future installation of packages specified according to the pattern \fB@mycorp/package\fR. -.P -This will also cause \fBnpm init\fR to create a scoped package. -.P -.RS 2 -.nf -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -.fi -.RE -.SS "\fBauth-type\fR" -.RS 0 -.IP \(bu 4 -Default: "web" -.IP \(bu 4 -Type: "legacy" or "web" -.RE 0 - -.P -What authentication strategy to use with \fBlogin\fR. Note that if an \fBotp\fR config is given, this value will always be set to \fBlegacy\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help token -.IP \(bu 4 -npm help profile -.RE 0 diff --git a/node_modules/npm/man/man1/npm-audit.1 b/node_modules/npm/man/man1/npm-audit.1 deleted file mode 100644 index b11d3da..0000000 --- a/node_modules/npm/man/man1/npm-audit.1 +++ /dev/null @@ -1,446 +0,0 @@ -.TH "NPM-AUDIT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-audit\fR - Run a security audit -.SS "Synopsis" -.P -.RS 2 -.nf -npm audit \[lB]fix|signatures\[rB] -.fi -.RE -.SS "Description" -.P -The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. If any vulnerabilities are found, then the impact and appropriate remediation will be calculated. If the \fBfix\fR argument is provided, then remediations will be applied to the package tree. -.P -The command will exit with a 0 exit code if no vulnerabilities were found. -.P -Note that some vulnerabilities cannot be fixed automatically and will require manual intervention or review. Also note that since \fBnpm audit -fix\fR runs a full-fledged \fBnpm install\fR under the hood, all configs that apply to the installer will also apply to \fBnpm install\fR -- so things like \fBnpm audit fix --package-lock-only\fR will work as expected. -.P -By default, the audit command will exit with a non-zero code if any vulnerability is found. It may be useful in CI environments to include the \fB--audit-level\fR parameter to specify the minimum vulnerability level that will cause the command to fail. This option does not filter the report output, it simply changes the command's failure threshold. -.SS "Package lock" -.P -By default npm requires a package-lock or shrinkwrap in order to run the audit. You can bypass the package lock with \fB--no-package-lock\fR but be aware the results may be different with every run, since npm will re-build the dependency tree each time. -.SS "Audit Signatures" -.P -To ensure the integrity of packages you download from the public npm registry, or any registry that supports signatures, you can verify the registry signatures of downloaded packages using the npm CLI. -.P -Registry signatures can be verified using the following \fBaudit\fR command: -.P -.RS 2 -.nf -$ npm audit signatures -.fi -.RE -.P -The npm CLI supports registry signatures and signing keys provided by any registry if the following conventions are followed: -.RS 0 -.IP 1. 4 -Signatures are provided in the package's \fBpackument\fR in each published version within the \fBdist\fR object: -.RE 0 - -.P -.RS 2 -.nf -"dist":{ - "..omitted..": "..omitted..", - "signatures": \[lB]{ - "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}", - "sig": "a312b9c3cb4a1b693e8ebac5ee1ca9cc01f2661c14391917dcb111517f72370809..." - }\[rB] -} -.fi -.RE -.P -See this \fBexample\fR \fI\(lahttps://registry.npmjs.org/light-cycle/1.4.3\(ra\fR of a signed package from the public npm registry. -.P -The \fBsig\fR is generated using the following template: \fB${package.name}@${package.version}:${package.dist.integrity}\fR and the \fBkeyid\fR has to match one of the public signing keys below. -.RS 0 -.IP 2. 4 -Public signing keys are provided at \fBregistry-host.tld/-/npm/v1/keys\fR in the following format: -.RE 0 - -.P -.RS 2 -.nf -{ - "keys": \[lB]{ - "expires": null, - "keyid": "SHA256:{{SHA256_PUBLIC_KEY}}", - "keytype": "ecdsa-sha2-nistp256", - "scheme": "ecdsa-sha2-nistp256", - "key": "{{B64_PUBLIC_KEY}}" - }\[rB] -} -.fi -.RE -.P -Keys response: -.RS 0 -.IP \(bu 4 -\fBexpires\fR: null or a simplified extended \fBISO 8601 format\fR \fI\(lahttps://en.wikipedia.org/wiki/ISO_8601"\(ra\fR: \fBYYYY-MM-DDTHH:mm:ss.sssZ\fR -.IP \(bu 4 -\fBkeydid\fR: sha256 fingerprint of the public key -.IP \(bu 4 -\fBkeytype\fR: only \fBecdsa-sha2-nistp256\fR is currently supported by the npm CLI -.IP \(bu 4 -\fBscheme\fR: only \fBecdsa-sha2-nistp256\fR is currently supported by the npm CLI -.IP \(bu 4 -\fBkey\fR: base64 encoded public key -.RE 0 - -.P -See this \fBexample key's response from the public npm registry\fR \fI\(lahttps://registry.npmjs.org/-/npm/v1/keys"\(ra\fR. -.SS "Audit Endpoints" -.P -There are two audit endpoints that npm may use to fetch vulnerability information: the \fBBulk Advisory\fR endpoint and the \fBQuick Audit\fR endpoint. -.SS "Bulk Advisory Endpoint" -.P -As of version 7, npm uses the much faster \fBBulk Advisory\fR endpoint to optimize the speed of calculating audit results. -.P -npm will generate a JSON payload with the name and list of versions of each package in the tree, and POST it to the default configured registry at the path \fB/-/npm/v1/security/advisories/bulk\fR. -.P -Any packages in the tree that do not have a \fBversion\fR field in their package.json file will be ignored. If any \fB--omit\fR options are specified (either via the \fB\fB--omit\fR config\fR \fI\(la/using-npm/config#omit\(ra\fR, or one of the shorthands such as \fB--production\fR, \fB--only=dev\fR, and so on), then packages will be omitted from the submitted payload as appropriate. -.P -If the registry responds with an error, or with an invalid response, then npm will attempt to load advisory data from the \fBQuick Audit\fR endpoint. -.P -The expected result will contain a set of advisory objects for each dependency that matches the advisory range. Each advisory object contains a \fBname\fR, \fBurl\fR, \fBid\fR, \fBseverity\fR, \fBvulnerable_versions\fR, and \fBtitle\fR. -.P -npm then uses these advisory objects to calculate vulnerabilities and meta-vulnerabilities of the dependencies within the tree. -.SS "Quick Audit Endpoint" -.P -If the \fBBulk Advisory\fR endpoint returns an error, or invalid data, npm will attempt to load advisory data from the \fBQuick Audit\fR endpoint, which is considerably slower in most cases. -.P -The full package tree as found in \fBpackage-lock.json\fR is submitted, along with the following pieces of additional metadata: -.RS 0 -.IP \(bu 4 -\fBnpm_version\fR -.IP \(bu 4 -\fBnode_version\fR -.IP \(bu 4 -\fBplatform\fR -.IP \(bu 4 -\fBarch\fR -.IP \(bu 4 -\fBnode_env\fR -.RE 0 - -.P -All packages in the tree are submitted to the Quick Audit endpoint. Omitted dependency types are skipped when generating the report. -.SS "Scrubbing" -.P -Out of an abundance of caution, npm versions 5 and 6 would "scrub" any packages from the submitted report if their name contained a \fB/\fR character, so as to avoid leaking the names of potentially private packages or git URLs. -.P -However, in practice, this resulted in audits often failing to properly detect meta-vulnerabilities, because the tree would appear to be invalid due to missing dependencies, and prevented the detection of vulnerabilities in package trees that used git dependencies or private modules. -.P -This scrubbing has been removed from npm as of version 7. -.SS "Calculating Meta-Vulnerabilities and Remediations" -.P -npm uses the \fB\fB@npmcli/metavuln-calculator\fR\fR \fI\(lahttp://npm.im/@npmcli/metavuln-calculator\(ra\fR module to turn a set of security advisories into a set of "vulnerability" objects. A "meta-vulnerability" is a dependency that is vulnerable by virtue of dependence on vulnerable versions of a vulnerable package. -.P -For example, if the package \fBfoo\fR is vulnerable in the range \fB>=1.0.2 -<2.0.0\fR, and the package \fBbar\fR depends on \fBfoo@^1.1.0\fR, then that version of \fBbar\fR can only be installed by installing a vulnerable version of \fBfoo\fR. In this case, \fBbar\fR is a "metavulnerability". -.P -Once metavulnerabilities for a given package are calculated, they are cached in the \fB~/.npm\fR folder and only re-evaluated if the advisory range changes, or a new version of the package is published (in which case, the new version is checked for metavulnerable status as well). -.P -If the chain of metavulnerabilities extends all the way to the root project, and it cannot be updated without changing its dependency ranges, then \fBnpm audit fix\fR will require the \fB--force\fR option to apply the remediation. If remediations do not require changes to the dependency ranges, then all vulnerable packages will be updated to a version that does not have an advisory or metavulnerability posted against it. -.SS "Exit Code" -.P -The \fBnpm audit\fR command will exit with a 0 exit code if no vulnerabilities were found. The \fBnpm audit fix\fR command will exit with 0 exit code if no vulnerabilities are found \fIor\fR if the remediation is able to successfully fix all vulnerabilities. -.P -If vulnerabilities were found the exit code will depend on the \fB\fBaudit-level\fR config\fR \fI\(la/using-npm/config#audit-level\(ra\fR. -.SS "Examples" -.P -Scan your project for vulnerabilities and automatically install any compatible updates to vulnerable dependencies: -.P -.RS 2 -.nf -$ npm audit fix -.fi -.RE -.P -Run \fBaudit fix\fR without modifying \fBnode_modules\fR, but still updating the pkglock: -.P -.RS 2 -.nf -$ npm audit fix --package-lock-only -.fi -.RE -.P -Skip updating \fBdevDependencies\fR: -.P -.RS 2 -.nf -$ npm audit fix --only=prod -.fi -.RE -.P -Have \fBaudit fix\fR install SemVer-major updates to toplevel dependencies, not just SemVer-compatible ones: -.P -.RS 2 -.nf -$ npm audit fix --force -.fi -.RE -.P -Do a dry run to get an idea of what \fBaudit fix\fR will do, and \fIalso\fR output install information in JSON format: -.P -.RS 2 -.nf -$ npm audit fix --dry-run --json -.fi -.RE -.P -Scan your project for vulnerabilities and just show the details, without fixing anything: -.P -.RS 2 -.nf -$ npm audit -.fi -.RE -.P -Get the detailed audit report in JSON format: -.P -.RS 2 -.nf -$ npm audit --json -.fi -.RE -.P -Fail an audit only if the results include a vulnerability with a level of moderate or higher: -.P -.RS 2 -.nf -$ npm audit --audit-level=moderate -.fi -.RE -.SS "Configuration" -.SS "\fBaudit-level\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null, "info", "low", "moderate", "high", "critical", or "none" -.RE 0 - -.P -The minimum level of vulnerability for \fBnpm audit\fR to exit with a non-zero exit code. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBforce\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. -.RS 0 -.IP \(bu 4 -Allow clobbering non-npm files in global installs. -.IP \(bu 4 -Allow the \fBnpm version\fR command to work on an unclean git repository. -.IP \(bu 4 -Allow deleting the cache folder with \fBnpm cache clean\fR. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of npm. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of \fBnode\fR, even if \fB--engine-strict\fR is enabled. -.IP \(bu 4 -Allow \fBnpm audit fix\fR to install modules outside your stated dependency range (including SemVer-major changes). -.IP \(bu 4 -Allow unpublishing all versions of a published package. -.IP \(bu 4 -Allow conflicting peerDependencies to be installed in the root project. -.IP \(bu 4 -Implicitly set \fB--yes\fR during \fBnpm init\fR. -.IP \(bu 4 -Allow clobbering existing values in \fBnpm pkg\fR -.IP \(bu 4 -Allow unpublishing of entire packages (not just a single version). -.RE 0 - -.P -If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/man/man1/npm-bugs.1 b/node_modules/npm/man/man1/npm-bugs.1 deleted file mode 100644 index 415b74b..0000000 --- a/node_modules/npm/man/man1/npm-bugs.1 +++ /dev/null @@ -1,115 +0,0 @@ -.TH "NPM-BUGS" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-bugs\fR - Report bugs for a package in a web browser -.SS "Synopsis" -.P -.RS 2 -.nf -npm bugs \[lB] \[lB] ...\[rB]\[rB] - -alias: issues -.fi -.RE -.SS "Description" -.P -This command tries to guess at the likely location of a package's bug tracker URL or the \fBmailto\fR URL of the support email, and then tries to open it using the \fB\fB--browser\fR config\fR \fI\(la/using-npm/config#browser\(ra\fR param. If no package name is provided, it will search for a \fBpackage.json\fR in the current folder and use the \fBname\fR property. -.SS "Configuration" -.SS "\fBbrowser\fR" -.RS 0 -.IP \(bu 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR -.IP \(bu 4 -Type: null, Boolean, or String -.RE 0 - -.P -The browser that is called by npm commands to open websites. -.P -Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal. -.P -Set to \fBtrue\fR to use default system URL opener. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help docs -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man1/npm-cache.1 b/node_modules/npm/man/man1/npm-cache.1 deleted file mode 100644 index 85e16d8..0000000 --- a/node_modules/npm/man/man1/npm-cache.1 +++ /dev/null @@ -1,78 +0,0 @@ -.TH "NPM-CACHE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-cache\fR - Manipulates packages cache -.SS "Synopsis" -.P -.RS 2 -.nf -npm cache add -npm cache clean \[lB]\[rB] -npm cache ls \[lB]@\[rB] -npm cache verify -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Used to add, list, or clean the npm cache folder. -.RS 0 -.IP \(bu 4 -add: Add the specified packages to the local cache. This command is primarily intended to be used internally by npm, but it can provide a way to add data to the local installation cache explicitly. -.IP \(bu 4 -clean: Delete all data out of the cache folder. Note that this is typically unnecessary, as npm's cache is self-healing and resistant to data corruption issues. -.IP \(bu 4 -verify: Verify the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data. -.RE 0 - -.SS "Details" -.P -npm stores cache data in an opaque directory within the configured \fBcache\fR, named \fB_cacache\fR. This directory is a \fB\fBcacache\fR\fR \fI\(lahttp://npm.im/cacache\(ra\fR-based content-addressable cache that stores all http request data as well as other package-related data. This directory is primarily accessed through \fBpacote\fR, the library responsible for all package fetching as of npm@5. -.P -All data that passes through the cache is fully verified for integrity on both insertion and extraction. Cache corruption will either trigger an error, or signal to \fBpacote\fR that the data must be refetched, which it will do automatically. For this reason, it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why \fBclean\fR now requires \fB--force\fR to run. -.P -There is currently no method exposed through npm to inspect or directly manage the contents of this cache. In order to access it, \fBcacache\fR must be used directly. -.P -npm will not remove data by itself: the cache will grow as new packages are installed. -.SS "A note about the cache's design" -.P -The npm cache is strictly a cache: it should not be relied upon as a persistent and reliable data store for package data. npm makes no guarantee that a previously-cached piece of data will be available later, and will automatically delete corrupted contents. The primary guarantee that the cache makes is that, if it does return data, that data will be exactly the data that was inserted. -.P -To run an offline verification of existing cache contents, use \fBnpm cache -verify\fR. -.SS "Configuration" -.SS "\fBcache\fR" -.RS 0 -.IP \(bu 4 -Default: Windows: \fB%LocalAppData%\[rs]npm-cache\fR, Posix: \fB~/.npm\fR -.IP \(bu 4 -Type: Path -.RE 0 - -.P -The location of npm's cache directory. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help pack -.IP \(bu 4 -https://npm.im/cacache -.IP \(bu 4 -https://npm.im/pacote -.IP \(bu 4 -https://npm.im/@npmcli/arborist -.IP \(bu 4 -https://npm.im/make-fetch-happen -.RE 0 diff --git a/node_modules/npm/man/man1/npm-ci.1 b/node_modules/npm/man/man1/npm-ci.1 deleted file mode 100644 index e5db12d..0000000 --- a/node_modules/npm/man/man1/npm-ci.1 +++ /dev/null @@ -1,289 +0,0 @@ -.TH "NPM-CI" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-ci\fR - Clean install a project -.SS "Synopsis" -.P -.RS 2 -.nf -npm ci - -aliases: clean-install, ic, install-clean, isntall-clean -.fi -.RE -.SS "Description" -.P -This command is similar to npm help install, except it's meant to be used in automated environments such as test platforms, continuous integration, and deployment -- or any situation where you want to make sure you're doing a clean install of your dependencies. -.P -The main differences between using \fBnpm install\fR and \fBnpm ci\fR are: -.RS 0 -.IP \(bu 4 -The project \fBmust\fR have an existing \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR. -.IP \(bu 4 -If dependencies in the package lock do not match those in \fBpackage.json\fR, \fBnpm ci\fR will exit with an error, instead of updating the package lock. -.IP \(bu 4 -\fBnpm ci\fR can only install entire projects at a time: individual dependencies cannot be added with this command. -.IP \(bu 4 -If a \fBnode_modules\fR is already present, it will be automatically removed before \fBnpm ci\fR begins its install. -.IP \(bu 4 -It will never write to \fBpackage.json\fR or any of the package-locks: installs are essentially frozen. -.RE 0 - -.P -NOTE: If you create your \fBpackage-lock.json\fR file by running \fBnpm install\fR with flags that can affect the shape of your dependency tree, such as \fB--legacy-peer-deps\fR or \fB--install-links\fR, you \fImust\fR provide the same flags to \fBnpm ci\fR or you are likely to encounter errors. An easy way to do this is to run, for example, \fBnpm config set legacy-peer-deps=true --location=project\fR and commit the \fB.npmrc\fR file to your repo. -.SS "Example" -.P -Make sure you have a package-lock and an up-to-date install: -.P -.RS 2 -.nf -$ cd ./my/npm/project -$ npm install -added 154 packages in 10s -$ ls | grep package-lock -.fi -.RE -.P -Run \fBnpm ci\fR in that project -.P -.RS 2 -.nf -$ npm ci -added 154 packages in 5s -.fi -.RE -.P -Configure Travis CI to build using \fBnpm ci\fR instead of \fBnpm install\fR: -.P -.RS 2 -.nf -# .travis.yml -install: -- npm ci -# keep the npm cache around to speed up installs -cache: - directories: - - "$HOME/.npm" -.fi -.RE -.SS "Configuration" -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -\fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man1/npm-completion.1 b/node_modules/npm/man/man1/npm-completion.1 deleted file mode 100644 index 9cdf431..0000000 --- a/node_modules/npm/man/man1/npm-completion.1 +++ /dev/null @@ -1,35 +0,0 @@ -.TH "NPM-COMPLETION" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-completion\fR - Tab Completion for npm -.SS "Synopsis" -.P -.RS 2 -.nf -npm completion -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Enables tab-completion in all npm commands. -.P -The synopsis above loads the completions into your current shell. Adding it to your ~/.bashrc or ~/.zshrc will make the completions available everywhere: -.P -.RS 2 -.nf -npm completion >> ~/.bashrc -npm completion >> ~/.zshrc -.fi -.RE -.P -You may of course also pipe the output of \fBnpm completion\fR to a file such as \fB/usr/local/etc/bash_completion.d/npm\fR or \fB/etc/bash_completion.d/npm\fR if you have a system that will read that file for you. -.P -When \fBCOMP_CWORD\fR, \fBCOMP_LINE\fR, and \fBCOMP_POINT\fR are defined in the environment, \fBnpm completion\fR acts in "plumbing mode", and outputs completions based on the arguments. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help developers -.IP \(bu 4 -npm help npm -.RE 0 diff --git a/node_modules/npm/man/man1/npm-config.1 b/node_modules/npm/man/man1/npm-config.1 deleted file mode 100644 index d4bab45..0000000 --- a/node_modules/npm/man/man1/npm-config.1 +++ /dev/null @@ -1,187 +0,0 @@ -.TH "NPM-CONFIG" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-config\fR - Manage the npm configuration files -.SS "Synopsis" -.P -.RS 2 -.nf -npm config set = \[lB]= ...\[rB] -npm config get \[lB] \[lB] ...\[rB]\[rB] -npm config delete \[lB] ...\[rB] -npm config list \[lB]--json\[rB] -npm config edit -npm config fix - -alias: c -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -npm gets its config settings from the command line, environment variables, \fBnpmrc\fR files, and in some cases, the \fBpackage.json\fR file. -.P -See npm help npmrc for more information about the npmrc files. -.P -See npm help config for a more thorough explanation of the mechanisms involved, and a full list of config options available. -.P -The \fBnpm config\fR command can be used to update and edit the contents of the user and global npmrc files. -.SS "Sub-commands" -.P -Config supports the following sub-commands: -.SS "set" -.P -.RS 2 -.nf -npm config set key=value \[lB]key=value...\[rB] -npm set key=value \[lB]key=value...\[rB] -.fi -.RE -.P -Sets each of the config keys to the value provided. -.P -If value is omitted, the key will be removed from your config file entirely. -.P -Note: for backwards compatibility, \fBnpm config set key value\fR is supported as an alias for \fBnpm config set key=value\fR. -.SS "get" -.P -.RS 2 -.nf -npm config get \[lB]key ...\[rB] -npm get \[lB]key ...\[rB] -.fi -.RE -.P -Echo the config value(s) to stdout. -.P -If multiple keys are provided, then the values will be prefixed with the key names. -.P -If no keys are provided, then this command behaves the same as \fBnpm config -list\fR. -.SS "list" -.P -.RS 2 -.nf -npm config list -.fi -.RE -.P -Show all the config settings. Use \fB-l\fR to also show defaults. Use \fB--json\fR to show the settings in json format. -.SS "delete" -.P -.RS 2 -.nf -npm config delete key \[lB]key ...\[rB] -.fi -.RE -.P -Deletes the specified keys from all configuration files. -.SS "edit" -.P -.RS 2 -.nf -npm config edit -.fi -.RE -.P -Opens the config file in an editor. Use the \fB--global\fR flag to edit the global config. -.SS "fix" -.P -.RS 2 -.nf -npm config fix -.fi -.RE -.P -Attempts to repair invalid configuration items. Usually this means attaching authentication config (i.e. \fB_auth\fR, \fB_authToken\fR) to the configured \fBregistry\fR. -.SS "Configuration" -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBeditor\fR" -.RS 0 -.IP \(bu 4 -Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\[rs]notepad.exe' on Windows, or 'vi' on Unix systems -.IP \(bu 4 -Type: String -.RE 0 - -.P -The command to run for \fBnpm edit\fR and \fBnpm config edit\fR. -.SS "\fBlocation\fR" -.RS 0 -.IP \(bu 4 -Default: "user" unless \fB--global\fR is passed, which will also set this value to "global" -.IP \(bu 4 -Type: "global", "user", or "project" -.RE 0 - -.P -When passed to \fBnpm config\fR this refers to which config file to use. -.P -When set to "global" mode, packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help npm -.RE 0 diff --git a/node_modules/npm/man/man1/npm-dedupe.1 b/node_modules/npm/man/man1/npm-dedupe.1 deleted file mode 100644 index 2f2e5bb..0000000 --- a/node_modules/npm/man/man1/npm-dedupe.1 +++ /dev/null @@ -1,290 +0,0 @@ -.TH "NPM-DEDUPE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-dedupe\fR - Reduce duplication in the package tree -.SS "Synopsis" -.P -.RS 2 -.nf -npm dedupe - -alias: ddp -.fi -.RE -.SS "Description" -.P -Searches the local package tree and attempts to simplify the overall structure by moving dependencies further up the tree, where they can be more effectively shared by multiple dependent packages. -.P -For example, consider this dependency graph: -.P -.RS 2 -.nf -a -+-- b <-- depends on c@1.0.x -| `-- c@1.0.3 -`-- d <-- depends on c@~1.0.9 - `-- c@1.0.10 -.fi -.RE -.P -In this case, \fBnpm dedupe\fR will transform the tree to: -.P -.RS 2 -.nf -a -+-- b -+-- d -`-- c@1.0.10 -.fi -.RE -.P -Because of the hierarchical nature of node's module lookup, b and d will both get their dependency met by the single c package at the root level of the tree. -.P -In some cases, you may have a dependency graph like this: -.P -.RS 2 -.nf -a -+-- b <-- depends on c@1.0.x -+-- c@1.0.3 -`-- d <-- depends on c@1.x - `-- c@1.9.9 -.fi -.RE -.P -During the installation process, the \fBc@1.0.3\fR dependency for \fBb\fR was placed in the root of the tree. Though \fBd\fR's dependency on \fBc@1.x\fR could have been satisfied by \fBc@1.0.3\fR, the newer \fBc@1.9.0\fR dependency was used, because npm favors updates by default, even when doing so causes duplication. -.P -Running \fBnpm dedupe\fR will cause npm to note the duplication and re-evaluate, deleting the nested \fBc\fR module, because the one in the root is sufficient. -.P -To prefer deduplication over novelty during the installation process, run \fBnpm install --prefer-dedupe\fR or \fBnpm config set prefer-dedupe true\fR. -.P -Arguments are ignored. Dedupe always acts on the entire tree. -.P -Note that this operation transforms the dependency tree, but will never result in new modules being installed. -.P -Using \fBnpm find-dupes\fR will run the command in \fB--dry-run\fR mode. -.P -Note: \fBnpm dedupe\fR will never update the semver values of direct dependencies in your project \fBpackage.json\fR, if you want to update values in \fBpackage.json\fR you can run: \fBnpm update --save\fR instead. -.SS "Configuration" -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help find-dupes -.IP \(bu 4 -npm help ls -.IP \(bu 4 -npm help update -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man1/npm-deprecate.1 b/node_modules/npm/man/man1/npm-deprecate.1 deleted file mode 100644 index 7463c94..0000000 --- a/node_modules/npm/man/man1/npm-deprecate.1 +++ /dev/null @@ -1,73 +0,0 @@ -.TH "NPM-DEPRECATE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-deprecate\fR - Deprecate a version of a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm deprecate -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -This command will update the npm registry entry for a package, providing a deprecation warning to all who attempt to install it. -.P -It works on \fBversion ranges\fR \fI\(lahttps://semver.npmjs.com/\(ra\fR as well as specific versions, so you can do something like this: -.P -.RS 2 -.nf -npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3" -.fi -.RE -.P -SemVer ranges passed to this command are interpreted such that they \fIdo\fR include prerelease versions. For example: -.P -.RS 2 -.nf -npm deprecate my-thing@1.x "1.x is no longer supported" -.fi -.RE -.P -In this case, a version \fBmy-thing@1.0.0-beta.0\fR will also be deprecated. -.P -You must be the package owner to deprecate something. See the \fBowner\fR and \fBadduser\fR help topics. -.P -To un-deprecate a package, specify an empty string (\fB""\fR) for the \fBmessage\fR argument. Note that you must use double quotes with no space between them to format an empty string. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm-diff.1 b/node_modules/npm/man/man1/npm-diff.1 deleted file mode 100644 index b7378ff..0000000 --- a/node_modules/npm/man/man1/npm-diff.1 +++ /dev/null @@ -1,307 +0,0 @@ -.TH "NPM-DIFF" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-diff\fR - The registry diff command -.SS "Synopsis" -.P -.RS 2 -.nf -npm diff \[lB]...\[rB] -.fi -.RE -.SS "Description" -.P -Similar to its \fBgit diff\fR counterpart, this command will print diff patches of files for packages published to the npm registry. -.RS 0 -.IP \(bu 4 -\fBnpm diff --diff= --diff=\fR -.P -Compares two package versions using their registry specifiers, e.g: \fBnpm diff --diff=pkg@1.0.0 --diff=pkg@^2.0.0\fR. It's also possible to compare across forks of any package, e.g: \fBnpm diff --diff=pkg@1.0.0 --diff=pkg-fork@1.0.0\fR. -.P -Any valid spec can be used, so that it's also possible to compare directories or git repositories, e.g: \fBnpm diff --diff=pkg@latest --diff=./packages/pkg\fR -.P -Here's an example comparing two different versions of a package named \fBabbrev\fR from the registry: -.P -.RS 2 -.nf -npm diff --diff=abbrev@1.1.0 --diff=abbrev@1.1.1 -.fi -.RE -.P -On success, output looks like: -.P -.RS 2 -.nf -diff --git a/package.json b/package.json -index v1.1.0..v1.1.1 100644 ---- a/package.json -+++ b/package.json -@@ -1,6 +1,6 @@ - { - "name": "abbrev", -- "version": "1.1.0", -+ "version": "1.1.1", - "description": "Like ruby's abbrev module, but in js", - "author": "Isaac Z. Schlueter ", - "main": "abbrev.js", -.fi -.RE -.P -Given the flexible nature of npm specs, you can also target local directories or git repos just like when using \fBnpm install\fR: -.P -.RS 2 -.nf -npm diff --diff=https://github.com/npm/libnpmdiff --diff=./local-path -.fi -.RE -.P -In the example above we can compare the contents from the package installed from the git repo at \fBgithub.com/npm/libnpmdiff\fR with the contents of the \fB./local-path\fR that contains a valid package, such as a modified copy of the original. -.IP \(bu 4 -\fBnpm diff\fR (in a package directory, no arguments): -.P -If the package is published to the registry, \fBnpm diff\fR will fetch the tarball version tagged as \fBlatest\fR (this value can be configured using the \fBtag\fR option) and proceed to compare the contents of files present in that tarball, with the current files in your local file system. -.P -This workflow provides a handy way for package authors to see what package-tracked files have been changed in comparison with the latest published version of that package. -.IP \(bu 4 -\fBnpm diff --diff=\fR (in a package directory): -.P -When using a single package name (with no version or tag specifier) as an argument, \fBnpm diff\fR will work in a similar way to \fB\fBnpm-outdated\fR\fR \fI\(lanpm-outdated\(ra\fR and reach for the registry to figure out what current published version of the package named \fB\fR will satisfy its dependent declared semver-range. Once that specific version is known \fBnpm diff\fR will print diff patches comparing the current version of \fB\fR found in the local file system with that specific version returned by the registry. -.P -Given a package named \fBabbrev\fR that is currently installed: -.P -.RS 2 -.nf -npm diff --diff=abbrev -.fi -.RE -.P -That will request from the registry its most up to date version and will print a diff output comparing the currently installed version to this newer one if the version numbers are not the same. -.IP \(bu 4 -\fBnpm diff --diff=\fR (in a package directory): -.P -Similar to using only a single package name, it's also possible to declare a full registry specifier version if you wish to compare the local version of an installed package with the specific version/tag/semver-range provided in \fB\fR. -.P -An example: assuming \fBpkg@1.0.0\fR is installed in the current \fBnode_modules\fR folder, running: -.P -.RS 2 -.nf -npm diff --diff=pkg@2.0.0 -.fi -.RE -.P -It will effectively be an alias to \fBnpm diff --diff=pkg@1.0.0 --diff=pkg@2.0.0\fR. -.IP \(bu 4 -\fBnpm diff --diff= \[lB]--diff=\[rB]\fR (in a package directory): -.P -Using \fBnpm diff\fR along with semver-valid version numbers is a shorthand to compare different versions of the current package. -.P -It needs to be run from a package directory, such that for a package named \fBpkg\fR running \fBnpm diff --diff=1.0.0 --diff=1.0.1\fR is the same as running \fBnpm diff --diff=pkg@1.0.0 --diff=pkg@1.0.1\fR. -.P -If only a single argument \fB\fR is provided, then the current local file system is going to be compared against that version. -.P -Here's an example comparing two specific versions (published to the configured registry) of the current project directory: -.P -.RS 2 -.nf -npm diff --diff=1.0.0 --diff=1.1.0 -.fi -.RE -.RE 0 - -.P -Note that tag names are not valid \fB--diff\fR argument values, if you wish to compare to a published tag, you must use the \fBpkg@tagname\fR syntax. -.SS "Filtering files" -.P -It's possible to also specify positional arguments using file names or globs pattern matching in order to limit the result of diff patches to only a subset of files for a given package, e.g: -.P -.RS 2 -.nf -npm diff --diff=pkg@2 ./lib/ CHANGELOG.md -.fi -.RE -.P -In the example above the diff output is only going to print contents of files located within the folder \fB./lib/\fR and changed lines of code within the \fBCHANGELOG.md\fR file. -.SS "Configuration" -.SS "\fBdiff\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Define arguments to compare in \fBnpm diff\fR. -.SS "\fBdiff-name-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prints only filenames when using \fBnpm diff\fR. -.SS "\fBdiff-unified\fR" -.RS 0 -.IP \(bu 4 -Default: 3 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The number of lines of context to print in \fBnpm diff\fR. -.SS "\fBdiff-ignore-all-space\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Ignore whitespace when comparing lines in \fBnpm diff\fR. -.SS "\fBdiff-no-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Do not show any source or destination prefix in \fBnpm diff\fR output. -.P -Note: this causes \fBnpm diff\fR to ignore the \fB--diff-src-prefix\fR and \fB--diff-dst-prefix\fR configs. -.SS "\fBdiff-src-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "a/" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Source prefix to be used in \fBnpm diff\fR output. -.SS "\fBdiff-dst-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "b/" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Destination prefix to be used in \fBnpm diff\fR output. -.SS "\fBdiff-text\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Treat all files as text in \fBnpm diff\fR. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBtag\fR" -.RS 0 -.IP \(bu 4 -Default: "latest" -.IP \(bu 4 -Type: String -.RE 0 - -.P -If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag. -.P -Also the tag that is added to the package@version specified by the \fBnpm tag\fR command, if no explicit tag is given. -.P -When used by the \fBnpm diff\fR command, this is the tag used to fetch the tarball that will be compared with the local files by default. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help outdated -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help registry -.RE 0 diff --git a/node_modules/npm/man/man1/npm-dist-tag.1 b/node_modules/npm/man/man1/npm-dist-tag.1 deleted file mode 100644 index a952ce5..0000000 --- a/node_modules/npm/man/man1/npm-dist-tag.1 +++ /dev/null @@ -1,144 +0,0 @@ -.TH "NPM-DIST-TAG" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-dist-tag\fR - Modify package distribution tags -.SS "Synopsis" -.P -.RS 2 -.nf -npm dist-tag add \[lB]\[rB] -npm dist-tag rm -npm dist-tag ls \[lB]\[rB] - -alias: dist-tags -.fi -.RE -.SS "Description" -.P -Add, remove, and enumerate distribution tags on a package: -.RS 0 -.IP \(bu 4 -add: Tags the specified version of the package with the specified tag, or the \fB\fB--tag\fR config\fR \fI\(la/using-npm/config#tag\(ra\fR if not specified. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or go through a second factor flow based on your \fBauthtype\fR. -.IP \(bu 4 -rm: Clear a tag that is no longer in use from the package. If you have two-factor authentication on auth-and-writes then you\[cq]ll need to include a one-time password on the command line with \fB--otp \fR, or go through a second factor flow based on your \fBauthtype\fR -.IP \(bu 4 -ls: Show all of the dist-tags for a package, defaulting to the package in the current prefix. This is the default action if none is specified. -.RE 0 - -.P -A tag can be used when installing packages as a reference to a version instead of using a specific version number: -.P -.RS 2 -.nf -npm install @ -.fi -.RE -.P -When installing dependencies, a preferred tagged version may be specified: -.P -.RS 2 -.nf -npm install --tag -.fi -.RE -.P -(This also applies to any other commands that resolve and install dependencies, such as \fBnpm dedupe\fR, \fBnpm update\fR, and \fBnpm audit fix\fR.) -.P -Publishing a package sets the \fBlatest\fR tag to the published version unless the \fB--tag\fR option is used. For example, \fBnpm publish --tag=beta\fR. -.P -By default, \fBnpm install \fR (without any \fB@\fR or \fB@\fR specifier) installs the \fBlatest\fR tag. -.SS "Purpose" -.P -Tags can be used to provide an alias instead of version numbers. -.P -For example, a project might choose to have multiple streams of development and use a different tag for each stream, e.g., \fBstable\fR, \fBbeta\fR, \fBdev\fR, \fBcanary\fR. -.P -By default, the \fBlatest\fR tag is used by npm to identify the current version of a package, and \fBnpm install \fR (without any \fB@\fR or \fB@\fR specifier) installs the \fBlatest\fR tag. Typically, projects only use the \fBlatest\fR tag for stable release versions, and use other tags for unstable versions such as prereleases. -.P -The \fBnext\fR tag is used by some projects to identify the upcoming version. -.P -Other than \fBlatest\fR, no tag has any special significance to npm itself. -.SS "Caveats" -.P -This command used to be known as \fBnpm tag\fR, which only created new tags, and so had a different syntax. -.P -Tags must share a namespace with version numbers, because they are specified in the same slot: \fBnpm install @\fR vs \fBnpm install @\fR. -.P -Tags that can be interpreted as valid semver ranges will be rejected. For example, \fBv1.4\fR cannot be used as a tag, because it is interpreted by semver as \fB>=1.4.0 <1.5.0\fR. See \fI\(lahttps://github.com/npm/npm/issues/6082\(ra\fR. -.P -The simplest way to avoid semver problems with tags is to use tags that do not begin with a number or the letter \fBv\fR. -.SS "Configuration" -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help dedupe -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-docs.1 b/node_modules/npm/man/man1/npm-docs.1 deleted file mode 100644 index 3895203..0000000 --- a/node_modules/npm/man/man1/npm-docs.1 +++ /dev/null @@ -1,113 +0,0 @@ -.TH "NPM-DOCS" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-docs\fR - Open documentation for a package in a web browser -.SS "Synopsis" -.P -.RS 2 -.nf -npm docs \[lB] \[lB] ...\[rB]\[rB] - -alias: home -.fi -.RE -.SS "Description" -.P -This command tries to guess at the likely location of a package's documentation URL, and then tries to open it using the \fB\fB--browser\fR config\fR \fI\(la/using-npm/config#browser\(ra\fR param. You can pass multiple package names at once. If no package name is provided, it will search for a \fBpackage.json\fR in the current folder and use the \fBname\fR property. -.SS "Configuration" -.SS "\fBbrowser\fR" -.RS 0 -.IP \(bu 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR -.IP \(bu 4 -Type: null, Boolean, or String -.RE 0 - -.P -The browser that is called by npm commands to open websites. -.P -Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal. -.P -Set to \fBtrue\fR to use default system URL opener. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man1/npm-doctor.1 b/node_modules/npm/man/man1/npm-doctor.1 deleted file mode 100644 index 4ab765b..0000000 --- a/node_modules/npm/man/man1/npm-doctor.1 +++ /dev/null @@ -1,82 +0,0 @@ -.TH "NPM-DOCTOR" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-doctor\fR - Check the health of your npm environment -.SS "Synopsis" -.P -.RS 2 -.nf -npm doctor \[lB]ping\[rB] \[lB]registry\[rB] \[lB]versions\[rB] \[lB]environment\[rB] \[lB]permissions\[rB] \[lB]cache\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -\fBnpm doctor\fR runs a set of checks to ensure that your npm installation has what it needs to manage your JavaScript packages. npm is mostly a standalone tool, but it does have some basic requirements that must be met: -.RS 0 -.IP \(bu 4 -Node.js and git must be executable by npm. -.IP \(bu 4 -The primary npm registry, \fBregistry.npmjs.com\fR, or another service that uses the registry API, is available. -.IP \(bu 4 -The directories that npm uses, \fBnode_modules\fR (both locally and globally), exist and can be written by the current user. -.IP \(bu 4 -The npm cache exists, and the package tarballs within it aren't corrupt. -.RE 0 - -.P -Without all of these working properly, npm may not work properly. Many issues are often attributable to things that are outside npm's code base, so \fBnpm doctor\fR confirms that the npm installation is in a good state. -.P -Also, in addition to this, there are also very many issue reports due to using old versions of npm. Since npm is constantly improving, running \fBnpm@latest\fR is better than an old version. -.P -\fBnpm doctor\fR verifies the following items in your environment, and if there are any recommended changes, it will display them. By default npm runs all of these checks. You can limit what checks are ran by specifying them as extra arguments. -.SS "\fBnpm ping\fR" -.P -By default, npm installs from the primary npm registry, \fBregistry.npmjs.org\fR. \fBnpm doctor\fR hits a special ping endpoint within the registry. This can also be checked with \fBnpm ping\fR. If this check fails, you may be using a proxy that needs to be configured, or may need to talk to your IT staff to get access over HTTPS to \fBregistry.npmjs.org\fR. -.P -This check is done against whichever registry you've configured (you can see what that is by running \fBnpm config get registry\fR), and if you're using a private registry that doesn't support the \fB/whoami\fR endpoint supported by the primary registry, this check may fail. -.SS "\fBnpm -v\fR" -.P -While Node.js may come bundled with a particular version of npm, it's the policy of the CLI team that we recommend all users run \fBnpm@latest\fR if they can. As the CLI is maintained by a small team of contributors, there are only resources for a single line of development, so npm's own long-term support releases typically only receive critical security and regression fixes. The team believes that the latest tested version of npm is almost always likely to be the most functional and defect-free version of npm. -.SS "\fBnode -v\fR" -.P -For most users, in most circumstances, the best version of Node will be the latest long-term support (LTS) release. Those of you who want access to new ECMAscript features or bleeding-edge changes to Node's standard library may be running a newer version, and some may be required to run an older version of Node because of enterprise change control policies. That's OK! But in general, the npm team recommends that most users run Node.js LTS. -.SS "\fBnpm config get registry\fR" -.P -You may be installing from private package registries for your project or company. That's great! Others may be following tutorials or StackOverflow questions in an effort to troubleshoot problems you may be having. Sometimes, this may entail changing the registry you're pointing at. This part of \fBnpm doctor\fR just lets you, and maybe whoever's helping you with support, know that you're not using the default registry. -.SS "\fBwhich git\fR" -.P -While it's documented in the README, it may not be obvious that npm needs Git installed to do many of the things that it does. Also, in some cases \[en] especially on Windows \[en] you may have Git set up in such a way that it's not accessible via your \fBPATH\fR so that npm can find it. This check ensures that Git is available. -.SS "Permissions checks" -.RS 0 -.IP \(bu 4 -Your cache must be readable and writable by the user running npm. -.IP \(bu 4 -Global package binaries must be writable by the user running npm. -.IP \(bu 4 -Your local \fBnode_modules\fR path, if you're running \fBnpm doctor\fR with a project directory, must be readable and writable by the user running npm. -.RE 0 - -.SS "Validate the checksums of cached packages" -.P -When an npm package is published, the publishing process generates a checksum that npm uses at install time to verify that the package didn't get corrupted in transit. \fBnpm doctor\fR uses these checksums to validate the package tarballs in your local cache (you can see where that cache is located with \fBnpm config get cache\fR). In the event that there are corrupt packages in your cache, you should probably run \fBnpm cache clean -f\fR and reset the cache. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help bugs -.IP \(bu 4 -npm help help -.IP \(bu 4 -npm help ping -.RE 0 diff --git a/node_modules/npm/man/man1/npm-edit.1 b/node_modules/npm/man/man1/npm-edit.1 deleted file mode 100644 index 626c277..0000000 --- a/node_modules/npm/man/man1/npm-edit.1 +++ /dev/null @@ -1,43 +0,0 @@ -.TH "NPM-EDIT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-edit\fR - Edit an installed package -.SS "Synopsis" -.P -.RS 2 -.nf -npm edit \[lB]/...\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Selects a dependency in the current project and opens the package folder in the default editor (or whatever you've configured as the npm \fBeditor\fR config -- see \fB\fBnpm-config\fR\fR \fI\(lanpm-config\(ra\fR.) -.P -After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages. -.P -For instance, you can do \fBnpm install connect\fR to install connect into your package, and then \fBnpm edit connect\fR to make a few changes to your locally installed copy. -.SS "Configuration" -.SS "\fBeditor\fR" -.RS 0 -.IP \(bu 4 -Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\[rs]notepad.exe' on Windows, or 'vi' on Unix systems -.IP \(bu 4 -Type: String -.RE 0 - -.P -The command to run for \fBnpm edit\fR and \fBnpm config edit\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help explore -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-exec.1 b/node_modules/npm/man/man1/npm-exec.1 deleted file mode 100644 index ae9c519..0000000 --- a/node_modules/npm/man/man1/npm-exec.1 +++ /dev/null @@ -1,350 +0,0 @@ -.TH "NPM-EXEC" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-exec\fR - Run a command from a local or remote npm package -.SS "Synopsis" -.P -.RS 2 -.nf -npm exec -- \[lB]@\[rB] \[lB]args...\[rB] -npm exec --package=\[lB]@\[rB] -- \[lB]args...\[rB] -npm exec -c ' \[lB]args...\[rB]' -npm exec --package=foo -c ' \[lB]args...\[rB]' - -alias: x -.fi -.RE -.SS "Description" -.P -This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via \fBnpm run\fR. -.P -Run without positional arguments or \fB--call\fR, this allows you to interactively run commands in the same sort of shell environment that \fBpackage.json\fR scripts are run. Interactive mode is not supported in CI environments when standard input is a TTY, to prevent hangs. -.P -Whatever packages are specified by the \fB--package\fR option will be provided in the \fBPATH\fR of the executed command, along with any locally installed package executables. The \fB--package\fR option may be specified multiple times, to execute the supplied command in an environment where all specified packages are available. -.P -If any requested packages are not present in the local project dependencies, then a prompt is printed, which can be suppressed by providing either \fB--yes\fR or \fB--no\fR. When standard input is not a TTY or a CI environment is detected, \fB--yes\fR is assumed. The requested packages are installed to a folder in the npm cache, which is added to the \fBPATH\fR environment variable in the executed process. -.P -Package names provided without a specifier will be matched with whatever version exists in the local project. Package names with a specifier will only be considered a match if they have the exact same name and version as the local dependency. -.P -If no \fB-c\fR or \fB--call\fR option is provided, then the positional arguments are used to generate the command string. If no \fB--package\fR options are provided, then npm will attempt to determine the executable name from the package specifier provided as the first positional argument according to the following heuristic: -.RS 0 -.IP \(bu 4 -If the package has a single entry in its \fBbin\fR field in \fBpackage.json\fR, or if all entries are aliases of the same command, then that command will be used. -.IP \(bu 4 -If the package has multiple \fBbin\fR entries, and one of them matches the unscoped portion of the \fBname\fR field, then that command will be used. -.IP \(bu 4 -If this does not result in exactly one option (either because there are no bin entries, or none of them match the \fBname\fR of the package), then \fBnpm exec\fR exits with an error. -.RE 0 - -.P -To run a binary \fIother than\fR the named binary, specify one or more \fB--package\fR options, which will prevent npm from inferring the package from the first command argument. -.SS "\fBnpx\fR vs \fBnpm exec\fR" -.P -When run via the \fBnpx\fR binary, all flags and options \fImust\fR be set prior to any positional arguments. When run via \fBnpm exec\fR, a double-hyphen \fB--\fR flag can be used to suppress npm's parsing of switches and options that should be sent to the executed command. -.P -For example: -.P -.RS 2 -.nf -$ npx foo@latest bar --package=@npmcli/foo -.fi -.RE -.P -In this case, npm will resolve the \fBfoo\fR package name, and run the following command: -.P -.RS 2 -.nf -$ foo bar --package=@npmcli/foo -.fi -.RE -.P -Since the \fB--package\fR option comes \fIafter\fR the positional arguments, it is treated as an argument to the executed command. -.P -In contrast, due to npm's argument parsing logic, running this command is different: -.P -.RS 2 -.nf -$ npm exec foo@latest bar --package=@npmcli/foo -.fi -.RE -.P -In this case, npm will parse the \fB--package\fR option first, resolving the \fB@npmcli/foo\fR package. Then, it will execute the following command in that context: -.P -.RS 2 -.nf -$ foo@latest bar -.fi -.RE -.P -The double-hyphen character is recommended to explicitly tell npm to stop parsing command line options and switches. The following command would thus be equivalent to the \fBnpx\fR command above: -.P -.RS 2 -.nf -$ npm exec -- foo@latest bar --package=@npmcli/foo -.fi -.RE -.SS "Configuration" -.SS "\fBpackage\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -The package or packages to install for npm help exec -.SS "\fBcall\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Optional companion option for \fBnpm exec\fR, \fBnpx\fR that allows for specifying a custom command to be run along with the installed packages. -.P -.RS 2 -.nf -npm exec --package yo --package generator-node --call "yo node" -.fi -.RE -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "Examples" -.P -Run the version of \fBtap\fR in the local dependencies, with the provided arguments: -.P -.RS 2 -.nf -$ npm exec -- tap --bail test/foo.js -$ npx tap --bail test/foo.js -.fi -.RE -.P -Run a command \fIother than\fR the command whose name matches the package name by specifying a \fB--package\fR option: -.P -.RS 2 -.nf -$ npm exec --package=foo -- bar --bar-argument -# ~ or ~ -$ npx --package=foo bar --bar-argument -.fi -.RE -.P -Run an arbitrary shell script, in the context of the current project: -.P -.RS 2 -.nf -$ npm x -c 'eslint && say "hooray, lint passed"' -$ npx -c 'eslint && say "hooray, lint passed"' -.fi -.RE -.SS "Workspaces support" -.P -You may use the \fB\fBworkspace\fR\fR \fI\(la/using-npm/config#workspace\(ra\fR or \fB\fBworkspaces\fR\fR \fI\(la/using-npm/config#workspaces\(ra\fR configs in order to run an arbitrary command from an npm package (either one installed locally, or fetched remotely) in the context of the specified workspaces. If no positional argument or \fB--call\fR option is provided, it will open an interactive subshell in the context of each of these configured workspaces one at a time. -.P -Given a project with configured workspaces, e.g: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json - +-- b - | `-- package.json - `-- c - `-- package.json -.fi -.RE -.P -Assuming the workspace configuration is properly set up at the root level \fBpackage.json\fR file. e.g: -.P -.RS 2 -.nf -{ - "workspaces": \[lB] "./packages/*" \[rB] -} -.fi -.RE -.P -You can execute an arbitrary command from a package in the context of each of the configured workspaces when using the \fB\fBworkspaces\fR config options\fR \fI\(la/using-npm/config#workspace\(ra\fR, in this example we're using \fBeslint\fR to lint any js file found within each workspace folder: -.P -.RS 2 -.nf -npm exec --ws -- eslint ./*.js -.fi -.RE -.SS "Filtering workspaces" -.P -It's also possible to execute a command in a single workspace using the \fBworkspace\fR config along with a name or directory path: -.P -.RS 2 -.nf -npm exec --workspace=a -- eslint ./*.js -.fi -.RE -.P -The \fBworkspace\fR config can also be specified multiple times in order to run a specific script in the context of multiple workspaces. When defining values for the \fBworkspace\fR config in the command line, it also possible to use \fB-w\fR as a shorthand, e.g: -.P -.RS 2 -.nf -npm exec -w a -w b -- eslint ./*.js -.fi -.RE -.P -This last command will run the \fBeslint\fR command in both \fB./packages/a\fR and \fB./packages/b\fR folders. -.SS "Compatibility with Older npx Versions" -.P -The \fBnpx\fR binary was rewritten in npm v7.0.0, and the standalone \fBnpx\fR package deprecated at that time. \fBnpx\fR uses the \fBnpm exec\fR command instead of a separate argument parser and install process, with some affordances to maintain backwards compatibility with the arguments it accepted in previous versions. -.P -This resulted in some shifts in its functionality: -.RS 0 -.IP \(bu 4 -Any \fBnpm\fR config value may be provided. -.IP \(bu 4 -To prevent security and user-experience problems from mistyping package names, \fBnpx\fR prompts before installing anything. Suppress this prompt with the \fB-y\fR or \fB--yes\fR option. -.IP \(bu 4 -The \fB--no-install\fR option is deprecated, and will be converted to \fB--no\fR. -.IP \(bu 4 -Shell fallback functionality is removed, as it is not advisable. -.IP \(bu 4 -The \fB-p\fR argument is a shorthand for \fB--parseable\fR in npm, but shorthand for \fB--package\fR in npx. This is maintained, but only for the \fBnpx\fR executable. -.IP \(bu 4 -The \fB--ignore-existing\fR option is removed. Locally installed bins are always present in the executed process \fBPATH\fR. -.IP \(bu 4 -The \fB--npm\fR option is removed. \fBnpx\fR will always use the \fBnpm\fR it ships with. -.IP \(bu 4 -The \fB--node-arg\fR and \fB-n\fR options are removed. -.IP \(bu 4 -The \fB--always-spawn\fR option is redundant, and thus removed. -.IP \(bu 4 -The \fB--shell\fR option is replaced with \fB--script-shell\fR, but maintained in the \fBnpx\fR executable for backwards compatibility. -.RE 0 - -.SS "A note on caching" -.P -The npm cli utilizes its internal package cache when using the package name specified. You can use the following to change how and when the cli uses this cache. See npm help cache for more on how the cache works. -.SS "prefer-online" -.P -Forces staleness checks for packages, making the cli look for updates immediately even if the package is already in the cache. -.SS "prefer-offline" -.P -Bypasses staleness checks for packages. Missing data will still be requested from the server. To force full offline mode, use \fBoffline\fR. -.SS "offline" -.P -Forces full offline mode. Any packages not locally cached will result in an error. -.SS "workspace" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result to selecting all of the nested workspaces) -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "workspaces" -.RS 0 -.IP \(bu 4 -Alias: \fB--ws\fR -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -Default: \fBfalse\fR -.RE 0 - -.P -Run scripts in the context of all configured workspaces for the current project. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help restart -.IP \(bu 4 -npm help stop -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help workspaces -.IP \(bu 4 -npm help npx -.RE 0 diff --git a/node_modules/npm/man/man1/npm-explain.1 b/node_modules/npm/man/man1/npm-explain.1 deleted file mode 100644 index 1b677bb..0000000 --- a/node_modules/npm/man/man1/npm-explain.1 +++ /dev/null @@ -1,118 +0,0 @@ -.TH "NPM-EXPLAIN" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-explain\fR - Explain installed packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm explain - -alias: why -.fi -.RE -.SS "Description" -.P -This command will print the chain of dependencies causing a given package to be installed in the current project. -.P -If one or more package specs are provided, then only packages matching one of the specifiers will have their relationships explained. -.P -The package spec can also refer to a folder within \fB./node_modules\fR -.P -For example, running \fBnpm explain glob\fR within npm's source tree will show: -.P -.RS 2 -.nf -glob@7.1.6 -node_modules/glob - glob@"^7.1.4" from the root project - -glob@7.1.1 dev -node_modules/tacks/node_modules/glob - glob@"^7.0.5" from rimraf@2.6.2 - node_modules/tacks/node_modules/rimraf - rimraf@"^2.6.2" from tacks@1.3.0 - node_modules/tacks - dev tacks@"^1.3.0" from the root project -.fi -.RE -.P -To explain just the package residing at a specific folder, pass that as the argument to the command. This can be useful when trying to figure out exactly why a given dependency is being duplicated to satisfy conflicting version requirements within the project. -.P -.RS 2 -.nf -$ npm explain node_modules/nyc/node_modules/find-up -find-up@3.0.0 dev -node_modules/nyc/node_modules/find-up - find-up@"^3.0.0" from nyc@14.1.1 - node_modules/nyc - nyc@"^14.1.1" from tap@14.10.8 - node_modules/tap - dev tap@"^14.10.8" from the root project -.fi -.RE -.SS "Configuration" -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help ls -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help link -.IP \(bu 4 -npm help prune -.IP \(bu 4 -npm help outdated -.IP \(bu 4 -npm help update -.RE 0 diff --git a/node_modules/npm/man/man1/npm-explore.1 b/node_modules/npm/man/man1/npm-explore.1 deleted file mode 100644 index bae0369..0000000 --- a/node_modules/npm/man/man1/npm-explore.1 +++ /dev/null @@ -1,49 +0,0 @@ -.TH "NPM-EXPLORE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-explore\fR - Browse an installed package -.SS "Synopsis" -.P -.RS 2 -.nf -npm explore \[lB] -- \[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Spawn a subshell in the directory of the installed package specified. -.P -If a command is specified, then it is run in the subshell, which then immediately terminates. -.P -This is particularly handy in the case of git submodules in the \fBnode_modules\fR folder: -.P -.RS 2 -.nf -npm explore some-dependency -- git pull origin master -.fi -.RE -.P -Note that the package is \fInot\fR automatically rebuilt afterwards, so be sure to use \fBnpm rebuild \fR if you make any changes. -.SS "Configuration" -.SS "\fBshell\fR" -.RS 0 -.IP \(bu 4 -Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows -.IP \(bu 4 -Type: String -.RE 0 - -.P -The shell to run for the \fBnpm explore\fR command. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help edit -.IP \(bu 4 -npm help rebuild -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man1/npm-find-dupes.1 b/node_modules/npm/man/man1/npm-find-dupes.1 deleted file mode 100644 index c8910f5..0000000 --- a/node_modules/npm/man/man1/npm-find-dupes.1 +++ /dev/null @@ -1,225 +0,0 @@ -.TH "NPM-FIND-DUPES" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-find-dupes\fR - Find duplication in the package tree -.SS "Synopsis" -.P -.RS 2 -.nf -npm find-dupes -.fi -.RE -.SS "Description" -.P -Runs \fBnpm dedupe\fR in \fB--dry-run\fR mode, making npm only output the duplications, without actually changing the package tree. -.SS "Configuration" -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help dedupe -.IP \(bu 4 -npm help ls -.IP \(bu 4 -npm help update -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man1/npm-fund.1 b/node_modules/npm/man/man1/npm-fund.1 deleted file mode 100644 index 8406c93..0000000 --- a/node_modules/npm/man/man1/npm-fund.1 +++ /dev/null @@ -1,142 +0,0 @@ -.TH "NPM-FUND" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-fund\fR - Retrieve funding information -.SS "Synopsis" -.P -.RS 2 -.nf -npm fund \[lB]\[rB] -.fi -.RE -.SS "Description" -.P -This command retrieves information on how to fund the dependencies of a given project. If no package name is provided, it will list all dependencies that are looking for funding in a tree structure, listing the type of funding and the url to visit. If a package name is provided then it tries to open its funding url using the \fB\fB--browser\fR config\fR \fI\(la/using-npm/config#browser\(ra\fR param; if there are multiple funding sources for the package, the user will be instructed to pass the \fB--which\fR option to disambiguate. -.P -The list will avoid duplicated entries and will stack all packages that share the same url as a single entry. Thus, the list does not have the same shape of the output from \fBnpm ls\fR. -.SS "Example" -.SS "Workspaces support" -.P -It's possible to filter the results to only include a single workspace and its dependencies using the \fB\fBworkspace\fR config\fR \fI\(la/using-npm/config#workspace\(ra\fR option. -.SS "Example:" -.P -Here's an example running \fBnpm fund\fR in a project with a configured workspace \fBa\fR: -.P -.RS 2 -.nf -$ npm fund -test-workspaces-fund@1.0.0 -+-- https://example.com/a -| | `-- a@1.0.0 -| `-- https://example.com/maintainer -| `-- foo@1.0.0 -+-- https://example.com/npmcli-funding -| `-- @npmcli/test-funding -`-- https://example.com/org - `-- bar@2.0.0 -.fi -.RE -.P -And here is an example of the expected result when filtering only by a specific workspace \fBa\fR in the same project: -.P -.RS 2 -.nf -$ npm fund -w a -test-workspaces-fund@1.0.0 -`-- https://example.com/a - | `-- a@1.0.0 - `-- https://example.com/maintainer - `-- foo@2.0.0 -.fi -.RE -.SS "Configuration" -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBbrowser\fR" -.RS 0 -.IP \(bu 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR -.IP \(bu 4 -Type: null, Boolean, or String -.RE 0 - -.P -The browser that is called by npm commands to open websites. -.P -Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal. -.P -Set to \fBtrue\fR to use default system URL opener. -.SS "\fBunicode\fR" -.RS 0 -.IP \(bu 4 -Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBwhich\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Number -.RE 0 - -.P -If there are multiple funding sources, which 1-indexed source URL to open. -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help docs -.IP \(bu 4 -npm help ls -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-help-search.1 b/node_modules/npm/man/man1/npm-help-search.1 deleted file mode 100644 index 99d29e1..0000000 --- a/node_modules/npm/man/man1/npm-help-search.1 +++ /dev/null @@ -1,37 +0,0 @@ -.TH "NPM-HELP-SEARCH" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-help-search\fR - Search npm help documentation -.SS "Synopsis" -.P -.RS 2 -.nf -npm help-search -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -This command will search the npm markdown documentation files for the terms provided, and then list the results, sorted by relevance. -.P -If only one result is found, then it will show that help topic. -.P -If the argument to \fBnpm help\fR is not a known help topic, then it will call \fBhelp-search\fR. It is rarely if ever necessary to call this command directly. -.SS "Configuration" -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help npm -.IP \(bu 4 -npm help help -.RE 0 diff --git a/node_modules/npm/man/man1/npm-help.1 b/node_modules/npm/man/man1/npm-help.1 deleted file mode 100644 index 8f39d39..0000000 --- a/node_modules/npm/man/man1/npm-help.1 +++ /dev/null @@ -1,47 +0,0 @@ -.TH "NPM-HELP" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-help\fR - Get help on npm -.SS "Synopsis" -.P -.RS 2 -.nf -npm help \[lB]\[rB] - -alias: hlep -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -If supplied a topic, then show the appropriate documentation page. -.P -If the topic does not exist, or if multiple terms are provided, then npm will run the \fBhelp-search\fR command to find a match. Note that, if \fBhelp-search\fR finds a single subject, then it will run \fBhelp\fR on that topic, so unique matches are equivalent to specifying a topic name. -.SS "Configuration" -.SS "\fBviewer\fR" -.RS 0 -.IP \(bu 4 -Default: "man" on Posix, "browser" on Windows -.IP \(bu 4 -Type: String -.RE 0 - -.P -The program to use to view help content. -.P -Set to \fB"browser"\fR to view html help content in the default web browser. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help npm -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help help-search -.RE 0 diff --git a/node_modules/npm/man/man1/npm-hook.1 b/node_modules/npm/man/man1/npm-hook.1 deleted file mode 100644 index 92c92d9..0000000 --- a/node_modules/npm/man/man1/npm-hook.1 +++ /dev/null @@ -1,115 +0,0 @@ -.TH "NPM-HOOK" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-hook\fR - Manage registry hooks -.SS "Synopsis" -.P -.RS 2 -.nf -npm hook add \[lB]--type=\[rB] -npm hook ls \[lB]pkg\[rB] -npm hook rm -npm hook update -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Allows you to manage \fBnpm hooks\fR \fI\(lahttps://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm\(ra\fR, including adding, removing, listing, and updating. -.P -Hooks allow you to configure URL endpoints that will be notified whenever a change happens to any of the supported entity types. Three different types of entities can be watched by hooks: packages, owners, and scopes. -.P -To create a package hook, simply reference the package name. -.P -To create an owner hook, prefix the owner name with \fB~\fR (as in, \fB~youruser\fR). -.P -To create a scope hook, prefix the scope name with \fB@\fR (as in, \fB@yourscope\fR). -.P -The hook \fBid\fR used by \fBupdate\fR and \fBrm\fR are the IDs listed in \fBnpm hook ls\fR for that particular hook. -.P -The shared secret will be sent along to the URL endpoint so you can verify the request came from your own configured hook. -.SS "Example" -.P -Add a hook to watch a package for changes: -.P -.RS 2 -.nf -$ npm hook add lodash https://example.com/ my-shared-secret -.fi -.RE -.P -Add a hook to watch packages belonging to the user \fBsubstack\fR: -.P -.RS 2 -.nf -$ npm hook add ~substack https://example.com/ my-shared-secret -.fi -.RE -.P -Add a hook to watch packages in the scope \fB@npm\fR -.P -.RS 2 -.nf -$ npm hook add @npm https://example.com/ my-shared-secret -.fi -.RE -.P -List all your active hooks: -.P -.RS 2 -.nf -$ npm hook ls -.fi -.RE -.P -List your active hooks for the \fBlodash\fR package: -.P -.RS 2 -.nf -$ npm hook ls lodash -.fi -.RE -.P -Update an existing hook's url: -.P -.RS 2 -.nf -$ npm hook update id-deadbeef https://my-new-website.here/ -.fi -.RE -.P -Remove a hook: -.P -.RS 2 -.nf -$ npm hook rm id-deadbeef -.fi -.RE -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -\fB"Introducing Hooks" blog post\fR \fI\(lahttps://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man1/npm-init.1 b/node_modules/npm/man/man1/npm-init.1 deleted file mode 100644 index f95b636..0000000 --- a/node_modules/npm/man/man1/npm-init.1 +++ /dev/null @@ -1,366 +0,0 @@ -.TH "NPM-INIT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-init\fR - Create a package.json file -.SS "Synopsis" -.P -.RS 2 -.nf -npm init (same as `npx `) -npm init <@scope> (same as `npx <@scope>/create`) - -aliases: create, innit -.fi -.RE -.SS "Description" -.P -\fBnpm init \fR can be used to set up a new or existing npm package. -.P -\fBinitializer\fR in this case is an npm package named \fBcreate-\fR, which will be installed by npm help npm-exec, and then have its main bin executed -- presumably creating or updating \fBpackage.json\fR and running any other initialization-related operations. -.P -The init command is transformed to a corresponding \fBnpm exec\fR operation as follows: -.RS 0 -.IP \(bu 4 -\fBnpm init foo\fR -> \fBnpm exec create-foo\fR -.IP \(bu 4 -\fBnpm init @usr/foo\fR -> \fBnpm exec @usr/create-foo\fR -.IP \(bu 4 -\fBnpm init @usr\fR -> \fBnpm exec @usr/create\fR -.IP \(bu 4 -\fBnpm init @usr@2.0.0\fR -> \fBnpm exec @usr/create@2.0.0\fR -.IP \(bu 4 -\fBnpm init @usr/foo@2.0.0\fR -> \fBnpm exec @usr/create-foo@2.0.0\fR -.RE 0 - -.P -If the initializer is omitted (by just calling \fBnpm init\fR), init will fall back to legacy init behavior. It will ask you a bunch of questions, and then write a package.json for you. It will attempt to make reasonable guesses based on existing fields, dependencies, and options selected. It is strictly additive, so it will keep any fields and values that were already set. You can also use \fB-y\fR/\fB--yes\fR to skip the questionnaire altogether. If you pass \fB--scope\fR, it will create a scoped package. -.P -\fINote:\fR if a user already has the \fBcreate-\fR package globally installed, that will be what \fBnpm init\fR uses. If you want npm to use the latest version, or another specific version you must specify it: -.RS 0 -.IP \(bu 4 -\fBnpm init foo@latest\fR # fetches and runs the latest \fBcreate-foo\fR from the registry -.IP \(bu 4 -\fBnpm init foo@1.2.3\fR # runs \fBcreate-foo@1.2.3\fR specifically -.RE 0 - -.SS "Forwarding additional options" -.P -Any additional options will be passed directly to the command, so \fBnpm init -foo -- --hello\fR will map to \fBnpm exec -- create-foo --hello\fR. -.P -To better illustrate how options are forwarded, here's a more evolved example showing options passed to both the \fBnpm cli\fR and a create package, both following commands are equivalent: -.RS 0 -.IP \(bu 4 -\fBnpm init foo -y --registry= -- --hello -a\fR -.IP \(bu 4 -\fBnpm exec -y --registry= -- create-foo --hello -a\fR -.RE 0 - -.SS "Examples" -.P -Create a new React-based project using \fB\fBcreate-react-app\fR\fR \fI\(lahttps://npm.im/create-react-app\(ra\fR: -.P -.RS 2 -.nf -$ npm init react-app ./my-react-app -.fi -.RE -.P -Create a new \fBesm\fR-compatible package using \fB\fBcreate-esm\fR\fR \fI\(lahttps://npm.im/create-esm\(ra\fR: -.P -.RS 2 -.nf -$ mkdir my-esm-lib && cd my-esm-lib -$ npm init esm --yes -.fi -.RE -.P -Generate a plain old package.json using legacy init: -.P -.RS 2 -.nf -$ mkdir my-npm-pkg && cd my-npm-pkg -$ git init -$ npm init -.fi -.RE -.P -Generate it without having it ask any questions: -.P -.RS 2 -.nf -$ npm init -y -.fi -.RE -.SS "Workspaces support" -.P -It's possible to create a new workspace within your project by using the \fBworkspace\fR config option. When using \fBnpm init -w \fR the cli will create the folders and boilerplate expected while also adding a reference to your project \fBpackage.json\fR \fB"workspaces": \[lB]\[rB]\fR property in order to make sure that new generated \fBworkspace\fR is properly set up as such. -.P -Given a project with no workspaces, e.g: -.P -.RS 2 -.nf -. -+-- package.json -.fi -.RE -.P -You may generate a new workspace using the legacy init: -.P -.RS 2 -.nf -$ npm init -w packages/a -.fi -.RE -.P -That will generate a new folder and \fBpackage.json\fR file, while also updating your top-level \fBpackage.json\fR to add the reference to this new workspace: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - `-- a - `-- package.json -.fi -.RE -.P -The workspaces init also supports the \fBnpm init -w \fR syntax, following the same set of rules explained earlier in the initial \fBDescription\fR section of this page. Similar to the previous example of creating a new React-based project using \fB\fBcreate-react-app\fR\fR \fI\(lahttps://npm.im/create-react-app\(ra\fR, the following syntax will make sure to create the new react app as a nested \fBworkspace\fR within your project and configure your \fBpackage.json\fR to recognize it as such: -.P -.RS 2 -.nf -npm init -w packages/my-react-app react-app . -.fi -.RE -.P -This will make sure to generate your react app as expected, one important consideration to have in mind is that \fBnpm exec\fR is going to be run in the context of the newly created folder for that workspace, and that's the reason why in this example the initializer uses the initializer name followed with a dot to represent the current directory in that context, e.g: \fBreact-app .\fR: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- my-react-app - +-- README - +-- package.json - `-- ... -.fi -.RE -.SS "Configuration" -.SS "\fBinit-author-name\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package author's name. -.SS "\fBinit-author-url\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: "" or URL -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package author's homepage. -.SS "\fBinit-license\fR" -.RS 0 -.IP \(bu 4 -Default: "ISC" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package license. -.SS "\fBinit-module\fR" -.RS 0 -.IP \(bu 4 -Default: "~/.npm-init.js" -.IP \(bu 4 -Type: Path -.RE 0 - -.P -A module that will be loaded by the \fBnpm init\fR command. See the documentation for the \fBinit-package-json\fR \fI\(lahttps://github.com/npm/init-package-json\(ra\fR module for more information, or npm help init. -.SS "\fBinit-version\fR" -.RS 0 -.IP \(bu 4 -Default: "1.0.0" -.IP \(bu 4 -Type: SemVer string -.RE 0 - -.P -The value that \fBnpm init\fR should use by default for the package version number, if not already set in package.json. -.SS "\fByes\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Automatically answer "yes" to any prompts that npm might print on the command line. -.SS "\fBforce\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. -.RS 0 -.IP \(bu 4 -Allow clobbering non-npm files in global installs. -.IP \(bu 4 -Allow the \fBnpm version\fR command to work on an unclean git repository. -.IP \(bu 4 -Allow deleting the cache folder with \fBnpm cache clean\fR. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of npm. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of \fBnode\fR, even if \fB--engine-strict\fR is enabled. -.IP \(bu 4 -Allow \fBnpm audit fix\fR to install modules outside your stated dependency range (including SemVer-major changes). -.IP \(bu 4 -Allow unpublishing all versions of a published package. -.IP \(bu 4 -Allow conflicting peerDependencies to be installed in the root project. -.IP \(bu 4 -Implicitly set \fB--yes\fR during \fBnpm init\fR. -.IP \(bu 4 -Allow clobbering existing values in \fBnpm pkg\fR -.IP \(bu 4 -Allow unpublishing of entire packages (not just a single version). -.RE 0 - -.P -If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! -.SS "\fBscope\fR" -.RS 0 -.IP \(bu 4 -Default: the scope of the current project, if any, or "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Associate an operation with a scope for a scoped registry. -.P -Useful when logging in to or out of a private registry: -.P -.RS 2 -.nf -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -.fi -.RE -.P -This will cause \fB@mycorp\fR to be mapped to the registry for future installation of packages specified according to the pattern \fB@mycorp/package\fR. -.P -This will also cause \fBnpm init\fR to create a scoped package. -.P -.RS 2 -.nf -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -.fi -.RE -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces-update\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the npm cli will run an update after operations that may possibly change the workspaces installed to the \fBnode_modules\fR folder. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -\fBinit-package-json module\fR \fI\(lahttp://npm.im/init-package-json\(ra\fR -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help version -.IP \(bu 4 -npm help scope -.IP \(bu 4 -npm help exec -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-install-ci-test.1 b/node_modules/npm/man/man1/npm-install-ci-test.1 deleted file mode 100644 index d8e5eff..0000000 --- a/node_modules/npm/man/man1/npm-install-ci-test.1 +++ /dev/null @@ -1,239 +0,0 @@ -.TH "NPM-INSTALL-CI-TEST" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-install-ci-test\fR - Install a project with a clean slate and run tests -.SS "Synopsis" -.P -.RS 2 -.nf -npm install-ci-test - -aliases: cit, clean-install-test, sit -.fi -.RE -.SS "Description" -.P -This command runs \fBnpm ci\fR followed immediately by \fBnpm test\fR. -.SS "Configuration" -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install-test -.IP \(bu 4 -npm help ci -.IP \(bu 4 -npm help test -.RE 0 diff --git a/node_modules/npm/man/man1/npm-install-test.1 b/node_modules/npm/man/man1/npm-install-test.1 deleted file mode 100644 index e64d8da..0000000 --- a/node_modules/npm/man/man1/npm-install-test.1 +++ /dev/null @@ -1,336 +0,0 @@ -.TH "NPM-INSTALL-TEST" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-install-test\fR - Install package(s) and run tests -.SS "Synopsis" -.P -.RS 2 -.nf -npm install-test \[lB] ...\[rB] - -alias: it -.fi -.RE -.SS "Description" -.P -This command runs an \fBnpm install\fR followed immediately by an \fBnpm test\fR. It takes exactly the same arguments as \fBnpm install\fR. -.SS "Configuration" -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBsave-exact\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBprefer-dedupe\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prefer to deduplicate packages if possible, rather than choosing a newer version of a dependency. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBcpu\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override CPU architecture of native modules to install. Acceptable values are same as \fBcpu\fR field of package.json, which comes from \fBprocess.arch\fR. -.SS "\fBos\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override OS of native modules to install. Acceptable values are same as \fBos\fR field of package.json, which comes from \fBprocess.platform\fR. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help install-ci-test -.IP \(bu 4 -npm help test -.RE 0 diff --git a/node_modules/npm/man/man1/npm-install.1 b/node_modules/npm/man/man1/npm-install.1 deleted file mode 100644 index f3377fe..0000000 --- a/node_modules/npm/man/man1/npm-install.1 +++ /dev/null @@ -1,752 +0,0 @@ -.TH "NPM-INSTALL" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-install\fR - Install a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm install \[lB] ...\[rB] - -aliases: add, i, in, ins, inst, insta, instal, isnt, isnta, isntal, isntall -.fi -.RE -.SS "Description" -.P -This command installs a package and any packages that it depends on. If the package has a package-lock, or an npm shrinkwrap file, or a yarn lock file, the installation of dependencies will be driven by that, respecting the following order of precedence: -.RS 0 -.IP \(bu 4 -\fBnpm-shrinkwrap.json\fR -.IP \(bu 4 -\fBpackage-lock.json\fR -.IP \(bu 4 -\fByarn.lock\fR -.RE 0 - -.P -See \fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR and npm help shrinkwrap. -.P -A \fBpackage\fR is: -.RS 0 -.IP \(bu 4 -a) a folder containing a program described by a \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR file -.IP \(bu 4 -b) a gzipped tarball containing (a) -.IP \(bu 4 -c) a url that resolves to (b) -.IP \(bu 4 -d) a \fB@\fR that is published on the registry (see npm help registry) with (c) -.IP \(bu 4 -e) a \fB@\fR (see npm help dist-tag) that points to (d) -.IP \(bu 4 -f) a \fB\fR that has a "latest" tag satisfying (e) -.IP \(bu 4 -g) a \fB\fR that resolves to (a) -.RE 0 - -.P -Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b). -.RS 0 -.IP \(bu 4 -\fBnpm install\fR (in a package directory, no arguments): -.P -Install the dependencies to the local \fBnode_modules\fR folder. -.P -In global mode (ie, with \fB-g\fR or \fB--global\fR appended to the command), it installs the current package context (ie, the current working directory) as a global package. -.P -By default, \fBnpm install\fR will install all modules listed as dependencies in \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR. -.P -With the \fB--production\fR flag (or when the \fBNODE_ENV\fR environment variable is set to \fBproduction\fR), npm will not install modules listed in \fBdevDependencies\fR. To install all modules listed in both \fBdependencies\fR and \fBdevDependencies\fR when \fBNODE_ENV\fR environment variable is set to \fBproduction\fR, you can use \fB--production=false\fR. -.RS 4 -.P -NOTE: The \fB--production\fR flag has no particular meaning when adding a dependency to a project. -.RE 0 - -.IP \(bu 4 -\fBnpm install \fR: -.P -If \fB\fR sits inside the root of your project, its dependencies will be installed and may be hoisted to the top-level \fBnode_modules\fR as they would for other types of dependencies. If \fB\fR sits outside the root of your project, \fInpm will not install the package dependencies\fR in the directory \fB\fR, but it will create a symlink to \fB\fR. -.RS 4 -.P -NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use the \fB--install-links\fR option. -.RE 0 - -.P -Example: -.P -.RS 2 -.nf -npm install ../../other-package --install-links -npm install ./sub-package -.fi -.RE -.IP \(bu 4 -\fBnpm install \fR: -.P -Install a package that is sitting on the filesystem. Note: if you just want to link a dev directory into your npm root, you can do this more easily by using npm help link. -.P -Tarball requirements: -.RS 4 -.IP \(bu 4 -The filename \fImust\fR use \fB.tar\fR, \fB.tar.gz\fR, or \fB.tgz\fR as the extension. -.IP \(bu 4 -The package contents should reside in a subfolder inside the tarball (usually it is called \fBpackage/\fR). npm strips one directory layer when installing the package (an equivalent of \fBtar x ---strip-components=1\fR is run). -.IP \(bu 4 -The package must contain a \fBpackage.json\fR file with \fBname\fR and \fBversion\fR properties. -.RE 0 - -.P -Example: -.P -.RS 2 -.nf -npm install ./package.tgz -.fi -.RE -.IP \(bu 4 -\fBnpm install \fR: -.P -Fetch the tarball url, and then install it. In order to distinguish between this and other options, the argument must start with "http://" or "https://" -.P -Example: -.P -.RS 2 -.nf -npm install https://github.com/indexzero/forever/tarball/v0.5.6 -.fi -.RE -.IP \(bu 4 -\fBnpm install \[lB]<@scope>/\[rB]\fR: -.P -Do a \fB@\fR install, where \fB\fR is the "tag" config. (See \fB\fBconfig\fR\fR \fI\(la/using-npm/config#tag\(ra\fR. The config's default value is \fBlatest\fR.) -.P -In most cases, this will install the version of the modules tagged as \fBlatest\fR on the npm registry. -.P -Example: -.P -.RS 2 -.nf -npm install sax -.fi -.RE -.P -\fBnpm install\fR saves any specified packages into \fBdependencies\fR by default. Additionally, you can control where and how they get saved with some additional flags: -.RS 4 -.IP \(bu 4 -\fB-P, --save-prod\fR: Package will appear in your \fBdependencies\fR. This is the default unless \fB-D\fR or \fB-O\fR are present. -.IP \(bu 4 -\fB-D, --save-dev\fR: Package will appear in your \fBdevDependencies\fR. -.IP \(bu 4 -\fB-O, --save-optional\fR: Package will appear in your \fBoptionalDependencies\fR. -.IP \(bu 4 -\fB--no-save\fR: Prevents saving to \fBdependencies\fR. -.RE 0 - -.P -When using any of the above options to save dependencies to your package.json, there are two additional, optional flags: -.RS 4 -.IP \(bu 4 -\fB-E, --save-exact\fR: Saved dependencies will be configured with an exact version rather than using npm's default semver range operator. -.IP \(bu 4 -\fB-B, --save-bundle\fR: Saved dependencies will also be added to your \fBbundleDependencies\fR list. -.RE 0 - -.P -Further, if you have an \fBnpm-shrinkwrap.json\fR or \fBpackage-lock.json\fR then it will be updated as well. -.P -\fB\fR is optional. The package will be downloaded from the registry associated with the specified scope. If no registry is associated with the given scope the default registry is assumed. See npm help scope. -.P -Note: if you do not include the @-symbol on your scope name, npm will interpret this as a GitHub repository instead, see below. Scopes names must also be followed by a slash. -.P -Examples: -.P -.RS 2 -.nf -npm install sax -npm install githubname/reponame -npm install @myorg/privatepackage -npm install node-tap --save-dev -npm install dtrace-provider --save-optional -npm install readable-stream --save-exact -npm install ansi-regex --save-bundle -.fi -.RE -.P -\fBNote\fR: If there is a file or folder named \fB\fR in the current working directory, then it will try to install that, and only try to fetch the package by name if it is not valid. -.IP \(bu 4 -\fBnpm install @npm:\fR: -.P -Install a package under a custom alias. Allows multiple versions of a same-name package side-by-side, more convenient import names for packages with otherwise long ones, and using git forks replacements or forked npm packages as replacements. Aliasing works only on your project and does not rename packages in transitive dependencies. Aliases should follow the naming conventions stated in \fB\fBvalidate-npm-package-name\fR\fR \fI\(lahttps://www.npmjs.com/package/validate-npm-package-name#naming-rules\(ra\fR. -.P -Examples: -.P -.RS 2 -.nf -npm install my-react@npm:react -npm install jquery2@npm:jquery@2 -npm install jquery3@npm:jquery@3 -npm install npa@npm:npm-package-arg -.fi -.RE -.IP \(bu 4 -\fBnpm install \[lB]<@scope>/\[rB]@\fR: -.P -Install the version of the package that is referenced by the specified tag. If the tag does not exist in the registry data for that package, then this will fail. -.P -Example: -.P -.RS 2 -.nf -npm install sax@latest -npm install @myorg/mypackage@latest -.fi -.RE -.IP \(bu 4 -\fBnpm install \[lB]<@scope>/\[rB]@\fR: -.P -Install the specified version of the package. This will fail if the version has not been published to the registry. -.P -Example: -.P -.RS 2 -.nf -npm install sax@0.1.1 -npm install @myorg/privatepackage@1.5.0 -.fi -.RE -.IP \(bu 4 -\fBnpm install \[lB]<@scope>/\[rB]@\fR: -.P -Install a version of the package matching the specified version range. This will follow the same rules for resolving dependencies described in \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR. -.P -Note that most version ranges must be put in quotes so that your shell will treat it as a single argument. -.P -Example: -.P -.RS 2 -.nf -npm install sax@">=0.1.0 <0.2.0" -npm install @myorg/privatepackage@"16 - 17" -.fi -.RE -.IP \(bu 4 -\fBnpm install \fR: -.P -Installs the package from the hosted git provider, cloning it with \fBgit\fR. For a full git remote url, only that URL will be attempted. -.P -.RS 2 -.nf -://\[lB]\[lB]:\[rB]@\[rB]\[lB]:\[rB]\[lB]:\[rB]\[lB]/\[rB]\[lB]# | #semver:\[rB] -.fi -.RE -.P -\fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, \fBgit+https\fR, or \fBgit+file\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then the default branch of the repository is used. -.P -If the repository makes use of submodules, those submodules will be cloned as well. -.P -If the package being installed contains a \fBprepare\fR script, its \fBdependencies\fR and \fBdevDependencies\fR will be installed, and the prepare script will be run, before the package is packaged and installed. -.P -The following git environment variables are recognized by npm and will be added to the environment when running git: -.RS 4 -.IP \(bu 4 -\fBGIT_ASKPASS\fR -.IP \(bu 4 -\fBGIT_EXEC_PATH\fR -.IP \(bu 4 -\fBGIT_PROXY_COMMAND\fR -.IP \(bu 4 -\fBGIT_SSH\fR -.IP \(bu 4 -\fBGIT_SSH_COMMAND\fR -.IP \(bu 4 -\fBGIT_SSL_CAINFO\fR -.IP \(bu 4 -\fBGIT_SSL_NO_VERIFY\fR -.RE 0 - -.P -See the git man page for details. -.P -Examples: -.P -.RS 2 -.nf -npm install git+ssh://git@github.com:npm/cli.git#v1.0.27 -npm install git+ssh://git@github.com:npm/cli#pull/273 -npm install git+ssh://git@github.com:npm/cli#semver:^5.0 -npm install git+https://isaacs@github.com/npm/cli.git -npm install git://github.com/npm/cli.git#v1.0.27 -GIT_SSH_COMMAND='ssh -i ~/.ssh/custom_ident' npm install git+ssh://git@github.com:npm/cli.git -.fi -.RE -.IP \(bu 4 -\fBnpm install /\[lB]#\[rB]\fR: -.IP \(bu 4 -\fBnpm install github:/\[lB]#\[rB]\fR: -.P -Install the package at \fBhttps://github.com/githubname/githubrepo\fR by attempting to clone it using \fBgit\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then the default branch is used. -.P -As with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing. -.P -Examples: -.P -.RS 2 -.nf -npm install mygithubuser/myproject -npm install github:mygithubuser/myproject -.fi -.RE -.IP \(bu 4 -\fBnpm install gist:\[lB]/\[rB]\[lB]#|#semver:\[rB]\fR: -.P -Install the package at \fBhttps://gist.github.com/gistID\fR by attempting to clone it using \fBgit\fR. The GitHub username associated with the gist is optional and will not be saved in \fBpackage.json\fR. -.P -As with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing. -.P -Example: -.P -.RS 2 -.nf -npm install gist:101a11beef -.fi -.RE -.IP \(bu 4 -\fBnpm install bitbucket:/\[lB]#\[rB]\fR: -.P -Install the package at \fBhttps://bitbucket.org/bitbucketname/bitbucketrepo\fR by attempting to clone it using \fBgit\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then \fBmaster\fR is used. -.P -As with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing. -.P -Example: -.P -.RS 2 -.nf -npm install bitbucket:mybitbucketuser/myproject -.fi -.RE -.IP \(bu 4 -\fBnpm install gitlab:/\[lB]#\[rB]\fR: -.P -Install the package at \fBhttps://gitlab.com/gitlabname/gitlabrepo\fR by attempting to clone it using \fBgit\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then \fBmaster\fR is used. -.P -As with regular git dependencies, \fBdependencies\fR and \fBdevDependencies\fR will be installed if the package has a \fBprepare\fR script before the package is done installing. -.P -Example: -.P -.RS 2 -.nf -npm install gitlab:mygitlabuser/myproject -npm install gitlab:myusr/myproj#semver:^5.0 -.fi -.RE -.RE 0 - -.P -You may combine multiple arguments and even multiple types of arguments. For example: -.P -.RS 2 -.nf -npm install sax@">=0.1.0 <0.2.0" bench supervisor -.fi -.RE -.P -The \fB--tag\fR argument will apply to all of the specified install targets. If a tag with the given name exists, the tagged version is preferred over newer versions. -.P -The \fB--dry-run\fR argument will report in the usual way what the install would have done without actually installing anything. -.P -The \fB--package-lock-only\fR argument will only update the \fBpackage-lock.json\fR, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -The \fB-f\fR or \fB--force\fR argument will force npm to fetch remote resources even if a local copy exists on disk. -.P -.RS 2 -.nf -npm install sax --force -.fi -.RE -.SS "Configuration" -.P -See the npm help config help doc. Many of the configuration params have some effect on installation, since that's most of what npm does. -.P -These are some of the most common options related to installation. -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBsave-exact\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBprefer-dedupe\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prefer to deduplicate packages if possible, rather than choosing a newer version of a dependency. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBcpu\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override CPU architecture of native modules to install. Acceptable values are same as \fBcpu\fR field of package.json, which comes from \fBprocess.arch\fR. -.SS "\fBos\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override OS of native modules to install. Acceptable values are same as \fBos\fR field of package.json, which comes from \fBprocess.platform\fR. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "Algorithm" -.P -Given a \fBpackage{dep}\fR structure: \fBA{B,C}, B{C}, C{D}\fR, the npm install algorithm produces: -.P -.RS 2 -.nf -A -+-- B -+-- C -+-- D -.fi -.RE -.P -That is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level. D is still installed at the top level because nothing conflicts with it. -.P -For \fBA{B,C}, B{C,D@1}, C{D@2}\fR, this algorithm produces: -.P -.RS 2 -.nf -A -+-- B -+-- C - `-- D@2 -+-- D@1 -.fi -.RE -.P -Because B's D@1 will be installed in the top-level, C now has to install D@2 privately for itself. This algorithm is deterministic, but different trees may be produced if two dependencies are requested for installation in a different order. -.P -See npm help folders for a more detailed description of the specific folder structures that npm creates. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help update -.IP \(bu 4 -npm help audit -.IP \(bu 4 -npm help fund -.IP \(bu 4 -npm help link -.IP \(bu 4 -npm help rebuild -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help dist-tag -.IP \(bu 4 -npm help uninstall -.IP \(bu 4 -npm help shrinkwrap -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-link.1 b/node_modules/npm/man/man1/npm-link.1 deleted file mode 100644 index 4cab453..0000000 --- a/node_modules/npm/man/man1/npm-link.1 +++ /dev/null @@ -1,355 +0,0 @@ -.TH "NPM-LINK" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-link\fR - Symlink a package folder -.SS "Synopsis" -.P -.RS 2 -.nf -npm link \[lB]\[rB] - -alias: ln -.fi -.RE -.SS "Description" -.P -This is handy for installing your own stuff, so that you can work on it and test iteratively without having to continually rebuild. -.P -Package linking is a two-step process. -.P -First, \fBnpm link\fR in a package folder with no arguments will create a symlink in the global folder \fB{prefix}/lib/node_modules/\fR that links to the package where the \fBnpm link\fR command was executed. It will also link any bins in the package to \fB{prefix}/bin/{name}\fR. Note that \fBnpm link\fR uses the global prefix (see \fBnpm prefix -g\fR for its value). -.P -Next, in some other location, \fBnpm link package-name\fR will create a symbolic link from globally-installed \fBpackage-name\fR to \fBnode_modules/\fR of the current folder. -.P -Note that \fBpackage-name\fR is taken from \fBpackage.json\fR, \fInot\fR from the directory name. -.P -The package name can be optionally prefixed with a scope. See npm help scope. The scope must be preceded by an @-symbol and followed by a slash. -.P -When creating tarballs for \fBnpm publish\fR, the linked packages are "snapshotted" to their current state by resolving the symbolic links, if they are included in \fBbundleDependencies\fR. -.P -For example: -.P -.RS 2 -.nf -cd ~/projects/node-redis # go into the package directory -npm link # creates global link -cd ~/projects/node-bloggy # go into some other package directory. -npm link redis # link-install the package -.fi -.RE -.P -Now, any changes to \fB~/projects/node-redis\fR will be reflected in \fB~/projects/node-bloggy/node_modules/node-redis/\fR. Note that the link should be to the package name, not the directory name for that package. -.P -You may also shortcut the two steps in one. For example, to do the above use-case in a shorter way: -.P -.RS 2 -.nf -cd ~/projects/node-bloggy # go into the dir of your main project -npm link ../node-redis # link the dir of your dependency -.fi -.RE -.P -The second line is the equivalent of doing: -.P -.RS 2 -.nf -(cd ../node-redis; npm link) -npm link redis -.fi -.RE -.P -That is, it first creates a global link, and then links the global installation target into your project's \fBnode_modules\fR folder. -.P -Note that in this case, you are referring to the directory name, \fBnode-redis\fR, rather than the package name \fBredis\fR. -.P -If your linked package is scoped (see npm help scope) your link command must include that scope, e.g. -.P -.RS 2 -.nf -npm link @myorg/privatepackage -.fi -.RE -.SS "Caveat" -.P -Note that package dependencies linked in this way are \fInot\fR saved to \fBpackage.json\fR by default, on the assumption that the intention is to have a link stand in for a regular non-link dependency. Otherwise, for example, if you depend on \fBredis@^3.0.1\fR, and ran \fBnpm link redis\fR, it would replace the \fB^3.0.1\fR dependency with \fBfile:../path/to/node-redis\fR, which you probably don't want! Additionally, other users or developers on your project would run into issues if they do not have their folders set up exactly the same as yours. -.P -If you are adding a \fInew\fR dependency as a link, you should add it to the relevant metadata by running \fBnpm install --package-lock-only\fR. -.P -If you \fIwant\fR to save the \fBfile:\fR reference in your \fBpackage.json\fR and \fBpackage-lock.json\fR files, you can use \fBnpm link --save\fR to do so. -.SS "Workspace Usage" -.P -\fBnpm link --workspace \fR will link the relevant package as a dependency of the specified workspace(s). Note that It may actually be linked into the parent project's \fBnode_modules\fR folder, if there are no conflicting dependencies. -.P -\fBnpm link --workspace \fR will create a global link to the specified workspace(s). -.SS "Configuration" -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBsave-exact\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help developers -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-login.1 b/node_modules/npm/man/man1/npm-login.1 deleted file mode 100644 index 7c83364..0000000 --- a/node_modules/npm/man/man1/npm-login.1 +++ /dev/null @@ -1,95 +0,0 @@ -.TH "NPM-LOGIN" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-login\fR - Login to a registry user account -.SS "Synopsis" -.P -.RS 2 -.nf -npm login -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Verify a user in the specified registry, and save the credentials to the \fB.npmrc\fR file. If no registry is specified, the default registry will be used (see npm help config). -.P -When using \fBlegacy\fR for your \fBauth-type\fR, the username and password, are read in from prompts. -.P -To reset your password, go to \fI\(lahttps://www.npmjs.com/forgot\(ra\fR -.P -To change your email address, go to \fI\(lahttps://www.npmjs.com/email-edit\(ra\fR -.P -You may use this command multiple times with the same user account to authorize on a new machine. When authenticating on a new machine, the username, password and email address must all match with your existing record. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBscope\fR" -.RS 0 -.IP \(bu 4 -Default: the scope of the current project, if any, or "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Associate an operation with a scope for a scoped registry. -.P -Useful when logging in to or out of a private registry: -.P -.RS 2 -.nf -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -.fi -.RE -.P -This will cause \fB@mycorp\fR to be mapped to the registry for future installation of packages specified according to the pattern \fB@mycorp/package\fR. -.P -This will also cause \fBnpm init\fR to create a scoped package. -.P -.RS 2 -.nf -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -.fi -.RE -.SS "\fBauth-type\fR" -.RS 0 -.IP \(bu 4 -Default: "web" -.IP \(bu 4 -Type: "legacy" or "web" -.RE 0 - -.P -What authentication strategy to use with \fBlogin\fR. Note that if an \fBotp\fR config is given, this value will always be set to \fBlegacy\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help token -.IP \(bu 4 -npm help profile -.RE 0 diff --git a/node_modules/npm/man/man1/npm-logout.1 b/node_modules/npm/man/man1/npm-logout.1 deleted file mode 100644 index f949177..0000000 --- a/node_modules/npm/man/man1/npm-logout.1 +++ /dev/null @@ -1,75 +0,0 @@ -.TH "NPM-LOGOUT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-logout\fR - Log out of the registry -.SS "Synopsis" -.P -.RS 2 -.nf -npm logout -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -When logged into a registry that supports token-based authentication, tell the server to end this token's session. This will invalidate the token everywhere you're using it, not just for the current environment. -.P -When logged into a legacy registry that uses username and password authentication, this will clear the credentials in your user configuration. In this case, it will \fIonly\fR affect the current environment. -.P -If \fB--scope\fR is provided, this will find the credentials for the registry connected to that scope, if set. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBscope\fR" -.RS 0 -.IP \(bu 4 -Default: the scope of the current project, if any, or "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Associate an operation with a scope for a scoped registry. -.P -Useful when logging in to or out of a private registry: -.P -.RS 2 -.nf -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -.fi -.RE -.P -This will cause \fB@mycorp\fR to be mapped to the registry for future installation of packages specified according to the pattern \fB@mycorp/package\fR. -.P -This will also cause \fBnpm init\fR to create a scoped package. -.P -.RS 2 -.nf -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -.fi -.RE -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help whoami -.RE 0 diff --git a/node_modules/npm/man/man1/npm-ls.1 b/node_modules/npm/man/man1/npm-ls.1 deleted file mode 100644 index 83d1a91..0000000 --- a/node_modules/npm/man/man1/npm-ls.1 +++ /dev/null @@ -1,283 +0,0 @@ -.TH "NPM-LS" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-ls\fR - List installed packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm ls - -alias: list -.fi -.RE -.SS "Description" -.P -This command will print to stdout all the versions of packages that are installed, as well as their dependencies when \fB--all\fR is specified, in a tree structure. -.P -Note: to get a "bottoms up" view of why a given package is included in the tree at all, use npm help explain. -.P -Positional arguments are \fBname@version-range\fR identifiers, which will limit the results to only the paths to the packages named. Note that nested packages will \fIalso\fR show the paths to the specified packages. For example, running \fBnpm ls promzard\fR in npm's source tree will show: -.P -.RS 2 -.nf -npm@10.2.5 /path/to/npm -└─┬ init-package-json@0.0.4 - └── promzard@0.1.5 -.fi -.RE -.P -It will print out extraneous, missing, and invalid packages. -.P -If a project specifies git urls for dependencies these are shown in parentheses after the \fBname@version\fR to make it easier for users to recognize potential forks of a project. -.P -The tree shown is the logical dependency tree, based on package dependencies, not the physical layout of your \fBnode_modules\fR folder. -.P -When run as \fBll\fR or \fBla\fR, it shows extended information by default. -.SS "Note: Design Changes Pending" -.P -The \fBnpm ls\fR command's output and behavior made a \fIton\fR of sense when npm created a \fBnode_modules\fR folder that naively nested every dependency. In such a case, the logical dependency graph and physical tree of packages on disk would be roughly identical. -.P -With the advent of automatic install-time deduplication of dependencies in npm v3, the \fBls\fR output was modified to display the logical dependency graph as a tree structure, since this was more useful to most users. However, without using \fBnpm ls -l\fR, it became impossible to show \fIwhere\fR a package was actually installed much of the time! -.P -With the advent of automatic installation of \fBpeerDependencies\fR in npm v7, this gets even more curious, as \fBpeerDependencies\fR are logically "underneath" their dependents in the dependency graph, but are always physically at or above their location on disk. -.P -Also, in the years since npm got an \fBls\fR command (in version 0.0.2!), dependency graphs have gotten much larger as a general rule. Therefore, in order to avoid dumping an excessive amount of content to the terminal, \fBnpm -ls\fR now only shows the \fItop\fR level dependencies, unless \fB--all\fR is provided. -.P -A thorough re-examination of the use cases, intention, behavior, and output of this command, is currently underway. Expect significant changes to at least the default human-readable \fBnpm ls\fR output in npm v8. -.SS "Configuration" -.SS "\fBall\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBdepth\fR" -.RS 0 -.IP \(bu 4 -Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB1\fR -.IP \(bu 4 -Type: null or Number -.RE 0 - -.P -The depth to go when recursing packages for \fBnpm ls\fR. -.P -If not set, \fBnpm ls\fR will show only the immediate dependencies of the root project. If \fB--all\fR is set, then npm will show all dependencies by default. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBlink\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Used with \fBnpm ls\fR, limiting output to only those packages that are linked. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBunicode\fR" -.RS 0 -.IP \(bu 4 -Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help explain -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help explain -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help link -.IP \(bu 4 -npm help prune -.IP \(bu 4 -npm help outdated -.IP \(bu 4 -npm help update -.RE 0 diff --git a/node_modules/npm/man/man1/npm-org.1 b/node_modules/npm/man/man1/npm-org.1 deleted file mode 100644 index b73f4dc..0000000 --- a/node_modules/npm/man/man1/npm-org.1 +++ /dev/null @@ -1,125 +0,0 @@ -.TH "NPM-ORG" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-org\fR - Manage orgs -.SS "Synopsis" -.P -.RS 2 -.nf -npm org set orgname username \[lB]developer | admin | owner\[rB] -npm org rm orgname username -npm org ls orgname \[lB]\[rB] - -alias: ogr -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Example" -.P -Add a new developer to an org: -.P -.RS 2 -.nf -$ npm org set my-org @mx-smith -.fi -.RE -.P -Add a new admin to an org (or change a developer to an admin): -.P -.RS 2 -.nf -$ npm org set my-org @mx-santos admin -.fi -.RE -.P -Remove a user from an org: -.P -.RS 2 -.nf -$ npm org rm my-org mx-santos -.fi -.RE -.P -List all users in an org: -.P -.RS 2 -.nf -$ npm org ls my-org -.fi -.RE -.P -List all users in JSON format: -.P -.RS 2 -.nf -$ npm org ls my-org --json -.fi -.RE -.P -See what role a user has in an org: -.P -.RS 2 -.nf -$ npm org ls my-org @mx-santos -.fi -.RE -.SS "Description" -.P -You can use the \fBnpm org\fR commands to manage and view users of an organization. It supports adding and removing users, changing their roles, listing them, and finding specific ones and their roles. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "using orgs" -.IP \(bu 4 -\fBDocumentation on npm Orgs\fR \fI\(lahttps://docs.npmjs.com/orgs/\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man1/npm-outdated.1 b/node_modules/npm/man/man1/npm-outdated.1 deleted file mode 100644 index ec3823a..0000000 --- a/node_modules/npm/man/man1/npm-outdated.1 +++ /dev/null @@ -1,182 +0,0 @@ -.TH "NPM-OUTDATED" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-outdated\fR - Check for outdated packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm outdated \[lB] ...\[rB] -.fi -.RE -.SS "Description" -.P -This command will check the registry to see if any (or, specific) installed packages are currently outdated. -.P -By default, only the direct dependencies of the root project and direct dependencies of your configured \fIworkspaces\fR are shown. Use \fB--all\fR to find all outdated meta-dependencies as well. -.P -In the output: -.RS 0 -.IP \(bu 4 -\fBwanted\fR is the maximum version of the package that satisfies the semver range specified in \fBpackage.json\fR. If there's no available semver range (i.e. you're running \fBnpm outdated --global\fR, or the package isn't included in \fBpackage.json\fR), then \fBwanted\fR shows the currently-installed version. -.IP \(bu 4 -\fBlatest\fR is the version of the package tagged as latest in the registry. Running \fBnpm publish\fR with no special configuration will publish the package with a dist-tag of \fBlatest\fR. This may or may not be the maximum version of the package, or the most-recently published version of the package, depending on how the package's developer manages the latest npm help dist-tag. -.IP \(bu 4 -\fBlocation\fR is where in the physical tree the package is located. -.IP \(bu 4 -\fBdepended by\fR shows which package depends on the displayed dependency -.IP \(bu 4 -\fBpackage type\fR (when using \fB--long\fR / \fB-l\fR) tells you whether this package is a \fBdependency\fR or a dev/peer/optional dependency. Packages not included in \fBpackage.json\fR are always marked \fBdependencies\fR. -.IP \(bu 4 -\fBhomepage\fR (when using \fB--long\fR / \fB-l\fR) is the \fBhomepage\fR value contained in the package's packument -.IP \(bu 4 -Red means there's a newer version matching your semver requirements, so you should update now. -.IP \(bu 4 -Yellow indicates that there's a newer version \fIabove\fR your semver requirements (usually new major, or new 0.x minor) so proceed with caution. -.RE 0 - -.SS "An example" -.P -.RS 2 -.nf -$ npm outdated -Package Current Wanted Latest Location Depended by -glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name -nothingness 0.0.3 git git node_modules/nothingness dependent-package-name -npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name -local-dev 0.0.3 linked linked local-dev dependent-package-name -once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name -.fi -.RE -.P -With these \fBdependencies\fR: -.P -.RS 2 -.nf -{ - "glob": "^5.0.15", - "nothingness": "github:othiym23/nothingness#master", - "npm": "^3.5.1", - "once": "^1.3.1" -} -.fi -.RE -.P -A few things to note: -.RS 0 -.IP \(bu 4 -\fBglob\fR requires \fB^5\fR, which prevents npm from installing \fBglob@6\fR, which is outside the semver range. -.IP \(bu 4 -Git dependencies will always be reinstalled, because of how they're specified. The installed committish might satisfy the dependency specifier (if it's something immutable, like a commit SHA), or it might not, so \fBnpm outdated\fR and \fBnpm update\fR have to fetch Git repos to check. This is why currently doing a reinstall of a Git dependency always forces a new clone and install. -.IP \(bu 4 -\fBnpm@3.5.2\fR is marked as "wanted", but "latest" is \fBnpm@3.5.1\fR because npm uses dist-tags to manage its \fBlatest\fR and \fBnext\fR release channels. \fBnpm update\fR will install the \fInewest\fR version, but \fBnpm install npm\fR (with no semver range) will install whatever's tagged as \fBlatest\fR. -.IP \(bu 4 -\fBonce\fR is just plain out of date. Reinstalling \fBnode_modules\fR from scratch or running \fBnpm update\fR will bring it up to spec. -.RE 0 - -.SS "Configuration" -.SS "\fBall\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help update -.IP \(bu 4 -npm help dist-tag -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-owner.1 b/node_modules/npm/man/man1/npm-owner.1 deleted file mode 100644 index 408fcdc..0000000 --- a/node_modules/npm/man/man1/npm-owner.1 +++ /dev/null @@ -1,110 +0,0 @@ -.TH "NPM-OWNER" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-owner\fR - Manage package owners -.SS "Synopsis" -.P -.RS 2 -.nf -npm owner add -npm owner rm -npm owner ls - -alias: author -.fi -.RE -.SS "Description" -.P -Manage ownership of published packages. -.RS 0 -.IP \(bu 4 -ls: List all the users who have access to modify a package and push new versions. Handy when you need to know who to bug for help. -.IP \(bu 4 -add: Add a new user as a maintainer of a package. This user is enabled to modify metadata, publish new versions, and add other owners. -.IP \(bu 4 -rm: Remove a user from the package owner list. This immediately revokes their privileges. -.RE 0 - -.P -Note that there is only one level of access. Either you can modify a package, or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time. -.P -If you have two-factor authentication enabled with \fBauth-and-writes\fR (see npm help npm-profile) then you'll need to go through a second factor flow when changing ownership or include an otp on the command line with \fB--otp\fR. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help profile -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm-pack.1 b/node_modules/npm/man/man1/npm-pack.1 deleted file mode 100644 index aea0523..0000000 --- a/node_modules/npm/man/man1/npm-pack.1 +++ /dev/null @@ -1,130 +0,0 @@ -.TH "NPM-PACK" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-pack\fR - Create a tarball from a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm pack -.fi -.RE -.SS "Configuration" -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBpack-destination\fR" -.RS 0 -.IP \(bu 4 -Default: "." -.IP \(bu 4 -Type: String -.RE 0 - -.P -Directory in which \fBnpm pack\fR will save tarballs. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "Description" -.P -For anything that's installable (that is, a package folder, tarball, tarball url, git url, name@tag, name@version, name, or scoped name), this command will fetch it to the cache, copy the tarball to the current working directory as \fB-.tgz\fR, and then write the filenames out to stdout. -.P -If the same package is specified multiple times, then the file will be overwritten the second time. -.P -If no arguments are supplied, then npm packs the current package folder. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -\fBnpm-packlist package\fR \fI\(lahttp://npm.im/npm-packlist\(ra\fR -.IP \(bu 4 -npm help cache -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-ping.1 b/node_modules/npm/man/man1/npm-ping.1 deleted file mode 100644 index 7bbbc3e..0000000 --- a/node_modules/npm/man/man1/npm-ping.1 +++ /dev/null @@ -1,52 +0,0 @@ -.TH "NPM-PING" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-ping\fR - Ping npm registry -.SS "Synopsis" -.P -.RS 2 -.nf -npm ping -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Ping the configured or given npm registry and verify authentication. If it works it will output something like: -.P -.RS 2 -.nf -npm notice PING https://registry.npmjs.org/ -npm notice PONG 255ms -.fi -.RE -.P -otherwise you will get an error: -.P -.RS 2 -.nf -npm notice PING http://foo.com/ -npm ERR! code E404 -npm ERR! 404 Not Found - GET http://www.foo.com/-/ping?write=true -.fi -.RE -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help doctor -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-pkg.1 b/node_modules/npm/man/man1/npm-pkg.1 deleted file mode 100644 index 88ccc0a..0000000 --- a/node_modules/npm/man/man1/npm-pkg.1 +++ /dev/null @@ -1,286 +0,0 @@ -.TH "NPM-PKG" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-pkg\fR - Manages your package.json -.SS "Synopsis" -.P -.RS 2 -.nf -npm pkg set = \[lB]= ...\[rB] -npm pkg get \[lB] \[lB] ...\[rB]\[rB] -npm pkg delete \[lB] ...\[rB] -npm pkg set \[lB]\[lB]\[rB].= ...\[rB] -npm pkg set \[lB]\[lB]\[rB].= ...\[rB] -npm pkg fix -.fi -.RE -.SS "Description" -.P -A command that automates the management of \fBpackage.json\fR files. \fBnpm pkg\fR provide 3 different sub commands that allow you to modify or retrieve values for given object keys in your \fBpackage.json\fR. -.P -The syntax to retrieve and set fields is a dot separated representation of the nested object properties to be found within your \fBpackage.json\fR, it's the same notation used in npm help view to retrieve information from the registry manifest, below you can find more examples on how to use it. -.P -Returned values are always in \fBjson\fR format. -.RS 0 -.IP \(bu 4 -\fBnpm pkg get \fR -.P -Retrieves a value \fBkey\fR, defined in your \fBpackage.json\fR file. -.P -For example, in order to retrieve the name of the current package, you can run: -.P -.RS 2 -.nf -npm pkg get name -.fi -.RE -.P -It's also possible to retrieve multiple values at once: -.P -.RS 2 -.nf -npm pkg get name version -.fi -.RE -.P -You can view child fields by separating them with a period. To retrieve the value of a test \fBscript\fR value, you would run the following command: -.P -.RS 2 -.nf -npm pkg get scripts.test -.fi -.RE -.P -For fields that are arrays, requesting a non-numeric field will return all of the values from the objects in the list. For example, to get all the contributor emails for a package, you would run: -.P -.RS 2 -.nf -npm pkg get contributors.email -.fi -.RE -.P -You may also use numeric indices in square braces to specifically select an item in an array field. To just get the email address of the first contributor in the list, you can run: -.P -.RS 2 -.nf -npm pkg get contributors\[lB]0\[rB].email -.fi -.RE -.P -For complex fields you can also name a property in square brackets to specifically select a child field. This is especially helpful with the exports object: -.P -.RS 2 -.nf -npm pkg get "exports\[lB].\[rB].require" -.fi -.RE -.IP \(bu 4 -\fBnpm pkg set =\fR -.P -Sets a \fBvalue\fR in your \fBpackage.json\fR based on the \fBfield\fR value. When saving to your \fBpackage.json\fR file the same set of rules used during \fBnpm install\fR and other cli commands that touches the \fBpackage.json\fR file are used, making sure to respect the existing indentation and possibly applying some validation prior to saving values to the file. -.P -The same syntax used to retrieve values from your package can also be used to define new properties or overriding existing ones, below are some examples of how the dot separated syntax can be used to edit your \fBpackage.json\fR file. -.P -Defining a new bin named \fBmynewcommand\fR in your \fBpackage.json\fR that points to a file \fBcli.js\fR: -.P -.RS 2 -.nf -npm pkg set bin.mynewcommand=cli.js -.fi -.RE -.P -Setting multiple fields at once is also possible: -.P -.RS 2 -.nf -npm pkg set description='Awesome package' engines.node='>=10' -.fi -.RE -.P -It's also possible to add to array values, for example to add a new contributor entry: -.P -.RS 2 -.nf -npm pkg set contributors\[lB]0\[rB].name='Foo' contributors\[lB]0\[rB].email='foo@bar.ca' -.fi -.RE -.P -You may also append items to the end of an array using the special empty bracket notation: -.P -.RS 2 -.nf -npm pkg set contributors\[lB]\[rB].name='Foo' contributors\[lB]\[rB].name='Bar' -.fi -.RE -.P -It's also possible to parse values as json prior to saving them to your \fBpackage.json\fR file, for example in order to set a \fB"private": true\fR property: -.P -.RS 2 -.nf -npm pkg set private=true --json -.fi -.RE -.P -It also enables saving values as numbers: -.P -.RS 2 -.nf -npm pkg set tap.timeout=60 --json -.fi -.RE -.IP \(bu 4 -\fBnpm pkg delete \fR -.P -Deletes a \fBkey\fR from your \fBpackage.json\fR -.P -The same syntax used to set values from your package can also be used to remove existing ones. For example, in order to remove a script named build: -.P -.RS 2 -.nf -npm pkg delete scripts.build -.fi -.RE -.IP \(bu 4 -\fBnpm pkg fix\fR -.P -Auto corrects common errors in your \fBpackage.json\fR. npm already does this during \fBpublish\fR, which leads to subtle (mostly harmless) differences between the contents of your \fBpackage.json\fR file and the manifest that npm uses during installation. -.RE 0 - -.SS "Workspaces support" -.P -You can set/get/delete items across your configured workspaces by using the \fB\fBworkspace\fR\fR \fI\(la/using-npm/config#workspace\(ra\fR or \fB\fBworkspaces\fR\fR \fI\(la/using-npm/config#workspaces\(ra\fR config options. -.P -For example, setting a \fBfunding\fR value across all configured workspaces of a project: -.P -.RS 2 -.nf -npm pkg set funding=https://example.com --ws -.fi -.RE -.P -When using \fBnpm pkg get\fR to retrieve info from your configured workspaces, the returned result will be in a json format in which top level keys are the names of each workspace, the values of these keys will be the result values returned from each of the configured workspaces, e.g: -.P -.RS 2 -.nf -npm pkg get name version --ws -{ - "a": { - "name": "a", - "version": "1.0.0" - }, - "b": { - "name": "b", - "version": "1.0.0" - } -} -.fi -.RE -.SS "Configuration" -.SS "\fBforce\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. -.RS 0 -.IP \(bu 4 -Allow clobbering non-npm files in global installs. -.IP \(bu 4 -Allow the \fBnpm version\fR command to work on an unclean git repository. -.IP \(bu 4 -Allow deleting the cache folder with \fBnpm cache clean\fR. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of npm. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of \fBnode\fR, even if \fB--engine-strict\fR is enabled. -.IP \(bu 4 -Allow \fBnpm audit fix\fR to install modules outside your stated dependency range (including SemVer-major changes). -.IP \(bu 4 -Allow unpublishing all versions of a published package. -.IP \(bu 4 -Allow conflicting peerDependencies to be installed in the root project. -.IP \(bu 4 -Implicitly set \fB--yes\fR during \fBnpm init\fR. -.IP \(bu 4 -Allow clobbering existing values in \fBnpm pkg\fR -.IP \(bu 4 -Allow unpublishing of entire packages (not just a single version). -.RE 0 - -.P -If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help init -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-prefix.1 b/node_modules/npm/man/man1/npm-prefix.1 deleted file mode 100644 index 4b0d0c8..0000000 --- a/node_modules/npm/man/man1/npm-prefix.1 +++ /dev/null @@ -1,63 +0,0 @@ -.TH "NPM-PREFIX" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-prefix\fR - Display prefix -.SS "Synopsis" -.P -.RS 2 -.nf -npm prefix \[lB]-g\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Print the local prefix to standard output. This is the closest parent directory to contain a \fBpackage.json\fR file or \fBnode_modules\fR directory, unless \fB-g\fR is also specified. -.P -If \fB-g\fR is specified, this will be the value of the global prefix. See npm help config for more detail. -.SS "Example" -.P -.RS 2 -.nf -npm prefix -/usr/local/projects/foo -.fi -.RE -.P -.RS 2 -.nf -npm prefix -g -/usr/local -.fi -.RE -.SS "Configuration" -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help root -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-profile.1 b/node_modules/npm/man/man1/npm-profile.1 deleted file mode 100644 index edf3c63..0000000 --- a/node_modules/npm/man/man1/npm-profile.1 +++ /dev/null @@ -1,137 +0,0 @@ -.TH "NPM-PROFILE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-profile\fR - Change settings on your registry profile -.SS "Synopsis" -.P -.RS 2 -.nf -npm profile enable-2fa \[lB]auth-only|auth-and-writes\[rB] -npm profile disable-2fa -npm profile get \[lB]\[rB] -npm profile set -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Change your profile information on the registry. Note that this command depends on the registry implementation, so third-party registries may not support this interface. -.RS 0 -.IP \(bu 4 -\fBnpm profile get \[lB]\[rB]\fR: Display all of the properties of your profile, or one or more specific properties. It looks like: -.RE 0 - -.P -.RS 2 -.nf -+-----------------+---------------------------+ -| name | example | -+-----------------+---------------------------+ -| email | me@example.com (verified) | -+-----------------+---------------------------+ -| two factor auth | auth-and-writes | -+-----------------+---------------------------+ -| fullname | Example User | -+-----------------+---------------------------+ -| homepage | | -+-----------------+---------------------------+ -| freenode | | -+-----------------+---------------------------+ -| twitter | | -+-----------------+---------------------------+ -| github | | -+-----------------+---------------------------+ -| created | 2015-02-26T01:38:35.892Z | -+-----------------+---------------------------+ -| updated | 2017-10-02T21:29:45.922Z | -+-----------------+---------------------------+ -.fi -.RE -.RS 0 -.IP \(bu 4 -\fBnpm profile set \fR: Set the value of a profile property. You can set the following properties this way: email, fullname, homepage, freenode, twitter, github -.IP \(bu 4 -\fBnpm profile set password\fR: Change your password. This is interactive, you'll be prompted for your current password and a new password. You'll also be prompted for an OTP if you have two-factor authentication enabled. -.IP \(bu 4 -\fBnpm profile enable-2fa \[lB]auth-and-writes|auth-only\[rB]\fR: Enables two-factor authentication. Defaults to \fBauth-and-writes\fR mode. Modes are: -.RS 4 -.IP \(bu 4 -\fBauth-only\fR: Require an OTP when logging in or making changes to your account's authentication. The OTP will be required on both the website and the command line. -.IP \(bu 4 -\fBauth-and-writes\fR: Requires an OTP at all the times \fBauth-only\fR does, and also requires one when publishing a module, setting the \fBlatest\fR dist-tag, or changing access via \fBnpm access\fR and \fBnpm owner\fR. -.RE 0 - -.IP \(bu 4 -\fBnpm profile disable-2fa\fR: Disables two-factor authentication. -.RE 0 - -.SS "Details" -.P -Some of these commands may not be available on non npmjs.com registries. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help token -.RE 0 diff --git a/node_modules/npm/man/man1/npm-prune.1 b/node_modules/npm/man/man1/npm-prune.1 deleted file mode 100644 index 9d38bee..0000000 --- a/node_modules/npm/man/man1/npm-prune.1 +++ /dev/null @@ -1,184 +0,0 @@ -.TH "NPM-PRUNE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-prune\fR - Remove extraneous packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm prune \[lB]\[lB]<@scope>/\[rB]...\[rB] -.fi -.RE -.SS "Description" -.P -This command removes "extraneous" packages. If a package name is provided, then only packages matching one of the supplied names are removed. -.P -Extraneous packages are those present in the \fBnode_modules\fR folder that are not listed as any package's dependency list. -.P -If the \fB--omit=dev\fR flag is specified or the \fBNODE_ENV\fR environment variable is set to \fBproduction\fR, this command will remove the packages specified in your \fBdevDependencies\fR. -.P -If the \fB--dry-run\fR flag is used then no changes will actually be made. -.P -If the \fB--json\fR flag is used, then the changes \fBnpm prune\fR made (or would have made with \fB--dry-run\fR) are printed as a JSON object. -.P -In normal operation, extraneous modules are pruned automatically, so you'll only need this command with the \fB--production\fR flag. However, in the real world, operation is not always "normal". When crashes or mistakes happen, this command can help clean up any resulting garbage. -.SS "Configuration" -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help uninstall -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help ls -.RE 0 diff --git a/node_modules/npm/man/man1/npm-publish.1 b/node_modules/npm/man/man1/npm-publish.1 deleted file mode 100644 index e46026f..0000000 --- a/node_modules/npm/man/man1/npm-publish.1 +++ /dev/null @@ -1,221 +0,0 @@ -.TH "NPM-PUBLISH" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-publish\fR - Publish a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm publish -.fi -.RE -.SS "Description" -.P -Publishes a package to the registry so that it can be installed by name. -.P -By default npm will publish to the public registry. This can be overridden by specifying a different default registry or using a npm help scope in the name, combined with a scope-configured registry (see \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR). -.P -A \fBpackage\fR is interpreted the same way as other commands (like \fBnpm install\fR and can be: -.RS 0 -.IP \(bu 4 -a) a folder containing a program described by a \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR file -.IP \(bu 4 -b) a gzipped tarball containing (a) -.IP \(bu 4 -c) a url that resolves to (b) -.IP \(bu 4 -d) a \fB@\fR that is published on the registry (see npm help registry) with (c) -.IP \(bu 4 -e) a \fB@\fR (see npm help dist-tag) that points to (d) -.IP \(bu 4 -f) a \fB\fR that has a "latest" tag satisfying (e) -.IP \(bu 4 -g) a \fB\fR that resolves to (a) -.RE 0 - -.P -The publish will fail if the package name and version combination already exists in the specified registry. -.P -Once a package is published with a given name and version, that specific name and version combination can never be used again, even if it is removed with npm help unpublish. -.P -As of \fBnpm@5\fR, both a sha1sum and an integrity field with a sha512sum of the tarball will be submitted to the registry during publication. Subsequent installs will use the strongest supported algorithm to verify downloads. -.P -Similar to \fB--dry-run\fR see npm help pack, which figures out the files to be included and packs them into a tarball to be uploaded to the registry. -.SS "Files included in package" -.P -To see what will be included in your package, run \fBnpm pack --dry-run\fR. All files are included by default, with the following exceptions: -.RS 0 -.IP \(bu 4 -Certain files that are relevant to package installation and distribution are always included. For example, \fBpackage.json\fR, \fBREADME.md\fR, \fBLICENSE\fR, and so on. -.IP \(bu 4 -If there is a "files" list in \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR, then only the files specified will be included. (If directories are specified, then they will be walked recursively and their contents included, subject to the same ignore rules.) -.IP \(bu 4 -If there is a \fB.gitignore\fR or \fB.npmignore\fR file, then ignored files in that and all child directories will be excluded from the package. If \fIboth\fR files exist, then the \fB.gitignore\fR is ignored, and only the \fB.npmignore\fR is used. -.P -\fB.npmignore\fR files follow the \fBsame pattern rules\fR \fI\(lahttps://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring\(ra\fR as \fB.gitignore\fR files -.IP \(bu 4 -If the file matches certain patterns, then it will \fInever\fR be included, unless explicitly added to the \fB"files"\fR list in \fBpackage.json\fR, or un-ignored with a \fB!\fR rule in a \fB.npmignore\fR or \fB.gitignore\fR file. -.IP \(bu 4 -Symbolic links are never included in npm packages. -.RE 0 - -.P -See npm help developers for full details on what's included in the published package, as well as details on how the package is built. -.SS "Configuration" -.SS "\fBtag\fR" -.RS 0 -.IP \(bu 4 -Default: "latest" -.IP \(bu 4 -Type: String -.RE 0 - -.P -If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag. -.P -Also the tag that is added to the package@version specified by the \fBnpm tag\fR command, if no explicit tag is given. -.P -When used by the \fBnpm diff\fR command, this is the tag used to fetch the tarball that will be compared with the local files by default. -.SS "\fBaccess\fR" -.RS 0 -.IP \(bu 4 -Default: 'public' for new packages, existing packages it will not change the current level -.IP \(bu 4 -Type: null, "restricted", or "public" -.RE 0 - -.P -If you do not want your scoped package to be publicly viewable (and installable) set \fB--access=restricted\fR. -.P -Unscoped packages can not be set to \fBrestricted\fR. -.P -Note: This defaults to not changing the current access level for existing packages. Specifying a value of \fBrestricted\fR or \fBpublic\fR during publish will change the access for an existing package the same way that \fBnpm access set -status\fR would. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBprovenance\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. -.P -This config can not be used with: \fBprovenance-file\fR -.SS "\fBprovenance-file\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: Path -.RE 0 - -.P -When publishing, the provenance bundle at the given path will be used. -.P -This config can not be used with: \fBprovenance\fR -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -\fBnpm-packlist package\fR \fI\(lahttp://npm.im/npm-packlist\(ra\fR -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help scope -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help deprecate -.IP \(bu 4 -npm help dist-tag -.IP \(bu 4 -npm help pack -.IP \(bu 4 -npm help profile -.RE 0 diff --git a/node_modules/npm/man/man1/npm-query.1 b/node_modules/npm/man/man1/npm-query.1 deleted file mode 100644 index 905dd59..0000000 --- a/node_modules/npm/man/man1/npm-query.1 +++ /dev/null @@ -1,243 +0,0 @@ -.TH "NPM-QUERY" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-query\fR - Dependency selector query -.SS "Synopsis" -.P -.RS 2 -.nf -npm query -.fi -.RE -.SS "Description" -.P -The \fBnpm query\fR command allows for usage of css selectors in order to retrieve an array of dependency objects. -.SS "Piping npm query to other commands" -.P -.RS 2 -.nf -# find all dependencies with postinstall scripts & uninstall them -npm query ":attr(scripts, \[lB]postinstall\[rB])" | jq 'map(.name)|join("\[rs]n")' -r | xargs -I {} npm uninstall {} - -# find all git dependencies & explain who requires them -npm query ":type(git)" | jq 'map(.name)' | xargs -I {} npm why {} -.fi -.RE -.SS "Extended Use Cases & Queries" -.P -.RS 2 -.nf -// all deps -* - -// all direct deps -:root > * - -// direct production deps -:root > .prod - -// direct development deps -:root > .dev - -// any peer dep of a direct deps -:root > * > .peer - -// any workspace dep -.workspace - -// all workspaces that depend on another workspace -.workspace > .workspace - -// all workspaces that have peer deps -.workspace:has(.peer) - -// any dep named "lodash" -// equivalent to \[lB]name="lodash"\[rB] -#lodash - -// any deps named "lodash" & within semver range ^"1.2.3" -#lodash@^1.2.3 -// equivalent to... -\[lB]name="lodash"\[rB]:semver(^1.2.3) - -// get the hoisted node for a given semver range -#lodash@^1.2.3:not(:deduped) - -// querying deps with a specific version -#lodash@2.1.5 -// equivalent to... -\[lB]name="lodash"\[rB]\[lB]version="2.1.5"\[rB] - -// has any deps -:has(*) - -// deps with no other deps (ie. "leaf" nodes) -:empty - -// manually querying git dependencies -\[lB]repository^=github:\[rB], -\[lB]repository^=git:\[rB], -\[lB]repository^=https://github.com\[rB], -\[lB]repository^=http://github.com\[rB], -\[lB]repository^=https://github.com\[rB], -\[lB]repository^=+git:...\[rB] - -// querying for all git dependencies -:type(git) - -// get production dependencies that aren't also dev deps -.prod:not(.dev) - -// get dependencies with specific licenses -\[lB]license=MIT\[rB], \[lB]license=ISC\[rB] - -// find all packages that have @ruyadorno as a contributor -:attr(contributors, \[lB]email=ruyadorno@github.com\[rB]) -.fi -.RE -.SS "Example Response Output" -.RS 0 -.IP \(bu 4 -an array of dependency objects is returned which can contain multiple copies of the same package which may or may not have been linked or deduped -.RE 0 - -.P -.RS 2 -.nf -\[lB] - { - "name": "", - "version": "", - "description": "", - "homepage": "", - "bugs": {}, - "author": {}, - "license": {}, - "funding": {}, - "files": \[lB]\[rB], - "main": "", - "browser": "", - "bin": {}, - "man": \[lB]\[rB], - "directories": {}, - "repository": {}, - "scripts": {}, - "config": {}, - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "bundledDependencies": {}, - "peerDependencies": {}, - "peerDependenciesMeta": {}, - "engines": {}, - "os": \[lB]\[rB], - "cpu": \[lB]\[rB], - "workspaces": {}, - "keywords": \[lB]\[rB], - ... - }, - ... -.fi -.RE -.SS "Package lock only mode" -.P -If package-lock-only is enabled, only the information in the package lock (or shrinkwrap) is loaded. This means that information from the package.json files of your dependencies will not be included in the result set (e.g. description, homepage, engines). -.SS "Package lock only mode" -.P -If package-lock-only is enabled, only the information in the package lock (or shrinkwrap) is loaded. This means that information from the package.json files of your dependencies will not be included in the result set (e.g. description, homepage, engines). -.SS "Configuration" -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help "dependency selectors" -.RE 0 diff --git a/node_modules/npm/man/man1/npm-rebuild.1 b/node_modules/npm/man/man1/npm-rebuild.1 deleted file mode 100644 index 654a60c..0000000 --- a/node_modules/npm/man/man1/npm-rebuild.1 +++ /dev/null @@ -1,178 +0,0 @@ -.TH "NPM-REBUILD" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-rebuild\fR - Rebuild a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm rebuild \[lB]\[rB] ...\[rB] - -alias: rb -.fi -.RE -.SS "Description" -.P -This command does the following: -.RS 0 -.IP 1. 4 -Execute lifecycle scripts (\fBpreinstall\fR, \fBinstall\fR, \fBpostinstall\fR, \fBprepare\fR) -.IP 2. 4 -Links bins depending on whether bin links are enabled -.RE 0 - -.P -This command is particularly useful in scenarios including but not limited to: -.RS 0 -.IP 1. 4 -Installing a new version of \fBnode.js\fR, where you need to recompile all your C++ add-ons with the updated binary. -.IP 2. 4 -Installing with \fB--ignore-scripts\fR and \fB--no-bin-links\fR, to explicitly choose which packages to build and/or link bins. -.RE 0 - -.P -If one or more package specs are provided, then only packages with a name and version matching one of the specifiers will be rebuilt. -.P -Usually, you should not need to run \fBnpm rebuild\fR as it is already done for you as part of npm install (unless you suppressed these steps with \fB--ignore-scripts\fR or \fB--no-bin-links\fR). -.P -If there is a \fBbinding.gyp\fR file in the root of your package, then npm will use a default install hook: -.P -.RS 2 -.nf -"scripts": { - "install": "node-gyp rebuild" -} -.fi -.RE -.P -This default behavior is suppressed if the \fBpackage.json\fR has its own \fBinstall\fR or \fBpreinstall\fR scripts. It is also suppressed if the package specifies \fB"gypfile": false\fR -.SS "Configuration" -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man1/npm-repo.1 b/node_modules/npm/man/man1/npm-repo.1 deleted file mode 100644 index e345059..0000000 --- a/node_modules/npm/man/man1/npm-repo.1 +++ /dev/null @@ -1,103 +0,0 @@ -.TH "NPM-REPO" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-repo\fR - Open package repository page in the browser -.SS "Synopsis" -.P -.RS 2 -.nf -npm repo \[lB] \[lB] ...\[rB]\[rB] -.fi -.RE -.SS "Description" -.P -This command tries to guess at the likely location of a package's repository URL, and then tries to open it using the \fB\fB--browser\fR config\fR \fI\(la/using-npm/config#browser\(ra\fR param. If no package name is provided, it will search for a \fBpackage.json\fR in the current folder and use the \fBrepository\fR property. -.SS "Configuration" -.SS "\fBbrowser\fR" -.RS 0 -.IP \(bu 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR -.IP \(bu 4 -Type: null, Boolean, or String -.RE 0 - -.P -The browser that is called by npm commands to open websites. -.P -Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal. -.P -Set to \fBtrue\fR to use default system URL opener. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help docs -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/man/man1/npm-restart.1 b/node_modules/npm/man/man1/npm-restart.1 deleted file mode 100644 index 3f67e6f..0000000 --- a/node_modules/npm/man/man1/npm-restart.1 +++ /dev/null @@ -1,85 +0,0 @@ -.TH "NPM-RESTART" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-restart\fR - Restart a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm restart \[lB]-- \[rB] -.fi -.RE -.SS "Description" -.P -This restarts a project. It is equivalent to running \fBnpm run-script -restart\fR. -.P -If the current project has a \fB"restart"\fR script specified in \fBpackage.json\fR, then the following scripts will be run: -.RS 0 -.IP 1. 4 -prerestart -.IP 2. 4 -restart -.IP 3. 4 -postrestart -.RE 0 - -.P -If it does \fInot\fR have a \fB"restart"\fR script specified, but it does have \fBstop\fR and/or \fBstart\fR scripts, then the following scripts will be run: -.RS 0 -.IP 1. 4 -prerestart -.IP 2. 4 -prestop -.IP 3. 4 -stop -.IP 4. 4 -poststop -.IP 5. 4 -prestart -.IP 6. 4 -start -.IP 7. 4 -poststart -.IP 8. 4 -postrestart -.RE 0 - -.SS "Configuration" -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help stop -.IP \(bu 4 -npm help restart -.RE 0 diff --git a/node_modules/npm/man/man1/npm-root.1 b/node_modules/npm/man/man1/npm-root.1 deleted file mode 100644 index fc1371e..0000000 --- a/node_modules/npm/man/man1/npm-root.1 +++ /dev/null @@ -1,56 +0,0 @@ -.TH "NPM-ROOT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-root\fR - Display npm root -.SS "Synopsis" -.P -.RS 2 -.nf -npm root -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Print the effective \fBnode_modules\fR folder to standard out. -.P -Useful for using npm in shell scripts that do things with the \fBnode_modules\fR folder. For example: -.P -.RS 2 -.nf -#!/bin/bash -global_node_modules="$(npm root --global)" -echo "Global packages installed in: ${global_node_modules}" -.fi -.RE -.SS "Configuration" -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help prefix -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-run-script.1 b/node_modules/npm/man/man1/npm-run-script.1 deleted file mode 100644 index 352cadd..0000000 --- a/node_modules/npm/man/man1/npm-run-script.1 +++ /dev/null @@ -1,234 +0,0 @@ -.TH "NPM-RUN-SCRIPT" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-run-script\fR - Run arbitrary package scripts -.SS "Synopsis" -.P -.RS 2 -.nf -npm run-script \[lB]-- \[rB] - -aliases: run, rum, urn -.fi -.RE -.SS "Description" -.P -This runs an arbitrary command from a package's \fB"scripts"\fR object. If no \fB"command"\fR is provided, it will list the available scripts. -.P -\fBrun\[lB]-script\[rB]\fR is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts. -.P -Any positional arguments are passed to the specified script. Use \fB--\fR to pass \fB-\fR-prefixed flags and options which would otherwise be parsed by npm. -.P -For example: -.P -.RS 2 -.nf -npm run test -- --grep="pattern" -.fi -.RE -.P -The arguments will only be passed to the script specified after \fBnpm run\fR and not to any \fBpre\fR or \fBpost\fR script. -.P -The \fBenv\fR script is a special built-in command that can be used to list environment variables that will be available to the script at runtime. If an "env" command is defined in your package, it will take precedence over the built-in. -.P -In addition to the shell's pre-existing \fBPATH\fR, \fBnpm run\fR adds \fBnode_modules/.bin\fR to the \fBPATH\fR provided to scripts. Any binaries provided by locally-installed dependencies can be used without the \fBnode_modules/.bin\fR prefix. For example, if there is a \fBdevDependency\fR on \fBtap\fR in your package, you should write: -.P -.RS 2 -.nf -"scripts": {"test": "tap test/*.js"} -.fi -.RE -.P -instead of -.P -.RS 2 -.nf -"scripts": {"test": "node_modules/.bin/tap test/*.js"} -.fi -.RE -.P -The actual shell your script is run within is platform dependent. By default, on Unix-like systems it is the \fB/bin/sh\fR command, on Windows it is \fBcmd.exe\fR. The actual shell referred to by \fB/bin/sh\fR also depends on the system. You can customize the shell with the \fB\fBscript-shell\fR config\fR \fI\(la/using-npm/config#script-shell\(ra\fR. -.P -Scripts are run from the root of the package folder, regardless of what the current working directory is when \fBnpm run\fR is called. If you want your script to use different behavior based on what subdirectory you're in, you can use the \fBINIT_CWD\fR environment variable, which holds the full path you were in when you ran \fBnpm run\fR. -.P -\fBnpm run\fR sets the \fBNODE\fR environment variable to the \fBnode\fR executable with which \fBnpm\fR is executed. -.P -If you try to run a script without having a \fBnode_modules\fR directory and it fails, you will be given a warning to run \fBnpm install\fR, just in case you've forgotten. -.SS "Workspaces support" -.P -You may use the \fB\fBworkspace\fR\fR \fI\(la/using-npm/config#workspace\(ra\fR or \fB\fBworkspaces\fR\fR \fI\(la/using-npm/config#workspaces\(ra\fR configs in order to run an arbitrary command from a package's \fB"scripts"\fR object in the context of the specified workspaces. If no \fB"command"\fR is provided, it will list the available scripts for each of these configured workspaces. -.P -Given a project with configured workspaces, e.g: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json - +-- b - | `-- package.json - `-- c - `-- package.json -.fi -.RE -.P -Assuming the workspace configuration is properly set up at the root level \fBpackage.json\fR file. e.g: -.P -.RS 2 -.nf -{ - "workspaces": \[lB] "./packages/*" \[rB] -} -.fi -.RE -.P -And that each of the configured workspaces has a configured \fBtest\fR script, we can run tests in all of them using the \fB\fBworkspaces\fR config\fR \fI\(la/using-npm/config#workspaces\(ra\fR: -.P -.RS 2 -.nf -npm test --workspaces -.fi -.RE -.SS "Filtering workspaces" -.P -It's also possible to run a script in a single workspace using the \fBworkspace\fR config along with a name or directory path: -.P -.RS 2 -.nf -npm test --workspace=a -.fi -.RE -.P -The \fBworkspace\fR config can also be specified multiple times in order to run a specific script in the context of multiple workspaces. When defining values for the \fBworkspace\fR config in the command line, it also possible to use \fB-w\fR as a shorthand, e.g: -.P -.RS 2 -.nf -npm test -w a -w b -.fi -.RE -.P -This last command will run \fBtest\fR in both \fB./packages/a\fR and \fB./packages/b\fR packages. -.SS "Configuration" -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBif-present\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm will not exit with an error code when \fBrun-script\fR is invoked for a script that isn't defined in the \fBscripts\fR section of \fBpackage.json\fR. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. -.P -This value is not exported to the environment for child processes. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help restart -.IP \(bu 4 -npm help stop -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-sbom.1 b/node_modules/npm/man/man1/npm-sbom.1 deleted file mode 100644 index 996f7f5..0000000 --- a/node_modules/npm/man/man1/npm-sbom.1 +++ /dev/null @@ -1,314 +0,0 @@ -.TH "NPM-SBOM" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-sbom\fR - Generate a Software Bill of Materials (SBOM) -.SS "Synopsis" -.P -.RS 2 -.nf -npm sbom -.fi -.RE -.SS "Description" -.P -The \fBnpm sbom\fR command generates a Software Bill of Materials (SBOM) listing the dependencies for the current project. SBOMs can be generated in either \fBSPDX\fR \fI\(lahttps://spdx.dev/\(ra\fR or \fBCycloneDX\fR \fI\(lahttps://cyclonedx.org/\(ra\fR format. -.SS "Example CycloneDX SBOM" -.P -.RS 2 -.nf -{ - "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", - "bomFormat": "CycloneDX", - "specVersion": "1.5", - "serialNumber": "urn:uuid:09f55116-97e1-49cf-b3b8-44d0207e7730", - "version": 1, - "metadata": { - "timestamp": "2023-09-01T00:00:00.001Z", - "lifecycles": \[lB] - { - "phase": "build" - } - \[rB], - "tools": \[lB] - { - "vendor": "npm", - "name": "cli", - "version": "10.1.0" - } - \[rB], - "component": { - "bom-ref": "simple@1.0.0", - "type": "library", - "name": "simple", - "version": "1.0.0", - "scope": "required", - "author": "John Doe", - "description": "simple react app", - "purl": "pkg:npm/simple@1.0.0", - "properties": \[lB] - { - "name": "cdx:npm:package:path", - "value": "" - } - \[rB], - "externalReferences": \[lB]\[rB], - "licenses": \[lB] - { - "license": { - "id": "MIT" - } - } - \[rB] - } - }, - "components": \[lB] - { - "bom-ref": "lodash@4.17.21", - "type": "library", - "name": "lodash", - "version": "4.17.21", - "scope": "required", - "author": "John-David Dalton", - "description": "Lodash modular utilities.", - "purl": "pkg:npm/lodash@4.17.21", - "properties": \[lB] - { - "name": "cdx:npm:package:path", - "value": "node_modules/lodash" - } - \[rB], - "externalReferences": \[lB] - { - "type": "distribution", - "url": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - }, - { - "type": "vcs", - "url": "git+https://github.com/lodash/lodash.git" - }, - { - "type": "website", - "url": "https://lodash.com/" - }, - { - "type": "issue-tracker", - "url": "https://github.com/lodash/lodash/issues" - } - \[rB], - "hashes": \[lB] - { - "alg": "SHA-512", - "content": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a" - } - \[rB], - "licenses": \[lB] - { - "license": { - "id": "MIT" - } - } - \[rB] - } - \[rB], - "dependencies": \[lB] - { - "ref": "simple@1.0.0", - "dependsOn": \[lB] - "lodash@4.17.21" - \[rB] - }, - { - "ref": "lodash@4.17.21", - "dependsOn": \[lB]\[rB] - } - \[rB] -} -.fi -.RE -.SS "Example SPDX SBOM" -.P -.RS 2 -.nf -{ - "spdxVersion": "SPDX-2.3", - "dataLicense": "CC0-1.0", - "SPDXID": "SPDXRef-DOCUMENT", - "name": "simple@1.0.0", - "documentNamespace": "http://spdx.org/spdxdocs/simple-1.0.0-bf81090e-8bbc-459d-bec9-abeb794e096a", - "creationInfo": { - "created": "2023-09-01T00:00:00.001Z", - "creators": \[lB] - "Tool: npm/cli-10.1.0" - \[rB] - }, - "documentDescribes": \[lB] - "SPDXRef-Package-simple-1.0.0" - \[rB], - "packages": \[lB] - { - "name": "simple", - "SPDXID": "SPDXRef-Package-simple-1.0.0", - "versionInfo": "1.0.0", - "packageFileName": "", - "description": "simple react app", - "primaryPackagePurpose": "LIBRARY", - "downloadLocation": "NOASSERTION", - "filesAnalyzed": false, - "homepage": "NOASSERTION", - "licenseDeclared": "MIT", - "externalRefs": \[lB] - { - "referenceCategory": "PACKAGE-MANAGER", - "referenceType": "purl", - "referenceLocator": "pkg:npm/simple@1.0.0" - } - \[rB] - }, - { - "name": "lodash", - "SPDXID": "SPDXRef-Package-lodash-4.17.21", - "versionInfo": "4.17.21", - "packageFileName": "node_modules/lodash", - "description": "Lodash modular utilities.", - "downloadLocation": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "filesAnalyzed": false, - "homepage": "https://lodash.com/", - "licenseDeclared": "MIT", - "externalRefs": \[lB] - { - "referenceCategory": "PACKAGE-MANAGER", - "referenceType": "purl", - "referenceLocator": "pkg:npm/lodash@4.17.21" - } - \[rB], - "checksums": \[lB] - { - "algorithm": "SHA512", - "checksumValue": "bf690311ee7b95e713ba568322e3533f2dd1cb880b189e99d4edef13592b81764daec43e2c54c61d5c558dc5cfb35ecb85b65519e74026ff17675b6f8f916f4a" - } - \[rB] - } - \[rB], - "relationships": \[lB] - { - "spdxElementId": "SPDXRef-DOCUMENT", - "relatedSpdxElement": "SPDXRef-Package-simple-1.0.0", - "relationshipType": "DESCRIBES" - }, - { - "spdxElementId": "SPDXRef-Package-simple-1.0.0", - "relatedSpdxElement": "SPDXRef-Package-lodash-4.17.21", - "relationshipType": "DEPENDS_ON" - } - \[rB] -} -.fi -.RE -.SS "Package lock only mode" -.P -If package-lock-only is enabled, only the information in the package lock (or shrinkwrap) is loaded. This means that information from the package.json files of your dependencies will not be included in the result set (e.g. description, homepage, engines). -.SS "Configuration" -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBsbom-format\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: "cyclonedx" or "spdx" -.RE 0 - -.P -SBOM format to use when generating SBOMs. -.SS "\fBsbom-type\fR" -.RS 0 -.IP \(bu 4 -Default: "library" -.IP \(bu 4 -Type: "library", "application", or "framework" -.RE 0 - -.P -The type of package described by the generated SBOM. For SPDX, this is the value for the \fBprimaryPackagePurpose\fR field. For CycloneDX, this is the value for the \fBtype\fR field. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help "dependency selectors" -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help workspaces -.RE 0 diff --git a/node_modules/npm/man/man1/npm-search.1 b/node_modules/npm/man/man1/npm-search.1 deleted file mode 100644 index 5884324..0000000 --- a/node_modules/npm/man/man1/npm-search.1 +++ /dev/null @@ -1,156 +0,0 @@ -.TH "NPM-SEARCH" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-search\fR - Search for packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm search \[lB]search terms ...\[rB] - -aliases: find, s, se -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Search the registry for packages matching the search terms. \fBnpm search\fR performs a linear, incremental, lexically-ordered search through package metadata for all files in the registry. If your terminal has color support, it will further highlight the matches in the results. This can be disabled with the config item \fBcolor\fR -.P -Additionally, using the \fB--searchopts\fR and \fB--searchexclude\fR options paired with more search terms will include and exclude further patterns. The main difference between \fB--searchopts\fR and the standard search terms is that the former does not highlight results in the output and you can use them more fine-grained filtering. Additionally, you can add both of these to your config to change default search filtering behavior. -.P -Search also allows targeting of maintainers in search results, by prefixing their npm username with \fB=\fR. -.P -If a term starts with \fB/\fR, then it's interpreted as a regular expression and supports standard JavaScript RegExp syntax. In this case search will ignore a trailing \fB/\fR . (Note you must escape or quote many regular expression characters in most shells.) -.SS "Configuration" -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBcolor\fR" -.RS 0 -.IP \(bu 4 -Default: true unless the NO_COLOR environ is set to something other than '0' -.IP \(bu 4 -Type: "always" or Boolean -.RE 0 - -.P -If false, never shows colors. If \fB"always"\fR then always shows colors. If true, then only prints color codes for tty file descriptors. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBdescription\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show the description in \fBnpm search\fR -.SS "\fBsearchopts\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Space-separated options that are always passed to search. -.SS "\fBsearchexclude\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Space-separated options that limit the results from search. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBprefer-online\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data. -.SS "\fBprefer-offline\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server. To force full offline mode, use \fB--offline\fR. -.SS "\fBoffline\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Force offline mode: no network requests will be done during install. To allow the CLI to fill in missing cache data, see \fB--prefer-offline\fR. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help cache -.IP \(bu 4 -https://npm.im/npm-registry-fetch -.RE 0 diff --git a/node_modules/npm/man/man1/npm-shrinkwrap.1 b/node_modules/npm/man/man1/npm-shrinkwrap.1 deleted file mode 100644 index 3bf786c..0000000 --- a/node_modules/npm/man/man1/npm-shrinkwrap.1 +++ /dev/null @@ -1,32 +0,0 @@ -.TH "NPM-SHRINKWRAP" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-shrinkwrap\fR - Lock down dependency versions for publication -.SS "Synopsis" -.P -.RS 2 -.nf -npm shrinkwrap -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -This command repurposes \fBpackage-lock.json\fR into a publishable \fBnpm-shrinkwrap.json\fR or simply creates a new one. The file created and updated by this command will then take precedence over any other existing or future \fBpackage-lock.json\fR files. For a detailed explanation of the design and purpose of package locks in npm, see npm help package-lock-json. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -\fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR -.IP \(bu 4 -\fBnpm-shrinkwrap.json\fR \fI\(la/configuring-npm/npm-shrinkwrap-json\(ra\fR -.IP \(bu 4 -npm help ls -.RE 0 diff --git a/node_modules/npm/man/man1/npm-star.1 b/node_modules/npm/man/man1/npm-star.1 deleted file mode 100644 index 78fe464..0000000 --- a/node_modules/npm/man/man1/npm-star.1 +++ /dev/null @@ -1,76 +0,0 @@ -.TH "NPM-STAR" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-star\fR - Mark your favorite packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm star \[lB]...\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -"Starring" a package means that you have some interest in it. It's a vaguely positive way to show that you care. -.P -It's a boolean thing. Starring repeatedly has no additional effect. -.SS "More" -.P -There's also these extra commands to help you manage your favorite packages: -.SS "Unstar" -.P -You can also "unstar" a package using npm help unstar -.P -"Unstarring" is the same thing, but in reverse. -.SS "Listing stars" -.P -You can see all your starred packages using npm help stars -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBunicode\fR" -.RS 0 -.IP \(bu 4 -Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help unstar -.IP \(bu 4 -npm help stars -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm-stars.1 b/node_modules/npm/man/man1/npm-stars.1 deleted file mode 100644 index 5a06b04..0000000 --- a/node_modules/npm/man/man1/npm-stars.1 +++ /dev/null @@ -1,41 +0,0 @@ -.TH "NPM-STARS" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-stars\fR - View packages marked as favorites -.SS "Synopsis" -.P -.RS 2 -.nf -npm stars \[lB]\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -If you have starred a lot of neat things and want to find them again quickly this command lets you do just that. -.P -You may also want to see your friend's favorite packages, in this case you will most certainly enjoy this command. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help star -.IP \(bu 4 -npm help unstar -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm-start.1 b/node_modules/npm/man/man1/npm-start.1 deleted file mode 100644 index 37b09ff..0000000 --- a/node_modules/npm/man/man1/npm-start.1 +++ /dev/null @@ -1,79 +0,0 @@ -.TH "NPM-START" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-start\fR - Start a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm start \[lB]-- \[rB] -.fi -.RE -.SS "Description" -.P -This runs a predefined command specified in the \fB"start"\fR property of a package's \fB"scripts"\fR object. -.P -If the \fB"scripts"\fR object does not define a \fB"start"\fR property, npm will run \fBnode server.js\fR. -.P -Note that this is different from the default node behavior of running the file specified in a package's \fB"main"\fR attribute when evoking with \fBnode .\fR -.P -As of \fB\fBnpm@2.0.0\fR\fR \fI\(lahttps://blog.npmjs.org/post/98131109725/npm-2-0-0\(ra\fR, you can use custom arguments when executing scripts. Refer to npm help run-script for more details. -.SS "Example" -.P -.RS 2 -.nf -{ - "scripts": { - "start": "node foo.js" - } -} -.fi -.RE -.P -.RS 2 -.nf -npm start - -> npm@x.x.x start -> node foo.js - -(foo.js output would be here) - -.fi -.RE -.SS "Configuration" -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help restart -.IP \(bu 4 -npm help stop -.RE 0 diff --git a/node_modules/npm/man/man1/npm-stop.1 b/node_modules/npm/man/man1/npm-stop.1 deleted file mode 100644 index 55a2acc..0000000 --- a/node_modules/npm/man/man1/npm-stop.1 +++ /dev/null @@ -1,75 +0,0 @@ -.TH "NPM-STOP" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-stop\fR - Stop a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm stop \[lB]-- \[rB] -.fi -.RE -.SS "Description" -.P -This runs a predefined command specified in the "stop" property of a package's "scripts" object. -.P -Unlike with npm help start, there is no default script that will run if the \fB"stop"\fR property is not defined. -.SS "Example" -.P -.RS 2 -.nf -{ - "scripts": { - "stop": "node bar.js" - } -} -.fi -.RE -.P -.RS 2 -.nf -npm stop - -> npm@x.x.x stop -> node bar.js - -(bar.js output would be here) - -.fi -.RE -.SS "Configuration" -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help restart -.RE 0 diff --git a/node_modules/npm/man/man1/npm-team.1 b/node_modules/npm/man/man1/npm-team.1 deleted file mode 100644 index 03eadfb..0000000 --- a/node_modules/npm/man/man1/npm-team.1 +++ /dev/null @@ -1,148 +0,0 @@ -.TH "NPM-TEAM" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-team\fR - Manage organization teams and team memberships -.SS "Synopsis" -.P -.RS 2 -.nf -npm team create \[lB]--otp \[rB] -npm team destroy \[lB]--otp \[rB] -npm team add \[lB]--otp \[rB] -npm team rm \[lB]--otp \[rB] -npm team ls | -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Used to manage teams in organizations, and change team memberships. Does not handle permissions for packages. -.P -Teams must always be fully qualified with the organization/scope they belong to when operating on them, separated by a colon (\fB:\fR). That is, if you have a \fBnewteam\fR team in an \fBorg\fR organization, you must always refer to that team as \fB@org:newteam\fR in these commands. -.P -If you have two-factor authentication enabled in \fBauth-and-writes\fR mode, then you can provide a code from your authenticator with \fB\[lB]--otp \[rB]\fR. If you don't include this then you will be taken through a second factor flow based on your \fBauthtype\fR. -.RS 0 -.IP \(bu 4 -create / destroy: Create a new team, or destroy an existing one. Note: You cannot remove the \fBdevelopers\fR team, \fBlearn more.\fR \fI\(lahttps://docs.npmjs.com/about-developers-team\(ra\fR -.P -Here's how to create a new team \fBnewteam\fR under the \fBorg\fR org: -.P -.RS 2 -.nf -npm team create @org:newteam -.fi -.RE -.P -You should see a confirming message such as: \fB+@org:newteam\fR once the new team has been created. -.IP \(bu 4 -add: Add a user to an existing team. -.P -Adding a new user \fBusername\fR to a team named \fBnewteam\fR under the \fBorg\fR org: -.P -.RS 2 -.nf -npm team add @org:newteam username -.fi -.RE -.P -On success, you should see a message: \fBusername added to @org:newteam\fR -.IP \(bu 4 -rm: Using \fBnpm team rm\fR you can also remove users from a team they belong to. -.P -Here's an example removing user \fBusername\fR from \fBnewteam\fR team in \fBorg\fR organization: -.P -.RS 2 -.nf -npm team rm @org:newteam username -.fi -.RE -.P -Once the user is removed a confirmation message is displayed: \fBusername removed from @org:newteam\fR -.IP \(bu 4 -ls: If performed on an organization name, will return a list of existing teams under that organization. If performed on a team, it will instead return a list of all users belonging to that particular team. -.P -Here's an example of how to list all teams from an org named \fBorg\fR: -.P -.RS 2 -.nf -npm team ls @org -.fi -.RE -.P -Example listing all members of a team named \fBnewteam\fR: -.P -.RS 2 -.nf -npm team ls @org:newteam -.fi -.RE -.RE 0 - -.SS "Details" -.P -\fBnpm team\fR always operates directly on the current registry, configurable from the command line using \fB--registry=\fR. -.P -You must be a \fIteam admin\fR to create teams and manage team membership, under the given organization. Listing teams and team memberships may be done by any member of the organization. -.P -Organization creation and management of team admins and \fIorganization\fR members is done through the website, not the npm CLI. -.P -To use teams to manage permissions on packages belonging to your organization, use the \fBnpm access\fR command to grant or revoke the appropriate permissions. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help access -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help registry -.RE 0 diff --git a/node_modules/npm/man/man1/npm-test.1 b/node_modules/npm/man/man1/npm-test.1 deleted file mode 100644 index e97d652..0000000 --- a/node_modules/npm/man/man1/npm-test.1 +++ /dev/null @@ -1,73 +0,0 @@ -.TH "NPM-TEST" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-test\fR - Test a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm test \[lB]-- \[rB] - -aliases: tst, t -.fi -.RE -.SS "Description" -.P -This runs a predefined command specified in the \fB"test"\fR property of a package's \fB"scripts"\fR object. -.SS "Example" -.P -.RS 2 -.nf -{ - "scripts": { - "test": "node test.js" - } -} -.fi -.RE -.P -.RS 2 -.nf -npm test -> npm@x.x.x test -> node test.js - -(test.js output would be here) -.fi -.RE -.SS "Configuration" -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help restart -.IP \(bu 4 -npm help stop -.RE 0 diff --git a/node_modules/npm/man/man1/npm-token.1 b/node_modules/npm/man/man1/npm-token.1 deleted file mode 100644 index 6b30170..0000000 --- a/node_modules/npm/man/man1/npm-token.1 +++ /dev/null @@ -1,130 +0,0 @@ -.TH "NPM-TOKEN" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-token\fR - Manage your authentication tokens -.SS "Synopsis" -.P -.RS 2 -.nf -npm token list -npm token revoke -npm token create \[lB]--read-only\[rB] \[lB]--cidr=list\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -This lets you list, create and revoke authentication tokens. -.RS 0 -.IP \(bu 4 -\fBnpm token list\fR: Shows a table of all active authentication tokens. You can request this as JSON with \fB--json\fR or tab-separated values with \fB--parseable\fR. -.RE 0 - -.P -.RS 2 -.nf -+--------+---------+------------+----------+----------------+ -| id | token | created | read-only | CIDR whitelist | -+--------+---------+------------+----------+----------------+ -| 7f3134 | 1fa9ba… | 2017-10-02 | yes | | -+--------+---------+------------+----------+----------------+ -| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 | -+--------+---------+------------+----------+----------------+ -| e0cf92 | 3a436a… | 2017-10-02 | no | | -+--------+---------+------------+----------+----------------+ -| 63eb9d | 74ef35… | 2017-09-28 | no | | -+--------+---------+------------+----------+----------------+ -| 2daaa8 | cbad5f… | 2017-09-26 | no | | -+--------+---------+------------+----------+----------------+ -| 68c2fe | 127e51… | 2017-09-23 | no | | -+--------+---------+------------+----------+----------------+ -| 6334e1 | 1dadd1… | 2017-09-23 | no | | -+--------+---------+------------+----------+----------------+ -.fi -.RE -.RS 0 -.IP \(bu 4 -\fBnpm token create \[lB]--read-only\[rB] \[lB]--cidr=\[rB]\fR: Create a new authentication token. It can be \fB--read-only\fR, or accept a list of \fBCIDR\fR \fI\(lahttps://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing\(ra\fR ranges with which to limit use of this token. This will prompt you for your password, and, if you have two-factor authentication enabled, an otp. -.P -Currently, the cli can not generate automation tokens. Please refer to the \fBdocs website\fR \fI\(lahttps://docs.npmjs.com/creating-and-viewing-access-tokens\(ra\fR for more information on generating automation tokens. -.RE 0 - -.P -.RS 2 -.nf -+----------------+--------------------------------------+ -| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d | -+----------------+--------------------------------------+ -| cidr_whitelist | | -+----------------+--------------------------------------+ -| readonly | false | -+----------------+--------------------------------------+ -| created | 2017-10-02T07:52:24.838Z | -+----------------+--------------------------------------+ -.fi -.RE -.RS 0 -.IP \(bu 4 -\fBnpm token revoke \fR: Immediately removes an authentication token from the registry. You will no longer be able to use it. This can accept both complete tokens (such as those you get back from \fBnpm token create\fR, and those found in your \fB.npmrc\fR), and ids as seen in the parseable or json output of \fBnpm token list\fR. This will NOT accept the truncated token found in the normal \fBnpm token list\fR output. -.RE 0 - -.SS "Configuration" -.SS "\fBread-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -This is used to mark a token as unable to publish when configuring limited access tokens with the \fBnpm token create\fR command. -.SS "\fBcidr\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String (can be set multiple times) -.RE 0 - -.P -This is a list of CIDR address to be used when configuring limited access tokens with the \fBnpm token create\fR command. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help profile -.RE 0 diff --git a/node_modules/npm/man/man1/npm-uninstall.1 b/node_modules/npm/man/man1/npm-uninstall.1 deleted file mode 100644 index 9507bf6..0000000 --- a/node_modules/npm/man/man1/npm-uninstall.1 +++ /dev/null @@ -1,159 +0,0 @@ -.TH "NPM-UNINSTALL" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-uninstall\fR - Remove a package -.SS "Synopsis" -.P -.RS 2 -.nf -npm uninstall \[lB]<@scope>/\[rB]... - -aliases: unlink, remove, rm, r, un -.fi -.RE -.SS "Description" -.P -This uninstalls a package, completely removing everything npm installed on its behalf. -.P -It also removes the package from the \fBdependencies\fR, \fBdevDependencies\fR, \fBoptionalDependencies\fR, and \fBpeerDependencies\fR objects in your \fBpackage.json\fR. -.P -Further, if you have an \fBnpm-shrinkwrap.json\fR or \fBpackage-lock.json\fR, npm will update those files as well. -.P -\fB--no-save\fR will tell npm not to remove the package from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files. -.P -\fB--save\fR or \fB-S\fR will tell npm to remove the package from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, and \fBpackage-lock.json\fR files. This is the default, but you may need to use this if you have for instance \fBsave=false\fR in your \fBnpmrc\fR file -.P -In global mode (ie, with \fB-g\fR or \fB--global\fR appended to the command), it uninstalls the current package context as a global package. \fB--no-save\fR is ignored in this case. -.P -Scope is optional and follows the usual rules for npm help scope. -.SS "Examples" -.P -.RS 2 -.nf -npm uninstall sax -.fi -.RE -.P -\fBsax\fR will no longer be in your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files. -.P -.RS 2 -.nf -npm uninstall lodash --no-save -.fi -.RE -.P -\fBlodash\fR will not be removed from your \fBpackage.json\fR, \fBnpm-shrinkwrap.json\fR, or \fBpackage-lock.json\fR files. -.SS "Configuration" -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help prune -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.RE 0 diff --git a/node_modules/npm/man/man1/npm-unpublish.1 b/node_modules/npm/man/man1/npm-unpublish.1 deleted file mode 100644 index 7ec4717..0000000 --- a/node_modules/npm/man/man1/npm-unpublish.1 +++ /dev/null @@ -1,137 +0,0 @@ -.TH "NPM-UNPUBLISH" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-unpublish\fR - Remove a package from the registry -.SS "Synopsis" -.P -.RS 2 -.nf -npm unpublish \[lB]\[rB] -.fi -.RE -.P -To learn more about how the npm registry treats unpublish, see our \fBunpublish policies\fR \fI\(lahttps://docs.npmjs.com/policies/unpublish\(ra\fR. -.SS "Warning" -.P -Consider using the npm help deprecate command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package. -.SS "Description" -.P -This removes a package version from the registry, deleting its entry and removing the tarball. -.P -The npm registry will return an error if you are not npm help "logged in". -.P -If you do not specify a package name at all, the name and version to be unpublished will be pulled from the project in the current directory. -.P -If you specify a package name but do not specify a version or if you remove all of a package's versions then the registry will remove the root package entry entirely. -.P -Even if you unpublish a package version, that specific name and version combination can never be reused. In order to publish the package again, you must use a new version number. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed. -.SS "Configuration" -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBforce\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. -.RS 0 -.IP \(bu 4 -Allow clobbering non-npm files in global installs. -.IP \(bu 4 -Allow the \fBnpm version\fR command to work on an unclean git repository. -.IP \(bu 4 -Allow deleting the cache folder with \fBnpm cache clean\fR. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of npm. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of \fBnode\fR, even if \fB--engine-strict\fR is enabled. -.IP \(bu 4 -Allow \fBnpm audit fix\fR to install modules outside your stated dependency range (including SemVer-major changes). -.IP \(bu 4 -Allow unpublishing all versions of a published package. -.IP \(bu 4 -Allow conflicting peerDependencies to be installed in the root project. -.IP \(bu 4 -Implicitly set \fB--yes\fR during \fBnpm init\fR. -.IP \(bu 4 -Allow clobbering existing values in \fBnpm pkg\fR -.IP \(bu 4 -Allow unpublishing of entire packages (not just a single version). -.RE 0 - -.P -If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help deprecate -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help owner -.IP \(bu 4 -npm help login -.RE 0 diff --git a/node_modules/npm/man/man1/npm-unstar.1 b/node_modules/npm/man/man1/npm-unstar.1 deleted file mode 100644 index 6cb49e4..0000000 --- a/node_modules/npm/man/man1/npm-unstar.1 +++ /dev/null @@ -1,70 +0,0 @@ -.TH "NPM-UNSTAR" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-unstar\fR - Remove an item from your favorite packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm unstar \[lB]...\[rB] -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -"Unstarring" a package is the opposite of npm help star, it removes an item from your list of favorite packages. -.SS "More" -.P -There's also these extra commands to help you manage your favorite packages: -.SS "Star" -.P -You can "star" a package using npm help star -.SS "Listing stars" -.P -You can see all your starred packages using npm help stars -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBunicode\fR" -.RS 0 -.IP \(bu 4 -Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help star -.IP \(bu 4 -npm help stars -.IP \(bu 4 -npm help view -.IP \(bu 4 -npm help whoami -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm-update.1 b/node_modules/npm/man/man1/npm-update.1 deleted file mode 100644 index 1257cf4..0000000 --- a/node_modules/npm/man/man1/npm-update.1 +++ /dev/null @@ -1,406 +0,0 @@ -.TH "NPM-UPDATE" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-update\fR - Update packages -.SS "Synopsis" -.P -.RS 2 -.nf -npm update \[lB]...\[rB] - -aliases: up, upgrade, udpate -.fi -.RE -.SS "Description" -.P -This command will update all the packages listed to the latest version (specified by the \fB\fBtag\fR config\fR \fI\(la/using-npm/config#tag\(ra\fR), respecting the semver constraints of both your package and its dependencies (if they also require the same package). -.P -It will also install missing packages. -.P -If the \fB-g\fR flag is specified, this command will update globally installed packages. -.P -If no package name is specified, all packages in the specified location (global or local) will be updated. -.P -Note that by default \fBnpm update\fR will not update the semver values of direct dependencies in your project \fBpackage.json\fR, if you want to also update values in \fBpackage.json\fR you can run: \fBnpm update --save\fR (or add the \fBsave=true\fR option to a npm help "configuration file" to make that the default behavior). -.SS "Example" -.P -For the examples below, assume that the current package is \fBapp\fR and it depends on dependencies, \fBdep1\fR (\fBdep2\fR, .. etc.). The published versions of \fBdep1\fR are: -.P -.RS 2 -.nf -{ - "dist-tags": { "latest": "1.2.2" }, - "versions": \[lB] - "1.2.2", - "1.2.1", - "1.2.0", - "1.1.2", - "1.1.1", - "1.0.0", - "0.4.1", - "0.4.0", - "0.2.0" - \[rB] -} -.fi -.RE -.SS "Caret Dependencies" -.P -If \fBapp\fR's \fBpackage.json\fR contains: -.P -.RS 2 -.nf -"dependencies": { - "dep1": "^1.1.1" -} -.fi -.RE -.P -Then \fBnpm update\fR will install \fBdep1@1.2.2\fR, because \fB1.2.2\fR is \fBlatest\fR and \fB1.2.2\fR satisfies \fB^1.1.1\fR. -.SS "Tilde Dependencies" -.P -However, if \fBapp\fR's \fBpackage.json\fR contains: -.P -.RS 2 -.nf -"dependencies": { - "dep1": "~1.1.1" -} -.fi -.RE -.P -In this case, running \fBnpm update\fR will install \fBdep1@1.1.2\fR. Even though the \fBlatest\fR tag points to \fB1.2.2\fR, this version do not satisfy \fB~1.1.1\fR, which is equivalent to \fB>=1.1.1 <1.2.0\fR. So the highest-sorting version that satisfies \fB~1.1.1\fR is used, which is \fB1.1.2\fR. -.SS "Caret Dependencies below 1.0.0" -.P -Suppose \fBapp\fR has a caret dependency on a version below \fB1.0.0\fR, for example: -.P -.RS 2 -.nf -"dependencies": { - "dep1": "^0.2.0" -} -.fi -.RE -.P -\fBnpm update\fR will install \fBdep1@0.2.0\fR, because there are no other versions which satisfy \fB^0.2.0\fR. -.P -If the dependence were on \fB^0.4.0\fR: -.P -.RS 2 -.nf -"dependencies": { - "dep1": "^0.4.0" -} -.fi -.RE -.P -Then \fBnpm update\fR will install \fBdep1@0.4.1\fR, because that is the highest-sorting version that satisfies \fB^0.4.0\fR (\fB>= 0.4.0 <0.5.0\fR) -.SS "Subdependencies" -.P -Suppose your app now also has a dependency on \fBdep2\fR -.P -.RS 2 -.nf -{ - "name": "my-app", - "dependencies": { - "dep1": "^1.0.0", - "dep2": "1.0.0" - } -} -.fi -.RE -.P -and \fBdep2\fR itself depends on this limited range of \fBdep1\fR -.P -.RS 2 -.nf -{ -"name": "dep2", - "dependencies": { - "dep1": "~1.1.1" - } -} -.fi -.RE -.P -Then \fBnpm update\fR will install \fBdep1@1.1.2\fR because that is the highest version that \fBdep2\fR allows. npm will prioritize having a single version of \fBdep1\fR in your tree rather than two when that single version can satisfy the semver requirements of multiple dependencies in your tree. In this case if you really did need your package to use a newer version you would need to use \fBnpm install\fR. -.SS "Updating Globally-Installed Packages" -.P -\fBnpm update -g\fR will apply the \fBupdate\fR action to each globally installed package that is \fBoutdated\fR -- that is, has a version that is different from \fBwanted\fR. -.P -Note: Globally installed packages are treated as if they are installed with a caret semver range specified. So if you require to update to \fBlatest\fR you may need to run \fBnpm install -g \[lB]...\[rB]\fR -.P -NOTE: If a package has been upgraded to a version newer than \fBlatest\fR, it will be \fIdowngraded\fR. -.SS "Configuration" -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help outdated -.IP \(bu 4 -npm help shrinkwrap -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help ls -.RE 0 diff --git a/node_modules/npm/man/man1/npm-version.1 b/node_modules/npm/man/man1/npm-version.1 deleted file mode 100644 index fe58fd2..0000000 --- a/node_modules/npm/man/man1/npm-version.1 +++ /dev/null @@ -1,229 +0,0 @@ -.TH "NPM-VERSION" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-version\fR - Bump a package version -.SS "Synopsis" -.P -.RS 2 -.nf -npm version \[lB] | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git\[rB] - -alias: verison -.fi -.RE -.SS "Configuration" -.SS "\fBallow-same-version\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prevents throwing an error when \fBnpm version\fR is used to set the new version to the same value as the current version. -.SS "\fBcommit-hooks\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run git commit hooks when using the \fBnpm version\fR command. -.SS "\fBgit-tag-version\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tag the commit when using the \fBnpm version\fR command. Setting this to false results in no commit being made at all. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBpreid\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the \fBrc\fR in \fB1.2.0-rc.8\fR. -.SS "\fBsign-git-tag\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, then the \fBnpm version\fR command will tag the version using \fB-s\fR to add a signature. -.P -Note that git requires you to have set up GPG keys in your git configs for this to work properly. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces-update\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the npm cli will run an update after operations that may possibly change the workspaces installed to the \fBnode_modules\fR folder. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "Description" -.P -Run this in a package directory to bump the version and write the new data back to \fBpackage.json\fR, \fBpackage-lock.json\fR, and, if present, \fBnpm-shrinkwrap.json\fR. -.P -The \fBnewversion\fR argument should be a valid semver string, a valid second argument to \fBsemver.inc\fR \fI\(lahttps://github.com/npm/node-semver#functions\(ra\fR (one of \fBpatch\fR, \fBminor\fR, \fBmajor\fR, \fBprepatch\fR, \fBpreminor\fR, \fBpremajor\fR, \fBprerelease\fR), or \fBfrom-git\fR. In the second case, the existing version will be incremented by 1 in the specified field. \fBfrom-git\fR will try to read the latest git tag, and use that as the new npm version. -.P -If run in a git repo, it will also create a version commit and tag. This behavior is controlled by \fBgit-tag-version\fR (see below), and can be disabled on the command line by running \fBnpm --no-git-tag-version version\fR. It will fail if the working directory is not clean, unless the \fB-f\fR or \fB--force\fR flag is set. -.P -If supplied with \fB-m\fR or \fB\fB--message\fR config\fR \fI\(la/using-npm/config#message\(ra\fR option, npm will use it as a commit message when creating a version commit. If the \fBmessage\fR config contains \fB%s\fR then that will be replaced with the resulting version number. For example: -.P -.RS 2 -.nf -npm version patch -m "Upgrade to %s for reasons" -.fi -.RE -.P -If the \fB\fBsign-git-tag\fR config\fR \fI\(la/using-npm/config#sign-git-tag\(ra\fR is set, then the tag will be signed using the \fB-s\fR flag to git. Note that you must have a default GPG key set up in your git config for this to work properly. For example: -.P -.RS 2 -.nf -$ npm config set sign-git-tag true -$ npm version patch - -You need a passphrase to unlock the secret key for -user: "isaacs (http://blog.izs.me/) " -2048-bit RSA key, ID 6C481CF6, created 2010-08-31 - -Enter passphrase: -.fi -.RE -.P -If \fBpreversion\fR, \fBversion\fR, or \fBpostversion\fR are in the \fBscripts\fR property of the package.json, they will be executed as part of running \fBnpm -version\fR. -.P -The exact order of execution is as follows: -.RS 0 -.IP 1. 4 -Check to make sure the git working directory is clean before we get started. Your scripts may add files to the commit in future steps. This step is skipped if the \fB--force\fR flag is set. -.IP 2. 4 -Run the \fBpreversion\fR script. These scripts have access to the old \fBversion\fR in package.json. A typical use would be running your full test suite before deploying. Any files you want added to the commit should be explicitly added using \fBgit add\fR. -.IP 3. 4 -Bump \fBversion\fR in \fBpackage.json\fR as requested (\fBpatch\fR, \fBminor\fR, \fBmajor\fR, etc). -.IP 4. 4 -Run the \fBversion\fR script. These scripts have access to the new \fBversion\fR in package.json (so they can incorporate it into file headers in generated files for example). Again, scripts should explicitly add generated files to the commit using \fBgit add\fR. -.IP 5. 4 -Commit and tag. -.IP 6. 4 -Run the \fBpostversion\fR script. Use it to clean up the file system or automatically push the commit and/or tag. -.RE 0 - -.P -Take the following example: -.P -.RS 2 -.nf -{ - "scripts": { - "preversion": "npm test", - "version": "npm run build && git add -A dist", - "postversion": "git push && git push --tags && rm -rf build/temp" - } -} -.fi -.RE -.P -This runs all your tests and proceeds only if they pass. Then runs your \fBbuild\fR script, and adds everything in the \fBdist\fR directory to the commit. After the commit, it pushes the new commit and tag up to the server, and deletes the \fBbuild/temp\fR directory. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help init -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/man/man1/npm-view.1 b/node_modules/npm/man/man1/npm-view.1 deleted file mode 100644 index 03add86..0000000 --- a/node_modules/npm/man/man1/npm-view.1 +++ /dev/null @@ -1,213 +0,0 @@ -.TH "NPM-VIEW" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-view\fR - View registry info -.SS "Synopsis" -.P -.RS 2 -.nf -npm view \[lB]\[rB] \[lB]\[lB].subfield\[rB]...\[rB] - -aliases: info, show, v -.fi -.RE -.SS "Description" -.P -This command shows data about a package and prints it to stdout. -.P -As an example, to view information about the \fBconnect\fR package from the registry, you would run: -.P -.RS 2 -.nf -npm view connect -.fi -.RE -.P -The default version is \fB"latest"\fR if unspecified. -.P -Field names can be specified after the package descriptor. For example, to show the dependencies of the \fBronn\fR package at version \fB0.3.5\fR, you could do the following: -.P -.RS 2 -.nf -npm view ronn@0.3.5 dependencies -.fi -.RE -.P -By default, \fBnpm view\fR shows data about the current project context (by looking for a \fBpackage.json\fR). To show field data for the current project use a file path (i.e. \fB.\fR): -.P -.RS 2 -.nf -npm view . dependencies -.fi -.RE -.P -You can view child fields by separating them with a period. To view the git repository URL for the latest version of \fBnpm\fR, you would run the following command: -.P -.RS 2 -.nf -npm view npm repository.url -.fi -.RE -.P -This makes it easy to view information about a dependency with a bit of shell scripting. For example, to view all the data about the version of \fBopts\fR that \fBronn\fR depends on, you could write the following: -.P -.RS 2 -.nf -npm view opts@$(npm view ronn dependencies.opts) -.fi -.RE -.P -For fields that are arrays, requesting a non-numeric field will return all of the values from the objects in the list. For example, to get all the contributor email addresses for the \fBexpress\fR package, you would run: -.P -.RS 2 -.nf -npm view express contributors.email -.fi -.RE -.P -You may also use numeric indices in square braces to specifically select an item in an array field. To just get the email address of the first contributor in the list, you can run: -.P -.RS 2 -.nf -npm view express contributors\[lB]0\[rB].email -.fi -.RE -.P -If the field value you are querying for is a property of an object, you should run: -.P -.RS 2 -.nf -npm view express time'\[lB]4.8.0\[rB]' -.fi -.RE -.P -Multiple fields may be specified, and will be printed one after another. For example, to get all the contributor names and email addresses, you can do this: -.P -.RS 2 -.nf -npm view express contributors.name contributors.email -.fi -.RE -.P -"Person" fields are shown as a string if they would be shown as an object. So, for example, this will show the list of \fBnpm\fR contributors in the shortened string format. (See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for more on this.) -.P -.RS 2 -.nf -npm view npm contributors -.fi -.RE -.P -If a version range is provided, then data will be printed for every matching version of the package. This will show which version of \fBjsdom\fR was required by each matching version of \fByui3\fR: -.P -.RS 2 -.nf -npm view yui3@'>0.5.4' dependencies.jsdom -.fi -.RE -.P -To show the \fBconnect\fR package version history, you can do this: -.P -.RS 2 -.nf -npm view connect versions -.fi -.RE -.SS "Configuration" -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "Output" -.P -If only a single string field for a single version is output, then it will not be colorized or quoted, to enable piping the output to another command. If the field is an object, it will be output as a JavaScript object literal. -.P -If the \fB--json\fR flag is given, the outputted fields will be JSON. -.P -If the version range matches multiple versions then each printed value will be prefixed with the version it applies to. -.P -If multiple fields are requested, then each of them is prefixed with the field name. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help "package spec" -.IP \(bu 4 -npm help search -.IP \(bu 4 -npm help registry -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help docs -.RE 0 diff --git a/node_modules/npm/man/man1/npm-whoami.1 b/node_modules/npm/man/man1/npm-whoami.1 deleted file mode 100644 index c8fe402..0000000 --- a/node_modules/npm/man/man1/npm-whoami.1 +++ /dev/null @@ -1,39 +0,0 @@ -.TH "NPM-WHOAMI" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm-whoami\fR - Display npm username -.SS "Synopsis" -.P -.RS 2 -.nf -npm whoami -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Description" -.P -Display the npm username of the currently logged-in user. -.P -If logged into a registry that provides token-based authentication, then connect to the \fB/-/whoami\fR registry endpoint to find the username associated with the token, and print to standard output. -.P -If logged into a registry that uses Basic Auth, then simply print the \fBusername\fR portion of the authentication string. -.SS "Configuration" -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help adduser -.RE 0 diff --git a/node_modules/npm/man/man1/npm.1 b/node_modules/npm/man/man1/npm.1 deleted file mode 100644 index 58f3bee..0000000 --- a/node_modules/npm/man/man1/npm.1 +++ /dev/null @@ -1,131 +0,0 @@ -.TH "NPM" "1" "December 2023" "" "" -.SH "NAME" -\fBnpm\fR - javascript package manager -.SS "Synopsis" -.P -.RS 2 -.nf -npm -.fi -.RE -.P -Note: This command is unaware of workspaces. -.SS "Version" -.P -10.2.5 -.SS "Description" -.P -npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. -.P -It is extremely configurable to support a variety of use cases. Most commonly, you use it to publish, discover, install, and develop node programs. -.P -Run \fBnpm help\fR to get a list of available commands. -.SS "Important" -.P -npm comes preconfigured to use npm's public registry at https://registry.npmjs.org by default. Use of the npm public registry is subject to terms of use available at https://docs.npmjs.com/policies/terms. -.P -You can configure npm to use any compatible registry you like, and even run your own registry. Use of someone else's registry is governed by their terms of use. -.SS "Introduction" -.P -You probably got npm because you want to install stuff. -.P -The very first thing you will most likely want to run in any node program is \fBnpm install\fR to install its dependencies. -.P -You can also run \fBnpm install blerg\fR to install the latest version of "blerg". Check out npm help install for more info. It can do a lot of stuff. -.P -Use the \fBnpm search\fR command to show everything that's available in the public registry. Use \fBnpm ls\fR to show everything you've installed. -.SS "Dependencies" -.P -If a package lists a dependency using a git URL, npm will install that dependency using the \fB\fBgit\fR\fR \fI\(lahttps://github.com/git-guides/install-git\(ra\fR command and will generate an error if it is not installed. -.P -If one of the packages npm tries to install is a native node module and requires compiling of C++ Code, npm will use \fBnode-gyp\fR \fI\(lahttps://github.com/nodejs/node-gyp\(ra\fR for that task. For a Unix system, \fBnode-gyp\fR \fI\(lahttps://github.com/nodejs/node-gyp\(ra\fR needs Python, make and a buildchain like GCC. On Windows, Python and Microsoft Visual Studio C++ are needed. For more information visit \fBthe node-gyp repository\fR \fI\(lahttps://github.com/nodejs/node-gyp\(ra\fR and the \fBnode-gyp Wiki\fR \fI\(lahttps://github.com/nodejs/node-gyp/wiki\(ra\fR. -.SS "Directories" -.P -See npm help folders to learn about where npm puts stuff. -.P -In particular, npm has two modes of operation: -.RS 0 -.IP \(bu 4 -local mode: npm installs packages into the current project directory, which defaults to the current working directory. Packages install to \fB./node_modules\fR, and bins to \fB./node_modules/.bin\fR. -.IP \(bu 4 -global mode: npm installs packages into the install prefix at \fB$npm_config_prefix/lib/node_modules\fR and bins to \fB$npm_config_prefix/bin\fR. -.RE 0 - -.P -Local mode is the default. Use \fB-g\fR or \fB--global\fR on any command to run in global mode instead. -.SS "Developer Usage" -.P -If you're using npm to develop and publish your code, check out the following help topics: -.RS 0 -.IP \(bu 4 -json: Make a package.json file. See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR. -.IP \(bu 4 -link: Links your current working code into Node's path, so that you don't have to reinstall every time you make a change. Use npm help link to do this. -.IP \(bu 4 -install: It's a good idea to install things if you don't need the symbolic link. Especially, installing other peoples code from the registry is done via npm help install -.IP \(bu 4 -adduser: Create an account or log in. When you do this, npm will store credentials in the user config file. -.IP \(bu 4 -publish: Use the npm help publish command to upload your code to the registry. -.RE 0 - -.SS "Configuration" -.P -npm is extremely configurable. It reads its configuration options from 5 places. -.RS 0 -.IP \(bu 4 -Command line switches: Set a config with \fB--key val\fR. All keys take a value, even if they are booleans (the config parser doesn't know what the options are at the time of parsing). If you do not provide a value (\fB--key\fR) then the option is set to boolean \fBtrue\fR. -.IP \(bu 4 -Environment Variables: Set any config by prefixing the name in an environment variable with \fBnpm_config_\fR. For example, \fBexport npm_config_key=val\fR. -.IP \(bu 4 -User Configs: The file at \fB$HOME/.npmrc\fR is an ini-formatted list of configs. If present, it is parsed. If the \fBuserconfig\fR option is set in the cli or env, that file will be used instead. -.IP \(bu 4 -Global Configs: The file found at \fB./etc/npmrc\fR (relative to the global prefix will be parsed if it is found. See npm help prefix for more info on the global prefix. If the \fBglobalconfig\fR option is set in the cli, env, or user config, then that file is parsed instead. -.IP \(bu 4 -Defaults: npm's default configuration options are defined in \fBlib/utils/config/definitions.js\fR. These must not be changed. -.RE 0 - -.P -See npm help config for much much more information. -.SS "Contributions" -.P -Patches welcome! -.P -If you would like to help, but don't know what to work on, read the \fBcontributing guidelines\fR \fI\(lahttps://github.com/npm/cli/blob/latest/CONTRIBUTING.md\(ra\fR and check the issues list. -.SS "Bugs" -.P -When you find issues, please report them: \fI\(lahttps://github.com/npm/cli/issues\(ra\fR -.P -Please be sure to follow the template and bug reporting guidelines. -.SS "Feature Requests" -.P -Discuss new feature ideas on our discussion forum: -.RS 0 -.IP \(bu 4 -\fI\(lahttps://github.com/npm/feedback\(ra\fR -.RE 0 - -.P -Or suggest formal RFC proposals: -.RS 0 -.IP \(bu 4 -\fI\(lahttps://github.com/npm/rfcs\(ra\fR -.RE 0 - -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help help -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help prefix -.IP \(bu 4 -npm help publish -.RE 0 diff --git a/node_modules/npm/man/man1/npx.1 b/node_modules/npm/man/man1/npx.1 deleted file mode 100644 index 2ae0256..0000000 --- a/node_modules/npm/man/man1/npx.1 +++ /dev/null @@ -1,156 +0,0 @@ -.TH "NPX" "1" "December 2023" "" "" -.SH "NAME" -\fBnpx\fR - Run a command from a local or remote npm package -.SS "Synopsis" -.P -.RS 2 -.nf -npx -- \[lB]@\[rB] \[lB]args...\[rB] -npx --package=\[lB]@\[rB] -- \[lB]args...\[rB] -npx -c ' \[lB]args...\[rB]' -npx --package=foo -c ' \[lB]args...\[rB]' -.fi -.RE -.SS "Description" -.P -This command allows you to run an arbitrary command from an npm package (either one installed locally, or fetched remotely), in a similar context as running it via \fBnpm run\fR. -.P -Whatever packages are specified by the \fB--package\fR option will be provided in the \fBPATH\fR of the executed command, along with any locally installed package executables. The \fB--package\fR option may be specified multiple times, to execute the supplied command in an environment where all specified packages are available. -.P -If any requested packages are not present in the local project dependencies, then they are installed to a folder in the npm cache, which is added to the \fBPATH\fR environment variable in the executed process. A prompt is printed (which can be suppressed by providing either \fB--yes\fR or \fB--no\fR). -.P -Package names provided without a specifier will be matched with whatever version exists in the local project. Package names with a specifier will only be considered a match if they have the exact same name and version as the local dependency. -.P -If no \fB-c\fR or \fB--call\fR option is provided, then the positional arguments are used to generate the command string. If no \fB--package\fR options are provided, then npm will attempt to determine the executable name from the package specifier provided as the first positional argument according to the following heuristic: -.RS 0 -.IP \(bu 4 -If the package has a single entry in its \fBbin\fR field in \fBpackage.json\fR, or if all entries are aliases of the same command, then that command will be used. -.IP \(bu 4 -If the package has multiple \fBbin\fR entries, and one of them matches the unscoped portion of the \fBname\fR field, then that command will be used. -.IP \(bu 4 -If this does not result in exactly one option (either because there are no bin entries, or none of them match the \fBname\fR of the package), then \fBnpm exec\fR exits with an error. -.RE 0 - -.P -To run a binary \fIother than\fR the named binary, specify one or more \fB--package\fR options, which will prevent npm from inferring the package from the first command argument. -.SS "\fBnpx\fR vs \fBnpm exec\fR" -.P -When run via the \fBnpx\fR binary, all flags and options \fImust\fR be set prior to any positional arguments. When run via \fBnpm exec\fR, a double-hyphen \fB--\fR flag can be used to suppress npm's parsing of switches and options that should be sent to the executed command. -.P -For example: -.P -.RS 2 -.nf -$ npx foo@latest bar --package=@npmcli/foo -.fi -.RE -.P -In this case, npm will resolve the \fBfoo\fR package name, and run the following command: -.P -.RS 2 -.nf -$ foo bar --package=@npmcli/foo -.fi -.RE -.P -Since the \fB--package\fR option comes \fIafter\fR the positional arguments, it is treated as an argument to the executed command. -.P -In contrast, due to npm's argument parsing logic, running this command is different: -.P -.RS 2 -.nf -$ npm exec foo@latest bar --package=@npmcli/foo -.fi -.RE -.P -In this case, npm will parse the \fB--package\fR option first, resolving the \fB@npmcli/foo\fR package. Then, it will execute the following command in that context: -.P -.RS 2 -.nf -$ foo@latest bar -.fi -.RE -.P -The double-hyphen character is recommended to explicitly tell npm to stop parsing command line options and switches. The following command would thus be equivalent to the \fBnpx\fR command above: -.P -.RS 2 -.nf -$ npm exec -- foo@latest bar --package=@npmcli/foo -.fi -.RE -.SS "Examples" -.P -Run the version of \fBtap\fR in the local dependencies, with the provided arguments: -.P -.RS 2 -.nf -$ npm exec -- tap --bail test/foo.js -$ npx tap --bail test/foo.js -.fi -.RE -.P -Run a command \fIother than\fR the command whose name matches the package name by specifying a \fB--package\fR option: -.P -.RS 2 -.nf -$ npm exec --package=foo -- bar --bar-argument -# ~ or ~ -$ npx --package=foo bar --bar-argument -.fi -.RE -.P -Run an arbitrary shell script, in the context of the current project: -.P -.RS 2 -.nf -$ npm x -c 'eslint && say "hooray, lint passed"' -$ npx -c 'eslint && say "hooray, lint passed"' -.fi -.RE -.SS "Compatibility with Older npx Versions" -.P -The \fBnpx\fR binary was rewritten in npm v7.0.0, and the standalone \fBnpx\fR package deprecated at that time. \fBnpx\fR uses the \fBnpm exec\fR command instead of a separate argument parser and install process, with some affordances to maintain backwards compatibility with the arguments it accepted in previous versions. -.P -This resulted in some shifts in its functionality: -.RS 0 -.IP \(bu 4 -Any \fBnpm\fR config value may be provided. -.IP \(bu 4 -To prevent security and user-experience problems from mistyping package names, \fBnpx\fR prompts before installing anything. Suppress this prompt with the \fB-y\fR or \fB--yes\fR option. -.IP \(bu 4 -The \fB--no-install\fR option is deprecated, and will be converted to \fB--no\fR. -.IP \(bu 4 -Shell fallback functionality is removed, as it is not advisable. -.IP \(bu 4 -The \fB-p\fR argument is a shorthand for \fB--parseable\fR in npm, but shorthand for \fB--package\fR in npx. This is maintained, but only for the \fBnpx\fR executable. -.IP \(bu 4 -The \fB--ignore-existing\fR option is removed. Locally installed bins are always present in the executed process \fBPATH\fR. -.IP \(bu 4 -The \fB--npm\fR option is removed. \fBnpx\fR will always use the \fBnpm\fR it ships with. -.IP \(bu 4 -The \fB--node-arg\fR and \fB-n\fR options are removed. -.IP \(bu 4 -The \fB--always-spawn\fR option is redundant, and thus removed. -.IP \(bu 4 -The \fB--shell\fR option is replaced with \fB--script-shell\fR, but maintained in the \fBnpx\fR executable for backwards compatibility. -.RE 0 - -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help test -.IP \(bu 4 -npm help start -.IP \(bu 4 -npm help restart -.IP \(bu 4 -npm help stop -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help exec -.RE 0 diff --git a/node_modules/npm/man/man5/folders.5 b/node_modules/npm/man/man5/folders.5 deleted file mode 100644 index de05b47..0000000 --- a/node_modules/npm/man/man5/folders.5 +++ /dev/null @@ -1,152 +0,0 @@ -.TH "FOLDERS" "5" "December 2023" "" "" -.SH "NAME" -\fBfolders\fR - Folder Structures Used by npm -.SS "Description" -.P -npm puts various things on your computer. That's its job. -.P -This document will tell you what it puts where. -.SS "tl;dr" -.RS 0 -.IP \(bu 4 -Local install (default): puts stuff in \fB./node_modules\fR of the current package root. -.IP \(bu 4 -Global install (with \fB-g\fR): puts stuff in /usr/local or wherever node is installed. -.IP \(bu 4 -Install it \fBlocally\fR if you're going to \fBrequire()\fR it. -.IP \(bu 4 -Install it \fBglobally\fR if you're going to run it on the command line. -.IP \(bu 4 -If you need both, then install it in both places, or use \fBnpm link\fR. -.RE 0 - -.SS "prefix Configuration" -.P -The \fB\fBprefix\fR config\fR \fI\(la/using-npm/config#prefix\(ra\fR defaults to the location where node is installed. On most systems, this is \fB/usr/local\fR. On Windows, it's \fB%AppData%\[rs]npm\fR. On Unix systems, it's one level up, since node is typically installed at \fB{prefix}/bin/node\fR rather than \fB{prefix}/node.exe\fR. -.P -When the \fBglobal\fR flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already. -.SS "Node Modules" -.P -Packages are dropped into the \fBnode_modules\fR folder under the \fBprefix\fR. When installing locally, this means that you can \fBrequire("packagename")\fR to load its main module, or \fBrequire("packagename/lib/path/to/sub/module")\fR to load other modules. -.P -Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fR. Global installs on Windows go to \fB{prefix}/node_modules\fR (that is, no \fBlib\fR folder.) -.P -Scoped packages are installed the same way, except they are grouped together in a sub-folder of the relevant \fBnode_modules\fR folder with the name of that scope prefix by the @ symbol, e.g. \fBnpm install @myorg/package\fR would place the package in \fB{prefix}/node_modules/@myorg/package\fR. See npm help scope for more details. -.P -If you wish to \fBrequire()\fR a package, then install it locally. -.SS "Executables" -.P -When in global mode, executables are linked into \fB{prefix}/bin\fR on Unix, or directly into \fB{prefix}\fR on Windows. Ensure that path is in your terminal's \fBPATH\fR environment to run them. -.P -When in local mode, executables are linked into \fB./node_modules/.bin\fR so that they can be made available to scripts run through npm. (For example, so that a test runner will be in the path when you run \fBnpm test\fR.) -.SS "Man Pages" -.P -When in global mode, man pages are linked into \fB{prefix}/share/man\fR. -.P -When in local mode, man pages are not installed. -.P -Man pages are not installed on Windows systems. -.SS "Cache" -.P -See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%LocalAppData%/npm-cache\fR on Windows. -.P -This is controlled by the \fB\fBcache\fR config\fR \fI\(la/using-npm/config#cache\(ra\fR param. -.SS "Temp Files" -.P -Temporary files are stored by default in the folder specified by the \fB\fBtmp\fR config\fR \fI\(la/using-npm/config#tmp\(ra\fR, which defaults to the TMPDIR, TMP, or TEMP environment variables, or \fB/tmp\fR on Unix and \fBc:\[rs]windows\[rs]temp\fR on Windows. -.P -Temp files are given a unique folder under this root for each run of the program, and are deleted upon successful exit. -.SS "More Information" -.P -When installing locally, npm first tries to find an appropriate \fBprefix\fR folder. This is so that \fBnpm install foo@1.2.3\fR will install to the sensible root of your package, even if you happen to have \fBcd\fRed into some other folder. -.P -Starting at the $PWD, npm will walk up the folder tree checking for a folder that contains either a \fBpackage.json\fR file, or a \fBnode_modules\fR folder. If such a thing is found, then that is treated as the effective "current directory" for the purpose of running npm commands. (This behavior is inspired by and similar to git's .git-folder seeking logic when running git commands in a working dir.) -.P -If no package root is found, then the current folder is used. -.P -When you run \fBnpm install foo@1.2.3\fR, then the package is loaded into the cache, and then unpacked into \fB./node_modules/foo\fR. Then, any of foo's dependencies are similarly unpacked into \fB./node_modules/foo/node_modules/...\fR. -.P -Any bin files are symlinked to \fB./node_modules/.bin/\fR, so that they may be found by npm scripts when necessary. -.SS "Global Installation" -.P -If the \fB\fBglobal\fR config\fR \fI\(la/using-npm/config#global\(ra\fR is set to true, then npm will install packages "globally". -.P -For global installation, packages are installed roughly the same way, but using the folders described above. -.SS "Cycles, Conflicts, and Folder Parsimony" -.P -Cycles are handled using the property of node's module system that it walks up the directories looking for \fBnode_modules\fR folders. So, at every stage, if a package is already installed in an ancestor \fBnode_modules\fR folder, then it is not installed at the current location. -.P -Consider the case above, where \fBfoo -> bar -> baz\fR. Imagine if, in addition to that, baz depended on bar, so you'd have: \fBfoo -> bar -> baz -> bar -> baz ...\fR. However, since the folder structure is: \fBfoo/node_modules/bar/node_modules/baz\fR, there's no need to put another copy of bar into \fB.../baz/node_modules\fR, since when baz calls \fBrequire("bar")\fR, it will get the copy that is installed in \fBfoo/node_modules/bar\fR. -.P -This shortcut is only used if the exact same version would be installed in multiple nested \fBnode_modules\fR folders. It is still possible to have \fBa/node_modules/b/node_modules/a\fR if the two "a" packages are different versions. However, without repeating the exact same package multiple times, an infinite regress will always be prevented. -.P -Another optimization can be made by installing dependencies at the highest level possible, below the localized "target" folder (hoisting). Since version 3, npm hoists dependencies by default. -.SS "Example" -.P -Consider this dependency graph: -.P -.RS 2 -.nf -foo -+-- blerg@1.2.5 -+-- bar@1.2.3 -| +-- blerg@1.x (latest=1.3.7) -| +-- baz@2.x -| | `-- quux@3.x -| | `-- bar@1.2.3 (cycle) -| `-- asdf@* -`-- baz@1.2.3 - `-- quux@3.x - `-- bar -.fi -.RE -.P -In this case, we might expect a folder structure like this (with all dependencies hoisted to the highest level possible): -.P -.RS 2 -.nf -foo -+-- node_modules - +-- blerg (1.2.5) <---\[lB]A\[rB] - +-- bar (1.2.3) <---\[lB]B\[rB] - | +-- node_modules - | +-- baz (2.0.2) <---\[lB]C\[rB] - +-- asdf (2.3.4) - +-- baz (1.2.3) <---\[lB]D\[rB] - +-- quux (3.2.0) <---\[lB]E\[rB] -.fi -.RE -.P -Since foo depends directly on \fBbar@1.2.3\fR and \fBbaz@1.2.3\fR, those are installed in foo's \fBnode_modules\fR folder. -.P -Even though the latest copy of blerg is 1.3.7, foo has a specific dependency on version 1.2.5. So, that gets installed at \[lB]A\[rB]. Since the parent installation of blerg satisfies bar's dependency on \fBblerg@1.x\fR, it does not install another copy under \[lB]B\[rB]. -.P -Bar \[lB]B\[rB] also has dependencies on baz and asdf. Because it depends on \fBbaz@2.x\fR, it cannot re-use the \fBbaz@1.2.3\fR installed in the parent \fBnode_modules\fR folder \[lB]D\[rB], and must install its own copy \[lB]C\[rB]. In order to minimize duplication, npm hoists dependencies to the top level by default, so asdf is installed under \[lB]A\[rB]. -.P -Underneath bar, the \fBbaz -> quux -> bar\fR dependency creates a cycle. However, because bar is already in quux's ancestry \[lB]B\[rB], it does not unpack another copy of bar into that folder. Likewise, quux's \[lB]E\[rB] folder tree is empty, because its dependency on bar is satisfied by the parent folder copy installed at \[lB]B\[rB]. -.P -For a graphical breakdown of what is installed where, use \fBnpm ls\fR. -.SS "Publishing" -.P -Upon publishing, npm will look in the \fBnode_modules\fR folder. If any of the items there are not in the \fBbundleDependencies\fR array, then they will not be included in the package tarball. -.P -This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that cannot be found elsewhere. See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for more information. -.SS "See also" -.RS 0 -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help pack -.IP \(bu 4 -npm help cache -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help publish -.RE 0 diff --git a/node_modules/npm/man/man5/install.5 b/node_modules/npm/man/man5/install.5 deleted file mode 100644 index 435b03f..0000000 --- a/node_modules/npm/man/man5/install.5 +++ /dev/null @@ -1,57 +0,0 @@ -.TH "INSTALL" "5" "December 2023" "" "" -.SH "NAME" -\fBinstall\fR - Download and install node and npm -.SS "Description" -.P -To publish and install packages to and from the public npm registry, you must install Node.js and the npm command line interface using either a Node version manager or a Node installer. \fBWe strongly recommend using a Node version manager to install Node.js and npm.\fR We do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally. -.SS "Overview" -.RS 0 -.IP \(bu 4 -\fBChecking your version of npm and Node.js\fR \fI(Checking your version of npm and Node.js)\fR -.IP \(bu 4 -\fBUsing a Node version manager to install Node.js and npm\fR \fI(Using a Node version manager to install Node.js and npm)\fR -.IP \(bu 4 -\fBUsing a Node installer to install Node.js and npm\fR \fI(Using a Node installer to install Node.js and npm)\fR -.RE 0 - -.SS "Checking your version of npm and Node.js" -.P -To see if you already have Node.js and npm installed and check the installed version, run the following commands: -.P -.RS 2 -.nf -node -v -npm -v -.fi -.RE -.SS "Using a Node version manager to install Node.js and npm" -.P -Node version managers allow you to install and switch between multiple versions of Node.js and npm on your system so you can test your applications on multiple versions of npm to ensure they work for users on different versions. You can \fBsearch for them on GitHub\fR \fI\(lahttps://github.com/search?q=node+version+manager+archived%3Afalse&type=repositories&ref=advsearch\(ra\fR. -.SS "Using a Node installer to install Node.js and npm" -.P -If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system. -.RS 0 -.IP \(bu 4 -\fBNode.js installer\fR \fI\(lahttps://nodejs.org/en/download/\(ra\fR -.IP \(bu 4 -\fBNodeSource installer\fR \fI\(lahttps://github.com/nodesource/distributions\(ra\fR. If you use Linux, we recommend that you use a NodeSource installer. -.RE 0 - -.SS "OS X or Windows Node installers" -.P -If you're using OS X or Windows, use one of the installers from the \fBNode.js download page\fR \fI\(lahttps://nodejs.org/en/download/\(ra\fR. Be sure to install the version labeled \fBLTS\fR. Other versions have not yet been tested with npm. -.SS "Linux or other operating systems Node installers" -.P -If you're using Linux or another operating system, use one of the following installers: -.RS 0 -.IP \(bu 4 -\fBNodeSource installer\fR \fI\(lahttps://github.com/nodesource/distributions\(ra\fR (recommended) -.IP \(bu 4 -One of the installers on the \fBNode.js download page\fR \fI\(lahttps://nodejs.org/en/download/\(ra\fR -.RE 0 - -.P -Or see \fBthis page\fR \fI\(lahttps://nodejs.org/en/download/package-manager/\(ra\fR to install npm for Linux in the way many Linux developers prefer. -.SS "Less-common operating systems" -.P -For more information on installing Node.js on a variety of operating systems, see \fBthis page\fR \fI\(lahttps://nodejs.org/en/download/package-manager/\(ra\fR. diff --git a/node_modules/npm/man/man5/npm-global.5 b/node_modules/npm/man/man5/npm-global.5 deleted file mode 100644 index de05b47..0000000 --- a/node_modules/npm/man/man5/npm-global.5 +++ /dev/null @@ -1,152 +0,0 @@ -.TH "FOLDERS" "5" "December 2023" "" "" -.SH "NAME" -\fBfolders\fR - Folder Structures Used by npm -.SS "Description" -.P -npm puts various things on your computer. That's its job. -.P -This document will tell you what it puts where. -.SS "tl;dr" -.RS 0 -.IP \(bu 4 -Local install (default): puts stuff in \fB./node_modules\fR of the current package root. -.IP \(bu 4 -Global install (with \fB-g\fR): puts stuff in /usr/local or wherever node is installed. -.IP \(bu 4 -Install it \fBlocally\fR if you're going to \fBrequire()\fR it. -.IP \(bu 4 -Install it \fBglobally\fR if you're going to run it on the command line. -.IP \(bu 4 -If you need both, then install it in both places, or use \fBnpm link\fR. -.RE 0 - -.SS "prefix Configuration" -.P -The \fB\fBprefix\fR config\fR \fI\(la/using-npm/config#prefix\(ra\fR defaults to the location where node is installed. On most systems, this is \fB/usr/local\fR. On Windows, it's \fB%AppData%\[rs]npm\fR. On Unix systems, it's one level up, since node is typically installed at \fB{prefix}/bin/node\fR rather than \fB{prefix}/node.exe\fR. -.P -When the \fBglobal\fR flag is set, npm installs things into this prefix. When it is not set, it uses the root of the current package, or the current working directory if not in a package already. -.SS "Node Modules" -.P -Packages are dropped into the \fBnode_modules\fR folder under the \fBprefix\fR. When installing locally, this means that you can \fBrequire("packagename")\fR to load its main module, or \fBrequire("packagename/lib/path/to/sub/module")\fR to load other modules. -.P -Global installs on Unix systems go to \fB{prefix}/lib/node_modules\fR. Global installs on Windows go to \fB{prefix}/node_modules\fR (that is, no \fBlib\fR folder.) -.P -Scoped packages are installed the same way, except they are grouped together in a sub-folder of the relevant \fBnode_modules\fR folder with the name of that scope prefix by the @ symbol, e.g. \fBnpm install @myorg/package\fR would place the package in \fB{prefix}/node_modules/@myorg/package\fR. See npm help scope for more details. -.P -If you wish to \fBrequire()\fR a package, then install it locally. -.SS "Executables" -.P -When in global mode, executables are linked into \fB{prefix}/bin\fR on Unix, or directly into \fB{prefix}\fR on Windows. Ensure that path is in your terminal's \fBPATH\fR environment to run them. -.P -When in local mode, executables are linked into \fB./node_modules/.bin\fR so that they can be made available to scripts run through npm. (For example, so that a test runner will be in the path when you run \fBnpm test\fR.) -.SS "Man Pages" -.P -When in global mode, man pages are linked into \fB{prefix}/share/man\fR. -.P -When in local mode, man pages are not installed. -.P -Man pages are not installed on Windows systems. -.SS "Cache" -.P -See npm help cache. Cache files are stored in \fB~/.npm\fR on Posix, or \fB%LocalAppData%/npm-cache\fR on Windows. -.P -This is controlled by the \fB\fBcache\fR config\fR \fI\(la/using-npm/config#cache\(ra\fR param. -.SS "Temp Files" -.P -Temporary files are stored by default in the folder specified by the \fB\fBtmp\fR config\fR \fI\(la/using-npm/config#tmp\(ra\fR, which defaults to the TMPDIR, TMP, or TEMP environment variables, or \fB/tmp\fR on Unix and \fBc:\[rs]windows\[rs]temp\fR on Windows. -.P -Temp files are given a unique folder under this root for each run of the program, and are deleted upon successful exit. -.SS "More Information" -.P -When installing locally, npm first tries to find an appropriate \fBprefix\fR folder. This is so that \fBnpm install foo@1.2.3\fR will install to the sensible root of your package, even if you happen to have \fBcd\fRed into some other folder. -.P -Starting at the $PWD, npm will walk up the folder tree checking for a folder that contains either a \fBpackage.json\fR file, or a \fBnode_modules\fR folder. If such a thing is found, then that is treated as the effective "current directory" for the purpose of running npm commands. (This behavior is inspired by and similar to git's .git-folder seeking logic when running git commands in a working dir.) -.P -If no package root is found, then the current folder is used. -.P -When you run \fBnpm install foo@1.2.3\fR, then the package is loaded into the cache, and then unpacked into \fB./node_modules/foo\fR. Then, any of foo's dependencies are similarly unpacked into \fB./node_modules/foo/node_modules/...\fR. -.P -Any bin files are symlinked to \fB./node_modules/.bin/\fR, so that they may be found by npm scripts when necessary. -.SS "Global Installation" -.P -If the \fB\fBglobal\fR config\fR \fI\(la/using-npm/config#global\(ra\fR is set to true, then npm will install packages "globally". -.P -For global installation, packages are installed roughly the same way, but using the folders described above. -.SS "Cycles, Conflicts, and Folder Parsimony" -.P -Cycles are handled using the property of node's module system that it walks up the directories looking for \fBnode_modules\fR folders. So, at every stage, if a package is already installed in an ancestor \fBnode_modules\fR folder, then it is not installed at the current location. -.P -Consider the case above, where \fBfoo -> bar -> baz\fR. Imagine if, in addition to that, baz depended on bar, so you'd have: \fBfoo -> bar -> baz -> bar -> baz ...\fR. However, since the folder structure is: \fBfoo/node_modules/bar/node_modules/baz\fR, there's no need to put another copy of bar into \fB.../baz/node_modules\fR, since when baz calls \fBrequire("bar")\fR, it will get the copy that is installed in \fBfoo/node_modules/bar\fR. -.P -This shortcut is only used if the exact same version would be installed in multiple nested \fBnode_modules\fR folders. It is still possible to have \fBa/node_modules/b/node_modules/a\fR if the two "a" packages are different versions. However, without repeating the exact same package multiple times, an infinite regress will always be prevented. -.P -Another optimization can be made by installing dependencies at the highest level possible, below the localized "target" folder (hoisting). Since version 3, npm hoists dependencies by default. -.SS "Example" -.P -Consider this dependency graph: -.P -.RS 2 -.nf -foo -+-- blerg@1.2.5 -+-- bar@1.2.3 -| +-- blerg@1.x (latest=1.3.7) -| +-- baz@2.x -| | `-- quux@3.x -| | `-- bar@1.2.3 (cycle) -| `-- asdf@* -`-- baz@1.2.3 - `-- quux@3.x - `-- bar -.fi -.RE -.P -In this case, we might expect a folder structure like this (with all dependencies hoisted to the highest level possible): -.P -.RS 2 -.nf -foo -+-- node_modules - +-- blerg (1.2.5) <---\[lB]A\[rB] - +-- bar (1.2.3) <---\[lB]B\[rB] - | +-- node_modules - | +-- baz (2.0.2) <---\[lB]C\[rB] - +-- asdf (2.3.4) - +-- baz (1.2.3) <---\[lB]D\[rB] - +-- quux (3.2.0) <---\[lB]E\[rB] -.fi -.RE -.P -Since foo depends directly on \fBbar@1.2.3\fR and \fBbaz@1.2.3\fR, those are installed in foo's \fBnode_modules\fR folder. -.P -Even though the latest copy of blerg is 1.3.7, foo has a specific dependency on version 1.2.5. So, that gets installed at \[lB]A\[rB]. Since the parent installation of blerg satisfies bar's dependency on \fBblerg@1.x\fR, it does not install another copy under \[lB]B\[rB]. -.P -Bar \[lB]B\[rB] also has dependencies on baz and asdf. Because it depends on \fBbaz@2.x\fR, it cannot re-use the \fBbaz@1.2.3\fR installed in the parent \fBnode_modules\fR folder \[lB]D\[rB], and must install its own copy \[lB]C\[rB]. In order to minimize duplication, npm hoists dependencies to the top level by default, so asdf is installed under \[lB]A\[rB]. -.P -Underneath bar, the \fBbaz -> quux -> bar\fR dependency creates a cycle. However, because bar is already in quux's ancestry \[lB]B\[rB], it does not unpack another copy of bar into that folder. Likewise, quux's \[lB]E\[rB] folder tree is empty, because its dependency on bar is satisfied by the parent folder copy installed at \[lB]B\[rB]. -.P -For a graphical breakdown of what is installed where, use \fBnpm ls\fR. -.SS "Publishing" -.P -Upon publishing, npm will look in the \fBnode_modules\fR folder. If any of the items there are not in the \fBbundleDependencies\fR array, then they will not be included in the package tarball. -.P -This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re-publish those items that cannot be found elsewhere. See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for more information. -.SS "See also" -.RS 0 -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help pack -.IP \(bu 4 -npm help cache -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help publish -.RE 0 diff --git a/node_modules/npm/man/man5/npm-json.5 b/node_modules/npm/man/man5/npm-json.5 deleted file mode 100644 index b24ff64..0000000 --- a/node_modules/npm/man/man5/npm-json.5 +++ /dev/null @@ -1,1093 +0,0 @@ -.TH "PACKAGE.JSON" "5" "December 2023" "" "" -.SH "NAME" -\fBpackage.json\fR - Specifics of npm's package.json handling -.SS "Description" -.P -This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a JavaScript object literal. -.P -A lot of the behavior described in this document is affected by the config settings described in npm help config. -.SS "name" -.P -If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. -.P -The name is what your thing is called. -.P -Some rules: -.RS 0 -.IP \(bu 4 -The name must be less than or equal to 214 characters. This includes the scope for scoped packages. -.IP \(bu 4 -The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope. -.IP \(bu 4 -New packages must not have uppercase letters in the name. -.IP \(bu 4 -The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters. -.RE 0 - -.P -Some tips: -.RS 0 -.IP \(bu 4 -Don't use the same name as a core Node module. -.IP \(bu 4 -Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.) -.IP \(bu 4 -The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive. -.IP \(bu 4 -You may want to check the npm registry to see if there's something by that name already, before you get too attached to it. \fI\(lahttps://www.npmjs.com/\(ra\fR -.RE 0 - -.P -A name can be optionally prefixed by a scope, e.g. \fB@myorg/mypackage\fR. See npm help scope for more detail. -.SS "version" -.P -If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. -.P -Version must be parseable by \fBnode-semver\fR \fI\(lahttps://github.com/npm/node-semver\(ra\fR, which is bundled with npm as a dependency. (\fBnpm install semver\fR to use it yourself.) -.SS "description" -.P -Put a description in it. It's a string. This helps people discover your package, as it's listed in \fBnpm search\fR. -.SS "keywords" -.P -Put keywords in it. It's an array of strings. This helps people discover your package as it's listed in \fBnpm search\fR. -.SS "homepage" -.P -The url to the project homepage. -.P -Example: -.P -.RS 2 -.nf -"homepage": "https://github.com/owner/project#readme" -.fi -.RE -.SS "bugs" -.P -The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package. -.P -It should look like this: -.P -.RS 2 -.nf -{ - "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" - } -} -.fi -.RE -.P -You can specify either one or both values. If you want to provide only a url, you can specify the value for "bugs" as a simple string instead of an object. -.P -If a url is provided, it will be used by the \fBnpm bugs\fR command. -.SS "license" -.P -You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. -.P -If you're using a common license such as BSD-2-Clause or MIT, add a current SPDX license identifier for the license you're using, like this: -.P -.RS 2 -.nf -{ - "license" : "BSD-3-Clause" -} -.fi -.RE -.P -You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. -.P -If your package is licensed under multiple common licenses, use an \fBSPDX license expression syntax version 2.0 string\fR \fI\(lahttps://spdx.dev/specifications/\(ra\fR, like this: -.P -.RS 2 -.nf -{ - "license" : "(ISC OR GPL-3.0)" -} -.fi -.RE -.P -If you are using a license that hasn't been assigned an SPDX identifier, or if you are using a custom license, use a string value like this one: -.P -.RS 2 -.nf -{ - "license" : "SEE LICENSE IN " -} -.fi -.RE -.P -Then include a file named \fB\fR at the top level of the package. -.P -Some old packages used license objects or a "licenses" property containing an array of license objects: -.P -.RS 2 -.nf -// Not valid metadata -{ - "license" : { - "type" : "ISC", - "url" : "https://opensource.org/licenses/ISC" - } -} - -// Not valid metadata -{ - "licenses" : \[lB] - { - "type": "MIT", - "url": "https://www.opensource.org/licenses/mit-license.php" - }, - { - "type": "Apache-2.0", - "url": "https://opensource.org/licenses/apache2.0.php" - } - \[rB] -} -.fi -.RE -.P -Those styles are now deprecated. Instead, use SPDX expressions, like this: -.P -.RS 2 -.nf -{ - "license": "ISC" -} -.fi -.RE -.P -.RS 2 -.nf -{ - "license": "(MIT OR Apache-2.0)" -} -.fi -.RE -.P -Finally, if you do not wish to grant others the right to use a private or unpublished package under any terms: -.P -.RS 2 -.nf -{ - "license": "UNLICENSED" -} -.fi -.RE -.P -Consider also setting \fB"private": true\fR to prevent accidental publication. -.SS "people fields: author, contributors" -.P -The "author" is one person. "contributors" is an array of people. A "person" is an object with a "name" field and optionally "url" and "email", like this: -.P -.RS 2 -.nf -{ - "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" -} -.fi -.RE -.P -Or you can shorten that all into a single string, and npm will parse it for you: -.P -.RS 2 -.nf -{ - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" -} -.fi -.RE -.P -Both email and url are optional either way. -.P -npm also sets a top-level "maintainers" field with your npm user info. -.SS "funding" -.P -You can specify an object containing a URL that provides up-to-date information about ways to help fund development of your package, or a string URL, or an array of these: -.P -.RS 2 -.nf -{ - "funding": { - "type" : "individual", - "url" : "http://example.com/donate" - }, - - "funding": { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - }, - - "funding": "http://example.com/donate", - - "funding": \[lB] - { - "type" : "individual", - "url" : "http://example.com/donate" - }, - "http://example.com/donateAlso", - { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - } - \[rB] -} -.fi -.RE -.P -Users can use the \fBnpm fund\fR subcommand to list the \fBfunding\fR URLs of all dependencies of their project, direct and indirect. A shortcut to visit each funding url is also available when providing the project name such as: \fBnpm fund \fR (when there are multiple URLs, the first one will be visited) -.SS "files" -.P -The optional \fBfiles\fR field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to \fB.gitignore\fR, but reversed: including a file, directory, or glob pattern (\fB*\fR, \fB**/*\fR, and such) will make it so that file is included in the tarball when it's packed. Omitting the field will make it default to \fB\[lB]"*"\[rB]\fR, which means it will include all files. -.P -Some special files and directories are also included or excluded regardless of whether they exist in the \fBfiles\fR array (see below). -.P -You can also provide a \fB.npmignore\fR file in the root of your package or in subdirectories, which will keep files from being included. At the root of your package it will not override the "files" field, but in subdirectories it will. The \fB.npmignore\fR file works just like a \fB.gitignore\fR. If there is a \fB.gitignore\fR file, and \fB.npmignore\fR is missing, \fB.gitignore\fR's contents will be used instead. -.P -Certain files are always included, regardless of settings: -.RS 0 -.IP \(bu 4 -\fBpackage.json\fR -.IP \(bu 4 -\fBREADME\fR -.IP \(bu 4 -\fBLICENSE\fR / \fBLICENCE\fR -.IP \(bu 4 -The file in the "main" field -.IP \(bu 4 -The file(s) in the "bin" field -.RE 0 - -.P -\fBREADME\fR & \fBLICENSE\fR can have any case and extension. -.P -Some files are always ignored by default: -.RS 0 -.IP \(bu 4 -\fB*.orig\fR -.IP \(bu 4 -\fB.*.swp\fR -.IP \(bu 4 -\fB.DS_Store\fR -.IP \(bu 4 -\fB._*\fR -.IP \(bu 4 -\fB.git\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fB.hg\fR -.IP \(bu 4 -\fB.lock-wscript\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fB.svn\fR -.IP \(bu 4 -\fB.wafpickle-N\fR -.IP \(bu 4 -\fBCVS\fR -.IP \(bu 4 -\fBconfig.gypi\fR -.IP \(bu 4 -\fBnode_modules\fR -.IP \(bu 4 -\fBnpm-debug.log\fR -.IP \(bu 4 -\fBpackage-lock.json\fR (use \fB\fBnpm-shrinkwrap.json\fR\fR \fI\(la/configuring-npm/npm-shrinkwrap-json\(ra\fR if you wish it to be published) -.IP \(bu 4 -\fBpnpm-lock.yaml\fR -.IP \(bu 4 -\fByarn.lock\fR -.RE 0 - -.P -Most of these ignored files can be included specifically if included in the \fBfiles\fR globs. Exceptions to this are: -.RS 0 -.IP \(bu 4 -\fB.git\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fBnode_modules\fR -.IP \(bu 4 -\fBpackage-lock.json\fR -.IP \(bu 4 -\fBpnpm-lock.yaml\fR -.IP \(bu 4 -\fByarn.lock\fR -.RE 0 - -.P -These can not be included. -.SS "main" -.P -The main field is a module ID that is the primary entry point to your program. That is, if your package is named \fBfoo\fR, and a user installs it, and then does \fBrequire("foo")\fR, then your main module's exports object will be returned. -.P -This should be a module relative to the root of your package folder. -.P -For most modules, it makes the most sense to have a main script and often not much else. -.P -If \fBmain\fR is not set, it defaults to \fBindex.js\fR in the package's root folder. -.SS "browser" -.P -If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren't available in Node.js modules. (e.g. \fBwindow\fR) -.SS "bin" -.P -A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.) -.P -To use this, supply a \fBbin\fR field in your package.json which is a map of command name to local file name. When this package is installed globally, that file will be either linked inside the global bins directory or a cmd (Windows Command File) will be created which executes the specified file in the \fBbin\fR field, so it is available to run by \fBname\fR or \fBname.cmd\fR (on Windows PowerShell). When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by \fBnpm exec\fR or by name in other scripts when invoking them via \fBnpm run-script\fR. -.P -For example, myapp could have this: -.P -.RS 2 -.nf -{ - "bin": { - "myapp": "./cli.js" - } -} -.fi -.RE -.P -So, when you install myapp, in case of unix-like OS it'll create a symlink from the \fBcli.js\fR script to \fB/usr/local/bin/myapp\fR and in case of windows it will create a cmd file usually at \fBC:\[rs]Users\[rs]{Username}\[rs]AppData\[rs]Roaming\[rs]npm\[rs]myapp.cmd\fR which runs the \fBcli.js\fR script. -.P -If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example: -.P -.RS 2 -.nf -{ - "name": "my-program", - "version": "1.2.5", - "bin": "./path/to/program" -} -.fi -.RE -.P -would be the same as this: -.P -.RS 2 -.nf -{ - "name": "my-program", - "version": "1.2.5", - "bin": { - "my-program": "./path/to/program" - } -} -.fi -.RE -.P -Please make sure that your file(s) referenced in \fBbin\fR starts with \fB#!/usr/bin/env node\fR, otherwise the scripts are started without the node executable! -.P -Note that you can also set the executable files using \fBdirectories.bin\fR \fI(directories.bin)\fR. -.P -See \fBfolders\fR \fI\(la/configuring-npm/folders#executables\(ra\fR for more info on executables. -.SS "man" -.P -Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find. -.P -If only a single file is provided, then it's installed such that it is the result from \fBman \fR, regardless of its actual filename. For example: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": "./man/doc.1" -} -.fi -.RE -.P -would link the \fB./man/doc.1\fR file in such that it is the target for \fBman -foo\fR -.P -If the filename doesn't start with the package name, then it's prefixed. So, this: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": \[lB] - "./man/foo.1", - "./man/bar.1" - \[rB] -} -.fi -.RE -.P -will create files to do \fBman foo\fR and \fBman foo-bar\fR. -.P -Man files must end with a number, and optionally a \fB.gz\fR suffix if they are compressed. The number dictates which man section the file is installed into. -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": \[lB] - "./man/foo.1", - "./man/foo.2" - \[rB] -} -.fi -.RE -.P -will create entries for \fBman foo\fR and \fBman 2 foo\fR -.SS "directories" -.P -The CommonJS \fBPackages\fR \fI\(lahttp://wiki.commonjs.org/wiki/Packages/1.0\(ra\fR spec details a few ways that you can indicate the structure of your package using a \fBdirectories\fR object. If you look at \fBnpm's package.json\fR \fI\(lahttps://registry.npmjs.org/npm/latest\(ra\fR, you'll see that it has directories for doc, lib, and man. -.P -In the future, this information may be used in other creative ways. -.SS "directories.bin" -.P -If you specify a \fBbin\fR directory in \fBdirectories.bin\fR, all the files in that folder will be added. -.P -Because of the way the \fBbin\fR directive works, specifying both a \fBbin\fR path and setting \fBdirectories.bin\fR is an error. If you want to specify individual files, use \fBbin\fR, and for all the files in an existing \fBbin\fR directory, use \fBdirectories.bin\fR. -.SS "directories.man" -.P -A folder that is full of man pages. Sugar to generate a "man" array by walking the folder. -.SS "repository" -.P -Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the \fBnpm docs\fR command will be able to find you. -.P -Do it like this: -.P -.RS 2 -.nf -{ - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git" - } -} -.fi -.RE -.P -The URL should be a publicly available (perhaps read-only) url that can be handed directly to a VCS program without any modification. It should not be a url to an html project page that you put in your browser. It's for computers. -.P -For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for \fBnpm install\fR: -.P -.RS 2 -.nf -{ - "repository": "npm/npm", - - "repository": "github:user/repo", - - "repository": "gist:11081aaa281", - - "repository": "bitbucket:user/repo", - - "repository": "gitlab:user/repo" -} -.fi -.RE -.P -If the \fBpackage.json\fR for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives: -.P -.RS 2 -.nf -{ - "repository": { - "type": "git", - "url": "https://github.com/facebook/react.git", - "directory": "packages/react-dom" - } -} -.fi -.RE -.SS "scripts" -.P -The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. -.P -See npm help scripts to find out more about writing package scripts. -.SS "config" -.P -A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the following: -.P -.RS 2 -.nf -{ - "name": "foo", - "config": { - "port": "8080" - } -} -.fi -.RE -.P -It could also have a "start" command that referenced the \fBnpm_package_config_port\fR environment variable. -.SS "dependencies" -.P -Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL. -.P -\fBPlease do not put test harnesses or transpilers or other "development" time tools in your \fBdependencies\fB object.\fR See \fBdevDependencies\fR, below. -.P -See \fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR for more details about specifying version ranges. -.RS 0 -.IP \(bu 4 -\fBversion\fR Must match \fBversion\fR exactly -.IP \(bu 4 -\fB>version\fR Must be greater than \fBversion\fR -.IP \(bu 4 -\fB>=version\fR etc -.IP \(bu 4 -\fB=version1 <=version2\fR. -.IP \(bu 4 -\fBrange1 || range2\fR Passes if either range1 or range2 are satisfied. -.IP \(bu 4 -\fBgit...\fR See 'Git URLs as Dependencies' below -.IP \(bu 4 -\fBuser/repo\fR See 'GitHub URLs' below -.IP \(bu 4 -\fBtag\fR A specific version tagged and published as \fBtag\fR See npm help dist-tag -.IP \(bu 4 -\fBpath/path/path\fR See \fBLocal Paths\fR \fI(Local Paths)\fR below -.RE 0 - -.P -For example, these are all valid: -.P -.RS 2 -.nf -{ - "dependencies": { - "foo": "1.0.0 - 2.9999.9999", - "bar": ">=1.0.2 <2.1.2", - "baz": ">1.0.2 <=2.3.4", - "boo": "2.0.1", - "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", - "til": "~1.2", - "elf": "~1.2.3", - "two": "2.x", - "thr": "3.3.x", - "lat": "latest", - "dyl": "file:../dyl" - } -} -.fi -.RE -.SS "URLs as Dependencies" -.P -You may specify a tarball URL in place of a version range. -.P -This tarball will be downloaded and installed locally to your package at install time. -.SS "Git URLs as Dependencies" -.P -Git urls are of the form: -.P -.RS 2 -.nf -://\[lB]\[lB]:\[rB]@\[rB]\[lB]:\[rB]\[lB]:\[rB]\[lB]/\[rB]\[lB]# | #semver:\[rB] -.fi -.RE -.P -\fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, \fBgit+https\fR, or \fBgit+file\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then the default branch is used. -.P -Examples: -.P -.RS 2 -.nf -git+ssh://git@github.com:npm/cli.git#v1.0.27 -git+ssh://git@github.com:npm/cli#semver:^5.0 -git+https://isaacs@github.com/npm/cli.git -git://github.com/npm/cli.git#v1.0.27 -.fi -.RE -.P -When installing from a \fBgit\fR repository, the presence of certain fields in the \fBpackage.json\fR will cause npm to believe it needs to perform a build. To do so your repository will be cloned into a temporary directory, all of its deps installed, relevant scripts run, and the resulting directory packed and installed. -.P -This flow will occur if your git dependency uses \fBworkspaces\fR, or if any of the following scripts are present: -.RS 0 -.IP \(bu 4 -\fBbuild\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBprepack\fR -.IP \(bu 4 -\fBpreinstall\fR -.IP \(bu 4 -\fBinstall\fR -.IP \(bu 4 -\fBpostinstall\fR -.RE 0 - -.P -If your git repository includes pre-built artifacts, you will likely want to make sure that none of the above scripts are defined, or your dependency will be rebuilt for every installation. -.SS "GitHub URLs" -.P -As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a \fBcommit-ish\fR suffix can be included. For example: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "0.0.0", - "dependencies": { - "express": "expressjs/express", - "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\[rs]/branch" - } -} -.fi -.RE -.SS "Local Paths" -.P -As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using \fBnpm install -S\fR or \fBnpm -install --save\fR, using any of these forms: -.P -.RS 2 -.nf -../foo/bar -~/foo/bar -./foo/bar -/foo/bar -.fi -.RE -.P -in which case they will be normalized to a relative path and added to your \fBpackage.json\fR. For example: -.P -.RS 2 -.nf -{ - "name": "baz", - "dependencies": { - "bar": "file:../foo/bar" - } -} -.fi -.RE -.P -This feature is helpful for local offline development and creating tests that require npm installing where you don't want to hit an external server, but should not be used when publishing packages to the public registry. -.P -\fInote\fR: Packages linked by local path will not have their own dependencies installed when \fBnpm install\fR is ran in this case. You must run \fBnpm install\fR from inside the local path itself. -.SS "devDependencies" -.P -If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use. -.P -In this case, it's best to map these additional items in a \fBdevDependencies\fR object. -.P -These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR from the root of a package, and can be managed like any other npm configuration param. See npm help config for more on the topic. -.P -For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the \fBprepare\fR script to do this, and make the required package a devDependency. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "ethopia-waza", - "description": "a delightfully fruity coffee varietal", - "version": "1.2.3", - "devDependencies": { - "coffee-script": "~1.6.3" - }, - "scripts": { - "prepare": "coffee -o lib/ -c src/waza.coffee" - }, - "main": "lib/waza.js" -} -.fi -.RE -.P -The \fBprepare\fR script will be run before publishing, so that users can consume the functionality without requiring them to compile it themselves. In dev mode (ie, locally running \fBnpm install\fR), it'll run this script as well, so that you can test it easily. -.SS "peerDependencies" -.P -In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a \fBrequire\fR of this host. This is usually referred to as a \fIplugin\fR. Notably, your module may be exposing a specific interface, expected and specified by the host documentation. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x" - } -} -.fi -.RE -.P -This ensures your package \fBtea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fBtea\fR only. \fBnpm install -tea-latte\fR could possibly yield the following dependency graph: -.P -.RS 2 -.nf -├── tea-latte@1.3.5 -└── tea@2.2.0 -.fi -.RE -.P -In npm versions 3 through 6, \fBpeerDependencies\fR were not automatically installed, and would raise a warning if an invalid version of the peer dependency was found in the tree. As of npm v7, peerDependencies \fIare\fR installed by default. -.P -Trying to install another plugin with a conflicting requirement may cause an error if the tree cannot be resolved correctly. For this reason, make sure your plugin requirement is as broad as possible, and not to lock it down to specific patch versions. -.P -Assuming the host complies with \fBsemver\fR \fI\(lahttps://semver.org/\(ra\fR, only changes in the host package's major version will break your plugin. Thus, if you've worked with every 1.x version of the host package, use \fB"^1.0"\fR or \fB"1.x"\fR to express this. If you depend on features introduced in 1.5.2, use \fB"^1.5.2"\fR. -.SS "peerDependenciesMeta" -.P -When a user installs your package, npm will emit warnings if packages specified in \fBpeerDependencies\fR are not already installed. The \fBpeerDependenciesMeta\fR field serves to provide npm more information on how your peer dependencies are to be used. Specifically, it allows peer dependencies to be marked as optional. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" - }, - "peerDependenciesMeta": { - "soy-milk": { - "optional": true - } - } -} -.fi -.RE -.P -Marking a peer dependency as optional ensures npm will not emit a warning if the \fBsoy-milk\fR package is not installed on the host. This allows you to integrate and interact with a variety of host packages without requiring all of them to be installed. -.SS "bundleDependencies" -.P -This defines an array of package names that will be bundled when publishing the package. -.P -In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundleDependencies\fR array and executing \fBnpm pack\fR. -.P -For example: -.P -If we define a package.json like this: -.P -.RS 2 -.nf -{ - "name": "awesome-web-framework", - "version": "1.0.0", - "bundleDependencies": \[lB] - "renderized", - "super-streams" - \[rB] -} -.fi -.RE -.P -we can obtain \fBawesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fBrenderized\fR and \fBsuper-streams\fR which can be installed in a new project by executing \fBnpm install -awesome-web-framework-1.0.0.tgz\fR. Note that the package names do not include any versions, as that information is specified in \fBdependencies\fR. -.P -If this is spelled \fB"bundledDependencies"\fR, then that is also honored. -.P -Alternatively, \fB"bundleDependencies"\fR can be defined as a boolean value. A value of \fBtrue\fR will bundle all dependencies, a value of \fBfalse\fR will bundle none. -.SS "optionalDependencies" -.P -If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the \fBoptionalDependencies\fR object. This is a map of package name to version or url, just like the \fBdependencies\fR object. The difference is that build failures do not cause installation to fail. Running \fBnpm install ---omit=optional\fR will prevent these dependencies from being installed. -.P -It is still your program's responsibility to handle the lack of the dependency. For example, something like this: -.P -.RS 2 -.nf -try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version -} catch (er) { - foo = null -} -if ( notGoodFooVersion(fooVersion) ) { - foo = null -} - -// .. then later in your program .. - -if (foo) { - foo.doFooThings() -} -.fi -.RE -.P -Entries in \fBoptionalDependencies\fR will override entries of the same name in \fBdependencies\fR, so it's usually best to only put in one place. -.SS "overrides" -.P -If you need to make specific changes to dependencies of your dependencies, for example replacing the version of a dependency with a known security issue, replacing an existing dependency with a fork, or making sure that the same version of a package is used everywhere, then you may add an override. -.P -Overrides provide a way to replace a package in your dependency tree with another version, or another package entirely. These changes can be scoped as specific or as vague as desired. -.P -To make sure the package \fBfoo\fR is always installed as version \fB1.0.0\fR no matter what version your dependencies rely on: -.P -.RS 2 -.nf -{ - "overrides": { - "foo": "1.0.0" - } -} -.fi -.RE -.P -The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fBfoo\fR to always be \fB1.0.0\fR while also making \fBbar\fR at any depth beyond \fBfoo\fR also \fB1.0.0\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "foo": { - ".": "1.0.0", - "bar": "1.0.0" - } - } -} -.fi -.RE -.P -To only override \fBfoo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "bar": { - "foo": "1.0.0" - } - } -} -.fi -.RE -.P -Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's a child of \fBbar\fR and only when \fBbar\fR is a child of \fBbaz\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" - } - } - } -} -.fi -.RE -.P -The key of an override can also include a version, or range of versions. To override \fBfoo\fR to \fB1.0.0\fR, but only when it's a child of \fBbar@2.0.0\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" - } - } -} -.fi -.RE -.P -You may not set an override for a package that you directly depend on unless both the dependency and the override itself share the exact same spec. To make this limitation easier to deal with, overrides may also be defined as a reference to a spec for a direct dependency by prefixing the name of the package you wish the version to match with a \fB$\fR. -.P -.RS 2 -.nf -{ - "dependencies": { - "foo": "^1.0.0" - }, - "overrides": { - // BAD, will throw an EOVERRIDE error - // "foo": "^2.0.0" - // GOOD, specs match so override is allowed - // "foo": "^1.0.0" - // BEST, the override is defined as a reference to the dependency - "foo": "$foo", - // the referenced package does not need to match the overridden one - "bar": "$foo" - } -} -.fi -.RE -.SS "engines" -.P -You can specify the version of node that your stuff works on: -.P -.RS 2 -.nf -{ - "engines": { - "node": ">=0.10.3 <15" - } -} -.fi -.RE -.P -And, like with dependencies, if you don't specify the version (or if you specify "*" as the version), then any version of node will do. -.P -You can also use the "engines" field to specify which versions of npm are capable of properly installing your program. For example: -.P -.RS 2 -.nf -{ - "engines": { - "npm": "~1.0.20" - } -} -.fi -.RE -.P -Unless the user has set the \fB\fBengine-strict\fR config\fR \fI\(la/using-npm/config#engine-strict\(ra\fR flag, this field is advisory only and will only produce warnings when your package is installed as a dependency. -.SS "os" -.P -You can specify which operating systems your module will run on: -.P -.RS 2 -.nf -{ - "os": \[lB] - "darwin", - "linux" - \[rB] -} -.fi -.RE -.P -You can also block instead of allowing operating systems, just prepend the blocked os with a '!': -.P -.RS 2 -.nf -{ - "os": \[lB] - "!win32" - \[rB] -} -.fi -.RE -.P -The host operating system is determined by \fBprocess.platform\fR -.P -It is allowed to both block and allow an item, although there isn't any good reason to do this. -.SS "cpu" -.P -If your code only runs on certain cpu architectures, you can specify which ones. -.P -.RS 2 -.nf -{ - "cpu": \[lB] - "x64", - "ia32" - \[rB] -} -.fi -.RE -.P -Like the \fBos\fR option, you can also block architectures: -.P -.RS 2 -.nf -{ - "cpu": \[lB] - "!arm", - "!mips" - \[rB] -} -.fi -.RE -.P -The host architecture is determined by \fBprocess.arch\fR -.SS "private" -.P -If you set \fB"private": true\fR in your package.json, then npm will refuse to publish it. -.P -This is a way to prevent accidental publication of private repositories. If you would like to ensure that a given package is only ever published to a specific registry (for example, an internal registry), then use the \fBpublishConfig\fR dictionary described below to override the \fBregistry\fR config param at publish-time. -.SS "publishConfig" -.P -This is a set of config values that will be used at publish-time. It's especially handy if you want to set the tag, registry or access, so that you can ensure that a given package is not tagged with "latest", published to the global public registry or that a scoped module is private by default. -.P -See npm help config to see the list of config options that can be overridden. -.SS "workspaces" -.P -The optional \fBworkspaces\fR field is an array of file patterns that describes locations within the local file system that the install client should look up to find each npm help workspace that needs to be symlinked to the top level \fBnode_modules\fR folder. -.P -It can describe either the direct paths of the folders to be used as workspaces or it can define globs that will resolve to these same folders. -.P -In the following example, all folders located inside the folder \fB./packages\fR will be treated as workspaces as long as they have valid \fBpackage.json\fR files inside them: -.P -.RS 2 -.nf -{ - "name": "workspace-example", - "workspaces": \[lB] - "./packages/*" - \[rB] -} -.fi -.RE -.P -See npm help workspaces for more examples. -.SS "DEFAULT VALUES" -.P -npm will default some values based on package contents. -.RS 0 -.IP \(bu 4 -\fB"scripts": {"start": "node server.js"}\fR -.P -If there is a \fBserver.js\fR file in the root of your package, then npm will default the \fBstart\fR command to \fBnode server.js\fR. -.IP \(bu 4 -\fB"scripts":{"install": "node-gyp rebuild"}\fR -.P -If there is a \fBbinding.gyp\fR file in the root of your package and you have not defined an \fBinstall\fR or \fBpreinstall\fR script, npm will default the \fBinstall\fR command to compile using node-gyp. -.IP \(bu 4 -\fB"contributors": \[lB]...\[rB]\fR -.P -If there is an \fBAUTHORS\fR file in the root of your package, npm will treat each line as a \fBName (url)\fR format, where email and url are optional. Lines which start with a \fB#\fR or are blank, will be ignored. -.RE 0 - -.SS "SEE ALSO" -.RS 0 -.IP \(bu 4 -\fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR -.IP \(bu 4 -npm help workspaces -.IP \(bu 4 -npm help init -.IP \(bu 4 -npm help version -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help help -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help uninstall -.RE 0 diff --git a/node_modules/npm/man/man5/npm-shrinkwrap-json.5 b/node_modules/npm/man/man5/npm-shrinkwrap-json.5 deleted file mode 100644 index f0a0471..0000000 --- a/node_modules/npm/man/man5/npm-shrinkwrap-json.5 +++ /dev/null @@ -1,23 +0,0 @@ -.TH "NPM-SHRINKWRAP.JSON" "5" "December 2023" "" "" -.SH "NAME" -\fBnpm-shrinkwrap.json\fR - A publishable lockfile -.SS "Description" -.P -\fBnpm-shrinkwrap.json\fR is a file created by npm help shrinkwrap. It is identical to \fBpackage-lock.json\fR, with one major caveat: Unlike \fBpackage-lock.json\fR, \fBnpm-shrinkwrap.json\fR may be included when publishing a package. -.P -The recommended use-case for \fBnpm-shrinkwrap.json\fR is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or \fBdevDependencies\fR. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates. -.P -If both \fBpackage-lock.json\fR and \fBnpm-shrinkwrap.json\fR are present in a package root, \fBnpm-shrinkwrap.json\fR will be preferred over the \fBpackage-lock.json\fR file. -.P -For full details and description of the \fBnpm-shrinkwrap.json\fR file format, refer to the manual page for \fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR. -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help shrinkwrap -.IP \(bu 4 -\fBpackage-lock.json\fR \fI\(la/configuring-npm/package-lock-json\(ra\fR -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man5/npmrc.5 b/node_modules/npm/man/man5/npmrc.5 deleted file mode 100644 index 1b71046..0000000 --- a/node_modules/npm/man/man5/npmrc.5 +++ /dev/null @@ -1,129 +0,0 @@ -.TH "NPMRC" "5" "December 2023" "" "" -.SH "NAME" -\fBnpmrc\fR - The npm config files -.SS "Description" -.P -npm gets its config settings from the command line, environment variables, and \fBnpmrc\fR files. -.P -The \fBnpm config\fR command can be used to update and edit the contents of the user and global npmrc files. -.P -For a list of available configuration options, see npm help config. -.SS "Files" -.P -The four relevant files are: -.RS 0 -.IP \(bu 4 -per-project config file (/path/to/my/project/.npmrc) -.IP \(bu 4 -per-user config file (~/.npmrc) -.IP \(bu 4 -global config file ($PREFIX/etc/npmrc) -.IP \(bu 4 -npm builtin config file (/path/to/npm/npmrc) -.RE 0 - -.P -All npm config files are an ini-formatted list of \fBkey = value\fR parameters. Environment variables can be replaced using \fB${VARIABLE_NAME}\fR. For example: -.P -.RS 2 -.nf -prefix = ${HOME}/.npm-packages -.fi -.RE -.P -Each of these files is loaded, and config options are resolved in priority order. For example, a setting in the userconfig file would override the setting in the globalconfig file. -.P -Array values are specified by adding "\[lB]\[rB]" after the key name. For example: -.P -.RS 2 -.nf -key\[lB]\[rB] = "first value" -key\[lB]\[rB] = "second value" -.fi -.RE -.SS "Comments" -.P -Lines in \fB.npmrc\fR files are interpreted as comments when they begin with a \fB;\fR or \fB#\fR character. \fB.npmrc\fR files are parsed by \fBnpm/ini\fR \fI\(lahttps://github.com/npm/ini\(ra\fR, which specifies this comment syntax. -.P -For example: -.P -.RS 2 -.nf -# last modified: 01 Jan 2016 -; Set a new registry for a scoped package -@myscope:registry=https://mycustomregistry.example.org -.fi -.RE -.SS "Per-project config file" -.P -When working locally in a project, a \fB.npmrc\fR file in the root of the project (ie, a sibling of \fBnode_modules\fR and \fBpackage.json\fR) will set config values specific to this project. -.P -Note that this only applies to the root of the project that you're running npm in. It has no effect when your module is published. For example, you can't publish a module that forces itself to install globally, or in a different location. -.P -Additionally, this file is not read in global mode, such as when running \fBnpm install -g\fR. -.SS "Per-user config file" -.P -\fB$HOME/.npmrc\fR (or the \fBuserconfig\fR param, if set in the environment or on the command line) -.SS "Global config file" -.P -\fB$PREFIX/etc/npmrc\fR (or the \fBglobalconfig\fR param, if set above): This file is an ini-file formatted list of \fBkey = value\fR parameters. Environment variables can be replaced as above. -.SS "Built-in config file" -.P -\fBpath/to/npm/itself/npmrc\fR -.P -This is an unchangeable "builtin" configuration file that npm keeps consistent across updates. Set fields in here using the \fB./configure\fR script that comes with npm. This is primarily for distribution maintainers to override default configs in a standard and consistent manner. -.SS "Auth related configuration" -.P -The settings \fB_auth\fR, \fB_authToken\fR, \fBusername\fR and \fB_password\fR must all be scoped to a specific registry. This ensures that \fBnpm\fR will never send credentials to the wrong host. -.P -The full list is: -.RS 0 -.IP \(bu 4 -\fB_auth\fR (base64 authentication string) -.IP \(bu 4 -\fB_authToken\fR (authentication token) -.IP \(bu 4 -\fBusername\fR -.IP \(bu 4 -\fB_password\fR -.IP \(bu 4 -\fBemail\fR -.IP \(bu 4 -\fBcertfile\fR (path to certificate file) -.IP \(bu 4 -\fBkeyfile\fR (path to key file) -.RE 0 - -.P -In order to scope these values, they must be prefixed by a URI fragment. If the credential is meant for any request to a registry on a single host, the scope may look like \fB//registry.npmjs.org/:\fR. If it must be scoped to a specific path on the host that path may also be provided, such as \fB//my-custom-registry.org/unique/path:\fR. -.P -.RS 2 -.nf -; bad config -_authToken=MYTOKEN - -; good config -@myorg:registry=https://somewhere-else.com/myorg -@another:registry=https://somewhere-else.com/another -//registry.npmjs.org/:_authToken=MYTOKEN -; would apply to both @myorg and @another -; //somewhere-else.com/:_authToken=MYTOKEN -; would apply only to @myorg -//somewhere-else.com/myorg/:_authToken=MYTOKEN1 -; would apply only to @another -//somewhere-else.com/another/:_authToken=MYTOKEN2 -.fi -.RE -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help config -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help npm -.RE 0 diff --git a/node_modules/npm/man/man5/package-json.5 b/node_modules/npm/man/man5/package-json.5 deleted file mode 100644 index b24ff64..0000000 --- a/node_modules/npm/man/man5/package-json.5 +++ /dev/null @@ -1,1093 +0,0 @@ -.TH "PACKAGE.JSON" "5" "December 2023" "" "" -.SH "NAME" -\fBpackage.json\fR - Specifics of npm's package.json handling -.SS "Description" -.P -This document is all you need to know about what's required in your package.json file. It must be actual JSON, not just a JavaScript object literal. -.P -A lot of the behavior described in this document is affected by the config settings described in npm help config. -.SS "name" -.P -If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. -.P -The name is what your thing is called. -.P -Some rules: -.RS 0 -.IP \(bu 4 -The name must be less than or equal to 214 characters. This includes the scope for scoped packages. -.IP \(bu 4 -The names of scoped packages can begin with a dot or an underscore. This is not permitted without a scope. -.IP \(bu 4 -New packages must not have uppercase letters in the name. -.IP \(bu 4 -The name ends up being part of a URL, an argument on the command line, and a folder name. Therefore, the name can't contain any non-URL-safe characters. -.RE 0 - -.P -Some tips: -.RS 0 -.IP \(bu 4 -Don't use the same name as a core Node module. -.IP \(bu 4 -Don't put "js" or "node" in the name. It's assumed that it's js, since you're writing a package.json file, and you can specify the engine using the "engines" field. (See below.) -.IP \(bu 4 -The name will probably be passed as an argument to require(), so it should be something short, but also reasonably descriptive. -.IP \(bu 4 -You may want to check the npm registry to see if there's something by that name already, before you get too attached to it. \fI\(lahttps://www.npmjs.com/\(ra\fR -.RE 0 - -.P -A name can be optionally prefixed by a scope, e.g. \fB@myorg/mypackage\fR. See npm help scope for more detail. -.SS "version" -.P -If you plan to publish your package, the \fImost\fR important things in your package.json are the name and version fields as they will be required. The name and version together form an identifier that is assumed to be completely unique. Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and version fields are optional. -.P -Version must be parseable by \fBnode-semver\fR \fI\(lahttps://github.com/npm/node-semver\(ra\fR, which is bundled with npm as a dependency. (\fBnpm install semver\fR to use it yourself.) -.SS "description" -.P -Put a description in it. It's a string. This helps people discover your package, as it's listed in \fBnpm search\fR. -.SS "keywords" -.P -Put keywords in it. It's an array of strings. This helps people discover your package as it's listed in \fBnpm search\fR. -.SS "homepage" -.P -The url to the project homepage. -.P -Example: -.P -.RS 2 -.nf -"homepage": "https://github.com/owner/project#readme" -.fi -.RE -.SS "bugs" -.P -The url to your project's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your package. -.P -It should look like this: -.P -.RS 2 -.nf -{ - "bugs": { - "url": "https://github.com/owner/project/issues", - "email": "project@hostname.com" - } -} -.fi -.RE -.P -You can specify either one or both values. If you want to provide only a url, you can specify the value for "bugs" as a simple string instead of an object. -.P -If a url is provided, it will be used by the \fBnpm bugs\fR command. -.SS "license" -.P -You should specify a license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it. -.P -If you're using a common license such as BSD-2-Clause or MIT, add a current SPDX license identifier for the license you're using, like this: -.P -.RS 2 -.nf -{ - "license" : "BSD-3-Clause" -} -.fi -.RE -.P -You can check \fBthe full list of SPDX license IDs\fR \fI\(lahttps://spdx.org/licenses/\(ra\fR. Ideally you should pick one that is \fBOSI\fR \fI\(lahttps://opensource.org/licenses/\(ra\fR approved. -.P -If your package is licensed under multiple common licenses, use an \fBSPDX license expression syntax version 2.0 string\fR \fI\(lahttps://spdx.dev/specifications/\(ra\fR, like this: -.P -.RS 2 -.nf -{ - "license" : "(ISC OR GPL-3.0)" -} -.fi -.RE -.P -If you are using a license that hasn't been assigned an SPDX identifier, or if you are using a custom license, use a string value like this one: -.P -.RS 2 -.nf -{ - "license" : "SEE LICENSE IN " -} -.fi -.RE -.P -Then include a file named \fB\fR at the top level of the package. -.P -Some old packages used license objects or a "licenses" property containing an array of license objects: -.P -.RS 2 -.nf -// Not valid metadata -{ - "license" : { - "type" : "ISC", - "url" : "https://opensource.org/licenses/ISC" - } -} - -// Not valid metadata -{ - "licenses" : \[lB] - { - "type": "MIT", - "url": "https://www.opensource.org/licenses/mit-license.php" - }, - { - "type": "Apache-2.0", - "url": "https://opensource.org/licenses/apache2.0.php" - } - \[rB] -} -.fi -.RE -.P -Those styles are now deprecated. Instead, use SPDX expressions, like this: -.P -.RS 2 -.nf -{ - "license": "ISC" -} -.fi -.RE -.P -.RS 2 -.nf -{ - "license": "(MIT OR Apache-2.0)" -} -.fi -.RE -.P -Finally, if you do not wish to grant others the right to use a private or unpublished package under any terms: -.P -.RS 2 -.nf -{ - "license": "UNLICENSED" -} -.fi -.RE -.P -Consider also setting \fB"private": true\fR to prevent accidental publication. -.SS "people fields: author, contributors" -.P -The "author" is one person. "contributors" is an array of people. A "person" is an object with a "name" field and optionally "url" and "email", like this: -.P -.RS 2 -.nf -{ - "name" : "Barney Rubble", - "email" : "b@rubble.com", - "url" : "http://barnyrubble.tumblr.com/" -} -.fi -.RE -.P -Or you can shorten that all into a single string, and npm will parse it for you: -.P -.RS 2 -.nf -{ - "author": "Barney Rubble (http://barnyrubble.tumblr.com/)" -} -.fi -.RE -.P -Both email and url are optional either way. -.P -npm also sets a top-level "maintainers" field with your npm user info. -.SS "funding" -.P -You can specify an object containing a URL that provides up-to-date information about ways to help fund development of your package, or a string URL, or an array of these: -.P -.RS 2 -.nf -{ - "funding": { - "type" : "individual", - "url" : "http://example.com/donate" - }, - - "funding": { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - }, - - "funding": "http://example.com/donate", - - "funding": \[lB] - { - "type" : "individual", - "url" : "http://example.com/donate" - }, - "http://example.com/donateAlso", - { - "type" : "patreon", - "url" : "https://www.patreon.com/my-account" - } - \[rB] -} -.fi -.RE -.P -Users can use the \fBnpm fund\fR subcommand to list the \fBfunding\fR URLs of all dependencies of their project, direct and indirect. A shortcut to visit each funding url is also available when providing the project name such as: \fBnpm fund \fR (when there are multiple URLs, the first one will be visited) -.SS "files" -.P -The optional \fBfiles\fR field is an array of file patterns that describes the entries to be included when your package is installed as a dependency. File patterns follow a similar syntax to \fB.gitignore\fR, but reversed: including a file, directory, or glob pattern (\fB*\fR, \fB**/*\fR, and such) will make it so that file is included in the tarball when it's packed. Omitting the field will make it default to \fB\[lB]"*"\[rB]\fR, which means it will include all files. -.P -Some special files and directories are also included or excluded regardless of whether they exist in the \fBfiles\fR array (see below). -.P -You can also provide a \fB.npmignore\fR file in the root of your package or in subdirectories, which will keep files from being included. At the root of your package it will not override the "files" field, but in subdirectories it will. The \fB.npmignore\fR file works just like a \fB.gitignore\fR. If there is a \fB.gitignore\fR file, and \fB.npmignore\fR is missing, \fB.gitignore\fR's contents will be used instead. -.P -Certain files are always included, regardless of settings: -.RS 0 -.IP \(bu 4 -\fBpackage.json\fR -.IP \(bu 4 -\fBREADME\fR -.IP \(bu 4 -\fBLICENSE\fR / \fBLICENCE\fR -.IP \(bu 4 -The file in the "main" field -.IP \(bu 4 -The file(s) in the "bin" field -.RE 0 - -.P -\fBREADME\fR & \fBLICENSE\fR can have any case and extension. -.P -Some files are always ignored by default: -.RS 0 -.IP \(bu 4 -\fB*.orig\fR -.IP \(bu 4 -\fB.*.swp\fR -.IP \(bu 4 -\fB.DS_Store\fR -.IP \(bu 4 -\fB._*\fR -.IP \(bu 4 -\fB.git\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fB.hg\fR -.IP \(bu 4 -\fB.lock-wscript\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fB.svn\fR -.IP \(bu 4 -\fB.wafpickle-N\fR -.IP \(bu 4 -\fBCVS\fR -.IP \(bu 4 -\fBconfig.gypi\fR -.IP \(bu 4 -\fBnode_modules\fR -.IP \(bu 4 -\fBnpm-debug.log\fR -.IP \(bu 4 -\fBpackage-lock.json\fR (use \fB\fBnpm-shrinkwrap.json\fR\fR \fI\(la/configuring-npm/npm-shrinkwrap-json\(ra\fR if you wish it to be published) -.IP \(bu 4 -\fBpnpm-lock.yaml\fR -.IP \(bu 4 -\fByarn.lock\fR -.RE 0 - -.P -Most of these ignored files can be included specifically if included in the \fBfiles\fR globs. Exceptions to this are: -.RS 0 -.IP \(bu 4 -\fB.git\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fBnode_modules\fR -.IP \(bu 4 -\fBpackage-lock.json\fR -.IP \(bu 4 -\fBpnpm-lock.yaml\fR -.IP \(bu 4 -\fByarn.lock\fR -.RE 0 - -.P -These can not be included. -.SS "main" -.P -The main field is a module ID that is the primary entry point to your program. That is, if your package is named \fBfoo\fR, and a user installs it, and then does \fBrequire("foo")\fR, then your main module's exports object will be returned. -.P -This should be a module relative to the root of your package folder. -.P -For most modules, it makes the most sense to have a main script and often not much else. -.P -If \fBmain\fR is not set, it defaults to \fBindex.js\fR in the package's root folder. -.SS "browser" -.P -If your module is meant to be used client-side the browser field should be used instead of the main field. This is helpful to hint users that it might rely on primitives that aren't available in Node.js modules. (e.g. \fBwindow\fR) -.SS "bin" -.P -A lot of packages have one or more executable files that they'd like to install into the PATH. npm makes this pretty easy (in fact, it uses this feature to install the "npm" executable.) -.P -To use this, supply a \fBbin\fR field in your package.json which is a map of command name to local file name. When this package is installed globally, that file will be either linked inside the global bins directory or a cmd (Windows Command File) will be created which executes the specified file in the \fBbin\fR field, so it is available to run by \fBname\fR or \fBname.cmd\fR (on Windows PowerShell). When this package is installed as a dependency in another package, the file will be linked where it will be available to that package either directly by \fBnpm exec\fR or by name in other scripts when invoking them via \fBnpm run-script\fR. -.P -For example, myapp could have this: -.P -.RS 2 -.nf -{ - "bin": { - "myapp": "./cli.js" - } -} -.fi -.RE -.P -So, when you install myapp, in case of unix-like OS it'll create a symlink from the \fBcli.js\fR script to \fB/usr/local/bin/myapp\fR and in case of windows it will create a cmd file usually at \fBC:\[rs]Users\[rs]{Username}\[rs]AppData\[rs]Roaming\[rs]npm\[rs]myapp.cmd\fR which runs the \fBcli.js\fR script. -.P -If you have a single executable, and its name should be the name of the package, then you can just supply it as a string. For example: -.P -.RS 2 -.nf -{ - "name": "my-program", - "version": "1.2.5", - "bin": "./path/to/program" -} -.fi -.RE -.P -would be the same as this: -.P -.RS 2 -.nf -{ - "name": "my-program", - "version": "1.2.5", - "bin": { - "my-program": "./path/to/program" - } -} -.fi -.RE -.P -Please make sure that your file(s) referenced in \fBbin\fR starts with \fB#!/usr/bin/env node\fR, otherwise the scripts are started without the node executable! -.P -Note that you can also set the executable files using \fBdirectories.bin\fR \fI(directories.bin)\fR. -.P -See \fBfolders\fR \fI\(la/configuring-npm/folders#executables\(ra\fR for more info on executables. -.SS "man" -.P -Specify either a single file or an array of filenames to put in place for the \fBman\fR program to find. -.P -If only a single file is provided, then it's installed such that it is the result from \fBman \fR, regardless of its actual filename. For example: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": "./man/doc.1" -} -.fi -.RE -.P -would link the \fB./man/doc.1\fR file in such that it is the target for \fBman -foo\fR -.P -If the filename doesn't start with the package name, then it's prefixed. So, this: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": \[lB] - "./man/foo.1", - "./man/bar.1" - \[rB] -} -.fi -.RE -.P -will create files to do \fBman foo\fR and \fBman foo-bar\fR. -.P -Man files must end with a number, and optionally a \fB.gz\fR suffix if they are compressed. The number dictates which man section the file is installed into. -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "1.2.3", - "description": "A packaged foo fooer for fooing foos", - "main": "foo.js", - "man": \[lB] - "./man/foo.1", - "./man/foo.2" - \[rB] -} -.fi -.RE -.P -will create entries for \fBman foo\fR and \fBman 2 foo\fR -.SS "directories" -.P -The CommonJS \fBPackages\fR \fI\(lahttp://wiki.commonjs.org/wiki/Packages/1.0\(ra\fR spec details a few ways that you can indicate the structure of your package using a \fBdirectories\fR object. If you look at \fBnpm's package.json\fR \fI\(lahttps://registry.npmjs.org/npm/latest\(ra\fR, you'll see that it has directories for doc, lib, and man. -.P -In the future, this information may be used in other creative ways. -.SS "directories.bin" -.P -If you specify a \fBbin\fR directory in \fBdirectories.bin\fR, all the files in that folder will be added. -.P -Because of the way the \fBbin\fR directive works, specifying both a \fBbin\fR path and setting \fBdirectories.bin\fR is an error. If you want to specify individual files, use \fBbin\fR, and for all the files in an existing \fBbin\fR directory, use \fBdirectories.bin\fR. -.SS "directories.man" -.P -A folder that is full of man pages. Sugar to generate a "man" array by walking the folder. -.SS "repository" -.P -Specify the place where your code lives. This is helpful for people who want to contribute. If the git repo is on GitHub, then the \fBnpm docs\fR command will be able to find you. -.P -Do it like this: -.P -.RS 2 -.nf -{ - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git" - } -} -.fi -.RE -.P -The URL should be a publicly available (perhaps read-only) url that can be handed directly to a VCS program without any modification. It should not be a url to an html project page that you put in your browser. It's for computers. -.P -For GitHub, GitHub gist, Bitbucket, or GitLab repositories you can use the same shortcut syntax you use for \fBnpm install\fR: -.P -.RS 2 -.nf -{ - "repository": "npm/npm", - - "repository": "github:user/repo", - - "repository": "gist:11081aaa281", - - "repository": "bitbucket:user/repo", - - "repository": "gitlab:user/repo" -} -.fi -.RE -.P -If the \fBpackage.json\fR for your package is not in the root directory (for example if it is part of a monorepo), you can specify the directory in which it lives: -.P -.RS 2 -.nf -{ - "repository": { - "type": "git", - "url": "https://github.com/facebook/react.git", - "directory": "packages/react-dom" - } -} -.fi -.RE -.SS "scripts" -.P -The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point. -.P -See npm help scripts to find out more about writing package scripts. -.SS "config" -.P -A "config" object can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the following: -.P -.RS 2 -.nf -{ - "name": "foo", - "config": { - "port": "8080" - } -} -.fi -.RE -.P -It could also have a "start" command that referenced the \fBnpm_package_config_port\fR environment variable. -.SS "dependencies" -.P -Dependencies are specified in a simple object that maps a package name to a version range. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or git URL. -.P -\fBPlease do not put test harnesses or transpilers or other "development" time tools in your \fBdependencies\fB object.\fR See \fBdevDependencies\fR, below. -.P -See \fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR for more details about specifying version ranges. -.RS 0 -.IP \(bu 4 -\fBversion\fR Must match \fBversion\fR exactly -.IP \(bu 4 -\fB>version\fR Must be greater than \fBversion\fR -.IP \(bu 4 -\fB>=version\fR etc -.IP \(bu 4 -\fB=version1 <=version2\fR. -.IP \(bu 4 -\fBrange1 || range2\fR Passes if either range1 or range2 are satisfied. -.IP \(bu 4 -\fBgit...\fR See 'Git URLs as Dependencies' below -.IP \(bu 4 -\fBuser/repo\fR See 'GitHub URLs' below -.IP \(bu 4 -\fBtag\fR A specific version tagged and published as \fBtag\fR See npm help dist-tag -.IP \(bu 4 -\fBpath/path/path\fR See \fBLocal Paths\fR \fI(Local Paths)\fR below -.RE 0 - -.P -For example, these are all valid: -.P -.RS 2 -.nf -{ - "dependencies": { - "foo": "1.0.0 - 2.9999.9999", - "bar": ">=1.0.2 <2.1.2", - "baz": ">1.0.2 <=2.3.4", - "boo": "2.0.1", - "qux": "<1.0.0 || >=2.3.1 <2.4.5 || >=2.5.2 <3.0.0", - "asd": "http://asdf.com/asdf.tar.gz", - "til": "~1.2", - "elf": "~1.2.3", - "two": "2.x", - "thr": "3.3.x", - "lat": "latest", - "dyl": "file:../dyl" - } -} -.fi -.RE -.SS "URLs as Dependencies" -.P -You may specify a tarball URL in place of a version range. -.P -This tarball will be downloaded and installed locally to your package at install time. -.SS "Git URLs as Dependencies" -.P -Git urls are of the form: -.P -.RS 2 -.nf -://\[lB]\[lB]:\[rB]@\[rB]\[lB]:\[rB]\[lB]:\[rB]\[lB]/\[rB]\[lB]# | #semver:\[rB] -.fi -.RE -.P -\fB\fR is one of \fBgit\fR, \fBgit+ssh\fR, \fBgit+http\fR, \fBgit+https\fR, or \fBgit+file\fR. -.P -If \fB#\fR is provided, it will be used to clone exactly that commit. If the commit-ish has the format \fB#semver:\fR, \fB\fR can be any valid semver range or exact version, and npm will look for any tags or refs matching that range in the remote repository, much as it would for a registry dependency. If neither \fB#\fR or \fB#semver:\fR is specified, then the default branch is used. -.P -Examples: -.P -.RS 2 -.nf -git+ssh://git@github.com:npm/cli.git#v1.0.27 -git+ssh://git@github.com:npm/cli#semver:^5.0 -git+https://isaacs@github.com/npm/cli.git -git://github.com/npm/cli.git#v1.0.27 -.fi -.RE -.P -When installing from a \fBgit\fR repository, the presence of certain fields in the \fBpackage.json\fR will cause npm to believe it needs to perform a build. To do so your repository will be cloned into a temporary directory, all of its deps installed, relevant scripts run, and the resulting directory packed and installed. -.P -This flow will occur if your git dependency uses \fBworkspaces\fR, or if any of the following scripts are present: -.RS 0 -.IP \(bu 4 -\fBbuild\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBprepack\fR -.IP \(bu 4 -\fBpreinstall\fR -.IP \(bu 4 -\fBinstall\fR -.IP \(bu 4 -\fBpostinstall\fR -.RE 0 - -.P -If your git repository includes pre-built artifacts, you will likely want to make sure that none of the above scripts are defined, or your dependency will be rebuilt for every installation. -.SS "GitHub URLs" -.P -As of version 1.1.65, you can refer to GitHub urls as just "foo": "user/foo-project". Just as with git URLs, a \fBcommit-ish\fR suffix can be included. For example: -.P -.RS 2 -.nf -{ - "name": "foo", - "version": "0.0.0", - "dependencies": { - "express": "expressjs/express", - "mocha": "mochajs/mocha#4727d357ea", - "module": "user/repo#feature\[rs]/branch" - } -} -.fi -.RE -.SS "Local Paths" -.P -As of version 2.0.0 you can provide a path to a local directory that contains a package. Local paths can be saved using \fBnpm install -S\fR or \fBnpm -install --save\fR, using any of these forms: -.P -.RS 2 -.nf -../foo/bar -~/foo/bar -./foo/bar -/foo/bar -.fi -.RE -.P -in which case they will be normalized to a relative path and added to your \fBpackage.json\fR. For example: -.P -.RS 2 -.nf -{ - "name": "baz", - "dependencies": { - "bar": "file:../foo/bar" - } -} -.fi -.RE -.P -This feature is helpful for local offline development and creating tests that require npm installing where you don't want to hit an external server, but should not be used when publishing packages to the public registry. -.P -\fInote\fR: Packages linked by local path will not have their own dependencies installed when \fBnpm install\fR is ran in this case. You must run \fBnpm install\fR from inside the local path itself. -.SS "devDependencies" -.P -If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use. -.P -In this case, it's best to map these additional items in a \fBdevDependencies\fR object. -.P -These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR from the root of a package, and can be managed like any other npm configuration param. See npm help config for more on the topic. -.P -For build steps that are not platform-specific, such as compiling CoffeeScript or other languages to JavaScript, use the \fBprepare\fR script to do this, and make the required package a devDependency. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "ethopia-waza", - "description": "a delightfully fruity coffee varietal", - "version": "1.2.3", - "devDependencies": { - "coffee-script": "~1.6.3" - }, - "scripts": { - "prepare": "coffee -o lib/ -c src/waza.coffee" - }, - "main": "lib/waza.js" -} -.fi -.RE -.P -The \fBprepare\fR script will be run before publishing, so that users can consume the functionality without requiring them to compile it themselves. In dev mode (ie, locally running \fBnpm install\fR), it'll run this script as well, so that you can test it easily. -.SS "peerDependencies" -.P -In some cases, you want to express the compatibility of your package with a host tool or library, while not necessarily doing a \fBrequire\fR of this host. This is usually referred to as a \fIplugin\fR. Notably, your module may be exposing a specific interface, expected and specified by the host documentation. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x" - } -} -.fi -.RE -.P -This ensures your package \fBtea-latte\fR can be installed \fIalong\fR with the second major version of the host package \fBtea\fR only. \fBnpm install -tea-latte\fR could possibly yield the following dependency graph: -.P -.RS 2 -.nf -├── tea-latte@1.3.5 -└── tea@2.2.0 -.fi -.RE -.P -In npm versions 3 through 6, \fBpeerDependencies\fR were not automatically installed, and would raise a warning if an invalid version of the peer dependency was found in the tree. As of npm v7, peerDependencies \fIare\fR installed by default. -.P -Trying to install another plugin with a conflicting requirement may cause an error if the tree cannot be resolved correctly. For this reason, make sure your plugin requirement is as broad as possible, and not to lock it down to specific patch versions. -.P -Assuming the host complies with \fBsemver\fR \fI\(lahttps://semver.org/\(ra\fR, only changes in the host package's major version will break your plugin. Thus, if you've worked with every 1.x version of the host package, use \fB"^1.0"\fR or \fB"1.x"\fR to express this. If you depend on features introduced in 1.5.2, use \fB"^1.5.2"\fR. -.SS "peerDependenciesMeta" -.P -When a user installs your package, npm will emit warnings if packages specified in \fBpeerDependencies\fR are not already installed. The \fBpeerDependenciesMeta\fR field serves to provide npm more information on how your peer dependencies are to be used. Specifically, it allows peer dependencies to be marked as optional. -.P -For example: -.P -.RS 2 -.nf -{ - "name": "tea-latte", - "version": "1.3.5", - "peerDependencies": { - "tea": "2.x", - "soy-milk": "1.2" - }, - "peerDependenciesMeta": { - "soy-milk": { - "optional": true - } - } -} -.fi -.RE -.P -Marking a peer dependency as optional ensures npm will not emit a warning if the \fBsoy-milk\fR package is not installed on the host. This allows you to integrate and interact with a variety of host packages without requiring all of them to be installed. -.SS "bundleDependencies" -.P -This defines an array of package names that will be bundled when publishing the package. -.P -In cases where you need to preserve npm packages locally or have them available through a single file download, you can bundle the packages in a tarball file by specifying the package names in the \fBbundleDependencies\fR array and executing \fBnpm pack\fR. -.P -For example: -.P -If we define a package.json like this: -.P -.RS 2 -.nf -{ - "name": "awesome-web-framework", - "version": "1.0.0", - "bundleDependencies": \[lB] - "renderized", - "super-streams" - \[rB] -} -.fi -.RE -.P -we can obtain \fBawesome-web-framework-1.0.0.tgz\fR file by running \fBnpm pack\fR. This file contains the dependencies \fBrenderized\fR and \fBsuper-streams\fR which can be installed in a new project by executing \fBnpm install -awesome-web-framework-1.0.0.tgz\fR. Note that the package names do not include any versions, as that information is specified in \fBdependencies\fR. -.P -If this is spelled \fB"bundledDependencies"\fR, then that is also honored. -.P -Alternatively, \fB"bundleDependencies"\fR can be defined as a boolean value. A value of \fBtrue\fR will bundle all dependencies, a value of \fBfalse\fR will bundle none. -.SS "optionalDependencies" -.P -If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the \fBoptionalDependencies\fR object. This is a map of package name to version or url, just like the \fBdependencies\fR object. The difference is that build failures do not cause installation to fail. Running \fBnpm install ---omit=optional\fR will prevent these dependencies from being installed. -.P -It is still your program's responsibility to handle the lack of the dependency. For example, something like this: -.P -.RS 2 -.nf -try { - var foo = require('foo') - var fooVersion = require('foo/package.json').version -} catch (er) { - foo = null -} -if ( notGoodFooVersion(fooVersion) ) { - foo = null -} - -// .. then later in your program .. - -if (foo) { - foo.doFooThings() -} -.fi -.RE -.P -Entries in \fBoptionalDependencies\fR will override entries of the same name in \fBdependencies\fR, so it's usually best to only put in one place. -.SS "overrides" -.P -If you need to make specific changes to dependencies of your dependencies, for example replacing the version of a dependency with a known security issue, replacing an existing dependency with a fork, or making sure that the same version of a package is used everywhere, then you may add an override. -.P -Overrides provide a way to replace a package in your dependency tree with another version, or another package entirely. These changes can be scoped as specific or as vague as desired. -.P -To make sure the package \fBfoo\fR is always installed as version \fB1.0.0\fR no matter what version your dependencies rely on: -.P -.RS 2 -.nf -{ - "overrides": { - "foo": "1.0.0" - } -} -.fi -.RE -.P -The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package. This will cause \fBfoo\fR to always be \fB1.0.0\fR while also making \fBbar\fR at any depth beyond \fBfoo\fR also \fB1.0.0\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "foo": { - ".": "1.0.0", - "bar": "1.0.0" - } - } -} -.fi -.RE -.P -To only override \fBfoo\fR to be \fB1.0.0\fR when it's a child (or grandchild, or great grandchild, etc) of the package \fBbar\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "bar": { - "foo": "1.0.0" - } - } -} -.fi -.RE -.P -Keys can be nested to any arbitrary length. To override \fBfoo\fR only when it's a child of \fBbar\fR and only when \fBbar\fR is a child of \fBbaz\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "baz": { - "bar": { - "foo": "1.0.0" - } - } - } -} -.fi -.RE -.P -The key of an override can also include a version, or range of versions. To override \fBfoo\fR to \fB1.0.0\fR, but only when it's a child of \fBbar@2.0.0\fR: -.P -.RS 2 -.nf -{ - "overrides": { - "bar@2.0.0": { - "foo": "1.0.0" - } - } -} -.fi -.RE -.P -You may not set an override for a package that you directly depend on unless both the dependency and the override itself share the exact same spec. To make this limitation easier to deal with, overrides may also be defined as a reference to a spec for a direct dependency by prefixing the name of the package you wish the version to match with a \fB$\fR. -.P -.RS 2 -.nf -{ - "dependencies": { - "foo": "^1.0.0" - }, - "overrides": { - // BAD, will throw an EOVERRIDE error - // "foo": "^2.0.0" - // GOOD, specs match so override is allowed - // "foo": "^1.0.0" - // BEST, the override is defined as a reference to the dependency - "foo": "$foo", - // the referenced package does not need to match the overridden one - "bar": "$foo" - } -} -.fi -.RE -.SS "engines" -.P -You can specify the version of node that your stuff works on: -.P -.RS 2 -.nf -{ - "engines": { - "node": ">=0.10.3 <15" - } -} -.fi -.RE -.P -And, like with dependencies, if you don't specify the version (or if you specify "*" as the version), then any version of node will do. -.P -You can also use the "engines" field to specify which versions of npm are capable of properly installing your program. For example: -.P -.RS 2 -.nf -{ - "engines": { - "npm": "~1.0.20" - } -} -.fi -.RE -.P -Unless the user has set the \fB\fBengine-strict\fR config\fR \fI\(la/using-npm/config#engine-strict\(ra\fR flag, this field is advisory only and will only produce warnings when your package is installed as a dependency. -.SS "os" -.P -You can specify which operating systems your module will run on: -.P -.RS 2 -.nf -{ - "os": \[lB] - "darwin", - "linux" - \[rB] -} -.fi -.RE -.P -You can also block instead of allowing operating systems, just prepend the blocked os with a '!': -.P -.RS 2 -.nf -{ - "os": \[lB] - "!win32" - \[rB] -} -.fi -.RE -.P -The host operating system is determined by \fBprocess.platform\fR -.P -It is allowed to both block and allow an item, although there isn't any good reason to do this. -.SS "cpu" -.P -If your code only runs on certain cpu architectures, you can specify which ones. -.P -.RS 2 -.nf -{ - "cpu": \[lB] - "x64", - "ia32" - \[rB] -} -.fi -.RE -.P -Like the \fBos\fR option, you can also block architectures: -.P -.RS 2 -.nf -{ - "cpu": \[lB] - "!arm", - "!mips" - \[rB] -} -.fi -.RE -.P -The host architecture is determined by \fBprocess.arch\fR -.SS "private" -.P -If you set \fB"private": true\fR in your package.json, then npm will refuse to publish it. -.P -This is a way to prevent accidental publication of private repositories. If you would like to ensure that a given package is only ever published to a specific registry (for example, an internal registry), then use the \fBpublishConfig\fR dictionary described below to override the \fBregistry\fR config param at publish-time. -.SS "publishConfig" -.P -This is a set of config values that will be used at publish-time. It's especially handy if you want to set the tag, registry or access, so that you can ensure that a given package is not tagged with "latest", published to the global public registry or that a scoped module is private by default. -.P -See npm help config to see the list of config options that can be overridden. -.SS "workspaces" -.P -The optional \fBworkspaces\fR field is an array of file patterns that describes locations within the local file system that the install client should look up to find each npm help workspace that needs to be symlinked to the top level \fBnode_modules\fR folder. -.P -It can describe either the direct paths of the folders to be used as workspaces or it can define globs that will resolve to these same folders. -.P -In the following example, all folders located inside the folder \fB./packages\fR will be treated as workspaces as long as they have valid \fBpackage.json\fR files inside them: -.P -.RS 2 -.nf -{ - "name": "workspace-example", - "workspaces": \[lB] - "./packages/*" - \[rB] -} -.fi -.RE -.P -See npm help workspaces for more examples. -.SS "DEFAULT VALUES" -.P -npm will default some values based on package contents. -.RS 0 -.IP \(bu 4 -\fB"scripts": {"start": "node server.js"}\fR -.P -If there is a \fBserver.js\fR file in the root of your package, then npm will default the \fBstart\fR command to \fBnode server.js\fR. -.IP \(bu 4 -\fB"scripts":{"install": "node-gyp rebuild"}\fR -.P -If there is a \fBbinding.gyp\fR file in the root of your package and you have not defined an \fBinstall\fR or \fBpreinstall\fR script, npm will default the \fBinstall\fR command to compile using node-gyp. -.IP \(bu 4 -\fB"contributors": \[lB]...\[rB]\fR -.P -If there is an \fBAUTHORS\fR file in the root of your package, npm will treat each line as a \fBName (url)\fR format, where email and url are optional. Lines which start with a \fB#\fR or are blank, will be ignored. -.RE 0 - -.SS "SEE ALSO" -.RS 0 -.IP \(bu 4 -\fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#versions\(ra\fR -.IP \(bu 4 -npm help workspaces -.IP \(bu 4 -npm help init -.IP \(bu 4 -npm help version -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help help -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help uninstall -.RE 0 diff --git a/node_modules/npm/man/man5/package-lock-json.5 b/node_modules/npm/man/man5/package-lock-json.5 deleted file mode 100644 index b7f5afc..0000000 --- a/node_modules/npm/man/man5/package-lock-json.5 +++ /dev/null @@ -1,156 +0,0 @@ -.TH "PACKAGE-LOCK.JSON" "5" "December 2023" "" "" -.SH "NAME" -\fBpackage-lock.json\fR - A manifestation of the manifest -.SS "Description" -.P -\fBpackage-lock.json\fR is automatically generated for any operations where npm modifies either the \fBnode_modules\fR tree, or \fBpackage.json\fR. It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates. -.P -This file is intended to be committed into source repositories, and serves various purposes: -.RS 0 -.IP \(bu 4 -Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies. -.IP \(bu 4 -Provide a facility for users to "time-travel" to previous states of \fBnode_modules\fR without having to commit the directory itself. -.IP \(bu 4 -Facilitate greater visibility of tree changes through readable source control diffs. -.IP \(bu 4 -Optimize the installation process by allowing npm to skip repeated metadata resolutions for previously-installed packages. -.IP \(bu 4 -As of npm v7, lockfiles include enough information to gain a complete picture of the package tree, reducing the need to read \fBpackage.json\fR files, and allowing for significant performance improvements. -.RE 0 - -.SS "\fBpackage-lock.json\fR vs \fBnpm-shrinkwrap.json\fR" -.P -Both of these files have the same format, and perform similar functions in the root of a project. -.P -The difference is that \fBpackage-lock.json\fR cannot be published, and it will be ignored if found in any place other than the root project. -.P -In contrast, \fBnpm-shrinkwrap.json\fR \fI\(la/configuring-npm/npm-shrinkwrap-json\(ra\fR allows publication, and defines the dependency tree from the point encountered. This is not recommended unless deploying a CLI tool or otherwise using the publication process for producing production packages. -.P -If both \fBpackage-lock.json\fR and \fBnpm-shrinkwrap.json\fR are present in the root of a project, \fBnpm-shrinkwrap.json\fR will take precedence and \fBpackage-lock.json\fR will be ignored. -.SS "Hidden Lockfiles" -.P -In order to avoid processing the \fBnode_modules\fR folder repeatedly, npm as of v7 uses a "hidden" lockfile present in \fBnode_modules/.package-lock.json\fR. This contains information about the tree, and is used in lieu of reading the entire \fBnode_modules\fR hierarchy provided that the following conditions are met: -.RS 0 -.IP \(bu 4 -All package folders it references exist in the \fBnode_modules\fR hierarchy. -.IP \(bu 4 -No package folders exist in the \fBnode_modules\fR hierarchy that are not listed in the lockfile. -.IP \(bu 4 -The modified time of the file is at least as recent as all of the package folders it references. -.RE 0 - -.P -That is, the hidden lockfile will only be relevant if it was created as part of the most recent update to the package tree. If another CLI mutates the tree in any way, this will be detected, and the hidden lockfile will be ignored. -.P -Note that it \fIis\fR possible to manually change the \fIcontents\fR of a package in such a way that the modified time of the package folder is unaffected. For example, if you add a file to \fBnode_modules/foo/lib/bar.js\fR, then the modified time on \fBnode_modules/foo\fR will not reflect this change. If you are manually editing files in \fBnode_modules\fR, it is generally best to delete the file at \fBnode_modules/.package-lock.json\fR. -.P -As the hidden lockfile is ignored by older npm versions, it does not contain the backwards compatibility affordances present in "normal" lockfiles. That is, it is \fBlockfileVersion: 3\fR, rather than \fBlockfileVersion: 2\fR. -.SS "Handling Old Lockfiles" -.P -When npm detects a lockfile from npm v6 or before during the package installation process, it is automatically updated to fetch missing information from either the \fBnode_modules\fR tree or (in the case of empty \fBnode_modules\fR trees or very old lockfile formats) the npm registry. -.SS "File Format" -.SS "\fBname\fR" -.P -The name of the package this is a package-lock for. This will match what's in \fBpackage.json\fR. -.SS "\fBversion\fR" -.P -The version of the package this is a package-lock for. This will match what's in \fBpackage.json\fR. -.SS "\fBlockfileVersion\fR" -.P -An integer version, starting at \fB1\fR with the version number of this document whose semantics were used when generating this \fBpackage-lock.json\fR. -.P -Note that the file format changed significantly in npm v7 to track information that would have otherwise required looking in \fBnode_modules\fR or the npm registry. Lockfiles generated by npm v7 will contain \fBlockfileVersion: 2\fR. -.RS 0 -.IP \(bu 4 -No version provided: an "ancient" shrinkwrap file from a version of npm prior to npm v5. -.IP \(bu 4 -\fB1\fR: The lockfile version used by npm v5 and v6. -.IP \(bu 4 -\fB2\fR: The lockfile version used by npm v7 and v8. Backwards compatible to v1 lockfiles. -.IP \(bu 4 -\fB3\fR: The lockfile version used by npm v9 and above. Backwards compatible to npm v7. -.RE 0 - -.P -npm will always attempt to get whatever data it can out of a lockfile, even if it is not a version that it was designed to support. -.SS "\fBpackages\fR" -.P -This is an object that maps package locations to an object containing the information about that package. -.P -The root project is typically listed with a key of \fB""\fR, and all other packages are listed with their relative paths from the root project folder. -.P -Package descriptors have the following fields: -.RS 0 -.IP \(bu 4 -version: The version found in \fBpackage.json\fR -.IP \(bu 4 -resolved: The place where the package was actually resolved from. In the case of packages fetched from the registry, this will be a url to a tarball. In the case of git dependencies, this will be the full git url with commit sha. In the case of link dependencies, this will be the location of the link target. \fBregistry.npmjs.org\fR is a magic value meaning "the currently configured registry". -.IP \(bu 4 -integrity: A \fBsha512\fR or \fBsha1\fR \fBStandard Subresource Integrity\fR \fI\(lahttps://w3c.github.io/webappsec/specs/subresourceintegrity/\(ra\fR string for the artifact that was unpacked in this location. -.IP \(bu 4 -link: A flag to indicate that this is a symbolic link. If this is present, no other fields are specified, since the link target will also be included in the lockfile. -.IP \(bu 4 -dev, optional, devOptional: If the package is strictly part of the \fBdevDependencies\fR tree, then \fBdev\fR will be true. If it is strictly part of the \fBoptionalDependencies\fR tree, then \fBoptional\fR will be set. If it is both a \fBdev\fR dependency \fIand\fR an \fBoptional\fR dependency of a non-dev dependency, then \fBdevOptional\fR will be set. (An \fBoptional\fR dependency of a \fBdev\fR dependency will have both \fBdev\fR and \fBoptional\fR set.) -.IP \(bu 4 -inBundle: A flag to indicate that the package is a bundled dependency. -.IP \(bu 4 -hasInstallScript: A flag to indicate that the package has a \fBpreinstall\fR, \fBinstall\fR, or \fBpostinstall\fR script. -.IP \(bu 4 -hasShrinkwrap: A flag to indicate that the package has an \fBnpm-shrinkwrap.json\fR file. -.IP \(bu 4 -bin, license, engines, dependencies, optionalDependencies: fields from \fBpackage.json\fR -.RE 0 - -.SS "dependencies" -.P -Legacy data for supporting versions of npm that use \fBlockfileVersion: 1\fR. This is a mapping of package names to dependency objects. Because the object structure is strictly hierarchical, symbolic link dependencies are somewhat challenging to represent in some cases. -.P -npm v7 ignores this section entirely if a \fBpackages\fR section is present, but does keep it up to date in order to support switching between npm v6 and npm v7. -.P -Dependency objects have the following fields: -.RS 0 -.IP \(bu 4 -version: a specifier that varies depending on the nature of the package, and is usable in fetching a new copy of it. -.RS 4 -.IP \(bu 4 -bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes. -.IP \(bu 4 -registry sources: This is a version number. (eg, \fB1.2.3\fR) -.IP \(bu 4 -git sources: This is a git specifier with resolved committish. (eg, \fBgit+https://example.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e\fR) -.IP \(bu 4 -http tarball sources: This is the URL of the tarball. (eg, \fBhttps://example.com/example-1.3.0.tgz\fR) -.IP \(bu 4 -local tarball sources: This is the file URL of the tarball. (eg \fBfile:///opt/storage/example-1.3.0.tgz\fR) -.IP \(bu 4 -local link sources: This is the file URL of the link. (eg \fBfile:libs/our-module\fR) -.RE 0 - -.IP \(bu 4 -integrity: A \fBsha512\fR or \fBsha1\fR \fBStandard Subresource Integrity\fR \fI\(lahttps://w3c.github.io/webappsec/specs/subresourceintegrity/\(ra\fR string for the artifact that was unpacked in this location. For git dependencies, this is the commit sha. -.IP \(bu 4 -resolved: For registry sources this is path of the tarball relative to the registry URL. If the tarball URL isn't on the same server as the registry URL then this is a complete URL. \fBregistry.npmjs.org\fR is a magic value meaning "the currently configured registry". -.IP \(bu 4 -bundled: If true, this is the bundled dependency and will be installed by the parent module. When installing, this module will be extracted from the parent module during the extract phase, not installed as a separate dependency. -.IP \(bu 4 -dev: If true then this dependency is either a development dependency ONLY of the top level module or a transitive dependency of one. This is false for dependencies that are both a development dependency of the top level and a transitive dependency of a non-development dependency of the top level. -.IP \(bu 4 -optional: If true then this dependency is either an optional dependency ONLY of the top level module or a transitive dependency of one. This is false for dependencies that are both an optional dependency of the top level and a transitive dependency of a non-optional dependency of the top level. -.IP \(bu 4 -requires: This is a mapping of module name to version. This is a list of everything this module requires, regardless of where it will be installed. The version should match via normal matching rules a dependency either in our \fBdependencies\fR or in a level higher than us. -.IP \(bu 4 -dependencies: The dependencies of this dependency, exactly as at the top level. -.RE 0 - -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help shrinkwrap -.IP \(bu 4 -\fBnpm-shrinkwrap.json\fR \fI\(la/configuring-npm/npm-shrinkwrap-json\(ra\fR -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man7/config.7 b/node_modules/npm/man/man7/config.7 deleted file mode 100644 index c3d7154..0000000 --- a/node_modules/npm/man/man7/config.7 +++ /dev/null @@ -1,2002 +0,0 @@ -.TH "CONFIG" "7" "December 2023" "" "" -.SH "NAME" -\fBconfig\fR - More than you probably want to know about npm configuration -.SS "Description" -.P -npm gets its configuration values from the following sources, sorted by priority: -.SS "Command Line Flags" -.P -Putting \fB--foo bar\fR on the command line sets the \fBfoo\fR configuration parameter to \fB"bar"\fR. A \fB--\fR argument tells the cli parser to stop reading flags. Using \fB--flag\fR without specifying any value will set the value to \fBtrue\fR. -.P -Example: \fB--flag1 --flag2\fR will set both configuration parameters to \fBtrue\fR, while \fB--flag1 --flag2 bar\fR will set \fBflag1\fR to \fBtrue\fR, and \fBflag2\fR to \fBbar\fR. Finally, \fB--flag1 --flag2 -- bar\fR will set both configuration parameters to \fBtrue\fR, and the \fBbar\fR is taken as a command argument. -.SS "Environment Variables" -.P -Any environment variables that start with \fBnpm_config_\fR will be interpreted as a configuration parameter. For example, putting \fBnpm_config_foo=bar\fR in your environment will set the \fBfoo\fR configuration parameter to \fBbar\fR. Any environment configurations that are not given a value will be given the value of \fBtrue\fR. Config values are case-insensitive, so \fBNPM_CONFIG_FOO=bar\fR will work the same. However, please note that inside npm help scripts npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. For details see \fBthis issue\fR \fI\(lahttps://github.com/npm/npm/issues/14528\(ra\fR. -.P -Notice that you need to use underscores instead of dashes, so \fB--allow-same-version\fR would become \fBnpm_config_allow_same_version=true\fR. -.SS "npmrc Files" -.P -The four relevant files are: -.RS 0 -.IP \(bu 4 -per-project configuration file (\fB/path/to/my/project/.npmrc\fR) -.IP \(bu 4 -per-user configuration file (defaults to \fB$HOME/.npmrc\fR; configurable via CLI option \fB--userconfig\fR or environment variable \fB$NPM_CONFIG_USERCONFIG\fR) -.IP \(bu 4 -global configuration file (defaults to \fB$PREFIX/etc/npmrc\fR; configurable via CLI option \fB--globalconfig\fR or environment variable \fB$NPM_CONFIG_GLOBALCONFIG\fR) -.IP \(bu 4 -npm's built-in configuration file (\fB/path/to/npm/npmrc\fR) -.RE 0 - -.P -See npm help npmrc for more details. -.SS "Default Configs" -.P -Run \fBnpm config ls -l\fR to see a set of configuration parameters that are internal to npm, and are defaults if nothing else is specified. -.SS "Shorthands and Other CLI Niceties" -.P -The following shorthands are parsed on the command-line: -.RS 0 -.IP \(bu 4 -\fB-a\fR: \fB--all\fR -.IP \(bu 4 -\fB--enjoy-by\fR: \fB--before\fR -.IP \(bu 4 -\fB-c\fR: \fB--call\fR -.IP \(bu 4 -\fB--desc\fR: \fB--description\fR -.IP \(bu 4 -\fB-f\fR: \fB--force\fR -.IP \(bu 4 -\fB-g\fR: \fB--global\fR -.IP \(bu 4 -\fB--iwr\fR: \fB--include-workspace-root\fR -.IP \(bu 4 -\fB-L\fR: \fB--location\fR -.IP \(bu 4 -\fB-d\fR: \fB--loglevel info\fR -.IP \(bu 4 -\fB-s\fR: \fB--loglevel silent\fR -.IP \(bu 4 -\fB--silent\fR: \fB--loglevel silent\fR -.IP \(bu 4 -\fB--ddd\fR: \fB--loglevel silly\fR -.IP \(bu 4 -\fB--dd\fR: \fB--loglevel verbose\fR -.IP \(bu 4 -\fB--verbose\fR: \fB--loglevel verbose\fR -.IP \(bu 4 -\fB-q\fR: \fB--loglevel warn\fR -.IP \(bu 4 -\fB--quiet\fR: \fB--loglevel warn\fR -.IP \(bu 4 -\fB-l\fR: \fB--long\fR -.IP \(bu 4 -\fB-m\fR: \fB--message\fR -.IP \(bu 4 -\fB--local\fR: \fB--no-global\fR -.IP \(bu 4 -\fB-n\fR: \fB--no-yes\fR -.IP \(bu 4 -\fB--no\fR: \fB--no-yes\fR -.IP \(bu 4 -\fB-p\fR: \fB--parseable\fR -.IP \(bu 4 -\fB--porcelain\fR: \fB--parseable\fR -.IP \(bu 4 -\fB-C\fR: \fB--prefix\fR -.IP \(bu 4 -\fB--readonly\fR: \fB--read-only\fR -.IP \(bu 4 -\fB--reg\fR: \fB--registry\fR -.IP \(bu 4 -\fB-S\fR: \fB--save\fR -.IP \(bu 4 -\fB-B\fR: \fB--save-bundle\fR -.IP \(bu 4 -\fB-D\fR: \fB--save-dev\fR -.IP \(bu 4 -\fB-E\fR: \fB--save-exact\fR -.IP \(bu 4 -\fB-O\fR: \fB--save-optional\fR -.IP \(bu 4 -\fB-P\fR: \fB--save-prod\fR -.IP \(bu 4 -\fB-?\fR: \fB--usage\fR -.IP \(bu 4 -\fB-h\fR: \fB--usage\fR -.IP \(bu 4 -\fB-H\fR: \fB--usage\fR -.IP \(bu 4 -\fB--help\fR: \fB--usage\fR -.IP \(bu 4 -\fB-v\fR: \fB--version\fR -.IP \(bu 4 -\fB-w\fR: \fB--workspace\fR -.IP \(bu 4 -\fB--ws\fR: \fB--workspaces\fR -.IP \(bu 4 -\fB-y\fR: \fB--yes\fR -.RE 0 - -.P -If the specified configuration param resolves unambiguously to a known configuration parameter, then it is expanded to that configuration parameter. For example: -.P -.RS 2 -.nf -npm ls --par -# same as: -npm ls --parseable -.fi -.RE -.P -If multiple single-character shorthands are strung together, and the resulting combination is unambiguously not some other configuration param, then it is expanded to its various component pieces. For example: -.P -.RS 2 -.nf -npm ls -gpld -# same as: -npm ls --global --parseable --long --loglevel info -.fi -.RE -.SS "Config Settings" -.SS "\fB_auth\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -A basic-auth string to use when authenticating against the npm registry. This will ONLY be used to authenticate against the npm registry. For other registries you will need to scope it like "//other-registry.tld/:_auth" -.P -Warning: This should generally not be set via a command-line option. It is safer to use a registry-provided authentication bearer token stored in the ~/.npmrc file by running \fBnpm login\fR. -.SS "\fBaccess\fR" -.RS 0 -.IP \(bu 4 -Default: 'public' for new packages, existing packages it will not change the current level -.IP \(bu 4 -Type: null, "restricted", or "public" -.RE 0 - -.P -If you do not want your scoped package to be publicly viewable (and installable) set \fB--access=restricted\fR. -.P -Unscoped packages can not be set to \fBrestricted\fR. -.P -Note: This defaults to not changing the current access level for existing packages. Specifying a value of \fBrestricted\fR or \fBpublic\fR during publish will change the access for an existing package the same way that \fBnpm access set -status\fR would. -.SS "\fBall\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When running \fBnpm outdated\fR and \fBnpm ls\fR, setting \fB--all\fR will show all outdated or installed packages, rather than only those directly depended upon by the current project. -.SS "\fBallow-same-version\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prevents throwing an error when \fBnpm version\fR is used to set the new version to the same value as the current version. -.SS "\fBaudit\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for npm help audit for details on what is submitted. -.SS "\fBaudit-level\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null, "info", "low", "moderate", "high", "critical", or "none" -.RE 0 - -.P -The minimum level of vulnerability for \fBnpm audit\fR to exit with a non-zero exit code. -.SS "\fBauth-type\fR" -.RS 0 -.IP \(bu 4 -Default: "web" -.IP \(bu 4 -Type: "legacy" or "web" -.RE 0 - -.P -What authentication strategy to use with \fBlogin\fR. Note that if an \fBotp\fR config is given, this value will always be set to \fBlegacy\fR. -.SS "\fBbefore\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Date -.RE 0 - -.P -If passed to \fBnpm install\fR, will rebuild the npm tree such that only versions that were available \fBon or before\fR the \fB--before\fR time get installed. If there's no versions available for the current set of direct dependencies, the command will error. -.P -If the requested version is a \fBdist-tag\fR and the given tag does not pass the \fB--before\fR filter, the most recent version less than or equal to that tag will be used. For example, \fBfoo@latest\fR might install \fBfoo@1.2\fR even though \fBlatest\fR is \fB2.0\fR. -.SS "\fBbin-links\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tells npm to create symlinks (or \fB.cmd\fR shims on Windows) for package executables. -.P -Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems. -.SS "\fBbrowser\fR" -.RS 0 -.IP \(bu 4 -Default: OS X: \fB"open"\fR, Windows: \fB"start"\fR, Others: \fB"xdg-open"\fR -.IP \(bu 4 -Type: null, Boolean, or String -.RE 0 - -.P -The browser that is called by npm commands to open websites. -.P -Set to \fBfalse\fR to suppress browser behavior and instead print urls to terminal. -.P -Set to \fBtrue\fR to use default system URL opener. -.SS "\fBca\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String (can be set multiple times) -.RE 0 - -.P -The Certificate Authority signing certificate that is trusted for SSL connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\[rs]n". For example: -.P -.RS 2 -.nf -ca="-----BEGIN CERTIFICATE-----\[rs]nXXXX\[rs]nXXXX\[rs]n-----END CERTIFICATE-----" -.fi -.RE -.P -Set to \fBnull\fR to only allow "known" registrars, or to a specific CA cert to trust only that specific signing authority. -.P -Multiple CAs can be trusted by specifying an array of certificates: -.P -.RS 2 -.nf -ca\[lB]\[rB]="..." -ca\[lB]\[rB]="..." -.fi -.RE -.P -See also the \fBstrict-ssl\fR config. -.SS "\fBcache\fR" -.RS 0 -.IP \(bu 4 -Default: Windows: \fB%LocalAppData%\[rs]npm-cache\fR, Posix: \fB~/.npm\fR -.IP \(bu 4 -Type: Path -.RE 0 - -.P -The location of npm's cache directory. -.SS "\fBcafile\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: Path -.RE 0 - -.P -A path to a file containing one or multiple Certificate Authority signing certificates. Similar to the \fBca\fR setting, but allows for multiple CA's, as well as for the CA information to be stored in a file on disk. -.SS "\fBcall\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Optional companion option for \fBnpm exec\fR, \fBnpx\fR that allows for specifying a custom command to be run along with the installed packages. -.P -.RS 2 -.nf -npm exec --package yo --package generator-node --call "yo node" -.fi -.RE -.SS "\fBcidr\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String (can be set multiple times) -.RE 0 - -.P -This is a list of CIDR address to be used when configuring limited access tokens with the \fBnpm token create\fR command. -.SS "\fBcolor\fR" -.RS 0 -.IP \(bu 4 -Default: true unless the NO_COLOR environ is set to something other than '0' -.IP \(bu 4 -Type: "always" or Boolean -.RE 0 - -.P -If false, never shows colors. If \fB"always"\fR then always shows colors. If true, then only prints color codes for tty file descriptors. -.SS "\fBcommit-hooks\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run git commit hooks when using the \fBnpm version\fR command. -.SS "\fBcpu\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override CPU architecture of native modules to install. Acceptable values are same as \fBcpu\fR field of package.json, which comes from \fBprocess.arch\fR. -.SS "\fBdepth\fR" -.RS 0 -.IP \(bu 4 -Default: \fBInfinity\fR if \fB--all\fR is set, otherwise \fB1\fR -.IP \(bu 4 -Type: null or Number -.RE 0 - -.P -The depth to go when recursing packages for \fBnpm ls\fR. -.P -If not set, \fBnpm ls\fR will show only the immediate dependencies of the root project. If \fB--all\fR is set, then npm will show all dependencies by default. -.SS "\fBdescription\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show the description in \fBnpm search\fR -.SS "\fBdiff\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Define arguments to compare in \fBnpm diff\fR. -.SS "\fBdiff-dst-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "b/" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Destination prefix to be used in \fBnpm diff\fR output. -.SS "\fBdiff-ignore-all-space\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Ignore whitespace when comparing lines in \fBnpm diff\fR. -.SS "\fBdiff-name-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prints only filenames when using \fBnpm diff\fR. -.SS "\fBdiff-no-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Do not show any source or destination prefix in \fBnpm diff\fR output. -.P -Note: this causes \fBnpm diff\fR to ignore the \fB--diff-src-prefix\fR and \fB--diff-dst-prefix\fR configs. -.SS "\fBdiff-src-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "a/" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Source prefix to be used in \fBnpm diff\fR output. -.SS "\fBdiff-text\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Treat all files as text in \fBnpm diff\fR. -.SS "\fBdiff-unified\fR" -.RS 0 -.IP \(bu 4 -Default: 3 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The number of lines of context to print in \fBnpm diff\fR. -.SS "\fBdry-run\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, \fBinstall\fR, \fBupdate\fR, \fBdedupe\fR, \fBuninstall\fR, as well as \fBpack\fR and \fBpublish\fR. -.P -Note: This is NOT honored by other network related commands, eg \fBdist-tags\fR, \fBowner\fR, etc. -.SS "\fBeditor\fR" -.RS 0 -.IP \(bu 4 -Default: The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\[rs]notepad.exe' on Windows, or 'vi' on Unix systems -.IP \(bu 4 -Type: String -.RE 0 - -.P -The command to run for \fBnpm edit\fR and \fBnpm config edit\fR. -.SS "\fBengine-strict\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, then npm will stubbornly refuse to install (or even consider installing) any package that claims to not be compatible with the current Node.js version. -.P -This can be overridden by setting the \fB--force\fR flag. -.SS "\fBfetch-retries\fR" -.RS 0 -.IP \(bu 4 -Default: 2 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The "retries" config for the \fBretry\fR module to use when fetching packages from the registry. -.P -npm will retry idempotent read requests to the registry in the case of network failures or 5xx HTTP errors. -.SS "\fBfetch-retry-factor\fR" -.RS 0 -.IP \(bu 4 -Default: 10 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The "factor" config for the \fBretry\fR module to use when fetching packages. -.SS "\fBfetch-retry-maxtimeout\fR" -.RS 0 -.IP \(bu 4 -Default: 60000 (1 minute) -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The "maxTimeout" config for the \fBretry\fR module to use when fetching packages. -.SS "\fBfetch-retry-mintimeout\fR" -.RS 0 -.IP \(bu 4 -Default: 10000 (10 seconds) -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The "minTimeout" config for the \fBretry\fR module to use when fetching packages. -.SS "\fBfetch-timeout\fR" -.RS 0 -.IP \(bu 4 -Default: 300000 (5 minutes) -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The maximum amount of time to wait for HTTP requests to complete. -.SS "\fBforce\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. -.RS 0 -.IP \(bu 4 -Allow clobbering non-npm files in global installs. -.IP \(bu 4 -Allow the \fBnpm version\fR command to work on an unclean git repository. -.IP \(bu 4 -Allow deleting the cache folder with \fBnpm cache clean\fR. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of npm. -.IP \(bu 4 -Allow installing packages that have an \fBengines\fR declaration requiring a different version of \fBnode\fR, even if \fB--engine-strict\fR is enabled. -.IP \(bu 4 -Allow \fBnpm audit fix\fR to install modules outside your stated dependency range (including SemVer-major changes). -.IP \(bu 4 -Allow unpublishing all versions of a published package. -.IP \(bu 4 -Allow conflicting peerDependencies to be installed in the root project. -.IP \(bu 4 -Implicitly set \fB--yes\fR during \fBnpm init\fR. -.IP \(bu 4 -Allow clobbering existing values in \fBnpm pkg\fR -.IP \(bu 4 -Allow unpublishing of entire packages (not just a single version). -.RE 0 - -.P -If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! -.SS "\fBforeground-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Run all build scripts (ie, \fBpreinstall\fR, \fBinstall\fR, and \fBpostinstall\fR) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process. -.P -Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging. -.SS "\fBformat-package-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Format \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR as a human readable file. -.SS "\fBfund\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When "true" displays the message at the end of each \fBnpm install\fR acknowledging the number of dependencies looking for funding. See npm help fund for details. -.SS "\fBgit\fR" -.RS 0 -.IP \(bu 4 -Default: "git" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The command to use for git commands. If git is installed on the computer, but is not in the \fBPATH\fR, then set this to the full path to the git binary. -.SS "\fBgit-tag-version\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Tag the commit when using the \fBnpm version\fR command. Setting this to false results in no commit being made at all. -.SS "\fBglobal\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBglobalconfig\fR" -.RS 0 -.IP \(bu 4 -Default: The global --prefix setting plus 'etc/npmrc'. For example, '/usr/local/etc/npmrc' -.IP \(bu 4 -Type: Path -.RE 0 - -.P -The config file to read for global config options. -.SS "\fBheading\fR" -.RS 0 -.IP \(bu 4 -Default: "npm" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The string that starts all the debugging log output. -.SS "\fBhttps-proxy\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or URL -.RE 0 - -.P -A proxy to use for outgoing https requests. If the \fBHTTPS_PROXY\fR or \fBhttps_proxy\fR or \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variables are set, proxy settings will be honored by the underlying \fBmake-fetch-happen\fR library. -.SS "\fBif-present\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm will not exit with an error code when \fBrun-script\fR is invoked for a script that isn't defined in the \fBscripts\fR section of \fBpackage.json\fR. This option can be used when it's desirable to optionally run a script when it's present and fail if the script fails. This is useful, for example, when running scripts that may only apply for some builds in an otherwise generic CI setup. -.P -This value is not exported to the environment for child processes. -.SS "\fBignore-scripts\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, npm does not run scripts specified in package.json files. -.P -Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run-script\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts. -.SS "\fBinclude\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: "prod", "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Option that allows for defining which types of dependencies to install. -.P -This is the inverse of \fB--omit=\fR. -.P -Dependency types specified in \fB--include\fR will not be omitted, regardless of the order in which omit/include are specified on the command-line. -.SS "\fBinclude-staged\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Allow installing "staged" published packages, as defined by \fBnpm RFC PR #92\fR \fI\(lahttps://github.com/npm/rfcs/pull/92\(ra\fR. -.P -This is experimental, and not implemented by the npm public registry. -.SS "\fBinclude-workspace-root\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Include the workspace root when workspaces are enabled for a command. -.P -When false, specifying individual workspaces via the \fBworkspace\fR config, or all workspaces via the \fBworkspaces\fR flag, will cause npm to operate only on the specified workspaces, and not on the root project. -.P -This value is not exported to the environment for child processes. -.SS "\fBinit-author-email\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package author's email. -.SS "\fBinit-author-name\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package author's name. -.SS "\fBinit-author-url\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: "" or URL -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package author's homepage. -.SS "\fBinit-license\fR" -.RS 0 -.IP \(bu 4 -Default: "ISC" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The value \fBnpm init\fR should use by default for the package license. -.SS "\fBinit-module\fR" -.RS 0 -.IP \(bu 4 -Default: "~/.npm-init.js" -.IP \(bu 4 -Type: Path -.RE 0 - -.P -A module that will be loaded by the \fBnpm init\fR command. See the documentation for the \fBinit-package-json\fR \fI\(lahttps://github.com/npm/init-package-json\(ra\fR module for more information, or npm help init. -.SS "\fBinit-version\fR" -.RS 0 -.IP \(bu 4 -Default: "1.0.0" -.IP \(bu 4 -Type: SemVer string -.RE 0 - -.P -The value that \fBnpm init\fR should use by default for the package version number, if not already set in package.json. -.SS "\fBinstall-links\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces. -.SS "\fBinstall-strategy\fR" -.RS 0 -.IP \(bu 4 -Default: "hoisted" -.IP \(bu 4 -Type: "hoisted", "nested", "shallow", or "linked" -.RE 0 - -.P -Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted. -.SS "\fBjson\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to output JSON data, rather than the normal output. -.RS 0 -.IP \(bu 4 -In \fBnpm pkg set\fR it enables parsing set values with JSON.parse() before saving them to your \fBpackage.json\fR. -.RE 0 - -.P -Not supported by all npm commands. -.SS "\fBlegacy-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Causes npm to completely ignore \fBpeerDependencies\fR when building a package tree, as in npm versions 3 through 6. -.P -If a package cannot be installed because of overly strict \fBpeerDependencies\fR that collide, it provides a way to move forward resolving the situation. -.P -This differs from \fB--omit=peer\fR, in that \fB--omit=peer\fR will avoid unpacking \fBpeerDependencies\fR on disk, but will still design a tree such that \fBpeerDependencies\fR \fIcould\fR be unpacked in a correct place. -.P -Use of \fBlegacy-peer-deps\fR is not recommended, as it will not enforce the \fBpeerDependencies\fR contract that meta-dependencies may rely on. -.SS "\fBlink\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Used with \fBnpm ls\fR, limiting output to only those packages that are linked. -.SS "\fBlocal-address\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: IP Address -.RE 0 - -.P -The IP address of the local interface to use when making connections to the npm registry. Must be IPv4 in versions of Node prior to 0.12. -.SS "\fBlocation\fR" -.RS 0 -.IP \(bu 4 -Default: "user" unless \fB--global\fR is passed, which will also set this value to "global" -.IP \(bu 4 -Type: "global", "user", or "project" -.RE 0 - -.P -When passed to \fBnpm config\fR this refers to which config file to use. -.P -When set to "global" mode, packages are installed into the \fBprefix\fR folder instead of the current working directory. See npm help folders for more on the differences in behavior. -.RS 0 -.IP \(bu 4 -packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the current working directory. -.IP \(bu 4 -bin files are linked to \fB{prefix}/bin\fR -.IP \(bu 4 -man pages are linked to \fB{prefix}/share/man\fR -.RE 0 - -.SS "\fBlockfile-version\fR" -.RS 0 -.IP \(bu 4 -Default: Version 3 if no lockfile, auto-converting v1 lockfiles to v3, otherwise maintain current lockfile version. -.IP \(bu 4 -Type: null, 1, 2, 3, "1", "2", or "3" -.RE 0 - -.P -Set the lockfile format version to be used in package-lock.json and npm-shrinkwrap-json files. Possible options are: -.P -1: The lockfile version used by npm versions 5 and 6. Lacks some data that is used during the install, resulting in slower and possibly less deterministic installs. Prevents lockfile churn when interoperating with older npm versions. -.P -2: The default lockfile version used by npm version 7 and 8. Includes both the version 1 lockfile data and version 3 lockfile data, for maximum determinism and interoperability, at the expense of more bytes on disk. -.P -3: Only the new lockfile information introduced in npm version 7. Smaller on disk than lockfile version 2, but not interoperable with older npm versions. Ideal if all users are on npm version 7 and higher. -.SS "\fBloglevel\fR" -.RS 0 -.IP \(bu 4 -Default: "notice" -.IP \(bu 4 -Type: "silent", "error", "warn", "notice", "http", "info", "verbose", or "silly" -.RE 0 - -.P -What level of logs to report. All logs are written to a debug log, with the path to that file printed if the execution of a command fails. -.P -Any logs of a higher level than the setting are shown. The default is "notice". -.P -See also the \fBforeground-scripts\fR config. -.SS "\fBlogs-dir\fR" -.RS 0 -.IP \(bu 4 -Default: A directory named \fB_logs\fR inside the cache -.IP \(bu 4 -Type: null or Path -.RE 0 - -.P -The location of npm's log directory. See npm help logging for more information. -.SS "\fBlogs-max\fR" -.RS 0 -.IP \(bu 4 -Default: 10 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The maximum number of log files to store. -.P -If set to 0, no log files will be written for the current run. -.SS "\fBlong\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show extended information in \fBls\fR, \fBsearch\fR, and \fBhelp-search\fR. -.SS "\fBmaxsockets\fR" -.RS 0 -.IP \(bu 4 -Default: 15 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The maximum number of connections to use per origin (protocol/host/port combination). -.SS "\fBmessage\fR" -.RS 0 -.IP \(bu 4 -Default: "%s" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Commit message which is used by \fBnpm version\fR when creating version commit. -.P -Any "%s" in the message will be replaced with the version number. -.SS "\fBnode-options\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Options to pass through to Node.js via the \fBNODE_OPTIONS\fR environment variable. This does not impact how npm itself is executed but it does impact how lifecycle scripts are called. -.SS "\fBnoproxy\fR" -.RS 0 -.IP \(bu 4 -Default: The value of the NO_PROXY environment variable -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Domain extensions that should bypass any proxies. -.P -Also accepts a comma-delimited string. -.SS "\fBoffline\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Force offline mode: no network requests will be done during install. To allow the CLI to fill in missing cache data, see \fB--prefer-offline\fR. -.SS "\fBomit\fR" -.RS 0 -.IP \(bu 4 -Default: 'dev' if the \fBNODE_ENV\fR environment variable is set to 'production', otherwise empty. -.IP \(bu 4 -Type: "dev", "optional", or "peer" (can be set multiple times) -.RE 0 - -.P -Dependency types to omit from the installation tree on disk. -.P -Note that these dependencies \fIare\fR still resolved and added to the \fBpackage-lock.json\fR or \fBnpm-shrinkwrap.json\fR file. They are just not physically installed on disk. -.P -If a package type appears in both the \fB--include\fR and \fB--omit\fR lists, then it will be included. -.P -If the resulting omit list includes \fB'dev'\fR, then the \fBNODE_ENV\fR environment variable will be set to \fB'production'\fR for all lifecycle scripts. -.SS "\fBomit-lockfile-registry-resolved\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -This option causes npm to create lock files without a \fBresolved\fR key for registry dependencies. Subsequent installs will need to resolve tarball endpoints with the configured registry, likely resulting in a longer install time. -.SS "\fBos\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -Override OS of native modules to install. Acceptable values are same as \fBos\fR field of package.json, which comes from \fBprocess.platform\fR. -.SS "\fBotp\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -This is a one-time password from a two-factor authenticator. It's needed when publishing or changing package permissions with \fBnpm access\fR. -.P -If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one. -.SS "\fBpack-destination\fR" -.RS 0 -.IP \(bu 4 -Default: "." -.IP \(bu 4 -Type: String -.RE 0 - -.P -Directory in which \fBnpm pack\fR will save tarballs. -.SS "\fBpackage\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -The package or packages to install for npm help exec -.SS "\fBpackage-lock\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to false, then ignore \fBpackage-lock.json\fR files when installing. This will also prevent \fIwriting\fR \fBpackage-lock.json\fR if \fBsave\fR is true. -.SS "\fBpackage-lock-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the current operation will only use the \fBpackage-lock.json\fR, ignoring \fBnode_modules\fR. -.P -For \fBupdate\fR this means only the \fBpackage-lock.json\fR will be updated, instead of checking \fBnode_modules\fR and downloading dependencies. -.P -For \fBlist\fR this means the output will be based on the tree described by the \fBpackage-lock.json\fR, rather than the contents of \fBnode_modules\fR. -.SS "\fBparseable\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Output parseable results from commands that write to standard output. For \fBnpm search\fR, this will be tab-separated table format. -.SS "\fBprefer-dedupe\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Prefer to deduplicate packages if possible, rather than choosing a newer version of a dependency. -.SS "\fBprefer-offline\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server. To force full offline mode, use \fB--offline\fR. -.SS "\fBprefer-online\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, staleness checks for cached data will be forced, making the CLI look for updates immediately even for fresh package data. -.SS "\fBprefix\fR" -.RS 0 -.IP \(bu 4 -Default: In global mode, the folder where the node executable is installed. Otherwise, the nearest parent folder containing either a package.json file or a node_modules folder. -.IP \(bu 4 -Type: Path -.RE 0 - -.P -The location to install global items. If set on the command line, then it forces non-global commands to run in the specified folder. -.SS "\fBpreid\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -The "prerelease identifier" to use as a prefix for the "prerelease" part of a semver. Like the \fBrc\fR in \fB1.2.0-rc.8\fR. -.SS "\fBprogress\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless running in a known CI system -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to \fBtrue\fR, npm will display a progress bar during time intensive operations, if \fBprocess.stderr\fR is a TTY. -.P -Set to \fBfalse\fR to suppress the progress bar. -.SS "\fBprovenance\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When publishing from a supported cloud CI/CD system, the package will be publicly linked to where it was built and published from. -.P -This config can not be used with: \fBprovenance-file\fR -.SS "\fBprovenance-file\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: Path -.RE 0 - -.P -When publishing, the provenance bundle at the given path will be used. -.P -This config can not be used with: \fBprovenance\fR -.SS "\fBproxy\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null, false, or URL -.RE 0 - -.P -A proxy to use for outgoing http requests. If the \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variables are set, proxy settings will be honored by the underlying \fBrequest\fR library. -.SS "\fBread-only\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -This is used to mark a token as unable to publish when configuring limited access tokens with the \fBnpm token create\fR command. -.SS "\fBrebuild-bundle\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Rebuild bundled dependencies after installation. -.SS "\fBregistry\fR" -.RS 0 -.IP \(bu 4 -Default: "https://registry.npmjs.org/" -.IP \(bu 4 -Type: URL -.RE 0 - -.P -The base URL of the npm registry. -.SS "\fBreplace-registry-host\fR" -.RS 0 -.IP \(bu 4 -Default: "npmjs" -.IP \(bu 4 -Type: "npmjs", "never", "always", or String -.RE 0 - -.P -Defines behavior for replacing the registry host in a lockfile with the configured registry. -.P -The default behavior is to replace package dist URLs from the default registry (https://registry.npmjs.org) to the configured registry. If set to "never", then use the registry value. If set to "always", then replace the registry host with the configured host every time. -.P -You may also specify a bare hostname (e.g., "registry.npmjs.org"). -.SS "\fBsave\fR" -.RS 0 -.IP \(bu 4 -Default: \fBtrue\fR unless when using \fBnpm update\fR where it defaults to \fBfalse\fR -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a \fBpackage.json\fR file as dependencies. -.P -When used with the \fBnpm rm\fR command, removes the dependency from \fBpackage.json\fR. -.P -Will also prevent writing to \fBpackage-lock.json\fR if set to \fBfalse\fR. -.SS "\fBsave-bundle\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If a package would be saved at install time by the use of \fB--save\fR, \fB--save-dev\fR, or \fB--save-optional\fR, then also put it in the \fBbundleDependencies\fR list. -.P -Ignored if \fB--save-peer\fR is set, since peerDependencies cannot be bundled. -.SS "\fBsave-dev\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a package.json file as \fBdevDependencies\fR. -.SS "\fBsave-exact\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. -.SS "\fBsave-optional\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a package.json file as \fBoptionalDependencies\fR. -.SS "\fBsave-peer\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages to a package.json file as \fBpeerDependencies\fR -.SS "\fBsave-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "^" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Configure how versions of packages installed to a package.json file via \fB--save\fR or \fB--save-dev\fR get prefixed. -.P -For example if a package has version \fB1.2.3\fR, by default its version is set to \fB^1.2.3\fR which allows minor upgrades for that package, but after \fBnpm -config set save-prefix='~'\fR it would be set to \fB~1.2.3\fR which only allows patch upgrades. -.SS "\fBsave-prod\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Save installed packages into \fBdependencies\fR specifically. This is useful if a package already exists in \fBdevDependencies\fR or \fBoptionalDependencies\fR, but you want to move it to be a non-optional production dependency. -.P -This is the default behavior if \fB--save\fR is true, and neither \fB--save-dev\fR or \fB--save-optional\fR are true. -.SS "\fBsbom-format\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: "cyclonedx" or "spdx" -.RE 0 - -.P -SBOM format to use when generating SBOMs. -.SS "\fBsbom-type\fR" -.RS 0 -.IP \(bu 4 -Default: "library" -.IP \(bu 4 -Type: "library", "application", or "framework" -.RE 0 - -.P -The type of package described by the generated SBOM. For SPDX, this is the value for the \fBprimaryPackagePurpose\fR field. For CycloneDX, this is the value for the \fBtype\fR field. -.SS "\fBscope\fR" -.RS 0 -.IP \(bu 4 -Default: the scope of the current project, if any, or "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Associate an operation with a scope for a scoped registry. -.P -Useful when logging in to or out of a private registry: -.P -.RS 2 -.nf -# log in, linking the scope to the custom registry -npm login --scope=@mycorp --registry=https://registry.mycorp.com - -# log out, removing the link and the auth token -npm logout --scope=@mycorp -.fi -.RE -.P -This will cause \fB@mycorp\fR to be mapped to the registry for future installation of packages specified according to the pattern \fB@mycorp/package\fR. -.P -This will also cause \fBnpm init\fR to create a scoped package. -.P -.RS 2 -.nf -# accept all defaults, and create a package named "@foo/whatever", -# instead of just named "whatever" -npm init --scope=@foo --yes -.fi -.RE -.SS "\fBscript-shell\fR" -.RS 0 -.IP \(bu 4 -Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows -.IP \(bu 4 -Type: null or String -.RE 0 - -.P -The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm -init \fR commands. -.SS "\fBsearchexclude\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Space-separated options that limit the results from search. -.SS "\fBsearchlimit\fR" -.RS 0 -.IP \(bu 4 -Default: 20 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -Number of items to limit search results to. Will not apply at all to legacy searches. -.SS "\fBsearchopts\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Space-separated options that are always passed to search. -.SS "\fBsearchstaleness\fR" -.RS 0 -.IP \(bu 4 -Default: 900 -.IP \(bu 4 -Type: Number -.RE 0 - -.P -The age of the cache, in seconds, before another registry request is made if using legacy search endpoint. -.SS "\fBshell\fR" -.RS 0 -.IP \(bu 4 -Default: SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows -.IP \(bu 4 -Type: String -.RE 0 - -.P -The shell to run for the \fBnpm explore\fR command. -.SS "\fBsign-git-commit\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, then the \fBnpm version\fR command will commit the new package version using \fB-S\fR to add a signature. -.P -Note that git requires you to have set up GPG keys in your git configs for this to work properly. -.SS "\fBsign-git-tag\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, then the \fBnpm version\fR command will tag the version using \fB-s\fR to add a signature. -.P -Note that git requires you to have set up GPG keys in your git configs for this to work properly. -.SS "\fBstrict-peer-deps\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to \fBtrue\fR, and \fB--legacy-peer-deps\fR is not set, then \fIany\fR conflicting \fBpeerDependencies\fR will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships. -.P -By default, conflicting \fBpeerDependencies\fR deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's \fBpeerDependencies\fR object. -.P -When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If \fB--strict-peer-deps\fR is set, then this warning is treated as a failure. -.SS "\fBstrict-ssl\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Whether or not to do SSL key validation when making requests to the registry via https. -.P -See also the \fBca\fR config. -.SS "\fBtag\fR" -.RS 0 -.IP \(bu 4 -Default: "latest" -.IP \(bu 4 -Type: String -.RE 0 - -.P -If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag. -.P -Also the tag that is added to the package@version specified by the \fBnpm tag\fR command, if no explicit tag is given. -.P -When used by the \fBnpm diff\fR command, this is the tag used to fetch the tarball that will be compared with the local files by default. -.SS "\fBtag-version-prefix\fR" -.RS 0 -.IP \(bu 4 -Default: "v" -.IP \(bu 4 -Type: String -.RE 0 - -.P -If set, alters the prefix used when tagging a new version when performing a version increment using \fBnpm version\fR. To remove the prefix altogether, set it to the empty string: \fB""\fR. -.P -Because other tools may rely on the convention that npm version tags look like \fBv1.0.0\fR, \fIonly use this property if it is absolutely necessary\fR. In particular, use care when overriding this setting for public packages. -.SS "\fBtiming\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, writes timing information to a process specific json file in the cache or \fBlogs-dir\fR. The file name ends with \fB-timing.json\fR. -.P -You can quickly view it with this \fBjson\fR \fI\(lahttps://npm.im/json\(ra\fR command line: \fBcat ~/.npm/_logs/*-timing.json | npm exec -- json -g\fR. -.P -Timing information will also be reported in the terminal. To suppress this while still writing the timing file, use \fB--silent\fR. -.SS "\fBumask\fR" -.RS 0 -.IP \(bu 4 -Default: 0 -.IP \(bu 4 -Type: Octal numeric string in range 0000..0777 (0..511) -.RE 0 - -.P -The "umask" value to use when setting the file creation mode on files and folders. -.P -Folders and executables are given a mode which is \fB0o777\fR masked against this value. Other files are given a mode which is \fB0o666\fR masked against this value. -.P -Note that the underlying system will \fIalso\fR apply its own umask value to files and folders that are created, and npm does not circumvent this, but rather adds the \fB--umask\fR config to it. -.P -Thus, the effective default umask value on most POSIX systems is 0o22, meaning that folders and executables are created with a mode of 0o755 and other files are created with a mode of 0o644. -.SS "\fBunicode\fR" -.RS 0 -.IP \(bu 4 -Default: false on windows, true on mac/unix systems with a unicode locale, as defined by the \fBLC_ALL\fR, \fBLC_CTYPE\fR, or \fBLANG\fR environment variables. -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -When set to true, npm uses unicode characters in the tree output. When false, it uses ascii characters instead of unicode glyphs. -.SS "\fBupdate-notifier\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Set to false to suppress the update notification when using an older version of npm than the latest. -.SS "\fBusage\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -Show short usage output about the command specified. -.SS "\fBuser-agent\fR" -.RS 0 -.IP \(bu 4 -Default: "npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}" -.IP \(bu 4 -Type: String -.RE 0 - -.P -Sets the User-Agent request header. The following fields are replaced with their actual counterparts: -.RS 0 -.IP \(bu 4 -\fB{npm-version}\fR - The npm version in use -.IP \(bu 4 -\fB{node-version}\fR - The Node.js version in use -.IP \(bu 4 -\fB{platform}\fR - The value of \fBprocess.platform\fR -.IP \(bu 4 -\fB{arch}\fR - The value of \fBprocess.arch\fR -.IP \(bu 4 -\fB{workspaces}\fR - Set to \fBtrue\fR if the \fBworkspaces\fR or \fBworkspace\fR options are set. -.IP \(bu 4 -\fB{ci}\fR - The value of the \fBci-name\fR config, if set, prefixed with \fBci/\fR, or an empty string if \fBci-name\fR is empty. -.RE 0 - -.SS "\fBuserconfig\fR" -.RS 0 -.IP \(bu 4 -Default: "~/.npmrc" -.IP \(bu 4 -Type: Path -.RE 0 - -.P -The location of user-level configuration settings. -.P -This may be overridden by the \fBnpm_config_userconfig\fR environment variable or the \fB--userconfig\fR command line option, but may \fInot\fR be overridden by settings in the \fBglobalconfig\fR file. -.SS "\fBversion\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, output the npm version and exit successfully. -.P -Only relevant when specified explicitly on the command line. -.SS "\fBversions\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If true, output the npm version as well as node's \fBprocess.versions\fR map and the version in the current working directory's \fBpackage.json\fR file if one exists, and exit successfully. -.P -Only relevant when specified explicitly on the command line. -.SS "\fBviewer\fR" -.RS 0 -.IP \(bu 4 -Default: "man" on Posix, "browser" on Windows -.IP \(bu 4 -Type: String -.RE 0 - -.P -The program to use to view help content. -.P -Set to \fB"browser"\fR to view html help content in the default web browser. -.SS "\fBwhich\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Number -.RE 0 - -.P -If there are multiple funding sources, which 1-indexed source URL to open. -.SS "\fBworkspace\fR" -.RS 0 -.IP \(bu 4 -Default: -.IP \(bu 4 -Type: String (can be set multiple times) -.RE 0 - -.P -Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option. -.P -Valid values for the \fBworkspace\fR config are either: -.RS 0 -.IP \(bu 4 -Workspace names -.IP \(bu 4 -Path to a workspace directory -.IP \(bu 4 -Path to a parent workspace directory (will result in selecting all workspaces within that folder) -.RE 0 - -.P -When set for the \fBnpm init\fR command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project. -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Set to true to run the command in the context of \fBall\fR configured workspaces. -.P -Explicitly setting this to false will cause commands like \fBinstall\fR to ignore workspaces altogether. When not set explicitly: -.RS 0 -.IP \(bu 4 -Commands that operate on the \fBnode_modules\fR tree (install, update, etc.) will link workspaces into the \fBnode_modules\fR folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, \fIunless\fR one or more workspaces are specified in the \fBworkspace\fR config. -.RE 0 - -.P -This value is not exported to the environment for child processes. -.SS "\fBworkspaces-update\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.RE 0 - -.P -If set to true, the npm cli will run an update after operations that may possibly change the workspaces installed to the \fBnode_modules\fR folder. -.SS "\fByes\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.RE 0 - -.P -Automatically answer "yes" to any prompts that npm might print on the command line. -.SS "\fBalso\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null, "dev", or "development" -.IP \(bu 4 -DEPRECATED: Please use --include=dev instead. -.RE 0 - -.P -When set to \fBdev\fR or \fBdevelopment\fR, this is an alias for \fB--include=dev\fR. -.SS "\fBcache-max\fR" -.RS 0 -.IP \(bu 4 -Default: Infinity -.IP \(bu 4 -Type: Number -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--prefer-online\fR -.RE 0 - -.P -\fB--cache-max=0\fR is an alias for \fB--prefer-online\fR -.SS "\fBcache-min\fR" -.RS 0 -.IP \(bu 4 -Default: 0 -.IP \(bu 4 -Type: Number -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--prefer-offline\fR. -.RE 0 - -.P -\fB--cache-min=9999 (or bigger)\fR is an alias for \fB--prefer-offline\fR. -.SS "\fBcert\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.IP \(bu 4 -DEPRECATED: \fBkey\fR and \fBcert\fR are no longer used for most registry operations. Use registry scoped \fBkeyfile\fR and \fBcertfile\fR instead. Example: //other-registry.tld/:keyfile=/path/to/key.pem //other-registry.tld/:certfile=/path/to/cert.crt -.RE 0 - -.P -A client certificate to pass when accessing the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\[rs]n". For example: -.P -.RS 2 -.nf -cert="-----BEGIN CERTIFICATE-----\[rs]nXXXX\[rs]nXXXX\[rs]n-----END CERTIFICATE-----" -.fi -.RE -.P -It is \fInot\fR the path to a certificate file, though you can set a registry-scoped "certfile" path like "//other-registry.tld/:certfile=/path/to/cert.pem". -.SS "\fBdev\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: Please use --include=dev instead. -.RE 0 - -.P -Alias for \fB--include=dev\fR. -.SS "\fBglobal-style\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=shallow\fR -.RE 0 - -.P -Only install direct dependencies in the top level \fBnode_modules\fR, but hoist on deeper dependencies. Sets \fB--install-strategy=shallow\fR. -.SS "\fBinit.author.email\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.IP \(bu 4 -DEPRECATED: Use \fB--init-author-email\fR instead. -.RE 0 - -.P -Alias for \fB--init-author-email\fR -.SS "\fBinit.author.name\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: String -.IP \(bu 4 -DEPRECATED: Use \fB--init-author-name\fR instead. -.RE 0 - -.P -Alias for \fB--init-author-name\fR -.SS "\fBinit.author.url\fR" -.RS 0 -.IP \(bu 4 -Default: "" -.IP \(bu 4 -Type: "" or URL -.IP \(bu 4 -DEPRECATED: Use \fB--init-author-url\fR instead. -.RE 0 - -.P -Alias for \fB--init-author-url\fR -.SS "\fBinit.license\fR" -.RS 0 -.IP \(bu 4 -Default: "ISC" -.IP \(bu 4 -Type: String -.IP \(bu 4 -DEPRECATED: Use \fB--init-license\fR instead. -.RE 0 - -.P -Alias for \fB--init-license\fR -.SS "\fBinit.module\fR" -.RS 0 -.IP \(bu 4 -Default: "~/.npm-init.js" -.IP \(bu 4 -Type: Path -.IP \(bu 4 -DEPRECATED: Use \fB--init-module\fR instead. -.RE 0 - -.P -Alias for \fB--init-module\fR -.SS "\fBinit.version\fR" -.RS 0 -.IP \(bu 4 -Default: "1.0.0" -.IP \(bu 4 -Type: SemVer string -.IP \(bu 4 -DEPRECATED: Use \fB--init-version\fR instead. -.RE 0 - -.P -Alias for \fB--init-version\fR -.SS "\fBkey\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or String -.IP \(bu 4 -DEPRECATED: \fBkey\fR and \fBcert\fR are no longer used for most registry operations. Use registry scoped \fBkeyfile\fR and \fBcertfile\fR instead. Example: //other-registry.tld/:keyfile=/path/to/key.pem //other-registry.tld/:certfile=/path/to/cert.crt -.RE 0 - -.P -A client key to pass when accessing the registry. Values should be in PEM format with newlines replaced by the string "\[rs]n". For example: -.P -.RS 2 -.nf -key="-----BEGIN PRIVATE KEY-----\[rs]nXXXX\[rs]nXXXX\[rs]n-----END PRIVATE KEY-----" -.fi -.RE -.P -It is \fInot\fR the path to a key file, though you can set a registry-scoped "keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". -.SS "\fBlegacy-bundling\fR" -.RS 0 -.IP \(bu 4 -Default: false -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: This option has been deprecated in favor of \fB--install-strategy=nested\fR -.RE 0 - -.P -Instead of hoisting package installs in \fBnode_modules\fR, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets \fB--install-strategy=nested\fR. -.SS "\fBonly\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null, "prod", or "production" -.IP \(bu 4 -DEPRECATED: Use \fB--omit=dev\fR to omit dev dependencies from the install. -.RE 0 - -.P -When set to \fBprod\fR or \fBproduction\fR, this is an alias for \fB--omit=dev\fR. -.SS "\fBoptional\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.IP \(bu 4 -DEPRECATED: Use \fB--omit=optional\fR to exclude optional dependencies, or \fB--include=optional\fR to include them. -.RE 0 - -.P -Default value does install optional deps unless otherwise omitted. -.P -Alias for --include=optional or --omit=optional -.SS "\fBproduction\fR" -.RS 0 -.IP \(bu 4 -Default: null -.IP \(bu 4 -Type: null or Boolean -.IP \(bu 4 -DEPRECATED: Use \fB--omit=dev\fR instead. -.RE 0 - -.P -Alias for \fB--omit=dev\fR -.SS "\fBshrinkwrap\fR" -.RS 0 -.IP \(bu 4 -Default: true -.IP \(bu 4 -Type: Boolean -.IP \(bu 4 -DEPRECATED: Use the --package-lock setting instead. -.RE 0 - -.P -Alias for --package-lock -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help folders -.IP \(bu 4 -npm help npm -.RE 0 diff --git a/node_modules/npm/man/man7/dependency-selectors.7 b/node_modules/npm/man/man7/dependency-selectors.7 deleted file mode 100644 index 52a707b..0000000 --- a/node_modules/npm/man/man7/dependency-selectors.7 +++ /dev/null @@ -1,309 +0,0 @@ -.TH "QUERYING" "7" "December 2023" "" "" -.SH "NAME" -\fBQuerying\fR - Dependency Selector Syntax & Querying -.SS "Description" -.P -The npm help query command exposes a new dependency selector syntax (informed by & respecting many aspects of the \fBCSS Selectors 4 Spec\fR \fI\(lahttps://dev.w3.org/csswg/selectors4/#relational\(ra\fR) which: -.RS 0 -.IP \(bu 4 -Standardizes the shape of, & querying of, dependency graphs with a robust object model, metadata & selector syntax -.IP \(bu 4 -Leverages existing, known language syntax & operators from CSS to make disparate package information broadly accessible -.IP \(bu 4 -Unlocks the ability to answer complex, multi-faceted questions about dependencies, their relationships & associative metadata -.IP \(bu 4 -Consolidates redundant logic of similar query commands in \fBnpm\fR (ex. \fBnpm fund\fR, \fBnpm ls\fR, \fBnpm outdated\fR, \fBnpm audit\fR ...) -.RE 0 - -.SS "Dependency Selector Syntax \fBv1.0.0\fR" -.SS "Overview:" -.RS 0 -.IP \(bu 4 -there is no "type" or "tag" selectors (ex. \fBdiv, h1, a\fR) as a dependency/target is the only type of \fBNode\fR that can be queried -.IP \(bu 4 -the term "dependencies" is in reference to any \fBNode\fR found in a \fBtree\fR returned by \fBArborist\fR -.RE 0 - -.SS "Combinators" -.RS 0 -.IP \(bu 4 -\fB>\fR direct descendant/child -.IP \(bu 4 -\fB \fR any descendant/child -.IP \(bu 4 -\fB~\fR sibling -.RE 0 - -.SS "Selectors" -.RS 0 -.IP \(bu 4 -\fB*\fR universal selector -.IP \(bu 4 -\fB#\fR dependency selector (equivalent to \fB\[lB]name="..."\[rB]\fR) -.IP \(bu 4 -\fB#@\fR (equivalent to \fB\[lB]name=\[rB]:semver()\fR) -.IP \(bu 4 -\fB,\fR selector list delimiter -.IP \(bu 4 -\fB.\fR dependency type selector -.IP \(bu 4 -\fB:\fR pseudo selector -.RE 0 - -.SS "Dependency Type Selectors" -.RS 0 -.IP \(bu 4 -\fB.prod\fR dependency found in the \fBdependencies\fR section of \fBpackage.json\fR, or is a child of said dependency -.IP \(bu 4 -\fB.dev\fR dependency found in the \fBdevDependencies\fR section of \fBpackage.json\fR, or is a child of said dependency -.IP \(bu 4 -\fB.optional\fR dependency found in the \fBoptionalDependencies\fR section of \fBpackage.json\fR, or has \fB"optional": true\fR set in its entry in the \fBpeerDependenciesMeta\fR section of \fBpackage.json\fR, or a child of said dependency -.IP \(bu 4 -\fB.peer\fR dependency found in the \fBpeerDependencies\fR section of \fBpackage.json\fR -.IP \(bu 4 -\fB.workspace\fR dependency found in the \fB\fBworkspaces\fR\fR \fI\(lahttps://docs.npmjs.com/cli/v8/using-npm/workspaces\(ra\fR section of \fBpackage.json\fR -.IP \(bu 4 -\fB.bundled\fR dependency found in the \fBbundleDependencies\fR section of \fBpackage.json\fR, or is a child of said dependency -.RE 0 - -.SS "Pseudo Selectors" -.RS 0 -.IP \(bu 4 -\fB\fB:not()\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:not\(ra\fR -.IP \(bu 4 -\fB\fB:has()\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:has\(ra\fR -.IP \(bu 4 -\fB\fB:is()\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:is\(ra\fR -.IP \(bu 4 -\fB\fB:root\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:root\(ra\fR matches the root node/dependency -.IP \(bu 4 -\fB\fB:scope\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:scope\(ra\fR matches node/dependency it was queried against -.IP \(bu 4 -\fB\fB:empty\fR\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/:empty\(ra\fR when a dependency has no dependencies -.IP \(bu 4 -\fB\fB:private\fR\fR \fI\(lahttps://docs.npmjs.com/cli/v8/configuring-npm/package-json#private\(ra\fR when a dependency is private -.IP \(bu 4 -\fB:link\fR when a dependency is linked (for instance, workspaces or packages manually \fB\fBlinked\fR\fR \fI\(lahttps://docs.npmjs.com/cli/v8/commands/npm-link\(ra\fR -.IP \(bu 4 -\fB:deduped\fR when a dependency has been deduped (note that this does \fInot\fR always mean the dependency has been hoisted to the root of node_modules) -.IP \(bu 4 -\fB:overridden\fR when a dependency has been overridden -.IP \(bu 4 -\fB:extraneous\fR when a dependency exists but is not defined as a dependency of any node -.IP \(bu 4 -\fB:invalid\fR when a dependency version is out of its ancestors specified range -.IP \(bu 4 -\fB:missing\fR when a dependency is not found on disk -.IP \(bu 4 -\fB:semver(, \[lB]selector\[rB], \[lB]function\[rB])\fR match a valid \fB\fBnode-semver\fR\fR \fI\(lahttps://github.com/npm/node-semver\(ra\fR version or range to a selector -.IP \(bu 4 -\fB:path()\fR \fBglob\fR \fI\(lahttps://www.npmjs.com/package/glob\(ra\fR matching based on dependencies path relative to the project -.IP \(bu 4 -\fB:type()\fR \fBbased on currently recognized types\fR \fI\(lahttps://github.com/npm/npm-package-arg#result-object\(ra\fR -.IP \(bu 4 -\fB:outdated()\fR when a dependency is outdated -.RE 0 - -.SS "\fB:semver(, \[lB]selector\[rB], \[lB]function\[rB])\fR" -.P -The \fB:semver()\fR pseudo selector allows comparing fields from each node's \fBpackage.json\fR using \fBsemver\fR \fI\(lahttps://github.com/npm/node-semver#readme\(ra\fR methods. It accepts up to 3 parameters, all but the first of which are optional. -.RS 0 -.IP \(bu 4 -\fBspec\fR a semver version or range -.IP \(bu 4 -\fBselector\fR an attribute selector for each node (default \fB\[lB]version\[rB]\fR) -.IP \(bu 4 -\fBfunction\fR a semver method to apply, one of: \fBsatisfies\fR, \fBintersects\fR, \fBsubset\fR, \fBgt\fR, \fBgte\fR, \fBgtr\fR, \fBlt\fR, \fBlte\fR, \fBltr\fR, \fBeq\fR, \fBneq\fR or the special function \fBinfer\fR (default \fBinfer\fR) -.RE 0 - -.P -When the special \fBinfer\fR function is used the \fBspec\fR and the actual value from the node are compared. If both are versions, according to \fBsemver.valid()\fR, \fBeq\fR is used. If both values are ranges, according to \fB!semver.valid()\fR, \fBintersects\fR is used. If the values are mixed types \fBsatisfies\fR is used. -.P -Some examples: -.RS 0 -.IP \(bu 4 -\fB:semver(^1.0.0)\fR returns every node that has a \fBversion\fR satisfied by the provided range \fB^1.0.0\fR -.IP \(bu 4 -\fB:semver(16.0.0, :attr(engines, \[lB]node\[rB]))\fR returns every node which has an \fBengines.node\fR property satisfying the version \fB16.0.0\fR -.IP \(bu 4 -\fB:semver(1.0.0, \[lB]version\[rB], lt)\fR every node with a \fBversion\fR less than \fB1.0.0\fR -.RE 0 - -.SS "\fB:outdated()\fR" -.P -The \fB:outdated\fR pseudo selector retrieves data from the registry and returns information about which of your dependencies are outdated. The type parameter may be one of the following: -.RS 0 -.IP \(bu 4 -\fBany\fR (default) a version exists that is greater than the current one -.IP \(bu 4 -\fBin-range\fR a version exists that is greater than the current one, and satisfies at least one if its dependents -.IP \(bu 4 -\fBout-of-range\fR a version exists that is greater than the current one, does not satisfy at least one of its dependents -.IP \(bu 4 -\fBmajor\fR a version exists that is a semver major greater than the current one -.IP \(bu 4 -\fBminor\fR a version exists that is a semver minor greater than the current one -.IP \(bu 4 -\fBpatch\fR a version exists that is a semver patch greater than the current one -.RE 0 - -.P -In addition to the filtering performed by the pseudo selector, some extra data is added to the resulting objects. The following data can be found under the \fBqueryContext\fR property of each node. -.RS 0 -.IP \(bu 4 -\fBversions\fR an array of every available version of the given node -.IP \(bu 4 -\fBoutdated.inRange\fR an array of objects, each with a \fBfrom\fR and \fBversions\fR, where \fBfrom\fR is the on-disk location of the node that depends on the current node and \fBversions\fR is an array of all available versions that satisfies that dependency. This is only populated if \fB:outdated(in-range)\fR is used. -.IP \(bu 4 -\fBoutdated.outOfRange\fR an array of objects, identical in shape to \fBinRange\fR, but where the \fBversions\fR array is every available version that does not satisfy the dependency. This is only populated if \fB:outdated(out-of-range)\fR is used. -.RE 0 - -.P -Some examples: -.RS 0 -.IP \(bu 4 -\fB:root > :outdated(major)\fR returns every direct dependency that has a new semver major release -.IP \(bu 4 -\fB.prod:outdated(in-range)\fR returns production dependencies that have a new release that satisfies at least one of its edges in -.RE 0 - -.SS "\fBAttribute Selectors\fR \fI\(lahttps://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors\(ra\fR" -.P -The attribute selector evaluates the key/value pairs in \fBpackage.json\fR if they are \fBString\fRs. -.RS 0 -.IP \(bu 4 -\fB\[lB]\[rB]\fR attribute selector (ie. existence of attribute) -.IP \(bu 4 -\fB\[lB]attribute=value\[rB]\fR attribute value is equivalant... -.IP \(bu 4 -\fB\[lB]attribute~=value\[rB]\fR attribute value contains word... -.IP \(bu 4 -\fB\[lB]attribute*=value\[rB]\fR attribute value contains string... -.IP \(bu 4 -\fB\[lB]attribute|=value\[rB]\fR attribute value is equal to or starts with... -.IP \(bu 4 -\fB\[lB]attribute^=value\[rB]\fR attribute value starts with... -.IP \(bu 4 -\fB\[lB]attribute$=value\[rB]\fR attribute value ends with... -.RE 0 - -.SS "\fBArray\fR & \fBObject\fR Attribute Selectors" -.P -The generic \fB:attr()\fR pseudo selector standardizes a pattern which can be used for attribute selection of \fBObject\fRs, \fBArray\fRs or \fBArrays\fR of \fBObject\fRs accessible via \fBArborist\fR's \fBNode.package\fR metadata. This allows for iterative attribute selection beyond top-level \fBString\fR evaluation. The last argument passed to \fB:attr()\fR must be an \fBattribute\fR selector or a nested \fB:attr()\fR. See examples below: -.SS "\fBObjects\fR" -.P -.RS 2 -.nf -/* return dependencies that have a `scripts.test` containing `"tap"` */ -*:attr(scripts, \[lB]test~=tap\[rB]) -.fi -.RE -.SS "Nested \fBObjects\fR" -.P -Nested objects are expressed as sequential arguments to \fB:attr()\fR. -.P -.RS 2 -.nf -/* return dependencies that have a testling config for opera browsers */ -*:attr(testling, browsers, \[lB]~=opera\[rB]) -.fi -.RE -.SS "\fBArrays\fR" -.P -\fBArray\fRs specifically uses a special/reserved \fB.\fR character in place of a typical attribute name. \fBArrays\fR also support exact \fBvalue\fR matching when a \fBString\fR is passed to the selector. -.SS "Example of an \fBArray\fR Attribute Selection:" -.P -.RS 2 -.nf -/* removes the distinction between properties & arrays */ -/* ie. we'd have to check the property & iterate to match selection */ -*:attr(\[lB]keywords^=react\[rB]) -*:attr(contributors, :attr(\[lB]name~=Jordan\[rB])) -.fi -.RE -.SS "Example of an \fBArray\fR matching directly to a value:" -.P -.RS 2 -.nf -/* return dependencies that have the exact keyword "react" */ -/* this is equivalent to `*:keywords(\[lB]value="react"\[rB])` */ -*:attr(\[lB]keywords=react\[rB]) -.fi -.RE -.SS "Example of an \fBArray\fR of \fBObject\fRs:" -.P -.RS 2 -.nf -/* returns */ -*:attr(contributors, \[lB]email=ruyadorno@github.com\[rB]) -.fi -.RE -.SS "Groups" -.P -Dependency groups are defined by the package relationships to their ancestors (ie. the dependency types that are defined in \fBpackage.json\fR). This approach is user-centric as the ecosystem has been taught to think about dependencies in these groups first-and-foremost. Dependencies are allowed to be included in multiple groups (ex. a \fBprod\fR dependency may also be a \fBdev\fR dependency (in that it's also required by another \fBdev\fR dependency) & may also be \fBbundled\fR - a selector for that type of dependency would look like: \fB*.prod.dev.bundled\fR). -.RS 0 -.IP \(bu 4 -\fB.prod\fR -.IP \(bu 4 -\fB.dev\fR -.IP \(bu 4 -\fB.optional\fR -.IP \(bu 4 -\fB.peer\fR -.IP \(bu 4 -\fB.bundled\fR -.IP \(bu 4 -\fB.workspace\fR -.RE 0 - -.P -Please note that currently \fBworkspace\fR deps are always \fBprod\fR dependencies. Additionally the \fB.root\fR dependency is also considered a \fBprod\fR dependency. -.SS "Programmatic Usage" -.RS 0 -.IP \(bu 4 -\fBArborist\fR's \fBNode\fR Class has a \fB.querySelectorAll()\fR method -.RS 4 -.IP \(bu 4 -this method will return a filtered, flattened dependency Arborist \fBNode\fR list based on a valid query selector -.RE 0 - -.RE 0 - -.P -.RS 2 -.nf -const Arborist = require('@npmcli/arborist') -const arb = new Arborist({}) -.fi -.RE -.P -.RS 2 -.nf -// root-level -arb.loadActual().then(async (tree) => { - // query all production dependencies - const results = await tree.querySelectorAll('.prod') - console.log(results) -}) -.fi -.RE -.P -.RS 2 -.nf -// iterative -arb.loadActual().then(async (tree) => { - // query for the deduped version of react - const results = await tree.querySelectorAll('#react:not(:deduped)') - // query the deduped react for git deps - const deps = await results\[lB]0\[rB].querySelectorAll(':type(git)') - console.log(deps) -}) -.fi -.RE -.SH "SEE ALSO" -.RS 0 -.IP \(bu 4 -npm help query -.IP \(bu 4 -\fB@npmcli/arborist\fR \fI\(lahttps://npm.im/@npmcli/arborist\(ra\fR -.RE 0 diff --git a/node_modules/npm/man/man7/developers.7 b/node_modules/npm/man/man7/developers.7 deleted file mode 100644 index 5418e77..0000000 --- a/node_modules/npm/man/man7/developers.7 +++ /dev/null @@ -1,234 +0,0 @@ -.TH "DEVELOPERS" "7" "December 2023" "" "" -.SH "NAME" -\fBdevelopers\fR - Developer Guide -.SS "Description" -.P -So, you've decided to use npm to develop (and maybe publish/deploy) your project. -.P -Fantastic! -.P -There are a few things that you need to do above the simple steps that your users will do to install your program. -.SS "About These Documents" -.P -These are man pages. If you install npm, you should be able to then do \fBman npm-thing\fR to get the documentation on a particular topic, or \fBnpm help thing\fR to see the same information. -.SS "What is a Package" -.P -A package is: -.RS 0 -.IP \(bu 4 -a) a folder containing a program described by a package.json file -.IP \(bu 4 -b) a gzipped tarball containing (a) -.IP \(bu 4 -c) a url that resolves to (b) -.IP \(bu 4 -d) a \fB@\fR that is published on the registry with (c) -.IP \(bu 4 -e) a \fB@\fR that points to (d) -.IP \(bu 4 -f) a \fB\fR that has a "latest" tag satisfying (e) -.IP \(bu 4 -g) a \fBgit\fR url that, when cloned, results in (a). -.RE 0 - -.P -Even if you never publish your package, you can still get a lot of benefits of using npm if you just want to write a node program (a), and perhaps if you also want to be able to easily install it elsewhere after packing it up into a tarball (b). -.P -Git urls can be of the form: -.P -.RS 2 -.nf -git://github.com/user/project.git#commit-ish -git+ssh://user@hostname:project.git#commit-ish -git+http://user@hostname/project/blah.git#commit-ish -git+https://user@hostname/project/blah.git#commit-ish -.fi -.RE -.P -The \fBcommit-ish\fR can be any tag, sha, or branch which can be supplied as an argument to \fBgit checkout\fR. The default is whatever the repository uses as its default branch. -.SS "The package.json File" -.P -You need to have a \fBpackage.json\fR file in the root of your project to do much of anything with npm. That is basically the whole interface. -.P -See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for details about what goes in that file. At the very least, you need: -.RS 0 -.IP \(bu 4 -name: This should be a string that identifies your project. Please do not use the name to specify that it runs on node, or is in JavaScript. You can use the "engines" field to explicitly state the versions of node (or whatever else) that your program requires, and it's pretty well assumed that it's JavaScript. -.P -It does not necessarily need to match your github repository name. -.P -So, \fBnode-foo\fR and \fBbar-js\fR are bad names. \fBfoo\fR or \fBbar\fR are better. -.IP \(bu 4 -version: A semver-compatible version. -.IP \(bu 4 -engines: Specify the versions of node (or whatever else) that your program runs on. The node API changes a lot, and there may be bugs or new functionality that you depend on. Be explicit. -.IP \(bu 4 -author: Take some credit. -.IP \(bu 4 -scripts: If you have a special compilation or installation script, then you should put it in the \fBscripts\fR object. You should definitely have at least a basic smoke-test command as the "scripts.test" field. See npm help scripts. -.IP \(bu 4 -main: If you have a single module that serves as the entry point to your program (like what the "foo" package gives you at require("foo")), then you need to specify that in the "main" field. -.IP \(bu 4 -directories: This is an object mapping names to folders. The best ones to include are "lib" and "doc", but if you use "man" to specify a folder full of man pages, they'll get installed just like these ones. -.RE 0 - -.P -You can use \fBnpm init\fR in the root of your package in order to get you started with a pretty basic package.json file. See npm help init for more info. -.SS "Keeping files \fIout\fR of your Package" -.P -Use a \fB.npmignore\fR file to keep stuff out of your package. If there's no \fB.npmignore\fR file, but there \fIis\fR a \fB.gitignore\fR file, then npm will ignore the stuff matched by the \fB.gitignore\fR file. If you \fIwant\fR to include something that is excluded by your \fB.gitignore\fR file, you can create an empty \fB.npmignore\fR file to override it. Like \fBgit\fR, \fBnpm\fR looks for \fB.npmignore\fR and \fB.gitignore\fR files in all subdirectories of your package, not only the root directory. -.P -\fB.npmignore\fR files follow the \fBsame pattern rules\fR \fI\(lahttps://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring\(ra\fR as \fB.gitignore\fR files: -.RS 0 -.IP \(bu 4 -Blank lines or lines starting with \fB#\fR are ignored. -.IP \(bu 4 -Standard glob patterns work. -.IP \(bu 4 -You can end patterns with a forward slash \fB/\fR to specify a directory. -.IP \(bu 4 -You can negate a pattern by starting it with an exclamation point \fB!\fR. -.RE 0 - -.P -By default, the following paths and files are ignored, so there's no need to add them to \fB.npmignore\fR explicitly: -.RS 0 -.IP \(bu 4 -\fB.*.swp\fR -.IP \(bu 4 -\fB._*\fR -.IP \(bu 4 -\fB.DS_Store\fR -.IP \(bu 4 -\fB.git\fR -.IP \(bu 4 -\fB.gitignore\fR -.IP \(bu 4 -\fB.hg\fR -.IP \(bu 4 -\fB.npmignore\fR -.IP \(bu 4 -\fB.npmrc\fR -.IP \(bu 4 -\fB.lock-wscript\fR -.IP \(bu 4 -\fB.svn\fR -.IP \(bu 4 -\fB.wafpickle-*\fR -.IP \(bu 4 -\fBconfig.gypi\fR -.IP \(bu 4 -\fBCVS\fR -.IP \(bu 4 -\fBnpm-debug.log\fR -.RE 0 - -.P -Additionally, everything in \fBnode_modules\fR is ignored, except for bundled dependencies. npm automatically handles this for you, so don't bother adding \fBnode_modules\fR to \fB.npmignore\fR. -.P -The following paths and files are never ignored, so adding them to \fB.npmignore\fR is pointless: -.RS 0 -.IP \(bu 4 -\fBpackage.json\fR -.IP \(bu 4 -\fBREADME\fR (and its variants) -.IP \(bu 4 -\fBCHANGELOG\fR (and its variants) -.IP \(bu 4 -\fBLICENSE\fR / \fBLICENCE\fR -.RE 0 - -.P -If, given the structure of your project, you find \fB.npmignore\fR to be a maintenance headache, you might instead try populating the \fBfiles\fR property of \fBpackage.json\fR, which is an array of file or directory names that should be included in your package. Sometimes manually picking which items to allow is easier to manage than building a block list. -.SS "Testing whether your \fB.npmignore\fR or \fBfiles\fR config works" -.P -If you want to double check that your package will include only the files you intend it to when published, you can run the \fBnpm pack\fR command locally which will generate a tarball in the working directory, the same way it does for publishing. -.SS "Link Packages" -.P -\fBnpm link\fR is designed to install a development package and see the changes in real time without having to keep re-installing it. (You do need to either re-link or \fBnpm rebuild -g\fR to update compiled packages, of course.) -.P -More info at npm help link. -.SS "Before Publishing: Make Sure Your Package Installs and Works" -.P -\fBThis is important.\fR -.P -If you can not install it locally, you'll have problems trying to publish it. Or, worse yet, you'll be able to publish it, but you'll be publishing a broken or pointless package. So don't do that. -.P -In the root of your package, do this: -.P -.RS 2 -.nf -npm install . -g -.fi -.RE -.P -That'll show you that it's working. If you'd rather just create a symlink package that points to your working directory, then do this: -.P -.RS 2 -.nf -npm link -.fi -.RE -.P -Use \fBnpm ls -g\fR to see if it's there. -.P -To test a local install, go into some other folder, and then do: -.P -.RS 2 -.nf -cd ../some-other-folder -npm install ../my-package -.fi -.RE -.P -to install it locally into the node_modules folder in that other place. -.P -Then go into the node-repl, and try using require("my-thing") to bring in your module's main module. -.SS "Create a User Account" -.P -Create a user with the adduser command. It works like this: -.P -.RS 2 -.nf -npm adduser -.fi -.RE -.P -and then follow the prompts. -.P -This is documented better in npm help adduser. -.SS "Publish your Package" -.P -This part's easy. In the root of your folder, do this: -.P -.RS 2 -.nf -npm publish -.fi -.RE -.P -You can give publish a url to a tarball, or a filename of a tarball, or a path to a folder. -.P -Note that pretty much \fBeverything in that folder will be exposed\fR by default. So, if you have secret stuff in there, use a \fB.npmignore\fR file to list out the globs to ignore, or publish from a fresh checkout. -.SS "Brag about it" -.P -Send emails, write blogs, blab in IRC. -.P -Tell the world how easy it is to install your program! -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help npm -.IP \(bu 4 -npm help init -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help scripts -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help adduser -.IP \(bu 4 -npm help registry -.RE 0 diff --git a/node_modules/npm/man/man7/logging.7 b/node_modules/npm/man/man7/logging.7 deleted file mode 100644 index f049de7..0000000 --- a/node_modules/npm/man/man7/logging.7 +++ /dev/null @@ -1,108 +0,0 @@ -.TH "LOGGING" "7" "December 2023" "" "" -.SH "NAME" -\fBLogging\fR - Why, What & How We Log -.SS "Description" -.P -The \fBnpm\fR CLI has various mechanisms for showing different levels of information back to end-users for certain commands, configurations & environments. -.SS "Setting Log File Location" -.P -All logs are written to a debug log, with the path to that file printed if the execution of a command fails. -.P -The default location of the logs directory is a directory named \fB_logs\fR inside the npm cache. This can be changed with the \fBlogs-dir\fR config option. -.P -For example, if you wanted to write all your logs to the current working directory, you could run: \fBnpm install --logs-dir=.\fR. This is especially helpful in debugging a specific \fBnpm\fR issue as you can run a command multiple times with different config values and then diff all the log files. -.P -Log files will be removed from the \fBlogs-dir\fR when the number of log files exceeds \fBlogs-max\fR, with the oldest logs being deleted first. -.P -To turn off logs completely set \fB--logs-max=0\fR. -.SS "Setting Log Levels" -.SS "\fBloglevel\fR" -.P -\fBloglevel\fR is a global argument/config that can be set to determine the type of information to be displayed. -.P -The default value of \fBloglevel\fR is \fB"notice"\fR but there are several levels/types of logs available, including: -.RS 0 -.IP \(bu 4 -\fB"silent"\fR -.IP \(bu 4 -\fB"error"\fR -.IP \(bu 4 -\fB"warn"\fR -.IP \(bu 4 -\fB"notice"\fR -.IP \(bu 4 -\fB"http"\fR -.IP \(bu 4 -\fB"info"\fR -.IP \(bu 4 -\fB"verbose"\fR -.IP \(bu 4 -\fB"silly"\fR -.RE 0 - -.P -All logs pertaining to a level proceeding the current setting will be shown. -.SS "Aliases" -.P -The log levels listed above have various corresponding aliases, including: -.RS 0 -.IP \(bu 4 -\fB-d\fR: \fB--loglevel info\fR -.IP \(bu 4 -\fB--dd\fR: \fB--loglevel verbose\fR -.IP \(bu 4 -\fB--verbose\fR: \fB--loglevel verbose\fR -.IP \(bu 4 -\fB--ddd\fR: \fB--loglevel silly\fR -.IP \(bu 4 -\fB-q\fR: \fB--loglevel warn\fR -.IP \(bu 4 -\fB--quiet\fR: \fB--loglevel warn\fR -.IP \(bu 4 -\fB-s\fR: \fB--loglevel silent\fR -.IP \(bu 4 -\fB--silent\fR: \fB--loglevel silent\fR -.RE 0 - -.SS "\fBforeground-scripts\fR" -.P -The \fBnpm\fR CLI began hiding the output of lifecycle scripts for \fBnpm install\fR as of \fBv7\fR. Notably, this means you will not see logs/output from packages that may be using "install scripts" to display information back to you or from your own project's scripts defined in \fBpackage.json\fR. If you'd like to change this behavior & log this output you can set \fBforeground-scripts\fR to \fBtrue\fR. -.SS "Timing Information" -.P -The \fB\fB--timing\fR config\fR \fI\(la/using-npm/config#timing\(ra\fR can be set which does a few things: -.RS 0 -.IP 1. 4 -Always shows the full path to the debug log regardless of command exit status -.IP 2. 4 -Write timing information to a process specific timing file in the cache or \fBlogs-dir\fR -.IP 3. 4 -Output timing information to the terminal -.RE 0 - -.P -This file contains a \fBtimers\fR object where the keys are an identifier for the portion of the process being timed and the value is the number of milliseconds it took to complete. -.P -Sometimes it is helpful to get timing information without outputting anything to the terminal. For example, the performance might be affected by writing to the terminal. In this case you can use \fB--timing --silent\fR which will still write the timing file, but not output anything to the terminal while running. -.SS "Registry Response Headers" -.SS "\fBnpm-notice\fR" -.P -The \fBnpm\fR CLI reads from & logs any \fBnpm-notice\fR headers that are returned from the configured registry. This mechanism can be used by third-party registries to provide useful information when network-dependent requests occur. -.P -This header is not cached, and will not be logged if the request is served from the cache. -.SS "Logs and Sensitive Information" -.P -The \fBnpm\fR CLI makes a best effort to redact the following from terminal output and log files: -.RS 0 -.IP \(bu 4 -Passwords inside basic auth URLs -.IP \(bu 4 -npm tokens -.RE 0 - -.P -However, this behavior should not be relied on to keep all possible sensitive information redacted. If you are concerned about secrets in your log file or terminal output, you can use \fB--loglevel=silent\fR and \fB--logs-max=0\fR to ensure no logs are written to your terminal or filesystem. -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/man/man7/orgs.7 b/node_modules/npm/man/man7/orgs.7 deleted file mode 100644 index c2acfce..0000000 --- a/node_modules/npm/man/man7/orgs.7 +++ /dev/null @@ -1,145 +0,0 @@ -.TH "ORGS" "7" "December 2023" "" "" -.SH "NAME" -\fBorgs\fR - Working with Teams & Orgs -.SS "Description" -.P -There are three levels of org users: -.RS 0 -.IP 1. 4 -Super admin, controls billing & adding people to the org. -.IP 2. 4 -Team admin, manages team membership & package access. -.IP 3. 4 -Developer, works on packages they are given access to. -.RE 0 - -.P -The super admin is the only person who can add users to the org because it impacts the monthly bill. The super admin will use the website to manage membership. Every org has a \fBdevelopers\fR team that all users are automatically added to. -.P -The team admin is the person who manages team creation, team membership, and package access for teams. The team admin grants package access to teams, not individuals. -.P -The developer will be able to access packages based on the teams they are on. Access is either read-write or read-only. -.P -There are two main commands: -.RS 0 -.IP 1. 4 -\fBnpm team\fR see npm help team for more details -.IP 2. 4 -\fBnpm access\fR see npm help access for more details -.RE 0 - -.SS "Team Admins create teams" -.RS 0 -.IP \(bu 4 -Check who you\[cq]ve added to your org: -.RE 0 - -.P -.RS 2 -.nf -npm team ls :developers -.fi -.RE -.RS 0 -.IP \(bu 4 -Each org is automatically given a \fBdevelopers\fR team, so you can see the whole list of team members in your org. This team automatically gets read-write access to all packages, but you can change that with the \fBaccess\fR command. -.IP \(bu 4 -Create a new team: -.RE 0 - -.P -.RS 2 -.nf -npm team create -.fi -.RE -.RS 0 -.IP \(bu 4 -Add members to that team: -.RE 0 - -.P -.RS 2 -.nf -npm team add -.fi -.RE -.SS "Publish a package and adjust package access" -.RS 0 -.IP \(bu 4 -In package directory, run -.RE 0 - -.P -.RS 2 -.nf -npm init --scope= -.fi -.RE -.P -to scope it for your org & publish as usual -.RS 0 -.IP \(bu 4 -Grant access: -.RE 0 - -.P -.RS 2 -.nf -npm access grant \[lB]\[rB] -.fi -.RE -.RS 0 -.IP \(bu 4 -Revoke access: -.RE 0 - -.P -.RS 2 -.nf -npm access revoke \[lB]\[rB] -.fi -.RE -.SS "Monitor your package access" -.RS 0 -.IP \(bu 4 -See what org packages a team member can access: -.RE 0 - -.P -.RS 2 -.nf -npm access ls-packages -.fi -.RE -.RS 0 -.IP \(bu 4 -See packages available to a specific team: -.RE 0 - -.P -.RS 2 -.nf -npm access ls-packages -.fi -.RE -.RS 0 -.IP \(bu 4 -Check which teams are collaborating on a package: -.RE 0 - -.P -.RS 2 -.nf -npm access ls-collaborators -.fi -.RE -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help team -.IP \(bu 4 -npm help access -.IP \(bu 4 -npm help scope -.RE 0 diff --git a/node_modules/npm/man/man7/package-spec.7 b/node_modules/npm/man/man7/package-spec.7 deleted file mode 100644 index 07765e1..0000000 --- a/node_modules/npm/man/man7/package-spec.7 +++ /dev/null @@ -1,126 +0,0 @@ -.TH "PACKAGE-SPEC" "7" "December 2023" "" "" -.SH "NAME" -\fBpackage-spec\fR - Package name specifier -.SS "Description" -.P -Commands like \fBnpm install\fR and the dependency sections in the \fBpackage.json\fR use a package name specifier. This can be many different things that all refer to a "package". Examples include a package name, git url, tarball, or local directory. These will generally be referred to as \fB\fR in the help output for the npm commands that use this package name specifier. -.SS "Package name" -.RS 0 -.IP \(bu 4 -\fB\[lB]<@scope>/\[rB]\fR -.IP \(bu 4 -\fB\[lB]<@scope>/\[rB]@\fR -.IP \(bu 4 -\fB\[lB]<@scope>/\[rB]@\fR -.IP \(bu 4 -\fB\[lB]<@scope>/\[rB]@\fR -.RE 0 - -.P -Refers to a package by name, with or without a scope, and optionally tag, version, or version range. This is typically used in combination with the \fBregistry\fR \fI\(la/using-npm/config#registry\(ra\fR config to refer to a package in a registry. -.P -Examples: -.RS 0 -.IP \(bu 4 -\fBnpm\fR -.IP \(bu 4 -\fB@npmcli/arborist\fR -.IP \(bu 4 -\fB@npmcli/arborist@latest\fR -.IP \(bu 4 -\fBnpm@6.13.1\fR -.IP \(bu 4 -\fBnpm@^4.0.0\fR -.RE 0 - -.SS "Aliases" -.RS 0 -.IP \(bu 4 -\fB@npm:\fR -.RE 0 - -.P -Primarily used by commands like \fBnpm install\fR and in the dependency sections in the \fBpackage.json\fR, this refers to a package by an alias. The \fB\fR is the name of the package as it is reified in the \fBnode_modules\fR folder, and the \fB\fR refers to a package name as found in the configured registry. -.P -See \fBPackage name\fR above for more info on referring to a package by name, and \fBregistry\fR \fI\(la/using-npm/config#registry\(ra\fR for configuring which registry is used when referring to a package by name. -.P -Examples: -.RS 0 -.IP \(bu 4 -\fBsemver:@npm:@npmcli/semver-with-patch\fR -.IP \(bu 4 -\fBsemver:@npm:semver@7.2.2\fR -.IP \(bu 4 -\fBsemver:@npm:semver@legacy\fR -.RE 0 - -.SS "Folders" -.RS 0 -.IP \(bu 4 -\fB\fR -.RE 0 - -.P -This refers to a package on the local filesystem. Specifically this is a folder with a \fBpackage.json\fR file in it. This \fIshould\fR always be prefixed with a \fB/\fR or \fB./\fR (or your OS equivalent) to reduce confusion. npm currently will parse a string with more than one \fB/\fR in it as a folder, but this is legacy behavior that may be removed in a future version. -.P -Examples: -.RS 0 -.IP \(bu 4 -\fB./my-package\fR -.IP \(bu 4 -\fB/opt/npm/my-package\fR -.RE 0 - -.SS "Tarballs" -.RS 0 -.IP \(bu 4 -\fB\fR -.IP \(bu 4 -\fB\fR -.RE 0 - -.P -Examples: -.RS 0 -.IP \(bu 4 -\fB./my-package.tgz\fR -.IP \(bu 4 -\fBhttps://registry.npmjs.org/semver/-/semver-1.0.0.tgz\fR -.RE 0 - -.P -Refers to a package in a tarball format, either on the local filesystem or remotely via url. This is the format that packages exist in when uploaded to a registry. -.SS "git urls" -.RS 0 -.IP \(bu 4 -\fB\fR -.IP \(bu 4 -\fB/\fR -.RE 0 - -.P -Refers to a package in a git repo. This can be a full git url, git shorthand, or a username/package on GitHub. You can specify a git tag, branch, or other git ref by appending \fB#ref\fR. -.P -Examples: -.RS 0 -.IP \(bu 4 -\fBhttps://github.com/npm/cli.git\fR -.IP \(bu 4 -\fBgit@github.com:npm/cli.git\fR -.IP \(bu 4 -\fBgit+ssh://git@github.com/npm/cli#v6.0.0\fR -.IP \(bu 4 -\fBgithub:npm/cli#HEAD\fR -.IP \(bu 4 -\fBnpm/cli#c12ea07\fR -.RE 0 - -.SS "See also" -.RS 0 -.IP \(bu 4 -\fBnpm-package-arg\fR \fI\(lahttps://npm.im/npm-package-arg\(ra\fR -.IP \(bu 4 -npm help scope -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/man/man7/registry.7 b/node_modules/npm/man/man7/registry.7 deleted file mode 100644 index b0e758b..0000000 --- a/node_modules/npm/man/man7/registry.7 +++ /dev/null @@ -1,51 +0,0 @@ -.TH "REGISTRY" "7" "December 2023" "" "" -.SH "NAME" -\fBregistry\fR - The JavaScript Package Registry -.SS "Description" -.P -To resolve packages by name and version, npm talks to a registry website that implements the CommonJS Package Registry specification for reading package info. -.P -npm is configured to use the \fBnpm public registry\fR at \fI\(lahttps://registry.npmjs.org\(ra\fR by default. Use of the npm public registry is subject to terms of use available at \fI\(lahttps://docs.npmjs.com/policies/terms\(ra\fR. -.P -You can configure npm to use any compatible registry you like, and even run your own registry. Use of someone else's registry may be governed by their terms of use. -.P -npm's package registry implementation supports several write APIs as well, to allow for publishing packages and managing user account information. -.P -The npm public registry is powered by a CouchDB database, of which there is a public mirror at \fI\(lahttps://skimdb.npmjs.com/registry\(ra\fR. -.P -The registry URL used is determined by the scope of the package (see npm help scope. If no scope is specified, the default registry is used, which is supplied by the \fB\fBregistry\fR config\fR \fI\(la/using-npm/config#registry\(ra\fR parameter. See npm help config, npm help npmrc, and npm help config for more on managing npm's configuration. Authentication configuration such as auth tokens and certificates are configured specifically scoped to an individual registry. See \fBAuth Related Configuration\fR \fI\(la/configuring-npm/npmrc#auth-related-configuration\(ra\fR -.P -When the default registry is used in a package-lock or shrinkwrap it has the special meaning of "the currently configured registry". If you create a lock file while using the default registry you can switch to another registry and npm will install packages from the new registry, but if you create a lock file while using a custom registry packages will be installed from that registry even after you change to another registry. -.SS "Does npm send any information about me back to the registry?" -.P -Yes. -.P -When making requests of the registry npm adds two headers with information about your environment: -.RS 0 -.IP \(bu 4 -\fBNpm-Scope\fR \[en] If your project is scoped, this header will contain its scope. In the future npm hopes to build registry features that use this information to allow you to customize your experience for your organization. -.IP \(bu 4 -\fBNpm-In-CI\fR \[en] Set to "true" if npm believes this install is running in a continuous integration environment, "false" otherwise. This is detected by looking for the following environment variables: \fBCI\fR, \fBTDDIUM\fR, \fBJENKINS_URL\fR, \fBbamboo.buildKey\fR. If you'd like to learn more you may find the \fBoriginal PR\fR \fI\(lahttps://github.com/npm/npm-registry-client/pull/129\(ra\fR interesting. This is used to gather better metrics on how npm is used by humans, versus build farms. -.RE 0 - -.P -The npm registry does not try to correlate the information in these headers with any authenticated accounts that may be used in the same requests. -.SS "How can I prevent my package from being published in the official registry?" -.P -Set \fB"private": true\fR in your \fBpackage.json\fR to prevent it from being published at all, or \fB"publishConfig":{"registry":"http://my-internal-registry.local"}\fR to force it to be published only to your internal/private registry. -.P -See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for more info on what goes in the package.json file. -.SS "Where can I find my (and others') published packages?" -.P -\fI\(lahttps://www.npmjs.com/\(ra\fR -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help config -.IP \(bu 4 -npm help npmrc -.IP \(bu 4 -npm help developers -.RE 0 diff --git a/node_modules/npm/man/man7/removal.7 b/node_modules/npm/man/man7/removal.7 deleted file mode 100644 index ba985ad..0000000 --- a/node_modules/npm/man/man7/removal.7 +++ /dev/null @@ -1,60 +0,0 @@ -.TH "REMOVAL" "7" "December 2023" "" "" -.SH "NAME" -\fBremoval\fR - Cleaning the Slate -.SS "Synopsis" -.P -So sad to see you go. -.P -.RS 2 -.nf -sudo npm uninstall npm -g -.fi -.RE -.P -Or, if that fails, get the npm source code, and do: -.P -.RS 2 -.nf -sudo make uninstall -.fi -.RE -.SS "More Severe Uninstalling" -.P -Usually, the above instructions are sufficient. That will remove npm, but leave behind anything you've installed. -.P -If that doesn't work, or if you require more drastic measures, continue reading. -.P -Note that this is only necessary for globally-installed packages. Local installs are completely contained within a project's \fBnode_modules\fR folder. Delete that folder, and everything is gone unless a package's install script is particularly ill-behaved. -.P -This assumes that you installed node and npm in the default place. If you configured node with a different \fB--prefix\fR, or installed npm with a different prefix setting, then adjust the paths accordingly, replacing \fB/usr/local\fR with your install prefix. -.P -To remove everything npm-related manually: -.P -.RS 2 -.nf -rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm* -.fi -.RE -.P -If you installed things \fIwith\fR npm, then your best bet is to uninstall them with npm first, and then install them again once you have a proper install. This can help find any symlinks that are lying around: -.P -.RS 2 -.nf -ls -laF /usr/local/{lib/node{,/.npm},bin,share/man} | grep npm -.fi -.RE -.P -Prior to version 0.3, npm used shim files for executables and node modules. To track those down, you can do the following: -.P -.RS 2 -.nf -find /usr/local/{lib/node,bin} -exec grep -l npm \[rs]{\[rs]} \[rs]; ; -.fi -.RE -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help uninstall -.IP \(bu 4 -npm help prune -.RE 0 diff --git a/node_modules/npm/man/man7/scope.7 b/node_modules/npm/man/man7/scope.7 deleted file mode 100644 index 927adae..0000000 --- a/node_modules/npm/man/man7/scope.7 +++ /dev/null @@ -1,113 +0,0 @@ -.TH "SCOPE" "7" "December 2023" "" "" -.SH "NAME" -\fBscope\fR - Scoped packages -.SS "Description" -.P -All npm packages have a name. Some package names also have a scope. A scope follows the usual rules for package names (URL-safe characters, no leading dots or underscores). When used in package names, scopes are preceded by an \fB@\fR symbol and followed by a slash, e.g. -.P -.RS 2 -.nf -@somescope/somepackagename -.fi -.RE -.P -Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package. -.P -Each npm user/organization has their own scope, and only you can add packages in your scope. This means you don't have to worry about someone taking your package name ahead of you. Thus it is also a good way to signal official packages for organizations. -.P -Scoped packages can be published and installed as of \fBnpm@2\fR and are supported by the primary npm registry. Unscoped packages can depend on scoped packages and vice versa. The npm client is backwards-compatible with unscoped registries, so it can be used to work with scoped and unscoped registries at the same time. -.SS "Installing scoped packages" -.P -Scoped packages are installed to a sub-folder of the regular installation folder, e.g. if your other packages are installed in \fBnode_modules/packagename\fR, scoped modules will be installed in \fBnode_modules/@myorg/packagename\fR. The scope folder (\fB@myorg\fR) is simply the name of the scope preceded by an \fB@\fR symbol, and can contain any number of scoped packages. -.P -A scoped package is installed by referencing it by name, preceded by an \fB@\fR symbol, in \fBnpm install\fR: -.P -.RS 2 -.nf -npm install @myorg/mypackage -.fi -.RE -.P -Or in \fBpackage.json\fR: -.P -.RS 2 -.nf -"dependencies": { - "@myorg/mypackage": "^1.3.0" -} -.fi -.RE -.P -Note that if the \fB@\fR symbol is omitted, in either case, npm will instead attempt to install from GitHub; see npm help install. -.SS "Requiring scoped packages" -.P -Because scoped packages are installed into a scope folder, you have to include the name of the scope when requiring them in your code, e.g. -.P -.RS 2 -.nf -require('@myorg/mypackage') -.fi -.RE -.P -There is nothing special about the way Node treats scope folders. This simply requires the \fBmypackage\fR module in the folder named \fB@myorg\fR. -.SS "Publishing scoped packages" -.P -Scoped packages can be published from the CLI as of \fBnpm@2\fR and can be published to any registry that supports them, including the primary npm registry. -.P -(As of 2015-04-19, and with npm 2.0 or better, the primary npm registry \fBdoes\fR support scoped packages.) -.P -If you wish, you may associate a scope with a registry; see below. -.SS "Publishing public scoped packages to the primary npm registry" -.P -Publishing to a scope, you have two options: -.RS 0 -.IP \(bu 4 -Publishing to your user scope (example: \fB@username/module\fR) -.IP \(bu 4 -Publishing to an organization scope (example: \fB@org/module\fR) -.RE 0 - -.P -If publishing a public module to an organization scope, you must first either create an organization with the name of the scope that you'd like to publish to or be added to an existing organization with the appropriate permissions. For example, if you'd like to publish to \fB@org\fR, you would need to create the \fBorg\fR organization on npmjs.com prior to trying to publish. -.P -Scoped packages are not public by default. You will need to specify \fB--access public\fR with the initial \fBnpm publish\fR command. This will publish the package and set access to \fBpublic\fR as if you had run \fBnpm access public\fR after publishing. You do not need to do this when publishing new versions of an existing scoped package. -.SS "Publishing private scoped packages to the npm registry" -.P -To publish a private scoped package to the npm registry, you must have an \fBnpm Private Modules\fR \fI\(lahttps://docs.npmjs.com/private-modules/intro\(ra\fR account. -.P -You can then publish the module with \fBnpm publish\fR or \fBnpm publish ---access restricted\fR, and it will be present in the npm registry, with restricted access. You can then change the access permissions, if desired, with \fBnpm access\fR or on the npmjs.com website. -.SS "Associating a scope with a registry" -.P -Scopes can be associated with a separate registry. This allows you to seamlessly use a mix of packages from the primary npm registry and one or more private registries, such as \fBGitHub Packages\fR \fI\(lahttps://github.com/features/packages\(ra\fR or the open source \fBVerdaccio\fR \fI\(lahttps://verdaccio.org\(ra\fR project. -.P -You can associate a scope with a registry at login, e.g. -.P -.RS 2 -.nf -npm login --registry=http://reg.example.com --scope=@myco -.fi -.RE -.P -Scopes have a many-to-one relationship with registries: one registry can host multiple scopes, but a scope only ever points to one registry. -.P -You can also associate a scope with a registry using \fBnpm config\fR: -.P -.RS 2 -.nf -npm config set @myco:registry http://reg.example.com -.fi -.RE -.P -Once a scope is associated with a registry, any \fBnpm install\fR for a package with that scope will request packages from that registry instead. Any \fBnpm publish\fR for a package name that contains the scope will be published to that registry instead. -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help access -.IP \(bu 4 -npm help registry -.RE 0 diff --git a/node_modules/npm/man/man7/scripts.7 b/node_modules/npm/man/man7/scripts.7 deleted file mode 100644 index 1c6c4b3..0000000 --- a/node_modules/npm/man/man7/scripts.7 +++ /dev/null @@ -1,407 +0,0 @@ -.TH "SCRIPTS" "7" "December 2023" "" "" -.SH "NAME" -\fBscripts\fR - How npm handles the "scripts" field -.SS "Description" -.P -The \fB"scripts"\fR property of your \fBpackage.json\fR file supports a number of built-in scripts and their preset life cycle events as well as arbitrary scripts. These all can be executed by running \fBnpm run-script \fR or \fBnpm run \fR for short. \fIPre\fR and \fIpost\fR commands with matching names will be run for those as well (e.g. \fBpremyscript\fR, \fBmyscript\fR, \fBpostmyscript\fR). Scripts from dependencies can be run with \fBnpm explore -- npm run \fR. -.SS "Pre & Post Scripts" -.P -To create "pre" or "post" scripts for any scripts defined in the \fB"scripts"\fR section of the \fBpackage.json\fR, simply create another script \fIwith a matching name\fR and add "pre" or "post" to the beginning of them. -.P -.RS 2 -.nf -{ - "scripts": { - "precompress": "{{ executes BEFORE the `compress` script }}", - "compress": "{{ run command to compress files }}", - "postcompress": "{{ executes AFTER `compress` script }}" - } -} -.fi -.RE -.P -In this example \fBnpm run compress\fR would execute these scripts as described. -.SS "Life Cycle Scripts" -.P -There are some special life cycle scripts that happen only in certain situations. These scripts happen in addition to the \fBpre\fR, \fBpost\fR, and \fB\fR scripts. -.RS 0 -.IP \(bu 4 -\fBprepare\fR, \fBprepublish\fR, \fBprepublishOnly\fR, \fBprepack\fR, \fBpostpack\fR, \fBdependencies\fR -.RE 0 - -.P -\fBprepare\fR (since \fBnpm@4.0.0\fR) -.RS 0 -.IP \(bu 4 -Runs BEFORE the package is packed, i.e. during \fBnpm publish\fR and \fBnpm pack\fR -.IP \(bu 4 -Runs on local \fBnpm install\fR without any arguments -.IP \(bu 4 -Runs AFTER \fBprepublish\fR, but BEFORE \fBprepublishOnly\fR -.IP \(bu 4 -NOTE: If a package being installed through git contains a \fBprepare\fR script, its \fBdependencies\fR and \fBdevDependencies\fR will be installed, and the prepare script will be run, before the package is packaged and installed. -.IP \(bu 4 -As of \fBnpm@7\fR these scripts run in the background. To see the output, run with: \fB--foreground-scripts\fR. -.RE 0 - -.P -\fBprepublish\fR (DEPRECATED) -.RS 0 -.IP \(bu 4 -Does not run during \fBnpm publish\fR, but does run during \fBnpm ci\fR and \fBnpm install\fR. See below for more info. -.RE 0 - -.P -\fBprepublishOnly\fR -.RS 0 -.IP \(bu 4 -Runs BEFORE the package is prepared and packed, ONLY on \fBnpm publish\fR. -.RE 0 - -.P -\fBprepack\fR -.RS 0 -.IP \(bu 4 -Runs BEFORE a tarball is packed (on "\fBnpm pack\fR", "\fBnpm publish\fR", and when installing a git dependency). -.IP \(bu 4 -NOTE: "\fBnpm run pack\fR" is NOT the same as "\fBnpm pack\fR". "\fBnpm run pack\fR" is an arbitrary user defined script name, where as, "\fBnpm pack\fR" is a CLI defined command. -.RE 0 - -.P -\fBpostpack\fR -.RS 0 -.IP \(bu 4 -Runs AFTER the tarball has been generated but before it is moved to its final destination (if at all, publish does not save the tarball locally) -.RE 0 - -.P -\fBdependencies\fR -.RS 0 -.IP \(bu 4 -Runs AFTER any operations that modify the \fBnode_modules\fR directory IF changes occurred. -.IP \(bu 4 -Does NOT run in global mode -.RE 0 - -.SS "Prepare and Prepublish" -.P -\fBDeprecation Note: prepublish\fR -.P -Since \fBnpm@1.1.71\fR, the npm CLI has run the \fBprepublish\fR script for both \fBnpm publish\fR and \fBnpm install\fR, because it's a convenient way to prepare a package for use (some common use cases are described in the section below). It has also turned out to be, in practice, \fBvery confusing\fR \fI\(lahttps://github.com/npm/npm/issues/10074\(ra\fR. As of \fBnpm@4.0.0\fR, a new event has been introduced, \fBprepare\fR, that preserves this existing behavior. A \fInew\fR event, \fBprepublishOnly\fR has been added as a transitional strategy to allow users to avoid the confusing behavior of existing npm versions and only run on \fBnpm publish\fR (for instance, running the tests one last time to ensure they're in good shape). -.P -See \fI\(lahttps://github.com/npm/npm/issues/10074\(ra\fR for a much lengthier justification, with further reading, for this change. -.P -\fBUse Cases\fR -.P -If you need to perform operations on your package before it is used, in a way that is not dependent on the operating system or architecture of the target system, use a \fBprepublish\fR script. This includes tasks such as: -.RS 0 -.IP \(bu 4 -Compiling CoffeeScript source code into JavaScript. -.IP \(bu 4 -Creating minified versions of JavaScript source code. -.IP \(bu 4 -Fetching remote resources that your package will use. -.RE 0 - -.P -The advantage of doing these things at \fBprepublish\fR time is that they can be done once, in a single place, thus reducing complexity and variability. Additionally, this means that: -.RS 0 -.IP \(bu 4 -You can depend on \fBcoffee-script\fR as a \fBdevDependency\fR, and thus your users don't need to have it installed. -.IP \(bu 4 -You don't need to include minifiers in your package, reducing the size for your users. -.IP \(bu 4 -You don't need to rely on your users having \fBcurl\fR or \fBwget\fR or other system tools on the target machines. -.RE 0 - -.SS "Dependencies" -.P -The \fBdependencies\fR script is run any time an \fBnpm\fR command causes changes to the \fBnode_modules\fR directory. It is run AFTER the changes have been applied and the \fBpackage.json\fR and \fBpackage-lock.json\fR files have been updated. -.SS "Life Cycle Operation Order" -.SS "npm help \"cache add\"" -.RS 0 -.IP \(bu 4 -\fBprepare\fR -.RE 0 - -.SS "npm help ci" -.RS 0 -.IP \(bu 4 -\fBpreinstall\fR -.IP \(bu 4 -\fBinstall\fR -.IP \(bu 4 -\fBpostinstall\fR -.IP \(bu 4 -\fBprepublish\fR -.IP \(bu 4 -\fBpreprepare\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBpostprepare\fR -.RE 0 - -.P -These all run after the actual installation of modules into \fBnode_modules\fR, in order, with no internal actions happening in between -.SS "npm help diff" -.RS 0 -.IP \(bu 4 -\fBprepare\fR -.RE 0 - -.SS "npm help install" -.P -These also run when you run \fBnpm install -g \fR -.RS 0 -.IP \(bu 4 -\fBpreinstall\fR -.IP \(bu 4 -\fBinstall\fR -.IP \(bu 4 -\fBpostinstall\fR -.IP \(bu 4 -\fBprepublish\fR -.IP \(bu 4 -\fBpreprepare\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBpostprepare\fR -.RE 0 - -.P -If there is a \fBbinding.gyp\fR file in the root of your package and you haven't defined your own \fBinstall\fR or \fBpreinstall\fR scripts, npm will default the \fBinstall\fR command to compile using node-gyp via \fBnode-gyp -rebuild\fR -.P -These are run from the scripts of \fB\fR -.SS "npm help pack" -.RS 0 -.IP \(bu 4 -\fBprepack\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBpostpack\fR -.RE 0 - -.SS "npm help publish" -.RS 0 -.IP \(bu 4 -\fBprepublishOnly\fR -.IP \(bu 4 -\fBprepack\fR -.IP \(bu 4 -\fBprepare\fR -.IP \(bu 4 -\fBpostpack\fR -.IP \(bu 4 -\fBpublish\fR -.IP \(bu 4 -\fBpostpublish\fR -.RE 0 - -.SS "npm help rebuild" -.RS 0 -.IP \(bu 4 -\fBpreinstall\fR -.IP \(bu 4 -\fBinstall\fR -.IP \(bu 4 -\fBpostinstall\fR -.IP \(bu 4 -\fBprepare\fR -.RE 0 - -.P -\fBprepare\fR is only run if the current directory is a symlink (e.g. with linked packages) -.SS "npm help restart" -.P -If there is a \fBrestart\fR script defined, these events are run, otherwise \fBstop\fR and \fBstart\fR are both run if present, including their \fBpre\fR and \fBpost\fR iterations) -.RS 0 -.IP \(bu 4 -\fBprerestart\fR -.IP \(bu 4 -\fBrestart\fR -.IP \(bu 4 -\fBpostrestart\fR -.RE 0 - -.SS "\fB\fBnpm run \fR\fR \fI\(la/commands/npm-run-script\(ra\fR" -.RS 0 -.IP \(bu 4 -\fBpre\fR -.IP \(bu 4 -\fB\fR -.IP \(bu 4 -\fBpost\fR -.RE 0 - -.SS "npm help start" -.RS 0 -.IP \(bu 4 -\fBprestart\fR -.IP \(bu 4 -\fBstart\fR -.IP \(bu 4 -\fBpoststart\fR -.RE 0 - -.P -If there is a \fBserver.js\fR file in the root of your package, then npm will default the \fBstart\fR command to \fBnode server.js\fR. \fBprestart\fR and \fBpoststart\fR will still run in this case. -.SS "npm help stop" -.RS 0 -.IP \(bu 4 -\fBprestop\fR -.IP \(bu 4 -\fBstop\fR -.IP \(bu 4 -\fBpoststop\fR -.RE 0 - -.SS "npm help test" -.RS 0 -.IP \(bu 4 -\fBpretest\fR -.IP \(bu 4 -\fBtest\fR -.IP \(bu 4 -\fBposttest\fR -.RE 0 - -.SS "npm help version" -.RS 0 -.IP \(bu 4 -\fBpreversion\fR -.IP \(bu 4 -\fBversion\fR -.IP \(bu 4 -\fBpostversion\fR -.RE 0 - -.SS "A Note on a lack of npm help uninstall scripts" -.P -While npm v6 had \fBuninstall\fR lifecycle scripts, npm v7 does not. Removal of a package can happen for a wide variety of reasons, and there's no clear way to currently give the script enough context to be useful. -.P -Reasons for a package removal include: -.RS 0 -.IP \(bu 4 -a user directly uninstalled this package -.IP \(bu 4 -a user uninstalled a dependant package and so this dependency is being uninstalled -.IP \(bu 4 -a user uninstalled a dependant package but another package also depends on this version -.IP \(bu 4 -this version has been merged as a duplicate with another version -.IP \(bu 4 -etc. -.RE 0 - -.P -Due to the lack of necessary context, \fBuninstall\fR lifecycle scripts are not implemented and will not function. -.SS "User" -.P -When npm is run as root, scripts are always run with the effective uid and gid of the working directory owner. -.SS "Environment" -.P -Package scripts run in an environment where many pieces of information are made available regarding the setup of npm and the current state of the process. -.SS "path" -.P -If you depend on modules that define executable scripts, like test suites, then those executables will be added to the \fBPATH\fR for executing the scripts. So, if your package.json has this: -.P -.RS 2 -.nf -{ - "name" : "foo", - "dependencies" : { - "bar" : "0.1.x" - }, - "scripts": { - "start" : "bar ./test" - } -} -.fi -.RE -.P -then you could run \fBnpm start\fR to execute the \fBbar\fR script, which is exported into the \fBnode_modules/.bin\fR directory on \fBnpm install\fR. -.SS "package.json vars" -.P -The package.json fields are tacked onto the \fBnpm_package_\fR prefix. So, for instance, if you had \fB{"name":"foo", "version":"1.2.5"}\fR in your package.json file, then your package scripts would have the \fBnpm_package_name\fR environment variable set to "foo", and the \fBnpm_package_version\fR set to "1.2.5". You can access these variables in your code with \fBprocess.env.npm_package_name\fR and \fBprocess.env.npm_package_version\fR, and so on for other fields. -.P -See \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR for more on package configs. -.SS "current lifecycle event" -.P -Lastly, the \fBnpm_lifecycle_event\fR environment variable is set to whichever stage of the cycle is being executed. So, you could have a single script used for different parts of the process which switches based on what's currently happening. -.P -Objects are flattened following this format, so if you had \fB{"scripts":{"install":"foo.js"}}\fR in your package.json, then you'd see this in the script: -.P -.RS 2 -.nf -process.env.npm_package_scripts_install === "foo.js" -.fi -.RE -.SS "Examples" -.P -For example, if your package.json contains this: -.P -.RS 2 -.nf -{ - "scripts" : { - "install" : "scripts/install.js", - "postinstall" : "scripts/install.js", - "uninstall" : "scripts/uninstall.js" - } -} -.fi -.RE -.P -then \fBscripts/install.js\fR will be called for the install and post-install stages of the lifecycle, and \fBscripts/uninstall.js\fR will be called when the package is uninstalled. Since \fBscripts/install.js\fR is running for two different phases, it would be wise in this case to look at the \fBnpm_lifecycle_event\fR environment variable. -.P -If you want to run a make command, you can do so. This works just fine: -.P -.RS 2 -.nf -{ - "scripts" : { - "preinstall" : "./configure", - "install" : "make && make install", - "test" : "make test" - } -} -.fi -.RE -.SS "Exiting" -.P -Scripts are run by passing the line as a script argument to \fBsh\fR. -.P -If the script exits with a code other than 0, then this will abort the process. -.P -Note that these script files don't have to be Node.js or even JavaScript programs. They just have to be some kind of executable file. -.SS "Best Practices" -.RS 0 -.IP \(bu 4 -Don't exit with a non-zero error code unless you \fIreally\fR mean it. Except for uninstall scripts, this will cause the npm action to fail, and potentially be rolled back. If the failure is minor or only will prevent some optional features, then it's better to just print a warning and exit successfully. -.IP \(bu 4 -Try not to use scripts to do what npm can do for you. Read through \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json\(ra\fR to see all the things that you can specify and enable by simply describing your package appropriately. In general, this will lead to a more robust and consistent state. -.IP \(bu 4 -Inspect the env to determine where to put things. For instance, if the \fBnpm_config_binroot\fR environment variable is set to \fB/home/user/bin\fR, then don't try to install executables into \fB/usr/local/bin\fR. The user probably set it up that way for a reason. -.IP \(bu 4 -Don't prefix your script commands with "sudo". If root permissions are required for some reason, then it'll fail with that error, and the user will sudo the npm command in question. -.IP \(bu 4 -Don't use \fBinstall\fR. Use a \fB.gyp\fR file for compilation, and \fBprepare\fR for anything else. You should almost never have to explicitly set a preinstall or install script. If you are doing this, please consider if there is another option. The only valid use of \fBinstall\fR or \fBpreinstall\fR scripts is for compilation which must be done on the target architecture. -.IP \(bu 4 -Scripts are run from the root of the package folder, regardless of what the current working directory is when \fBnpm\fR is invoked. If you want your script to use different behavior based on what subdirectory you're in, you can use the \fBINIT_CWD\fR environment variable, which holds the full path you were in when you ran \fBnpm run\fR. -.RE 0 - -.SS "See Also" -.RS 0 -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR -.IP \(bu 4 -npm help developers -.IP \(bu 4 -npm help install -.RE 0 diff --git a/node_modules/npm/man/man7/workspaces.7 b/node_modules/npm/man/man7/workspaces.7 deleted file mode 100644 index 51a2f96..0000000 --- a/node_modules/npm/man/man7/workspaces.7 +++ /dev/null @@ -1,214 +0,0 @@ -.TH "WORKSPACES" "7" "December 2023" "" "" -.SH "NAME" -\fBworkspaces\fR - Working with workspaces -.SS "Description" -.P -\fBWorkspaces\fR is a generic term that refers to the set of features in the npm cli that provides support to managing multiple packages from your local file system from within a singular top-level, root package. -.P -This set of features makes up for a much more streamlined workflow handling linked packages from the local file system. Automating the linking process as part of \fBnpm install\fR and avoiding manually having to use \fBnpm link\fR in order to add references to packages that should be symlinked into the current \fBnode_modules\fR folder. -.P -We also refer to these packages being auto-symlinked during \fBnpm install\fR as a single \fBworkspace\fR, meaning it's a nested package within the current local file system that is explicitly defined in the \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json#workspaces\(ra\fR \fBworkspaces\fR configuration. -.SS "Defining workspaces" -.P -Workspaces are usually defined via the \fBworkspaces\fR property of the \fB\fBpackage.json\fR\fR \fI\(la/configuring-npm/package-json#workspaces\(ra\fR file, e.g: -.P -.RS 2 -.nf -{ - "name": "my-workspaces-powered-project", - "workspaces": \[lB] - "packages/a" - \[rB] -} -.fi -.RE -.P -Given the above \fBpackage.json\fR example living at a current working directory \fB.\fR that contains a folder named \fBpackages/a\fR that itself contains a \fBpackage.json\fR inside it, defining a Node.js package, e.g: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json -.fi -.RE -.P -The expected result once running \fBnpm install\fR in this current working directory \fB.\fR is that the folder \fBpackages/a\fR will get symlinked to the \fBnode_modules\fR folder of the current working dir. -.P -Below is a post \fBnpm install\fR example, given that same previous example structure of files and folders: -.P -.RS 2 -.nf -. -+-- node_modules -| `-- a -> ../packages/a -+-- package-lock.json -+-- package.json -`-- packages - +-- a - | `-- package.json -.fi -.RE -.SS "Getting started with workspaces" -.P -You may automate the required steps to define a new workspace using npm help init. For example in a project that already has a \fBpackage.json\fR defined you can run: -.P -.RS 2 -.nf -npm init -w ./packages/a -.fi -.RE -.P -This command will create the missing folders and a new \fBpackage.json\fR file (if needed) while also making sure to properly configure the \fB"workspaces"\fR property of your root project \fBpackage.json\fR. -.SS "Adding dependencies to a workspace" -.P -It's possible to directly add/remove/update dependencies of your workspaces using the \fB\fBworkspace\fR config\fR \fI\(la/using-npm/config#workspace\(ra\fR. -.P -For example, assuming the following structure: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- b - `-- package.json -.fi -.RE -.P -If you want to add a dependency named \fBabbrev\fR from the registry as a dependency of your workspace \fBa\fR, you may use the workspace config to tell the npm installer that package should be added as a dependency of the provided workspace: -.P -.RS 2 -.nf -npm install abbrev -w a -.fi -.RE -.P -Note: other installing commands such as \fBuninstall\fR, \fBci\fR, etc will also respect the provided \fBworkspace\fR configuration. -.SS "Using workspaces" -.P -Given the \fBspecifities of how Node.js handles module resolution\fR \fI\(lahttps://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together\(ra\fR it's possible to consume any defined workspace by its declared \fBpackage.json\fR \fBname\fR. Continuing from the example defined above, let's also create a Node.js script that will require the workspace \fBa\fR example module, e.g: -.P -.RS 2 -.nf -// ./packages/a/index.js -module.exports = 'a' - -// ./lib/index.js -const moduleA = require('a') -console.log(moduleA) // -> a -.fi -.RE -.P -When running it with: -.P -\fBnode lib/index.js\fR -.P -This demonstrates how the nature of \fBnode_modules\fR resolution allows for \fBworkspaces\fR to enable a portable workflow for requiring each \fBworkspace\fR in such a way that is also easy to npm help publish these nested workspaces to be consumed elsewhere. -.SS "Running commands in the context of workspaces" -.P -You can use the \fBworkspace\fR configuration option to run commands in the context of a configured workspace. Additionally, if your current directory is in a workspace, the \fBworkspace\fR configuration is implicitly set, and \fBprefix\fR is set to the root workspace. -.P -Following is a quick example on how to use the \fBnpm run\fR command in the context of nested workspaces. For a project containing multiple workspaces, e.g: -.P -.RS 2 -.nf -. -+-- package.json -`-- packages - +-- a - | `-- package.json - `-- b - `-- package.json -.fi -.RE -.P -By running a command using the \fBworkspace\fR option, it's possible to run the given command in the context of that specific workspace. e.g: -.P -.RS 2 -.nf -npm run test --workspace=a -.fi -.RE -.P -You could also run the command within the workspace. -.P -.RS 2 -.nf -cd packages/a && npm run test -.fi -.RE -.P -Either will run the \fBtest\fR script defined within the \fB./packages/a/package.json\fR file. -.P -Please note that you can also specify this argument multiple times in the command-line in order to target multiple workspaces, e.g: -.P -.RS 2 -.nf -npm run test --workspace=a --workspace=b -.fi -.RE -.P -Or run the command for each workspace within the 'packages' folder: -.P -.RS 2 -.nf -npm run test --workspace=packages -.fi -.RE -.P -It's also possible to use the \fBworkspaces\fR (plural) configuration option to enable the same behavior but running that command in the context of \fBall\fR configured workspaces. e.g: -.P -.RS 2 -.nf -npm run test --workspaces -.fi -.RE -.P -Will run the \fBtest\fR script in both \fB./packages/a\fR and \fB./packages/b\fR. -.P -Commands will be run in each workspace in the order they appear in your \fBpackage.json\fR -.P -.RS 2 -.nf -{ - "workspaces": \[lB] "packages/a", "packages/b" \[rB] -} -.fi -.RE -.P -Order of run is different with: -.P -.RS 2 -.nf -{ - "workspaces": \[lB] "packages/b", "packages/a" \[rB] -} -.fi -.RE -.SS "Ignoring missing scripts" -.P -It is not required for all of the workspaces to implement scripts run with the \fBnpm run\fR command. -.P -By running the command with the \fB--if-present\fR flag, npm will ignore workspaces missing target script. -.P -.RS 2 -.nf -npm run test --workspaces --if-present -.fi -.RE -.SS "See also" -.RS 0 -.IP \(bu 4 -npm help install -.IP \(bu 4 -npm help publish -.IP \(bu 4 -npm help run-script -.IP \(bu 4 -npm help config -.RE 0 diff --git a/node_modules/npm/node_modules/.bin/arborist b/node_modules/npm/node_modules/.bin/arborist deleted file mode 120000 index 752f4a7..0000000 --- a/node_modules/npm/node_modules/.bin/arborist +++ /dev/null @@ -1 +0,0 @@ -../@npmcli/arborist/bin/index.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/color-support b/node_modules/npm/node_modules/.bin/color-support deleted file mode 120000 index fcbcb28..0000000 --- a/node_modules/npm/node_modules/.bin/color-support +++ /dev/null @@ -1 +0,0 @@ -../color-support/bin.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/cssesc b/node_modules/npm/node_modules/.bin/cssesc deleted file mode 120000 index 487b689..0000000 --- a/node_modules/npm/node_modules/.bin/cssesc +++ /dev/null @@ -1 +0,0 @@ -../cssesc/bin/cssesc \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/glob b/node_modules/npm/node_modules/.bin/glob deleted file mode 120000 index 85c9c1d..0000000 --- a/node_modules/npm/node_modules/.bin/glob +++ /dev/null @@ -1 +0,0 @@ -../glob/dist/esm/bin.mjs \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/installed-package-contents b/node_modules/npm/node_modules/.bin/installed-package-contents deleted file mode 120000 index 4e50880..0000000 --- a/node_modules/npm/node_modules/.bin/installed-package-contents +++ /dev/null @@ -1 +0,0 @@ -../@npmcli/installed-package-contents/lib/index.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/mkdirp b/node_modules/npm/node_modules/.bin/mkdirp deleted file mode 120000 index 017896c..0000000 --- a/node_modules/npm/node_modules/.bin/mkdirp +++ /dev/null @@ -1 +0,0 @@ -../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/node-gyp b/node_modules/npm/node_modules/.bin/node-gyp deleted file mode 120000 index 9b31a4f..0000000 --- a/node_modules/npm/node_modules/.bin/node-gyp +++ /dev/null @@ -1 +0,0 @@ -../node-gyp/bin/node-gyp.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/node-which b/node_modules/npm/node_modules/.bin/node-which deleted file mode 120000 index c4a428a..0000000 --- a/node_modules/npm/node_modules/.bin/node-which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/which.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/nopt b/node_modules/npm/node_modules/.bin/nopt deleted file mode 120000 index 6b6566e..0000000 --- a/node_modules/npm/node_modules/.bin/nopt +++ /dev/null @@ -1 +0,0 @@ -../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/pacote b/node_modules/npm/node_modules/.bin/pacote deleted file mode 120000 index e595831..0000000 --- a/node_modules/npm/node_modules/.bin/pacote +++ /dev/null @@ -1 +0,0 @@ -../pacote/lib/bin.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/qrcode-terminal b/node_modules/npm/node_modules/.bin/qrcode-terminal deleted file mode 120000 index 2a09d26..0000000 --- a/node_modules/npm/node_modules/.bin/qrcode-terminal +++ /dev/null @@ -1 +0,0 @@ -../qrcode-terminal/bin/qrcode-terminal.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/.bin/semver b/node_modules/npm/node_modules/.bin/semver deleted file mode 120000 index 5aaadf4..0000000 --- a/node_modules/npm/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver.js \ No newline at end of file diff --git a/node_modules/npm/node_modules/@colors/colors/LICENSE b/node_modules/npm/node_modules/@colors/colors/LICENSE deleted file mode 100644 index 6b86056..0000000 --- a/node_modules/npm/node_modules/@colors/colors/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -MIT License - -Original Library - - Copyright (c) Marak Squires - -Additional Functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - - Copyright (c) DABH (https://github.com/DABH) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/@colors/colors/examples/normal-usage.js b/node_modules/npm/node_modules/@colors/colors/examples/normal-usage.js deleted file mode 100644 index a4bfe7b..0000000 --- a/node_modules/npm/node_modules/@colors/colors/examples/normal-usage.js +++ /dev/null @@ -1,83 +0,0 @@ -var colors = require('../lib/index'); - -console.log('First some yellow text'.yellow); - -console.log('Underline that text'.yellow.underline); - -console.log('Make it bold and red'.red.bold); - -console.log(('Double Raindows All Day Long').rainbow); - -console.log('Drop the bass'.trap); - -console.log('DROP THE RAINBOW BASS'.trap.rainbow); - -// styles not widely supported -console.log('Chains are also cool.'.bold.italic.underline.red); - -// styles not widely supported -console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse - + ' styles! '.yellow.bold); -console.log('Zebras are so fun!'.zebra); - -// -// Remark: .strikethrough may not work with Mac OS Terminal App -// -console.log('This is ' + 'not'.strikethrough + ' fun.'); - -console.log('Background color attack!'.black.bgWhite); -console.log('Use random styles on everything!'.random); -console.log('America, Heck Yeah!'.america); - -// eslint-disable-next-line max-len -console.log('Blindingly '.brightCyan + 'bright? '.brightRed + 'Why '.brightYellow + 'not?!'.brightGreen); - -console.log('Setting themes is useful'); - -// -// Custom themes -// -console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}); - -// outputs red text -console.log('this is an error'.error); - -// outputs yellow text -console.log('this is a warning'.warn); - -// outputs grey text -console.log('this is an input'.input); - -console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -try { - colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); -} catch (err) { - console.log(err); -} - -// outputs red text -console.log('this is an error'.error); - -// outputs yellow text -console.log('this is a warning'.warn); - -// outputs grey text -console.log('this is an input'.input); - -// console.log("Don't summon".zalgo) - diff --git a/node_modules/npm/node_modules/@colors/colors/examples/safe-string.js b/node_modules/npm/node_modules/@colors/colors/examples/safe-string.js deleted file mode 100644 index fc66474..0000000 --- a/node_modules/npm/node_modules/@colors/colors/examples/safe-string.js +++ /dev/null @@ -1,80 +0,0 @@ -var colors = require('../safe'); - -console.log(colors.yellow('First some yellow text')); - -console.log(colors.yellow.underline('Underline that text')); - -console.log(colors.red.bold('Make it bold and red')); - -console.log(colors.rainbow('Double Raindows All Day Long')); - -console.log(colors.trap('Drop the bass')); - -console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS'))); - -// styles not widely supported -console.log(colors.bold.italic.underline.red('Chains are also cool.')); - -// styles not widely supported -console.log(colors.green('So ') + colors.underline('are') + ' ' - + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); - -console.log(colors.zebra('Zebras are so fun!')); - -console.log('This is ' + colors.strikethrough('not') + ' fun.'); - - -console.log(colors.black.bgWhite('Background color attack!')); -console.log(colors.random('Use random styles on everything!')); -console.log(colors.america('America, Heck Yeah!')); - -// eslint-disable-next-line max-len -console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!')); - -console.log('Setting themes is useful'); - -// -// Custom themes -// -// console.log('Generic logging theme as JSON'.green.bold.underline); -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'blue', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}); - -// outputs red text -console.log(colors.error('this is an error')); - -// outputs yellow text -console.log(colors.warn('this is a warning')); - -// outputs blue text -console.log(colors.input('this is an input')); - - -// console.log('Generic logging theme as file'.green.bold.underline); - -// Load a theme from file -colors.setTheme(require(__dirname + '/../themes/generic-logging.js')); - -// outputs red text -console.log(colors.error('this is an error')); - -// outputs yellow text -console.log(colors.warn('this is a warning')); - -// outputs grey text -console.log(colors.input('this is an input')); - -// console.log(colors.zalgo("Don't summon him")) - - diff --git a/node_modules/npm/node_modules/@colors/colors/lib/colors.js b/node_modules/npm/node_modules/@colors/colors/lib/colors.js deleted file mode 100644 index d9fb087..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/colors.js +++ /dev/null @@ -1,211 +0,0 @@ -/* - -The MIT License (MIT) - -Original Library - - Copyright (c) Marak Squires - -Additional functionality - - Copyright (c) Sindre Sorhus (sindresorhus.com) - -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 colors = {}; -module['exports'] = colors; - -colors.themes = {}; - -var util = require('util'); -var ansiStyles = colors.styles = require('./styles'); -var defineProps = Object.defineProperties; -var newLineRegex = new RegExp(/[\r\n]+/g); - -colors.supportsColor = require('./system/supports-colors').supportsColor; - -if (typeof colors.enabled === 'undefined') { - colors.enabled = colors.supportsColor() !== false; -} - -colors.enable = function() { - colors.enabled = true; -}; - -colors.disable = function() { - colors.enabled = false; -}; - -colors.stripColors = colors.strip = function(str) { - return ('' + str).replace(/\x1B\[\d+m/g, ''); -}; - -// eslint-disable-next-line no-unused-vars -var stylize = colors.stylize = function stylize(str, style) { - if (!colors.enabled) { - return str+''; - } - - var styleMap = ansiStyles[style]; - - // Stylize should work for non-ANSI styles, too - if (!styleMap && style in colors) { - // Style maps like trap operate as functions on strings; - // they don't have properties like open or close. - return colors[style](str); - } - - return styleMap.open + str + styleMap.close; -}; - -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; -var escapeStringRegexp = function(str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - return str.replace(matchOperatorsRe, '\\$&'); -}; - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - builder._styles = _styles; - // __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; - return builder; -} - -var styles = (function() { - var ret = {}; - ansiStyles.grey = ansiStyles.gray; - Object.keys(ansiStyles).forEach(function(key) { - ansiStyles[key].closeRe = - new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - ret[key] = { - get: function() { - return build(this._styles.concat(key)); - }, - }; - }); - return ret; -})(); - -var proto = defineProps(function colors() {}, styles); - -function applyStyle() { - var args = Array.prototype.slice.call(arguments); - - var str = args.map(function(arg) { - // Use weak equality check so we can colorize null/undefined in safe mode - if (arg != null && arg.constructor === String) { - return arg; - } else { - return util.inspect(arg); - } - }).join(' '); - - if (!colors.enabled || !str) { - return str; - } - - var newLinesPresent = str.indexOf('\n') != -1; - - var nestedStyles = this._styles; - - var i = nestedStyles.length; - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - str = code.open + str.replace(code.closeRe, code.open) + code.close; - if (newLinesPresent) { - str = str.replace(newLineRegex, function(match) { - return code.close + match + code.open; - }); - } - } - - return str; -} - -colors.setTheme = function(theme) { - if (typeof theme === 'string') { - console.log('colors.setTheme now only accepts an object, not a string. ' + - 'If you are trying to set a theme from a file, it is now your (the ' + - 'caller\'s) responsibility to require the file. The old syntax ' + - 'looked like colors.setTheme(__dirname + ' + - '\'/../themes/generic-logging.js\'); The new syntax looks like '+ - 'colors.setTheme(require(__dirname + ' + - '\'/../themes/generic-logging.js\'));'); - return; - } - for (var style in theme) { - (function(style) { - colors[style] = function(str) { - if (typeof theme[style] === 'object') { - var out = str; - for (var i in theme[style]) { - out = colors[theme[style][i]](out); - } - return out; - } - return colors[theme[style]](str); - }; - })(style); - } -}; - -function init() { - var ret = {}; - Object.keys(styles).forEach(function(name) { - ret[name] = { - get: function() { - return build([name]); - }, - }; - }); - return ret; -} - -var sequencer = function sequencer(map, str) { - var exploded = str.split(''); - exploded = exploded.map(map); - return exploded.join(''); -}; - -// custom formatter methods -colors.trap = require('./custom/trap'); -colors.zalgo = require('./custom/zalgo'); - -// maps -colors.maps = {}; -colors.maps.america = require('./maps/america')(colors); -colors.maps.zebra = require('./maps/zebra')(colors); -colors.maps.rainbow = require('./maps/rainbow')(colors); -colors.maps.random = require('./maps/random')(colors); - -for (var map in colors.maps) { - (function(map) { - colors[map] = function(str) { - return sequencer(colors.maps[map], str); - }; - })(map); -} - -defineProps(colors, init()); diff --git a/node_modules/npm/node_modules/@colors/colors/lib/custom/trap.js b/node_modules/npm/node_modules/@colors/colors/lib/custom/trap.js deleted file mode 100644 index fbccf88..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/custom/trap.js +++ /dev/null @@ -1,46 +0,0 @@ -module['exports'] = function runTheTrap(text, options) { - var result = ''; - text = text || 'Run the trap, drop the bass'; - text = text.split(''); - var trap = { - a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'], - b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'], - c: ['\u00a9', '\u023b', '\u03fe'], - d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'], - e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc', - '\u0a6c'], - f: ['\u04fa'], - g: ['\u0262'], - h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'], - i: ['\u0f0f'], - j: ['\u0134'], - k: ['\u0138', '\u04a0', '\u04c3', '\u051e'], - l: ['\u0139'], - m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'], - n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'], - o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd', - '\u06dd', '\u0e4f'], - p: ['\u01f7', '\u048e'], - q: ['\u09cd'], - r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'], - s: ['\u00a7', '\u03de', '\u03df', '\u03e8'], - t: ['\u0141', '\u0166', '\u0373'], - u: ['\u01b1', '\u054d'], - v: ['\u05d8'], - w: ['\u0428', '\u0460', '\u047c', '\u0d70'], - x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'], - y: ['\u00a5', '\u04b0', '\u04cb'], - z: ['\u01b5', '\u0240'], - }; - text.forEach(function(c) { - c = c.toLowerCase(); - var chars = trap[c] || [' ']; - var rand = Math.floor(Math.random() * chars.length); - if (typeof trap[c] !== 'undefined') { - result += trap[c][rand]; - } else { - result += c; - } - }); - return result; -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/custom/zalgo.js b/node_modules/npm/node_modules/@colors/colors/lib/custom/zalgo.js deleted file mode 100644 index 0ef2b01..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/custom/zalgo.js +++ /dev/null @@ -1,110 +0,0 @@ -// please no -module['exports'] = function zalgo(text, options) { - text = text || ' he is here '; - var soul = { - 'up': [ - '̍', '̎', '̄', '̅', - '̿', '̑', '̆', '̐', - '͒', '͗', '͑', '̇', - '̈', '̊', '͂', '̓', - '̈', '͊', '͋', '͌', - '̃', '̂', '̌', '͐', - '̀', '́', '̋', '̏', - '̒', '̓', '̔', '̽', - '̉', 'ͣ', 'ͤ', 'ͥ', - 'ͦ', 'ͧ', 'ͨ', 'ͩ', - 'ͪ', 'ͫ', 'ͬ', 'ͭ', - 'ͮ', 'ͯ', '̾', '͛', - '͆', '̚', - ], - 'down': [ - '̖', '̗', '̘', '̙', - '̜', '̝', '̞', '̟', - '̠', '̤', '̥', '̦', - '̩', '̪', '̫', '̬', - '̭', '̮', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', '̻', '̼', 'ͅ', - '͇', '͈', '͉', '͍', - '͎', '͓', '͔', '͕', - '͖', '͙', '͚', '̣', - ], - 'mid': [ - '̕', '̛', '̀', '́', - '͘', '̡', '̢', '̧', - '̨', '̴', '̵', '̶', - '͜', '͝', '͞', - '͟', '͠', '͢', '̸', - '̷', '͡', ' ҉', - ], - }; - var all = [].concat(soul.up, soul.down, soul.mid); - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function isChar(character) { - var bool = false; - all.filter(function(i) { - bool = (i === character); - }); - return bool; - } - - - function heComes(text, options) { - var result = ''; - var counts; - var l; - options = options || {}; - options['up'] = - typeof options['up'] !== 'undefined' ? options['up'] : true; - options['mid'] = - typeof options['mid'] !== 'undefined' ? options['mid'] : true; - options['down'] = - typeof options['down'] !== 'undefined' ? options['down'] : true; - options['size'] = - typeof options['size'] !== 'undefined' ? options['size'] : 'maxi'; - text = text.split(''); - for (l in text) { - if (isChar(l)) { - continue; - } - result = result + text[l]; - counts = {'up': 0, 'down': 0, 'mid': 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.mid = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.mid = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ['up', 'mid', 'down']; - for (var d in arr) { - var index = arr[d]; - for (var i = 0; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - // don't summon him - return heComes(text, options); -}; - diff --git a/node_modules/npm/node_modules/@colors/colors/lib/extendStringPrototype.js b/node_modules/npm/node_modules/@colors/colors/lib/extendStringPrototype.js deleted file mode 100644 index 46fd386..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/extendStringPrototype.js +++ /dev/null @@ -1,110 +0,0 @@ -var colors = require('./colors'); - -module['exports'] = function() { - // - // Extends prototype of native string object to allow for "foo".red syntax - // - var addProperty = function(color, func) { - String.prototype.__defineGetter__(color, func); - }; - - addProperty('strip', function() { - return colors.strip(this); - }); - - addProperty('stripColors', function() { - return colors.strip(this); - }); - - addProperty('trap', function() { - return colors.trap(this); - }); - - addProperty('zalgo', function() { - return colors.zalgo(this); - }); - - addProperty('zebra', function() { - return colors.zebra(this); - }); - - addProperty('rainbow', function() { - return colors.rainbow(this); - }); - - addProperty('random', function() { - return colors.random(this); - }); - - addProperty('america', function() { - return colors.america(this); - }); - - // - // Iterate through all default styles and colors - // - var x = Object.keys(colors.styles); - x.forEach(function(style) { - addProperty(style, function() { - return colors.stylize(this, style); - }); - }); - - function applyTheme(theme) { - // - // Remark: This is a list of methods that exist - // on String that you should not overwrite. - // - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', - '__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty', - 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', - 'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length', - 'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice', - 'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase', - 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', - ]; - - Object.keys(theme).forEach(function(prop) { - if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + - ' is probably something you don\'t want to override. ' + - 'Ignoring style name'); - } else { - if (typeof(theme[prop]) === 'string') { - colors[prop] = colors[theme[prop]]; - addProperty(prop, function() { - return colors[prop](this); - }); - } else { - var themePropApplicator = function(str) { - var ret = str || this; - for (var t = 0; t < theme[prop].length; t++) { - ret = colors[theme[prop][t]](ret); - } - return ret; - }; - addProperty(prop, themePropApplicator); - colors[prop] = function(str) { - return themePropApplicator(str); - }; - } - } - }); - } - - colors.setTheme = function(theme) { - if (typeof theme === 'string') { - console.log('colors.setTheme now only accepts an object, not a string. ' + - 'If you are trying to set a theme from a file, it is now your (the ' + - 'caller\'s) responsibility to require the file. The old syntax ' + - 'looked like colors.setTheme(__dirname + ' + - '\'/../themes/generic-logging.js\'); The new syntax looks like '+ - 'colors.setTheme(require(__dirname + ' + - '\'/../themes/generic-logging.js\'));'); - return; - } else { - applyTheme(theme); - } - }; -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/index.js b/node_modules/npm/node_modules/@colors/colors/lib/index.js deleted file mode 100644 index 9df5ab7..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var colors = require('./colors'); -module['exports'] = colors; - -// Remark: By default, colors will add style properties to String.prototype. -// -// If you don't wish to extend String.prototype, you can do this instead and -// native String will not be touched: -// -// var colors = require('colors/safe); -// colors.red("foo") -// -// -require('./extendStringPrototype')(); diff --git a/node_modules/npm/node_modules/@colors/colors/lib/maps/america.js b/node_modules/npm/node_modules/@colors/colors/lib/maps/america.js deleted file mode 100644 index dc96903..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/maps/america.js +++ /dev/null @@ -1,10 +0,0 @@ -module['exports'] = function(colors) { - return function(letter, i, exploded) { - if (letter === ' ') return letter; - switch (i%3) { - case 0: return colors.red(letter); - case 1: return colors.white(letter); - case 2: return colors.blue(letter); - } - }; -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/maps/rainbow.js b/node_modules/npm/node_modules/@colors/colors/lib/maps/rainbow.js deleted file mode 100644 index 2b00ac0..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/maps/rainbow.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = function(colors) { - // RoY G BiV - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; - return function(letter, i, exploded) { - if (letter === ' ') { - return letter; - } else { - return colors[rainbowColors[i++ % rainbowColors.length]](letter); - } - }; -}; - diff --git a/node_modules/npm/node_modules/@colors/colors/lib/maps/random.js b/node_modules/npm/node_modules/@colors/colors/lib/maps/random.js deleted file mode 100644 index 3d82a39..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/maps/random.js +++ /dev/null @@ -1,11 +0,0 @@ -module['exports'] = function(colors) { - var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', - 'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed', - 'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta']; - return function(letter, i, exploded) { - return letter === ' ' ? letter : - colors[ - available[Math.round(Math.random() * (available.length - 2))] - ](letter); - }; -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/maps/zebra.js b/node_modules/npm/node_modules/@colors/colors/lib/maps/zebra.js deleted file mode 100644 index fa73623..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/maps/zebra.js +++ /dev/null @@ -1,5 +0,0 @@ -module['exports'] = function(colors) { - return function(letter, i, exploded) { - return i % 2 === 0 ? letter : colors.inverse(letter); - }; -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/styles.js b/node_modules/npm/node_modules/@colors/colors/lib/styles.js deleted file mode 100644 index 011dafd..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/styles.js +++ /dev/null @@ -1,95 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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 styles = {}; -module['exports'] = styles; - -var codes = { - reset: [0, 0], - - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - grey: [90, 39], - - brightRed: [91, 39], - brightGreen: [92, 39], - brightYellow: [93, 39], - brightBlue: [94, 39], - brightMagenta: [95, 39], - brightCyan: [96, 39], - brightWhite: [97, 39], - - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - bgGray: [100, 49], - bgGrey: [100, 49], - - bgBrightRed: [101, 49], - bgBrightGreen: [102, 49], - bgBrightYellow: [103, 49], - bgBrightBlue: [104, 49], - bgBrightMagenta: [105, 49], - bgBrightCyan: [106, 49], - bgBrightWhite: [107, 49], - - // legacy styles for colors pre v1.0.0 - blackBG: [40, 49], - redBG: [41, 49], - greenBG: [42, 49], - yellowBG: [43, 49], - blueBG: [44, 49], - magentaBG: [45, 49], - cyanBG: [46, 49], - whiteBG: [47, 49], - -}; - -Object.keys(codes).forEach(function(key) { - var val = codes[key]; - var style = styles[key] = []; - style.open = '\u001b[' + val[0] + 'm'; - style.close = '\u001b[' + val[1] + 'm'; -}); diff --git a/node_modules/npm/node_modules/@colors/colors/lib/system/has-flag.js b/node_modules/npm/node_modules/@colors/colors/lib/system/has-flag.js deleted file mode 100644 index a347dd4..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/system/has-flag.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -'use strict'; - -module.exports = function(flag, argv) { - argv = argv || process.argv; - - var terminatorPos = argv.indexOf('--'); - var prefix = /^-{1,2}/.test(flag) ? '' : '--'; - var pos = argv.indexOf(prefix + flag); - - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/node_modules/npm/node_modules/@colors/colors/lib/system/supports-colors.js b/node_modules/npm/node_modules/@colors/colors/lib/system/supports-colors.js deleted file mode 100644 index f1f9c8f..0000000 --- a/node_modules/npm/node_modules/@colors/colors/lib/system/supports-colors.js +++ /dev/null @@ -1,151 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -'use strict'; - -var os = require('os'); -var hasFlag = require('./has-flag.js'); - -var env = process.env; - -var forceColor = void 0; -if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') - || hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 - || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level: level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3, - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || hasFlag('color=full') - || hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - var min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. 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. - var osRelease = os.release().split('.'); - if (Number(process.versions.node.split('.')[0]) >= 8 - && 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'].some(function(sign) { - return 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 ('TERM_PROGRAM' in env) { - var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Hyper': - return 3; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - var level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr), -}; diff --git a/node_modules/npm/node_modules/@colors/colors/package.json b/node_modules/npm/node_modules/@colors/colors/package.json deleted file mode 100644 index cb87f20..0000000 --- a/node_modules/npm/node_modules/@colors/colors/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@colors/colors", - "description": "get colors in your node.js console", - "version": "1.5.0", - "author": "DABH", - "contributors": [ - { - "name": "DABH", - "url": "https://github.com/DABH" - } - ], - "homepage": "https://github.com/DABH/colors.js", - "bugs": "https://github.com/DABH/colors.js/issues", - "keywords": [ - "ansi", - "terminal", - "colors" - ], - "repository": { - "type": "git", - "url": "http://github.com/DABH/colors.js.git" - }, - "license": "MIT", - "scripts": { - "lint": "eslint . --fix", - "test": "export FORCE_COLOR=1 && node tests/basic-test.js && node tests/safe-test.js" - }, - "engines": { - "node": ">=0.1.90" - }, - "main": "lib/index.js", - "files": [ - "examples", - "lib", - "LICENSE", - "safe.js", - "themes", - "index.d.ts", - "safe.d.ts" - ], - "devDependencies": { - "eslint": "^5.2.0", - "eslint-config-google": "^0.11.0" - } -} diff --git a/node_modules/npm/node_modules/@colors/colors/safe.js b/node_modules/npm/node_modules/@colors/colors/safe.js deleted file mode 100644 index a013d54..0000000 --- a/node_modules/npm/node_modules/@colors/colors/safe.js +++ /dev/null @@ -1,10 +0,0 @@ -// -// Remark: Requiring this file will use the "safe" colors API, -// which will not touch String.prototype. -// -// var colors = require('colors/safe'); -// colors.red("foo") -// -// -var colors = require('./lib/colors'); -module['exports'] = colors; diff --git a/node_modules/npm/node_modules/@colors/colors/themes/generic-logging.js b/node_modules/npm/node_modules/@colors/colors/themes/generic-logging.js deleted file mode 100644 index 63adfe4..0000000 --- a/node_modules/npm/node_modules/@colors/colors/themes/generic-logging.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red', -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/LICENSE.txt b/node_modules/npm/node_modules/@isaacs/cliui/LICENSE.txt deleted file mode 100644 index c7e2747..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Contributors - -Permission to use, copy, modify, and/or distribute this software -for any purpose with or without fee is hereby granted, provided -that the above copyright notice and this permission notice -appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE -LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@isaacs/cliui/build/index.cjs b/node_modules/npm/node_modules/@isaacs/cliui/build/index.cjs deleted file mode 100644 index aca2b85..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/build/index.cjs +++ /dev/null @@ -1,317 +0,0 @@ -'use strict'; - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} - -// Bootstrap cliui with CommonJS dependencies: -const stringWidth = require('string-width-cjs'); -const stripAnsi = require('strip-ansi-cjs'); -const wrap = require('wrap-ansi-cjs'); -function ui(opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }); -} - -module.exports = ui; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/build/index.d.cts b/node_modules/npm/node_modules/@isaacs/cliui/build/index.d.cts deleted file mode 100644 index 4567f94..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/build/index.d.cts +++ /dev/null @@ -1,43 +0,0 @@ -interface UIOptions { - width: number; - wrap?: boolean; - rows?: string[]; -} -interface Column { - text: string; - width?: number; - align?: "right" | "left" | "center"; - padding: number[]; - border?: boolean; -} -interface ColumnArray extends Array { - span: boolean; -} -interface Line { - hidden?: boolean; - text: string; - span?: boolean; -} -declare class UI { - width: number; - wrap: boolean; - rows: ColumnArray[]; - constructor(opts: UIOptions); - span(...args: ColumnArray): void; - resetOutput(): void; - div(...args: (Column | string)[]): ColumnArray; - private shouldApplyLayoutDSL; - private applyLayoutDSL; - private colFromString; - private measurePadding; - toString(): string; - rowToString(row: ColumnArray, lines: Line[]): Line[]; - // if the full 'source' can render in - // the target line, do so. - private renderInline; - private rasterize; - private negatePadding; - private columnWidths; -} -declare function ui(opts: UIOptions): UI; -export { ui as default }; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/build/lib/index.js b/node_modules/npm/node_modules/@isaacs/cliui/build/lib/index.js deleted file mode 100644 index 587b5ec..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/build/lib/index.js +++ /dev/null @@ -1,302 +0,0 @@ -'use strict'; -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -export class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -export function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} diff --git a/node_modules/npm/node_modules/@isaacs/cliui/index.mjs b/node_modules/npm/node_modules/@isaacs/cliui/index.mjs deleted file mode 100644 index 5177519..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/index.mjs +++ /dev/null @@ -1,14 +0,0 @@ -// Bootstrap cliui with ESM dependencies: -import { cliui } from './build/lib/index.js' - -import stringWidth from 'string-width' -import stripAnsi from 'strip-ansi' -import wrap from 'wrap-ansi' - -export default function ui (opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }) -} diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js deleted file mode 100644 index 3fbe924..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]/g; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js deleted file mode 100644 index ecf32f1..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F9D1}(?:\u200D(?:\u{1F91D}\u200D\u{1F9D1}|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1B|\u2764\uFE0F\u200D[\u{1F525}\u{1FA79}]|\u{1F441}\uFE0F|\u{1F3F3}\uFE0F|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]/gu; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index 1a4fc8d..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F9D1}(?:\u200D(?:\u{1F91D}\u200D\u{1F9D1}|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1B|\u2764\uFE0F\u200D[\u{1F525}\u{1FA79}]|\u{1F441}\uFE0F|\u{1F3F3}\uFE0F|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 8e9f985..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F9D1}(?:\u200D(?:\u{1F91D}\u200D\u{1F9D1}|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1B|\u2764\uFE0F\u200D[\u{1F525}\u{1FA79}]|\u{1F441}\uFE0F|\u{1F3F3}\uFE0F|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F?/gu; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js deleted file mode 100644 index c0490d4..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json deleted file mode 100644 index eac892a..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "emoji-regex", - "version": "9.2.2", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "RGI_Emoji.js", - "RGI_Emoji.d.ts", - "text.js", - "text.d.ts", - "es2015" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src es2015_types -D -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/core": "^7.4.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/preset-env": "^7.4.4", - "@unicode/unicode-13.0.0": "^1.0.3", - "mocha": "^6.1.4", - "regexgen": "^1.3.0" - } -} diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js deleted file mode 100644 index 9bc63ce..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F?/g; -}; diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js deleted file mode 100644 index 9294488..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/index.js +++ /dev/null @@ -1,54 +0,0 @@ -import stripAnsi from 'strip-ansi'; -import eastAsianWidth from 'eastasianwidth'; -import emojiRegex from 'emoji-regex'; - -export default function stringWidth(string, options = {}) { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - options = { - ambiguousIsNarrow: true, - ...options - }; - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2; - let width = 0; - - for (const character of string) { - const codePoint = character.codePointAt(0); - - // Ignore control characters - if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (codePoint >= 0x300 && codePoint <= 0x36F) { - continue; - } - - const code = eastAsianWidth.eastAsianWidth(character); - switch (code) { - case 'F': - case 'W': - width += 2; - break; - case 'A': - width += ambiguousCharacterWidth; - break; - default: - width += 1; - } - } - - return width; -} diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/license b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json b/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json deleted file mode 100644 index f46d677..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/node_modules/string-width/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "string-width", - "version": "5.1.2", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - } -} diff --git a/node_modules/npm/node_modules/@isaacs/cliui/package.json b/node_modules/npm/node_modules/@isaacs/cliui/package.json deleted file mode 100644 index 7a95253..0000000 --- a/node_modules/npm/node_modules/@isaacs/cliui/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@isaacs/cliui", - "version": "8.0.2", - "description": "easily create complex multi-column command-line-interfaces", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./index.mjs", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 mocha ./test/*.cjs", - "test:esm": "c8 mocha ./test/**/*.mjs", - "postest": "check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": "yargs/cliui", - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] - }, - "keywords": [ - "cli", - "command-line", - "layout", - "design", - "console", - "wrap", - "table" - ], - "author": "Ben Coe ", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "devDependencies": { - "@types/node": "^14.0.27", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", - "c8": "^7.3.0", - "chai": "^4.2.0", - "chalk": "^4.1.0", - "cross-env": "^7.0.2", - "eslint": "^7.6.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-node": "^11.1.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.1", - "rollup-plugin-ts": "^3.0.2", - "standardx": "^7.0.0", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/npm/node_modules/@isaacs/string-locale-compare/LICENSE b/node_modules/npm/node_modules/@isaacs/string-locale-compare/LICENSE deleted file mode 100644 index 05eeeb8..0000000 --- a/node_modules/npm/node_modules/@isaacs/string-locale-compare/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@isaacs/string-locale-compare/index.js b/node_modules/npm/node_modules/@isaacs/string-locale-compare/index.js deleted file mode 100644 index 0f68ab6..0000000 --- a/node_modules/npm/node_modules/@isaacs/string-locale-compare/index.js +++ /dev/null @@ -1,42 +0,0 @@ -const hasIntl = typeof Intl === 'object' && !!Intl -const Collator = hasIntl && Intl.Collator -const cache = new Map() - -const collatorCompare = (locale, opts) => { - const collator = new Collator(locale, opts) - return (a, b) => collator.compare(a, b) -} - -const localeCompare = (locale, opts) => (a, b) => a.localeCompare(b, locale, opts) - -const knownOptions = [ - 'sensitivity', - 'numeric', - 'ignorePunctuation', - 'caseFirst', -] - -const { hasOwnProperty } = Object.prototype - -module.exports = (locale, options = {}) => { - if (!locale || typeof locale !== 'string') - throw new TypeError('locale required') - - const opts = knownOptions.reduce((opts, k) => { - if (hasOwnProperty.call(options, k)) { - opts[k] = options[k] - } - return opts - }, {}) - const key = `${locale}\n${JSON.stringify(opts)}` - - if (cache.has(key)) - return cache.get(key) - - const compare = hasIntl - ? collatorCompare(locale, opts) - : localeCompare(locale, opts) - cache.set(key, compare) - - return compare -} diff --git a/node_modules/npm/node_modules/@isaacs/string-locale-compare/package.json b/node_modules/npm/node_modules/@isaacs/string-locale-compare/package.json deleted file mode 100644 index 58de848..0000000 --- a/node_modules/npm/node_modules/@isaacs/string-locale-compare/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@isaacs/string-locale-compare", - "version": "1.1.0", - "files": [ - "index.js" - ], - "main": "index.js", - "description": "Compare strings with Intl.Collator if available, falling back to String.localeCompare otherwise", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/string-locale-compare" - }, - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "tap": "^15.0.9" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/agents.js b/node_modules/npm/node_modules/@npmcli/agent/lib/agents.js deleted file mode 100644 index 15aa8e8..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/agents.js +++ /dev/null @@ -1,202 +0,0 @@ -'use strict' - -const net = require('net') -const tls = require('tls') -const { once } = require('events') -const timers = require('timers/promises') -const { normalizeOptions, cacheOptions } = require('./options') -const { getProxy, getProxyAgent, proxyCache } = require('./proxy.js') -const Errors = require('./errors.js') -const { Agent: AgentBase } = require('agent-base') - -module.exports = class Agent extends AgentBase { - #options - #timeouts - #proxy - #noProxy - #ProxyAgent - - constructor (options = {}) { - const { timeouts, proxy, noProxy, ...normalizedOptions } = normalizeOptions(options) - - super(normalizedOptions) - - this.#options = normalizedOptions - this.#timeouts = timeouts - - if (proxy) { - this.#proxy = new URL(proxy) - this.#noProxy = noProxy - this.#ProxyAgent = getProxyAgent(proxy) - } - } - - get proxy () { - return this.#proxy ? { url: this.#proxy } : {} - } - - #getProxy (options) { - if (!this.#proxy) { - return - } - - const proxy = getProxy(`${options.protocol}//${options.host}:${options.port}`, { - proxy: this.#proxy, - noProxy: this.#noProxy, - }) - - if (!proxy) { - return - } - - const cacheKey = cacheOptions({ - ...options, - ...this.#options, - timeouts: this.#timeouts, - proxy, - }) - - if (proxyCache.has(cacheKey)) { - return proxyCache.get(cacheKey) - } - - let ProxyAgent = this.#ProxyAgent - if (Array.isArray(ProxyAgent)) { - ProxyAgent = options.secureEndpoint ? ProxyAgent[1] : ProxyAgent[0] - } - - const proxyAgent = new ProxyAgent(proxy, this.#options) - proxyCache.set(cacheKey, proxyAgent) - - return proxyAgent - } - - // takes an array of promises and races them against the connection timeout - // which will throw the necessary error if it is hit. This will return the - // result of the promise race. - async #timeoutConnection ({ promises, options, timeout }, ac = new AbortController()) { - if (timeout) { - const connectionTimeout = timers.setTimeout(timeout, null, { signal: ac.signal }) - .then(() => { - throw new Errors.ConnectionTimeoutError(`${options.host}:${options.port}`) - }).catch((err) => { - if (err.name === 'AbortError') { - return - } - throw err - }) - promises.push(connectionTimeout) - } - - let result - try { - result = await Promise.race(promises) - ac.abort() - } catch (err) { - ac.abort() - throw err - } - return result - } - - async connect (request, options) { - // if the connection does not have its own lookup function - // set, then use the one from our options - options.lookup ??= this.#options.lookup - - let socket - let timeout = this.#timeouts.connection - - const proxy = this.#getProxy(options) - if (proxy) { - // some of the proxies will wait for the socket to fully connect before - // returning so we have to await this while also racing it against the - // connection timeout. - const start = Date.now() - socket = await this.#timeoutConnection({ - options, - timeout, - promises: [proxy.connect(request, options)], - }) - // see how much time proxy.connect took and subtract it from - // the timeout - if (timeout) { - timeout = timeout - (Date.now() - start) - } - } else { - socket = (options.secureEndpoint ? tls : net).connect(options) - } - - socket.setKeepAlive(this.keepAlive, this.keepAliveMsecs) - socket.setNoDelay(this.keepAlive) - - const abortController = new AbortController() - const { signal } = abortController - - const connectPromise = socket[options.secureEndpoint ? 'secureConnecting' : 'connecting'] - ? once(socket, options.secureEndpoint ? 'secureConnect' : 'connect', { signal }) - : Promise.resolve() - - await this.#timeoutConnection({ - options, - timeout, - promises: [ - connectPromise, - once(socket, 'error', { signal }).then((err) => { - throw err[0] - }), - ], - }, abortController) - - if (this.#timeouts.idle) { - socket.setTimeout(this.#timeouts.idle, () => { - socket.destroy(new Errors.IdleTimeoutError(`${options.host}:${options.port}`)) - }) - } - - return socket - } - - addRequest (request, options) { - const proxy = this.#getProxy(options) - // it would be better to call proxy.addRequest here but this causes the - // http-proxy-agent to call its super.addRequest which causes the request - // to be added to the agent twice. since we only support 3 agents - // currently (see the required agents in proxy.js) we have manually - // checked that the only public methods we need to call are called in the - // next block. this could change in the future and presumably we would get - // failing tests until we have properly called the necessary methods on - // each of our proxy agents - if (proxy?.setRequestProps) { - proxy.setRequestProps(request, options) - } - - request.setHeader('connection', this.keepAlive ? 'keep-alive' : 'close') - - if (this.#timeouts.response) { - let responseTimeout - request.once('finish', () => { - setTimeout(() => { - request.destroy(new Errors.ResponseTimeoutError(request, this.#proxy)) - }, this.#timeouts.response) - }) - request.once('response', () => { - clearTimeout(responseTimeout) - }) - } - - if (this.#timeouts.transfer) { - let transferTimeout - request.once('response', (res) => { - setTimeout(() => { - res.destroy(new Errors.TransferTimeoutError(request, this.#proxy)) - }, this.#timeouts.transfer) - res.once('close', () => { - clearTimeout(transferTimeout) - }) - }) - } - - return super.addRequest(request, options) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/dns.js b/node_modules/npm/node_modules/@npmcli/agent/lib/dns.js deleted file mode 100644 index 3c6946c..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/dns.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict' - -const { LRUCache } = require('lru-cache') -const dns = require('dns') - -// this is a factory so that each request can have its own opts (i.e. ttl) -// while still sharing the cache across all requests -const cache = new LRUCache({ max: 50 }) - -const getOptions = ({ - family = 0, - hints = dns.ADDRCONFIG, - all = false, - verbatim = undefined, - ttl = 5 * 60 * 1000, - lookup = dns.lookup, -}) => ({ - // hints and lookup are returned since both are top level properties to (net|tls).connect - hints, - lookup: (hostname, ...args) => { - const callback = args.pop() // callback is always last arg - const lookupOptions = args[0] ?? {} - - const options = { - family, - hints, - all, - verbatim, - ...(typeof lookupOptions === 'number' ? { family: lookupOptions } : lookupOptions), - } - - const key = JSON.stringify({ hostname, ...options }) - - if (cache.has(key)) { - const cached = cache.get(key) - return process.nextTick(callback, null, ...cached) - } - - lookup(hostname, options, (err, ...result) => { - if (err) { - return callback(err) - } - - cache.set(key, result, { ttl }) - return callback(null, ...result) - }) - }, -}) - -module.exports = { - cache, - getOptions, -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/errors.js b/node_modules/npm/node_modules/@npmcli/agent/lib/errors.js deleted file mode 100644 index 70475ae..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/errors.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict' - -class InvalidProxyProtocolError extends Error { - constructor (url) { - super(`Invalid protocol \`${url.protocol}\` connecting to proxy \`${url.host}\``) - this.code = 'EINVALIDPROXY' - this.proxy = url - } -} - -class ConnectionTimeoutError extends Error { - constructor (host) { - super(`Timeout connecting to host \`${host}\``) - this.code = 'ECONNECTIONTIMEOUT' - this.host = host - } -} - -class IdleTimeoutError extends Error { - constructor (host) { - super(`Idle timeout reached for host \`${host}\``) - this.code = 'EIDLETIMEOUT' - this.host = host - } -} - -class ResponseTimeoutError extends Error { - constructor (request, proxy) { - let msg = 'Response timeout ' - if (proxy) { - msg += `from proxy \`${proxy.host}\` ` - } - msg += `connecting to host \`${request.host}\`` - super(msg) - this.code = 'ERESPONSETIMEOUT' - this.proxy = proxy - this.request = request - } -} - -class TransferTimeoutError extends Error { - constructor (request, proxy) { - let msg = 'Transfer timeout ' - if (proxy) { - msg += `from proxy \`${proxy.host}\` ` - } - msg += `for \`${request.host}\`` - super(msg) - this.code = 'ETRANSFERTIMEOUT' - this.proxy = proxy - this.request = request - } -} - -module.exports = { - InvalidProxyProtocolError, - ConnectionTimeoutError, - IdleTimeoutError, - ResponseTimeoutError, - TransferTimeoutError, -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/index.js b/node_modules/npm/node_modules/@npmcli/agent/lib/index.js deleted file mode 100644 index b33d6ea..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -const { LRUCache } = require('lru-cache') -const { normalizeOptions, cacheOptions } = require('./options') -const { getProxy, proxyCache } = require('./proxy.js') -const dns = require('./dns.js') -const Agent = require('./agents.js') - -const agentCache = new LRUCache({ max: 20 }) - -const getAgent = (url, { agent, proxy, noProxy, ...options } = {}) => { - // false has meaning so this can't be a simple truthiness check - if (agent != null) { - return agent - } - - url = new URL(url) - - const proxyForUrl = getProxy(url, { proxy, noProxy }) - const normalizedOptions = { - ...normalizeOptions(options), - proxy: proxyForUrl, - } - - const cacheKey = cacheOptions({ - ...normalizedOptions, - secureEndpoint: url.protocol === 'https:', - }) - - if (agentCache.has(cacheKey)) { - return agentCache.get(cacheKey) - } - - const newAgent = new Agent(normalizedOptions) - agentCache.set(cacheKey, newAgent) - - return newAgent -} - -module.exports = { - getAgent, - Agent, - // these are exported for backwards compatability - HttpAgent: Agent, - HttpsAgent: Agent, - cache: { - proxy: proxyCache, - agent: agentCache, - dns: dns.cache, - clear: () => { - proxyCache.clear() - agentCache.clear() - dns.cache.clear() - }, - }, -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/options.js b/node_modules/npm/node_modules/@npmcli/agent/lib/options.js deleted file mode 100644 index 0bf53f7..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/options.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict' - -const dns = require('./dns') - -const normalizeOptions = (opts) => { - const family = parseInt(opts.family ?? '0', 10) - const keepAlive = opts.keepAlive ?? true - - const normalized = { - // nodejs http agent options. these are all the defaults - // but kept here to increase the likelihood of cache hits - // https://nodejs.org/api/http.html#new-agentoptions - keepAliveMsecs: keepAlive ? 1000 : undefined, - maxSockets: opts.maxSockets ?? 15, - maxTotalSockets: Infinity, - maxFreeSockets: keepAlive ? 256 : undefined, - scheduling: 'fifo', - // then spread the rest of the options - ...opts, - // we already set these to their defaults that we want - family, - keepAlive, - // our custom timeout options - timeouts: { - // the standard timeout option is mapped to our idle timeout - // and then deleted below - idle: opts.timeout ?? 0, - connection: 0, - response: 0, - transfer: 0, - ...opts.timeouts, - }, - // get the dns options that go at the top level of socket connection - ...dns.getOptions({ family, ...opts.dns }), - } - - // remove timeout since we already used it to set our own idle timeout - delete normalized.timeout - - return normalized -} - -const createKey = (obj) => { - let key = '' - const sorted = Object.entries(obj).sort((a, b) => a[0] - b[0]) - for (let [k, v] of sorted) { - if (v == null) { - v = 'null' - } else if (v instanceof URL) { - v = v.toString() - } else if (typeof v === 'object') { - v = createKey(v) - } - key += `${k}:${v}:` - } - return key -} - -const cacheOptions = ({ secureEndpoint, ...options }) => createKey({ - secureEndpoint: !!secureEndpoint, - // socket connect options - family: options.family, - hints: options.hints, - localAddress: options.localAddress, - // tls specific connect options - strictSsl: secureEndpoint ? !!options.rejectUnauthorized : false, - ca: secureEndpoint ? options.ca : null, - cert: secureEndpoint ? options.cert : null, - key: secureEndpoint ? options.key : null, - // http agent options - keepAlive: options.keepAlive, - keepAliveMsecs: options.keepAliveMsecs, - maxSockets: options.maxSockets, - maxTotalSockets: options.maxTotalSockets, - maxFreeSockets: options.maxFreeSockets, - scheduling: options.scheduling, - // timeout options - timeouts: options.timeouts, - // proxy - proxy: options.proxy, -}) - -module.exports = { - normalizeOptions, - cacheOptions, -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/lib/proxy.js b/node_modules/npm/node_modules/@npmcli/agent/lib/proxy.js deleted file mode 100644 index 6272e92..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/lib/proxy.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict' - -const { HttpProxyAgent } = require('http-proxy-agent') -const { HttpsProxyAgent } = require('https-proxy-agent') -const { SocksProxyAgent } = require('socks-proxy-agent') -const { LRUCache } = require('lru-cache') -const { InvalidProxyProtocolError } = require('./errors.js') - -const PROXY_CACHE = new LRUCache({ max: 20 }) - -const SOCKS_PROTOCOLS = new Set(SocksProxyAgent.protocols) - -const PROXY_ENV_KEYS = new Set(['https_proxy', 'http_proxy', 'proxy', 'no_proxy']) - -const PROXY_ENV = Object.entries(process.env).reduce((acc, [key, value]) => { - key = key.toLowerCase() - if (PROXY_ENV_KEYS.has(key)) { - acc[key] = value - } - return acc -}, {}) - -const getProxyAgent = (url) => { - url = new URL(url) - - const protocol = url.protocol.slice(0, -1) - if (SOCKS_PROTOCOLS.has(protocol)) { - return SocksProxyAgent - } - if (protocol === 'https' || protocol === 'http') { - return [HttpProxyAgent, HttpsProxyAgent] - } - - throw new InvalidProxyProtocolError(url) -} - -const isNoProxy = (url, noProxy) => { - if (typeof noProxy === 'string') { - noProxy = noProxy.split(',').map((p) => p.trim()).filter(Boolean) - } - - if (!noProxy || !noProxy.length) { - return false - } - - const hostSegments = url.hostname.split('.').reverse() - - return noProxy.some((no) => { - const noSegments = no.split('.').filter(Boolean).reverse() - if (!noSegments.length) { - return false - } - - for (let i = 0; i < noSegments.length; i++) { - if (hostSegments[i] !== noSegments[i]) { - return false - } - } - - return true - }) -} - -const getProxy = (url, { proxy, noProxy }) => { - url = new URL(url) - - if (!proxy) { - proxy = url.protocol === 'https:' - ? PROXY_ENV.https_proxy - : PROXY_ENV.https_proxy || PROXY_ENV.http_proxy || PROXY_ENV.proxy - } - - if (!noProxy) { - noProxy = PROXY_ENV.no_proxy - } - - if (!proxy || isNoProxy(url, noProxy)) { - return null - } - - return new URL(proxy) -} - -module.exports = { - getProxyAgent, - getProxy, - proxyCache: PROXY_CACHE, -} diff --git a/node_modules/npm/node_modules/@npmcli/agent/package.json b/node_modules/npm/node_modules/@npmcli/agent/package.json deleted file mode 100644 index 7d3d680..0000000 --- a/node_modules/npm/node_modules/@npmcli/agent/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@npmcli/agent", - "version": "2.2.0", - "description": "the http/https agent used by the npm cli", - "main": "lib/index.js", - "scripts": { - "gencerts": "bash scripts/create-cert.sh", - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint" - }, - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/agent/issues" - }, - "homepage": "https://github.com/npm/agent#readme", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.19.0", - "publish": "true" - }, - "dependencies": { - "agent-base": "^7.1.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.1", - "lru-cache": "^10.0.1", - "socks-proxy-agent": "^8.0.1" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "minipass-fetch": "^3.0.3", - "nock": "^13.2.7", - "semver": "^7.5.4", - "simple-socks": "^3.1.0", - "tap": "^16.3.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/agent.git" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/LICENSE.md b/node_modules/npm/node_modules/@npmcli/arborist/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/arborist/README.md b/node_modules/npm/node_modules/@npmcli/arborist/README.md deleted file mode 100644 index 81d79cb..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/README.md +++ /dev/null @@ -1,349 +0,0 @@ -# @npmcli/arborist - -[![npm version](https://img.shields.io/npm/v/@npmcli/arborist.svg)](https://npm.im/@npmcli/arborist) -[![license](https://img.shields.io/npm/l/@npmcli/arborist.svg)](https://npm.im/@npmcli/arborist) -[![CI - @npmcli/arborist](https://github.com/npm/cli/actions/workflows/ci-npmcli-arborist.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-npmcli-arborist.yml) - -Inspect and manage `node_modules` trees. - -![a tree with the word ARBORIST superimposed on it](https://raw.githubusercontent.com/npm/arborist/main/docs/logo.svg?sanitize=true) - -There's more documentation [in the docs -folder](https://github.com/npm/cli/tree/latest/workspaces/arborist/docs). - -## USAGE - -```js -const Arborist = require('@npmcli/arborist') - -const arb = new Arborist({ - // options object - - // where we're doing stuff. defaults to cwd. - path: '/path/to/package/root', - - // url to the default registry. defaults to npm's default registry - registry: 'https://registry.npmjs.org', - - // scopes can be mapped to a different registry - '@foo:registry': 'https://registry.foo.com/', - - // Auth can be provided in a couple of different ways. If none are - // provided, then requests are anonymous, and private packages will 404. - // Arborist doesn't do anything with these, it just passes them down - // the chain to pacote and npm-registry-fetch. - - // Safest: a bearer token provided by a registry: - // 1. an npm auth token, used with the default registry - token: 'deadbeefcafebad', - // 2. an alias for the same thing: - _authToken: 'deadbeefcafebad', - - // insecure options: - // 3. basic auth, username:password, base64 encoded - auth: 'aXNhYWNzOm5vdCBteSByZWFsIHBhc3N3b3Jk', - // 4. username and base64 encoded password - username: 'isaacs', - password: 'bm90IG15IHJlYWwgcGFzc3dvcmQ=', - - // auth configs can also be scoped to a given registry with this - // rather unusual pattern: - '//registry.foo.com:token': 'blahblahblah', - '//basic.auth.only.foo.com:_auth': 'aXNhYWNzOm5vdCBteSByZWFsIHBhc3N3b3Jk', - '//registry.foo.com:always-auth': true, -}) - -// READING - -// returns a promise. reads the actual contents of node_modules -arb.loadActual().then(tree => { - // tree is also stored at arb.virtualTree -}) - -// read just what the package-lock.json/npm-shrinkwrap says -// This *also* loads the yarn.lock file, but that's only relevant -// when building the ideal tree. -arb.loadVirtual().then(tree => { - // tree is also stored at arb.virtualTree - // now arb.virtualTree is loaded - // this fails if there's no package-lock.json or package.json in the folder - // note that loading this way should only be done if there's no - // node_modules folder -}) - -// OPTIMIZING AND DESIGNING - -// build an ideal tree from the package.json and various lockfiles. -arb.buildIdealTree(options).then(() => { - // next step is to reify that ideal tree onto disk. - // options can be: - // rm: array of package names to remove at top level - // add: Array of package specifiers to add at the top level. Each of - // these will be resolved with pacote.manifest if the name can't be - // determined from the spec. (Eg, `github:foo/bar` vs `foo@somespec`.) - // The dep will be saved in the location where it already exists, - // (or pkg.dependencies) unless a different saveType is specified. - // saveType: Save added packages in a specific dependency set. - // - null (default) Wherever they exist already, or 'dependencies' - // - prod: definitely in 'dependencies' - // - optional: in 'optionalDependencies' - // - dev: devDependencies - // - peer: save in peerDependencies, and remove any optional flag from - // peerDependenciesMeta if one exists - // - peerOptional: save in peerDependencies, and add a - // peerDepsMeta[name].optional flag - // saveBundle: add newly added deps to the bundleDependencies list - // update: Either `true` to just go ahead and update everything, or an - // object with any or all of the following fields: - // - all: boolean. set to true to just update everything - // - names: names of packages update (like `npm update foo`) - // prune: boolean, default true. Prune extraneous nodes from the tree. - // preferDedupe: prefer to deduplicate packages if possible, rather than - // choosing a newer version of a dependency. Defaults to false, ie, - // always try to get the latest and greatest deps. - // legacyBundling: Nest every dep under the node requiring it, npm v2 style. - // No unnecessary deduplication. Default false. - - // At the end of this process, arb.idealTree is set. -}) - -// WRITING - -// Make the idealTree be the thing that's on disk -arb.reify({ - // write the lockfile(s) back to disk, and package.json with any updates - // defaults to 'true' - save: true, -}).then(() => { - // node modules has been written to match the idealTree -}) -``` - -## DATA STRUCTURES - -A `node_modules` tree is a logical graph of dependencies overlaid on a -physical tree of folders. - -A `Node` represents a package folder on disk, either at the root of the -package, or within a `node_modules` folder. The physical structure of the -folder tree is represented by the `node.parent` reference to the containing -folder, and `node.children` map of nodes within its `node_modules` -folder, where the key in the map is the name of the folder in -`node_modules`, and the value is the child node. - -A node without a parent is a top of tree. - -A `Link` represents a symbolic link to a package on disk. This can be a -symbolic link to a package folder within the current tree, or elsewhere on -disk. The `link.target` is a reference to the actual node. Links differ -from Nodes in that dependencies are resolved from the _target_ location, -rather than from the link location. - -An `Edge` represents a dependency relationship. Each node has an `edgesIn` -set, and an `edgesOut` map. Each edge has a `type` which specifies what -kind of dependency it represents: `'prod'` for regular dependencies, -`'peer'` for peerDependencies, `'dev'` for devDependencies, and -`'optional'` for optionalDependencies. `edge.from` is a reference to the -node that has the dependency, and `edge.to` is a reference to the node that -requires the dependency. - -As nodes are moved around in the tree, the graph edges are automatically -updated to point at the new module resolution targets. In other words, -`edge.from`, `edge.name`, and `edge.spec` are immutable; `edge.to` is -updated automatically when a node's parent changes. - -### class Node - -All arborist trees are `Node` objects. A `Node` refers -to a package folder, which may have children in `node_modules`. - -* `node.name` The name of this node's folder in `node_modules`. -* `node.parent` Physical parent node in the tree. The package in whose - `node_modules` folder this package lives. Null if node is top of tree. - - Setting `node.parent` will automatically update `node.location` and all - graph edges affected by the move. - -* `node.meta` A `Shrinkwrap` object which looks up `resolved` and - `integrity` values for all modules in this tree. Only relevant on `root` - nodes. - -* `node.children` Map of packages located in the node's `node_modules` - folder. -* `node.package` The contents of this node's `package.json` file. -* `node.path` File path to this package. If the node is a link, then this - is the path to the link, not to the link target. If the node is _not_ a - link, then this matches `node.realpath`. -* `node.realpath` The full real filepath on disk where this node lives. -* `node.location` A slash-normalized relative path from the root node to - this node's path. -* `node.isLink` Whether this represents a symlink. Always `false` for Node - objects, always `true` for Link objects. -* `node.isRoot` True if this node is a root node. (Ie, if `node.root === - node`.) -* `node.root` The root node where we are working. If not assigned to some - other value, resolves to the node itself. (Ie, the root node's `root` - property refers to itself.) -* `node.isTop` True if this node is the top of its tree (ie, has no - `parent`, false otherwise). -* `node.top` The top node in this node's tree. This will be equal to - `node.root` for simple trees, but link targets will frequently be outside - of (or nested somewhere within) a `node_modules` hierarchy, and so will - have a different `top`. -* `node.dev`, `node.optional`, `node.devOptional`, `node.peer`, Indicators - as to whether this node is a dev, optional, and/or peer dependency. - These flags are relevant when pruning dependencies out of the tree or - deciding what to reify. See **Package Dependency Flags** below for - explanations. -* `node.edgesOut` Edges in the dependency graph indicating nodes that this - node depends on, which resolve its dependencies. -* `node.edgesIn` Edges in the dependency graph indicating nodes that depend - on this node. - -* `extraneous` True if this package is not required by any other for any - reason. False for top of tree. - -* `node.resolve(name)` Identify the node that will be returned when code - in this package runs `require(name)` - -* `node.errors` Array of errors encountered while parsing package.json or - version specifiers. - -### class Link - -Link objects represent a symbolic link within the `node_modules` folder. -They have most of the same properties and methods as `Node` objects, with a -few differences. - -* `link.target` A Node object representing the package that the link - references. If this is a Node already present within the tree, then it - will be the same object. If it's outside of the tree, then it will be - treated as the top of its own tree. -* `link.isLink` Always true. -* `link.children` This is always an empty map, since links don't have their - own children directly. - -### class Edge - -Edge objects represent a dependency relationship a package node to the -point in the tree where the dependency will be loaded. As nodes are moved -within the tree, Edges automatically update to point to the appropriate -location. - -* `new Edge({ from, type, name, spec })` Creates a new edge with the - specified fields. After instantiation, none of the fields can be - changed directly. -* `edge.from` The node that has the dependency. -* `edge.type` The type of dependency. One of `'prod'`, `'dev'`, `'peer'`, - or `'optional'`. -* `edge.name` The name of the dependency. Ie, the key in the - relevant `package.json` dependencies object. -* `edge.spec` The specifier that is required. This can be a version, - range, tag name, git url, or tarball URL. Any specifier allowed by npm - is supported. -* `edge.to` Automatically set to the node in the tree that matches the - `name` field. -* `edge.valid` True if `edge.to` satisfies the specifier. -* `edge.error` A string indicating the type of error if there is a problem, - or `null` if it's valid. Values, in order of precedence: - * `DETACHED` Indicates that the edge has been detached from its - `edge.from` node, typically because a new edge was created when a - dependency specifier was modified. - * `MISSING` Indicates that the dependency is unmet. Note that this is - _not_ set for unmet dependencies of the `optional` type. - * `PEER LOCAL` Indicates that a `peerDependency` is found in the - node's local `node_modules` folder, and the node is not the top of - the tree. This violates the `peerDependency` contract, because it - means that the dependency is not a peer. - * `INVALID` Indicates that the dependency does not satisfy `edge.spec`. -* `edge.reload()` Re-resolve to find the appropriate value for `edge.to`. - Called automatically from the `Node` class when the tree is mutated. - -### Package Dependency Flags - -The dependency type of a node can be determined efficiently by looking at -the `dev`, `optional`, and `devOptional` flags on the node object. These -are updated by arborist when necessary whenever the tree is modified in -such a way that the dependency graph can change, and are relevant when -pruning nodes from the tree. - -``` -| extraneous | peer | dev | optional | devOptional | meaning | prune? | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | | | | | production dep | never | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| X | N/A | N/A | N/A | N/A | nothing depends on | always | -| | | | | | this, it is trash | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | | X | | X | devDependency, or | if pruning dev | -| | | | | not in lock | only depended upon | | -| | | | | | by devDependencies | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | | | X | X | optionalDependency, | if pruning | -| | | | | not in lock | or only depended on | optional | -| | | | | | by optionalDeps | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | | X | X | X | Optional dependency | if pruning EITHER | -| | | | | not in lock | of dep(s) in the | dev OR optional | -| | | | | | dev hierarchy | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | | | | X | BOTH a non-optional | if pruning BOTH | -| | | | | in lock | dep within the dev | dev AND optional | -| | | | | | hierarchy, AND a | | -| | | | | | dep within the | | -| | | | | | optional hierarchy | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | X | | | | peer dependency, or | if pruning peers | -| | | | | | only depended on by | | -| | | | | | peer dependencies | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | X | X | | X | peer dependency of | if pruning peer | -| | | | | not in lock | dev node hierarchy | OR dev deps | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | X | | X | X | peer dependency of | if pruning peer | -| | | | | not in lock | optional nodes, or | OR optional deps | -| | | | | | peerOptional dep | | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | X | X | X | X | peer optional deps | if pruning peer | -| | | | | not in lock | of the dev dep | OR optional OR | -| | | | | | hierarchy | dev | -|------------+------+-----+----------+-------------+---------------------+-------------------| -| | X | | | X | BOTH a non-optional | if pruning peers | -| | | | | in lock | peer dep within the | OR: | -| | | | | | dev hierarchy, AND | BOTH optional | -| | | | | | a peer optional dep | AND dev deps | -+------------+------+-----+----------+-------------+---------------------+-------------------+ -``` - -* If none of these flags are set, then the node is required by the - dependency and/or peerDependency hierarchy. It should not be pruned. -* If _both_ `node.dev` and `node.optional` are set, then the node is an - optional dependency of one of the packages in the devDependency - hierarchy. It should be pruned if _either_ dev or optional deps are - being removed. -* If `node.dev` is set, but `node.optional` is not, then the node is - required in the devDependency hierarchy. It should be pruned if dev - dependencies are being removed. -* If `node.optional` is set, but `node.dev` is not, then the node is - required in the optionalDependency hierarchy. It should be pruned if - optional dependencies are being removed. -* If `node.devOptional` is set, then the node is a (non-optional) - dependency within the devDependency hierarchy, _and_ a dependency - within the `optionalDependency` hierarchy. It should be pruned if - _both_ dev and optional dependencies are being removed. -* If `node.peer` is set, then all the same semantics apply as above, except - that the dep is brought in by a peer dep at some point, rather than a - normal non-peer dependency. - -Note: `devOptional` is only set in the shrinkwrap/package-lock file if -_neither_ `dev` nor `optional` are set, as it would be redundant. - -## BIN - -Arborist ships with a cli that can be used to run arborist specific commands outside of the context of the npm CLI. This script is currently not part of the public API and is subject to breaking changes outside of major version bumps. - -To see the usage run: - -``` -npx @npmcli/arborist --help -``` diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/actual.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/actual.js deleted file mode 100644 index 866b2cd..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/actual.js +++ /dev/null @@ -1,19 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') - -module.exports = (options, time) => new Arborist(options) - .loadActual(options) - .then(time) - .then(async ({ timing, result: tree }) => { - printTree(tree) - if (options.save) { - await tree.meta.save() - } - if (options.saveHidden) { - tree.meta.hiddenLockfile = true - tree.meta.filename = options.path + '/node_modules/.package-lock.json' - await tree.meta.save() - } - return `read ${tree.inventory.size} deps in ${timing.ms}` - }) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/audit.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/audit.js deleted file mode 100644 index 0e32833..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/audit.js +++ /dev/null @@ -1,51 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') -const log = require('./lib/logging.js') - -const Vuln = require('../lib/vuln.js') -const printReport = report => { - for (const vuln of report.values()) { - log.info(printVuln(vuln)) - } - if (report.topVulns.size) { - log.info('\n# top-level vulnerabilities') - for (const vuln of report.topVulns.values()) { - log.info(printVuln(vuln)) - } - } -} - -const printVuln = vuln => { - return { - __proto__: { constructor: Vuln }, - name: vuln.name, - issues: [...vuln.advisories].map(a => printAdvisory(a)), - range: vuln.simpleRange, - nodes: [...vuln.nodes].map(node => `${node.name} ${node.location || '#ROOT'}`), - ...(vuln.topNodes.size === 0 ? {} : { - topNodes: [...vuln.topNodes].map(node => `${node.location || '#ROOT'}`), - }), - } -} - -const printAdvisory = a => `${a.title}${a.url ? ' ' + a.url : ''}` - -module.exports = (options, time) => { - const arb = new Arborist(options) - return arb - .audit(options) - .then(time) - .then(async ({ timing, result: tree }) => { - if (options.fix) { - printTree(tree) - } - printReport(arb.auditReport) - if (tree.meta && options.save) { - await tree.meta.save() - } - return options.fix - ? `resolved ${tree.inventory.size} deps in ${timing.seconds}` - : `done in ${timing.seconds}` - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/funding.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/funding.js deleted file mode 100644 index cf25976..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/funding.js +++ /dev/null @@ -1,38 +0,0 @@ -const Arborist = require('../') - -const log = require('./lib/logging.js') - -module.exports = (options, time) => { - const query = options._.shift() - const a = new Arborist(options) - return a - .loadVirtual() - .then(tree => { - // only load the actual tree if the virtual one doesn't have modern metadata - if (!tree.meta || !(tree.meta.originalLockfileVersion >= 2)) { - log.error('old metadata, load actual') - throw 'load actual' - } else { - log.error('meta ok, return virtual tree') - return tree - } - }) - .catch(() => a.loadActual()) - .then(time) - .then(({ timing, result: tree }) => { - if (!query) { - for (const node of tree.inventory.values()) { - if (node.package.funding) { - log.info(node.name, node.location, node.package.funding) - } - } - } else { - for (const node of tree.inventory.query('name', query)) { - if (node.package.funding) { - log.info(node.name, node.location, node.package.funding) - } - } - } - return `read ${tree.inventory.size} deps in ${timing.ms}` - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/ideal.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/ideal.js deleted file mode 100644 index 1dd206e..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/ideal.js +++ /dev/null @@ -1,14 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') - -module.exports = (options, time) => new Arborist(options) - .buildIdealTree(options) - .then(time) - .then(async ({ timing, result: tree }) => { - printTree(tree) - if (tree.meta && options.save) { - await tree.meta.save() - } - return `resolved ${tree.inventory.size} deps in ${timing.seconds}` - }) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/index.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/index.js deleted file mode 100755 index ff356fa..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/index.js +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') -const path = require('path') - -const { bin, arb: options } = require('./lib/options') -const version = require('../package.json').version - -const usage = (message = '') => `Arborist - the npm tree doctor - -Version: ${version} -${message && '\n' + message + '\n'} -# USAGE - arborist [path] [options...] - -# COMMANDS - - * reify: reify ideal tree to node_modules (install, update, rm, ...) - * prune: prune the ideal tree and reify (like npm prune) - * ideal: generate and print the ideal tree - * actual: read and print the actual tree in node_modules - * virtual: read and print the virtual tree in the local shrinkwrap file - * shrinkwrap: load a local shrinkwrap and print its data - * audit: perform a security audit on project dependencies - * funding: query funding information in the local package tree. A second - positional argument after the path name can limit to a package name. - * license: query license information in the local package tree. A second - positional argument after the path name can limit to a license type. - * help: print this text - * version: print the version - -# OPTIONS - - Most npm options are supported, but in camelCase rather than css-case. For - example, instead of '--dry-run', use '--dryRun'. - - Additionally: - - * --loglevel=warn|--quiet will supppress the printing of package trees - * --logfile will output logs to a file - * --timing will show timing information - * Instead of 'npm install ', use 'arborist reify --add='. - The '--add=' option can be specified multiple times. - * Instead of 'npm rm ', use 'arborist reify --rm='. - The '--rm=' option can be specified multiple times. - * Instead of 'npm update', use 'arborist reify --update-all'. - * 'npm audit fix' is 'arborist audit --fix' -` - -const commands = { - version: () => console.log(version), - help: () => console.log(usage()), - exit: () => { - process.exitCode = 1 - console.error( - usage(`Error: command '${bin.command}' does not exist.`) - ) - }, -} - -const commandFiles = fs.readdirSync(__dirname).filter((f) => path.extname(f) === '.js' && f !== __filename) - -for (const file of commandFiles) { - const command = require(`./${file}`) - const name = path.basename(file, '.js') - const totalTime = `bin:${name}:init` - const scriptTime = `bin:${name}:script` - - commands[name] = () => { - const timers = require('./lib/timers') - const log = require('./lib/logging') - - log.info(name, options) - - process.emit('time', totalTime) - process.emit('time', scriptTime) - - return command(options, (result) => { - process.emit('timeEnd', scriptTime) - return { - result, - timing: { - seconds: `${timers.get(scriptTime) / 1e9}s`, - ms: `${timers.get(scriptTime) / 1e6}ms`, - }, - } - }) - .then((result) => { - log.info(result) - return result - }) - .catch((err) => { - process.exitCode = 1 - log.error(err) - return err - }) - .then((r) => { - process.emit('timeEnd', totalTime) - if (bin.loglevel !== 'silent') { - console[process.exitCode ? 'error' : 'log'](r) - } - return r - }) - } -} - -if (commands[bin.command]) { - commands[bin.command]() -} else { - commands.exit() -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/logging.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/logging.js deleted file mode 100644 index ffb5544..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/logging.js +++ /dev/null @@ -1,77 +0,0 @@ -const log = require('proc-log') -const fs = require('fs') -const { dirname } = require('path') -const os = require('os') -const { inspect, format } = require('util') - -const { bin: options } = require('./options.js') - -// add a meta method to proc-log for passing optional -// metadata through to log handlers -const META = Symbol('meta') -const parseArgs = (...args) => { - const { [META]: isMeta } = args[args.length - 1] || {} - return isMeta - ? [args[args.length - 1], ...args.slice(0, args.length - 1)] - : [{}, ...args] -} -log.meta = (meta = {}) => ({ [META]: true, ...meta }) - -const levels = new Map([ - 'silly', - 'verbose', - 'info', - 'http', - 'notice', - 'warn', - 'error', - 'silent', -].map((level, index) => [level, index])) - -const addLogListener = (write, { eol = os.EOL, loglevel = 'silly', colors = false } = {}) => { - const levelIndex = levels.get(loglevel) - - const magenta = m => colors ? `\x1B[35m${m}\x1B[39m` : m - const dim = m => colors ? `\x1B[2m${m}\x1B[22m` : m - const red = m => colors ? `\x1B[31m${m}\x1B[39m` : m - - const formatter = (level, ...args) => { - const depth = level === 'error' && args[0] && args[0].code === 'ERESOLVE' ? Infinity : 10 - - if (level === 'info' && args[0] === 'timeEnd') { - args[1] = dim(args[1]) - } else if (level === 'error' && args[0] === 'timeError') { - args[1] = red(args[1]) - } - - const messages = args.map(a => typeof a === 'string' ? a : inspect(a, { depth, colors })) - const pref = `${process.pid} ${magenta(level)} ` - - return pref + format(...messages).trim().split('\n').join(`${eol}${pref}`) + eol - } - - process.on('log', (...args) => { - const [meta, level, ...logArgs] = parseArgs(...args) - - if (levelIndex <= levels.get(level) || meta.force) { - write(formatter(level, ...logArgs)) - } - }) -} - -if (options.loglevel !== 'silent') { - addLogListener((v) => process.stderr.write(v), { - eol: '\n', - colors: options.colors, - loglevel: options.loglevel, - }) -} - -if (options.logfile) { - log.silly('logfile', options.logfile) - fs.mkdirSync(dirname(options.logfile), { recursive: true }) - const fd = fs.openSync(options.logfile, 'a') - addLogListener((str) => fs.writeSync(fd, str)) -} - -module.exports = log diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/options.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/options.js deleted file mode 100644 index 8dbaf13..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/options.js +++ /dev/null @@ -1,123 +0,0 @@ -const nopt = require('nopt') -const path = require('path') - -const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k) - -const cleanPath = (val) => { - const k = Symbol('key') - const data = {} - nopt.typeDefs.path.validate(data, k, val) - return data[k] -} - -const parse = (...noptArgs) => { - const binOnlyOpts = { - command: String, - loglevel: String, - colors: Boolean, - timing: ['always', Boolean], - logfile: String, - } - - const arbOpts = { - add: Array, - rm: Array, - omit: Array, - update: Array, - workspaces: Array, - global: Boolean, - force: Boolean, - 'global-style': Boolean, - 'prefer-dedupe': Boolean, - 'legacy-peer-deps': Boolean, - 'update-all': Boolean, - before: Date, - path: path, - cache: path, - ...binOnlyOpts, - } - - const short = { - quiet: ['--loglevel', 'warn'], - logs: ['--logfile', 'true'], - w: '--workspaces', - g: '--global', - f: '--force', - } - - const defaults = { - // key order is important for command and path - // since they shift positional args - // command is 1st, path is 2nd - command: (o) => o.argv.remain.shift(), - path: (o) => cleanPath(o.argv.remain.shift() || '.'), - colors: has(process.env, 'NO_COLOR') ? false : !!process.stderr.isTTY, - loglevel: 'silly', - timing: (o) => o.loglevel === 'silly', - cache: `${process.env.HOME}/.npm/_cacache`, - } - - const derived = [ - // making update either `all` or an array of names but not both - ({ updateAll: all, update: names, ...o }) => { - if (all || names) { - o.update = all != null ? { all } : { names } - } - return o - }, - ({ logfile, ...o }) => { - // logfile is parsed as a string so if its true or set but empty - // then set the default logfile - if (logfile === 'true' || logfile === '') { - logfile = `arb-log-${new Date().toISOString().replace(/[.:]/g, '_')}.log` - } - // then parse it the same as nopt parses other paths - if (logfile) { - o.logfile = cleanPath(logfile) - } - return o - }, - ] - - const transforms = [ - // Camelcase all top level keys - (o) => { - const entries = Object.entries(o).map(([k, v]) => [ - k.replace(/-./g, s => s[1].toUpperCase()), - v, - ]) - return Object.fromEntries(entries) - }, - // Set defaults on unset keys - (o) => { - for (const [k, v] of Object.entries(defaults)) { - if (!has(o, k)) { - o[k] = typeof v === 'function' ? v(o) : v - } - } - return o - }, - // Set/unset derived values - ...derived.map((derive) => (o) => derive(o) || o), - // Separate bin and arborist options - ({ argv: { remain: _ }, ...o }) => { - const bin = { _ } - for (const k of Object.keys(binOnlyOpts)) { - if (has(o, k)) { - bin[k] = o[k] - delete o[k] - } - } - return { bin, arb: o } - }, - ] - - let options = nopt(arbOpts, short, ...noptArgs) - for (const t of transforms) { - options = t(options) - } - - return options -} - -module.exports = parse() diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/print-tree.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/print-tree.js deleted file mode 100644 index 5539819..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/print-tree.js +++ /dev/null @@ -1,4 +0,0 @@ -const { inspect } = require('util') -const log = require('./logging.js') - -module.exports = tree => log.info(inspect(tree.toJSON(), { depth: Infinity })) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/timers.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/timers.js deleted file mode 100644 index 586dee7..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/lib/timers.js +++ /dev/null @@ -1,33 +0,0 @@ -const { bin: options } = require('./options.js') -const log = require('./logging.js') - -const timers = new Map() -const finished = new Map() - -process.on('time', name => { - if (timers.has(name)) { - throw new Error('conflicting timer! ' + name) - } - timers.set(name, process.hrtime.bigint()) -}) - -process.on('timeEnd', name => { - if (!timers.has(name)) { - throw new Error('timer not started! ' + name) - } - const elapsed = Number(process.hrtime.bigint() - timers.get(name)) - timers.delete(name) - finished.set(name, elapsed) - if (options.timing) { - log.info('timeEnd', `${name} ${elapsed / 1e9}s`, log.meta({ force: options.timing === 'always' })) - } -}) - -process.on('exit', () => { - for (const name of timers.keys()) { - log.error('timeError', 'Dangling timer:', name) - process.exitCode = 1 - } -}) - -module.exports = finished diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/license.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/license.js deleted file mode 100644 index 77d5796..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/license.js +++ /dev/null @@ -1,48 +0,0 @@ -const localeCompare = require('@isaacs/string-locale-compare')('en') -const Arborist = require('../') -const log = require('./lib/logging.js') - -module.exports = (options, time) => { - const query = options._.shift() - const a = new Arborist(options) - return a - .loadVirtual() - .then(tree => { - // only load the actual tree if the virtual one doesn't have modern metadata - if (!tree.meta || !(tree.meta.originalLockfileVersion >= 2)) { - throw 'load actual' - } else { - return tree - } - }).catch((er) => { - log.error('loading actual tree', er) - return a.loadActual() - }) - .then(time) - .then(({ result: tree }) => { - const output = [] - if (!query) { - const set = [] - for (const license of tree.inventory.query('license')) { - set.push([tree.inventory.query('license', license).size, license]) - } - - for (const [count, license] of set.sort((a, b) => - a[1] && b[1] ? b[0] - a[0] || localeCompare(a[1], b[1]) - : a[1] ? -1 - : b[1] ? 1 - : 0)) { - output.push(`${count} ${license}`) - log.info(count, license) - } - } else { - for (const node of tree.inventory.query('license', query === 'undefined' ? undefined : query)) { - const msg = `${node.name} ${node.location} ${node.package.description || ''}` - output.push(msg) - log.info(msg) - } - } - - return output.join('\n') - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/prune.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/prune.js deleted file mode 100644 index 3c52bc1..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/prune.js +++ /dev/null @@ -1,48 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') -const log = require('./lib/logging.js') - -const printDiff = diff => { - const { depth } = require('treeverse') - depth({ - tree: diff, - visit: d => { - if (d.location === '') { - return - } - switch (d.action) { - case 'REMOVE': - log.info('REMOVE', d.actual.location) - break - case 'ADD': - log.info('ADD', d.ideal.location, d.ideal.resolved) - break - case 'CHANGE': - log.info('CHANGE', d.actual.location, { - from: d.actual.resolved, - to: d.ideal.resolved, - }) - break - } - }, - getChildren: d => d.children, - }) -} - -module.exports = (options, time) => { - const arb = new Arborist(options) - return arb - .prune(options) - .then(time) - .then(async ({ timing, result: tree }) => { - printTree(tree) - if (options.dryRun) { - printDiff(arb.diff) - } - if (tree.meta && options.save) { - await tree.meta.save() - } - return `resolved ${tree.inventory.size} deps in ${timing.seconds}` - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/reify.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/reify.js deleted file mode 100644 index 3f3aafe..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/reify.js +++ /dev/null @@ -1,48 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') -const log = require('./lib/logging.js') - -const printDiff = diff => { - const { depth } = require('treeverse') - depth({ - tree: diff, - visit: d => { - if (d.location === '') { - return - } - switch (d.action) { - case 'REMOVE': - log.info('REMOVE', d.actual.location) - break - case 'ADD': - log.info('ADD', d.ideal.location, d.ideal.resolved) - break - case 'CHANGE': - log.info('CHANGE', d.actual.location, { - from: d.actual.resolved, - to: d.ideal.resolved, - }) - break - } - }, - getChildren: d => d.children, - }) -} - -module.exports = (options, time) => { - const arb = new Arborist(options) - return arb - .reify(options) - .then(time) - .then(async ({ timing, result: tree }) => { - printTree(tree) - if (options.dryRun) { - printDiff(arb.diff) - } - if (tree.meta && options.save) { - await tree.meta.save() - } - return `resolved ${tree.inventory.size} deps in ${timing.seconds}` - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js deleted file mode 100644 index 5660322..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/shrinkwrap.js +++ /dev/null @@ -1,7 +0,0 @@ -const Shrinkwrap = require('../lib/shrinkwrap.js') - -module.exports = (options, time) => Shrinkwrap - .load(options) - .then((s) => s.commit()) - .then(time) - .then(({ result: s }) => JSON.stringify(s, 0, 2)) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/bin/virtual.js b/node_modules/npm/node_modules/@npmcli/arborist/bin/virtual.js deleted file mode 100644 index 95b1de2..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/bin/virtual.js +++ /dev/null @@ -1,14 +0,0 @@ -const Arborist = require('../') - -const printTree = require('./lib/print-tree.js') - -module.exports = (options, time) => new Arborist(options) - .loadVirtual() - .then(time) - .then(async ({ timing, result: tree }) => { - printTree(tree) - if (options.save) { - await tree.meta.save() - } - return `read ${tree.inventory.size} deps in ${timing.ms}` - }) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js deleted file mode 100644 index c5cdc09..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/add-rm-pkg-deps.js +++ /dev/null @@ -1,143 +0,0 @@ -// add and remove dependency specs to/from pkg manifest - -const log = require('proc-log') -const localeCompare = require('@isaacs/string-locale-compare')('en') - -const add = ({ pkg, add, saveBundle, saveType }) => { - for (const { name, rawSpec } of add) { - let addSaveType = saveType - // if the user does not give us a type, we infer which type(s) - // to keep based on the same order of priority we do when - // building the tree as defined in the _loadDeps method of - // the node class. - if (!addSaveType) { - addSaveType = inferSaveType(pkg, name) - } - - if (addSaveType === 'prod') { - // a production dependency can only exist as production (rpj ensures it - // doesn't coexist w/ optional) - deleteSubKey(pkg, 'devDependencies', name, 'dependencies') - deleteSubKey(pkg, 'peerDependencies', name, 'dependencies') - } else if (addSaveType === 'dev') { - // a dev dependency may co-exist as peer, or optional, but not production - deleteSubKey(pkg, 'dependencies', name, 'devDependencies') - } else if (addSaveType === 'optional') { - // an optional dependency may co-exist as dev (rpj ensures it doesn't - // coexist w/ prod) - deleteSubKey(pkg, 'peerDependencies', name, 'optionalDependencies') - } else { // peer or peerOptional is all that's left - // a peer dependency may coexist as dev - deleteSubKey(pkg, 'dependencies', name, 'peerDependencies') - deleteSubKey(pkg, 'optionalDependencies', name, 'peerDependencies') - } - - const depType = saveTypeMap.get(addSaveType) - - pkg[depType] = pkg[depType] || {} - if (rawSpec !== '*' || pkg[depType][name] === undefined) { - pkg[depType][name] = rawSpec - } - if (addSaveType === 'optional') { - // Affordance for previous npm versions that require this behaviour - pkg.dependencies = pkg.dependencies || {} - pkg.dependencies[name] = pkg.optionalDependencies[name] - } - - if (addSaveType === 'peer' || addSaveType === 'peerOptional') { - const pdm = pkg.peerDependenciesMeta || {} - if (addSaveType === 'peer' && pdm[name] && pdm[name].optional) { - pdm[name].optional = false - } else if (addSaveType === 'peerOptional') { - pdm[name] = pdm[name] || {} - pdm[name].optional = true - pkg.peerDependenciesMeta = pdm - } - // peerDeps are often also a devDep, so that they can be tested when - // using package managers that don't auto-install peer deps - if (pkg.devDependencies && pkg.devDependencies[name] !== undefined) { - pkg.devDependencies[name] = pkg.peerDependencies[name] - } - } - - if (saveBundle && addSaveType !== 'peer' && addSaveType !== 'peerOptional') { - // keep it sorted, keep it unique - const bd = new Set(pkg.bundleDependencies || []) - bd.add(name) - pkg.bundleDependencies = [...bd].sort(localeCompare) - } - } - - return pkg -} - -// Canonical source of both the map between saveType and where it correlates to -// in the package, and the names of all our dependencies attributes -const saveTypeMap = new Map([ - ['dev', 'devDependencies'], - ['optional', 'optionalDependencies'], - ['prod', 'dependencies'], - ['peerOptional', 'peerDependencies'], - ['peer', 'peerDependencies'], -]) - -// Finds where the package is already in the spec and infers saveType from that -const inferSaveType = (pkg, name) => { - for (const saveType of saveTypeMap.keys()) { - if (hasSubKey(pkg, saveTypeMap.get(saveType), name)) { - if ( - saveType === 'peerOptional' && - (!hasSubKey(pkg, 'peerDependenciesMeta', name) || - !pkg.peerDependenciesMeta[name].optional) - ) { - return 'peer' - } - return saveType - } - } - return 'prod' -} - -const hasSubKey = (pkg, depType, name) => { - return pkg[depType] && Object.prototype.hasOwnProperty.call(pkg[depType], name) -} - -// Removes a subkey and warns about it if it's being replaced -const deleteSubKey = (pkg, depType, name, replacedBy) => { - if (hasSubKey(pkg, depType, name)) { - if (replacedBy) { - log.warn('idealTree', `Removing ${depType}.${name} in favor of ${replacedBy}.${name}`) - } - delete pkg[depType][name] - - // clean up peerDepsMeta if we are removing something from peerDependencies - if (depType === 'peerDependencies' && pkg.peerDependenciesMeta) { - delete pkg.peerDependenciesMeta[name] - if (!Object.keys(pkg.peerDependenciesMeta).length) { - delete pkg.peerDependenciesMeta - } - } - - if (!Object.keys(pkg[depType]).length) { - delete pkg[depType] - } - } -} - -const rm = (pkg, rm) => { - for (const depType of new Set(saveTypeMap.values())) { - for (const name of rm) { - deleteSubKey(pkg, depType, name) - } - } - if (pkg.bundleDependencies) { - pkg.bundleDependencies = pkg.bundleDependencies - .filter(name => !rm.includes(name)) - if (!pkg.bundleDependencies.length) { - delete pkg.bundleDependencies - } - } - return pkg -} - -module.exports = { add, rm, saveTypeMap, hasSubKey } diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/audit.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/audit.js deleted file mode 100644 index af260bd..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/audit.js +++ /dev/null @@ -1,51 +0,0 @@ -// mixin implementing the audit method - -const AuditReport = require('../audit-report.js') - -// shared with reify -const _global = Symbol.for('global') -const _workspaces = Symbol.for('workspaces') -const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot') - -module.exports = cls => class Auditor extends cls { - async audit (options = {}) { - this.addTracker('audit') - if (this[_global]) { - throw Object.assign( - new Error('`npm audit` does not support testing globals'), - { code: 'EAUDITGLOBAL' } - ) - } - - // allow the user to set options on the ctor as well. - // XXX: deprecate separate method options objects. - options = { ...this.options, ...options } - - process.emit('time', 'audit') - let tree - if (options.packageLock === false) { - // build ideal tree - await this.loadActual(options) - await this.buildIdealTree() - tree = this.idealTree - } else { - tree = await this.loadVirtual() - } - if (this[_workspaces] && this[_workspaces].length) { - options.filterSet = this.workspaceDependencySet( - tree, - this[_workspaces], - this[_includeWorkspaceRoot] - ) - } - if (!options.workspacesEnabled) { - options.filterSet = - this.excludeWorkspacesDependencySet(tree) - } - this.auditReport = await AuditReport.load(tree, options) - const ret = options.fix ? this.reify(options) : this.auditReport - process.emit('timeEnd', 'audit') - this.finishTracker('audit') - return ret - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js deleted file mode 100644 index d04ddf2..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js +++ /dev/null @@ -1,1511 +0,0 @@ -// mixin implementing the buildIdealTree method -const localeCompare = require('@isaacs/string-locale-compare')('en') -const rpj = require('read-package-json-fast') -const npa = require('npm-package-arg') -const pacote = require('pacote') -const cacache = require('cacache') -const promiseCallLimit = require('promise-call-limit') -const realpath = require('../../lib/realpath.js') -const { resolve, dirname } = require('path') -const treeCheck = require('../tree-check.js') -const { readdirScoped } = require('@npmcli/fs') -const { lstat, readlink } = require('fs/promises') -const { depth } = require('treeverse') -const log = require('proc-log') -const { cleanUrl } = require('npm-registry-fetch') - -const { - OK, - REPLACE, - CONFLICT, -} = require('../can-place-dep.js') -const PlaceDep = require('../place-dep.js') - -const debug = require('../debug.js') -const fromPath = require('../from-path.js') -const calcDepFlags = require('../calc-dep-flags.js') -const Shrinkwrap = require('../shrinkwrap.js') -const { defaultLockfileVersion } = Shrinkwrap -const Node = require('../node.js') -const Link = require('../link.js') -const addRmPkgDeps = require('../add-rm-pkg-deps.js') -const optionalSet = require('../optional-set.js') -const { checkEngine, checkPlatform } = require('npm-install-checks') -const relpath = require('../relpath.js') -const resetDepFlags = require('../reset-dep-flags.js') - -// note: some of these symbols are shared so we can hit -// them with unit tests and reuse them across mixins -const _updateAll = Symbol.for('updateAll') -const _flagsSuspect = Symbol.for('flagsSuspect') -const _workspaces = Symbol.for('workspaces') -const _setWorkspaces = Symbol.for('setWorkspaces') -const _updateNames = Symbol.for('updateNames') -const _resolvedAdd = Symbol.for('resolvedAdd') -const _usePackageLock = Symbol.for('usePackageLock') -const _rpcache = Symbol.for('realpathCache') -const _stcache = Symbol.for('statCache') -const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot') - -// exposed symbol for unit testing the placeDep method directly -const _peerSetSource = Symbol.for('peerSetSource') - -// used by Reify mixin -const _force = Symbol.for('force') -const _global = Symbol.for('global') -const _idealTreePrune = Symbol.for('idealTreePrune') - -// Push items in, pop them sorted by depth and then path -class DepsQueue { - #deps = [] - #sorted = true - - get length () { - return this.#deps.length - } - - push (item) { - if (!this.#deps.includes(item)) { - this.#sorted = false - this.#deps.push(item) - } - } - - pop () { - if (!this.#sorted) { - // sort physically shallower deps up to the front of the queue, because - // they'll affect things deeper in, then alphabetical - this.#deps.sort((a, b) => - (a.depth - b.depth) || localeCompare(a.path, b.path)) - this.#sorted = true - } - return this.#deps.shift() - } -} - -module.exports = cls => class IdealTreeBuilder extends cls { - #complete - #currentDep = null - #depsQueue = new DepsQueue() - #depsSeen = new Set() - #explicitRequests = new Set() - #follow - #installStrategy - #linkNodes = new Set() - #loadFailures = new Set() - #manifests = new Map() - #mutateTree = false - #preferDedupe = false - #prune - #strictPeerDeps - #virtualRoots = new Map() - - constructor (options) { - super(options) - - // normalize trailing slash - const registry = options.registry || 'https://registry.npmjs.org' - options.registry = this.registry = registry.replace(/\/+$/, '') + '/' - - const { - follow = false, - force = false, - global = false, - installStrategy = 'hoisted', - idealTree = null, - includeWorkspaceRoot = false, - installLinks = false, - legacyPeerDeps = false, - packageLock = true, - strictPeerDeps = false, - workspaces = [], - } = options - - this[_workspaces] = workspaces || [] - this[_force] = !!force - this.#strictPeerDeps = !!strictPeerDeps - - this.idealTree = idealTree - this.installLinks = installLinks - this.legacyPeerDeps = legacyPeerDeps - - this[_usePackageLock] = packageLock - this[_global] = !!global - this.#installStrategy = global ? 'shallow' : installStrategy - this.#follow = !!follow - - if (this[_workspaces].length && this[_global]) { - throw new Error('Cannot operate on workspaces in global mode') - } - - this[_updateAll] = false - this[_updateNames] = [] - this[_resolvedAdd] = [] - - // a map of each module in a peer set to the thing that depended on - // that set of peers in the first place. Use a WeakMap so that we - // don't hold onto references for nodes that are garbage collected. - this[_peerSetSource] = new WeakMap() - - this[_includeWorkspaceRoot] = includeWorkspaceRoot - } - - get explicitRequests () { - return new Set(this.#explicitRequests) - } - - // public method - async buildIdealTree (options = {}) { - if (this.idealTree) { - return this.idealTree - } - - // allow the user to set reify options on the ctor as well. - // XXX: deprecate separate reify() options object. - options = { ...this.options, ...options } - - // an empty array or any falsey value is the same as null - if (!options.add || options.add.length === 0) { - options.add = null - } - if (!options.rm || options.rm.length === 0) { - options.rm = null - } - - process.emit('time', 'idealTree') - - if (!options.add && !options.rm && !options.update && this[_global]) { - throw new Error('global requires add, rm, or update option') - } - - // first get the virtual tree, if possible. If there's a lockfile, then - // that defines the ideal tree, unless the root package.json is not - // satisfied by what the ideal tree provides. - // from there, we start adding nodes to it to satisfy the deps requested - // by the package.json in the root. - - this.#parseSettings(options) - - // start tracker block - this.addTracker('idealTree') - - try { - await this.#initTree() - await this.#inflateAncientLockfile() - await this.#applyUserRequests(options) - await this.#buildDeps() - await this.#fixDepFlags() - await this.#pruneFailedOptional() - await this.#checkEngineAndPlatform() - } finally { - process.emit('timeEnd', 'idealTree') - this.finishTracker('idealTree') - } - - return treeCheck(this.idealTree) - } - - async #checkEngineAndPlatform () { - const { engineStrict, npmVersion, nodeVersion } = this.options - for (const node of this.idealTree.inventory.values()) { - if (!node.optional) { - try { - checkEngine(node.package, npmVersion, nodeVersion, this[_force]) - } catch (err) { - if (engineStrict) { - throw err - } - log.warn(err.code, err.message, { - package: err.pkgid, - required: err.required, - current: err.current, - }) - } - checkPlatform(node.package, this[_force]) - } - } - } - - #parseSettings (options) { - const update = options.update === true ? { all: true } - : Array.isArray(options.update) ? { names: options.update } - : options.update || {} - - if (update.all || !Array.isArray(update.names)) { - update.names = [] - } - - this.#complete = !!options.complete - this.#preferDedupe = !!options.preferDedupe - - // validates list of update names, they must - // be dep names only, no semver ranges are supported - for (const name of update.names) { - const spec = npa(name) - const validationError = - new TypeError(`Update arguments must only contain package names, eg: - npm update ${spec.name}`) - validationError.code = 'EUPDATEARGS' - - // If they gave us anything other than a bare package name - if (spec.raw !== spec.name) { - throw validationError - } - } - this[_updateNames] = update.names - - this[_updateAll] = update.all - // we prune by default unless explicitly set to boolean false - this.#prune = options.prune !== false - - // set if we add anything, but also set here if we know we'll make - // changes and thus have to maybe prune later. - this.#mutateTree = !!( - options.add || - options.rm || - update.all || - update.names.length - ) - } - - // load the initial tree, either the virtualTree from a shrinkwrap, - // or just the root node from a package.json - async #initTree () { - process.emit('time', 'idealTree:init') - let root - if (this[_global]) { - root = await this.#globalRootNode() - } else { - try { - const pkg = await rpj(this.path + '/package.json') - root = await this.#rootNodeFromPackage(pkg) - } catch (err) { - if (err.code === 'EJSONPARSE') { - throw err - } - root = await this.#rootNodeFromPackage({}) - } - } - return this[_setWorkspaces](root) - // ok to not have a virtual tree. probably initial install. - // When updating all, we load the shrinkwrap, but don't bother - // to build out the full virtual tree from it, since we'll be - // reconstructing it anyway. - .then(root => this[_global] ? root - : !this[_usePackageLock] || this[_updateAll] - ? Shrinkwrap.reset({ - path: this.path, - lockfileVersion: this.options.lockfileVersion, - resolveOptions: this.options, - }).then(meta => Object.assign(root, { meta })) - : this.loadVirtual({ root })) - - // if we don't have a lockfile to go from, then start with the - // actual tree, so we only make the minimum required changes. - // don't do this for global installs or updates, because in those - // cases we don't use a lockfile anyway. - // Load on a new Arborist object, so the Nodes aren't the same, - // or else it'll get super confusing when we change them! - .then(async root => { - if ((!this[_updateAll] && !this[_global] && !root.meta.loadedFromDisk) || (this[_global] && this[_updateNames].length)) { - await new this.constructor(this.options).loadActual({ root }) - const tree = root.target - // even though we didn't load it from a package-lock.json FILE, - // we still loaded it "from disk", meaning we have to reset - // dep flags before assuming that any mutations were reflected. - if (tree.children.size) { - root.meta.loadedFromDisk = true - // set these so that we don't try to ancient lockfile reload it - root.meta.originalLockfileVersion = root.meta.lockfileVersion = this.options.lockfileVersion || defaultLockfileVersion - } - } - root.meta.inferFormattingOptions(root.package) - return root - }) - - .then(tree => { - // search the virtual tree for invalid edges, if any are found add their source to - // the depsQueue so that we'll fix it later - depth({ - tree, - getChildren: (node) => { - const children = [] - for (const edge of node.edgesOut.values()) { - children.push(edge.to) - } - return children - }, - filter: node => node, - visit: node => { - for (const edge of node.edgesOut.values()) { - if (!edge.valid) { - this.#depsQueue.push(node) - break // no need to continue the loop after the first hit - } - } - }, - }) - // null the virtual tree, because we're about to hack away at it - // if you want another one, load another copy. - this.idealTree = tree - this.virtualTree = null - process.emit('timeEnd', 'idealTree:init') - return tree - }) - } - - async #globalRootNode () { - const root = await this.#rootNodeFromPackage({ dependencies: {} }) - // this is a gross kludge to handle the fact that we don't save - // metadata on the root node in global installs, because the "root" - // node is something like /usr/local/lib. - const meta = new Shrinkwrap({ - path: this.path, - lockfileVersion: this.options.lockfileVersion, - resolveOptions: this.options, - }) - meta.reset() - root.meta = meta - return root - } - - async #rootNodeFromPackage (pkg) { - // if the path doesn't exist, then we explode at this point. Note that - // this is not a problem for reify(), since it creates the root path - // before ever loading trees. - // TODO: make buildIdealTree() and loadActual handle a missing root path, - // or a symlink to a missing target, and let reify() create it as needed. - const real = await realpath(this.path, this[_rpcache], this[_stcache]) - const Cls = real === this.path ? Node : Link - const root = new Cls({ - path: this.path, - realpath: real, - pkg, - extraneous: false, - dev: false, - devOptional: false, - peer: false, - optional: false, - global: this[_global], - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - loadOverrides: true, - }) - if (root.isLink) { - root.target = new Node({ - path: real, - realpath: real, - pkg, - extraneous: false, - dev: false, - devOptional: false, - peer: false, - optional: false, - global: this[_global], - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - root, - }) - } - return root - } - - // process the add/rm requests by modifying the root node, and the - // update.names request by queueing nodes dependent on those named. - async #applyUserRequests (options) { - process.emit('time', 'idealTree:userRequests') - const tree = this.idealTree.target - - if (!this[_workspaces].length) { - await this.#applyUserRequestsToNode(tree, options) - } else { - const nodes = this.workspaceNodes(tree, this[_workspaces]) - if (this[_includeWorkspaceRoot]) { - nodes.push(tree) - } - const appliedRequests = nodes.map( - node => this.#applyUserRequestsToNode(node, options) - ) - await Promise.all(appliedRequests) - } - - process.emit('timeEnd', 'idealTree:userRequests') - } - - async #applyUserRequestsToNode (tree, options) { - // If we have a list of package names to update, and we know it's - // going to update them wherever they are, add any paths into those - // named nodes to the buildIdealTree queue. - if (!this[_global] && this[_updateNames].length) { - this.#queueNamedUpdates() - } - - // global updates only update the globalTop nodes, but we need to know - // that they're there, and not reinstall the world unnecessarily. - const globalExplicitUpdateNames = [] - if (this[_global] && (this[_updateAll] || this[_updateNames].length)) { - const nm = resolve(this.path, 'node_modules') - const paths = await readdirScoped(nm).catch(() => []) - for (const p of paths) { - const name = p.replace(/\\/g, '/') - tree.package.dependencies = tree.package.dependencies || {} - const updateName = this[_updateNames].includes(name) - if (this[_updateAll] || updateName) { - if (updateName) { - globalExplicitUpdateNames.push(name) - } - const dir = resolve(nm, name) - const st = await lstat(dir) - .catch(/* istanbul ignore next */ er => null) - if (st && st.isSymbolicLink()) { - const target = await readlink(dir) - const real = resolve(dirname(dir), target).replace(/#/g, '%23') - tree.package.dependencies[name] = `file:${real}` - } else { - tree.package.dependencies[name] = '*' - } - } - } - } - - if (this.auditReport && this.auditReport.size > 0) { - await this.#queueVulnDependents(options) - } - - const { add, rm } = options - - if (rm && rm.length) { - addRmPkgDeps.rm(tree.package, rm) - for (const name of rm) { - this.#explicitRequests.add({ from: tree, name, action: 'DELETE' }) - } - } - - if (add && add.length) { - await this.#add(tree, options) - } - - // triggers a refresh of all edgesOut. this has to be done BEFORE - // adding the edges to explicitRequests, because the package setter - // resets all edgesOut. - if (add && add.length || rm && rm.length || this[_global]) { - tree.package = tree.package - } - - for (const spec of this[_resolvedAdd]) { - if (spec.tree === tree) { - this.#explicitRequests.add(tree.edgesOut.get(spec.name)) - } - } - for (const name of globalExplicitUpdateNames) { - this.#explicitRequests.add(tree.edgesOut.get(name)) - } - - this.#depsQueue.push(tree) - } - - // This returns a promise because we might not have the name yet, and need to - // call pacote.manifest to find the name. - async #add (tree, { add, saveType = null, saveBundle = false }) { - // If we have a link it will need to be added relative to the target's path - const path = tree.target.path - - // get the name for each of the specs in the list. - // ie, doing `foo@bar` we just return foo but if it's a url or git, we - // don't know the name until we fetch it and look in its manifest. - await Promise.all(add.map(async rawSpec => { - // We do NOT provide the path to npa here, because user-additions need to - // be resolved relative to the tree being added to. - let spec = npa(rawSpec) - - // if it's just @'' then we reload whatever's there, or get latest - // if it's an explicit tag, we need to install that specific tag version - const isTag = spec.rawSpec && spec.type === 'tag' - - // look up the names of file/directory/git specs - if (!spec.name || isTag) { - const mani = await pacote.manifest(spec, { ...this.options }) - if (isTag) { - // translate tag to a version - spec = npa(`${mani.name}@${mani.version}`) - } - spec.name = mani.name - } - - const { name } = spec - if (spec.type === 'file') { - spec = npa(`file:${relpath(path, spec.fetchSpec).replace(/#/g, '%23')}`, path) - spec.name = name - } else if (spec.type === 'directory') { - try { - const real = await realpath(spec.fetchSpec, this[_rpcache], this[_stcache]) - spec = npa(`file:${relpath(path, real).replace(/#/g, '%23')}`, path) - spec.name = name - } catch { - // TODO: create synthetic test case to simulate realpath failure - } - } - spec.tree = tree - this[_resolvedAdd].push(spec) - })) - - // now this._resolvedAdd is a list of spec objects with names. - // find a home for each of them! - addRmPkgDeps.add({ - pkg: tree.package, - add: this[_resolvedAdd], - saveBundle, - saveType, - }) - } - - // TODO: provide a way to fix bundled deps by exposing metadata about - // what's in the bundle at each published manifest. Without that, we - // can't possibly fix bundled deps without breaking a ton of other stuff, - // and leaving the user subject to getting it overwritten later anyway. - async #queueVulnDependents (options) { - for (const vuln of this.auditReport.values()) { - for (const node of vuln.nodes) { - const bundler = node.getBundler() - - // XXX this belongs in the audit report itself, not here. - // We shouldn't even get these things here, and they shouldn't - // be printed by npm-audit-report as if they can be fixed, because - // they can't. - if (bundler) { - log.warn(`audit fix ${node.name}@${node.version}`, - `${node.location}\nis a bundled dependency of\n${ - bundler.name}@${bundler.version} at ${bundler.location}\n` + - 'It cannot be fixed automatically.\n' + - `Check for updates to the ${bundler.name} package.`) - continue - } - - for (const edge of node.edgesIn) { - this.addTracker('idealTree', edge.from.name, edge.from.location) - this.#depsQueue.push(edge.from) - } - } - } - - // note any that can't be fixed at the root level without --force - // if there's a fix, we use that. otherwise, the user has to remove it, - // find a different thing, fix the upstream, etc. - // - // XXX: how to handle top nodes that aren't the root? Maybe the report - // just tells the user to cd into that directory and fix it? - if (this[_force] && this.auditReport && this.auditReport.topVulns.size) { - options.add = options.add || [] - options.rm = options.rm || [] - const nodesTouched = new Set() - for (const [name, topVuln] of this.auditReport.topVulns.entries()) { - const { - simpleRange, - topNodes, - fixAvailable, - } = topVuln - for (const node of topNodes) { - if (!node.isProjectRoot && !node.isWorkspace) { - // not something we're going to fix, sorry. have to cd into - // that directory and fix it yourself. - log.warn('audit', 'Manual fix required in linked project ' + - `at ./${node.location} for ${name}@${simpleRange}.\n` + - `'cd ./${node.location}' and run 'npm audit' for details.`) - continue - } - - if (!fixAvailable) { - log.warn('audit', `No fix available for ${name}@${simpleRange}`) - continue - } - - // name may be different if parent fixes the dep - // see Vuln fixAvailable setter - const { isSemVerMajor, version, name: fixName } = fixAvailable - const breakingMessage = isSemVerMajor - ? 'a SemVer major change' - : 'outside your stated dependency range' - log.warn('audit', `Updating ${fixName} to ${version}, ` + - `which is ${breakingMessage}.`) - - await this.#add(node, { add: [`${fixName}@${version}`] }) - nodesTouched.add(node) - } - } - for (const node of nodesTouched) { - node.package = node.package - } - } - } - - #avoidRange (name) { - if (!this.auditReport) { - return null - } - const vuln = this.auditReport.get(name) - if (!vuln) { - return null - } - return vuln.range - } - - #queueNamedUpdates () { - // ignore top nodes, since they are not loaded the same way, and - // probably have their own project associated with them. - - // for every node with one of the names on the list, we add its - // dependents to the queue to be evaluated. in buildDepStep, - // anything on the update names list will get refreshed, even if - // it isn't a problem. - - // XXX this could be faster by doing a series of inventory.query('name') - // calls rather than walking over everything in the tree. - for (const node of this.idealTree.inventory.values()) { - // XXX add any invalid edgesOut to the queue - if (this[_updateNames].includes(node.name) && - !node.isTop && !node.inDepBundle && !node.inShrinkwrap) { - for (const edge of node.edgesIn) { - this.addTracker('idealTree', edge.from.name, edge.from.location) - this.#depsQueue.push(edge.from) - } - } - } - } - - async #inflateAncientLockfile () { - const { meta, inventory } = this.idealTree - const ancient = meta.ancientLockfile - const old = meta.loadedFromDisk && !(meta.originalLockfileVersion >= 2) - - if (inventory.size === 0 || !ancient && !old) { - return - } - - // if the lockfile is from node v5 or earlier, then we'll have to reload - // all the manifests of everything we encounter. this is costly, but at - // least it's just a one-time hit. - process.emit('time', 'idealTree:inflate') - - // don't warn if we're not gonna actually write it back anyway. - const heading = ancient ? 'ancient lockfile' : 'old lockfile' - if (ancient || !this.options.lockfileVersion || - this.options.lockfileVersion >= defaultLockfileVersion) { - log.warn(heading, - ` -The ${meta.type} file was created with an old version of npm, -so supplemental metadata must be fetched from the registry. - -This is a one-time fix-up, please be patient... -`) - } - - this.addTracker('idealTree:inflate') - const queue = [] - for (const node of inventory.values()) { - if (node.isProjectRoot) { - continue - } - - // if the node's location isn't within node_modules then this is actually - // a link target, so skip it. the link node itself will be queued later. - if (!node.location.startsWith('node_modules')) { - continue - } - - queue.push(async () => { - log.silly('inflate', node.location) - const { resolved, version, path, name, location, integrity } = node - // don't try to hit the registry for linked deps - const useResolved = resolved && ( - !version || resolved.startsWith('file:') - ) - const id = useResolved ? resolved : version - const spec = npa.resolve(name, id, dirname(path)) - const t = `idealTree:inflate:${location}` - this.addTracker(t) - try { - const mani = await pacote.manifest(spec, { - ...this.options, - resolved: resolved, - integrity: integrity, - fullMetadata: false, - }) - node.package = { ...mani, _id: `${mani.name}@${mani.version}` } - } catch (er) { - const warning = `Could not fetch metadata for ${name}@${id}` - log.warn(heading, warning, er) - } - this.finishTracker(t) - }) - } - await promiseCallLimit(queue) - - // have to re-calc dep flags, because the nodes don't have edges - // until their packages get assigned, so everything looks extraneous - calcDepFlags(this.idealTree) - - // yes, yes, this isn't the "original" version, but now that it's been - // upgraded, we need to make sure we don't do the work to upgrade it - // again, since it's now as new as can be. - if (!this.options.lockfileVersion && !meta.hiddenLockfile) { - meta.originalLockfileVersion = defaultLockfileVersion - } - this.finishTracker('idealTree:inflate') - process.emit('timeEnd', 'idealTree:inflate') - } - - // at this point we have a virtual tree with the actual root node's - // package deps, which may be partly or entirely incomplete, invalid - // or extraneous. - #buildDeps () { - process.emit('time', 'idealTree:buildDeps') - const tree = this.idealTree.target - tree.assertRootOverrides() - this.#depsQueue.push(tree) - // XXX also push anything that depends on a node with a name - // in the override list - log.silly('idealTree', 'buildDeps') - this.addTracker('idealTree', tree.name, '') - return this.#buildDepStep() - .then(() => process.emit('timeEnd', 'idealTree:buildDeps')) - } - - async #buildDepStep () { - // removes tracker of previous dependency in the queue - if (this.#currentDep) { - const { location, name } = this.#currentDep - process.emit('timeEnd', `idealTree:${location || '#root'}`) - this.finishTracker('idealTree', name, location) - this.#currentDep = null - } - - if (!this.#depsQueue.length) { - return this.#resolveLinks() - } - - const node = this.#depsQueue.pop() - const bd = node.package.bundleDependencies - const hasBundle = bd && Array.isArray(bd) && bd.length - const { hasShrinkwrap } = node - - // if the node was already visited, or has since been removed from the - // tree, skip over it and process the rest of the queue. If a node has - // a shrinkwrap, also skip it, because it's going to get its deps - // satisfied by whatever's in that file anyway. - if (this.#depsSeen.has(node) || - node.root !== this.idealTree || - hasShrinkwrap && !this.#complete) { - return this.#buildDepStep() - } - - this.#depsSeen.add(node) - this.#currentDep = node - process.emit('time', `idealTree:${node.location || '#root'}`) - - // if we're loading a _complete_ ideal tree, for a --package-lock-only - // installation for example, we have to crack open the tarball and - // look inside if it has bundle deps or shrinkwraps. note that this is - // not necessary during a reification, because we just update the - // ideal tree by reading bundles/shrinkwraps in place. - // Don't bother if the node is from the actual tree and hasn't - // been resolved, because we can't fetch it anyway, could be anything! - const crackOpen = this.#complete && - node !== this.idealTree && - node.resolved && - (hasBundle || hasShrinkwrap) - if (crackOpen) { - const Arborist = this.constructor - const opt = { ...this.options } - await cacache.tmp.withTmp(this.cache, opt, async path => { - await pacote.extract(node.resolved, path, { - ...opt, - Arborist, - resolved: node.resolved, - integrity: node.integrity, - }) - - if (hasShrinkwrap) { - await new Arborist({ ...this.options, path }) - .loadVirtual({ root: node }) - } - - if (hasBundle) { - await new Arborist({ ...this.options, path }) - .loadActual({ root: node, ignoreMissing: true }) - } - }) - } - - // if any deps are missing or invalid, then we fetch the manifest for - // the thing we want, and build a new dep node from that. - // Then, find the ideal placement for that node. The ideal placement - // searches from the node's deps (or parent deps in the case of non-root - // peer deps), and walks up the tree until it finds the highest spot - // where it doesn't cause any conflicts. - // - // A conflict can be: - // - A node by that name already exists at that location. - // - The parent has a peer dep on that name - // - One of the node's peer deps conflicts at that location, unless the - // peer dep is met by a node at that location, which is fine. - // - // If we create a new node, then build its ideal deps as well. - // - // Note: this is the same "maximally naive" deduping tree-building - // algorithm that npm has used since v3. In a case like this: - // - // root -> (a@1, b@1||2) - // a -> (b@1) - // - // You'll end up with a tree like this: - // - // root - // +-- a@1 - // | +-- b@1 - // +-- b@2 - // - // rather than this, more deduped, but just as correct tree: - // - // root - // +-- a@1 - // +-- b@1 - // - // Another way to look at it is that this algorithm favors getting higher - // version deps at higher levels in the tree, even if that reduces - // potential deduplication. - // - // Set `preferDedupe: true` in the options to replace the shallower - // dep if allowed. - - const tasks = [] - const peerSource = this[_peerSetSource].get(node) || node - for (const edge of this.#problemEdges(node)) { - if (edge.peerConflicted) { - continue - } - - // peerSetSource is only relevant when we have a peerEntryEdge - // otherwise we're setting regular non-peer deps as if they have - // a virtual root of whatever brought in THIS node. - // so we VR the node itself if the edge is not a peer - const source = edge.peer ? peerSource : node - - const virtualRoot = this.#virtualRoot(source, true) - // reuse virtual root if we already have one, but don't - // try to do the override ahead of time, since we MAY be able - // to create a more correct tree than the virtual root could. - const vrEdge = virtualRoot && virtualRoot.edgesOut.get(edge.name) - const vrDep = vrEdge && vrEdge.valid && vrEdge.to - // only re-use the virtualRoot if it's a peer edge we're placing. - // otherwise, we end up in situations where we override peer deps that - // we could have otherwise found homes for. Eg: - // xy -> (x, y) - // x -> PEER(z@1) - // y -> PEER(z@2) - // If xy is a dependency, we can resolve this like: - // project - // +-- xy - // | +-- y - // | +-- z@2 - // +-- x - // +-- z@1 - // But if x and y are loaded in the same virtual root, then they will - // be forced to agree on a version of z. - const required = new Set([edge.from]) - const parent = edge.peer ? virtualRoot : null - const dep = vrDep && vrDep.satisfies(edge) ? vrDep - : await this.#nodeFromEdge(edge, parent, null, required) - - /* istanbul ignore next */ - debug(() => { - if (!dep) { - throw new Error('no dep??') - } - }) - - tasks.push({ edge, dep }) - } - - const placeDeps = tasks.sort((a, b) => localeCompare(a.edge.name, b.edge.name)) - - const promises = [] - for (const { edge, dep } of placeDeps) { - const pd = new PlaceDep({ - edge, - dep, - - auditReport: this.auditReport, - explicitRequest: this.#explicitRequests.has(edge), - force: this[_force], - installLinks: this.installLinks, - installStrategy: this.#installStrategy, - legacyPeerDeps: this.legacyPeerDeps, - preferDedupe: this.#preferDedupe, - strictPeerDeps: this.#strictPeerDeps, - updateNames: this[_updateNames], - }) - // placing a dep is actually a tree of placing the dep itself - // and all of its peer group that aren't already met by the tree - depth({ - tree: pd, - getChildren: pd => pd.children, - visit: pd => { - const { placed, edge, canPlace: cpd } = pd - // if we didn't place anything, nothing to do here - if (!placed) { - return - } - - // we placed something, that means we changed the tree - if (placed.errors.length) { - this.#loadFailures.add(placed) - } - this.#mutateTree = true - if (cpd.canPlaceSelf === OK) { - for (const edgeIn of placed.edgesIn) { - if (edgeIn === edge) { - continue - } - const { from, valid, peerConflicted } = edgeIn - if (!peerConflicted && !valid && !this.#depsSeen.has(from)) { - this.addTracker('idealTree', from.name, from.location) - this.#depsQueue.push(edgeIn.from) - } - } - } else { - /* istanbul ignore else - should be only OK or REPLACE here */ - if (cpd.canPlaceSelf === REPLACE) { - // this may also create some invalid edges, for example if we're - // intentionally causing something to get nested which was - // previously placed in this location. - for (const edgeIn of placed.edgesIn) { - if (edgeIn === edge) { - continue - } - - const { valid, peerConflicted } = edgeIn - if (!valid && !peerConflicted) { - // if it's already been visited, we have to re-visit - // otherwise, just enqueue normally. - this.#depsSeen.delete(edgeIn.from) - this.#depsQueue.push(edgeIn.from) - } - } - } - } - - /* istanbul ignore if - should be impossible */ - if (cpd.canPlaceSelf === CONFLICT) { - debug(() => { - const er = new Error('placed with canPlaceSelf=CONFLICT') - throw Object.assign(er, { placeDep: pd }) - }) - return - } - - // lastly, also check for the missing deps of the node we placed, - // and any holes created by pruning out conflicted peer sets. - this.#depsQueue.push(placed) - for (const dep of pd.needEvaluation) { - this.#depsSeen.delete(dep) - this.#depsQueue.push(dep) - } - - // pre-fetch any problem edges, since we'll need these soon - // if it fails at this point, though, dont' worry because it - // may well be an optional dep that has gone missing. it'll - // fail later anyway. - for (const e of this.#problemEdges(placed)) { - promises.push( - this.#fetchManifest(npa.resolve(e.name, e.spec, fromPath(placed, e))) - .catch(er => null) - ) - } - }, - }) - } - - for (const { to } of node.edgesOut.values()) { - if (to && to.isLink && to.target) { - this.#linkNodes.add(to) - } - } - - await Promise.all(promises) - return this.#buildDepStep() - } - - // loads a node from an edge, and then loads its peer deps (and their - // peer deps, on down the line) into a virtual root parent. - async #nodeFromEdge (edge, parent_, secondEdge, required) { - // create a virtual root node with the same deps as the node that - // is requesting this one, so that we can get all the peer deps in - // a context where they're likely to be resolvable. - // Note that the virtual root will also have virtual copies of the - // targets of any child Links, so that they resolve appropriately. - const parent = parent_ || this.#virtualRoot(edge.from) - - const spec = npa.resolve(edge.name, edge.spec, edge.from.path) - const first = await this.#nodeFromSpec(edge.name, spec, parent, edge) - - // we might have a case where the parent has a peer dependency on - // `foo@*` which resolves to v2, but another dep in the set has a - // peerDependency on `foo@1`. In that case, if we force it to be v2, - // we're unnecessarily triggering an ERESOLVE. - // If we have a second edge to worry about, and it's not satisfied - // by the first node, try a second and see if that satisfies the - // original edge here. - const spec2 = secondEdge && npa.resolve( - edge.name, - secondEdge.spec, - secondEdge.from.path - ) - const second = secondEdge && !secondEdge.valid - ? await this.#nodeFromSpec(edge.name, spec2, parent, secondEdge) - : null - - // pick the second one if they're both happy with that, otherwise first - const node = second && edge.valid ? second : first - // ensure the one we want is the one that's placed - node.parent = parent - - if (required.has(edge.from) && edge.type !== 'peerOptional' || - secondEdge && ( - required.has(secondEdge.from) && secondEdge.type !== 'peerOptional')) { - required.add(node) - } - - // keep track of the thing that caused this node to be included. - const src = parent.sourceReference - this[_peerSetSource].set(node, src) - - // do not load the peers along with the set if this is a global top pkg - // otherwise we'll be tempted to put peers as other top-level installed - // things, potentially clobbering what's there already, which is not - // what we want. the missing edges will be picked up on the next pass. - if (this[_global] && edge.from.isProjectRoot) { - return node - } - - // otherwise, we have to make sure that our peers can go along with us. - return this.#loadPeerSet(node, required) - } - - #virtualRoot (node, reuse = false) { - if (reuse && this.#virtualRoots.has(node)) { - return this.#virtualRoots.get(node) - } - - const vr = new Node({ - path: node.realpath, - sourceReference: node, - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - overrides: node.overrides, - }) - - // also need to set up any targets from any link deps, so that - // they are properly reflected in the virtual environment - for (const child of node.children.values()) { - if (child.isLink) { - new Node({ - path: child.realpath, - sourceReference: child.target, - root: vr, - }) - } - } - - this.#virtualRoots.set(node, vr) - return vr - } - - #problemEdges (node) { - // skip over any bundled deps, they're not our problem. - // Note that this WILL fetch bundled meta-deps which are also dependencies - // but not listed as bundled deps. When reifying, we first unpack any - // nodes that have bundleDependencies, then do a loadActual on them, move - // the nodes into the ideal tree, and then prune. So, fetching those - // possibly-bundled meta-deps at this point doesn't cause any worse - // problems than a few unnecessary packument fetches. - - // also skip over any nodes in the tree that failed to load, since those - // will crash the install later on anyway. - const bd = node.isProjectRoot || node.isWorkspace ? null - : node.package.bundleDependencies - const bundled = new Set(bd || []) - - const problems = [] - for (const edge of node.edgesOut.values()) { - // If it's included in a bundle, we take whatever is specified. - if (bundled.has(edge.name)) { - continue - } - - // If it's already been logged as a load failure, skip it. - if (edge.to && this.#loadFailures.has(edge.to)) { - continue - } - - // If it's shrinkwrapped, we use what the shrinkwap wants. - if (edge.to && edge.to.inShrinkwrap) { - continue - } - - // If the edge has no destination, that's a problem, unless - // if it's peerOptional and not explicitly requested. - if (!edge.to) { - if (edge.type !== 'peerOptional' || - this.#explicitRequests.has(edge)) { - problems.push(edge) - } - continue - } - - // If the edge has an error, there's a problem. - if (!edge.valid) { - problems.push(edge) - continue - } - - // If the edge is a workspace, and it's valid, leave it alone - if (edge.to.isWorkspace) { - continue - } - - // user explicitly asked to update this package by name, problem - if (this[_updateNames].includes(edge.name)) { - problems.push(edge) - continue - } - - // fixing a security vulnerability with this package, problem - if (this.auditReport && this.auditReport.isVulnerable(edge.to)) { - problems.push(edge) - continue - } - - // user has explicitly asked to install this package, problem - if (this.#explicitRequests.has(edge)) { - problems.push(edge) - continue - } - } - return problems - } - - async #fetchManifest (spec) { - const options = { - ...this.options, - avoid: this.#avoidRange(spec.name), - } - // get the intended spec and stored metadata from yarn.lock file, - // if available and valid. - spec = this.idealTree.meta.checkYarnLock(spec, options) - - if (this.#manifests.has(spec.raw)) { - return this.#manifests.get(spec.raw) - } else { - const cleanRawSpec = cleanUrl(spec.rawSpec) - log.silly('fetch manifest', spec.raw.replace(spec.rawSpec, cleanRawSpec)) - const p = pacote.manifest(spec, options) - .then(mani => { - this.#manifests.set(spec.raw, mani) - return mani - }) - this.#manifests.set(spec.raw, p) - return p - } - } - - #nodeFromSpec (name, spec, parent, edge) { - // pacote will slap integrity on its options, so we have to clone - // the object so it doesn't get mutated. - // Don't bother to load the manifest for link deps, because the target - // might be within another package that doesn't exist yet. - const { installLinks, legacyPeerDeps } = this - const isWorkspace = this.idealTree.workspaces && this.idealTree.workspaces.has(spec.name) - - // spec is a directory, link it unless installLinks is set or it's a workspace - // TODO post arborist refactor, will need to check for installStrategy=linked - if (spec.type === 'directory' && (isWorkspace || !installLinks)) { - return this.#linkFromSpec(name, spec, parent, edge) - } - - // if the spec matches a workspace name, then see if the workspace node will - // satisfy the edge. if it does, we return the workspace node to make sure it - // takes priority. - if (isWorkspace) { - const existingNode = this.idealTree.edgesOut.get(spec.name).to - if (existingNode && existingNode.isWorkspace && existingNode.satisfies(edge)) { - return existingNode - } - } - - // spec isn't a directory, and either isn't a workspace or the workspace we have - // doesn't satisfy the edge. try to fetch a manifest and build a node from that. - return this.#fetchManifest(spec) - .then(pkg => new Node({ name, pkg, parent, installLinks, legacyPeerDeps }), error => { - error.requiredBy = edge.from.location || '.' - - // failed to load the spec, either because of enotarget or - // fetch failure of some other sort. save it so we can verify - // later that it's optional, otherwise the error is fatal. - const n = new Node({ - name, - parent, - error, - installLinks, - legacyPeerDeps, - }) - this.#loadFailures.add(n) - return n - }) - } - - #linkFromSpec (name, spec, parent, edge) { - const realpath = spec.fetchSpec - const { installLinks, legacyPeerDeps } = this - return rpj(realpath + '/package.json').catch(() => ({})).then(pkg => { - const link = new Link({ name, parent, realpath, pkg, installLinks, legacyPeerDeps }) - this.#linkNodes.add(link) - return link - }) - } - - // load all peer deps and meta-peer deps into the node's parent - // At the end of this, the node's peer-type outward edges are all - // resolved, and so are all of theirs, but other dep types are not. - // We prefer to get peer deps that meet the requiring node's dependency, - // if possible, since that almost certainly works (since that package was - // developed with this set of deps) and will typically be more restrictive. - // Note that the peers in the set can conflict either with each other, - // or with a direct dependency from the virtual root parent! In strict - // mode, this is always an error. In force mode, it never is, and we - // prefer the parent's non-peer dep over a peer dep, or the version that - // gets placed first. In non-strict mode, we behave strictly if the - // virtual root is based on the root project, and allow non-peer parent - // deps to override, but throw if no preference can be determined. - async #loadPeerSet (node, required) { - const peerEdges = [...node.edgesOut.values()] - // we typically only install non-optional peers, but we have to - // factor them into the peerSet so that we can avoid conflicts - .filter(e => e.peer && !(e.valid && e.to)) - .sort(({ name: a }, { name: b }) => localeCompare(a, b)) - - for (const edge of peerEdges) { - // already placed this one, and we're happy with it. - if (edge.valid && edge.to) { - continue - } - - const parentEdge = node.parent.edgesOut.get(edge.name) - const { isProjectRoot, isWorkspace } = node.parent.sourceReference - const isMine = isProjectRoot || isWorkspace - const conflictOK = this[_force] || !isMine && !this.#strictPeerDeps - - if (!edge.to) { - if (!parentEdge) { - // easy, just put the thing there - await this.#nodeFromEdge(edge, node.parent, null, required) - continue - } else { - // if the parent's edge is very broad like >=1, and the edge in - // question is something like 1.x, then we want to get a 1.x, not - // a 2.x. pass along the child edge as an advisory guideline. - // if the parent edge doesn't satisfy the child edge, and the - // child edge doesn't satisfy the parent edge, then we have - // a conflict. this is always a problem in strict mode, never - // in force mode, and a problem in non-strict mode if this isn't - // on behalf of our project. in all such cases, we warn at least. - const dep = await this.#nodeFromEdge( - parentEdge, - node.parent, - edge, - required - ) - - // hooray! that worked! - if (edge.valid) { - continue - } - - // allow it. either we're overriding, or it's not something - // that will be installed by default anyway, and we'll fail when - // we get to the point where we need to, if we need to. - if (conflictOK || !required.has(dep)) { - edge.peerConflicted = true - continue - } - - // problem - this.#failPeerConflict(edge, parentEdge) - } - } - - // There is something present already, and we're not happy about it - // See if the thing we WOULD be happy with is also going to satisfy - // the other dependents on the current node. - const current = edge.to - const dep = await this.#nodeFromEdge(edge, null, null, required) - if (dep.canReplace(current)) { - await this.#nodeFromEdge(edge, node.parent, null, required) - continue - } - - // at this point we know that there is a dep there, and - // we don't like it. always fail strictly, always allow forcibly or - // in non-strict mode if it's not our fault. don't warn here, because - // we are going to warn again when we place the deps, if we end up - // overriding for something else. If the thing that has this dep - // isn't also required, then there's a good chance we won't need it, - // so allow it for now and let it conflict if it turns out to actually - // be necessary for the installation. - if (conflictOK || !required.has(edge.from)) { - continue - } - - // ok, it's the root, or we're in unforced strict mode, so this is bad - this.#failPeerConflict(edge, parentEdge) - } - return node - } - - #failPeerConflict (edge, currentEdge) { - const expl = this.#explainPeerConflict(edge, currentEdge) - throw Object.assign(new Error('unable to resolve dependency tree'), expl) - } - - #explainPeerConflict (edge, currentEdge) { - const node = edge.from - const curNode = node.resolve(edge.name) - const current = curNode.explain() - return { - code: 'ERESOLVE', - current, - // it SHOULD be impossible to get here without a current node in place, - // but this at least gives us something report on when bugs creep into - // the tree handling logic. - currentEdge: currentEdge ? currentEdge.explain() : null, - edge: edge.explain(), - strictPeerDeps: this.#strictPeerDeps, - force: this[_force], - } - } - - // go through all the links in the this.#linkNodes set - // for each one: - // - if outside the root, ignore it, assume it's fine, it's not our problem - // - if a node in the tree already, assign the target to that node. - // - if a path under an existing node, then assign that as the fsParent, - // and add it to the _depsQueue - // - // call buildDepStep if anything was added to the queue, otherwise we're done - #resolveLinks () { - for (const link of this.#linkNodes) { - this.#linkNodes.delete(link) - - // link we never ended up placing, skip it - if (link.root !== this.idealTree) { - continue - } - - const tree = this.idealTree.target - const external = !link.target.isDescendantOf(tree) - - // outside the root, somebody else's problem, ignore it - if (external && !this.#follow) { - continue - } - - // didn't find a parent for it or it has not been seen yet - // so go ahead and process it. - const unseenLink = (link.target.parent || link.target.fsParent) && - !this.#depsSeen.has(link.target) - - if (this.#follow && - !link.target.parent && - !link.target.fsParent || - unseenLink) { - this.addTracker('idealTree', link.target.name, link.target.location) - this.#depsQueue.push(link.target) - } - } - - if (this.#depsQueue.length) { - return this.#buildDepStep() - } - } - - #fixDepFlags () { - process.emit('time', 'idealTree:fixDepFlags') - const metaFromDisk = this.idealTree.meta.loadedFromDisk - const flagsSuspect = this[_flagsSuspect] - const mutateTree = this.#mutateTree - // if the options set prune:false, then we don't prune, but we still - // mark the extraneous items in the tree if we modified it at all. - // If we did no modifications, we just iterate over the extraneous nodes. - // if we started with an empty tree, then the dep flags are already - // all set to true, and there can be nothing extraneous, so there's - // nothing to prune, because we built it from scratch. if we didn't - // add or remove anything, then also nothing to do. - if (metaFromDisk && mutateTree) { - resetDepFlags(this.idealTree) - } - - // update all the dev/optional/etc flags in the tree - // either we started with a fresh tree, or we - // reset all the flags to find the extraneous nodes. - // - // if we started from a blank slate, or changed something, then - // the dep flags will be all set to true. - if (!metaFromDisk || mutateTree) { - calcDepFlags(this.idealTree) - } else { - // otherwise just unset all the flags on the root node - // since they will sometimes have the default value - this.idealTree.extraneous = false - this.idealTree.dev = false - this.idealTree.optional = false - this.idealTree.devOptional = false - this.idealTree.peer = false - } - - // at this point, any node marked as extraneous should be pruned. - // if we started from a shrinkwrap, and then added/removed something, - // then the tree is suspect. Prune what is marked as extraneous. - // otherwise, don't bother. - const needPrune = metaFromDisk && (mutateTree || flagsSuspect) - if (this.#prune && needPrune) { - this[_idealTreePrune]() - for (const node of this.idealTree.inventory.values()) { - if (node.extraneous) { - node.parent = null - } - } - } - - process.emit('timeEnd', 'idealTree:fixDepFlags') - } - - [_idealTreePrune] () { - for (const node of this.idealTree.inventory.values()) { - if (node.extraneous) { - node.parent = null - } - } - } - - #pruneFailedOptional () { - for (const node of this.#loadFailures) { - if (!node.optional) { - throw node.errors[0] - } - - const set = optionalSet(node) - for (const node of set) { - node.parent = null - } - } - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/deduper.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/deduper.js deleted file mode 100644 index 1741c31..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/deduper.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = cls => class Deduper extends cls { - async dedupe (options = {}) { - // allow the user to set options on the ctor as well. - // XXX: deprecate separate method options objects. - options = { ...this.options, ...options } - const tree = await this.loadVirtual().catch(() => this.loadActual()) - const names = [] - for (const name of tree.inventory.query('name')) { - if (tree.inventory.query('name', name).size > 1) { - names.push(name) - } - } - return this.reify({ - ...options, - preferDedupe: true, - update: { names }, - }) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js deleted file mode 100644 index ec25117..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/index.js +++ /dev/null @@ -1,167 +0,0 @@ -// The arborist manages three trees: -// - actual -// - virtual -// - ideal -// -// The actual tree is what's present on disk in the node_modules tree -// and elsewhere that links may extend. -// -// The virtual tree is loaded from metadata (package.json and lock files). -// -// The ideal tree is what we WANT that actual tree to become. This starts -// with the virtual tree, and then applies the options requesting -// add/remove/update actions. -// -// To reify a tree, we calculate a diff between the ideal and actual trees, -// and then turn the actual tree into the ideal tree by taking the actions -// required. At the end of the reification process, the actualTree is -// updated to reflect the changes. -// -// Each tree has an Inventory at the root. Shrinkwrap is tracked by Arborist -// instance. It always refers to the actual tree, but is updated (and written -// to disk) on reification. - -// Each of the mixin "classes" adds functionality, but are not dependent on -// constructor call order. So, we just load them in an array, and build up -// the base class, so that the overall voltron class is easier to test and -// cover, and separation of concerns can be maintained. - -const { resolve } = require('path') -const { homedir } = require('os') -const { depth } = require('treeverse') -const { saveTypeMap } = require('../add-rm-pkg-deps.js') - -const mixins = [ - require('../tracker.js'), - require('./pruner.js'), - require('./deduper.js'), - require('./audit.js'), - require('./build-ideal-tree.js'), - require('./set-workspaces.js'), - require('./load-actual.js'), - require('./load-virtual.js'), - require('./rebuild.js'), - require('./reify.js'), - require('./isolated-reifier.js'), -] - -const _workspacesEnabled = Symbol.for('workspacesEnabled') -const Base = mixins.reduce((a, b) => b(a), require('events')) -const getWorkspaceNodes = require('../get-workspace-nodes.js') - -// if it's 1, 2, or 3, set it explicitly that. -// if undefined or null, set it null -// otherwise, throw. -const lockfileVersion = lfv => { - if (lfv === 1 || lfv === 2 || lfv === 3) { - return lfv - } - - if (lfv === undefined || lfv === null) { - return null - } - - throw new TypeError('Invalid lockfileVersion config: ' + lfv) -} - -class Arborist extends Base { - constructor (options = {}) { - process.emit('time', 'arborist:ctor') - super(options) - this.options = { - nodeVersion: process.version, - ...options, - Arborist: this.constructor, - path: options.path || '.', - cache: options.cache || `${homedir()}/.npm/_cacache`, - packumentCache: options.packumentCache || new Map(), - workspacesEnabled: options.workspacesEnabled !== false, - replaceRegistryHost: options.replaceRegistryHost, - lockfileVersion: lockfileVersion(options.lockfileVersion), - installStrategy: options.global ? 'shallow' : (options.installStrategy ? options.installStrategy : 'hoisted'), - } - this.replaceRegistryHost = this.options.replaceRegistryHost = - (!this.options.replaceRegistryHost || this.options.replaceRegistryHost === 'npmjs') ? - 'registry.npmjs.org' : this.options.replaceRegistryHost - - this[_workspacesEnabled] = this.options.workspacesEnabled - - if (options.saveType && !saveTypeMap.get(options.saveType)) { - throw new Error(`Invalid saveType ${options.saveType}`) - } - this.cache = resolve(this.options.cache) - this.path = resolve(this.options.path) - process.emit('timeEnd', 'arborist:ctor') - } - - // TODO: We should change these to static functions instead - // of methods for the next major version - - // returns an array of the actual nodes for all the workspaces - workspaceNodes (tree, workspaces) { - return getWorkspaceNodes(tree, workspaces) - } - - // returns a set of workspace nodes and all their deps - workspaceDependencySet (tree, workspaces, includeWorkspaceRoot) { - const wsNodes = this.workspaceNodes(tree, workspaces) - if (includeWorkspaceRoot) { - for (const edge of tree.edgesOut.values()) { - if (edge.type !== 'workspace' && edge.to) { - wsNodes.push(edge.to) - } - } - } - const wsDepSet = new Set(wsNodes) - const extraneous = new Set() - for (const node of wsDepSet) { - for (const edge of node.edgesOut.values()) { - const dep = edge.to - if (dep) { - wsDepSet.add(dep) - if (dep.isLink) { - wsDepSet.add(dep.target) - } - } - } - for (const child of node.children.values()) { - if (child.extraneous) { - extraneous.add(child) - } - } - } - for (const extra of extraneous) { - wsDepSet.add(extra) - } - - return wsDepSet - } - - // returns a set of root dependencies, excluding dependencies that are - // exclusively workspace dependencies - excludeWorkspacesDependencySet (tree) { - const rootDepSet = new Set() - depth({ - tree, - visit: node => { - for (const { to } of node.edgesOut.values()) { - if (!to || to.isWorkspace) { - continue - } - for (const edgeIn of to.edgesIn.values()) { - if (edgeIn.from.isRoot || rootDepSet.has(edgeIn.from)) { - rootDepSet.add(to) - } - } - } - return node - }, - filter: node => node, - getChildren: (node, tree) => - [...tree.edgesOut.values()].map(edge => edge.to), - }) - return rootDepSet - } -} - -module.exports = Arborist diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js deleted file mode 100644 index f4f1bb8..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/isolated-reifier.js +++ /dev/null @@ -1,453 +0,0 @@ -const _makeIdealGraph = Symbol('makeIdealGraph') -const _createIsolatedTree = Symbol.for('createIsolatedTree') -const _createBundledTree = Symbol('createBundledTree') -const fs = require('fs') -const pacote = require('pacote') -const { join } = require('path') -const { depth } = require('treeverse') -const crypto = require('crypto') - -// cache complicated function results -const memoize = (fn) => { - const memo = new Map() - return async function (arg) { - const key = arg - if (memo.has(key)) { - return memo.get(key) - } - const result = {} - memo.set(key, result) - await fn(result, arg) - return result - } -} - -module.exports = cls => class IsolatedReifier extends cls { - /** - * Create an ideal graph. - * - * An implementation of npm RFC-0042 - * https://github.com/npm/rfcs/blob/main/accepted/0042-isolated-mode.md - * - * This entire file should be considered technical debt that will be resolved - * with an Arborist refactor or rewrite. Embedded logic in Nodes and Links, - * and the incremental state of building trees and reifying contains too many - * assumptions to do a linked mode properly. - * - * Instead, this approach takes a tree built from build-ideal-tree, and - * returns a new tree-like structure without the embedded logic of Node and - * Link classes. - * - * Since the RFC requires leaving the package-lock in place, this approach - * temporarily replaces the tree state for a couple of steps of reifying. - * - **/ - async [_makeIdealGraph] (options) { - /* Make sure that the ideal tree is build as the rest of - * the algorithm depends on it. - */ - const bitOpt = { - ...options, - complete: false, - } - await this.buildIdealTree(bitOpt) - const idealTree = this.idealTree - - this.rootNode = {} - const root = this.rootNode - this.counter = 0 - - // memoize to cache generating proxy Nodes - this.externalProxyMemo = memoize(this.externalProxy.bind(this)) - this.workspaceProxyMemo = memoize(this.workspaceProxy.bind(this)) - - root.external = [] - root.isProjectRoot = true - root.localLocation = idealTree.location - root.localPath = idealTree.path - root.workspaces = await Promise.all( - Array.from(idealTree.fsChildren.values(), this.workspaceProxyMemo)) - const processed = new Set() - const queue = [idealTree, ...idealTree.fsChildren] - while (queue.length !== 0) { - const next = queue.pop() - if (processed.has(next.location)) { - continue - } - processed.add(next.location) - next.edgesOut.forEach(e => { - if (!e.to || (next.package.bundleDependencies || next.package.bundledDependencies || []).includes(e.to.name)) { - return - } - queue.push(e.to) - }) - if (!next.isProjectRoot && !next.isWorkspace) { - root.external.push(await this.externalProxyMemo(next)) - } - } - - await this.assignCommonProperties(idealTree, root) - - this.idealGraph = root - } - - async workspaceProxy (result, node) { - result.localLocation = node.location - result.localPath = node.path - result.isWorkspace = true - result.resolved = node.resolved - await this.assignCommonProperties(node, result) - } - - async externalProxy (result, node) { - await this.assignCommonProperties(node, result) - if (node.hasShrinkwrap) { - const dir = join( - node.root.path, - 'node_modules', - '.store', - `${node.name}@${node.version}` - ) - fs.mkdirSync(dir, { recursive: true }) - // TODO this approach feels wrong - // and shouldn't be necessary for shrinkwraps - await pacote.extract(node.resolved, dir, { - ...this.options, - resolved: node.resolved, - integrity: node.integrity, - }) - const Arborist = this.constructor - const arb = new Arborist({ ...this.options, path: dir }) - await arb[_makeIdealGraph]({ dev: false }) - this.rootNode.external.push(...arb.idealGraph.external) - arb.idealGraph.external.forEach(e => { - e.root = this.rootNode - e.id = `${node.id}=>${e.id}` - }) - result.localDependencies = [] - result.externalDependencies = arb.idealGraph.externalDependencies - result.externalOptionalDependencies = arb.idealGraph.externalOptionalDependencies - result.dependencies = [ - ...result.externalDependencies, - ...result.localDependencies, - ...result.externalOptionalDependencies, - ] - } - result.optional = node.optional - result.resolved = node.resolved - result.version = node.version - } - - async assignCommonProperties (node, result) { - function validEdgesOut (node) { - return [...node.edgesOut.values()].filter(e => e.to && e.to.target && !(node.package.bundledDepenedencies || node.package.bundleDependencies || []).includes(e.to.name)) - } - const edges = validEdgesOut(node) - const optionalDeps = edges.filter(e => e.optional).map(e => e.to.target) - const nonOptionalDeps = edges.filter(e => !e.optional).map(e => e.to.target) - - result.localDependencies = await Promise.all(nonOptionalDeps.filter(n => n.isWorkspace).map(this.workspaceProxyMemo)) - result.externalDependencies = await Promise.all(nonOptionalDeps.filter(n => !n.isWorkspace).map(this.externalProxyMemo)) - result.externalOptionalDependencies = await Promise.all(optionalDeps.map(this.externalProxyMemo)) - result.dependencies = [ - ...result.externalDependencies, - ...result.localDependencies, - ...result.externalOptionalDependencies, - ] - result.root = this.rootNode - result.id = this.counter++ - result.name = node.name - result.package = { ...node.package } - result.package.bundleDependencies = undefined - result.hasInstallScript = node.hasInstallScript - } - - async [_createBundledTree] () { - // TODO: make sure that idealTree object exists - const idealTree = this.idealTree - // TODO: test workspaces having bundled deps - const queue = [] - - for (const [, edge] of idealTree.edgesOut) { - if (edge.to && (idealTree.package.bundleDependencies || idealTree.package.bundledDependencies || []).includes(edge.to.name)) { - queue.push({ from: idealTree, to: edge.to }) - } - } - for (const child of idealTree.fsChildren) { - for (const [, edge] of child.edgesOut) { - if (edge.to && (child.package.bundleDependencies || child.package.bundledDependencies || []).includes(edge.to.name)) { - queue.push({ from: child, to: edge.to }) - } - } - } - - const processed = new Set() - const nodes = new Map() - const edges = [] - while (queue.length !== 0) { - const nextEdge = queue.pop() - const key = `${nextEdge.from.location}=>${nextEdge.to.location}` - // should be impossible, unless bundled is duped - /* istanbul ignore next */ - if (processed.has(key)) { - continue - } - processed.add(key) - const from = nextEdge.from - if (!from.isRoot && !from.isWorkspace) { - nodes.set(from.location, { location: from.location, resolved: from.resolved, name: from.name, optional: from.optional, pkg: { ...from.package, bundleDependencies: undefined } }) - } - const to = nextEdge.to - nodes.set(to.location, { location: to.location, resolved: to.resolved, name: to.name, optional: to.optional, pkg: { ...to.package, bundleDependencies: undefined } }) - edges.push({ from: from.isRoot ? 'root' : from.location, to: to.location }) - - to.edgesOut.forEach(e => { - // an edge out should always have a to - /* istanbul ignore else */ - if (e.to) { - queue.push({ from: e.from, to: e.to }) - } - }) - } - return { edges, nodes } - } - - async [_createIsolatedTree] (idealTree) { - await this[_makeIdealGraph](this.options) - - const proxiedIdealTree = this.idealGraph - - const bundledTree = await this[_createBundledTree]() - - const treeHash = (startNode) => { - // generate short hash based on the dependency tree - // starting at this node - const deps = [] - const branch = [] - depth({ - tree: startNode, - getChildren: node => node.dependencies, - filter: node => node, - visit: node => { - branch.push(`${node.name}@${node.version}`) - deps.push(`${branch.join('->')}::${node.resolved}`) - }, - leave: () => { - branch.pop() - }, - }) - deps.sort() - return crypto.createHash('shake256', { outputLength: 16 }) - .update(deps.join(',')) - .digest('base64') - // Node v14 doesn't support base64url - .replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=+$/m, '') - } - - const getKey = (idealTreeNode) => { - return `${idealTreeNode.name}@${idealTreeNode.version}-${treeHash(idealTreeNode)}` - } - - const root = { - fsChildren: [], - integrity: null, - inventory: new Map(), - isLink: false, - isRoot: true, - binPaths: [], - edgesIn: new Set(), - edgesOut: new Map(), - hasShrinkwrap: false, - parent: null, - // TODO: we should probably not reference this.idealTree - resolved: this.idealTree.resolved, - isTop: true, - path: proxiedIdealTree.root.localPath, - realpath: proxiedIdealTree.root.localPath, - package: proxiedIdealTree.root.package, - meta: { loadedFromDisk: false }, - global: false, - isProjectRoot: true, - children: [], - } - // root.inventory.set('', t) - // root.meta = this.idealTree.meta - // TODO We should mock better the inventory object because it is used by audit-report.js ... maybe - root.inventory.query = () => { - return [] - } - const processed = new Set() - proxiedIdealTree.workspaces.forEach(c => { - const workspace = { - edgesIn: new Set(), - edgesOut: new Map(), - children: [], - hasInstallScript: c.hasInstallScript, - binPaths: [], - package: c.package, - location: c.localLocation, - path: c.localPath, - realpath: c.localPath, - resolved: c.resolved, - } - root.fsChildren.push(workspace) - root.inventory.set(workspace.location, workspace) - }) - const generateChild = (node, location, pkg, inStore) => { - const newChild = { - global: false, - globalTop: false, - isProjectRoot: false, - isTop: false, - location, - name: node.name, - optional: node.optional, - top: { path: proxiedIdealTree.root.localPath }, - children: [], - edgesIn: new Set(), - edgesOut: new Map(), - binPaths: [], - fsChildren: [], - /* istanbul ignore next -- emulate Node */ - getBundler () { - return null - }, - hasShrinkwrap: false, - inDepBundle: false, - integrity: null, - isLink: false, - isRoot: false, - isInStore: inStore, - path: join(proxiedIdealTree.root.localPath, location), - realpath: join(proxiedIdealTree.root.localPath, location), - resolved: node.resolved, - version: pkg.version, - package: pkg, - } - newChild.target = newChild - root.children.push(newChild) - root.inventory.set(newChild.location, newChild) - } - proxiedIdealTree.external.forEach(c => { - const key = getKey(c) - if (processed.has(key)) { - return - } - processed.add(key) - const location = join('node_modules', '.store', key, 'node_modules', c.name) - generateChild(c, location, c.package, true) - }) - bundledTree.nodes.forEach(node => { - generateChild(node, node.location, node.pkg, false) - }) - bundledTree.edges.forEach(e => { - const from = e.from === 'root' ? root : root.inventory.get(e.from) - const to = root.inventory.get(e.to) - // Maybe optional should be propagated from the original edge - const edge = { optional: false, from, to } - from.edgesOut.set(to.name, edge) - to.edgesIn.add(edge) - }) - const memo = new Set() - - function processEdges (node, externalEdge) { - externalEdge = !!externalEdge - const key = getKey(node) - if (memo.has(key)) { - return - } - memo.add(key) - - let from, nmFolder - if (externalEdge) { - const fromLocation = join('node_modules', '.store', key, 'node_modules', node.name) - from = root.children.find(c => c.location === fromLocation) - nmFolder = join('node_modules', '.store', key, 'node_modules') - } else { - from = node.isProjectRoot ? root : root.fsChildren.find(c => c.location === node.localLocation) - nmFolder = join(node.localLocation, 'node_modules') - } - - const processDeps = (dep, optional, external) => { - optional = !!optional - external = !!external - - const location = join(nmFolder, dep.name) - const binNames = dep.package.bin && Object.keys(dep.package.bin) || [] - const toKey = getKey(dep) - - let target - if (external) { - const toLocation = join('node_modules', '.store', toKey, 'node_modules', dep.name) - target = root.children.find(c => c.location === toLocation) - } else { - target = root.fsChildren.find(c => c.location === dep.localLocation) - } - // TODO: we should no-op is an edge has already been created with the same fromKey and toKey - - binNames.forEach(bn => { - target.binPaths.push(join(from.realpath, 'node_modules', '.bin', bn)) - }) - - const link = { - global: false, - globalTop: false, - isProjectRoot: false, - edgesIn: new Set(), - edgesOut: new Map(), - binPaths: [], - isTop: false, - optional, - location: location, - path: join(dep.root.localPath, nmFolder, dep.name), - realpath: target.path, - name: toKey, - resolved: dep.resolved, - top: { path: dep.root.localPath }, - children: [], - fsChildren: [], - isLink: true, - isStoreLink: true, - isRoot: false, - package: { _id: 'abc', bundleDependencies: undefined, deprecated: undefined, bin: target.package.bin, scripts: dep.package.scripts }, - target, - } - const newEdge1 = { optional, from, to: link } - from.edgesOut.set(dep.name, newEdge1) - link.edgesIn.add(newEdge1) - const newEdge2 = { optional: false, from: link, to: target } - link.edgesOut.set(dep.name, newEdge2) - target.edgesIn.add(newEdge2) - root.children.push(link) - } - - for (const dep of node.localDependencies) { - processEdges(dep, false) - // nonOptional, local - processDeps(dep, false, false) - } - for (const dep of node.externalDependencies) { - processEdges(dep, true) - // nonOptional, external - processDeps(dep, false, true) - } - for (const dep of node.externalOptionalDependencies) { - processEdges(dep, true) - // optional, external - processDeps(dep, true, true) - } - } - - processEdges(proxiedIdealTree, false) - for (const node of proxiedIdealTree.workspaces) { - processEdges(node, false) - } - root.children.forEach(c => c.parent = root) - root.children.forEach(c => c.root = root) - root.root = root - root.target = root - return root - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js deleted file mode 100644 index def00dc..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-actual.js +++ /dev/null @@ -1,440 +0,0 @@ -// mix-in implementing the loadActual method - -const { relative, dirname, resolve, join, normalize } = require('path') - -const rpj = require('read-package-json-fast') -const { readdirScoped } = require('@npmcli/fs') -const { walkUp } = require('walk-up-path') -const ancestorPath = require('common-ancestor-path') -const treeCheck = require('../tree-check.js') - -const Shrinkwrap = require('../shrinkwrap.js') -const calcDepFlags = require('../calc-dep-flags.js') -const Node = require('../node.js') -const Link = require('../link.js') -const realpath = require('../realpath.js') - -// public symbols -const _changePath = Symbol.for('_changePath') -const _global = Symbol.for('global') -const _setWorkspaces = Symbol.for('setWorkspaces') -const _rpcache = Symbol.for('realpathCache') -const _stcache = Symbol.for('statCache') - -module.exports = cls => class ActualLoader extends cls { - #actualTree - // ensure when walking the tree that we don't call loadTree on the same - // actual node more than one time. - #actualTreeLoaded = new Set() - #actualTreePromise - - // cache of nodes when loading the actualTree, so that we avoid loaded the - // same node multiple times when symlinks attack. - #cache = new Map() - #filter - - // cache of link targets for setting fsParent links - // We don't do fsParent as a magic getter/setter, because it'd be too costly - // to keep up to date along the walk. - // And, we know that it can ONLY be relevant when the node is a target of a - // link, otherwise it'd be in a node_modules folder, so take advantage of - // that to limit the scans later. - #topNodes = new Set() - #transplantFilter - - constructor (options) { - super(options) - - this[_global] = !!options.global - - // the tree of nodes on disk - this.actualTree = options.actualTree - - // caches for cached realpath calls - const cwd = process.cwd() - // assume that the cwd is real enough for our purposes - this[_rpcache] = new Map([[cwd, cwd]]) - this[_stcache] = new Map() - } - - // public method - async loadActual (options = {}) { - // In the past this.actualTree was set as a promise that eventually - // resolved, and overwrite this.actualTree with the resolved value. This - // was a problem because virtually no other code expects this.actualTree to - // be a promise. Instead we only set it once resolved, and also return it - // from the promise so that it is what's returned from this function when - // awaited. - if (this.actualTree) { - return this.actualTree - } - if (!this.#actualTreePromise) { - // allow the user to set options on the ctor as well. - // XXX: deprecate separate method options objects. - options = { ...this.options, ...options } - - this.#actualTreePromise = this.#loadActual(options) - .then(tree => { - // reset all deps to extraneous prior to recalc - if (!options.root) { - for (const node of tree.inventory.values()) { - node.extraneous = true - } - } - - // only reset root flags if we're not re-rooting, - // otherwise leave as-is - calcDepFlags(tree, !options.root) - this.actualTree = treeCheck(tree) - return this.actualTree - }) - } - return this.#actualTreePromise - } - - // return the promise so that we don't ever have more than one going at the - // same time. This is so that buildIdealTree can default to the actualTree - // if no shrinkwrap present, but reify() can still call buildIdealTree and - // loadActual in parallel safely. - - async #loadActual (options) { - // mostly realpath to throw if the root doesn't exist - const { - global = false, - filter = () => true, - root = null, - transplantFilter = () => true, - ignoreMissing = false, - forceActual = false, - } = options - this.#filter = filter - this.#transplantFilter = transplantFilter - - if (global) { - const real = await realpath(this.path, this[_rpcache], this[_stcache]) - const params = { - path: this.path, - realpath: real, - pkg: {}, - global, - loadOverrides: true, - } - if (this.path === real) { - this.#actualTree = this.#newNode(params) - } else { - this.#actualTree = await this.#newLink(params) - } - } else { - // not in global mode, hidden lockfile is allowed, load root pkg too - this.#actualTree = await this.#loadFSNode({ - path: this.path, - real: await realpath(this.path, this[_rpcache], this[_stcache]), - loadOverrides: true, - }) - - this.#actualTree.assertRootOverrides() - - // if forceActual is set, don't even try the hidden lockfile - if (!forceActual) { - // Note: hidden lockfile will be rejected if it's not the latest thing - // in the folder, or if any of the entries in the hidden lockfile are - // missing. - const meta = await Shrinkwrap.load({ - path: this.#actualTree.path, - hiddenLockfile: true, - resolveOptions: this.options, - }) - - if (meta.loadedFromDisk) { - this.#actualTree.meta = meta - // have to load on a new Arborist object, so we don't assign - // the virtualTree on this one! Also, the weird reference is because - // we can't easily get a ref to Arborist in this module, without - // creating a circular reference, since this class is a mixin used - // to build up the Arborist class itself. - await new this.constructor({ ...this.options }).loadVirtual({ - root: this.#actualTree, - }) - await this[_setWorkspaces](this.#actualTree) - - this.#transplant(root) - return this.#actualTree - } - } - - const meta = await Shrinkwrap.load({ - path: this.#actualTree.path, - lockfileVersion: this.options.lockfileVersion, - resolveOptions: this.options, - }) - this.#actualTree.meta = meta - } - - await this.#loadFSTree(this.#actualTree) - await this[_setWorkspaces](this.#actualTree) - - // if there are workspace targets without Link nodes created, load - // the targets, so that we know what they are. - if (this.#actualTree.workspaces && this.#actualTree.workspaces.size) { - const promises = [] - for (const path of this.#actualTree.workspaces.values()) { - if (!this.#cache.has(path)) { - // workspace overrides use the root overrides - const p = this.#loadFSNode({ path, root: this.#actualTree, useRootOverrides: true }) - .then(node => this.#loadFSTree(node)) - promises.push(p) - } - } - await Promise.all(promises) - } - - if (!ignoreMissing) { - await this.#findMissingEdges() - } - - // try to find a node that is the parent in a fs tree sense, but not a - // node_modules tree sense, of any link targets. this allows us to - // resolve deps that node will find, but a legacy npm view of the - // world would not have noticed. - for (const path of this.#topNodes) { - const node = this.#cache.get(path) - if (node && !node.parent && !node.fsParent) { - for (const p of walkUp(dirname(path))) { - if (this.#cache.has(p)) { - node.fsParent = this.#cache.get(p) - break - } - } - } - } - - this.#transplant(root) - - if (global) { - // need to depend on the children, or else all of them - // will end up being flagged as extraneous, since the - // global root isn't a "real" project - const tree = this.#actualTree - const actualRoot = tree.isLink ? tree.target : tree - const { dependencies = {} } = actualRoot.package - for (const [name, kid] of actualRoot.children.entries()) { - const def = kid.isLink ? `file:${kid.realpath.replace(/#/g, '%23')}` : '*' - dependencies[name] = dependencies[name] || def - } - actualRoot.package = { ...actualRoot.package, dependencies } - } - return this.#actualTree - } - - #transplant (root) { - if (!root || root === this.#actualTree) { - return - } - - this.#actualTree[_changePath](root.path) - for (const node of this.#actualTree.children.values()) { - if (!this.#transplantFilter(node)) { - node.root = null - } - } - - root.replace(this.#actualTree) - for (const node of this.#actualTree.fsChildren) { - node.root = this.#transplantFilter(node) ? root : null - } - - this.#actualTree = root - } - - async #loadFSNode ({ path, parent, real, root, loadOverrides, useRootOverrides }) { - if (!real) { - try { - real = await realpath(path, this[_rpcache], this[_stcache]) - } catch (error) { - // if realpath fails, just provide a dummy error node - return new Node({ - error, - path, - realpath: path, - parent, - root, - loadOverrides, - }) - } - } - - const cached = this.#cache.get(path) - let node - // missing edges get a dummy node, assign the parent and return it - if (cached && !cached.dummy) { - cached.parent = parent - return cached - } else { - const params = { - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - path, - realpath: real, - parent, - root, - loadOverrides, - } - - try { - const pkg = await rpj(join(real, 'package.json')) - params.pkg = pkg - if (useRootOverrides && root.overrides) { - params.overrides = root.overrides.getNodeRule({ name: pkg.name, version: pkg.version }) - } - } catch (err) { - params.error = err - } - - // soldier on if read-package-json raises an error, passing it to the - // Node which will attach it to its errors array (Link passes it along to - // its target node) - if (normalize(path) === real) { - node = this.#newNode(params) - } else { - node = await this.#newLink(params) - } - } - this.#cache.set(path, node) - return node - } - - #newNode (options) { - // check it for an fsParent if it's a tree top. there's a decent chance - // it'll get parented later, making the fsParent scan a no-op, but better - // safe than sorry, since it's cheap. - const { parent, realpath } = options - if (!parent) { - this.#topNodes.add(realpath) - } - return new Node(options) - } - - async #newLink (options) { - const { realpath } = options - this.#topNodes.add(realpath) - const target = this.#cache.get(realpath) - const link = new Link({ ...options, target }) - - if (!target) { - // Link set its target itself in this case - this.#cache.set(realpath, link.target) - // if a link target points at a node outside of the root tree's - // node_modules hierarchy, then load that node as well. - await this.#loadFSTree(link.target) - } - - return link - } - - async #loadFSTree (node) { - const did = this.#actualTreeLoaded - if (!node.isLink && !did.has(node.target.realpath)) { - did.add(node.target.realpath) - await this.#loadFSChildren(node.target) - return Promise.all( - [...node.target.children.entries()] - .filter(([name, kid]) => !did.has(kid.realpath)) - .map(([name, kid]) => this.#loadFSTree(kid)) - ) - } - } - - // create child nodes for all the entries in node_modules - // and attach them to the node as a parent - async #loadFSChildren (node) { - const nm = resolve(node.realpath, 'node_modules') - try { - const kids = await readdirScoped(nm).then(paths => paths.map(p => p.replace(/\\/g, '/'))) - return Promise.all( - // ignore . dirs and retired scoped package folders - kids.filter(kid => !/^(@[^/]+\/)?\./.test(kid)) - .filter(kid => this.#filter(node, kid)) - .map(kid => this.#loadFSNode({ - parent: node, - path: resolve(nm, kid), - }))) - } catch { - // error in the readdir is not fatal, just means no kids - } - } - - async #findMissingEdges () { - // try to resolve any missing edges by walking up the directory tree, - // checking for the package in each node_modules folder. stop at the - // root directory. - // The tricky move here is that we load a "dummy" node for the folder - // containing the node_modules folder, so that it can be assigned as - // the fsParent. It's a bad idea to *actually* load that full node, - // because people sometimes develop in ~/projects/node_modules/... - // so we'd end up loading a massive tree with lots of unrelated junk. - const nmContents = new Map() - const tree = this.#actualTree - for (const node of tree.inventory.values()) { - const ancestor = ancestorPath(node.realpath, this.path) - - const depPromises = [] - for (const [name, edge] of node.edgesOut.entries()) { - const notMissing = !edge.missing && - !(edge.to && (edge.to.dummy || edge.to.parent !== node)) - if (notMissing) { - continue - } - - // start the walk from the dirname, because we would have found - // the dep in the loadFSTree step already if it was local. - for (const p of walkUp(dirname(node.realpath))) { - // only walk as far as the nearest ancestor - // this keeps us from going into completely unrelated - // places when a project is just missing something, but - // allows for finding the transitive deps of link targets. - // ie, if it has to go up and back out to get to the path - // from the nearest common ancestor, we've gone too far. - if (ancestor && /^\.\.(?:[\\/]|$)/.test(relative(ancestor, p))) { - break - } - - let entries - if (!nmContents.has(p)) { - entries = await readdirScoped(p + '/node_modules') - .catch(() => []).then(paths => paths.map(p => p.replace(/\\/g, '/'))) - nmContents.set(p, entries) - } else { - entries = nmContents.get(p) - } - - if (!entries.includes(name)) { - continue - } - - let d - if (!this.#cache.has(p)) { - d = new Node({ path: p, root: node.root, dummy: true }) - this.#cache.set(p, d) - } else { - d = this.#cache.get(p) - } - if (d.dummy) { - // it's a placeholder, so likely would not have loaded this dep, - // unless another dep in the tree also needs it. - const depPath = normalize(`${p}/node_modules/${name}`) - const cached = this.#cache.get(depPath) - if (!cached || cached.dummy) { - depPromises.push(this.#loadFSNode({ - path: depPath, - root: node.root, - parent: d, - }).then(node => this.#loadFSTree(node))) - } - } - break - } - } - await Promise.all(depPromises) - } - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js deleted file mode 100644 index 9b681a4..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/load-virtual.js +++ /dev/null @@ -1,303 +0,0 @@ -// mixin providing the loadVirtual method -const mapWorkspaces = require('@npmcli/map-workspaces') - -const { resolve } = require('path') - -const nameFromFolder = require('@npmcli/name-from-folder') -const consistentResolve = require('../consistent-resolve.js') -const Shrinkwrap = require('../shrinkwrap.js') -const Node = require('../node.js') -const Link = require('../link.js') -const relpath = require('../relpath.js') -const calcDepFlags = require('../calc-dep-flags.js') -const rpj = require('read-package-json-fast') -const treeCheck = require('../tree-check.js') - -const flagsSuspect = Symbol.for('flagsSuspect') -const setWorkspaces = Symbol.for('setWorkspaces') - -module.exports = cls => class VirtualLoader extends cls { - #rootOptionProvided - - constructor (options) { - super(options) - - // the virtual tree we load from a shrinkwrap - this.virtualTree = options.virtualTree - this[flagsSuspect] = false - } - - // public method - async loadVirtual (options = {}) { - if (this.virtualTree) { - return this.virtualTree - } - - // allow the user to set reify options on the ctor as well. - // XXX: deprecate separate reify() options object. - options = { ...this.options, ...options } - - if (options.root && options.root.meta) { - await this.#loadFromShrinkwrap(options.root.meta, options.root) - return treeCheck(this.virtualTree) - } - - const s = await Shrinkwrap.load({ - path: this.path, - lockfileVersion: this.options.lockfileVersion, - resolveOptions: this.options, - }) - if (!s.loadedFromDisk && !options.root) { - const er = new Error('loadVirtual requires existing shrinkwrap file') - throw Object.assign(er, { code: 'ENOLOCK' }) - } - - // when building the ideal tree, we pass in a root node to this function - // otherwise, load it from the root package json or the lockfile - const { - root = await this.#loadRoot(s), - } = options - - this.#rootOptionProvided = options.root - - await this.#loadFromShrinkwrap(s, root) - root.assertRootOverrides() - return treeCheck(this.virtualTree) - } - - async #loadRoot (s) { - const pj = this.path + '/package.json' - const pkg = await rpj(pj).catch(() => s.data.packages['']) || {} - return this[setWorkspaces](this.#loadNode('', pkg, true)) - } - - async #loadFromShrinkwrap (s, root) { - if (!this.#rootOptionProvided) { - // root is never any of these things, but might be a brand new - // baby Node object that never had its dep flags calculated. - root.extraneous = false - root.dev = false - root.optional = false - root.devOptional = false - root.peer = false - } else { - this[flagsSuspect] = true - } - - this.#checkRootEdges(s, root) - root.meta = s - this.virtualTree = root - const { links, nodes } = this.#resolveNodes(s, root) - await this.#resolveLinks(links, nodes) - if (!(s.originalLockfileVersion >= 2)) { - this.#assignBundles(nodes) - } - if (this[flagsSuspect]) { - // reset all dep flags - // can't use inventory here, because virtualTree might not be root - for (const node of nodes.values()) { - if (node.isRoot || node === this.#rootOptionProvided) { - continue - } - node.extraneous = true - node.dev = true - node.optional = true - node.devOptional = true - node.peer = true - } - calcDepFlags(this.virtualTree, !this.#rootOptionProvided) - } - return root - } - - // check the lockfile deps, and see if they match. if they do not - // then we have to reset dep flags at the end. for example, if the - // user manually edits their package.json file, then we need to know - // that the idealTree is no longer entirely trustworthy. - #checkRootEdges (s, root) { - // loaded virtually from tree, no chance of being out of sync - // ancient lockfiles are critically damaged by this process, - // so we need to just hope for the best in those cases. - if (!s.loadedFromDisk || s.ancientLockfile) { - return - } - - const lock = s.get('') - const prod = lock.dependencies || {} - const dev = lock.devDependencies || {} - const optional = lock.optionalDependencies || {} - const peer = lock.peerDependencies || {} - const peerOptional = {} - - if (lock.peerDependenciesMeta) { - for (const [name, meta] of Object.entries(lock.peerDependenciesMeta)) { - if (meta.optional && peer[name] !== undefined) { - peerOptional[name] = peer[name] - delete peer[name] - } - } - } - - for (const name of Object.keys(optional)) { - delete prod[name] - } - - const lockWS = {} - const workspaces = mapWorkspaces.virtual({ - cwd: this.path, - lockfile: s.data, - }) - - for (const [name, path] of workspaces.entries()) { - lockWS[name] = `file:${path.replace(/#/g, '%23')}` - } - - // Should rootNames exclude optional? - const rootNames = new Set(root.edgesOut.keys()) - - const lockByType = ({ dev, optional, peer, peerOptional, prod, workspace: lockWS }) - - // Find anything in shrinkwrap deps that doesn't match root's type or spec - for (const type in lockByType) { - const deps = lockByType[type] - for (const name in deps) { - const edge = root.edgesOut.get(name) - if (!edge || edge.type !== type || edge.spec !== deps[name]) { - return this[flagsSuspect] = true - } - rootNames.delete(name) - } - } - // Something was in root that's not accounted for in shrinkwrap - if (rootNames.size) { - return this[flagsSuspect] = true - } - } - - // separate out link metadatas, and create Node objects for nodes - #resolveNodes (s, root) { - const links = new Map() - const nodes = new Map([['', root]]) - for (const [location, meta] of Object.entries(s.data.packages)) { - // skip the root because we already got it - if (!location) { - continue - } - - if (meta.link) { - links.set(location, meta) - } else { - nodes.set(location, this.#loadNode(location, meta)) - } - } - return { links, nodes } - } - - // links is the set of metadata, and nodes is the map of non-Link nodes - // Set the targets to nodes in the set, if we have them (we might not) - async #resolveLinks (links, nodes) { - for (const [location, meta] of links.entries()) { - const targetPath = resolve(this.path, meta.resolved) - const targetLoc = relpath(this.path, targetPath) - const target = nodes.get(targetLoc) - const link = this.#loadLink(location, targetLoc, target, meta) - nodes.set(location, link) - nodes.set(targetLoc, link.target) - - // we always need to read the package.json for link targets - // outside node_modules because they can be changed by the local user - if (!link.target.parent) { - const pj = link.realpath + '/package.json' - const pkg = await rpj(pj).catch(() => null) - if (pkg) { - link.target.package = pkg - } - } - } - } - - #assignBundles (nodes) { - for (const [location, node] of nodes) { - // Skip assignment of parentage for the root package - if (!location || node.isLink && !node.target.location) { - continue - } - const { name, parent, package: { inBundle } } = node - - if (!parent) { - continue - } - - // read inBundle from package because 'package' here is - // actually a v2 lockfile metadata entry. - // If the *parent* is also bundled, though, or if the parent has - // no dependency on it, then we assume that it's being pulled in - // just by virtue of its parent or a transitive dep being bundled. - const { package: ppkg } = parent - const { inBundle: parentBundled } = ppkg - if (inBundle && !parentBundled && parent.edgesOut.has(node.name)) { - if (!ppkg.bundleDependencies) { - ppkg.bundleDependencies = [name] - } else { - ppkg.bundleDependencies.push(name) - } - } - } - } - - #loadNode (location, sw, loadOverrides) { - const p = this.virtualTree ? this.virtualTree.realpath : this.path - const path = resolve(p, location) - // shrinkwrap doesn't include package name unless necessary - if (!sw.name) { - sw.name = nameFromFolder(path) - } - - const dev = sw.dev - const optional = sw.optional - const devOptional = dev || optional || sw.devOptional - const peer = sw.peer - - const node = new Node({ - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - root: this.virtualTree, - path, - realpath: path, - integrity: sw.integrity, - resolved: consistentResolve(sw.resolved, this.path, path), - pkg: sw, - hasShrinkwrap: sw.hasShrinkwrap, - dev, - optional, - devOptional, - peer, - loadOverrides, - }) - // cast to boolean because they're undefined in the lock file when false - node.extraneous = !!sw.extraneous - node.devOptional = !!(sw.devOptional || sw.dev || sw.optional) - node.peer = !!sw.peer - node.optional = !!sw.optional - node.dev = !!sw.dev - return node - } - - #loadLink (location, targetLoc, target, meta) { - const path = resolve(this.path, location) - const link = new Link({ - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - path, - realpath: resolve(this.path, targetLoc), - target, - pkg: target && target.package, - }) - link.extraneous = target.extraneous - link.devOptional = target.devOptional - link.peer = target.peer - link.optional = target.optional - link.dev = target.dev - return link - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js deleted file mode 100644 index 494114d..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/pruner.js +++ /dev/null @@ -1,30 +0,0 @@ -const _idealTreePrune = Symbol.for('idealTreePrune') -const _workspacesEnabled = Symbol.for('workspacesEnabled') -const _addNodeToTrashList = Symbol.for('addNodeToTrashList') - -module.exports = cls => class Pruner extends cls { - async prune (options = {}) { - // allow the user to set options on the ctor as well. - // XXX: deprecate separate method options objects. - options = { ...this.options, ...options } - - await this.buildIdealTree(options) - - this[_idealTreePrune]() - - if (!this[_workspacesEnabled]) { - const excludeNodes = this.excludeWorkspacesDependencySet(this.idealTree) - for (const node of this.idealTree.inventory.values()) { - if ( - node.parent !== null - && !node.isProjectRoot - && !excludeNodes.has(node) - ) { - this[_addNodeToTrashList](node) - } - } - } - - return this.reify(options) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js deleted file mode 100644 index d502d52..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/rebuild.js +++ /dev/null @@ -1,433 +0,0 @@ -// Arborist.rebuild({path = this.path}) will do all the binlinks and -// bundle building needed. Called by reify, and by `npm rebuild`. - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const { depth: dfwalk } = require('treeverse') -const promiseAllRejectLate = require('promise-all-reject-late') -const rpj = require('read-package-json-fast') -const binLinks = require('bin-links') -const runScript = require('@npmcli/run-script') -const promiseCallLimit = require('promise-call-limit') -const { resolve } = require('path') -const { - isNodeGypPackage, - defaultGypInstallScript, -} = require('@npmcli/node-gyp') -const log = require('proc-log') - -const boolEnv = b => b ? '1' : '' -const sortNodes = (a, b) => - (a.depth - b.depth) || localeCompare(a.path, b.path) - -const _workspaces = Symbol.for('workspaces') -const _build = Symbol('build') -const _loadDefaultNodes = Symbol('loadDefaultNodes') -const _retrieveNodesByType = Symbol('retrieveNodesByType') -const _resetQueues = Symbol('resetQueues') -const _rebuildBundle = Symbol('rebuildBundle') -const _ignoreScripts = Symbol('ignoreScripts') -const _binLinks = Symbol('binLinks') -const _oldMeta = Symbol('oldMeta') -const _createBinLinks = Symbol('createBinLinks') -const _doHandleOptionalFailure = Symbol('doHandleOptionalFailure') -const _linkAllBins = Symbol('linkAllBins') -const _runScripts = Symbol('runScripts') -const _buildQueues = Symbol('buildQueues') -const _addToBuildSet = Symbol('addToBuildSet') -const _checkBins = Symbol.for('checkBins') -const _queues = Symbol('queues') -const _scriptShell = Symbol('scriptShell') -const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot') -const _workspacesEnabled = Symbol.for('workspacesEnabled') - -const _force = Symbol.for('force') -const _global = Symbol.for('global') - -// defined by reify mixin -const _handleOptionalFailure = Symbol.for('handleOptionalFailure') -const _trashList = Symbol.for('trashList') - -module.exports = cls => class Builder extends cls { - constructor (options) { - super(options) - - const { - ignoreScripts = false, - scriptShell, - binLinks = true, - rebuildBundle = true, - } = options - - this.scriptsRun = new Set() - this[_binLinks] = binLinks - this[_ignoreScripts] = !!ignoreScripts - this[_scriptShell] = scriptShell - this[_rebuildBundle] = !!rebuildBundle - this[_resetQueues]() - this[_oldMeta] = null - } - - async rebuild ({ nodes, handleOptionalFailure = false } = {}) { - // nothing to do if we're not building anything! - if (this[_ignoreScripts] && !this[_binLinks]) { - return - } - - // when building for the first time, as part of reify, we ignore - // failures in optional nodes, and just delete them. however, when - // running JUST a rebuild, we treat optional failures as real fails - this[_doHandleOptionalFailure] = handleOptionalFailure - - if (!nodes) { - nodes = await this[_loadDefaultNodes]() - } - - // separates links nodes so that it can run - // prepare scripts and link bins in the expected order - process.emit('time', 'build') - - const { - depNodes, - linkNodes, - } = this[_retrieveNodesByType](nodes) - - // build regular deps - await this[_build](depNodes, {}) - - // build link deps - if (linkNodes.size) { - this[_resetQueues]() - await this[_build](linkNodes, { type: 'links' }) - } - - process.emit('timeEnd', 'build') - } - - // if we don't have a set of nodes, then just rebuild - // the actual tree on disk. - async [_loadDefaultNodes] () { - let nodes - const tree = await this.loadActual() - let filterSet - if (!this[_workspacesEnabled]) { - filterSet = this.excludeWorkspacesDependencySet(tree) - nodes = tree.inventory.filter(node => - filterSet.has(node) || node.isProjectRoot - ) - } else if (this[_workspaces] && this[_workspaces].length) { - filterSet = this.workspaceDependencySet( - tree, - this[_workspaces], - this[_includeWorkspaceRoot] - ) - nodes = tree.inventory.filter(node => filterSet.has(node)) - } else { - nodes = tree.inventory.values() - } - return nodes - } - - [_retrieveNodesByType] (nodes) { - const depNodes = new Set() - const linkNodes = new Set() - const storeNodes = new Set() - - for (const node of nodes) { - if (node.isStoreLink) { - storeNodes.add(node) - } else if (node.isLink) { - linkNodes.add(node) - } else { - depNodes.add(node) - } - } - // Make sure that store linked nodes are processed last. - // We can't process store links separately or else lifecycle scripts on - // standard nodes might not have bin links yet. - for (const node of storeNodes) { - depNodes.add(node) - } - - // deduplicates link nodes and their targets, avoids - // calling lifecycle scripts twice when running `npm rebuild` - // ref: https://github.com/npm/cli/issues/2905 - // - // we avoid doing so if global=true since `bin-links` relies - // on having the target nodes available in global mode. - if (!this[_global]) { - for (const node of linkNodes) { - depNodes.delete(node.target) - } - } - - return { - depNodes, - linkNodes, - } - } - - [_resetQueues] () { - this[_queues] = { - preinstall: [], - install: [], - postinstall: [], - prepare: [], - bin: [], - } - } - - async [_build] (nodes, { type = 'deps' }) { - process.emit('time', `build:${type}`) - - await this[_buildQueues](nodes) - - if (!this[_ignoreScripts]) { - await this[_runScripts]('preinstall') - } - - // links should run prepare scripts and only link bins after that - if (type === 'links') { - await this[_runScripts]('prepare') - } - if (this[_binLinks]) { - await this[_linkAllBins]() - } - - if (!this[_ignoreScripts]) { - await this[_runScripts]('install') - await this[_runScripts]('postinstall') - } - - process.emit('timeEnd', `build:${type}`) - } - - async [_buildQueues] (nodes) { - process.emit('time', 'build:queue') - const set = new Set() - - const promises = [] - for (const node of nodes) { - promises.push(this[_addToBuildSet](node, set)) - - // if it has bundle deps, add those too, if rebuildBundle - if (this[_rebuildBundle] !== false) { - const bd = node.package.bundleDependencies - if (bd && bd.length) { - dfwalk({ - tree: node, - leave: node => promises.push(this[_addToBuildSet](node, set)), - getChildren: node => [...node.children.values()], - filter: node => node.inBundle, - }) - } - } - } - await promiseAllRejectLate(promises) - - // now sort into the queues for the 4 things we have to do - // run in the same predictable order that buildIdealTree uses - // there's no particular reason for doing it in this order rather - // than another, but sorting *somehow* makes it consistent. - const queue = [...set].sort(sortNodes) - - for (const node of queue) { - const { package: { bin, scripts = {} } } = node.target - const { preinstall, install, postinstall, prepare } = scripts - const tests = { bin, preinstall, install, postinstall, prepare } - for (const [key, has] of Object.entries(tests)) { - if (has) { - this[_queues][key].push(node) - } - } - } - process.emit('timeEnd', 'build:queue') - } - - async [_checkBins] (node) { - // if the node is a global top, and we're not in force mode, then - // any existing bins need to either be missing, or a symlink into - // the node path. Otherwise a package can have a preinstall script - // that unlinks something, to allow them to silently overwrite system - // binaries, which is unsafe and insecure. - if (!node.globalTop || this[_force]) { - return - } - const { path, package: pkg } = node - await binLinks.checkBins({ pkg, path, top: true, global: true }) - } - - async [_addToBuildSet] (node, set, refreshed = false) { - if (set.has(node)) { - return - } - - if (this[_oldMeta] === null) { - const { root: { meta } } = node - this[_oldMeta] = meta && meta.loadedFromDisk && - !(meta.originalLockfileVersion >= 2) - } - - const { package: pkg, hasInstallScript } = node.target - const { gypfile, bin, scripts = {} } = pkg - - const { preinstall, install, postinstall, prepare } = scripts - const anyScript = preinstall || install || postinstall || prepare - if (!refreshed && !anyScript && (hasInstallScript || this[_oldMeta])) { - // we either have an old metadata (and thus might have scripts) - // or we have an indication that there's install scripts (but - // don't yet know what they are) so we have to load the package.json - // from disk to see what the deal is. Failure here just means - // no scripts to add, probably borked package.json. - // add to the set then remove while we're reading the pj, so we - // don't accidentally hit it multiple times. - set.add(node) - const pkg = await rpj(node.path + '/package.json').catch(() => ({})) - set.delete(node) - - const { scripts = {} } = pkg - node.package.scripts = scripts - return this[_addToBuildSet](node, set, true) - } - - // Rebuild node-gyp dependencies lacking an install or preinstall script - // note that 'scripts' might be missing entirely, and the package may - // set gypfile:false to avoid this automatic detection. - const isGyp = gypfile !== false && - !install && - !preinstall && - await isNodeGypPackage(node.path) - - if (bin || preinstall || install || postinstall || prepare || isGyp) { - if (bin) { - await this[_checkBins](node) - } - if (isGyp) { - scripts.install = defaultGypInstallScript - node.package.scripts = scripts - } - set.add(node) - } - } - - async [_runScripts] (event) { - const queue = this[_queues][event] - - if (!queue.length) { - return - } - - process.emit('time', `build:run:${event}`) - const stdio = this.options.foregroundScripts ? 'inherit' : 'pipe' - const limit = this.options.foregroundScripts ? 1 : undefined - await promiseCallLimit(queue.map(node => async () => { - const { - path, - integrity, - resolved, - optional, - peer, - dev, - devOptional, - package: pkg, - location, - isStoreLink, - } = node.target - - // skip any that we know we'll be deleting - // or storeLinks - if (this[_trashList].has(path) || isStoreLink) { - return - } - - const timer = `build:run:${event}:${location}` - process.emit('time', timer) - log.info('run', pkg._id, event, location, pkg.scripts[event]) - const env = { - npm_package_resolved: resolved, - npm_package_integrity: integrity, - npm_package_json: resolve(path, 'package.json'), - npm_package_optional: boolEnv(optional), - npm_package_dev: boolEnv(dev), - npm_package_peer: boolEnv(peer), - npm_package_dev_optional: - boolEnv(devOptional && !dev && !optional), - } - const runOpts = { - event, - path, - pkg, - stdio, - env, - scriptShell: this[_scriptShell], - } - const p = runScript(runOpts).catch(er => { - const { code, signal } = er - log.info('run', pkg._id, event, { code, signal }) - throw er - }).then(({ args, code, signal, stdout, stderr }) => { - this.scriptsRun.add({ - pkg, - path, - event, - // I do not know why this needs to be on THIS line but refactoring - // this function would be quite a process - // eslint-disable-next-line promise/always-return - cmd: args && args[args.length - 1], - env, - code, - signal, - stdout, - stderr, - }) - log.info('run', pkg._id, event, { code, signal }) - }) - - await (this[_doHandleOptionalFailure] - ? this[_handleOptionalFailure](node, p) - : p) - - process.emit('timeEnd', timer) - }), limit) - process.emit('timeEnd', `build:run:${event}`) - } - - async [_linkAllBins] () { - const queue = this[_queues].bin - if (!queue.length) { - return - } - - process.emit('time', 'build:link') - const promises = [] - // sort the queue by node path, so that the module-local collision - // detector in bin-links will always resolve the same way. - for (const node of queue.sort(sortNodes)) { - promises.push(this[_createBinLinks](node)) - } - - await promiseAllRejectLate(promises) - process.emit('timeEnd', 'build:link') - } - - async [_createBinLinks] (node) { - if (this[_trashList].has(node.path)) { - return - } - - process.emit('time', `build:link:${node.location}`) - - const p = binLinks({ - pkg: node.package, - path: node.path, - top: !!(node.isTop || node.globalTop), - force: this[_force], - global: !!node.globalTop, - }) - - await (this[_doHandleOptionalFailure] - ? this[_handleOptionalFailure](node, p) - : p) - - process.emit('timeEnd', `build:link:${node.location}`) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js deleted file mode 100644 index 0981afd..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js +++ /dev/null @@ -1,1593 +0,0 @@ -// mixin implementing the reify method -const onExit = require('../signal-handling.js') -const pacote = require('pacote') -const AuditReport = require('../audit-report.js') -const { subset, intersects } = require('semver') -const npa = require('npm-package-arg') -const semver = require('semver') -const debug = require('../debug.js') -const { walkUp } = require('walk-up-path') -const log = require('proc-log') -const hgi = require('hosted-git-info') -const rpj = require('read-package-json-fast') - -const { dirname, resolve, relative, join } = require('path') -const { depth: dfwalk } = require('treeverse') -const { - lstat, - mkdir, - rm, - symlink, -} = require('fs/promises') -const { moveFile } = require('@npmcli/fs') -const PackageJson = require('@npmcli/package-json') -const packageContents = require('@npmcli/installed-package-contents') -const runScript = require('@npmcli/run-script') -const { checkEngine, checkPlatform } = require('npm-install-checks') -const _force = Symbol.for('force') - -const treeCheck = require('../tree-check.js') -const relpath = require('../relpath.js') -const Diff = require('../diff.js') -const retirePath = require('../retire-path.js') -const promiseAllRejectLate = require('promise-all-reject-late') -const optionalSet = require('../optional-set.js') -const calcDepFlags = require('../calc-dep-flags.js') -const { saveTypeMap, hasSubKey } = require('../add-rm-pkg-deps.js') - -const Shrinkwrap = require('../shrinkwrap.js') -const { defaultLockfileVersion } = Shrinkwrap - -const _retiredPaths = Symbol('retiredPaths') -const _retiredUnchanged = Symbol('retiredUnchanged') -const _sparseTreeDirs = Symbol('sparseTreeDirs') -const _sparseTreeRoots = Symbol('sparseTreeRoots') -const _savePrefix = Symbol('savePrefix') -const _retireShallowNodes = Symbol.for('retireShallowNodes') -const _getBundlesByDepth = Symbol('getBundlesByDepth') -const _registryResolved = Symbol('registryResolved') -const _addNodeToTrashList = Symbol.for('addNodeToTrashList') -const _workspaces = Symbol.for('workspaces') -const _workspacesEnabled = Symbol.for('workspacesEnabled') - -// shared by rebuild mixin -const _trashList = Symbol.for('trashList') -const _handleOptionalFailure = Symbol.for('handleOptionalFailure') -const _loadTrees = Symbol.for('loadTrees') - -// shared symbols for swapping out when testing -const _diffTrees = Symbol.for('diffTrees') -const _createSparseTree = Symbol.for('createSparseTree') -const _loadShrinkwrapsAndUpdateTrees = Symbol.for('loadShrinkwrapsAndUpdateTrees') -const _shrinkwrapInflated = Symbol('shrinkwrapInflated') -const _bundleUnpacked = Symbol('bundleUnpacked') -const _bundleMissing = Symbol('bundleMissing') -const _reifyNode = Symbol.for('reifyNode') -const _extractOrLink = Symbol('extractOrLink') -const _updateAll = Symbol.for('updateAll') -const _updateNames = Symbol.for('updateNames') -// defined by rebuild mixin -const _checkBins = Symbol.for('checkBins') -const _symlink = Symbol('symlink') -const _warnDeprecated = Symbol('warnDeprecated') -const _loadBundlesAndUpdateTrees = Symbol.for('loadBundlesAndUpdateTrees') -const _submitQuickAudit = Symbol('submitQuickAudit') -const _unpackNewModules = Symbol.for('unpackNewModules') -const _moveContents = Symbol.for('moveContents') -const _moveBackRetiredUnchanged = Symbol.for('moveBackRetiredUnchanged') -const _build = Symbol.for('build') -const _removeTrash = Symbol.for('removeTrash') -const _renamePath = Symbol.for('renamePath') -const _rollbackRetireShallowNodes = Symbol.for('rollbackRetireShallowNodes') -const _rollbackCreateSparseTree = Symbol.for('rollbackCreateSparseTree') -const _rollbackMoveBackRetiredUnchanged = Symbol.for('rollbackMoveBackRetiredUnchanged') -const _saveIdealTree = Symbol.for('saveIdealTree') -const _copyIdealToActual = Symbol('copyIdealToActual') -const _addOmitsToTrashList = Symbol('addOmitsToTrashList') -const _packageLockOnly = Symbol('packageLockOnly') -const _dryRun = Symbol('dryRun') -const _validateNodeModules = Symbol('validateNodeModules') -const _nmValidated = Symbol('nmValidated') -const _validatePath = Symbol('validatePath') -const _reifyPackages = Symbol.for('reifyPackages') -const _includeWorkspaceRoot = Symbol.for('includeWorkspaceRoot') - -const _omitDev = Symbol('omitDev') -const _omitOptional = Symbol('omitOptional') -const _omitPeer = Symbol('omitPeer') - -const _global = Symbol.for('global') - -const _pruneBundledMetadeps = Symbol('pruneBundledMetadeps') - -// defined by Ideal mixin -const _resolvedAdd = Symbol.for('resolvedAdd') -const _usePackageLock = Symbol.for('usePackageLock') -const _formatPackageLock = Symbol.for('formatPackageLock') - -const _createIsolatedTree = Symbol.for('createIsolatedTree') - -module.exports = cls => class Reifier extends cls { - constructor (options) { - super(options) - - const { - savePrefix = '^', - packageLockOnly = false, - dryRun = false, - formatPackageLock = true, - } = options - - this[_dryRun] = !!dryRun - this[_packageLockOnly] = !!packageLockOnly - this[_savePrefix] = savePrefix - this[_formatPackageLock] = !!formatPackageLock - - this.diff = null - this[_retiredPaths] = {} - this[_shrinkwrapInflated] = new Set() - this[_retiredUnchanged] = {} - this[_sparseTreeDirs] = new Set() - this[_sparseTreeRoots] = new Set() - this[_trashList] = new Set() - // the nodes we unpack to read their bundles - this[_bundleUnpacked] = new Set() - // child nodes we'd EXPECT to be included in a bundle, but aren't - this[_bundleMissing] = new Set() - this[_nmValidated] = new Set() - } - - // public method - async reify (options = {}) { - const linked = (options.installStrategy || this.options.installStrategy) === 'linked' - - if (this[_packageLockOnly] && this[_global]) { - const er = new Error('cannot generate lockfile for global packages') - er.code = 'ESHRINKWRAPGLOBAL' - throw er - } - - const omit = new Set(options.omit || []) - this[_omitDev] = omit.has('dev') - this[_omitOptional] = omit.has('optional') - this[_omitPeer] = omit.has('peer') - - // start tracker block - this.addTracker('reify') - process.emit('time', 'reify') - await this[_validatePath]() - await this[_loadTrees](options) - - const oldTree = this.idealTree - if (linked) { - // swap out the tree with the isolated tree - // this is currently technical debt which will be resolved in a refactor - // of Node/Link trees - log.warn('reify', 'The "linked" install strategy is EXPERIMENTAL and may contain bugs.') - this.idealTree = await this[_createIsolatedTree](this.idealTree) - } - await this[_diffTrees]() - await this[_reifyPackages]() - if (linked) { - // swap back in the idealTree - // so that the lockfile is preserved - this.idealTree = oldTree - } - await this[_saveIdealTree](options) - await this[_copyIdealToActual]() - // This is a very bad pattern and I can't wait to stop doing it - this.auditReport = await this.auditReport - - this.finishTracker('reify') - process.emit('timeEnd', 'reify') - return treeCheck(this.actualTree) - } - - async [_validatePath] () { - // don't create missing dirs on dry runs - if (this[_packageLockOnly] || this[_dryRun]) { - return - } - - // we do NOT want to set ownership on this folder, especially - // recursively, because it can have other side effects to do that - // in a project directory. We just want to make it if it's missing. - await mkdir(resolve(this.path), { recursive: true }) - - // do not allow the top-level node_modules to be a symlink - await this[_validateNodeModules](resolve(this.path, 'node_modules')) - } - - async [_reifyPackages] () { - // we don't submit the audit report or write to disk on dry runs - if (this[_dryRun]) { - return - } - - if (this[_packageLockOnly]) { - // we already have the complete tree, so just audit it now, - // and that's all we have to do here. - return this[_submitQuickAudit]() - } - - // ok, we're about to start touching the fs. need to roll back - // if we get an early termination. - let reifyTerminated = null - const removeHandler = onExit(({ signal }) => { - // only call once. if signal hits twice, we just terminate - removeHandler() - reifyTerminated = Object.assign(new Error('process terminated'), { - signal, - }) - return false - }) - - // [rollbackfn, [...actions]] - // after each step, if the process was terminated, execute the rollback - // note that each rollback *also* calls the previous one when it's - // finished, and then the first one throws the error, so we only need - // a new rollback step when we have a new thing that must be done to - // revert the install. - const steps = [ - [_rollbackRetireShallowNodes, [ - _retireShallowNodes, - ]], - [_rollbackCreateSparseTree, [ - _createSparseTree, - _addOmitsToTrashList, - _loadShrinkwrapsAndUpdateTrees, - _loadBundlesAndUpdateTrees, - _submitQuickAudit, - _unpackNewModules, - ]], - [_rollbackMoveBackRetiredUnchanged, [ - _moveBackRetiredUnchanged, - _build, - ]], - ] - for (const [rollback, actions] of steps) { - for (const action of actions) { - try { - await this[action]() - if (reifyTerminated) { - throw reifyTerminated - } - } catch (er) { - await this[rollback](er) - /* istanbul ignore next - rollback throws, should never hit this */ - throw er - } - } - } - - // no rollback for this one, just exit with the error, since the - // install completed and can't be safely recovered at this point. - await this[_removeTrash]() - if (reifyTerminated) { - throw reifyTerminated - } - - // done modifying the file system, no need to keep listening for sigs - removeHandler() - } - - // when doing a local install, we load everything and figure it all out. - // when doing a global install, we *only* care about the explicit requests. - [_loadTrees] (options) { - process.emit('time', 'reify:loadTrees') - const bitOpt = { - ...options, - complete: this[_packageLockOnly] || this[_dryRun], - } - - // if we're only writing a package lock, then it doesn't matter what's here - if (this[_packageLockOnly]) { - return this.buildIdealTree(bitOpt) - .then(() => process.emit('timeEnd', 'reify:loadTrees')) - } - - const actualOpt = this[_global] ? { - ignoreMissing: true, - global: true, - filter: (node, kid) => { - // if it's not the project root, and we have no explicit requests, - // then we're already into a nested dep, so we keep it - if (this.explicitRequests.size === 0 || !node.isProjectRoot) { - return true - } - - // if we added it as an edgeOut, then we want it - if (this.idealTree.edgesOut.has(kid)) { - return true - } - - // if it's an explicit request, then we want it - const hasExplicit = [...this.explicitRequests] - .some(edge => edge.name === kid) - if (hasExplicit) { - return true - } - - // ignore the rest of the global install folder - return false - }, - } : { ignoreMissing: true } - - if (!this[_global]) { - return Promise.all([ - this.loadActual(actualOpt), - this.buildIdealTree(bitOpt), - ]).then(() => process.emit('timeEnd', 'reify:loadTrees')) - } - - // the global install space tends to have a lot of stuff in it. don't - // load all of it, just what we care about. we won't be saving a - // hidden lockfile in there anyway. Note that we have to load ideal - // BEFORE loading actual, so that the actualOpt can use the - // explicitRequests which is set during buildIdealTree - return this.buildIdealTree(bitOpt) - .then(() => this.loadActual(actualOpt)) - .then(() => process.emit('timeEnd', 'reify:loadTrees')) - } - - [_diffTrees] () { - if (this[_packageLockOnly]) { - return - } - - process.emit('time', 'reify:diffTrees') - // XXX if we have an existing diff already, there should be a way - // to just invalidate the parts that changed, but avoid walking the - // whole tree again. - - const includeWorkspaces = this[_workspacesEnabled] - const includeRootDeps = !this[_workspacesEnabled] - || this[_includeWorkspaceRoot] && this[_workspaces].length > 0 - - const filterNodes = [] - if (this[_global] && this.explicitRequests.size) { - const idealTree = this.idealTree.target - const actualTree = this.actualTree.target - // we ONLY are allowed to make changes in the global top-level - // children where there's an explicit request. - for (const { name } of this.explicitRequests) { - const ideal = idealTree.children.get(name) - if (ideal) { - filterNodes.push(ideal) - } - const actual = actualTree.children.get(name) - if (actual) { - filterNodes.push(actual) - } - } - } else { - if (includeWorkspaces) { - // add all ws nodes to filterNodes - for (const ws of this[_workspaces]) { - const ideal = this.idealTree.children.get(ws) - if (ideal) { - filterNodes.push(ideal) - } - const actual = this.actualTree.children.get(ws) - if (actual) { - filterNodes.push(actual) - } - } - } - if (includeRootDeps) { - // add all non-workspace nodes to filterNodes - for (const tree of [this.idealTree, this.actualTree]) { - for (const { type, to } of tree.edgesOut.values()) { - if (type !== 'workspace' && to) { - filterNodes.push(to) - } - } - } - } - } - - // find all the nodes that need to change between the actual - // and ideal trees. - this.diff = Diff.calculate({ - shrinkwrapInflated: this[_shrinkwrapInflated], - filterNodes, - actual: this.actualTree, - ideal: this.idealTree, - }) - - // we don't have to add 'removed' folders to the trashlist, because - // they'll be moved aside to a retirement folder, and then the retired - // folder will be deleted at the end. This is important when we have - // a folder like FOO being "removed" in favor of a folder like "foo", - // because if we remove node_modules/FOO on case-insensitive systems, - // it will remove the dep that we *want* at node_modules/foo. - - process.emit('timeEnd', 'reify:diffTrees') - } - - // add the node and all its bins to the list of things to be - // removed later on in the process. optionally, also mark them - // as a retired paths, so that we move them out of the way and - // replace them when rolling back on failure. - [_addNodeToTrashList] (node, retire = false) { - const paths = [node.path, ...node.binPaths] - const moves = this[_retiredPaths] - log.silly('reify', 'mark', retire ? 'retired' : 'deleted', paths) - for (const path of paths) { - if (retire) { - const retired = retirePath(path) - moves[path] = retired - this[_trashList].add(retired) - } else { - this[_trashList].add(path) - } - } - } - - // move aside the shallowest nodes in the tree that have to be - // changed or removed, so that we can rollback if necessary. - [_retireShallowNodes] () { - process.emit('time', 'reify:retireShallow') - const moves = this[_retiredPaths] = {} - for (const diff of this.diff.children) { - if (diff.action === 'CHANGE' || diff.action === 'REMOVE') { - // we'll have to clean these up at the end, so add them to the list - this[_addNodeToTrashList](diff.actual, true) - } - } - log.silly('reify', 'moves', moves) - const movePromises = Object.entries(moves) - .map(([from, to]) => this[_renamePath](from, to)) - return promiseAllRejectLate(movePromises) - .then(() => process.emit('timeEnd', 'reify:retireShallow')) - } - - [_renamePath] (from, to, didMkdirp = false) { - return moveFile(from, to) - .catch(er => { - // Occasionally an expected bin file might not exist in the package, - // or a shim/symlink might have been moved aside. If we've already - // handled the most common cause of ENOENT (dir doesn't exist yet), - // then just ignore any ENOENT. - if (er.code === 'ENOENT') { - return didMkdirp ? null : mkdir(dirname(to), { recursive: true }).then(() => - this[_renamePath](from, to, true)) - } else if (er.code === 'EEXIST') { - return rm(to, { recursive: true, force: true }).then(() => moveFile(from, to)) - } else { - throw er - } - }) - } - - [_rollbackRetireShallowNodes] (er) { - process.emit('time', 'reify:rollback:retireShallow') - const moves = this[_retiredPaths] - const movePromises = Object.entries(moves) - .map(([from, to]) => this[_renamePath](to, from)) - return promiseAllRejectLate(movePromises) - // ignore subsequent rollback errors - .catch(er => {}) - .then(() => process.emit('timeEnd', 'reify:rollback:retireShallow')) - .then(() => { - throw er - }) - } - - // adding to the trash list will skip reifying, and delete them - // if they are currently in the tree and otherwise untouched. - [_addOmitsToTrashList] () { - if (!this[_omitDev] && !this[_omitOptional] && !this[_omitPeer]) { - return - } - - process.emit('time', 'reify:trashOmits') - - for (const node of this.idealTree.inventory.values()) { - const { top } = node - - // if the top is not the root or workspace then we do not want to omit it - if (!top.isProjectRoot && !top.isWorkspace) { - continue - } - - // if a diff filter has been created, then we do not omit the node if the - // top node is not in that set - if (this.diff?.filterSet?.size && !this.diff.filterSet.has(top)) { - continue - } - - // omit node if the dep type matches any omit flags that were set - if ( - node.peer && this[_omitPeer] || - node.dev && this[_omitDev] || - node.optional && this[_omitOptional] || - node.devOptional && this[_omitOptional] && this[_omitDev] - ) { - this[_addNodeToTrashList](node) - } - } - - process.emit('timeEnd', 'reify:trashOmits') - } - - [_createSparseTree] () { - process.emit('time', 'reify:createSparse') - // if we call this fn again, we look for the previous list - // so that we can avoid making the same directory multiple times - const leaves = this.diff.leaves - .filter(diff => { - return (diff.action === 'ADD' || diff.action === 'CHANGE') && - !this[_sparseTreeDirs].has(diff.ideal.path) && - !diff.ideal.isLink - }) - .map(diff => diff.ideal) - - // we check this in parallel, so guard against multiple attempts to - // retire the same path at the same time. - const dirsChecked = new Set() - return promiseAllRejectLate(leaves.map(async node => { - for (const d of walkUp(node.path)) { - if (d === node.top.path) { - break - } - if (dirsChecked.has(d)) { - continue - } - dirsChecked.add(d) - const st = await lstat(d).catch(er => null) - // this can happen if we have a link to a package with a name - // that the filesystem treats as if it is the same thing. - // would be nice to have conditional istanbul ignores here... - /* istanbul ignore next - defense in depth */ - if (st && !st.isDirectory()) { - const retired = retirePath(d) - this[_retiredPaths][d] = retired - this[_trashList].add(retired) - await this[_renamePath](d, retired) - } - } - this[_sparseTreeDirs].add(node.path) - const made = await mkdir(node.path, { recursive: true }) - // if the directory already exists, made will be undefined. if that's the case - // we don't want to remove it because we aren't the ones who created it so we - // omit it from the _sparseTreeRoots - if (made) { - this[_sparseTreeRoots].add(made) - } - })) - .then(() => process.emit('timeEnd', 'reify:createSparse')) - } - - [_rollbackCreateSparseTree] (er) { - process.emit('time', 'reify:rollback:createSparse') - // cut the roots of the sparse tree that were created, not the leaves - const roots = this[_sparseTreeRoots] - // also delete the moves that we retired, so that we can move them back - const failures = [] - const targets = [...roots, ...Object.keys(this[_retiredPaths])] - const unlinks = targets - .map(path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er]))) - return promiseAllRejectLate(unlinks).then(() => { - // eslint-disable-next-line promise/always-return - if (failures.length) { - log.warn('cleanup', 'Failed to remove some directories', failures) - } - }) - .then(() => process.emit('timeEnd', 'reify:rollback:createSparse')) - .then(() => this[_rollbackRetireShallowNodes](er)) - } - - // shrinkwrap nodes define their dependency branches with a file, so - // we need to unpack them, read that shrinkwrap file, and then update - // the tree by calling loadVirtual with the node as the root. - [_loadShrinkwrapsAndUpdateTrees] () { - const seen = this[_shrinkwrapInflated] - const shrinkwraps = this.diff.leaves - .filter(d => (d.action === 'CHANGE' || d.action === 'ADD' || !d.action) && - d.ideal.hasShrinkwrap && !seen.has(d.ideal) && - !this[_trashList].has(d.ideal.path)) - - if (!shrinkwraps.length) { - return - } - - process.emit('time', 'reify:loadShrinkwraps') - - const Arborist = this.constructor - return promiseAllRejectLate(shrinkwraps.map(diff => { - const node = diff.ideal - seen.add(node) - return diff.action ? this[_reifyNode](node) : node - })) - .then(nodes => promiseAllRejectLate(nodes.map(node => new Arborist({ - ...this.options, - path: node.path, - }).loadVirtual({ root: node })))) - // reload the diff and sparse tree because the ideal tree changed - .then(() => this[_diffTrees]()) - .then(() => this[_createSparseTree]()) - .then(() => this[_addOmitsToTrashList]()) - .then(() => this[_loadShrinkwrapsAndUpdateTrees]()) - .then(() => process.emit('timeEnd', 'reify:loadShrinkwraps')) - } - - // create a symlink for Links, extract for Nodes - // return the node object, since we usually want that - // handle optional dep failures here - // If node is in trash list, skip it - // If reifying fails, and the node is optional, add it and its optionalSet - // to the trash list - // Always return the node. - [_reifyNode] (node) { - if (this[_trashList].has(node.path)) { - return node - } - - const timer = `reifyNode:${node.location}` - process.emit('time', timer) - this.addTracker('reify', node.name, node.location) - - const { npmVersion, nodeVersion, cpu, os } = this.options - const p = Promise.resolve().then(async () => { - // when we reify an optional node, check the engine and platform - // first. be sure to ignore the --force and --engine-strict flags, - // since we always want to skip any optional packages we can't install. - // these checks throwing will result in a rollback and removal - // of the mismatches - // eslint-disable-next-line promise/always-return - if (node.optional) { - checkEngine(node.package, npmVersion, nodeVersion, false) - checkPlatform(node.package, false, { cpu, os }) - } - await this[_checkBins](node) - await this[_extractOrLink](node) - await this[_warnDeprecated](node) - }) - - return this[_handleOptionalFailure](node, p) - .then(() => { - this.finishTracker('reify', node.name, node.location) - process.emit('timeEnd', timer) - return node - }) - } - - // do not allow node_modules to be a symlink - async [_validateNodeModules] (nm) { - if (this[_force] || this[_nmValidated].has(nm)) { - return - } - const st = await lstat(nm).catch(() => null) - if (!st || st.isDirectory()) { - this[_nmValidated].add(nm) - return - } - log.warn('reify', 'Removing non-directory', nm) - await rm(nm, { recursive: true, force: true }) - } - - async [_extractOrLink] (node) { - const nm = resolve(node.parent.path, 'node_modules') - await this[_validateNodeModules](nm) - - if (!node.isLink) { - // in normal cases, node.resolved should *always* be set by now. - // however, it is possible when a lockfile is damaged, or very old, - // or in some other race condition bugs in npm v6, that a previously - // bundled dependency will have just a version, but no resolved value, - // and no 'bundled: true' setting. - // Do the best with what we have, or else remove it from the tree - // entirely, since we can't possibly reify it. - let res = null - if (node.resolved) { - const registryResolved = this[_registryResolved](node.resolved) - if (registryResolved) { - res = `${node.name}@${registryResolved}` - } - } else if (node.package.name && node.version) { - res = `${node.package.name}@${node.version}` - } - - // no idea what this thing is. remove it from the tree. - if (!res) { - const warning = 'invalid or damaged lockfile detected\n' + - 'please re-try this operation once it completes\n' + - 'so that the damage can be corrected, or perform\n' + - 'a fresh install with no lockfile if the problem persists.' - log.warn('reify', warning) - log.verbose('reify', 'unrecognized node in tree', node.path) - node.parent = null - node.fsParent = null - this[_addNodeToTrashList](node) - return - } - await debug(async () => { - const st = await lstat(node.path).catch(e => null) - if (st && !st.isDirectory()) { - debug.log('unpacking into a non-directory', node) - throw Object.assign(new Error('ENOTDIR: not a directory'), { - code: 'ENOTDIR', - path: node.path, - }) - } - }) - await pacote.extract(res, node.path, { - ...this.options, - resolved: node.resolved, - integrity: node.integrity, - }) - // store nodes don't use Node class so node.package doesn't get updated - if (node.isInStore) { - const pkg = await rpj(join(node.path, 'package.json')) - node.package.scripts = pkg.scripts - } - return - } - - // node.isLink - await rm(node.path, { recursive: true, force: true }) - await this[_symlink](node) - } - - async [_symlink] (node) { - const dir = dirname(node.path) - const target = node.realpath - const rel = relative(dir, target) - await mkdir(dir, { recursive: true }) - return symlink(rel, node.path, 'junction') - } - - [_warnDeprecated] (node) { - const { _id, deprecated } = node.package - if (deprecated) { - log.warn('deprecated', `${_id}: ${deprecated}`) - } - } - - // if the node is optional, then the failure of the promise is nonfatal - // just add it and its optional set to the trash list. - [_handleOptionalFailure] (node, p) { - return (node.optional ? p.catch(er => { - const set = optionalSet(node) - for (node of set) { - log.verbose('reify', 'failed optional dependency', node.path) - this[_addNodeToTrashList](node) - } - }) : p).then(() => node) - } - - [_registryResolved] (resolved) { - // the default registry url is a magic value meaning "the currently - // configured registry". - // `resolved` must never be falsey. - // - // XXX: use a magic string that isn't also a valid value, like - // ${REGISTRY} or something. This has to be threaded through the - // Shrinkwrap and Node classes carefully, so for now, just treat - // the default reg as the magical animal that it has been. - const resolvedURL = hgi.parseUrl(resolved) - - if (!resolvedURL) { - // if we could not parse the url at all then returning nothing - // here means it will get removed from the tree in the next step - return - } - - if ((this.options.replaceRegistryHost === resolvedURL.hostname) - || this.options.replaceRegistryHost === 'always') { - // this.registry always has a trailing slash - return `${this.registry.slice(0, -1)}${resolvedURL.pathname}${resolvedURL.searchParams}` - } - - return resolved - } - - // bundles are *sort of* like shrinkwraps, in that the branch is defined - // by the contents of the package. however, in their case, rather than - // shipping a virtual tree that must be reified, they ship an entire - // reified actual tree that must be unpacked and not modified. - [_loadBundlesAndUpdateTrees] ( - depth = 0, bundlesByDepth = this[_getBundlesByDepth]() - ) { - if (depth === 0) { - process.emit('time', 'reify:loadBundles') - } - - const maxBundleDepth = bundlesByDepth.get('maxBundleDepth') - if (depth > maxBundleDepth) { - // if we did something, then prune the tree and update the diffs - if (maxBundleDepth !== -1) { - this[_pruneBundledMetadeps](bundlesByDepth) - this[_diffTrees]() - } - process.emit('timeEnd', 'reify:loadBundles') - return - } - - // skip any that have since been removed from the tree, eg by a - // shallower bundle overwriting them with a bundled meta-dep. - const set = (bundlesByDepth.get(depth) || []) - .filter(node => node.root === this.idealTree && - node.target !== node.root && - !this[_trashList].has(node.path)) - - if (!set.length) { - return this[_loadBundlesAndUpdateTrees](depth + 1, bundlesByDepth) - } - - // extract all the nodes with bundles - return promiseAllRejectLate(set.map(node => { - this[_bundleUnpacked].add(node) - return this[_reifyNode](node) - })) - // then load their unpacked children and move into the ideal tree - .then(nodes => - promiseAllRejectLate(nodes.map(async node => { - const arb = new this.constructor({ - ...this.options, - path: node.path, - }) - const notTransplanted = new Set(node.children.keys()) - await arb.loadActual({ - root: node, - // don't transplant any sparse folders we created - // loadActual will set node.package to {} for empty directories - // if by chance there are some empty folders in the node_modules - // tree for some other reason, then ok, ignore those too. - transplantFilter: node => { - if (node.package._id) { - // it's actually in the bundle if it gets transplanted - notTransplanted.delete(node.name) - return true - } else { - return false - } - }, - }) - for (const name of notTransplanted) { - this[_bundleMissing].add(node.children.get(name)) - } - }))) - // move onto the next level of bundled items - .then(() => this[_loadBundlesAndUpdateTrees](depth + 1, bundlesByDepth)) - } - - [_getBundlesByDepth] () { - const bundlesByDepth = new Map() - let maxBundleDepth = -1 - dfwalk({ - tree: this.diff, - visit: diff => { - const node = diff.ideal - if (!node) { - return - } - if (node.isProjectRoot) { - return - } - - const { bundleDependencies } = node.package - if (bundleDependencies && bundleDependencies.length) { - maxBundleDepth = Math.max(maxBundleDepth, node.depth) - if (!bundlesByDepth.has(node.depth)) { - bundlesByDepth.set(node.depth, [node]) - } else { - bundlesByDepth.get(node.depth).push(node) - } - } - }, - getChildren: diff => diff.children, - }) - - bundlesByDepth.set('maxBundleDepth', maxBundleDepth) - return bundlesByDepth - } - - // https://github.com/npm/cli/issues/1597#issuecomment-667639545 - [_pruneBundledMetadeps] (bundlesByDepth) { - const bundleShadowed = new Set() - - // Example dep graph: - // root -> (a, c) - // a -> BUNDLE(b) - // b -> c - // c -> b - // - // package tree: - // root - // +-- a - // | +-- b(1) - // | +-- c(1) - // +-- b(2) - // +-- c(2) - // 1. mark everything that's shadowed by anything in the bundle. This - // marks b(2) and c(2). - // 2. anything with edgesIn from outside the set, mark not-extraneous, - // remove from set. This unmarks c(2). - // 3. continue until no change - // 4. remove everything in the set from the tree. b(2) is pruned - - // create the list of nodes shadowed by children of bundlers - for (const bundles of bundlesByDepth.values()) { - // skip the 'maxBundleDepth' item - if (!Array.isArray(bundles)) { - continue - } - for (const node of bundles) { - for (const name of node.children.keys()) { - const shadow = node.parent.resolve(name) - if (!shadow) { - continue - } - bundleShadowed.add(shadow) - shadow.extraneous = true - } - } - } - - // lib -> (a@1.x) BUNDLE(a@1.2.3 (b@1.2.3)) - // a@1.2.3 -> (b@1.2.3) - // a@1.3.0 -> (b@2) - // b@1.2.3 -> () - // b@2 -> (c@2) - // - // root - // +-- lib - // | +-- a@1.2.3 - // | +-- b@1.2.3 - // +-- b@2 <-- shadowed, now extraneous - // +-- c@2 <-- also shadowed, because only dependent is shadowed - for (const shadow of bundleShadowed) { - for (const shadDep of shadow.edgesOut.values()) { - /* istanbul ignore else - pretty unusual situation, just being - * defensive here. Would mean that a bundled dep has a dependency - * that is unmet. which, weird, but if you bundle it, we take - * whatever you put there and assume the publisher knows best. */ - if (shadDep.to) { - bundleShadowed.add(shadDep.to) - shadDep.to.extraneous = true - } - } - } - - let changed - do { - changed = false - for (const shadow of bundleShadowed) { - for (const edge of shadow.edgesIn) { - if (!bundleShadowed.has(edge.from)) { - shadow.extraneous = false - bundleShadowed.delete(shadow) - changed = true - break - } - } - } - } while (changed) - - for (const shadow of bundleShadowed) { - this[_addNodeToTrashList](shadow) - shadow.root = null - } - } - - async [_submitQuickAudit] () { - if (this.options.audit === false) { - this.auditReport = null - return - } - - // we submit the quick audit at this point in the process, as soon as - // we have all the deps resolved, so that it can overlap with the other - // actions as much as possible. Stash the promise, which we resolve - // before finishing the reify() and returning the tree. Thus, we do - // NOT return the promise, as the intent is for this to run in parallel - // with the reification, and be resolved at a later time. - process.emit('time', 'reify:audit') - const options = { ...this.options } - const tree = this.idealTree - - // if we're operating on a workspace, only audit the workspace deps - if (this[_workspaces] && this[_workspaces].length) { - options.filterSet = this.workspaceDependencySet( - tree, - this[_workspaces], - this[_includeWorkspaceRoot] - ) - } - - this.auditReport = AuditReport.load(tree, options).then(res => { - process.emit('timeEnd', 'reify:audit') - return res - }) - } - - // ok! actually unpack stuff into their target locations! - // The sparse tree has already been created, so we walk the diff - // kicking off each unpack job. If any fail, we rm the sparse - // tree entirely and try to put everything back where it was. - [_unpackNewModules] () { - process.emit('time', 'reify:unpack') - const unpacks = [] - dfwalk({ - tree: this.diff, - visit: diff => { - // no unpacking if we don't want to change this thing - if (diff.action !== 'CHANGE' && diff.action !== 'ADD') { - return - } - - const node = diff.ideal - const bd = this[_bundleUnpacked].has(node) - const sw = this[_shrinkwrapInflated].has(node) - const bundleMissing = this[_bundleMissing].has(node) - - // check whether we still need to unpack this one. - // test the inDepBundle last, since that's potentially a tree walk. - const doUnpack = node && // can't unpack if removed! - // root node already exists - !node.isRoot && - // already unpacked to read bundle - !bd && - // already unpacked to read sw - !sw && - // already unpacked by another dep's bundle - (bundleMissing || !node.inDepBundle) - - if (doUnpack) { - unpacks.push(this[_reifyNode](node)) - } - }, - getChildren: diff => diff.children, - }) - return promiseAllRejectLate(unpacks) - .then(() => process.emit('timeEnd', 'reify:unpack')) - } - - // This is the part where we move back the unchanging nodes that were - // the children of a node that did change. If this fails, the rollback - // is a three-step process. First, we try to move the retired unchanged - // nodes BACK to their retirement folders, then delete the sparse tree, - // then move everything out of retirement. - [_moveBackRetiredUnchanged] () { - // get a list of all unchanging children of any shallow retired nodes - // if they are not the ancestor of any node in the diff set, then the - // directory won't already exist, so just rename it over. - // This is sort of an inverse diff tree, of all the nodes where - // the actualTree and idealTree _don't_ differ, starting from the - // shallowest nodes that we moved aside in the first place. - process.emit('time', 'reify:unretire') - const moves = this[_retiredPaths] - this[_retiredUnchanged] = {} - return promiseAllRejectLate(this.diff.children.map(diff => { - // skip if nothing was retired - if (diff.action !== 'CHANGE' && diff.action !== 'REMOVE') { - return - } - - const { path: realFolder } = diff.actual - const retireFolder = moves[realFolder] - /* istanbul ignore next - should be impossible */ - debug(() => { - if (!retireFolder) { - const er = new Error('trying to un-retire but not retired') - throw Object.assign(er, { - realFolder, - retireFolder, - actual: diff.actual, - ideal: diff.ideal, - action: diff.action, - }) - } - }) - - this[_retiredUnchanged][retireFolder] = [] - return promiseAllRejectLate(diff.unchanged.map(node => { - // no need to roll back links, since we'll just delete them anyway - if (node.isLink) { - return mkdir(dirname(node.path), { recursive: true, force: true }) - .then(() => this[_reifyNode](node)) - } - - // will have been moved/unpacked along with bundler - if (node.inDepBundle && !this[_bundleMissing].has(node)) { - return - } - - this[_retiredUnchanged][retireFolder].push(node) - - const rel = relative(realFolder, node.path) - const fromPath = resolve(retireFolder, rel) - // if it has bundleDependencies, then make node_modules. otherwise - // skip it. - const bd = node.package.bundleDependencies - const dir = bd && bd.length ? node.path + '/node_modules' : node.path - return mkdir(dir, { recursive: true }).then(() => this[_moveContents](node, fromPath)) - })) - })) - .then(() => process.emit('timeEnd', 'reify:unretire')) - } - - // move the contents from the fromPath to the node.path - [_moveContents] (node, fromPath) { - return packageContents({ - path: fromPath, - depth: 1, - packageJsonCache: new Map([[fromPath + '/package.json', node.package]]), - }).then(res => promiseAllRejectLate(res.map(path => { - const rel = relative(fromPath, path) - const to = resolve(node.path, rel) - return this[_renamePath](path, to) - }))) - } - - [_rollbackMoveBackRetiredUnchanged] (er) { - const moves = this[_retiredPaths] - // flip the mapping around to go back - const realFolders = new Map(Object.entries(moves).map(([k, v]) => [v, k])) - const promises = Object.entries(this[_retiredUnchanged]) - .map(([retireFolder, nodes]) => promiseAllRejectLate(nodes.map(node => { - const realFolder = realFolders.get(retireFolder) - const rel = relative(realFolder, node.path) - const fromPath = resolve(retireFolder, rel) - return this[_moveContents]({ ...node, path: fromPath }, node.path) - }))) - return promiseAllRejectLate(promises) - .then(() => this[_rollbackCreateSparseTree](er)) - } - - [_build] () { - process.emit('time', 'reify:build') - - // for all the things being installed, run their appropriate scripts - // run in tip->root order, so as to be more likely to build a node's - // deps before attempting to build it itself - const nodes = [] - dfwalk({ - tree: this.diff, - leave: diff => { - if (!diff.ideal.isProjectRoot) { - nodes.push(diff.ideal) - } - }, - // process adds before changes, ignore removals - getChildren: diff => diff && diff.children, - filter: diff => diff.action === 'ADD' || diff.action === 'CHANGE', - }) - - // pick up link nodes from the unchanged list as we want to run their - // scripts in every install despite of having a diff status change - for (const node of this.diff.unchanged) { - const tree = node.root.target - - // skip links that only live within node_modules as they are most - // likely managed by packages we installed, we only want to rebuild - // unchanged links we directly manage - const linkedFromRoot = node.parent === tree || node.target.fsTop === tree - if (node.isLink && linkedFromRoot) { - nodes.push(node) - } - } - - return this.rebuild({ nodes, handleOptionalFailure: true }) - .then(() => process.emit('timeEnd', 'reify:build')) - } - - // the tree is pretty much built now, so it's cleanup time. - // remove the retired folders, and any deleted nodes - // If this fails, there isn't much we can do but tell the user about it. - // Thankfully, it's pretty unlikely that it'll fail, since rm is a node builtin. - async [_removeTrash] () { - process.emit('time', 'reify:trash') - const promises = [] - const failures = [] - const _rm = path => rm(path, { recursive: true, force: true }).catch(er => failures.push([path, er])) - - for (const path of this[_trashList]) { - promises.push(_rm(path)) - } - - await promiseAllRejectLate(promises) - if (failures.length) { - log.warn('cleanup', 'Failed to remove some directories', failures) - } - process.emit('timeEnd', 'reify:trash') - } - - // last but not least, we save the ideal tree metadata to the package-lock - // or shrinkwrap file, and any additions or removals to package.json - async [_saveIdealTree] (options) { - // the ideal tree is actualized now, hooray! - // it still contains all the references to optional nodes that were removed - // for install failures. Those still end up in the shrinkwrap, so we - // save it first, then prune out the optional trash, and then return it. - - const save = !(options.save === false) - - // we check for updates in order to make sure we run save ideal tree - // even though save=false since we want `npm update` to be able to - // write to package-lock files by default - const hasUpdates = this[_updateAll] || this[_updateNames].length - - // we're going to completely skip save ideal tree in case of a global or - // dry-run install and also if the save option is set to false, EXCEPT for - // update since the expected behavior for npm7+ is for update to - // NOT save to package.json, we make that exception since we still want - // saveIdealTree to be able to write the lockfile by default. - const saveIdealTree = !( - (!save && !hasUpdates) - || this[_global] - || this[_dryRun] - ) - - if (!saveIdealTree) { - return false - } - - process.emit('time', 'reify:save') - - const updatedTrees = new Set() - const updateNodes = nodes => { - for (const { name, tree: addTree } of nodes) { - // addTree either the root, or a workspace - const edge = addTree.edgesOut.get(name) - const pkg = addTree.package - const req = npa.resolve(name, edge.spec, addTree.realpath) - const { rawSpec, subSpec } = req - - const spec = subSpec ? subSpec.rawSpec : rawSpec - const child = edge.to - - // if we tried to install an optional dep, but it was a version - // that we couldn't resolve, this MAY be missing. if we haven't - // blown up by now, it's because it was not a problem, though, so - // just move on. - if (!child || !addTree.isTop) { - continue - } - - let newSpec - // True if the dependency is getting installed from a local file path - // In this case it is not possible to do the normal version comparisons - // as the new version will be a file path - const isLocalDep = req.type === 'directory' || req.type === 'file' - if (req.registry) { - const version = child.version - const prefixRange = version ? this[_savePrefix] + version : '*' - // if we installed a range, then we save the range specified - // if it is not a subset of the ^x.y.z. eg, installing a range - // of `1.x <1.2.3` will not be saved as `^1.2.0`, because that - // would allow versions outside the requested range. Tags and - // specific versions save with the save-prefix. - const isRange = (subSpec || req).type === 'range' - - let range = spec - if ( - !isRange || - spec === '*' || - subset(prefixRange, spec, { loose: true }) - ) { - range = prefixRange - } - - const pname = child.packageName - const alias = name !== pname - newSpec = alias ? `npm:${pname}@${range}` : range - } else if (req.hosted) { - // save the git+https url if it has auth, otherwise shortcut - const h = req.hosted - const opt = { noCommittish: false } - if (h.https && h.auth) { - newSpec = `git+${h.https(opt)}` - } else { - newSpec = h.shortcut(opt) - } - } else if (isLocalDep) { - // when finding workspace nodes, make sure that - // we save them using their version instead of - // using their relative path - if (edge.type === 'workspace') { - const { version } = edge.to.target - const prefixRange = version ? this[_savePrefix] + version : '*' - newSpec = prefixRange - } else { - // save the relative path in package.json - // Normally saveSpec is updated with the proper relative - // path already, but it's possible to specify a full absolute - // path initially, in which case we can end up with the wrong - // thing, so just get the ultimate fetchSpec and relativize it. - const p = req.fetchSpec.replace(/^file:/, '') - const rel = relpath(addTree.realpath, p).replace(/#/g, '%23') - newSpec = `file:${rel}` - } - } else { - newSpec = req.saveSpec - } - - if (options.saveType) { - const depType = saveTypeMap.get(options.saveType) - pkg[depType][name] = newSpec - // rpj will have moved it here if it was in both - // if it is empty it will be deleted later - if (options.saveType === 'prod' && pkg.optionalDependencies) { - delete pkg.optionalDependencies[name] - } - } else { - if (hasSubKey(pkg, 'dependencies', name)) { - pkg.dependencies[name] = newSpec - } - - if (hasSubKey(pkg, 'devDependencies', name)) { - pkg.devDependencies[name] = newSpec - // don't update peer or optional if we don't have to - if (hasSubKey(pkg, 'peerDependencies', name) && (isLocalDep || !intersects(newSpec, pkg.peerDependencies[name]))) { - pkg.peerDependencies[name] = newSpec - } - - if (hasSubKey(pkg, 'optionalDependencies', name) && (isLocalDep || !intersects(newSpec, pkg.optionalDependencies[name]))) { - pkg.optionalDependencies[name] = newSpec - } - } else { - if (hasSubKey(pkg, 'peerDependencies', name)) { - pkg.peerDependencies[name] = newSpec - } - - if (hasSubKey(pkg, 'optionalDependencies', name)) { - pkg.optionalDependencies[name] = newSpec - } - } - } - - updatedTrees.add(addTree) - } - } - - // Returns true if any of the edges from this node has a semver - // range definition that is an exact match to the version installed - // e.g: should return true if for a given an installed version 1.0.0, - // range is either =1.0.0 or 1.0.0 - const exactVersion = node => { - for (const edge of node.edgesIn) { - try { - if (semver.subset(edge.spec, node.version)) { - return false - } - } catch { - // ignore errors - } - } - return true - } - - // helper that retrieves an array of nodes that were - // potentially updated during the reify process, in order - // to limit the number of nodes to check and update, only - // select nodes from the inventory that are direct deps - // of a given package.json (project root or a workspace) - // and in ase of using a list of `names`, restrict nodes - // to only names that are found in this list - const retrieveUpdatedNodes = names => { - const filterDirectDependencies = node => - !node.isRoot && node.resolveParent && node.resolveParent.isRoot - && (!names || names.includes(node.name)) - && exactVersion(node) // skip update for exact ranges - - const directDeps = this.idealTree.inventory - .filter(filterDirectDependencies) - - // traverses the list of direct dependencies and collect all nodes - // to be updated, since any of them might have changed during reify - const nodes = [] - for (const node of directDeps) { - for (const edgeIn of node.edgesIn) { - nodes.push({ - name: node.name, - tree: edgeIn.from.target, - }) - } - } - return nodes - } - - if (save) { - // when using update all alongside with save, we'll make - // sure to refresh every dependency of the root idealTree - if (this[_updateAll]) { - const nodes = retrieveUpdatedNodes() - updateNodes(nodes) - } else { - // resolvedAdd is the list of user add requests, but with names added - // to things like git repos and tarball file/urls. However, if the - // user requested 'foo@', and we have a foo@file:../foo, then we should - // end up saving the spec we actually used, not whatever they gave us. - if (this[_resolvedAdd].length) { - updateNodes(this[_resolvedAdd]) - } - - // if updating given dependencies by name, restrict the list of - // nodes to check to only those currently in _updateNames - if (this[_updateNames].length) { - const nodes = retrieveUpdatedNodes(this[_updateNames]) - updateNodes(nodes) - } - - // grab any from explicitRequests that had deps removed - for (const { from: tree } of this.explicitRequests) { - updatedTrees.add(tree) - } - } - } - - if (save) { - for (const tree of updatedTrees) { - // refresh the edges so they have the correct specs - tree.package = tree.package - const pkgJson = await PackageJson.load(tree.path, { create: true }) - const { - dependencies = {}, - devDependencies = {}, - optionalDependencies = {}, - peerDependencies = {}, - // bundleDependencies is not required by PackageJson like the other - // fields here PackageJson also doesn't omit an empty array for this - // field so defaulting this to an empty array would add that field to - // every package.json file. - bundleDependencies, - } = tree.package - - pkgJson.update({ - dependencies, - devDependencies, - optionalDependencies, - peerDependencies, - bundleDependencies, - }) - await pkgJson.save() - } - } - - // before now edge specs could be changing, affecting the `requires` field - // in the package lock, so we hold off saving to the very last action - if (this[_usePackageLock]) { - // preserve indentation, if possible - let format = this.idealTree.package[Symbol.for('indent')] - if (format === undefined) { - format = ' ' - } - - // TODO this ignores options.save - await this.idealTree.meta.save({ - format: (this[_formatPackageLock] && format) ? format - : this[_formatPackageLock], - }) - } - - process.emit('timeEnd', 'reify:save') - return true - } - - async [_copyIdealToActual] () { - // clean up any trash that is still in the tree - for (const path of this[_trashList]) { - const loc = relpath(this.idealTree.realpath, path) - const node = this.idealTree.inventory.get(loc) - if (node && node.root === this.idealTree) { - node.parent = null - } - } - - // if we filtered to only certain nodes, then anything ELSE needs - // to be untouched in the resulting actual tree, even if it differs - // in the idealTree. Copy over anything that was in the actual and - // was not changed, delete anything in the ideal and not actual. - // Then we move the entire idealTree over to this.actualTree, and - // save the hidden lockfile. - if (this.diff && this.diff.filterSet.size) { - const reroot = new Set() - - const { filterSet } = this.diff - const seen = new Set() - for (const [loc, ideal] of this.idealTree.inventory.entries()) { - seen.add(loc) - - // if it's an ideal node from the filter set, then skip it - // because we already made whatever changes were necessary - if (filterSet.has(ideal)) { - continue - } - - // otherwise, if it's not in the actualTree, then it's not a thing - // that we actually added. And if it IS in the actualTree, then - // it's something that we left untouched, so we need to record - // that. - const actual = this.actualTree.inventory.get(loc) - if (!actual) { - ideal.root = null - } else { - if ([...actual.linksIn].some(link => filterSet.has(link))) { - seen.add(actual.location) - continue - } - const { realpath, isLink } = actual - if (isLink && ideal.isLink && ideal.realpath === realpath) { - continue - } else { - reroot.add(actual) - } - } - } - - // now find any actual nodes that may not be present in the ideal - // tree, but were left behind by virtue of not being in the filter - for (const [loc, actual] of this.actualTree.inventory.entries()) { - if (seen.has(loc)) { - continue - } - seen.add(loc) - - // we know that this is something that ISN'T in the idealTree, - // or else we will have addressed it in the previous loop. - // If it's in the filterSet, that means we intentionally removed - // it, so nothing to do here. - if (filterSet.has(actual)) { - continue - } - - reroot.add(actual) - } - - // go through the rerooted actual nodes, and move them over. - for (const actual of reroot) { - actual.root = this.idealTree - } - - // prune out any tops that lack a linkIn, they are no longer relevant. - for (const top of this.idealTree.tops) { - if (top.linksIn.size === 0) { - top.root = null - } - } - - // need to calculate dep flags, since nodes may have been marked - // as extraneous or otherwise incorrect during transit. - calcDepFlags(this.idealTree) - } - - // save the ideal's meta as a hidden lockfile after we actualize it - this.idealTree.meta.filename = - this.idealTree.realpath + '/node_modules/.package-lock.json' - this.idealTree.meta.hiddenLockfile = true - this.idealTree.meta.lockfileVersion = defaultLockfileVersion - - this.actualTree = this.idealTree - this.idealTree = null - - if (!this[_global]) { - await this.actualTree.meta.save() - const ignoreScripts = !!this.options.ignoreScripts - // if we aren't doing a dry run or ignoring scripts and we actually made changes to the dep - // tree, then run the dependencies scripts - if (!this[_dryRun] && !ignoreScripts && this.diff && this.diff.children.length) { - const { path, package: pkg } = this.actualTree.target - const stdio = this.options.foregroundScripts ? 'inherit' : 'pipe' - const { scripts = {} } = pkg - for (const event of ['predependencies', 'dependencies', 'postdependencies']) { - if (Object.prototype.hasOwnProperty.call(scripts, event)) { - const timer = `reify:run:${event}` - process.emit('time', timer) - log.info('run', pkg._id, event, scripts[event]) - await runScript({ - event, - path, - pkg, - stdio, - scriptShell: this.options.scriptShell, - }) - process.emit('timeEnd', timer) - } - } - } - } - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js deleted file mode 100644 index 27a1270..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/set-workspaces.js +++ /dev/null @@ -1,19 +0,0 @@ -const mapWorkspaces = require('@npmcli/map-workspaces') - -// shared ref used by other mixins/Arborist -const _setWorkspaces = Symbol.for('setWorkspaces') - -module.exports = cls => class MapWorkspaces extends cls { - async [_setWorkspaces] (node) { - const workspaces = await mapWorkspaces({ - cwd: node.path, - pkg: node.package, - }) - - if (node && workspaces.size) { - node.workspaces = workspaces - } - - return node - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js deleted file mode 100644 index 387919f..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/audit-report.js +++ /dev/null @@ -1,414 +0,0 @@ -// an object representing the set of vulnerabilities in a tree -/* eslint camelcase: "off" */ - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const npa = require('npm-package-arg') -const pickManifest = require('npm-pick-manifest') - -const Vuln = require('./vuln.js') -const Calculator = require('@npmcli/metavuln-calculator') - -const _getReport = Symbol('getReport') -const _fixAvailable = Symbol('fixAvailable') -const _checkTopNode = Symbol('checkTopNode') -const _init = Symbol('init') -const _omit = Symbol('omit') -const log = require('proc-log') - -const fetch = require('npm-registry-fetch') - -class AuditReport extends Map { - static load (tree, opts) { - return new AuditReport(tree, opts).run() - } - - get auditReportVersion () { - return 2 - } - - toJSON () { - const obj = { - auditReportVersion: this.auditReportVersion, - vulnerabilities: {}, - metadata: { - vulnerabilities: { - info: 0, - low: 0, - moderate: 0, - high: 0, - critical: 0, - total: this.size, - }, - dependencies: { - prod: 0, - dev: 0, - optional: 0, - peer: 0, - peerOptional: 0, - total: this.tree.inventory.size - 1, - }, - }, - } - - for (const node of this.tree.inventory.values()) { - const { dependencies } = obj.metadata - let prod = true - for (const type of [ - 'dev', - 'optional', - 'peer', - 'peerOptional', - ]) { - if (node[type]) { - dependencies[type]++ - prod = false - } - } - if (prod) { - dependencies.prod++ - } - } - - // if it doesn't have any topVulns, then it's fixable with audit fix - // for each topVuln, figure out if it's fixable with audit fix --force, - // or if we have to just delete the thing, and if the fix --force will - // require a semver major update. - const vulnerabilities = [] - for (const [name, vuln] of this.entries()) { - vulnerabilities.push([name, vuln.toJSON()]) - obj.metadata.vulnerabilities[vuln.severity]++ - } - - obj.vulnerabilities = vulnerabilities - .sort(([a], [b]) => localeCompare(a, b)) - .reduce((set, [name, vuln]) => { - set[name] = vuln - return set - }, {}) - - return obj - } - - constructor (tree, opts = {}) { - super() - const { omit } = opts - this[_omit] = new Set(omit || []) - this.topVulns = new Map() - - this.calculator = new Calculator(opts) - this.error = null - this.options = opts - this.tree = tree - this.filterSet = opts.filterSet - } - - async run () { - this.report = await this[_getReport]() - log.silly('audit report', this.report) - if (this.report) { - await this[_init]() - } - return this - } - - isVulnerable (node) { - const vuln = this.get(node.packageName) - return !!(vuln && vuln.isVulnerable(node)) - } - - async [_init] () { - process.emit('time', 'auditReport:init') - - const promises = [] - for (const [name, advisories] of Object.entries(this.report)) { - for (const advisory of advisories) { - promises.push(this.calculator.calculate(name, advisory)) - } - } - - // now the advisories are calculated with a set of versions - // and the packument. turn them into our style of vuln objects - // which also have the affected nodes, and also create entries - // for all the metavulns that we find from dependents. - const advisories = new Set(await Promise.all(promises)) - const seen = new Set() - for (const advisory of advisories) { - const { name, range } = advisory - const k = `${name}@${range}` - - const vuln = this.get(name) || new Vuln({ name, advisory }) - if (this.has(name)) { - vuln.addAdvisory(advisory) - } - super.set(name, vuln) - - // don't flag the exact same name/range more than once - // adding multiple advisories with the same range is fine, but no - // need to search for nodes we already would have added. - if (!seen.has(k)) { - const p = [] - for (const node of this.tree.inventory.query('packageName', name)) { - if (!shouldAudit(node, this[_omit], this.filterSet)) { - continue - } - - // if not vulnerable by this advisory, keep searching - if (!advisory.testVersion(node.version)) { - continue - } - - // we will have loaded the source already if this is a metavuln - if (advisory.type === 'metavuln') { - vuln.addVia(this.get(advisory.dependency)) - } - - // already marked this one, no need to do it again - if (vuln.nodes.has(node)) { - continue - } - - // haven't marked this one yet. get its dependents. - vuln.nodes.add(node) - for (const { from: dep, spec } of node.edgesIn) { - if (dep.isTop && !vuln.topNodes.has(dep)) { - this[_checkTopNode](dep, vuln, spec) - } else { - // calculate a metavuln, if necessary - const calc = this.calculator.calculate(dep.packageName, advisory) - // eslint-disable-next-line promise/always-return - p.push(calc.then(meta => { - // eslint-disable-next-line promise/always-return - if (meta.testVersion(dep.version, spec)) { - advisories.add(meta) - } - })) - } - } - } - await Promise.all(p) - seen.add(k) - } - - // make sure we actually got something. if not, remove it - // this can happen if you are loading from a lockfile created by - // npm v5, since it lists the current version of all deps, - // rather than the range that is actually depended upon, - // or if using --omit with the older audit endpoint. - if (this.get(name).nodes.size === 0) { - this.delete(name) - continue - } - - // if the vuln is valid, but THIS advisory doesn't apply to any of - // the nodes it references, then remove it from the advisory list. - // happens when using omit with old audit endpoint. - for (const advisory of vuln.advisories) { - const relevant = [...vuln.nodes] - .some(n => advisory.testVersion(n.version)) - if (!relevant) { - vuln.deleteAdvisory(advisory) - } - } - } - process.emit('timeEnd', 'auditReport:init') - } - - [_checkTopNode] (topNode, vuln, spec) { - vuln.fixAvailable = this[_fixAvailable](topNode, vuln, spec) - - if (vuln.fixAvailable !== true) { - // now we know the top node is vulnerable, and cannot be - // upgraded out of the bad place without --force. But, there's - // no need to add it to the actual vulns list, because nothing - // depends on root. - this.topVulns.set(vuln.name, vuln) - vuln.topNodes.add(topNode) - } - } - - // check whether the top node is vulnerable. - // check whether we can get out of the bad place with --force, and if - // so, whether that update is SemVer Major - [_fixAvailable] (topNode, vuln, spec) { - // this will always be set to at least {name, versions:{}} - const paku = vuln.packument - - if (!vuln.testSpec(spec)) { - return true - } - - // similarly, even if we HAVE a packument, but we're looking for it - // somewhere other than the registry, and we got something vulnerable, - // then we're stuck with it. - const specObj = npa(spec) - if (!specObj.registry) { - return false - } - - if (specObj.subSpec) { - spec = specObj.subSpec.rawSpec - } - - // We don't provide fixes for top nodes other than root, but we - // still check to see if the node is fixable with a different version, - // and if that is a semver major bump. - try { - const { - _isSemVerMajor: isSemVerMajor, - version, - name, - } = pickManifest(paku, spec, { - ...this.options, - before: null, - avoid: vuln.range, - avoidStrict: true, - }) - return { name, version, isSemVerMajor } - } catch (er) { - return false - } - } - - set () { - throw new Error('do not call AuditReport.set() directly') - } - - // convert a quick-audit into a bulk advisory listing - static auditToBulk (report) { - if (!report.advisories) { - // tack on the report json where the response body would go - throw Object.assign(new Error('Invalid advisory report'), { - body: JSON.stringify(report), - }) - } - - const bulk = {} - const { advisories } = report - for (const advisory of Object.values(advisories)) { - const { - id, - url, - title, - severity = 'high', - vulnerable_versions = '*', - module_name: name, - } = advisory - bulk[name] = bulk[name] || [] - bulk[name].push({ id, url, title, severity, vulnerable_versions }) - } - - return bulk - } - - async [_getReport] () { - // if we're not auditing, just return false - if (this.options.audit === false || this.options.offline === true || this.tree.inventory.size === 1) { - return null - } - - process.emit('time', 'auditReport:getReport') - try { - try { - // first try the super fast bulk advisory listing - const body = prepareBulkData(this.tree, this[_omit], this.filterSet) - log.silly('audit', 'bulk request', body) - - // no sense asking if we don't have anything to audit, - // we know it'll be empty - if (!Object.keys(body).length) { - return null - } - - const res = await fetch('/-/npm/v1/security/advisories/bulk', { - ...this.options, - registry: this.options.auditRegistry || this.options.registry, - method: 'POST', - gzip: true, - body, - }) - - return await res.json() - } catch (er) { - log.silly('audit', 'bulk request failed', String(er.body)) - // that failed, try the quick audit endpoint - const body = prepareData(this.tree, this.options) - const res = await fetch('/-/npm/v1/security/audits/quick', { - ...this.options, - registry: this.options.auditRegistry || this.options.registry, - method: 'POST', - gzip: true, - body, - }) - return AuditReport.auditToBulk(await res.json()) - } - } catch (er) { - log.verbose('audit error', er) - log.silly('audit error', String(er.body)) - this.error = er - return null - } finally { - process.emit('timeEnd', 'auditReport:getReport') - } - } -} - -// return true if we should audit this one -const shouldAudit = (node, omit, filterSet) => - !node.version ? false - : node.isRoot ? false - : filterSet && filterSet.size !== 0 && !filterSet.has(node) ? false - : omit.size === 0 ? true - : !( // otherwise, just ensure we're not omitting this one - node.dev && omit.has('dev') || - node.optional && omit.has('optional') || - node.devOptional && omit.has('dev') && omit.has('optional') || - node.peer && omit.has('peer') - ) - -const prepareBulkData = (tree, omit, filterSet) => { - const payload = {} - for (const name of tree.inventory.query('packageName')) { - const set = new Set() - for (const node of tree.inventory.query('packageName', name)) { - if (!shouldAudit(node, omit, filterSet)) { - continue - } - - set.add(node.version) - } - if (set.size) { - payload[name] = [...set] - } - } - return payload -} - -const prepareData = (tree, opts) => { - const { npmVersion: npm_version } = opts - const node_version = process.version - const { platform, arch } = process - const { NODE_ENV: node_env } = process.env - const data = tree.meta.commit() - // the legacy audit endpoint doesn't support any kind of pre-filtering - // we just have to get the advisories and skip over them in the report - return { - name: data.name, - version: data.version, - requires: { - ...(tree.package.devDependencies || {}), - ...(tree.package.peerDependencies || {}), - ...(tree.package.optionalDependencies || {}), - ...(tree.package.dependencies || {}), - }, - dependencies: data.dependencies, - metadata: { - node_version, - npm_version, - platform, - arch, - node_env, - }, - } -} - -module.exports = AuditReport diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js deleted file mode 100644 index 45ed956..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js +++ /dev/null @@ -1,119 +0,0 @@ -const { depth } = require('treeverse') - -const calcDepFlags = (tree, resetRoot = true) => { - if (resetRoot) { - tree.dev = false - tree.optional = false - tree.devOptional = false - tree.peer = false - } - const ret = depth({ - tree, - visit: node => calcDepFlagsStep(node), - filter: node => node, - getChildren: (node, tree) => - [...tree.edgesOut.values()].map(edge => edge.to), - }) - return ret -} - -const calcDepFlagsStep = (node) => { - // This rewalk is necessary to handle cases where devDep and optional - // or normal dependency graphs overlap deep in the dep graph. - // Since we're only walking through deps that are not already flagged - // as non-dev/non-optional, it's typically a very shallow traversal - node.extraneous = false - resetParents(node, 'extraneous') - resetParents(node, 'dev') - resetParents(node, 'peer') - resetParents(node, 'devOptional') - resetParents(node, 'optional') - - // for links, map their hierarchy appropriately - if (node.isLink) { - node.target.dev = node.dev - node.target.optional = node.optional - node.target.devOptional = node.devOptional - node.target.peer = node.peer - return calcDepFlagsStep(node.target) - } - - node.edgesOut.forEach(({ peer, optional, dev, to }) => { - // if the dep is missing, then its flags are already maximally unset - if (!to) { - return - } - - // everything with any kind of edge into it is not extraneous - to.extraneous = false - - // devOptional is the *overlap* of the dev and optional tree. - // however, for convenience and to save an extra rewalk, we leave - // it set when we are in *either* tree, and then omit it from the - // package-lock if either dev or optional are set. - const unsetDevOpt = !node.devOptional && !node.dev && !node.optional && !dev && !optional - - // if we are not in the devOpt tree, then we're also not in - // either the dev or opt trees - const unsetDev = unsetDevOpt || !node.dev && !dev - const unsetOpt = unsetDevOpt || !node.optional && !optional - const unsetPeer = !node.peer && !peer - - if (unsetPeer) { - unsetFlag(to, 'peer') - } - - if (unsetDevOpt) { - unsetFlag(to, 'devOptional') - } - - if (unsetDev) { - unsetFlag(to, 'dev') - } - - if (unsetOpt) { - unsetFlag(to, 'optional') - } - }) - - return node -} - -const resetParents = (node, flag) => { - if (node[flag]) { - return - } - - for (let p = node; p && (p === node || p[flag]); p = p.resolveParent) { - p[flag] = false - } -} - -// typically a short walk, since it only traverses deps that have the flag set. -const unsetFlag = (node, flag) => { - if (node[flag]) { - node[flag] = false - depth({ - tree: node, - visit: node => { - node.extraneous = node[flag] = false - if (node.isLink) { - node.target.extraneous = node.target[flag] = false - } - }, - getChildren: node => { - const children = [] - for (const edge of node.target.edgesOut.values()) { - if (edge.to && edge.to[flag] && - (flag !== 'peer' && edge.type === 'peer' || edge.type === 'prod') - ) { - children.push(edge.to) - } - } - return children - }, - }) - } -} - -module.exports = calcDepFlags diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js deleted file mode 100644 index 1a3ccff..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js +++ /dev/null @@ -1,436 +0,0 @@ -// Internal methods used by buildIdealTree. -// Answer the question: "can I put this dep here?" -// -// IMPORTANT: *nothing* in this class should *ever* modify or mutate the tree -// at all. The contract here is strictly limited to read operations. We call -// this in the process of walking through the ideal tree checking many -// different potential placement targets for a given node. If a change is made -// to the tree along the way, that can cause serious problems! -// -// In order to enforce this restriction, in debug mode, canPlaceDep() will -// snapshot the tree at the start of the process, and then at the end, will -// verify that it still matches the snapshot, and throw an error if any changes -// occurred. -// -// The algorithm is roughly like this: -// - check the node itself: -// - if there is no version present, and no conflicting edges from target, -// OK, provided all peers can be placed at or above the target. -// - if the current version matches, KEEP -// - if there is an older version present, which can be replaced, then -// - if satisfying and preferDedupe? KEEP -// - else: REPLACE -// - if there is a newer version present, and preferDedupe, REPLACE -// - if the version present satisfies the edge, KEEP -// - else: CONFLICT -// - if the node is not in conflict, check each of its peers: -// - if the peer can be placed in the target, continue -// - else if the peer can be placed in a parent, and there is no other -// conflicting version shadowing it, continue -// - else CONFLICT -// - If the peers are not in conflict, return the original node's value -// -// An exception to this logic is that if the target is the deepest location -// that a node can be placed, and the conflicting node can be placed deeper, -// then we will return REPLACE rather than CONFLICT, and Arborist will queue -// the replaced node for resolution elsewhere. - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const semver = require('semver') -const debug = require('./debug.js') -const peerEntrySets = require('./peer-entry-sets.js') -const deepestNestingTarget = require('./deepest-nesting-target.js') - -const CONFLICT = Symbol('CONFLICT') -const OK = Symbol('OK') -const REPLACE = Symbol('REPLACE') -const KEEP = Symbol('KEEP') - -class CanPlaceDep { - // dep is a dep that we're trying to place. it should already live in - // a virtual tree where its peer set is loaded as children of the root. - // target is the actual place where we're trying to place this dep - // in a node_modules folder. - // edge is the edge that we're trying to satisfy with this placement. - // parent is the CanPlaceDep object of the entry node when placing a peer. - constructor (options) { - const { - dep, - target, - edge, - preferDedupe, - parent = null, - peerPath = [], - explicitRequest = false, - } = options - - debug(() => { - if (!dep) { - throw new Error('no dep provided to CanPlaceDep') - } - - if (!target) { - throw new Error('no target provided to CanPlaceDep') - } - - if (!edge) { - throw new Error('no edge provided to CanPlaceDep') - } - - this._treeSnapshot = JSON.stringify([...target.root.inventory.entries()] - .map(([loc, { packageName, version, resolved }]) => { - return [loc, packageName, version, resolved] - }).sort(([a], [b]) => localeCompare(a, b))) - }) - - // the result of whether we can place it or not - this.canPlace = null - // if peers conflict, but this one doesn't, then that is useful info - this.canPlaceSelf = null - - this.dep = dep - this.target = target - this.edge = edge - this.explicitRequest = explicitRequest - - // preventing cycles when we check peer sets - this.peerPath = peerPath - // we always prefer to dedupe peers, because they are trying - // a bit harder to be singletons. - this.preferDedupe = !!preferDedupe || edge.peer - this.parent = parent - this.children = [] - - this.isSource = target === this.peerSetSource - this.name = edge.name - this.current = target.children.get(this.name) - this.targetEdge = target.edgesOut.get(this.name) - this.conflicts = new Map() - - // check if this dep was already subject to a peerDep override while - // building the peerSet. - this.edgeOverride = !dep.satisfies(edge) - - this.canPlace = this.checkCanPlace() - if (!this.canPlaceSelf) { - this.canPlaceSelf = this.canPlace - } - - debug(() => { - const treeSnapshot = JSON.stringify([...target.root.inventory.entries()] - .map(([loc, { packageName, version, resolved }]) => { - return [loc, packageName, version, resolved] - }).sort(([a], [b]) => localeCompare(a, b))) - /* istanbul ignore if */ - if (this._treeSnapshot !== treeSnapshot) { - throw Object.assign(new Error('tree changed in CanPlaceDep'), { - expect: this._treeSnapshot, - actual: treeSnapshot, - }) - } - }) - } - - checkCanPlace () { - const { target, targetEdge, current, dep } = this - - // if the dep failed to load, we're going to fail the build or - // prune it out anyway, so just move forward placing/replacing it. - if (dep.errors.length) { - return current ? REPLACE : OK - } - - // cannot place peers inside their dependents, except for tops - if (targetEdge && targetEdge.peer && !target.isTop) { - return CONFLICT - } - - // skip this test if there's a current node, because we might be able - // to dedupe against it anyway - if (!current && - targetEdge && - !dep.satisfies(targetEdge) && - targetEdge !== this.edge) { - return CONFLICT - } - - return current ? this.checkCanPlaceCurrent() : this.checkCanPlaceNoCurrent() - } - - // we know that the target has a dep by this name in its node_modules - // already. Can return KEEP, REPLACE, or CONFLICT. - checkCanPlaceCurrent () { - const { preferDedupe, explicitRequest, current, target, edge, dep } = this - - if (dep.matches(current)) { - if (current.satisfies(edge) || this.edgeOverride) { - return explicitRequest ? REPLACE : KEEP - } - } - - const { version: curVer } = current - const { version: newVer } = dep - const tryReplace = curVer && newVer && semver.gte(newVer, curVer) - if (tryReplace && dep.canReplace(current)) { - // It's extremely rare that a replaceable node would be a conflict, if - // the current one wasn't a conflict, but it is theoretically possible - // if peer deps are pinned. In that case we treat it like any other - // conflict, and keep trying. - const cpp = this.canPlacePeers(REPLACE) - if (cpp !== CONFLICT) { - return cpp - } - } - - // ok, can't replace the current with new one, but maybe current is ok? - if (current.satisfies(edge) && (!explicitRequest || preferDedupe)) { - return KEEP - } - - // if we prefer deduping, then try replacing newer with older - if (preferDedupe && !tryReplace && dep.canReplace(current)) { - const cpp = this.canPlacePeers(REPLACE) - if (cpp !== CONFLICT) { - return cpp - } - } - - // Check for interesting cases! - // First, is this the deepest place that this thing can go, and NOT the - // deepest place where the conflicting dep can go? If so, replace it, - // and let it re-resolve deeper in the tree. - const myDeepest = this.deepestNestingTarget - - // ok, i COULD be placed deeper, so leave the current one alone. - if (target !== myDeepest) { - return CONFLICT - } - - // if we are not checking a peerDep, then we MUST place it here, in the - // target that has a non-peer dep on it. - if (!edge.peer && target === edge.from) { - return this.canPlacePeers(REPLACE) - } - - // if we aren't placing a peer in a set, then we're done here. - // This is ignored because it SHOULD be redundant, as far as I can tell, - // with the deepest target and target===edge.from tests. But until we - // can prove that isn't possible, this condition is here for safety. - /* istanbul ignore if - allegedly impossible */ - if (!this.parent && !edge.peer) { - return CONFLICT - } - - // check the deps in the peer group for each edge into that peer group - // if ALL of them can be pushed deeper, or if it's ok to replace its - // members with the contents of the new peer group, then we're good. - let canReplace = true - for (const [entryEdge, currentPeers] of peerEntrySets(current)) { - if (entryEdge === this.edge || entryEdge === this.peerEntryEdge) { - continue - } - - // First, see if it's ok to just replace the peerSet entirely. - // we do this by walking out from the entryEdge, because in a case like - // this: - // - // v -> PEER(a@1||2) - // a@1 -> PEER(b@1) - // a@2 -> PEER(b@2) - // b@1 -> PEER(a@1) - // b@2 -> PEER(a@2) - // - // root - // +-- v - // +-- a@2 - // +-- b@2 - // - // Trying to place a peer group of (a@1, b@1) would fail to note that - // they can be replaced, if we did it by looping 1 by 1. If we are - // replacing something, we don't have to check its peer deps, because - // the peerDeps in the placed peerSet will presumably satisfy. - const entryNode = entryEdge.to - const entryRep = dep.parent.children.get(entryNode.name) - if (entryRep) { - if (entryRep.canReplace(entryNode, dep.parent.children.keys())) { - continue - } - } - - let canClobber = !entryRep - if (!entryRep) { - const peerReplacementWalk = new Set([entryNode]) - OUTER: for (const currentPeer of peerReplacementWalk) { - for (const edge of currentPeer.edgesOut.values()) { - if (!edge.peer || !edge.valid) { - continue - } - const rep = dep.parent.children.get(edge.name) - if (!rep) { - if (edge.to) { - peerReplacementWalk.add(edge.to) - } - continue - } - if (!rep.satisfies(edge)) { - canClobber = false - break OUTER - } - } - } - } - if (canClobber) { - continue - } - - // ok, we can't replace, but maybe we can nest the current set deeper? - let canNestCurrent = true - for (const currentPeer of currentPeers) { - if (!canNestCurrent) { - break - } - - // still possible to nest this peerSet - const curDeep = deepestNestingTarget(entryEdge.from, currentPeer.name) - if (curDeep === target || target.isDescendantOf(curDeep)) { - canNestCurrent = false - canReplace = false - } - if (canNestCurrent) { - continue - } - } - } - - // if we can nest or replace all the current peer groups, we can replace. - if (canReplace) { - return this.canPlacePeers(REPLACE) - } - - return CONFLICT - } - - checkCanPlaceNoCurrent () { - const { target, peerEntryEdge, dep, name } = this - - // check to see what that name resolves to here, and who may depend on - // being able to reach it by crawling up past the parent. we know - // that it's not the target's direct child node, and if it was a direct - // dep of the target, we would have conflicted earlier. - const current = target !== peerEntryEdge.from && target.resolve(name) - if (current) { - for (const edge of current.edgesIn.values()) { - if (edge.from.isDescendantOf(target) && edge.valid) { - if (!dep.satisfies(edge)) { - return CONFLICT - } - } - } - } - - // no objections, so this is fine as long as peers are ok here. - return this.canPlacePeers(OK) - } - - get deepestNestingTarget () { - const start = this.parent ? this.parent.deepestNestingTarget - : this.edge.from - return deepestNestingTarget(start, this.name) - } - - get conflictChildren () { - return this.allChildren.filter(c => c.canPlace === CONFLICT) - } - - get allChildren () { - const set = new Set(this.children) - for (const child of set) { - for (const grandchild of child.children) { - set.add(grandchild) - } - } - return [...set] - } - - get top () { - return this.parent ? this.parent.top : this - } - - // check if peers can go here. returns state or CONFLICT - canPlacePeers (state) { - this.canPlaceSelf = state - if (this._canPlacePeers) { - return this._canPlacePeers - } - - // TODO: represent peerPath in ERESOLVE error somehow? - const peerPath = [...this.peerPath, this.dep] - let sawConflict = false - for (const peerEdge of this.dep.edgesOut.values()) { - if (!peerEdge.peer || !peerEdge.to || peerPath.includes(peerEdge.to)) { - continue - } - const peer = peerEdge.to - // it may be the case that the *initial* dep can be nested, but a peer - // of that dep needs to be placed shallower, because the target has - // a peer dep on the peer as well. - const target = deepestNestingTarget(this.target, peer.name) - const cpp = new CanPlaceDep({ - dep: peer, - target, - parent: this, - edge: peerEdge, - peerPath, - // always place peers in preferDedupe mode - preferDedupe: true, - }) - /* istanbul ignore next */ - debug(() => { - if (this.children.some(c => c.dep === cpp.dep)) { - throw new Error('checking same dep repeatedly') - } - }) - this.children.push(cpp) - - if (cpp.canPlace === CONFLICT) { - sawConflict = true - } - } - - this._canPlacePeers = sawConflict ? CONFLICT : state - return this._canPlacePeers - } - - // what is the node that is causing this peerSet to be placed? - get peerSetSource () { - return this.parent ? this.parent.peerSetSource : this.edge.from - } - - get peerEntryEdge () { - return this.top.edge - } - - static get CONFLICT () { - return CONFLICT - } - - static get OK () { - return OK - } - - static get REPLACE () { - return REPLACE - } - - static get KEEP () { - return KEEP - } - - get description () { - const { canPlace } = this - return canPlace && canPlace.description || - /* istanbul ignore next - old node affordance */ canPlace - } -} - -module.exports = CanPlaceDep diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/case-insensitive-map.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/case-insensitive-map.js deleted file mode 100644 index 016ce60..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/case-insensitive-map.js +++ /dev/null @@ -1,50 +0,0 @@ -// package children are represented with a Map object, but many file systems -// are case-insensitive and unicode-normalizing, so we need to treat -// node.children.get('FOO') and node.children.get('foo') as the same thing. - -const _keys = Symbol('keys') -const _normKey = Symbol('normKey') -const normalize = s => s.normalize('NFKD').toLowerCase() -const OGMap = Map -module.exports = class Map extends OGMap { - constructor (items = []) { - super() - this[_keys] = new OGMap() - for (const [key, val] of items) { - this.set(key, val) - } - } - - [_normKey] (key) { - return typeof key === 'string' ? normalize(key) : key - } - - get (key) { - const normKey = this[_normKey](key) - return this[_keys].has(normKey) ? super.get(this[_keys].get(normKey)) - : undefined - } - - set (key, val) { - const normKey = this[_normKey](key) - if (this[_keys].has(normKey)) { - super.delete(this[_keys].get(normKey)) - } - this[_keys].set(normKey, key) - return super.set(key, val) - } - - delete (key) { - const normKey = this[_normKey](key) - if (this[_keys].has(normKey)) { - const prevKey = this[_keys].get(normKey) - this[_keys].delete(normKey) - return super.delete(prevKey) - } - } - - has (key) { - const normKey = this[_normKey](key) - return this[_keys].has(normKey) && super.has(this[_keys].get(normKey)) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js deleted file mode 100644 index 7c98804..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/consistent-resolve.js +++ /dev/null @@ -1,45 +0,0 @@ -// take a path and a resolved value, and turn it into a resolution from -// the given new path. This is used with converting a package.json's -// relative file: path into one suitable for a lockfile, or between -// lockfiles, and for converting hosted git repos to a consistent url type. -const npa = require('npm-package-arg') -const relpath = require('./relpath.js') -const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => { - if (!resolved) { - return null - } - - try { - const hostedOpt = { noCommittish: false } - const { - fetchSpec, - saveSpec, - type, - hosted, - rawSpec, - raw, - } = npa(resolved, fromPath) - if (type === 'file' || type === 'directory') { - const cleanFetchSpec = fetchSpec.replace(/#/g, '%23') - if (relPaths && toPath) { - return `file:${relpath(toPath, cleanFetchSpec)}` - } - return `file:${cleanFetchSpec}` - } - if (hosted) { - return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(hostedOpt)}` - } - if (type === 'git') { - return saveSpec - } - if (rawSpec === '*') { - return raw - } - return rawSpec - } catch (_) { - // whatever we passed in was not acceptable to npa. - // leave it 100% untouched. - return resolved - } -} -module.exports = consistentResolve diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/debug.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/debug.js deleted file mode 100644 index aeda722..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/debug.js +++ /dev/null @@ -1,31 +0,0 @@ -// certain assertions we should do only when testing arborist itself, because -// they are too expensive or aggressive and would break user programs if we -// miss a situation where they are actually valid. -// -// call like this: -// -// /* istanbul ignore next - debug check */ -// debug(() => { -// if (someExpensiveCheck) -// throw new Error('expensive check should have returned false') -// }) - -// run in debug mode if explicitly requested, running arborist tests, -// or working in the arborist project directory. - -const debug = process.env.ARBORIST_DEBUG !== '0' && ( - process.env.ARBORIST_DEBUG === '1' || - /\barborist\b/.test(process.env.NODE_DEBUG || '') || - process.env.npm_package_name === '@npmcli/arborist' && - ['test', 'snap'].includes(process.env.npm_lifecycle_event) || - process.cwd() === require('path').resolve(__dirname, '..') -) - -module.exports = debug ? fn => fn() : () => {} -const red = process.stderr.isTTY ? msg => `\x1B[31m${msg}\x1B[39m` : m => m -module.exports.log = (...msg) => module.exports(() => { - const { format } = require('util') - const prefix = `\n${process.pid} ${red(format(msg.shift()))} ` - msg = (prefix + format(...msg).trim().split('\n').join(prefix)).trim() - console.error(msg) -}) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/deepest-nesting-target.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/deepest-nesting-target.js deleted file mode 100644 index 2c6647f..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/deepest-nesting-target.js +++ /dev/null @@ -1,18 +0,0 @@ -// given a starting node, what is the *deepest* target where name could go? -// This is not on the Node class for the simple reason that we sometimes -// need to check the deepest *potential* target for a Node that is not yet -// added to the tree where we are checking. -const deepestNestingTarget = (start, name) => { - for (const target of start.ancestry()) { - // note: this will skip past the first target if edge is peer - if (target.isProjectRoot || !target.resolveParent || target.globalTop) { - return target - } - const targetEdge = target.edgesOut.get(name) - if (!targetEdge || !targetEdge.peer) { - return target - } - } -} - -module.exports = deepestNestingTarget diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/dep-valid.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/dep-valid.js deleted file mode 100644 index 4afb5e4..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/dep-valid.js +++ /dev/null @@ -1,150 +0,0 @@ -// Do not rely on package._fields, so that we don't throw -// false failures if a tree is generated by other clients. -// Only relies on child.resolved, which MAY come from -// client-specific package.json meta _fields, but most of -// the time will be pulled out of a lockfile - -const semver = require('semver') -const npa = require('npm-package-arg') -const { relative } = require('path') -const fromPath = require('./from-path.js') - -const depValid = (child, requested, requestor) => { - // NB: we don't do much to verify 'tag' type requests. - // Just verify that we got a remote resolution. Presumably, it - // came from a registry and was tagged at some point. - - if (typeof requested === 'string') { - try { - // tarball/dir must have resolved to the same tgz on disk, but for - // file: deps that depend on other files/dirs, we must resolve the - // location based on the *requestor* file/dir, not where it ends up. - // '' is equivalent to '*' - requested = npa.resolve(child.name, requested || '*', fromPath(requestor, requestor.edgesOut.get(child.name))) - } catch (er) { - // Not invalid because the child doesn't match, but because - // the spec itself is not supported. Nothing would match, - // so the edge is definitely not valid and never can be. - er.dependency = child.name - er.requested = requested - requestor.errors.push(er) - return false - } - } - - // if the lockfile is super old, or hand-modified, - // then it's possible to hit this state. - if (!requested) { - const er = new Error('Invalid dependency specifier') - er.dependency = child.name - er.requested = requested - requestor.errors.push(er) - return false - } - - switch (requested.type) { - case 'range': - if (requested.fetchSpec === '*') { - return true - } - // fallthrough - case 'version': - // if it's a version or a range other than '*', semver it - return semver.satisfies(child.version, requested.fetchSpec, true) - - case 'directory': - return linkValid(child, requested, requestor) - - case 'file': - return tarballValid(child, requested, requestor) - - case 'alias': - // check that the alias target is valid - return depValid(child, requested.subSpec, requestor) - - case 'tag': - // if it's a tag, we just verify that it has a tarball resolution - // presumably, it came from the registry and was tagged at some point - return child.resolved && npa(child.resolved).type === 'remote' - - case 'remote': - // verify that we got it from the desired location - return child.resolved === requested.fetchSpec - - case 'git': { - // if it's a git type, verify that they're the same repo - // - // if it specifies a definite commit, then it must have the - // same commit to be considered the same repo - // - // if it has a #semver: specifier, verify that the - // version in the package is in the semver range - const resRepo = npa(child.resolved || '') - const resHost = resRepo.hosted - const reqHost = requested.hosted - const reqCommit = /^[a-fA-F0-9]{40}$/.test(requested.gitCommittish || '') - const nc = { noCommittish: !reqCommit } - if (!resHost) { - if (resRepo.fetchSpec !== requested.fetchSpec) { - return false - } - } else { - if (reqHost?.ssh(nc) !== resHost.ssh(nc)) { - return false - } - } - if (!requested.gitRange) { - return true - } - return semver.satisfies(child.package.version, requested.gitRange, { - loose: true, - }) - } - - default: // unpossible, just being cautious - break - } - - const er = new Error('Unsupported dependency type') - er.dependency = child.name - er.requested = requested - requestor.errors.push(er) - return false -} - -const linkValid = (child, requested, requestor) => { - const isLink = !!child.isLink - // if we're installing links and the node is a link, then it's invalid because we want - // a real node to be there. Except for workspaces. They are always links. - if (requestor.installLinks && !child.isWorkspace) { - return !isLink - } - - // directory must be a link to the specified folder - return isLink && relative(child.realpath, requested.fetchSpec) === '' -} - -const tarballValid = (child, requested, requestor) => { - if (child.isLink) { - return false - } - - if (child.resolved) { - return child.resolved.replace(/\\/g, '/') === `file:${requested.fetchSpec.replace(/\\/g, '/')}` - } - - // if we have a legacy mutated package.json file. we can't be 100% - // sure that it resolved to the same file, but if it was the same - // request, that's a pretty good indicator of sameness. - if (child.package._requested) { - return child.package._requested.saveSpec === requested.saveSpec - } - - // ok, we're probably dealing with some legacy cruft here, not much - // we can do at this point unfortunately. - return false -} - -module.exports = (child, requested, accept, requestor) => - depValid(child, requested, requestor) || - (typeof accept === 'string' ? depValid(child, accept, requestor) : false) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/diff.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/diff.js deleted file mode 100644 index 0387773..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/diff.js +++ /dev/null @@ -1,306 +0,0 @@ -// a tree representing the difference between two trees -// A Diff node's parent is not necessarily the parent of -// the node location it refers to, but rather the highest level -// node that needs to be either changed or removed. -// Thus, the root Diff node is the shallowest change required -// for a given branch of the tree being mutated. - -const { depth } = require('treeverse') -const { existsSync } = require('fs') - -const ssri = require('ssri') - -class Diff { - constructor ({ actual, ideal, filterSet, shrinkwrapInflated }) { - this.filterSet = filterSet - this.shrinkwrapInflated = shrinkwrapInflated - this.children = [] - this.actual = actual - this.ideal = ideal - if (this.ideal) { - this.resolved = this.ideal.resolved - this.integrity = this.ideal.integrity - } - this.action = getAction(this) - this.parent = null - // the set of leaf nodes that we rake up to the top level - this.leaves = [] - // the set of nodes that don't change in this branch of the tree - this.unchanged = [] - // the set of nodes that will be removed in this branch of the tree - this.removed = [] - } - - static calculate ({ - actual, - ideal, - filterNodes = [], - shrinkwrapInflated = new Set(), - }) { - // if there's a filterNode, then: - // - get the path from the root to the filterNode. The root or - // root.target should have an edge either to the filterNode or - // a link to the filterNode. If not, abort. Add the path to the - // filterSet. - // - Add set of Nodes depended on by the filterNode to filterSet. - // - Anything outside of that set should be ignored by getChildren - const filterSet = new Set() - const extraneous = new Set() - for (const filterNode of filterNodes) { - const { root } = filterNode - if (root !== ideal && root !== actual) { - throw new Error('invalid filterNode: outside idealTree/actualTree') - } - const rootTarget = root.target - const edge = [...rootTarget.edgesOut.values()].filter(e => { - return e.to && (e.to === filterNode || e.to.target === filterNode) - })[0] - filterSet.add(root) - filterSet.add(rootTarget) - filterSet.add(ideal) - filterSet.add(actual) - if (edge && edge.to) { - filterSet.add(edge.to) - filterSet.add(edge.to.target) - } - filterSet.add(filterNode) - - depth({ - tree: filterNode, - visit: node => filterSet.add(node), - getChildren: node => { - node = node.target - const loc = node.location - const idealNode = ideal.inventory.get(loc) - const ideals = !idealNode ? [] - : [...idealNode.edgesOut.values()].filter(e => e.to).map(e => e.to) - const actualNode = actual.inventory.get(loc) - const actuals = !actualNode ? [] - : [...actualNode.edgesOut.values()].filter(e => e.to).map(e => e.to) - if (actualNode) { - for (const child of actualNode.children.values()) { - if (child.extraneous) { - extraneous.add(child) - } - } - } - - return ideals.concat(actuals) - }, - }) - } - for (const extra of extraneous) { - filterSet.add(extra) - } - - return depth({ - tree: new Diff({ actual, ideal, filterSet, shrinkwrapInflated }), - getChildren, - leave, - }) - } -} - -const getAction = ({ actual, ideal }) => { - if (!ideal) { - return 'REMOVE' - } - - // bundled meta-deps are copied over to the ideal tree when we visit it, - // so they'll appear to be missing here. There's no need to handle them - // in the diff, though, because they'll be replaced at reify time anyway - // Otherwise, add the missing node. - if (!actual) { - return ideal.inDepBundle ? null : 'ADD' - } - - // always ignore the root node - if (ideal.isRoot && actual.isRoot) { - return null - } - - // if the versions don't match, it's a change no matter what - if (ideal.version !== actual.version) { - return 'CHANGE' - } - - const binsExist = ideal.binPaths.every((path) => existsSync(path)) - - // top nodes, links, and git deps won't have integrity, but do have resolved - // if neither node has integrity, the bins exist, and either (a) neither - // node has a resolved value or (b) they both do and match, then we can - // leave this one alone since we already know the versions match due to - // the condition above. The "neither has resolved" case (a) cannot be - // treated as a 'mark CHANGE and refetch', because shrinkwraps, bundles, - // and link deps may lack this information, and we don't want to try to - // go to the registry for something that isn't there. - const noIntegrity = !ideal.integrity && !actual.integrity - const noResolved = !ideal.resolved && !actual.resolved - const resolvedMatch = ideal.resolved && ideal.resolved === actual.resolved - if (noIntegrity && binsExist && (resolvedMatch || noResolved)) { - return null - } - - // otherwise, verify that it's the same bits - // note that if ideal has integrity, and resolved doesn't, we treat - // that as a 'change', so that it gets re-fetched and locked down. - const integrityMismatch = !ideal.integrity || !actual.integrity || - !ssri.parse(ideal.integrity).match(actual.integrity) - if (integrityMismatch || !binsExist) { - return 'CHANGE' - } - - return null -} - -const allChildren = node => { - if (!node) { - return new Map() - } - - // if the node is root, and also a link, then what we really - // want is to traverse the target's children - if (node.isRoot && node.isLink) { - return allChildren(node.target) - } - - const kids = new Map() - for (const n of [node, ...node.fsChildren]) { - for (const kid of n.children.values()) { - kids.set(kid.path, kid) - } - } - return kids -} - -// functions for the walk options when we traverse the trees -// to create the diff tree -const getChildren = diff => { - const children = [] - const { - actual, - ideal, - unchanged, - removed, - filterSet, - shrinkwrapInflated, - } = diff - - // Note: we DON'T diff fsChildren themselves, because they are either - // included in the package contents, or part of some other project, and - // will never appear in legacy shrinkwraps anyway. but we _do_ include the - // child nodes of fsChildren, because those are nodes that we are typically - // responsible for installing. - const actualKids = allChildren(actual) - const idealKids = allChildren(ideal) - - if (ideal && ideal.hasShrinkwrap && !shrinkwrapInflated.has(ideal)) { - // Guaranteed to get a diff.leaves here, because we always - // be called with a proper Diff object when ideal has a shrinkwrap - // that has not been inflated. - diff.leaves.push(diff) - return children - } - - const paths = new Set([...actualKids.keys(), ...idealKids.keys()]) - for (const path of paths) { - const actual = actualKids.get(path) - const ideal = idealKids.get(path) - diffNode({ - actual, - ideal, - children, - unchanged, - removed, - filterSet, - shrinkwrapInflated, - }) - } - - if (diff.leaves && !children.length) { - diff.leaves.push(diff) - } - - return children -} - -const diffNode = ({ - actual, - ideal, - children, - unchanged, - removed, - filterSet, - shrinkwrapInflated, -}) => { - if (filterSet.size && !(filterSet.has(ideal) || filterSet.has(actual))) { - return - } - - const action = getAction({ actual, ideal }) - - // if it's a match, then get its children - // otherwise, this is the child diff node - if (action || (!shrinkwrapInflated.has(ideal) && ideal.hasShrinkwrap)) { - if (action === 'REMOVE') { - removed.push(actual) - } - children.push(new Diff({ actual, ideal, filterSet, shrinkwrapInflated })) - } else { - unchanged.push(ideal) - // !*! Weird dirty hack warning !*! - // - // Bundled deps aren't loaded in the ideal tree, because we don't know - // what they are going to be without unpacking. Swap them over now if - // the bundling node isn't changing, so we don't prune them later. - // - // It's a little bit dirty to be doing this here, since it means that - // diffing trees can mutate them, but otherwise we have to walk over - // all unchanging bundlers and correct the diff later, so it's more - // efficient to just fix it while we're passing through already. - // - // Note that moving over a bundled dep will break the links to other - // deps under this parent, which may have been transitively bundled. - // Breaking those links means that we'll no longer see the transitive - // dependency, meaning that it won't appear as bundled any longer! - // In order to not end up dropping transitively bundled deps, we have - // to get the list of nodes to move, then move them all at once, rather - // than moving them one at a time in the first loop. - const bd = ideal.package.bundleDependencies - if (actual && bd && bd.length) { - const bundledChildren = [] - for (const node of actual.children.values()) { - if (node.inBundle) { - bundledChildren.push(node) - } - } - for (const node of bundledChildren) { - node.parent = ideal - } - } - children.push(...getChildren({ - actual, - ideal, - unchanged, - removed, - filterSet, - shrinkwrapInflated, - })) - } -} - -// set the parentage in the leave step so that we aren't attaching -// child nodes only to remove them later. also bubble up the unchanged -// nodes so that we can move them out of staging in the reification step. -const leave = (diff, children) => { - children.forEach(kid => { - kid.parent = diff - diff.leaves.push(...kid.leaves) - diff.unchanged.push(...kid.unchanged) - diff.removed.push(...kid.removed) - }) - diff.children = children - return diff -} - -module.exports = Diff diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js deleted file mode 100644 index cc9698a..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/edge.js +++ /dev/null @@ -1,301 +0,0 @@ -// An edge in the dependency graph -// Represents a dependency relationship of some kind - -const util = require('util') -const npa = require('npm-package-arg') -const depValid = require('./dep-valid.js') - -class ArboristEdge { - constructor (edge) { - this.name = edge.name - this.spec = edge.spec - this.type = edge.type - - const edgeFrom = edge.from?.location - const edgeTo = edge.to?.location - const override = edge.overrides?.value - - if (edgeFrom != null) { - this.from = edgeFrom - } - if (edgeTo) { - this.to = edgeTo - } - if (edge.error) { - this.error = edge.error - } - if (edge.peerConflicted) { - this.peerConflicted = true - } - if (override) { - this.overridden = override - } - } -} - -class Edge { - #accept - #error - #explanation - #from - #name - #spec - #to - #type - - static types = Object.freeze([ - 'prod', - 'dev', - 'optional', - 'peer', - 'peerOptional', - 'workspace', - ]) - - // XXX where is this used? - static errors = Object.freeze([ - 'DETACHED', - 'MISSING', - 'PEER LOCAL', - 'INVALID', - ]) - - constructor (options) { - const { type, name, spec, accept, from, overrides } = options - - // XXX are all of these error states even possible? - if (typeof spec !== 'string') { - throw new TypeError('must provide string spec') - } - if (!Edge.types.includes(type)) { - throw new TypeError(`invalid type: ${type}\n(valid types are: ${Edge.types.join(', ')})`) - } - if (type === 'workspace' && npa(spec).type !== 'directory') { - throw new TypeError('workspace edges must be a symlink') - } - if (typeof name !== 'string') { - throw new TypeError('must provide dependency name') - } - if (!from) { - throw new TypeError('must provide "from" node') - } - if (accept !== undefined) { - if (typeof accept !== 'string') { - throw new TypeError('accept field must be a string if provided') - } - this.#accept = accept || '*' - } - if (overrides !== undefined) { - this.overrides = overrides - } - - this.#name = name - this.#type = type - this.#spec = spec - this.#explanation = null - this.#from = from - - from.edgesOut.get(this.#name)?.detach() - from.addEdgeOut(this) - - this.reload(true) - this.peerConflicted = false - } - - satisfiedBy (node) { - if (node.name !== this.#name) { - return false - } - - // NOTE: this condition means we explicitly do not support overriding - // bundled or shrinkwrapped dependencies - if (node.hasShrinkwrap || node.inShrinkwrap || node.inBundle) { - return depValid(node, this.rawSpec, this.#accept, this.#from) - } - return depValid(node, this.spec, this.#accept, this.#from) - } - - // return the edge data, and an explanation of how that edge came to be here - explain (seen = []) { - if (!this.#explanation) { - const explanation = { - type: this.#type, - name: this.#name, - spec: this.spec, - } - if (this.rawSpec !== this.spec) { - explanation.rawSpec = this.rawSpec - explanation.overridden = true - } - if (this.bundled) { - explanation.bundled = this.bundled - } - if (this.error) { - explanation.error = this.error - } - if (this.#from) { - explanation.from = this.#from.explain(null, seen) - } - this.#explanation = explanation - } - return this.#explanation - } - - get bundled () { - return !!this.#from?.package?.bundleDependencies?.includes(this.#name) - } - - get workspace () { - return this.#type === 'workspace' - } - - get prod () { - return this.#type === 'prod' - } - - get dev () { - return this.#type === 'dev' - } - - get optional () { - return this.#type === 'optional' || this.#type === 'peerOptional' - } - - get peer () { - return this.#type === 'peer' || this.#type === 'peerOptional' - } - - get type () { - return this.#type - } - - get name () { - return this.#name - } - - get rawSpec () { - return this.#spec - } - - get spec () { - if (this.overrides?.value && this.overrides.value !== '*' && this.overrides.name === this.#name) { - if (this.overrides.value.startsWith('$')) { - const ref = this.overrides.value.slice(1) - // we may be a virtual root, if we are we want to resolve reference overrides - // from the real root, not the virtual one - const pkg = this.#from.sourceReference - ? this.#from.sourceReference.root.package - : this.#from.root.package - if (pkg.devDependencies?.[ref]) { - return pkg.devDependencies[ref] - } - if (pkg.optionalDependencies?.[ref]) { - return pkg.optionalDependencies[ref] - } - if (pkg.dependencies?.[ref]) { - return pkg.dependencies[ref] - } - if (pkg.peerDependencies?.[ref]) { - return pkg.peerDependencies[ref] - } - - throw new Error(`Unable to resolve reference ${this.overrides.value}`) - } - return this.overrides.value - } - return this.#spec - } - - get accept () { - return this.#accept - } - - get valid () { - return !this.error - } - - get missing () { - return this.error === 'MISSING' - } - - get invalid () { - return this.error === 'INVALID' - } - - get peerLocal () { - return this.error === 'PEER LOCAL' - } - - get error () { - if (!this.#error) { - if (!this.#to) { - if (this.optional) { - this.#error = null - } else { - this.#error = 'MISSING' - } - } else if (this.peer && this.#from === this.#to.parent && !this.#from.isTop) { - this.#error = 'PEER LOCAL' - } else if (!this.satisfiedBy(this.#to)) { - this.#error = 'INVALID' - } else { - this.#error = 'OK' - } - } - if (this.#error === 'OK') { - return null - } - return this.#error - } - - reload (hard = false) { - this.#explanation = null - if (this.#from.overrides) { - this.overrides = this.#from.overrides.getEdgeRule(this) - } else { - delete this.overrides - } - const newTo = this.#from.resolve(this.#name) - if (newTo !== this.#to) { - if (this.#to) { - this.#to.edgesIn.delete(this) - } - this.#to = newTo - this.#error = null - if (this.#to) { - this.#to.addEdgeIn(this) - } - } else if (hard) { - this.#error = null - } - } - - detach () { - this.#explanation = null - if (this.#to) { - this.#to.edgesIn.delete(this) - } - this.#from.edgesOut.delete(this.#name) - this.#to = null - this.#error = 'DETACHED' - this.#from = null - } - - get from () { - return this.#from - } - - get to () { - return this.#to - } - - toJSON () { - return new ArboristEdge(this) - } - - [util.inspect.custom] () { - return this.toJSON() - } -} - -module.exports = Edge diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/from-path.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/from-path.js deleted file mode 100644 index 761f151..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/from-path.js +++ /dev/null @@ -1,30 +0,0 @@ -// file dependencies need their dependencies resolved based on the location -// where the tarball was found, not the location where they end up getting -// installed. directory (ie, symlink) deps also need to be resolved based on -// their targets, but that's what realpath is - -const { dirname } = require('path') -const npa = require('npm-package-arg') - -const fromPath = (node, edge) => { - if (edge && edge.overrides && edge.overrides.name === edge.name && edge.overrides.value) { - // fromPath could be called with a node that has a virtual root, if that - // happens we want to make sure we get the real root node when overrides - // are in use. this is to allow things like overriding a dependency with a - // tarball file that's a relative path from the project root - if (node.sourceReference) { - return node.sourceReference.root.realpath - } - return node.root.realpath - } - - if (node.resolved) { - const spec = npa(node.resolved) - if (spec?.type === 'file') { - return dirname(spec.fetchSpec) - } - } - return node.realpath -} - -module.exports = fromPath diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/gather-dep-set.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/gather-dep-set.js deleted file mode 100644 index 2c85a64..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/gather-dep-set.js +++ /dev/null @@ -1,43 +0,0 @@ -// Given a set of nodes in a tree, and a filter function to test -// incoming edges to the dep set that should be ignored otherwise. -// -// find the set of deps that are only depended upon by nodes in the set, or -// their dependencies, or edges that are ignored. -// -// Used when figuring out what to prune when replacing a node with a newer -// version, or when an optional dep fails to install. - -const gatherDepSet = (set, edgeFilter) => { - const deps = new Set(set) - - // add the full set of dependencies. note that this loop will continue - // as the deps set increases in size. - for (const node of deps) { - for (const edge of node.edgesOut.values()) { - if (edge.to && edgeFilter(edge)) { - deps.add(edge.to) - } - } - } - - // now remove all nodes in the set that have a dependant outside the set - // if any change is made, then re-check - // continue until no changes made, or deps set evaporates fully. - let changed = true - while (changed === true && deps.size > 0) { - changed = false - for (const dep of deps) { - for (const edge of dep.edgesIn) { - if (!deps.has(edge.from) && edgeFilter(edge)) { - changed = true - deps.delete(dep) - break - } - } - } - } - - return deps -} - -module.exports = gatherDepSet diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/get-workspace-nodes.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/get-workspace-nodes.js deleted file mode 100644 index 91002da..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/get-workspace-nodes.js +++ /dev/null @@ -1,36 +0,0 @@ -// Get the actual nodes corresponding to a root node's child workspaces, -// given a list of workspace names. - -const log = require('proc-log') -const relpath = require('./relpath.js') - -const getWorkspaceNodes = (tree, workspaces) => { - const wsMap = tree.workspaces - if (!wsMap) { - log.warn('workspaces', 'filter set, but no workspaces present') - return [] - } - - const nodes = [] - for (const name of workspaces) { - const path = wsMap.get(name) - if (!path) { - log.warn('workspaces', `${name} in filter set, but not in workspaces`) - continue - } - - const loc = relpath(tree.realpath, path) - const node = tree.inventory.get(loc) - - if (!node) { - log.warn('workspaces', `${name} in filter set, but no workspace folder present`) - continue - } - - nodes.push(node) - } - - return nodes -} - -module.exports = getWorkspaceNodes diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js deleted file mode 100644 index c7b07ce..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = require('./arborist/index.js') -module.exports.Arborist = module.exports -module.exports.Node = require('./node.js') -module.exports.Link = require('./link.js') -module.exports.Edge = require('./edge.js') -module.exports.Shrinkwrap = require('./shrinkwrap.js') -// XXX export the other classes, too. shrinkwrap, diff, etc. -// they're handy! diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/inventory.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/inventory.js deleted file mode 100644 index 0885034..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/inventory.js +++ /dev/null @@ -1,138 +0,0 @@ -// a class to manage an inventory and set of indexes of a set of objects based -// on specific fields. -const { hasOwnProperty } = Object.prototype -const debug = require('./debug.js') - -const keys = ['name', 'license', 'funding', 'realpath', 'packageName'] -class Inventory extends Map { - #index - - constructor () { - super() - this.#index = new Map() - for (const key of keys) { - this.#index.set(key, new Map()) - } - } - - // XXX where is this used? - get primaryKey () { - return 'location' - } - - // XXX where is this used? - get indexes () { - return [...keys] - } - - * filter (fn) { - for (const node of this.values()) { - if (fn(node)) { - yield node - } - } - } - - add (node) { - const root = super.get('') - if (root && node.root !== root && node.root !== root.root) { - debug(() => { - throw Object.assign(new Error('adding external node to inventory'), { - root: root.path, - node: node.path, - nodeRoot: node.root.path, - }) - }) - return - } - - const current = super.get(node.location) - if (current) { - if (current === node) { - return - } - this.delete(current) - } - super.set(node.location, node) - for (const [key, map] of this.#index.entries()) { - let val - if (hasOwnProperty.call(node, key)) { - // if the node has the value, use it even if it's false - val = node[key] - } else if (key === 'license' && node.package) { - // handling for the outdated "licenses" array, just pick the first one - // also support the alternative spelling "licence" - if (node.package.license) { - val = node.package.license - } else if (node.package.licence) { - val = node.package.licence - } else if (Array.isArray(node.package.licenses)) { - val = node.package.licenses[0] - } else if (Array.isArray(node.package.licences)) { - val = node.package.licences[0] - } - } else if (node[key]) { - val = node[key] - } else { - val = node.package?.[key] - } - if (val && typeof val === 'object') { - // We currently only use license and funding - /* istanbul ignore next - not used */ - if (key === 'license') { - val = val.type - } else if (key === 'funding') { - val = val.url - } - } - if (!map.has(val)) { - map.set(val, new Set()) - } - map.get(val).add(node) - } - } - - delete (node) { - if (!this.has(node)) { - return - } - - super.delete(node.location) - for (const [key, map] of this.#index.entries()) { - let val - if (node[key] !== undefined) { - val = node[key] - } else { - val = node.package?.[key] - } - const set = map.get(val) - if (set) { - set.delete(node) - if (set.size === 0) { - map.delete(node[key]) - } - } - } - } - - query (key, val) { - const map = this.#index.get(key) - if (arguments.length === 2) { - if (map.has(val)) { - return map.get(val) - } - return new Set() - } - return map.keys() - } - - has (node) { - return super.get(node.location) === node - } - - set (k, v) { - throw new Error('direct set() not supported, use inventory.add(node)') - } -} - -module.exports = Inventory diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/link.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/link.js deleted file mode 100644 index 197f96c..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/link.js +++ /dev/null @@ -1,126 +0,0 @@ -const relpath = require('./relpath.js') -const Node = require('./node.js') -const _loadDeps = Symbol.for('Arborist.Node._loadDeps') -const _target = Symbol.for('_target') -const { dirname } = require('path') -// defined by Node class -const _delistFromMeta = Symbol.for('_delistFromMeta') -const _refreshLocation = Symbol.for('_refreshLocation') -class Link extends Node { - constructor (options) { - const { root, realpath, target, parent, fsParent, isStoreLink } = options - - if (!realpath && !(target && target.path)) { - throw new TypeError('must provide realpath for Link node') - } - - super({ - ...options, - realpath: realpath || target.path, - root: root || (parent ? parent.root - : fsParent ? fsParent.root - : target ? target.root - : null), - }) - - this.isStoreLink = isStoreLink || false - - if (target) { - this.target = target - } else if (this.realpath === this.root.path) { - this.target = this.root - } else { - this.target = new Node({ - ...options, - path: realpath, - parent: null, - fsParent: null, - root: this.root, - }) - } - } - - get version () { - return this.target ? this.target.version : this.package.version || '' - } - - get target () { - return this[_target] - } - - set target (target) { - const current = this[_target] - if (target === current) { - return - } - - if (!target) { - if (current && current.linksIn) { - current.linksIn.delete(this) - } - if (this.path) { - this[_delistFromMeta]() - this[_target] = null - this.package = {} - this[_refreshLocation]() - } else { - this[_target] = null - } - return - } - - if (!this.path) { - // temp node pending assignment to a tree - // we know it's not in the inventory yet, because no path. - if (target.path) { - this.realpath = target.path - } else { - target.path = target.realpath = this.realpath - } - target.root = this.root - this[_target] = target - target.linksIn.add(this) - this.package = target.package - return - } - - // have to refresh metadata, because either realpath or package - // is very likely changing. - this[_delistFromMeta]() - this.package = target.package - this.realpath = target.path - this[_refreshLocation]() - - target.root = this.root - } - - // a link always resolves to the relative path to its target - get resolved () { - // the path/realpath guard is there for the benefit of setting - // these things in the "wrong" order - return this.path && this.realpath - ? `file:${relpath(dirname(this.path), this.realpath).replace(/#/g, '%23')}` - : null - } - - set resolved (r) {} - - // deps are resolved on the target, not the Link - // so this is a no-op - [_loadDeps] () {} - - // links can't have children, only their targets can - // fix it to an empty list so that we can still call - // things that iterate over them, just as a no-op - get children () { - return new Map() - } - - set children (c) {} - - get isLink () { - return true - } -} - -module.exports = Link diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js deleted file mode 100644 index bdc021b..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js +++ /dev/null @@ -1,1473 +0,0 @@ -// inventory, path, realpath, root, and parent -// -// node.root is a reference to the root module in the tree (ie, typically the -// cwd project folder) -// -// node.location is the /-delimited path from the root module to the node. In -// the case of link targets that may be outside of the root's package tree, -// this can include some number of /../ path segments. The location of the -// root module is always '.'. node.location thus never contains drive letters -// or absolute paths, and is portable within a given project, suitable for -// inclusion in lockfiles and metadata. -// -// node.path is the path to the place where this node lives on disk. It is -// system-specific and absolute. -// -// node.realpath is the path to where the module actually resides on disk. In -// the case of non-link nodes, node.realpath is equivalent to node.path. In -// the case of link nodes, it is equivalent to node.target.path. -// -// Setting node.parent will set the node's root to the parent's root, as well -// as updating edgesIn and edgesOut to reload dependency resolutions as needed, -// and setting node.path to parent.path/node_modules/name. -// -// node.inventory is a Map of name to a Set() of all the nodes under a given -// root by that name. It's empty for non-root nodes, and changing the root -// reference will remove it from the old root's inventory and add it to the new -// one. This map is useful for cases like `npm update foo` or `npm ls foo` -// where we need to quickly find all instances of a given package name within a -// tree. - -const semver = require('semver') -const nameFromFolder = require('@npmcli/name-from-folder') -const Edge = require('./edge.js') -const Inventory = require('./inventory.js') -const OverrideSet = require('./override-set.js') -const { normalize } = require('read-package-json-fast') -const { getPaths: getBinPaths } = require('bin-links') -const npa = require('npm-package-arg') -const debug = require('./debug.js') -const gatherDepSet = require('./gather-dep-set.js') -const treeCheck = require('./tree-check.js') -const { walkUp } = require('walk-up-path') - -const { resolve, relative, dirname, basename } = require('path') -const util = require('util') -const _package = Symbol('_package') -const _parent = Symbol('_parent') -const _target = Symbol.for('_target') -const _fsParent = Symbol('_fsParent') -const _reloadNamedEdges = Symbol('_reloadNamedEdges') -// overridden by Link class -const _loadDeps = Symbol.for('Arborist.Node._loadDeps') -const _refreshLocation = Symbol.for('_refreshLocation') -const _changePath = Symbol.for('_changePath') -// used by Link class as well -const _delistFromMeta = Symbol.for('_delistFromMeta') -const _explain = Symbol('_explain') -const _explanation = Symbol('_explanation') - -const relpath = require('./relpath.js') -const consistentResolve = require('./consistent-resolve.js') - -const printableTree = require('./printable.js') -const CaseInsensitiveMap = require('./case-insensitive-map.js') - -const querySelectorAll = require('./query-selector-all.js') - -class Node { - #global - #meta - #root - #workspaces - - constructor (options) { - // NB: path can be null if it's a link target - const { - root, - path, - realpath, - parent, - error, - meta, - fsParent, - resolved, - integrity, - // allow setting name explicitly when we haven't set a path yet - name, - children, - fsChildren, - installLinks = false, - legacyPeerDeps = false, - linksIn, - isInStore = false, - hasShrinkwrap, - overrides, - loadOverrides = false, - extraneous = true, - dev = true, - optional = true, - devOptional = true, - peer = true, - global = false, - dummy = false, - sourceReference = null, - } = options - // this object gives querySelectorAll somewhere to stash context about a node - // while processing a query - this.queryContext = {} - - // true if part of a global install - this.#global = global - - this.#workspaces = null - - this.errors = error ? [error] : [] - this.isInStore = isInStore - - // this will usually be null, except when modeling a - // package's dependencies in a virtual root. - this.sourceReference = sourceReference - - const pkg = sourceReference ? sourceReference.package - : normalize(options.pkg || {}) - - this.name = name || - nameFromFolder(path || pkg.name || realpath) || - pkg.name || - null - - // should be equal if not a link - this.path = path ? resolve(path) : null - - if (!this.name && (!this.path || this.path !== dirname(this.path))) { - throw new TypeError('could not detect node name from path or package') - } - - this.realpath = !this.isLink ? this.path : resolve(realpath) - - this.resolved = resolved || null - if (!this.resolved) { - // note: this *only* works for non-file: deps, so we avoid even - // trying here. - // file: deps are tracked in package.json will _resolved set to the - // full path to the tarball or link target. However, if the package - // is checked into git or moved to another location, that's 100% not - // portable at all! The _where and _location don't provide much help, - // since _location is just where the module ended up in the tree, - // and _where can be different than the actual root if it's a - // meta-dep deeper in the dependency graph. - // - // If we don't have the other oldest indicators of legacy npm, then it's - // probably what we're getting from pacote, which IS trustworthy. - // - // Otherwise, hopefully a shrinkwrap will help us out. - const resolved = consistentResolve(pkg._resolved) - if (resolved && !(/^file:/.test(resolved) && pkg._where)) { - this.resolved = resolved - } - } - this.integrity = integrity || pkg._integrity || null - this.hasShrinkwrap = hasShrinkwrap || pkg._hasShrinkwrap || false - this.installLinks = installLinks - this.legacyPeerDeps = legacyPeerDeps - - this.children = new CaseInsensitiveMap() - this.fsChildren = new Set() - this.inventory = new Inventory() - this.tops = new Set() - this.linksIn = new Set(linksIn || []) - - // these three are set by an Arborist taking a catalog - // after the tree is built. We don't get this along the way, - // because they have a tendency to change as new children are - // added, especially when they're deduped. Eg, a dev dep may be - // a 3-levels-deep dependency of a non-dev dep. If we calc the - // flags along the way, then they'll tend to be invalid by the - // time we need to look at them. - if (!dummy) { - this.dev = dev - this.optional = optional - this.devOptional = devOptional - this.peer = peer - this.extraneous = extraneous - this.dummy = false - } else { - // true if this is a placeholder for the purpose of serving as a - // fsParent to link targets that get their deps resolved outside - // the root tree folder. - this.dummy = true - this.dev = false - this.optional = false - this.devOptional = false - this.peer = false - this.extraneous = false - } - - this.edgesIn = new Set() - this.edgesOut = new CaseInsensitiveMap() - - // have to set the internal package ref before assigning the parent, - // because this.package is read when adding to inventory - this[_package] = pkg && typeof pkg === 'object' ? pkg : {} - - if (overrides) { - this.overrides = overrides - } else if (loadOverrides) { - const overrides = this[_package].overrides || {} - if (Object.keys(overrides).length > 0) { - this.overrides = new OverrideSet({ - overrides: this[_package].overrides, - }) - } - } - - // only relevant for the root and top nodes - this.meta = meta - - // Note: this is _slightly_ less efficient for the initial tree - // building than it could be, but in exchange, it's a much simpler - // algorithm. - // If this node has a bunch of children, and those children satisfy - // its various deps, then we're going to _first_ create all the - // edges, and _then_ assign the children into place, re-resolving - // them all in _reloadNamedEdges. - // A more efficient, but more complicated, approach would be to - // flag this node as being a part of a tree build, so it could - // hold off on resolving its deps until its children are in place. - - // call the parent setter - // Must be set prior to calling _loadDeps, because top-ness is relevant - - // will also assign root if present on the parent - this[_parent] = null - this.parent = parent || null - - this[_fsParent] = null - this.fsParent = fsParent || null - - // see parent/root setters below. - // root is set to parent's root if we have a parent, otherwise if it's - // null, then it's set to the node itself. - if (!parent && !fsParent) { - this.root = root || null - } - - // mostly a convenience for testing, but also a way to create - // trees in a more declarative way than setting parent on each - if (children) { - for (const c of children) { - new Node({ ...c, parent: this }) - } - } - if (fsChildren) { - for (const c of fsChildren) { - new Node({ ...c, fsParent: this }) - } - } - - // now load all the dep edges - this[_loadDeps]() - } - - get meta () { - return this.#meta - } - - set meta (meta) { - this.#meta = meta - if (meta) { - meta.add(this) - } - } - - get global () { - if (this.#root === this) { - return this.#global - } - return this.#root.global - } - - // true for packages installed directly in the global node_modules folder - get globalTop () { - return this.global && this.parent && this.parent.isProjectRoot - } - - get workspaces () { - return this.#workspaces - } - - set workspaces (workspaces) { - // deletes edges if they already exists - if (this.#workspaces) { - for (const name of this.#workspaces.keys()) { - if (!workspaces.has(name)) { - this.edgesOut.get(name).detach() - } - } - } - - this.#workspaces = workspaces - this.#loadWorkspaces() - this[_loadDeps]() - } - - get binPaths () { - if (!this.parent) { - return [] - } - - return getBinPaths({ - pkg: this[_package], - path: this.path, - global: this.global, - top: this.globalTop, - }) - } - - get hasInstallScript () { - const { hasInstallScript, scripts } = this.package - const { install, preinstall, postinstall } = scripts || {} - return !!(hasInstallScript || install || preinstall || postinstall) - } - - get version () { - return this[_package].version || '' - } - - get packageName () { - return this[_package].name || null - } - - get pkgid () { - const { name = '', version = '' } = this.package - // root package will prefer package name over folder name, - // and never be called an alias. - const { isProjectRoot } = this - const myname = isProjectRoot ? name || this.name - : this.name - const alias = !isProjectRoot && name && myname !== name ? `npm:${name}@` - : '' - return `${myname}@${alias}${version}` - } - - get overridden () { - return !!(this.overrides && this.overrides.value && this.overrides.name === this.name) - } - - get package () { - return this[_package] - } - - set package (pkg) { - // just detach them all. we could make this _slightly_ more efficient - // by only detaching the ones that changed, but we'd still have to walk - // them all, and the comparison logic gets a bit tricky. we generally - // only do this more than once at the root level, so the resolve() calls - // are only one level deep, and there's not much to be saved, anyway. - // simpler to just toss them all out. - for (const edge of this.edgesOut.values()) { - edge.detach() - } - - this[_explanation] = null - /* istanbul ignore next - should be impossible */ - if (!pkg || typeof pkg !== 'object') { - debug(() => { - throw new Error('setting Node.package to non-object') - }) - pkg = {} - } - this[_package] = pkg - this.#loadWorkspaces() - this[_loadDeps]() - // do a hard reload, since the dependents may now be valid or invalid - // as a result of the package change. - this.edgesIn.forEach(edge => edge.reload(true)) - } - - // node.explain(nodes seen already, edge we're trying to satisfy - // if edge is not specified, it lists every edge into the node. - explain (edge = null, seen = []) { - if (this[_explanation]) { - return this[_explanation] - } - - return this[_explanation] = this[_explain](edge, seen) - } - - [_explain] (edge, seen) { - if (this.isProjectRoot && !this.sourceReference) { - return { - location: this.path, - } - } - - const why = { - name: this.isProjectRoot || this.isTop ? this.packageName : this.name, - version: this.package.version, - } - if (this.errors.length || !this.packageName || !this.package.version) { - why.errors = this.errors.length ? this.errors : [ - new Error('invalid package: lacks name and/or version'), - ] - why.package = this.package - } - - if (this.root.sourceReference) { - const { name, version } = this.root.package - why.whileInstalling = { - name, - version, - path: this.root.sourceReference.path, - } - } - - if (this.sourceReference) { - return this.sourceReference.explain(edge, seen) - } - - if (seen.includes(this)) { - return why - } - - why.location = this.location - why.isWorkspace = this.isWorkspace - - // make a new list each time. we can revisit, but not loop. - seen = seen.concat(this) - - why.dependents = [] - if (edge) { - why.dependents.push(edge.explain(seen)) - } else { - // ignore invalid edges, since those aren't satisfied by this thing, - // and are not keeping it held in this spot anyway. - const edges = [] - for (const edge of this.edgesIn) { - if (!edge.valid && !edge.from.isProjectRoot) { - continue - } - - edges.push(edge) - } - for (const edge of edges) { - why.dependents.push(edge.explain(seen)) - } - } - - if (this.linksIn.size) { - why.linksIn = [...this.linksIn].map(link => link[_explain](edge, seen)) - } - - return why - } - - isDescendantOf (node) { - for (let p = this; p; p = p.resolveParent) { - if (p === node) { - return true - } - } - return false - } - - getBundler (path = []) { - // made a cycle, definitely not bundled! - if (path.includes(this)) { - return null - } - - path.push(this) - - const parent = this[_parent] - if (!parent) { - return null - } - - const pBundler = parent.getBundler(path) - if (pBundler) { - return pBundler - } - - const ppkg = parent.package - const bd = ppkg && ppkg.bundleDependencies - // explicit bundling - if (Array.isArray(bd) && bd.includes(this.name)) { - return parent - } - - // deps that are deduped up to the bundling level are bundled. - // however, if they get their dep met further up than that, - // then they are not bundled. Ie, installing a package with - // unmet bundled deps will not cause your deps to be bundled. - for (const edge of this.edgesIn) { - const eBundler = edge.from.getBundler(path) - if (!eBundler) { - continue - } - - if (eBundler === parent) { - return eBundler - } - } - - return null - } - - get inBundle () { - return !!this.getBundler() - } - - // when reifying, if a package is technically in a bundleDependencies list, - // but that list is the root project, we still have to install it. This - // getter returns true if it's in a dependency's bundle list, not the root's. - get inDepBundle () { - const bundler = this.getBundler() - return !!bundler && bundler !== this.root - } - - get isWorkspace () { - if (this.isProjectRoot) { - return false - } - const { root } = this - const { type, to } = root.edgesOut.get(this.packageName) || {} - return type === 'workspace' && to && (to.target === this || to === this) - } - - get isRoot () { - return this === this.root - } - - get isProjectRoot () { - // only treat as project root if it's the actual link that is the root, - // or the target of the root link, but NOT if it's another link to the - // same root that happens to be somewhere else. - return this === this.root || this === this.root.target - } - - get isRegistryDependency () { - if (this.edgesIn.size === 0) { - return false - } - for (const edge of this.edgesIn) { - if (!npa(edge.spec).registry) { - return false - } - } - return true - } - - * ancestry () { - for (let anc = this; anc; anc = anc.resolveParent) { - yield anc - } - } - - set root (root) { - // setting to null means this is the new root - // should only ever be one step - while (root && root.root !== root) { - root = root.root - } - - root = root || this - - // delete from current root inventory - this[_delistFromMeta]() - - // can't set the root (yet) if there's no way to determine location - // this allows us to do new Node({...}) and then set the root later. - // just make the assignment so we don't lose it, and move on. - if (!this.path || !root.realpath || !root.path) { - this.#root = root - return - } - - // temporarily become a root node - this.#root = this - - // break all linksIn, we're going to re-set them if needed later - for (const link of this.linksIn) { - link[_target] = null - this.linksIn.delete(link) - } - - // temporarily break this link as well, we'll re-set if possible later - const { target } = this - if (this.isLink) { - if (target) { - target.linksIn.delete(this) - if (target.root === this) { - target[_delistFromMeta]() - } - } - this[_target] = null - } - - // if this is part of a cascading root set, then don't do this bit - // but if the parent/fsParent is in a different set, we have to break - // that reference before proceeding - if (this.parent && this.parent.root !== root) { - this.parent.children.delete(this.name) - this[_parent] = null - } - if (this.fsParent && this.fsParent.root !== root) { - this.fsParent.fsChildren.delete(this) - this[_fsParent] = null - } - - if (root === this) { - this[_refreshLocation]() - } else { - // setting to some different node. - const loc = relpath(root.realpath, this.path) - const current = root.inventory.get(loc) - - // clobber whatever is there now - if (current) { - current.root = null - } - - this.#root = root - // set this.location and add to inventory - this[_refreshLocation]() - - // try to find our parent/fsParent in the new root inventory - for (const p of walkUp(dirname(this.path))) { - if (p === this.path) { - continue - } - const ploc = relpath(root.realpath, p) - const parent = root.inventory.get(ploc) - if (parent) { - /* istanbul ignore next - impossible */ - if (parent.isLink) { - debug(() => { - throw Object.assign(new Error('assigning parentage to link'), { - path: this.path, - parent: parent.path, - parentReal: parent.realpath, - }) - }) - continue - } - const childLoc = `${ploc}${ploc ? '/' : ''}node_modules/${this.name}` - const isParent = this.location === childLoc - if (isParent) { - const oldChild = parent.children.get(this.name) - if (oldChild && oldChild !== this) { - oldChild.root = null - } - if (this.parent) { - this.parent.children.delete(this.name) - this.parent[_reloadNamedEdges](this.name) - } - parent.children.set(this.name, this) - this[_parent] = parent - // don't do it for links, because they don't have a target yet - // we'll hit them up a bit later on. - if (!this.isLink) { - parent[_reloadNamedEdges](this.name) - } - } else { - /* istanbul ignore if - should be impossible, since we break - * all fsParent/child relationships when moving? */ - if (this.fsParent) { - this.fsParent.fsChildren.delete(this) - } - parent.fsChildren.add(this) - this[_fsParent] = parent - } - break - } - } - - // if it doesn't have a parent, it's a top node - if (!this.parent) { - root.tops.add(this) - } else { - root.tops.delete(this) - } - - // assign parentage for any nodes that need to have this as a parent - // this can happen when we have a node at nm/a/nm/b added *before* - // the node at nm/a, which might have the root node as a fsParent. - // we can't rely on the public setter here, because it calls into - // this function to set up these references! - // check dirname so that /foo isn't treated as the fsparent of /foo-bar - const nmloc = `${this.location}${this.location ? '/' : ''}node_modules/` - // only walk top nodes, since anything else already has a parent. - for (const child of root.tops) { - const isChild = child.location === nmloc + child.name - const isFsChild = - dirname(child.path).startsWith(this.path) && - child !== this && - !child.parent && - ( - !child.fsParent || - child.fsParent === this || - dirname(this.path).startsWith(child.fsParent.path) - ) - - if (!isChild && !isFsChild) { - continue - } - - // set up the internal parentage links - if (this.isLink) { - child.root = null - } else { - // can't possibly have a parent, because it's in tops - if (child.fsParent) { - child.fsParent.fsChildren.delete(child) - } - child[_fsParent] = null - if (isChild) { - this.children.set(child.name, child) - child[_parent] = this - root.tops.delete(child) - } else { - this.fsChildren.add(child) - child[_fsParent] = this - } - } - } - - // look for any nodes with the same realpath. either they're links - // to that realpath, or a thing at that realpath if we're adding a link - // (if we're adding a regular node, we already deleted the old one) - for (const node of root.inventory.query('realpath', this.realpath)) { - if (node === this) { - continue - } - - /* istanbul ignore next - should be impossible */ - debug(() => { - if (node.root !== root) { - throw new Error('inventory contains node from other root') - } - }) - - if (this.isLink) { - const target = node.target - this[_target] = target - this[_package] = target.package - target.linksIn.add(this) - // reload edges here, because now we have a target - if (this.parent) { - this.parent[_reloadNamedEdges](this.name) - } - break - } else { - /* istanbul ignore else - should be impossible */ - if (node.isLink) { - node[_target] = this - node[_package] = this.package - this.linksIn.add(node) - if (node.parent) { - node.parent[_reloadNamedEdges](node.name) - } - } else { - debug(() => { - throw Object.assign(new Error('duplicate node in root setter'), { - path: this.path, - realpath: this.realpath, - root: root.realpath, - }) - }) - } - } - } - } - - // reload all edgesIn where the root doesn't match, so we don't have - // cross-tree dependency graphs - for (const edge of this.edgesIn) { - if (edge.from.root !== root) { - edge.reload() - } - } - // reload all edgesOut where root doens't match, or is missing, since - // it might not be missing in the new tree - for (const edge of this.edgesOut.values()) { - if (!edge.to || edge.to.root !== root) { - edge.reload() - } - } - - // now make sure our family comes along for the ride! - const family = new Set([ - ...this.fsChildren, - ...this.children.values(), - ...this.inventory.values(), - ].filter(n => n !== this)) - - for (const child of family) { - if (child.root !== root) { - child[_delistFromMeta]() - child[_parent] = null - this.children.delete(child.name) - child[_fsParent] = null - this.fsChildren.delete(child) - for (const l of child.linksIn) { - l[_target] = null - child.linksIn.delete(l) - } - } - } - for (const child of family) { - if (child.root !== root) { - child.root = root - } - } - - // if we had a target, and didn't find one in the new root, then bring - // it over as well, but only if we're setting the link into a new root, - // as we don't want to lose the target any time we remove a link. - if (this.isLink && target && !this.target && root !== this) { - target.root = root - } - - if (!this.overrides && this.parent && this.parent.overrides) { - this.overrides = this.parent.overrides.getNodeRule(this) - } - // tree should always be valid upon root setter completion. - treeCheck(this) - if (this !== root) { - treeCheck(root) - } - } - - get root () { - return this.#root || this - } - - #loadWorkspaces () { - if (!this.#workspaces) { - return - } - - for (const [name, path] of this.#workspaces.entries()) { - new Edge({ from: this, name, spec: `file:${path.replace(/#/g, '%23')}`, type: 'workspace' }) - } - } - - [_loadDeps] () { - // Caveat! Order is relevant! - // Packages in optionalDependencies are optional. - // Packages in both deps and devDeps are required. - // Note the subtle breaking change from v6: it is no longer possible - // to have a different spec for a devDep than production dep. - - // Linked targets that are disconnected from the tree are tops, - // but don't have a 'path' field, only a 'realpath', because we - // don't know their canonical location. We don't need their devDeps. - const pd = this.package.peerDependencies - const ad = this.package.acceptDependencies || {} - if (pd && typeof pd === 'object' && !this.legacyPeerDeps) { - const pm = this.package.peerDependenciesMeta || {} - const peerDependencies = {} - const peerOptional = {} - for (const [name, dep] of Object.entries(pd)) { - if (pm[name]?.optional) { - peerOptional[name] = dep - } else { - peerDependencies[name] = dep - } - } - this.#loadDepType(peerDependencies, 'peer', ad) - this.#loadDepType(peerOptional, 'peerOptional', ad) - } - - this.#loadDepType(this.package.dependencies, 'prod', ad) - this.#loadDepType(this.package.optionalDependencies, 'optional', ad) - - const { globalTop, isTop, path, sourceReference } = this - const { - globalTop: srcGlobalTop, - isTop: srcTop, - path: srcPath, - } = sourceReference || {} - const thisDev = isTop && !globalTop && path - const srcDev = !sourceReference || srcTop && !srcGlobalTop && srcPath - if (thisDev && srcDev) { - this.#loadDepType(this.package.devDependencies, 'dev', ad) - } - } - - #loadDepType (deps, type, ad) { - // Because of the order in which _loadDeps runs, we always want to - // prioritize a new edge over an existing one - for (const [name, spec] of Object.entries(deps || {})) { - const current = this.edgesOut.get(name) - if (!current || current.type !== 'workspace') { - new Edge({ from: this, name, spec, accept: ad[name], type }) - } - } - } - - get fsParent () { - // in debug setter prevents fsParent from being this - return this[_fsParent] - } - - set fsParent (fsParent) { - if (!fsParent) { - if (this[_fsParent]) { - this.root = null - } - return - } - - debug(() => { - if (fsParent === this) { - throw new Error('setting node to its own fsParent') - } - - if (fsParent.realpath === this.realpath) { - throw new Error('setting fsParent to same path') - } - - // the initial set MUST be an actual walk-up from the realpath - // subsequent sets will re-root on the new fsParent's path. - if (!this[_fsParent] && this.realpath.indexOf(fsParent.realpath) !== 0) { - throw Object.assign(new Error('setting fsParent improperly'), { - path: this.path, - realpath: this.realpath, - fsParent: { - path: fsParent.path, - realpath: fsParent.realpath, - }, - }) - } - }) - - if (fsParent.isLink) { - fsParent = fsParent.target - } - - // setting a thing to its own fsParent is not normal, but no-op for safety - if (this === fsParent || fsParent.realpath === this.realpath) { - return - } - - // nothing to do - if (this[_fsParent] === fsParent) { - return - } - - const oldFsParent = this[_fsParent] - const newPath = !oldFsParent ? this.path - : resolve(fsParent.path, relative(oldFsParent.path, this.path)) - const nmPath = resolve(fsParent.path, 'node_modules', this.name) - - // this is actually the parent, set that instead - if (newPath === nmPath) { - this.parent = fsParent - return - } - - const pathChange = newPath !== this.path - - // remove from old parent/fsParent - const oldParent = this.parent - const oldName = this.name - if (this.parent) { - this.parent.children.delete(this.name) - this[_parent] = null - } - if (this.fsParent) { - this.fsParent.fsChildren.delete(this) - this[_fsParent] = null - } - - // update this.path/realpath for this and all children/fsChildren - if (pathChange) { - this[_changePath](newPath) - } - - if (oldParent) { - oldParent[_reloadNamedEdges](oldName) - } - - // clobbers anything at that path, resets all appropriate references - this.root = fsParent.root - } - - // is it safe to replace one node with another? check the edges to - // make sure no one will get upset. Note that the node might end up - // having its own unmet dependencies, if the new node has new deps. - // Note that there are cases where Arborist will opt to insert a node - // into the tree even though this function returns false! This is - // necessary when a root dependency is added or updated, or when a - // root dependency brings peer deps along with it. In that case, we - // will go ahead and create the invalid state, and then try to resolve - // it with more tree construction, because it's a user request. - canReplaceWith (node, ignorePeers) { - if (node.name !== this.name) { - return false - } - - if (node.packageName !== this.packageName) { - return false - } - - // XXX need to check for two root nodes? - if (node.overrides !== this.overrides) { - return false - } - ignorePeers = new Set(ignorePeers) - - // gather up all the deps of this node and that are only depended - // upon by deps of this node. those ones don't count, since - // they'll be replaced if this node is replaced anyway. - const depSet = gatherDepSet([this], e => e.to !== this && e.valid) - - for (const edge of this.edgesIn) { - // when replacing peer sets, we need to be able to replace the entire - // peer group, which means we ignore incoming edges from other peers - // within the replacement set. - if (!this.isTop && - edge.from.parent === this.parent && - edge.peer && - ignorePeers.has(edge.from.name)) { - continue - } - - // only care about edges that don't originate from this node - if (!depSet.has(edge.from) && !edge.satisfiedBy(node)) { - return false - } - } - - return true - } - - canReplace (node, ignorePeers) { - return node.canReplaceWith(this, ignorePeers) - } - - // return true if it's safe to remove this node, because anything that - // is depending on it would be fine with the thing that they would resolve - // to if it was removed, or nothing is depending on it in the first place. - canDedupe (preferDedupe = false) { - // not allowed to mess with shrinkwraps or bundles - if (this.inDepBundle || this.inShrinkwrap) { - return false - } - - // it's a top level pkg, or a dep of one - if (!this.resolveParent || !this.resolveParent.resolveParent) { - return false - } - - // no one wants it, remove it - if (this.edgesIn.size === 0) { - return true - } - - const other = this.resolveParent.resolveParent.resolve(this.name) - - // nothing else, need this one - if (!other) { - return false - } - - // if it's the same thing, then always fine to remove - if (other.matches(this)) { - return true - } - - // if the other thing can't replace this, then skip it - if (!other.canReplace(this)) { - return false - } - - // if we prefer dedupe, or if the version is greater/equal, take the other - if (preferDedupe || semver.gte(other.version, this.version)) { - return true - } - - return false - } - - satisfies (requested) { - if (requested instanceof Edge) { - return this.name === requested.name && requested.satisfiedBy(this) - } - - const parsed = npa(requested) - const { name = this.name, rawSpec: spec } = parsed - return this.name === name && this.satisfies(new Edge({ - from: new Node({ path: this.root.realpath }), - type: 'prod', - name, - spec, - })) - } - - matches (node) { - // if the nodes are literally the same object, obviously a match. - if (node === this) { - return true - } - - // if the names don't match, they're different things, even if - // the package contents are identical. - if (node.name !== this.name) { - return false - } - - // if they're links, they match if the targets match - if (this.isLink) { - return node.isLink && this.target.matches(node.target) - } - - // if they're two project root nodes, they're different if the paths differ - if (this.isProjectRoot && node.isProjectRoot) { - return this.path === node.path - } - - // if the integrity matches, then they're the same. - if (this.integrity && node.integrity) { - return this.integrity === node.integrity - } - - // if no integrity, check resolved - if (this.resolved && node.resolved) { - return this.resolved === node.resolved - } - - // if no resolved, check both package name and version - // otherwise, conclude that they are different things - return this.packageName && node.packageName && - this.packageName === node.packageName && - this.version && node.version && - this.version === node.version - } - - // replace this node with the supplied argument - // Useful when mutating an ideal tree, so we can avoid having to call - // the parent/root setters more than necessary. - replaceWith (node) { - node.replace(this) - } - - replace (node) { - this[_delistFromMeta]() - - // if the name matches, but is not identical, we are intending to clobber - // something case-insensitively, so merely setting name and path won't - // have the desired effect. just set the path so it'll collide in the - // parent's children map, and leave it at that. - if (node.parent?.children.get(this.name) === node) { - this.path = resolve(node.parent.path, 'node_modules', this.name) - } else { - this.path = node.path - this.name = node.name - } - - if (!this.isLink) { - this.realpath = this.path - } - this[_refreshLocation]() - - // keep children when a node replaces another - if (!this.isLink) { - for (const kid of node.children.values()) { - kid.parent = this - } - if (node.isLink && node.target) { - node.target.root = null - } - } - - if (!node.isRoot) { - this.root = node.root - } - - treeCheck(this) - } - - get inShrinkwrap () { - return this.parent && - (this.parent.hasShrinkwrap || this.parent.inShrinkwrap) - } - - get parent () { - // setter prevents _parent from being this - return this[_parent] - } - - // This setter keeps everything in order when we move a node from - // one point in a logical tree to another. Edges get reloaded, - // metadata updated, etc. It's also called when we *replace* a node - // with another by the same name (eg, to update or dedupe). - // This does a couple of walks out on the node_modules tree, recursing - // into child nodes. However, as setting the parent is typically done - // with nodes that don't have have many children, and (deduped) package - // trees tend to be broad rather than deep, it's not that bad. - // The only walk that starts from the parent rather than this node is - // limited by edge name. - set parent (parent) { - // when setting to null, just remove it from the tree entirely - if (!parent) { - // but only delete it if we actually had a parent in the first place - // otherwise it's just setting to null when it's already null - if (this[_parent]) { - this.root = null - } - return - } - - if (parent.isLink) { - parent = parent.target - } - - // setting a thing to its own parent is not normal, but no-op for safety - if (this === parent) { - return - } - - const oldParent = this[_parent] - - // nothing to do - if (oldParent === parent) { - return - } - - // ok now we know something is actually changing, and parent is not a link - const newPath = resolve(parent.path, 'node_modules', this.name) - const pathChange = newPath !== this.path - - // remove from old parent/fsParent - if (oldParent) { - oldParent.children.delete(this.name) - this[_parent] = null - } - if (this.fsParent) { - this.fsParent.fsChildren.delete(this) - this[_fsParent] = null - } - - // update this.path/realpath for this and all children/fsChildren - if (pathChange) { - this[_changePath](newPath) - } - - if (parent.overrides) { - this.overrides = parent.overrides.getNodeRule(this) - } - - // clobbers anything at that path, resets all appropriate references - this.root = parent.root - } - - // Call this before changing path or updating the _root reference. - // Removes the node from its root the metadata and inventory. - [_delistFromMeta] () { - const root = this.root - if (!root.realpath || !this.path) { - return - } - root.inventory.delete(this) - root.tops.delete(this) - if (root.meta) { - root.meta.delete(this.path) - } - /* istanbul ignore next - should be impossible */ - debug(() => { - if ([...root.inventory.values()].includes(this)) { - throw new Error('failed to delist') - } - }) - } - - // update this.path/realpath and the paths of all children/fsChildren - [_changePath] (newPath) { - // have to de-list before changing paths - this[_delistFromMeta]() - const oldPath = this.path - this.path = newPath - const namePattern = /(?:^|\/|\\)node_modules[\\/](@[^/\\]+[\\/][^\\/]+|[^\\/]+)$/ - const nameChange = newPath.match(namePattern) - if (nameChange && this.name !== nameChange[1]) { - this.name = nameChange[1].replace(/\\/g, '/') - } - - // if we move a link target, update link realpaths - if (!this.isLink) { - this.realpath = newPath - for (const link of this.linksIn) { - link[_delistFromMeta]() - link.realpath = newPath - link[_refreshLocation]() - } - } - // if we move /x to /y, then a module at /x/a/b becomes /y/a/b - for (const child of this.fsChildren) { - child[_changePath](resolve(newPath, relative(oldPath, child.path))) - } - for (const [name, child] of this.children.entries()) { - child[_changePath](resolve(newPath, 'node_modules', name)) - } - - this[_refreshLocation]() - } - - // Called whenever the root/parent is changed. - // NB: need to remove from former root's meta/inventory and then update - // this.path BEFORE calling this method! - [_refreshLocation] () { - const root = this.root - const loc = relpath(root.realpath, this.path) - - this.location = loc - - root.inventory.add(this) - if (root.meta) { - root.meta.add(this) - } - } - - assertRootOverrides () { - if (!this.isProjectRoot || !this.overrides) { - return - } - - for (const edge of this.edgesOut.values()) { - // if these differ an override has been applied, those are not allowed - // for top level dependencies so throw an error - if (edge.spec !== edge.rawSpec && !edge.spec.startsWith('$')) { - throw Object.assign(new Error(`Override for ${edge.name}@${edge.rawSpec} conflicts with direct dependency`), { code: 'EOVERRIDE' }) - } - } - } - - addEdgeOut (edge) { - if (this.overrides) { - edge.overrides = this.overrides.getEdgeRule(edge) - } - - this.edgesOut.set(edge.name, edge) - } - - addEdgeIn (edge) { - if (edge.overrides) { - this.overrides = edge.overrides - } - - this.edgesIn.add(edge) - - // try to get metadata from the yarn.lock file - if (this.root.meta) { - this.root.meta.addEdge(edge) - } - } - - [_reloadNamedEdges] (name, rootLoc = this.location) { - const edge = this.edgesOut.get(name) - // if we don't have an edge, do nothing, but keep descending - const rootLocResolved = edge && edge.to && - edge.to.location === `${rootLoc}/node_modules/${edge.name}` - const sameResolved = edge && this.resolve(name) === edge.to - const recheck = rootLocResolved || !sameResolved - if (edge && recheck) { - edge.reload(true) - } - for (const c of this.children.values()) { - c[_reloadNamedEdges](name, rootLoc) - } - - for (const c of this.fsChildren) { - c[_reloadNamedEdges](name, rootLoc) - } - } - - get isLink () { - return false - } - - get target () { - return this - } - - set target (n) { - debug(() => { - throw Object.assign(new Error('cannot set target on non-Link Nodes'), { - path: this.path, - }) - }) - } - - get depth () { - if (this.isTop) { - return 0 - } - return this.parent.depth + 1 - } - - get isTop () { - return !this.parent || this.globalTop - } - - get top () { - if (this.isTop) { - return this - } - return this.parent.top - } - - get isFsTop () { - return !this.fsParent - } - - get fsTop () { - if (this.isFsTop) { - return this - } - return this.fsParent.fsTop - } - - get resolveParent () { - return this.parent || this.fsParent - } - - resolve (name) { - /* istanbul ignore next - should be impossible, - * but I keep doing this mistake in tests */ - debug(() => { - if (typeof name !== 'string' || !name) { - throw new Error('non-string passed to Node.resolve') - } - }) - const mine = this.children.get(name) - if (mine) { - return mine - } - const resolveParent = this.resolveParent - if (resolveParent) { - return resolveParent.resolve(name) - } - return null - } - - inNodeModules () { - const rp = this.realpath - const name = this.name - const scoped = name.charAt(0) === '@' - const d = dirname(rp) - const nm = scoped ? dirname(d) : d - const dir = dirname(nm) - const base = scoped ? `${basename(d)}/${basename(rp)}` : basename(rp) - return base === name && basename(nm) === 'node_modules' ? dir : false - } - - // maybe accept both string value or array of strings - // seems to be what dom API does - querySelectorAll (query, opts) { - return querySelectorAll(this, query, opts) - } - - toJSON () { - return printableTree(this) - } - - [util.inspect.custom] () { - return this.toJSON() - } -} - -module.exports = Node diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/optional-set.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/optional-set.js deleted file mode 100644 index 9f5184e..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/optional-set.js +++ /dev/null @@ -1,38 +0,0 @@ -// when an optional dep fails to install, we need to remove the branch of the -// graph up to the first optionalDependencies, as well as any nodes that are -// only required by other nodes in the set. -// -// This function finds the set of nodes that will need to be removed in that -// case. -// -// Note that this is *only* going to work with trees where calcDepFlags -// has been called, because we rely on the node.optional flag. - -const gatherDepSet = require('./gather-dep-set.js') -const optionalSet = node => { - if (!node.optional) { - return new Set() - } - - // start with the node, then walk up the dependency graph until we - // get to the boundaries that define the optional set. since the - // node is optional, we know that all paths INTO this area of the - // graph are optional, but there may be non-optional dependencies - // WITHIN the area. - const set = new Set([node]) - for (const node of set) { - for (const edge of node.edgesIn) { - if (!edge.optional) { - set.add(edge.from) - } - } - } - - // now that we've hit the boundary, gather the rest of the nodes in - // the optional section. that's the set of dependencies that are only - // depended upon by other nodes within the set, or optional dependencies - // from outside the set. - return gatherDepSet(set, edge => !edge.optional) -} - -module.exports = optionalSet diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/override-resolves.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/override-resolves.js deleted file mode 100644 index c061cbc..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/override-resolves.js +++ /dev/null @@ -1,11 +0,0 @@ -function overrideResolves (resolved, opts) { - const { omitLockfileRegistryResolved = false } = opts - - if (omitLockfileRegistryResolved) { - return undefined - } - - return resolved -} - -module.exports = { overrideResolves } diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/override-set.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/override-set.js deleted file mode 100644 index bfc5a5d..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/override-set.js +++ /dev/null @@ -1,147 +0,0 @@ -const npa = require('npm-package-arg') -const semver = require('semver') - -class OverrideSet { - constructor ({ overrides, key, parent }) { - this.parent = parent - this.children = new Map() - - if (typeof overrides === 'string') { - overrides = { '.': overrides } - } - - // change a literal empty string to * so we can use truthiness checks on - // the value property later - if (overrides['.'] === '') { - overrides['.'] = '*' - } - - if (parent) { - const spec = npa(key) - if (!spec.name) { - throw new Error(`Override without name: ${key}`) - } - - this.name = spec.name - spec.name = '' - this.key = key - this.keySpec = spec.toString() - this.value = overrides['.'] || this.keySpec - } - - for (const [key, childOverrides] of Object.entries(overrides)) { - if (key === '.') { - continue - } - - const child = new OverrideSet({ - parent: this, - key, - overrides: childOverrides, - }) - - this.children.set(child.key, child) - } - } - - getEdgeRule (edge) { - for (const rule of this.ruleset.values()) { - if (rule.name !== edge.name) { - continue - } - - // if keySpec is * we found our override - if (rule.keySpec === '*') { - return rule - } - - let spec = npa(`${edge.name}@${edge.spec}`) - if (spec.type === 'alias') { - spec = spec.subSpec - } - - if (spec.type === 'git') { - if (spec.gitRange && semver.intersects(spec.gitRange, rule.keySpec)) { - return rule - } - - continue - } - - if (spec.type === 'range' || spec.type === 'version') { - if (semver.intersects(spec.fetchSpec, rule.keySpec)) { - return rule - } - - continue - } - - // if we got this far, the spec type is one of tag, directory or file - // which means we have no real way to make version comparisons, so we - // just accept the override - return rule - } - - return this - } - - getNodeRule (node) { - for (const rule of this.ruleset.values()) { - if (rule.name !== node.name) { - continue - } - - if (semver.satisfies(node.version, rule.keySpec) || - semver.satisfies(node.version, rule.value)) { - return rule - } - } - - return this - } - - getMatchingRule (node) { - for (const rule of this.ruleset.values()) { - if (rule.name !== node.name) { - continue - } - - if (semver.satisfies(node.version, rule.keySpec) || - semver.satisfies(node.version, rule.value)) { - return rule - } - } - - return null - } - - * ancestry () { - for (let ancestor = this; ancestor; ancestor = ancestor.parent) { - yield ancestor - } - } - - get isRoot () { - return !this.parent - } - - get ruleset () { - const ruleset = new Map() - - for (const override of this.ancestry()) { - for (const kid of override.children.values()) { - if (!ruleset.has(kid.key)) { - ruleset.set(kid.key, kid) - } - } - - if (!override.isRoot && !ruleset.has(override.key)) { - ruleset.set(override.key, override) - } - } - - return ruleset - } -} - -module.exports = OverrideSet diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js deleted file mode 100644 index a2da8c8..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/peer-entry-sets.js +++ /dev/null @@ -1,77 +0,0 @@ -// Given a node in a tree, return all of the peer dependency sets that -// it is a part of, with the entry (top or non-peer) edges into the sets -// identified. -// -// With this information, we can determine whether it is appropriate to -// replace the entire peer set with another (and remove the old one), -// push the set deeper into the tree, and so on. -// -// Returns a Map of { edge => Set(peerNodes) }, - -const peerEntrySets = node => { - // this is the union of all peer groups that the node is a part of - // later, we identify all of the entry edges, and create a set of - // 1 or more overlapping sets that this node is a part of. - const unionSet = new Set([node]) - for (const node of unionSet) { - for (const edge of node.edgesOut.values()) { - if (edge.valid && edge.peer && edge.to) { - unionSet.add(edge.to) - } - } - for (const edge of node.edgesIn) { - if (edge.valid && edge.peer) { - unionSet.add(edge.from) - } - } - } - const entrySets = new Map() - for (const peer of unionSet) { - for (const edge of peer.edgesIn) { - // if not valid, it doesn't matter anyway. either it's been previously - // peerConflicted, or it's the thing we're interested in replacing. - if (!edge.valid) { - continue - } - // this is the entry point into the peer set - if (!edge.peer || edge.from.isTop) { - // get the subset of peer brought in by this peer entry edge - const sub = new Set([peer]) - for (const peer of sub) { - for (const edge of peer.edgesOut.values()) { - if (edge.valid && edge.peer && edge.to) { - sub.add(edge.to) - } - } - } - // if this subset does not include the node we are focused on, - // then it is not relevant for our purposes. Example: - // - // a -> (b, c, d) - // b -> PEER(d) b -> d -> e -> f <-> g - // c -> PEER(f, h) c -> (f <-> g, h -> g) - // d -> PEER(e) d -> e -> f <-> g - // e -> PEER(f) - // f -> PEER(g) - // g -> PEER(f) - // h -> PEER(g) - // - // The unionSet(e) will include c, but we don't actually care about - // it. We only expanded to the edge of the peer nodes in order to - // find the entry edges that caused the inclusion of peer sets - // including (e), so we want: - // Map{ - // Edge(a->b) => Set(b, d, e, f, g) - // Edge(a->d) => Set(d, e, f, g) - // } - if (sub.has(node)) { - entrySets.set(edge, sub) - } - } - } - } - - return entrySets -} - -module.exports = peerEntrySets diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js deleted file mode 100644 index e757d0c..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js +++ /dev/null @@ -1,569 +0,0 @@ -// Given a dep, a node that depends on it, and the edge representing that -// dependency, place the dep somewhere in the node's tree, and all of its -// peer dependencies. -// -// Handles all of the tree updating needed to place the dep, including -// removing replaced nodes, pruning now-extraneous or invalidated nodes, -// and saves a set of what was placed and what needs re-evaluation as -// a result. - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const log = require('proc-log') -const { cleanUrl } = require('npm-registry-fetch') -const deepestNestingTarget = require('./deepest-nesting-target.js') -const CanPlaceDep = require('./can-place-dep.js') -const { - KEEP, - CONFLICT, -} = CanPlaceDep -const debug = require('./debug.js') - -const Link = require('./link.js') -const gatherDepSet = require('./gather-dep-set.js') -const peerEntrySets = require('./peer-entry-sets.js') - -class PlaceDep { - constructor (options) { - this.auditReport = options.auditReport - this.dep = options.dep - this.edge = options.edge - this.explicitRequest = options.explicitRequest - this.force = options.force - this.installLinks = options.installLinks - this.installStrategy = options.installStrategy - this.legacyPeerDeps = options.legacyPeerDeps - this.parent = options.parent || null - this.preferDedupe = options.preferDedupe - this.strictPeerDeps = options.strictPeerDeps - this.updateNames = options.updateNames - - this.canPlace = null - this.canPlaceSelf = null - // XXX this only appears to be used by tests - this.checks = new Map() - this.children = [] - this.needEvaluation = new Set() - this.peerConflict = null - this.placed = null - this.target = null - - this.current = this.edge.to - this.name = this.edge.name - this.top = this.parent?.top || this - - // nothing to do if the edge is fine as it is - if (this.edge.to && - !this.edge.error && - !this.explicitRequest && - !this.updateNames.includes(this.edge.name) && - !this.auditReport?.isVulnerable(this.edge.to)) { - return - } - - // walk up the tree until we hit either a top/root node, or a place - // where the dep is not a peer dep. - const start = this.getStartNode() - - for (const target of start.ancestry()) { - // if the current location has a peerDep on it, then we can't place here - // this is pretty rare to hit, since we always prefer deduping peers, - // and the getStartNode will start us out above any peers from the - // thing that depends on it. but we could hit it with something like: - // - // a -> (b@1, c@1) - // +-- c@1 - // +-- b -> PEEROPTIONAL(v) (c@2) - // +-- c@2 -> (v) - // - // So we check if we can place v under c@2, that's fine. - // Then we check under b, and can't, because of the optional peer dep. - // but we CAN place it under a, so the correct thing to do is keep - // walking up the tree. - const targetEdge = target.edgesOut.get(this.edge.name) - if (!target.isTop && targetEdge && targetEdge.peer) { - continue - } - - const cpd = new CanPlaceDep({ - dep: this.dep, - edge: this.edge, - // note: this sets the parent's canPlace as the parent of this - // canPlace, but it does NOT add this canPlace to the parent's - // children. This way, we can know that it's a peer dep, and - // get the top edge easily, while still maintaining the - // tree of checks that factored into the original decision. - parent: this.parent && this.parent.canPlace, - target, - preferDedupe: this.preferDedupe, - explicitRequest: this.explicitRequest, - }) - this.checks.set(target, cpd) - - // It's possible that a "conflict" is a conflict among the *peers* of - // a given node we're trying to place, but there actually is no current - // node. Eg, - // root -> (a, b) - // a -> PEER(c) - // b -> PEER(d) - // d -> PEER(c@2) - // We place (a), and get a peer of (c) along with it. - // then we try to place (b), and get CONFLICT in the check, because - // of the conflicting peer from (b)->(d)->(c@2). In that case, we - // should treat (b) and (d) as OK, and place them in the last place - // where they did not themselves conflict, and skip c@2 if conflict - // is ok by virtue of being forced or not ours and not strict. - if (cpd.canPlaceSelf !== CONFLICT) { - this.canPlaceSelf = cpd - } - - // we found a place this can go, along with all its peer friends. - // we break when we get the first conflict - if (cpd.canPlace !== CONFLICT) { - this.canPlace = cpd - } else { - break - } - - // if it's a load failure, just plop it in the first place attempted, - // since we're going to crash the build or prune it out anyway. - // but, this will frequently NOT be a successful canPlace, because - // it'll have no version or other information. - if (this.dep.errors.length) { - break - } - - // nest packages like npm v1 and v2 - // very disk-inefficient - if (this.installStrategy === 'nested') { - break - } - - // when installing globally, or just in global style, we never place - // deps above the first level. - if (this.installStrategy === 'shallow') { - const rp = target.resolveParent - if (rp && rp.isProjectRoot) { - break - } - } - } - - // if we can't find a target, that means that the last place checked, - // and all the places before it, had a conflict. - if (!this.canPlace) { - // if not forced, and it's our dep, or strictPeerDeps is set, then - // this is an ERESOLVE error. - if (!this.force && (this.isMine || this.strictPeerDeps)) { - return this.failPeerConflict() - } - - // ok! we're gonna allow the conflict, but we should still warn - // if we have a current, then we treat CONFLICT as a KEEP. - // otherwise, we just skip it. Only warn on the one that actually - // could not be placed somewhere. - if (!this.canPlaceSelf) { - this.warnPeerConflict() - return - } - - this.canPlace = this.canPlaceSelf - } - - // now we have a target, a tree of CanPlaceDep results for the peer group, - // and we are ready to go - - /* istanbul ignore next */ - if (!this.canPlace) { - debug(() => { - throw new Error('canPlace not set, but trying to place in tree') - }) - return - } - - const { target } = this.canPlace - - log.silly( - 'placeDep', - target.location || 'ROOT', - `${this.dep.name}@${this.dep.version}`, - this.canPlace.description, - `for: ${this.edge.from.package._id || this.edge.from.location}`, - `want: ${cleanUrl(this.edge.spec || '*')}` - ) - - const placementType = this.canPlace.canPlace === CONFLICT - ? this.canPlace.canPlaceSelf - : this.canPlace.canPlace - - // if we're placing in the tree with --force, we can get here even though - // it's a conflict. Treat it as a KEEP, but warn and move on. - if (placementType === KEEP) { - // this was a peerConflicted peer dep - if (this.edge.peer && !this.edge.valid) { - this.warnPeerConflict() - } - - // if we get a KEEP in a update scenario, then we MAY have something - // already duplicating this unnecessarily! For example: - // ``` - // root (dep: y@1) - // +-- x (dep: y@1.1) - // | +-- y@1.1.0 (replacing with 1.1.2, got KEEP at the root) - // +-- y@1.1.2 (updated already from 1.0.0) - // ``` - // Now say we do `reify({update:['y']})`, and the latest version is - // 1.1.2, which we now have in the root. We'll try to place y@1.1.2 - // first in x, then in the root, ending with KEEP, because we already - // have it. In that case, we ought to REMOVE the nm/x/nm/y node, because - // it is an unnecessary duplicate. - this.pruneDedupable(target) - return - } - - // we were told to place it here in the target, so either it does not - // already exist in the tree, OR it's shadowed. - // handle otherwise unresolvable dependency nesting loops by - // creating a symbolic link - // a1 -> b1 -> a2 -> b2 -> a1 -> ... - // instead of nesting forever, when the loop occurs, create - // a symbolic link to the earlier instance - for (let p = target; p; p = p.resolveParent) { - if (p.matches(this.dep) && !p.isTop) { - this.placed = new Link({ parent: target, target: p }) - return - } - } - - // XXX if we are replacing SOME of a peer entry group, we will need to - // remove any that are not being replaced and will now be invalid, and - // re-evaluate them deeper into the tree. - - const virtualRoot = this.dep.parent - this.placed = new this.dep.constructor({ - name: this.dep.name, - pkg: this.dep.package, - resolved: this.dep.resolved, - integrity: this.dep.integrity, - installLinks: this.installLinks, - legacyPeerDeps: this.legacyPeerDeps, - error: this.dep.errors[0], - ...(this.dep.overrides ? { overrides: this.dep.overrides } : {}), - ...(this.dep.isLink ? { target: this.dep.target, realpath: this.dep.realpath } : {}), - }) - - this.oldDep = target.children.get(this.name) - if (this.oldDep) { - this.replaceOldDep() - } else { - this.placed.parent = target - } - - // if it's a peerConflicted peer dep, warn about it - if (this.edge.peer && !this.placed.satisfies(this.edge)) { - this.warnPeerConflict() - } - - // If the edge is not an error, then we're updating something, and - // MAY end up putting a better/identical node further up the tree in - // a way that causes an unnecessary duplication. If so, remove the - // now-unnecessary node. - if (this.edge.valid && this.edge.to && this.edge.to !== this.placed) { - this.pruneDedupable(this.edge.to, false) - } - - // in case we just made some duplicates that can be removed, - // prune anything deeper in the tree that can be replaced by this - for (const node of target.root.inventory.query('name', this.name)) { - if (node.isDescendantOf(target) && !node.isTop) { - this.pruneDedupable(node, false) - // only walk the direct children of the ones we kept - if (node.root === target.root) { - for (const kid of node.children.values()) { - this.pruneDedupable(kid, false) - } - } - } - } - - // also place its unmet or invalid peer deps at this location - // loop through any peer deps from the thing we just placed, and place - // those ones as well. it's safe to do this with the virtual nodes, - // because we're copying rather than moving them out of the virtual root, - // otherwise they'd be gone and the peer set would change throughout - // this loop. - for (const peerEdge of this.placed.edgesOut.values()) { - if (peerEdge.valid || !peerEdge.peer || peerEdge.peerConflicted) { - continue - } - - const peer = virtualRoot.children.get(peerEdge.name) - - // Note: if the virtualRoot *doesn't* have the peer, then that means - // it's an optional peer dep. If it's not being properly met (ie, - // peerEdge.valid is false), then this is likely heading for an - // ERESOLVE error, unless it can walk further up the tree. - if (!peer) { - continue - } - - // peerConflicted peerEdge, just accept what's there already - if (!peer.satisfies(peerEdge)) { - continue - } - - this.children.push(new PlaceDep({ - auditReport: this.auditReport, - explicitRequest: this.explicitRequest, - force: this.force, - installLinks: this.installLinks, - installStrategy: this.installStrategy, - legacyPeerDeps: this.legaycPeerDeps, - preferDedupe: this.preferDedupe, - strictPeerDeps: this.strictPeerDeps, - updateNames: this.updateName, - parent: this, - dep: peer, - node: this.placed, - edge: peerEdge, - })) - } - } - - replaceOldDep () { - const target = this.oldDep.parent - - // XXX handle replacing an entire peer group? - // what about cases where we need to push some other peer groups deeper - // into the tree? all the tree updating should be done here, and track - // all the things that we add and remove, so that we can know what - // to re-evaluate. - - // if we're replacing, we should also remove any nodes for edges that - // are now invalid, and where this (or its deps) is the only dependent, - // and also recurse on that pruning. Otherwise leaving that dep node - // around can result in spurious conflicts pushing nodes deeper into - // the tree than needed in the case of cycles that will be removed - // later anyway. - const oldDeps = [] - for (const [name, edge] of this.oldDep.edgesOut.entries()) { - if (!this.placed.edgesOut.has(name) && edge.to) { - oldDeps.push(...gatherDepSet([edge.to], e => e.to !== edge.to)) - } - } - - // gather all peer edgesIn which are at this level, and will not be - // satisfied by the new dependency. Those are the peer sets that need - // to be either warned about (if they cannot go deeper), or removed and - // re-placed (if they can). - const prunePeerSets = [] - for (const edge of this.oldDep.edgesIn) { - if (this.placed.satisfies(edge) || - !edge.peer || - edge.from.parent !== target || - edge.peerConflicted) { - // not a peer dep, not invalid, or not from this level, so it's fine - // to just let it re-evaluate as a problemEdge later, or let it be - // satisfied by the new dep being placed. - continue - } - for (const entryEdge of peerEntrySets(edge.from).keys()) { - // either this one needs to be pruned and re-evaluated, or marked - // as peerConflicted and warned about. If the entryEdge comes in from - // the root or a workspace, then we have to leave it alone, and in that - // case, it will have already warned or crashed by getting to this point - const entryNode = entryEdge.to - const deepestTarget = deepestNestingTarget(entryNode) - if (deepestTarget !== target && - !(entryEdge.from.isProjectRoot || entryEdge.from.isWorkspace)) { - prunePeerSets.push(...gatherDepSet([entryNode], e => { - return e.to !== entryNode && !e.peerConflicted - })) - } else { - this.warnPeerConflict(edge, this.dep) - } - } - } - - this.placed.replace(this.oldDep) - this.pruneForReplacement(this.placed, oldDeps) - for (const dep of prunePeerSets) { - for (const edge of dep.edgesIn) { - this.needEvaluation.add(edge.from) - } - dep.root = null - } - } - - pruneForReplacement (node, oldDeps) { - // gather up all the now-invalid/extraneous edgesOut, as long as they are - // only depended upon by the old node/deps - const invalidDeps = new Set([...node.edgesOut.values()] - .filter(e => e.to && !e.valid).map(e => e.to)) - for (const dep of oldDeps) { - const set = gatherDepSet([dep], e => e.to !== dep && e.valid) - for (const dep of set) { - invalidDeps.add(dep) - } - } - - // ignore dependency edges from the node being replaced, but - // otherwise filter the set down to just the set with no - // dependencies from outside the set, except the node in question. - const deps = gatherDepSet(invalidDeps, edge => - edge.from !== node && edge.to !== node && edge.valid) - - // now just delete whatever's left, because it's junk - for (const dep of deps) { - dep.root = null - } - } - - // prune all the nodes in a branch of the tree that can be safely removed - // This is only the most basic duplication detection; it finds if there - // is another satisfying node further up the tree, and if so, dedupes. - // Even in installStategy is nested, we do this amount of deduplication. - pruneDedupable (node, descend = true) { - if (node.canDedupe(this.preferDedupe)) { - // gather up all deps that have no valid edges in from outside - // the dep set, except for this node we're deduping, so that we - // also prune deps that would be made extraneous. - const deps = gatherDepSet([node], e => e.to !== node && e.valid) - for (const node of deps) { - node.root = null - } - return - } - if (descend) { - // sort these so that they're deterministically ordered - // otherwise, resulting tree shape is dependent on the order - // in which they happened to be resolved. - const nodeSort = (a, b) => localeCompare(a.location, b.location) - - const children = [...node.children.values()].sort(nodeSort) - for (const child of children) { - this.pruneDedupable(child) - } - const fsChildren = [...node.fsChildren].sort(nodeSort) - for (const topNode of fsChildren) { - const children = [...topNode.children.values()].sort(nodeSort) - for (const child of children) { - this.pruneDedupable(child) - } - } - } - } - - get isMine () { - const { edge } = this.top - const { from: node } = edge - - if (node.isWorkspace || node.isProjectRoot) { - return true - } - - if (!edge.peer) { - return false - } - - // re-entry case. check if any non-peer edges come from the project, - // or any entryEdges on peer groups are from the root. - let hasPeerEdges = false - for (const edge of node.edgesIn) { - if (edge.peer) { - hasPeerEdges = true - continue - } - if (edge.from.isWorkspace || edge.from.isProjectRoot) { - return true - } - } - if (hasPeerEdges) { - for (const edge of peerEntrySets(node).keys()) { - if (edge.from.isWorkspace || edge.from.isProjectRoot) { - return true - } - } - } - - return false - } - - warnPeerConflict (edge, dep) { - edge = edge || this.edge - dep = dep || this.dep - edge.peerConflicted = true - const expl = this.explainPeerConflict(edge, dep) - log.warn('ERESOLVE', 'overriding peer dependency', expl) - } - - failPeerConflict (edge, dep) { - edge = edge || this.top.edge - dep = dep || this.top.dep - const expl = this.explainPeerConflict(edge, dep) - throw Object.assign(new Error('could not resolve'), expl) - } - - explainPeerConflict (edge, dep) { - const { from: node } = edge - const curNode = node.resolve(edge.name) - - // XXX decorate more with this.canPlace and this.canPlaceSelf, - // this.checks, this.children, walk over conflicted peers, etc. - const expl = { - code: 'ERESOLVE', - edge: edge.explain(), - dep: dep.explain(edge), - force: this.force, - isMine: this.isMine, - strictPeerDeps: this.strictPeerDeps, - } - - if (this.parent) { - // this is the conflicted peer - expl.current = curNode && curNode.explain(edge) - expl.peerConflict = this.current && this.current.explain(this.edge) - } else { - expl.current = curNode && curNode.explain() - if (this.canPlaceSelf && this.canPlaceSelf.canPlaceSelf !== CONFLICT) { - // failed while checking for a child dep - const cps = this.canPlaceSelf - for (const peer of cps.conflictChildren) { - if (peer.current) { - expl.peerConflict = { - current: peer.current.explain(), - peer: peer.dep.explain(peer.edge), - } - break - } - } - } else { - expl.peerConflict = { - current: this.current && this.current.explain(), - peer: this.dep.explain(this.edge), - } - } - } - - return expl - } - - getStartNode () { - // if we are a peer, then we MUST be at least as shallow as the peer - // dependent - const from = this.parent?.getStartNode() || this.edge.from - return deepestNestingTarget(from, this.name) - } - - // XXX this only appears to be used by tests - get allChildren () { - const set = new Set(this.children) - for (const child of set) { - for (const grandchild of child.children) { - set.add(grandchild) - } - } - return [...set] - } -} - -module.exports = PlaceDep diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/printable.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/printable.js deleted file mode 100644 index 7c8d52a..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/printable.js +++ /dev/null @@ -1,198 +0,0 @@ -// helper function to output a clearer visualization -// of the current node and its descendents -const localeCompare = require('@isaacs/string-locale-compare')('en') -const util = require('util') -const relpath = require('./relpath.js') - -class ArboristNode { - constructor (tree, path) { - this.name = tree.name - if (tree.packageName && tree.packageName !== this.name) { - this.packageName = tree.packageName - } - if (tree.version) { - this.version = tree.version - } - this.location = tree.location - this.path = tree.path - if (tree.realpath !== this.path) { - this.realpath = tree.realpath - } - if (tree.resolved !== null) { - this.resolved = tree.resolved - } - if (tree.extraneous) { - this.extraneous = true - } - if (tree.dev) { - this.dev = true - } - if (tree.optional) { - this.optional = true - } - if (tree.devOptional && !tree.dev && !tree.optional) { - this.devOptional = true - } - if (tree.peer) { - this.peer = true - } - if (tree.inBundle) { - this.bundled = true - } - if (tree.inDepBundle) { - this.bundler = tree.getBundler().location - } - if (tree.isProjectRoot) { - this.isProjectRoot = true - } - if (tree.isWorkspace) { - this.isWorkspace = true - } - const bd = tree.package && tree.package.bundleDependencies - if (bd && bd.length) { - this.bundleDependencies = bd - } - if (tree.inShrinkwrap) { - this.inShrinkwrap = true - } else if (tree.hasShrinkwrap) { - this.hasShrinkwrap = true - } - if (tree.error) { - this.error = treeError(tree.error) - } - if (tree.errors && tree.errors.length) { - this.errors = tree.errors.map(treeError) - } - - if (tree.overrides) { - this.overrides = new Map([...tree.overrides.ruleset.values()] - .map((override) => [override.key, override.value])) - } - - // edgesOut sorted by name - if (tree.edgesOut.size) { - this.edgesOut = new Map([...tree.edgesOut.entries()] - .sort(([a], [b]) => localeCompare(a, b)) - .map(([name, edge]) => [name, new EdgeOut(edge)])) - } - - // edgesIn sorted by location - if (tree.edgesIn.size) { - this.edgesIn = new Set([...tree.edgesIn] - .sort((a, b) => localeCompare(a.from.location, b.from.location)) - .map(edge => new EdgeIn(edge))) - } - - if (tree.workspaces && tree.workspaces.size) { - this.workspaces = new Map([...tree.workspaces.entries()] - .map(([name, path]) => [name, relpath(tree.root.realpath, path)])) - } - - // fsChildren sorted by path - if (tree.fsChildren.size) { - this.fsChildren = new Set([...tree.fsChildren] - .sort(({ path: a }, { path: b }) => localeCompare(a, b)) - .map(tree => printableTree(tree, path))) - } - - // children sorted by name - if (tree.children.size) { - this.children = new Map([...tree.children.entries()] - .sort(([a], [b]) => localeCompare(a, b)) - .map(([name, tree]) => [name, printableTree(tree, path)])) - } - } -} - -class ArboristVirtualNode extends ArboristNode { - constructor (tree, path) { - super(tree, path) - this.sourceReference = printableTree(tree.sourceReference, path) - } -} - -class ArboristLink extends ArboristNode { - constructor (tree, path) { - super(tree, path) - this.target = printableTree(tree.target, path) - } -} - -const treeError = ({ code, path }) => ({ - code, - ...(path ? { path } : {}), -}) - -// print out edges without dumping the full node all over again -// this base class will toJSON as a plain old object, but the -// util.inspect() output will be a bit cleaner -class Edge { - constructor (edge) { - this.type = edge.type - this.name = edge.name - this.spec = edge.rawSpec || '*' - if (edge.rawSpec !== edge.spec) { - this.override = edge.spec - } - if (edge.error) { - this.error = edge.error - } - if (edge.peerConflicted) { - this.peerConflicted = edge.peerConflicted - } - } -} - -// don't care about 'from' for edges out -class EdgeOut extends Edge { - constructor (edge) { - super(edge) - this.to = edge.to && edge.to.location - } - - [util.inspect.custom] () { - return `{ ${this.type} ${this.name}@${this.spec}${ - this.override ? ` overridden:${this.override}` : '' - }${ - this.to ? ' -> ' + this.to : '' - }${ - this.error ? ' ' + this.error : '' - }${ - this.peerConflicted ? ' peerConflicted' : '' - } }` - } -} - -// don't care about 'to' for edges in -class EdgeIn extends Edge { - constructor (edge) { - super(edge) - this.from = edge.from && edge.from.location - } - - [util.inspect.custom] () { - return `{ ${this.from || '""'} ${this.type} ${this.name}@${this.spec}${ - this.error ? ' ' + this.error : '' - }${ - this.peerConflicted ? ' peerConflicted' : '' - } }` - } -} - -const printableTree = (tree, path = []) => { - if (!tree) { - return tree - } - - const Cls = tree.isLink ? ArboristLink - : tree.sourceReference ? ArboristVirtualNode - : ArboristNode - if (path.includes(tree)) { - const obj = Object.create(Cls.prototype) - return Object.assign(obj, { location: tree.location }) - } - path.push(tree) - return new Cls(tree, path) -} - -module.exports = printableTree diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js deleted file mode 100644 index 96c5214..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/query-selector-all.js +++ /dev/null @@ -1,862 +0,0 @@ -'use strict' - -const { resolve } = require('path') -const { parser, arrayDelimiter } = require('@npmcli/query') -const localeCompare = require('@isaacs/string-locale-compare')('en') -const log = require('proc-log') -const { minimatch } = require('minimatch') -const npa = require('npm-package-arg') -const pacote = require('pacote') -const semver = require('semver') - -// handle results for parsed query asts, results are stored in a map that has a -// key that points to each ast selector node and stores the resulting array of -// arborist nodes as its value, that is essential to how we handle multiple -// query selectors, e.g: `#a, #b, #c` <- 3 diff ast selector nodes -class Results { - #currentAstSelector - #initialItems - #inventory - #outdatedCache = new Map() - #pendingCombinator - #results = new Map() - #targetNode - - constructor (opts) { - this.#currentAstSelector = opts.rootAstNode.nodes[0] - this.#inventory = opts.inventory - this.#initialItems = opts.initialItems - this.#targetNode = opts.targetNode - - this.currentResults = this.#initialItems - - // We get this when first called and need to pass it to pacote - this.flatOptions = opts.flatOptions || {} - - // reset by rootAstNode walker - this.currentAstNode = opts.rootAstNode - } - - get currentResults () { - return this.#results.get(this.#currentAstSelector) - } - - set currentResults (value) { - this.#results.set(this.#currentAstSelector, value) - } - - // retrieves the initial items to which start the filtering / matching - // for most of the different types of recognized ast nodes, e.g: class (aka - // depType), id, *, etc in different contexts we need to start with the - // current list of filtered results, for example a query for `.workspace` - // actually means the same as `*.workspace` so we want to start with the full - // inventory if that's the first ast node we're reading but if it appears in - // the middle of a query it should respect the previous filtered results, - // combinators are a special case in which we always want to have the - // complete inventory list in order to use the left-hand side ast node as a - // filter combined with the element on its right-hand side - get initialItems () { - const firstParsed = - (this.currentAstNode.parent.nodes[0] === this.currentAstNode) && - (this.currentAstNode.parent.parent.type === 'root') - - if (firstParsed) { - return this.#initialItems - } - - if (this.currentAstNode.prev().type === 'combinator') { - return this.#inventory - } - return this.currentResults - } - - // combinators need information about previously filtered items along - // with info of the items parsed / retrieved from the selector right - // past the combinator, for this reason combinators are stored and - // only ran as the last part of each selector logic - processPendingCombinator (nextResults) { - if (this.#pendingCombinator) { - const res = this.#pendingCombinator(this.currentResults, nextResults) - this.#pendingCombinator = null - this.currentResults = res - } else { - this.currentResults = nextResults - } - } - - // when collecting results to a root astNode, we traverse the list of child - // selector nodes and collect all of their resulting arborist nodes into a - // single/flat Set of items, this ensures we also deduplicate items - collect (rootAstNode) { - return new Set(rootAstNode.nodes.flatMap(n => this.#results.get(n))) - } - - // selector types map to the '.type' property of the ast nodes via `${astNode.type}Type` - // - // attribute selector [name=value], etc - attributeType () { - const nextResults = this.initialItems.filter(node => - attributeMatch(this.currentAstNode, node.package) - ) - this.processPendingCombinator(nextResults) - } - - // dependency type selector (i.e. .prod, .dev, etc) - // css calls this class, we interpret is as dependency type - classType () { - const depTypeFn = depTypes[String(this.currentAstNode)] - if (!depTypeFn) { - throw Object.assign( - new Error(`\`${String(this.currentAstNode)}\` is not a supported dependency type.`), - { code: 'EQUERYNODEPTYPE' } - ) - } - const nextResults = depTypeFn(this.initialItems) - this.processPendingCombinator(nextResults) - } - - // combinators (i.e. '>', ' ', '~') - combinatorType () { - this.#pendingCombinator = combinators[String(this.currentAstNode)] - } - - // name selectors (i.e. #foo) - // css calls this id, we interpret it as name - idType () { - const name = this.currentAstNode.value - const nextResults = this.initialItems.filter(node => - (name === node.name) || (name === node.package.name) - ) - this.processPendingCombinator(nextResults) - } - - // pseudo selectors (prefixed with :) - async pseudoType () { - const pseudoFn = `${this.currentAstNode.value.slice(1)}Pseudo` - if (!this[pseudoFn]) { - throw Object.assign( - new Error(`\`${this.currentAstNode.value - }\` is not a supported pseudo selector.`), - { code: 'EQUERYNOPSEUDO' } - ) - } - const nextResults = await this[pseudoFn]() - this.processPendingCombinator(nextResults) - } - - selectorType () { - this.#currentAstSelector = this.currentAstNode - // starts a new array in which resulting items - // can be stored for each given ast selector - if (!this.currentResults) { - this.currentResults = [] - } - } - - universalType () { - this.processPendingCombinator(this.initialItems) - } - - // pseudo selectors map to the 'value' property of the pseudo selectors in the ast nodes - // via selectors via `${value.slice(1)}Pseudo` - attrPseudo () { - const { lookupProperties, attributeMatcher } = this.currentAstNode - - return this.initialItems.filter(node => { - let objs = [node.package] - for (const prop of lookupProperties) { - // if an isArray symbol is found that means we'll need to iterate - // over the previous found array to basically make sure we traverse - // all its indexes testing for possible objects that may eventually - // hold more keys specified in a selector - if (prop === arrayDelimiter) { - objs = objs.flat() - continue - } - - // otherwise just maps all currently found objs - // to the next prop from the lookup properties list, - // filters out any empty key lookup - objs = objs.flatMap(obj => obj[prop] || []) - - // in case there's no property found in the lookup - // just filters that item out - const noAttr = objs.every(obj => !obj) - if (noAttr) { - return false - } - } - - // if any of the potential object matches - // that item should be in the final result - return objs.some(obj => attributeMatch(attributeMatcher, obj)) - }) - } - - emptyPseudo () { - return this.initialItems.filter(node => node.edgesOut.size === 0) - } - - extraneousPseudo () { - return this.initialItems.filter(node => node.extraneous) - } - - async hasPseudo () { - const found = [] - for (const item of this.initialItems) { - // This is the one time initialItems differs from inventory - const res = await retrieveNodesFromParsedAst({ - flatOptions: this.flatOptions, - initialItems: [item], - inventory: this.#inventory, - rootAstNode: this.currentAstNode.nestedNode, - targetNode: item, - }) - if (res.size > 0) { - found.push(item) - } - } - return found - } - - invalidPseudo () { - const found = [] - for (const node of this.initialItems) { - for (const edge of node.edgesIn) { - if (edge.invalid) { - found.push(node) - break - } - } - } - return found - } - - async isPseudo () { - const res = await retrieveNodesFromParsedAst({ - flatOptions: this.flatOptions, - initialItems: this.initialItems, - inventory: this.#inventory, - rootAstNode: this.currentAstNode.nestedNode, - targetNode: this.currentAstNode, - }) - return [...res] - } - - linkPseudo () { - return this.initialItems.filter(node => node.isLink || (node.isTop && !node.isRoot)) - } - - missingPseudo () { - return this.#inventory.reduce((res, node) => { - for (const edge of node.edgesOut.values()) { - if (edge.missing) { - const pkg = { name: edge.name, version: edge.spec } - res.push(new this.#targetNode.constructor({ pkg })) - } - } - return res - }, []) - } - - async notPseudo () { - const res = await retrieveNodesFromParsedAst({ - flatOptions: this.flatOptions, - initialItems: this.initialItems, - inventory: this.#inventory, - rootAstNode: this.currentAstNode.nestedNode, - targetNode: this.currentAstNode, - }) - const internalSelector = new Set(res) - return this.initialItems.filter(node => - !internalSelector.has(node)) - } - - overriddenPseudo () { - return this.initialItems.filter(node => node.overridden) - } - - pathPseudo () { - return this.initialItems.filter(node => { - if (!this.currentAstNode.pathValue) { - return true - } - return minimatch( - node.realpath.replace(/\\+/g, '/'), - resolve(node.root.realpath, this.currentAstNode.pathValue).replace(/\\+/g, '/') - ) - }) - } - - privatePseudo () { - return this.initialItems.filter(node => node.package.private) - } - - rootPseudo () { - return this.initialItems.filter(node => node === this.#targetNode.root) - } - - scopePseudo () { - return this.initialItems.filter(node => node === this.#targetNode) - } - - semverPseudo () { - const { - attributeMatcher, - lookupProperties, - semverFunc = 'infer', - semverValue, - } = this.currentAstNode - const { qualifiedAttribute } = attributeMatcher - - if (!semverValue) { - // DEPRECATED: remove this warning and throw an error as part of @npmcli/arborist@6 - log.warn('query', 'usage of :semver() with no parameters is deprecated') - return this.initialItems - } - - if (!semver.valid(semverValue) && !semver.validRange(semverValue)) { - throw Object.assign( - new Error(`\`${semverValue}\` is not a valid semver version or range`), - { code: 'EQUERYINVALIDSEMVER' }) - } - - const valueIsVersion = !!semver.valid(semverValue) - - const nodeMatches = (node, obj) => { - // if we already have an operator, the user provided some test as part of the selector - // we evaluate that first because if it fails we don't want this node anyway - if (attributeMatcher.operator) { - if (!attributeMatch(attributeMatcher, obj)) { - // if the initial operator doesn't match, we're done - return false - } - } - - const attrValue = obj[qualifiedAttribute] - // both valid and validRange return null for undefined, so this will skip both nodes that - // do not have the attribute defined as well as those where the attribute value is invalid - // and those where the value from the package.json is not a string - if ((!semver.valid(attrValue) && !semver.validRange(attrValue)) || - typeof attrValue !== 'string') { - return false - } - - const attrIsVersion = !!semver.valid(attrValue) - - let actualFunc = semverFunc - - // if we're asked to infer, we examine outputs to make a best guess - if (actualFunc === 'infer') { - if (valueIsVersion && attrIsVersion) { - // two versions -> semver.eq - actualFunc = 'eq' - } else if (!valueIsVersion && !attrIsVersion) { - // two ranges -> semver.intersects - actualFunc = 'intersects' - } else { - // anything else -> semver.satisfies - actualFunc = 'satisfies' - } - } - - if (['eq', 'neq', 'gt', 'gte', 'lt', 'lte'].includes(actualFunc)) { - // both sides must be versions, but one is not - if (!valueIsVersion || !attrIsVersion) { - return false - } - - return semver[actualFunc](attrValue, semverValue) - } else if (['gtr', 'ltr', 'satisfies'].includes(actualFunc)) { - // at least one side must be a version, but neither is - if (!valueIsVersion && !attrIsVersion) { - return false - } - - return valueIsVersion - ? semver[actualFunc](semverValue, attrValue) - : semver[actualFunc](attrValue, semverValue) - } else if (['intersects', 'subset'].includes(actualFunc)) { - // these accept two ranges and since a version is also a range, anything goes - return semver[actualFunc](attrValue, semverValue) - } else { - // user provided a function we don't know about, throw an error - throw Object.assign(new Error(`\`semver.${actualFunc}\` is not a supported operator.`), - { code: 'EQUERYINVALIDOPERATOR' }) - } - } - - return this.initialItems.filter((node) => { - // no lookupProperties just means its a top level property, see if it matches - if (!lookupProperties.length) { - return nodeMatches(node, node.package) - } - - // this code is mostly duplicated from attrPseudo to traverse into the package until we get - // to our deepest requested object - let objs = [node.package] - for (const prop of lookupProperties) { - if (prop === arrayDelimiter) { - objs = objs.flat() - continue - } - - objs = objs.flatMap(obj => obj[prop] || []) - const noAttr = objs.every(obj => !obj) - if (noAttr) { - return false - } - - return objs.some(obj => nodeMatches(node, obj)) - } - }) - } - - typePseudo () { - if (!this.currentAstNode.typeValue) { - return this.initialItems - } - return this.initialItems - .flatMap(node => { - const found = [] - for (const edge of node.edgesIn) { - if (npa(`${edge.name}@${edge.spec}`).type === this.currentAstNode.typeValue) { - found.push(edge.to) - } - } - return found - }) - } - - dedupedPseudo () { - return this.initialItems.filter(node => node.target.edgesIn.size > 1) - } - - async outdatedPseudo () { - const { outdatedKind = 'any' } = this.currentAstNode - - // filter the initialItems - // NOTE: this uses a Promise.all around a map without in-line concurrency handling - // since the only async action taken is retrieving the packument, which is limited - // based on the max-sockets config in make-fetch-happen - const initialResults = await Promise.all(this.initialItems.map(async (node) => { - // the root can't be outdated, skip it - if (node.isProjectRoot) { - return false - } - - // we cache the promise representing the full versions list, this helps reduce the - // number of requests we send by keeping population of the cache in a single tick - // making it less likely that multiple requests for the same package will be inflight - if (!this.#outdatedCache.has(node.name)) { - this.#outdatedCache.set(node.name, getPackageVersions(node.name, this.flatOptions)) - } - const availableVersions = await this.#outdatedCache.get(node.name) - - // we attach _all_ versions to the queryContext to allow consumers to do their own - // filtering and comparisons - node.queryContext.versions = availableVersions - - // next we further reduce the set to versions that are greater than the current one - const greaterVersions = availableVersions.filter((available) => { - return semver.gt(available, node.version) - }) - - // no newer versions than the current one, drop this node from the result set - if (!greaterVersions.length) { - return false - } - - // if we got here, we know that newer versions exist, if the kind is 'any' we're done - if (outdatedKind === 'any') { - return node - } - - // look for newer versions that differ from current by a specific part of the semver version - if (['major', 'minor', 'patch'].includes(outdatedKind)) { - // filter the versions greater than our current one based on semver.diff - const filteredVersions = greaterVersions.filter((version) => { - return semver.diff(node.version, version) === outdatedKind - }) - - // no available versions are of the correct diff type - if (!filteredVersions.length) { - return false - } - - return node - } - - // look for newer versions that satisfy at least one edgeIn to this node - if (outdatedKind === 'in-range') { - const inRangeContext = [] - for (const edge of node.edgesIn) { - const inRangeVersions = greaterVersions.filter((version) => { - return semver.satisfies(version, edge.spec) - }) - - // this edge has no in-range candidates, just move on - if (!inRangeVersions.length) { - continue - } - - inRangeContext.push({ - from: edge.from.location, - versions: inRangeVersions, - }) - } - - // if we didn't find at least one match, drop this node - if (!inRangeContext.length) { - return false - } - - // now add to the context each version that is in-range for each edgeIn - node.queryContext.outdated = { - ...node.queryContext.outdated, - inRange: inRangeContext, - } - - return node - } - - // look for newer versions that _do not_ satisfy at least one edgeIn - if (outdatedKind === 'out-of-range') { - const outOfRangeContext = [] - for (const edge of node.edgesIn) { - const outOfRangeVersions = greaterVersions.filter((version) => { - return !semver.satisfies(version, edge.spec) - }) - - // this edge has no out-of-range candidates, skip it - if (!outOfRangeVersions.length) { - continue - } - - outOfRangeContext.push({ - from: edge.from.location, - versions: outOfRangeVersions, - }) - } - - // if we didn't add at least one thing to the context, this node is not a match - if (!outOfRangeContext.length) { - return false - } - - // attach the out-of-range context to the node - node.queryContext.outdated = { - ...node.queryContext.outdated, - outOfRange: outOfRangeContext, - } - - return node - } - - // any other outdatedKind is unknown and will never match - return false - })) - - // return an array with the holes for non-matching nodes removed - return initialResults.filter(Boolean) - } -} - -// operators for attribute selectors -const attributeOperators = { - // attribute value is equivalent - '=' ({ attr, value, insensitive }) { - return attr === value - }, - // attribute value contains word - '~=' ({ attr, value, insensitive }) { - return (attr.match(/\w+/g) || []).includes(value) - }, - // attribute value contains string - '*=' ({ attr, value, insensitive }) { - return attr.includes(value) - }, - // attribute value is equal or starts with - '|=' ({ attr, value, insensitive }) { - return attr.startsWith(`${value}-`) - }, - // attribute value starts with - '^=' ({ attr, value, insensitive }) { - return attr.startsWith(value) - }, - // attribute value ends with - '$=' ({ attr, value, insensitive }) { - return attr.endsWith(value) - }, -} - -const attributeOperator = ({ attr, value, insensitive, operator }) => { - if (typeof attr === 'number') { - attr = String(attr) - } - if (typeof attr !== 'string') { - // It's an object or an array, bail - return false - } - if (insensitive) { - attr = attr.toLowerCase() - } - - return attributeOperators[operator]({ - attr, - insensitive, - value, - }) -} - -const attributeMatch = (matcher, obj) => { - const insensitive = !!matcher.insensitive - const operator = matcher.operator || '' - const attribute = matcher.qualifiedAttribute - let value = matcher.value || '' - // return early if checking existence - if (operator === '') { - return Boolean(obj[attribute]) - } - if (insensitive) { - value = value.toLowerCase() - } - // in case the current object is an array - // then we try to match every item in the array - if (Array.isArray(obj[attribute])) { - return obj[attribute].find((i, index) => { - const attr = obj[attribute][index] || '' - return attributeOperator({ attr, value, insensitive, operator }) - }) - } else { - const attr = obj[attribute] || '' - return attributeOperator({ attr, value, insensitive, operator }) - } -} - -const edgeIsType = (node, type, seen = new Set()) => { - for (const edgeIn of node.edgesIn) { - // TODO Need a test with an infinite loop - if (seen.has(edgeIn)) { - continue - } - seen.add(edgeIn) - if (edgeIn.type === type || edgeIn.from[type] || edgeIsType(edgeIn.from, type, seen)) { - return true - } - } - return false -} - -const filterByType = (nodes, type) => { - const found = [] - for (const node of nodes) { - if (node[type] || edgeIsType(node, type)) { - found.push(node) - } - } - return found -} - -const depTypes = { - // dependency - '.prod' (prevResults) { - const found = [] - for (const node of prevResults) { - if (!node.dev) { - found.push(node) - } - } - return found - }, - // devDependency - '.dev' (prevResults) { - return filterByType(prevResults, 'dev') - }, - // optionalDependency - '.optional' (prevResults) { - return filterByType(prevResults, 'optional') - }, - // peerDependency - '.peer' (prevResults) { - return filterByType(prevResults, 'peer') - }, - // workspace - '.workspace' (prevResults) { - return prevResults.filter(node => node.isWorkspace) - }, - // bundledDependency - '.bundled' (prevResults) { - return prevResults.filter(node => node.inBundle) - }, -} - -// checks if a given node has a direct parent in any of the nodes provided in -// the compare nodes array -const hasParent = (node, compareNodes) => { - // All it takes is one so we loop and return on the first hit - for (let compareNode of compareNodes) { - if (compareNode.isLink) { - compareNode = compareNode.target - } - - // follows logical parent for link anscestors - if (node.isTop && (node.resolveParent === compareNode)) { - return true - } - // follows edges-in to check if they match a possible parent - for (const edge of node.edgesIn) { - if (edge && edge.from === compareNode) { - return true - } - } - } - return false -} - -// checks if a given node is a descendant of any of the nodes provided in the -// compareNodes array -const hasAscendant = (node, compareNodes, seen = new Set()) => { - // TODO (future) loop over ancestry property - if (hasParent(node, compareNodes)) { - return true - } - - if (node.isTop && node.resolveParent) { - /* istanbul ignore if - investigate if linksIn check obviates need for this */ - if (hasAscendant(node.resolveParent, compareNodes)) { - return true - } - } - for (const edge of node.edgesIn) { - // TODO Need a test with an infinite loop - if (seen.has(edge)) { - continue - } - seen.add(edge) - if (edge && edge.from && hasAscendant(edge.from, compareNodes, seen)) { - return true - } - } - for (const linkNode of node.linksIn) { - if (hasAscendant(linkNode, compareNodes, seen)) { - return true - } - } - return false -} - -const combinators = { - // direct descendant - '>' (prevResults, nextResults) { - return nextResults.filter(node => hasParent(node, prevResults)) - }, - // any descendant - ' ' (prevResults, nextResults) { - return nextResults.filter(node => hasAscendant(node, prevResults)) - }, - // sibling - '~' (prevResults, nextResults) { - // Return any node in nextResults that is a sibling of (aka shares a - // parent with) a node in prevResults - const parentNodes = new Set() // Parents of everything in prevResults - for (const node of prevResults) { - for (const edge of node.edgesIn) { - // edge.from always exists cause it's from another node's edgesIn - parentNodes.add(edge.from) - } - } - return nextResults.filter(node => - !prevResults.includes(node) && hasParent(node, [...parentNodes]) - ) - }, -} - -// get a list of available versions of a package filtered to respect --before -// NOTE: this runs over each node and should not throw -const getPackageVersions = async (name, opts) => { - let packument - try { - packument = await pacote.packument(name, { - ...opts, - fullMetadata: false, // we only need the corgi - }) - } catch (err) { - // if the fetch fails, log a warning and pretend there are no versions - log.warn('query', `could not retrieve packument for ${name}: ${err.message}`) - return [] - } - - // start with a sorted list of all versions (lowest first) - let candidates = Object.keys(packument.versions).sort(semver.compare) - - // if the packument has a time property, and the user passed a before flag, then - // we filter this list down to only those versions that existed before the specified date - if (packument.time && opts.before) { - candidates = candidates.filter((version) => { - // this version isn't found in the times at all, drop it - if (!packument.time[version]) { - return false - } - - return Date.parse(packument.time[version]) <= opts.before - }) - } - - return candidates -} - -const retrieveNodesFromParsedAst = async (opts) => { - // when we first call this it's the parsed query. all other times it's - // results.currentNode.nestedNode - const rootAstNode = opts.rootAstNode - - if (!rootAstNode.nodes) { - return new Set() - } - - const results = new Results(opts) - - const astNodeQueue = new Set() - // walk is sync, so we have to build up our async functions and then await them later - rootAstNode.walk((nextAstNode) => { - astNodeQueue.add(nextAstNode) - }) - - for (const nextAstNode of astNodeQueue) { - // This is the only place we reset currentAstNode - results.currentAstNode = nextAstNode - const updateFn = `${results.currentAstNode.type}Type` - if (typeof results[updateFn] !== 'function') { - throw Object.assign( - new Error(`\`${results.currentAstNode.type}\` is not a supported selector.`), - { code: 'EQUERYNOSELECTOR' } - ) - } - await results[updateFn]() - } - - return results.collect(rootAstNode) -} - -// We are keeping this async in the event that we do add async operators, we -// won't have to have a breaking change on this function signature. -const querySelectorAll = async (targetNode, query, flatOptions) => { - // This never changes ever we just pass it around. But we can't scope it to - // this whole file if we ever want to support concurrent calls to this - // function. - const inventory = [...targetNode.root.inventory.values()] - // res is a Set of items returned for each parsed css ast selector - const res = await retrieveNodesFromParsedAst({ - initialItems: inventory, - inventory, - flatOptions, - rootAstNode: parser(query), - targetNode, - }) - - // returns nodes ordered by realpath - return [...res].sort((a, b) => localeCompare(a.location, b.location)) -} - -module.exports = querySelectorAll diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/realpath.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/realpath.js deleted file mode 100644 index 8dc20ab..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/realpath.js +++ /dev/null @@ -1,95 +0,0 @@ -// look up the realpath, but cache stats to minimize overhead -// If the parent folder is in the realpath cache, then we just -// lstat the child, since there's no need to do a full realpath -// This is not a separate module, and is much simpler than Node's -// built-in fs.realpath, because we only care about symbolic links, -// so we can handle many fewer edge cases. - -const { lstat, readlink } = require('fs/promises') -const { resolve, basename, dirname } = require('path') - -const realpathCached = (path, rpcache, stcache, depth) => { - // just a safety against extremely deep eloops - /* istanbul ignore next */ - if (depth > 2000) { - throw eloop(path) - } - - path = resolve(path) - if (rpcache.has(path)) { - return Promise.resolve(rpcache.get(path)) - } - - const dir = dirname(path) - const base = basename(path) - - if (base && rpcache.has(dir)) { - return realpathChild(dir, base, rpcache, stcache, depth) - } - - // if it's the root, then we know it's real - if (!base) { - rpcache.set(dir, dir) - return Promise.resolve(dir) - } - - // the parent, what is that? - // find out, and then come back. - return realpathCached(dir, rpcache, stcache, depth + 1).then(() => - realpathCached(path, rpcache, stcache, depth + 1)) -} - -const lstatCached = (path, stcache) => { - if (stcache.has(path)) { - return Promise.resolve(stcache.get(path)) - } - - const p = lstat(path).then(st => { - stcache.set(path, st) - return st - }) - stcache.set(path, p) - return p -} - -// This is a slight fib, as it doesn't actually occur during a stat syscall. -// But file systems are giant piles of lies, so whatever. -const eloop = path => - Object.assign(new Error( - `ELOOP: too many symbolic links encountered, stat '${path}'`), { - errno: -62, - syscall: 'stat', - code: 'ELOOP', - path: path, - }) - -const realpathChild = (dir, base, rpcache, stcache, depth) => { - const realdir = rpcache.get(dir) - // that unpossible - /* istanbul ignore next */ - if (typeof realdir === 'undefined') { - throw new Error('in realpathChild without parent being in realpath cache') - } - - const realish = resolve(realdir, base) - return lstatCached(realish, stcache).then(st => { - if (!st.isSymbolicLink()) { - rpcache.set(resolve(dir, base), realish) - return realish - } - - return readlink(realish).then(target => { - const resolved = resolve(realdir, target) - if (realish === resolved) { - throw eloop(realish) - } - - return realpathCached(resolved, rpcache, stcache, depth + 1) - }).then(real => { - rpcache.set(resolve(dir, base), real) - return real - }) - }) -} - -module.exports = realpathCached diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/relpath.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/relpath.js deleted file mode 100644 index e1960cf..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/relpath.js +++ /dev/null @@ -1,3 +0,0 @@ -const { relative } = require('path') -const relpath = (from, to) => relative(from, to).replace(/\\/g, '/') -module.exports = relpath diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js deleted file mode 100644 index e259e90..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/reset-dep-flags.js +++ /dev/null @@ -1,15 +0,0 @@ -// Sometimes we need to actually do a walk from the root, because you can -// have a cycle of deps that all depend on each other, but no path from root. -// Also, since the ideal tree is loaded from the shrinkwrap, it had extraneous -// flags set false that might now be actually extraneous, and dev/optional -// flags that are also now incorrect. This method sets all flags to true, so -// we can find the set that is actually extraneous. -module.exports = tree => { - for (const node of tree.inventory.values()) { - node.extraneous = true - node.dev = true - node.devOptional = true - node.peer = true - node.optional = true - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/retire-path.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/retire-path.js deleted file mode 100644 index 0c7a4a3..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/retire-path.js +++ /dev/null @@ -1,19 +0,0 @@ -const crypto = require('crypto') -const { dirname, basename, resolve } = require('path') - -// use sha1 because it's faster, and collisions extremely unlikely anyway -const pathSafeHash = s => - crypto.createHash('sha1') - .update(s) - .digest('base64') - .replace(/[^a-zA-Z0-9]+/g, '') - .slice(0, 8) - -const retirePath = from => { - const d = dirname(from) - const b = basename(from) - const hash = pathSafeHash(from) - return resolve(d, `.${b}-${hash}`) -} - -module.exports = retirePath diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js deleted file mode 100644 index e6525ff..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/shrinkwrap.js +++ /dev/null @@ -1,1176 +0,0 @@ -// a module that manages a shrinkwrap file (npm-shrinkwrap.json or -// package-lock.json). - -// Increment whenever the lockfile version updates -// v1 - npm <=6 -// v2 - arborist v1, npm v7, backwards compatible with v1, add 'packages' -// v3 will drop the 'dependencies' field, backwards comp with v2, not v1 -// -// We cannot bump to v3 until npm v6 is out of common usage, and -// definitely not before npm v8. - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const defaultLockfileVersion = 3 - -// for comparing nodes to yarn.lock entries -const mismatch = (a, b) => a && b && a !== b - -// this.tree => the root node for the tree (ie, same path as this) -// - Set the first time we do `this.add(node)` for a path matching this.path -// -// this.add(node) => -// - decorate the node with the metadata we have, if we have it, and it matches -// - add to the map of nodes needing to be committed, so that subsequent -// changes are captured when we commit that location's metadata. -// -// this.commit() => -// - commit all nodes awaiting update to their metadata entries -// - re-generate this.data and this.yarnLock based on this.tree -// -// Note that between this.add() and this.commit(), `this.data` will be out of -// date! Always call `commit()` before relying on it. -// -// After calling this.commit(), any nodes not present in the tree will have -// been removed from the shrinkwrap data as well. - -const log = require('proc-log') -const YarnLock = require('./yarn-lock.js') -const { - readFile, - readdir, - readlink, - rm, - stat, - writeFile, -} = require('fs/promises') - -const { resolve, basename, relative } = require('path') -const specFromLock = require('./spec-from-lock.js') -const versionFromTgz = require('./version-from-tgz.js') -const npa = require('npm-package-arg') -const pkgJson = require('@npmcli/package-json') -const parseJSON = require('parse-conflict-json') - -const stringify = require('json-stringify-nice') -const swKeyOrder = [ - 'name', - 'version', - 'lockfileVersion', - 'resolved', - 'integrity', - 'requires', - 'packages', - 'dependencies', -] - -// used to rewrite from yarn registry to npm registry -const yarnRegRe = /^https?:\/\/registry\.yarnpkg\.com\// -const npmRegRe = /^https?:\/\/registry\.npmjs\.org\// - -// sometimes resolved: is weird or broken, or something npa can't handle -const specFromResolved = resolved => { - try { - return npa(resolved) - } catch (er) { - return {} - } -} - -const relpath = require('./relpath.js') - -const consistentResolve = require('./consistent-resolve.js') -const { overrideResolves } = require('./override-resolves.js') - -const pkgMetaKeys = [ - // note: name is included if necessary, for alias packages - 'version', - 'dependencies', - 'peerDependencies', - 'peerDependenciesMeta', - 'optionalDependencies', - 'bundleDependencies', - 'acceptDependencies', - 'funding', - 'engines', - 'os', - 'cpu', - '_integrity', - 'license', - '_hasShrinkwrap', - 'hasInstallScript', - 'bin', - 'deprecated', - 'workspaces', -] - -const nodeMetaKeys = [ - 'integrity', - 'inBundle', - 'hasShrinkwrap', - 'hasInstallScript', -] - -const metaFieldFromPkg = (pkg, key) => { - const val = pkg[key] - if (val) { - // get only the license type, not the full object - if (key === 'license' && typeof val === 'object' && val.type) { - return val.type - } - // skip empty objects and falsey values - if (typeof val !== 'object' || Object.keys(val).length) { - return val - } - } - return null -} - -// check to make sure that there are no packages newer than or missing from the hidden lockfile -const assertNoNewer = async (path, data, lockTime, dir, seen) => { - const base = basename(dir) - const isNM = dir !== path && base === 'node_modules' - const isScope = dir !== path && base.startsWith('@') - const isParent = (dir === path) || isNM || isScope - - const parent = isParent ? dir : resolve(dir, 'node_modules') - const rel = relpath(path, dir) - seen.add(rel) - let entries - if (dir === path) { - entries = [{ name: 'node_modules', isDirectory: () => true }] - } else { - const { mtime: dirTime } = await stat(dir) - if (dirTime > lockTime) { - throw new Error(`out of date, updated: ${rel}`) - } - if (!isScope && !isNM && !data.packages[rel]) { - throw new Error(`missing from lockfile: ${rel}`) - } - entries = await readdir(parent, { withFileTypes: true }).catch(() => []) - } - - // TODO limit concurrency here, this is recursive - await Promise.all(entries.map(async dirent => { - const child = resolve(parent, dirent.name) - if (dirent.isDirectory() && !dirent.name.startsWith('.')) { - await assertNoNewer(path, data, lockTime, child, seen) - } else if (dirent.isSymbolicLink()) { - const target = resolve(parent, await readlink(child)) - const tstat = await stat(target).catch( - /* istanbul ignore next - windows */ () => null) - seen.add(relpath(path, child)) - /* istanbul ignore next - windows cannot do this */ - if (tstat?.isDirectory() && !seen.has(relpath(path, target))) { - await assertNoNewer(path, data, lockTime, target, seen) - } - } - })) - - if (dir !== path) { - return - } - - // assert that all the entries in the lockfile were seen - for (const loc in data.packages) { - if (!seen.has(loc)) { - throw new Error(`missing from node_modules: ${loc}`) - } - } -} - -class Shrinkwrap { - static get defaultLockfileVersion () { - return defaultLockfileVersion - } - - static load (options) { - return new Shrinkwrap(options).load() - } - - static get keyOrder () { - return swKeyOrder - } - - static async reset (options) { - // still need to know if it was loaded from the disk, but don't - // bother reading it if we're gonna just throw it away. - const s = new Shrinkwrap(options) - s.reset() - - const [sw, lock] = await s.resetFiles - - // XXX this is duplicated in this.load(), but using loadFiles instead of resetFiles - if (s.hiddenLockfile) { - s.filename = resolve(s.path, 'node_modules/.package-lock.json') - } else if (s.shrinkwrapOnly || sw) { - s.filename = resolve(s.path, 'npm-shrinkwrap.json') - } else { - s.filename = resolve(s.path, 'package-lock.json') - } - s.loadedFromDisk = !!(sw || lock) - // TODO what uses this? - s.type = basename(s.filename) - - return s - } - - static metaFromNode (node, path, options = {}) { - if (node.isLink) { - return { - resolved: relpath(path, node.realpath), - link: true, - } - } - - const meta = {} - for (const key of pkgMetaKeys) { - const val = metaFieldFromPkg(node.package, key) - if (val) { - meta[key.replace(/^_/, '')] = val - } - } - // we only include name if different from the node path name, and for the - // root to help prevent churn based on the name of the directory the - // project is in - const pname = node.packageName - if (pname && (node === node.root || pname !== node.name)) { - meta.name = pname - } - - if (node.isTop && node.package.devDependencies) { - meta.devDependencies = node.package.devDependencies - } - - for (const key of nodeMetaKeys) { - if (node[key]) { - meta[key] = node[key] - } - } - - const resolved = consistentResolve(node.resolved, node.path, path, true) - // hide resolved from registry dependencies. - if (!resolved) { - // no-op - } else if (node.isRegistryDependency) { - meta.resolved = overrideResolves(resolved, options) - } else { - meta.resolved = resolved - } - - if (node.extraneous) { - meta.extraneous = true - } else { - if (node.peer) { - meta.peer = true - } - if (node.dev) { - meta.dev = true - } - if (node.optional) { - meta.optional = true - } - if (node.devOptional && !node.dev && !node.optional) { - meta.devOptional = true - } - } - return meta - } - - #awaitingUpdate = new Map() - - constructor (options = {}) { - const { - path, - indent = 2, - newline = '\n', - shrinkwrapOnly = false, - hiddenLockfile = false, - lockfileVersion, - resolveOptions = {}, - } = options - - if (hiddenLockfile) { - this.lockfileVersion = 3 - } else if (lockfileVersion) { - this.lockfileVersion = parseInt(lockfileVersion, 10) - } else { - this.lockfileVersion = null - } - - this.tree = null - this.path = resolve(path || '.') - this.filename = null - this.data = null - this.indent = indent - this.newline = newline - this.loadedFromDisk = false - this.type = null - this.yarnLock = null - this.hiddenLockfile = hiddenLockfile - this.loadingError = null - this.resolveOptions = resolveOptions - // only load npm-shrinkwrap.json in dep trees, not package-lock - this.shrinkwrapOnly = shrinkwrapOnly - } - - // check to see if a spec is present in the yarn.lock file, and if so, - // if we should use it, and what it should resolve to. This is only - // done when we did not load a shrinkwrap from disk. Also, decorate - // the options object if provided with the resolved and integrity that - // we expect. - checkYarnLock (spec, options = {}) { - spec = npa(spec) - const { yarnLock, loadedFromDisk } = this - const useYarnLock = yarnLock && !loadedFromDisk - const fromYarn = useYarnLock && yarnLock.entries.get(spec.raw) - if (fromYarn && fromYarn.version) { - // if it's the yarn or npm default registry, use the version as - // our effective spec. if it's any other kind of thing, use that. - const { resolved, version, integrity } = fromYarn - const isYarnReg = spec.registry && yarnRegRe.test(resolved) - const isnpmReg = spec.registry && !isYarnReg && npmRegRe.test(resolved) - const isReg = isnpmReg || isYarnReg - // don't use the simple version if the "registry" url is - // something else entirely! - const tgz = isReg && versionFromTgz(spec.name, resolved) || {} - let yspec = resolved - if (tgz.name === spec.name && tgz.version === version) { - yspec = version - } else if (isReg && tgz.name && tgz.version) { - yspec = `npm:${tgz.name}@${tgz.version}` - } - if (yspec) { - options.resolved = resolved.replace(yarnRegRe, 'https://registry.npmjs.org/') - options.integrity = integrity - return npa(`${spec.name}@${yspec}`) - } - } - return spec - } - - // throw away the shrinkwrap data so we can start fresh - // still worth doing a load() first so we know which files to write. - reset () { - this.tree = null - this.#awaitingUpdate = new Map() - const lockfileVersion = this.lockfileVersion || defaultLockfileVersion - this.originalLockfileVersion = lockfileVersion - - this.data = { - lockfileVersion, - requires: true, - packages: {}, - dependencies: {}, - } - } - - // files to potentially read from and write to, in order of priority - get #filenameSet () { - if (this.shrinkwrapOnly) { - return [`${this.path}/npm-shrinkwrap.json`] - } - if (this.hiddenLockfile) { - return [`${this.path}/node_modules/.package-lock.json`] - } - return [ - `${this.path}/npm-shrinkwrap.json`, - `${this.path}/package-lock.json`, - `${this.path}/yarn.lock`, - ] - } - - get loadFiles () { - return Promise.all( - this.#filenameSet.map(file => file && readFile(file, 'utf8').then(d => d, er => { - /* istanbul ignore else - can't test without breaking module itself */ - if (er.code === 'ENOENT') { - return '' - } else { - throw er - } - })) - ) - } - - get resetFiles () { - // slice out yarn, we only care about lock or shrinkwrap when checking - // this way, since we're not actually loading the full lock metadata - return Promise.all(this.#filenameSet.slice(0, 2) - .map(file => file && stat(file).then(st => st.isFile(), er => { - /* istanbul ignore else - can't test without breaking module itself */ - if (er.code === 'ENOENT') { - return null - } else { - throw er - } - }) - ) - ) - } - - inferFormattingOptions (packageJSONData) { - const { - [Symbol.for('indent')]: indent, - [Symbol.for('newline')]: newline, - } = packageJSONData - if (indent !== undefined) { - this.indent = indent - } - if (newline !== undefined) { - this.newline = newline - } - } - - async load () { - // we don't need to load package-lock.json except for top of tree nodes, - // only npm-shrinkwrap.json. - let data - try { - const [sw, lock, yarn] = await this.loadFiles - data = sw || lock || '{}' - - // use shrinkwrap only for deps, otherwise prefer package-lock - // and ignore npm-shrinkwrap if both are present. - // TODO: emit a warning here or something if both are present. - if (this.hiddenLockfile) { - this.filename = resolve(this.path, 'node_modules/.package-lock.json') - } else if (this.shrinkwrapOnly || sw) { - this.filename = resolve(this.path, 'npm-shrinkwrap.json') - } else { - this.filename = resolve(this.path, 'package-lock.json') - } - this.type = basename(this.filename) - this.loadedFromDisk = Boolean(sw || lock) - - if (yarn) { - this.yarnLock = new YarnLock() - // ignore invalid yarn data. we'll likely clobber it later anyway. - try { - this.yarnLock.parse(yarn) - } catch { - // ignore errors - } - } - - data = parseJSON(data) - this.inferFormattingOptions(data) - - if (this.hiddenLockfile && data.packages) { - // add a few ms just to account for jitter - const lockTime = +(await stat(this.filename)).mtime + 10 - await assertNoNewer(this.path, data, lockTime, this.path, new Set()) - } - - // all good! hidden lockfile is the newest thing in here. - } catch (er) { - /* istanbul ignore else */ - if (typeof this.filename === 'string') { - const rel = relpath(this.path, this.filename) - log.verbose('shrinkwrap', `failed to load ${rel}`, er.message) - } else { - log.verbose('shrinkwrap', `failed to load ${this.path}`, er.message) - } - this.loadingError = er - this.loadedFromDisk = false - this.ancientLockfile = false - data = {} - } - // auto convert v1 lockfiles to v3 - // leave v2 in place unless configured - // v3 by default - let lockfileVersion = defaultLockfileVersion - if (this.lockfileVersion) { - lockfileVersion = this.lockfileVersion - } else if (data.lockfileVersion && data.lockfileVersion !== 1) { - lockfileVersion = data.lockfileVersion - } - - this.data = { - ...data, - lockfileVersion, - requires: true, - packages: data.packages || {}, - dependencies: data.dependencies || {}, - } - - this.originalLockfileVersion = data.lockfileVersion - - // use default if it wasn't explicitly set, and the current file is - // less than our default. otherwise, keep whatever is in the file, - // unless we had an explicit setting already. - if (!this.lockfileVersion) { - this.lockfileVersion = this.data.lockfileVersion = lockfileVersion - } - this.ancientLockfile = this.loadedFromDisk && - !(data.lockfileVersion >= 2) && !data.requires - - // load old lockfile deps into the packages listing - if (data.dependencies && !data.packages) { - let pkg - try { - pkg = await pkgJson.normalize(this.path) - pkg = pkg.content - } catch { - pkg = {} - } - this.#loadAll('', null, this.data) - this.#fixDependencies(pkg) - } - return this - } - - #loadAll (location, name, lock) { - // migrate a v1 package lock to the new format. - const meta = this.#metaFromLock(location, name, lock) - // dependencies nested under a link are actually under the link target - if (meta.link) { - location = meta.resolved - } - if (lock.dependencies) { - for (const name in lock.dependencies) { - const loc = location + (location ? '/' : '') + 'node_modules/' + name - this.#loadAll(loc, name, lock.dependencies[name]) - } - } - } - - // v1 lockfiles track the optional/dev flags, but they don't tell us - // which thing had what kind of dep on what other thing, so we need - // to correct that now, or every link will be considered prod - #fixDependencies (pkg) { - // we need the root package.json because legacy shrinkwraps just - // have requires:true at the root level, which is even less useful - // than merging all dep types into one object. - const root = this.data.packages[''] - for (const key of pkgMetaKeys) { - const val = metaFieldFromPkg(pkg, key) - if (val) { - root[key.replace(/^_/, '')] = val - } - } - - for (const loc in this.data.packages) { - const meta = this.data.packages[loc] - if (!meta.requires || !loc) { - continue - } - - // resolve each require to a meta entry - // if this node isn't optional, but the dep is, then it's an optionalDep - // likewise for dev deps. - // This isn't perfect, but it's a pretty good approximation, and at - // least gets us out of having all 'prod' edges, which throws off the - // buildIdealTree process - for (const name in meta.requires) { - const dep = this.#resolveMetaNode(loc, name) - // this overwrites the false value set above - // default to dependencies if the dep just isn't in the tree, which - // maybe should be an error, since it means that the shrinkwrap is - // invalid, but we can't do much better without any info. - let depType = 'dependencies' - /* istanbul ignore else - dev deps are only for the root level */ - if (dep?.optional && !meta.optional) { - depType = 'optionalDependencies' - } else if (dep?.dev && !meta.dev) { - // XXX is this even reachable? - depType = 'devDependencies' - } - if (!meta[depType]) { - meta[depType] = {} - } - meta[depType][name] = meta.requires[name] - } - delete meta.requires - } - } - - #resolveMetaNode (loc, name) { - for (let path = loc; true; path = path.replace(/(^|\/)[^/]*$/, '')) { - const check = `${path}${path ? '/' : ''}node_modules/${name}` - if (this.data.packages[check]) { - return this.data.packages[check] - } - - if (!path) { - break - } - } - return null - } - - #lockFromLoc (lock, path, i = 0) { - if (!lock) { - return null - } - - if (path[i] === '') { - i++ - } - - if (i >= path.length) { - return lock - } - - if (!lock.dependencies) { - return null - } - - return this.#lockFromLoc(lock.dependencies[path[i]], path, i + 1) - } - - // pass in a path relative to the root path, or an absolute path, - // get back a /-normalized location based on root path. - #pathToLoc (path) { - return relpath(this.path, resolve(this.path, path)) - } - - delete (nodePath) { - if (!this.data) { - throw new Error('run load() before getting or setting data') - } - const location = this.#pathToLoc(nodePath) - this.#awaitingUpdate.delete(location) - - delete this.data.packages[location] - const path = location.split(/(?:^|\/)node_modules\//) - const name = path.pop() - const pLock = this.#lockFromLoc(this.data, path) - if (pLock && pLock.dependencies) { - delete pLock.dependencies[name] - } - } - - get (nodePath) { - if (!this.data) { - throw new Error('run load() before getting or setting data') - } - - const location = this.#pathToLoc(nodePath) - if (this.#awaitingUpdate.has(location)) { - this.#updateWaitingNode(location) - } - - // first try to get from the newer spot, which we know has - // all the things we need. - if (this.data.packages[location]) { - return this.data.packages[location] - } - - // otherwise, fall back to the legacy metadata, and hope for the best - // get the node in the shrinkwrap corresponding to this spot - const path = location.split(/(?:^|\/)node_modules\//) - const name = path[path.length - 1] - const lock = this.#lockFromLoc(this.data, path) - - return this.#metaFromLock(location, name, lock) - } - - #metaFromLock (location, name, lock) { - // This function tries as hard as it can to figure out the metadata - // from a lockfile which may be outdated or incomplete. Since v1 - // lockfiles used the "version" field to contain a variety of - // different possible types of data, this gets a little complicated. - if (!lock) { - return {} - } - - // try to figure out a npm-package-arg spec from the lockfile entry - // This will return null if we could not get anything valid out of it. - const spec = specFromLock(name, lock, this.path) - - if (spec.type === 'directory') { - // the "version" was a file: url to a non-tarball path - // this is a symlink dep. We don't store much metadata - // about symlinks, just the target. - const target = relpath(this.path, spec.fetchSpec) - this.data.packages[location] = { - link: true, - resolved: target, - } - // also save the link target, omitting version since we don't know - // what it is, but we know it isn't a link to itself! - if (!this.data.packages[target]) { - this.#metaFromLock(target, name, { ...lock, version: null }) - } - return this.data.packages[location] - } - - const meta = {} - // when calling loadAll we'll change these into proper dep objects - if (lock.requires && typeof lock.requires === 'object') { - meta.requires = lock.requires - } - - if (lock.optional) { - meta.optional = true - } - if (lock.dev) { - meta.dev = true - } - - // the root will typically have a name from the root project's - // package.json file. - if (location === '') { - meta.name = lock.name - } - - // if we have integrity, save it now. - if (lock.integrity) { - meta.integrity = lock.integrity - } - - if (lock.version && !lock.integrity) { - // this is usually going to be a git url or symlink, but it could - // also be a registry dependency that did not have integrity at - // the time it was saved. - // Symlinks were already handled above, so that leaves git. - // - // For git, always save the full SSH url. we'll actually fetch the - // tgz most of the time, since it's faster, but it won't work for - // private repos, and we can't get back to the ssh from the tgz, - // so we store the ssh instead. - // For unknown git hosts, just resolve to the raw spec in lock.version - if (spec.type === 'git') { - meta.resolved = consistentResolve(spec, this.path, this.path) - - // return early because there is nothing else we can do with this - return this.data.packages[location] = meta - } else if (spec.registry) { - // registry dep that didn't save integrity. grab the version, and - // fall through to pick up the resolved and potentially name. - meta.version = lock.version - } - // only other possible case is a tarball without integrity. - // fall through to do what we can with the filename later. - } - - // at this point, we know that the spec is either a registry dep - // (ie, version, because locking, which means a resolved url), - // or a remote dep, or file: url. Remote deps and file urls - // have a fetchSpec equal to the fully resolved thing. - // Registry deps, we take what's in the lockfile. - if (lock.resolved || (spec.type && !spec.registry)) { - if (spec.registry) { - meta.resolved = lock.resolved - } else if (spec.type === 'file') { - meta.resolved = consistentResolve(spec, this.path, this.path, true) - } else if (spec.fetchSpec) { - meta.resolved = spec.fetchSpec - } - } - - // at this point, if still we don't have a version, do our best to - // infer it from the tarball url/file. This works a surprising - // amount of the time, even though it's not guaranteed. - if (!meta.version) { - if (spec.type === 'file' || spec.type === 'remote') { - const fromTgz = versionFromTgz(spec.name, spec.fetchSpec) || - versionFromTgz(spec.name, meta.resolved) - if (fromTgz) { - meta.version = fromTgz.version - if (fromTgz.name !== name) { - meta.name = fromTgz.name - } - } - } else if (spec.type === 'alias') { - meta.name = spec.subSpec.name - meta.version = spec.subSpec.fetchSpec - } else if (spec.type === 'version') { - meta.version = spec.fetchSpec - } - // ok, I did my best! good luck! - } - - if (lock.bundled) { - meta.inBundle = true - } - - // save it for next time - return this.data.packages[location] = meta - } - - add (node) { - if (!this.data) { - throw new Error('run load() before getting or setting data') - } - - // will be actually updated on read - const loc = relpath(this.path, node.path) - if (node.path === this.path) { - this.tree = node - } - - // if we have metadata about this node, and it's a match, then - // try to decorate it. - if (node.resolved === null || node.integrity === null) { - const { - resolved, - integrity, - hasShrinkwrap, - version, - } = this.get(node.path) - - let pathFixed = null - if (resolved) { - if (!/^file:/.test(resolved)) { - pathFixed = resolved - } else { - pathFixed = `file:${resolve(this.path, resolved.slice(5)).replace(/#/g, '%23')}` - } - } - - // if we have one, only set the other if it matches - // otherwise it could be for a completely different thing. - const resolvedOk = !resolved || !node.resolved || - node.resolved === pathFixed - const integrityOk = !integrity || !node.integrity || - node.integrity === integrity - const versionOk = !version || !node.version || version === node.version - - const allOk = (resolved || integrity || version) && - resolvedOk && integrityOk && versionOk - - if (allOk) { - node.resolved = node.resolved || pathFixed || null - node.integrity = node.integrity || integrity || null - node.hasShrinkwrap = node.hasShrinkwrap || hasShrinkwrap || false - } else { - // try to read off the package or node itself - const { - resolved, - integrity, - hasShrinkwrap, - } = Shrinkwrap.metaFromNode(node, this.path, this.resolveOptions) - node.resolved = node.resolved || resolved || null - node.integrity = node.integrity || integrity || null - node.hasShrinkwrap = node.hasShrinkwrap || hasShrinkwrap || false - } - } - this.#awaitingUpdate.set(loc, node) - } - - addEdge (edge) { - if (!this.yarnLock || !edge.valid) { - return - } - - const { to: node } = edge - - // if it's already set up, nothing to do - if (node.resolved !== null && node.integrity !== null) { - return - } - - // if the yarn lock is empty, nothing to do - if (!this.yarnLock.entries || !this.yarnLock.entries.size) { - return - } - - // we relativize the path here because that's how it shows up in the lock - // XXX why is this different from pathFixed in this.add?? - let pathFixed = null - if (node.resolved) { - if (!/file:/.test(node.resolved)) { - pathFixed = node.resolved - } else { - pathFixed = consistentResolve(node.resolved, node.path, this.path, true) - } - } - - const spec = npa(`${node.name}@${edge.spec}`) - const entry = this.yarnLock.entries.get(`${node.name}@${edge.spec}`) - - if (!entry || - mismatch(node.version, entry.version) || - mismatch(node.integrity, entry.integrity) || - mismatch(pathFixed, entry.resolved)) { - return - } - - if (entry.resolved && yarnRegRe.test(entry.resolved) && spec.registry) { - entry.resolved = entry.resolved.replace(yarnRegRe, 'https://registry.npmjs.org/') - } - - node.integrity = node.integrity || entry.integrity || null - node.resolved = node.resolved || - consistentResolve(entry.resolved, this.path, node.path) || null - - this.#awaitingUpdate.set(relpath(this.path, node.path), node) - } - - #updateWaitingNode (loc) { - const node = this.#awaitingUpdate.get(loc) - this.#awaitingUpdate.delete(loc) - this.data.packages[loc] = Shrinkwrap.metaFromNode( - node, - this.path, - this.resolveOptions) - } - - commit () { - if (this.tree) { - if (this.yarnLock) { - this.yarnLock.fromTree(this.tree) - } - const root = Shrinkwrap.metaFromNode( - this.tree.target, - this.path, - this.resolveOptions) - this.data.packages = {} - if (Object.keys(root).length) { - this.data.packages[''] = root - } - for (const node of this.tree.root.inventory.values()) { - // only way this.tree is not root is if the root is a link to it - if (node === this.tree || node.isRoot || node.location === '') { - continue - } - const loc = relpath(this.path, node.path) - this.data.packages[loc] = Shrinkwrap.metaFromNode( - node, - this.path, - this.resolveOptions) - } - } else if (this.#awaitingUpdate.size > 0) { - for (const loc of this.#awaitingUpdate.keys()) { - this.#updateWaitingNode(loc) - } - } - - // if we haven't set it by now, use the default - if (!this.lockfileVersion) { - this.lockfileVersion = defaultLockfileVersion - } - this.data.lockfileVersion = this.lockfileVersion - - // hidden lockfiles don't include legacy metadata or a root entry - if (this.hiddenLockfile) { - delete this.data.packages[''] - delete this.data.dependencies - } else if (this.tree && this.lockfileVersion <= 3) { - this.#buildLegacyLockfile(this.tree, this.data) - } - - // lf version 1 = dependencies only - // lf version 2 = dependencies and packages - // lf version 3 = packages only - if (this.lockfileVersion >= 3) { - const { dependencies, ...data } = this.data - return data - } else if (this.lockfileVersion < 2) { - const { packages, ...data } = this.data - return data - } else { - return { ...this.data } - } - } - - #buildLegacyLockfile (node, lock, path = []) { - if (node === this.tree) { - // the root node - lock.name = node.packageName || node.name - if (node.version) { - lock.version = node.version - } - } - - // npm v6 and before tracked 'from', meaning "the request that led - // to this package being installed". However, that's inherently - // racey and non-deterministic in a world where deps are deduped - // ahead of fetch time. In order to maintain backwards compatibility - // with v6 in the lockfile, we do this trick where we pick a valid - // dep link out of the edgesIn set. Choose the edge with the fewest - // number of `node_modules` sections in the requestor path, and then - // lexically sort afterwards. - const edge = [...node.edgesIn].filter(e => e.valid).sort((a, b) => { - const aloc = a.from.location.split('node_modules') - const bloc = b.from.location.split('node_modules') - /* istanbul ignore next - sort calling order is indeterminate */ - if (aloc.length > bloc.length) { - return 1 - } - if (bloc.length > aloc.length) { - return -1 - } - return localeCompare(aloc[aloc.length - 1], bloc[bloc.length - 1]) - })[0] - - const res = consistentResolve(node.resolved, this.path, this.path, true) - const rSpec = specFromResolved(res) - - // if we don't have anything (ie, it's extraneous) then use the resolved - // value as if that was where we got it from, since at least it's true. - // if we don't have either, just an empty object so nothing matches below. - // This will effectively just save the version and resolved, as if it's - // a standard version/range dep, which is a reasonable default. - let spec = rSpec - if (edge) { - spec = npa.resolve(node.name, edge.spec, edge.from.realpath) - } - - if (node.isLink) { - lock.version = `file:${relpath(this.path, node.realpath).replace(/#/g, '%23')}` - } else if (spec && (spec.type === 'file' || spec.type === 'remote')) { - lock.version = spec.saveSpec - } else if (spec && spec.type === 'git' || rSpec.type === 'git') { - lock.version = node.resolved - /* istanbul ignore else - don't think there are any cases where a git - * spec (or indeed, ANY npa spec) doesn't have a .raw member */ - if (spec.raw) { - lock.from = spec.raw - } - } else if (!node.isRoot && - node.package && - node.packageName && - node.packageName !== node.name) { - lock.version = `npm:${node.packageName}@${node.version}` - } else if (node.package && node.version) { - lock.version = node.version - } - - if (node.inDepBundle) { - lock.bundled = true - } - - // when we didn't resolve to git, file, or dir, and didn't request - // git, file, dir, or remote, then the resolved value is necessary. - if (node.resolved && - !node.isLink && - rSpec.type !== 'git' && - rSpec.type !== 'file' && - rSpec.type !== 'directory' && - spec.type !== 'directory' && - spec.type !== 'git' && - spec.type !== 'file' && - spec.type !== 'remote') { - lock.resolved = overrideResolves(node.resolved, this.resolveOptions) - } - - if (node.integrity) { - lock.integrity = node.integrity - } - - if (node.extraneous) { - lock.extraneous = true - } else if (!node.isLink) { - if (node.peer) { - lock.peer = true - } - - if (node.devOptional && !node.dev && !node.optional) { - lock.devOptional = true - } - - if (node.dev) { - lock.dev = true - } - - if (node.optional) { - lock.optional = true - } - } - - const depender = node.target - if (depender.edgesOut.size > 0) { - if (node !== this.tree) { - const entries = [...depender.edgesOut.entries()] - lock.requires = entries.reduce((set, [k, v]) => { - // omit peer deps from legacy lockfile requires field, because - // npm v6 doesn't handle peer deps, and this triggers some bad - // behavior if the dep can't be found in the dependencies list. - const { spec, peer } = v - if (peer) { - return set - } - if (spec.startsWith('file:')) { - // turn absolute file: paths into relative paths from the node - // this especially shows up with workspace edges when the root - // node is also a workspace in the set. - const p = resolve(node.realpath, spec.slice('file:'.length)) - set[k] = `file:${relpath(node.realpath, p).replace(/#/g, '%23')}` - } else { - set[k] = spec - } - return set - }, {}) - } else { - lock.requires = true - } - } - - // now we walk the children, putting them in the 'dependencies' object - const { children } = node.target - if (!children.size) { - delete lock.dependencies - } else { - const kidPath = [...path, node.realpath] - const dependencies = {} - // skip any that are already in the descent path, so cyclical link - // dependencies don't blow up with ELOOP. - let found = false - for (const [name, kid] of children.entries()) { - if (path.includes(kid.realpath)) { - continue - } - dependencies[name] = this.#buildLegacyLockfile(kid, {}, kidPath) - found = true - } - if (found) { - lock.dependencies = dependencies - } - } - return lock - } - - toJSON () { - if (!this.data) { - throw new Error('run load() before getting or setting data') - } - - return this.commit() - } - - toString (options = {}) { - const data = this.toJSON() - const { format = true } = options - const defaultIndent = this.indent || 2 - const indent = format === true ? defaultIndent - : format || 0 - const eol = format ? this.newline || '\n' : '' - return stringify(data, swKeyOrder, indent).replace(/\n/g, eol) - } - - save (options = {}) { - if (!this.data) { - throw new Error('run load() before saving data') - } - - const json = this.toString(options) - if ( - !this.hiddenLockfile - && this.originalLockfileVersion !== undefined - && this.originalLockfileVersion !== this.lockfileVersion - ) { - log.warn( - `Converting lock file (${relative(process.cwd(), this.filename)}) from v${this.originalLockfileVersion} -> v${this.lockfileVersion}` - ) - } - return Promise.all([ - writeFile(this.filename, json).catch(er => { - if (this.hiddenLockfile) { - // well, we did our best. - // if we reify, and there's nothing there, then it might be lacking - // a node_modules folder, but then the lockfile is not important. - // Remove the file, so that in case there WERE deps, but we just - // failed to update the file for some reason, it's not out of sync. - return rm(this.filename, { recursive: true, force: true }) - } - throw er - }), - this.yarnLock && this.yarnLock.entries.size && - writeFile(this.path + '/yarn.lock', this.yarnLock.toString()), - ]) - } -} - -module.exports = Shrinkwrap diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/signal-handling.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/signal-handling.js deleted file mode 100644 index 18841d9..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/signal-handling.js +++ /dev/null @@ -1,74 +0,0 @@ -const signals = require('./signals.js') - -// for testing, expose the process being used -module.exports = Object.assign(fn => setup(fn), { process }) - -// do all of this in a setup function so that we can call it -// multiple times for multiple reifies that might be going on. -// Otherwise, Arborist.reify() is a global action, which is a -// new constraint we'd be adding with this behavior. -const setup = fn => { - const { process } = module.exports - - const sigListeners = { loaded: false } - - const unload = () => { - if (!sigListeners.loaded) { - return - } - for (const sig of signals) { - try { - process.removeListener(sig, sigListeners[sig]) - } catch { - // ignore errors - } - } - process.removeListener('beforeExit', onBeforeExit) - sigListeners.loaded = false - } - - const onBeforeExit = () => { - // this trick ensures that we exit with the same signal we caught - // Ie, if you press ^C and npm gets a SIGINT, we'll do the rollback - // and then exit with a SIGINT signal once we've removed the handler. - // The timeout is there because signals are asynchronous, so we need - // the process to NOT exit on its own, which means we have to have - // something keeping the event loop looping. Hence this hack. - unload() - process.kill(process.pid, signalReceived) - setTimeout(() => {}, 500) - } - - let signalReceived = null - const listener = (sig, fn) => () => { - signalReceived = sig - - // if we exit normally, but caught a signal which would have been fatal, - // then re-send it once we're done with whatever cleanup we have to do. - unload() - if (process.listeners(sig).length < 1) { - process.once('beforeExit', onBeforeExit) - } - - fn({ signal: sig }) - } - - // do the actual loading here - for (const sig of signals) { - sigListeners[sig] = listener(sig, fn) - const max = process.getMaxListeners() - try { - // if we call this a bunch of times, avoid triggering the warning - const { length } = process.listeners(sig) - if (length >= max) { - process.setMaxListeners(length + 1) - } - process.on(sig, sigListeners[sig]) - } catch { - // ignore errors - } - } - sigListeners.loaded = true - - return unload -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/signals.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/signals.js deleted file mode 100644 index 8dcd585..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/signals.js +++ /dev/null @@ -1,58 +0,0 @@ -// copied from signal-exit - -// This is not the set of all possible signals. -// -// It IS, however, the set of all signals that trigger -// an exit on either Linux or BSD systems. Linux is a -// superset of the signal names supported on BSD, and -// the unknown signals just fail to register, so we can -// catch that easily enough. -// -// Don't bother with SIGKILL. It's uncatchable, which -// means that we can't fire any callbacks anyway. -// -// If a user does happen to register a handler on a non- -// fatal signal like SIGWINCH or something, and then -// exit, it'll end up firing `process.emit('exit')`, so -// the handler will be fired anyway. -// -// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised -// artificially, inherently leave the process in a -// state from which it is not safe to try and enter JS -// listeners. - -const platform = global.__ARBORIST_FAKE_PLATFORM__ || process.platform - -module.exports = [ - 'SIGABRT', - 'SIGALRM', - 'SIGHUP', - 'SIGINT', - 'SIGTERM', -] - -if (platform !== 'win32') { - module.exports.push( - 'SIGVTALRM', - 'SIGXCPU', - 'SIGXFSZ', - 'SIGUSR2', - 'SIGTRAP', - 'SIGSYS', - 'SIGQUIT', - 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ) -} - -if (platform === 'linux') { - module.exports.push( - 'SIGIO', - 'SIGPOLL', - 'SIGPWR', - 'SIGSTKFLT', - 'SIGUNUSED' - ) -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/spec-from-lock.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/spec-from-lock.js deleted file mode 100644 index 49b53c8..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/spec-from-lock.js +++ /dev/null @@ -1,34 +0,0 @@ -const npa = require('npm-package-arg') - -// extracted from npm v6 lib/install/realize-shrinkwrap-specifier.js -const specFromLock = (name, lock, where) => { - try { - if (lock.version) { - const spec = npa.resolve(name, lock.version, where) - if (lock.integrity || spec.type === 'git') { - return spec - } - } - if (lock.from) { - // legacy metadata includes "from", but not integrity - const spec = npa.resolve(name, lock.from, where) - if (spec.registry && lock.version) { - return npa.resolve(name, lock.version, where) - } else if (!lock.resolved) { - return spec - } - } - if (lock.resolved) { - return npa.resolve(name, lock.resolved, where) - } - } catch { - // ignore errors - } - try { - return npa.resolve(name, lock.version, where) - } catch { - return {} - } -} - -module.exports = specFromLock diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js deleted file mode 100644 index 42c401e..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/tracker.js +++ /dev/null @@ -1,102 +0,0 @@ -const _progress = Symbol('_progress') -const _onError = Symbol('_onError') -const _setProgress = Symbol('_setProgess') -const npmlog = require('npmlog') - -module.exports = cls => class Tracker extends cls { - constructor (options = {}) { - super(options) - this[_setProgress] = !!options.progress - this[_progress] = new Map() - } - - addTracker (section, subsection = null, key = null) { - if (section === null || section === undefined) { - this[_onError](`Tracker can't be null or undefined`) - } - - if (key === null) { - key = subsection - } - - const hasTracker = this[_progress].has(section) - const hasSubtracker = this[_progress].has(`${section}:${key}`) - - if (hasTracker && subsection === null) { - // 0. existing tracker, no subsection - this[_onError](`Tracker "${section}" already exists`) - } else if (!hasTracker && subsection === null) { - // 1. no existing tracker, no subsection - // Create a new tracker from npmlog - // starts progress bar - if (this[_setProgress] && this[_progress].size === 0) { - npmlog.enableProgress() - } - - this[_progress].set(section, npmlog.newGroup(section)) - } else if (!hasTracker && subsection !== null) { - // 2. no parent tracker and subsection - this[_onError](`Parent tracker "${section}" does not exist`) - } else if (!hasTracker || !hasSubtracker) { - // 3. existing parent tracker, no subsection tracker - // Create a new subtracker in this[_progress] from parent tracker - this[_progress].set(`${section}:${key}`, - this[_progress].get(section).newGroup(`${section}:${subsection}`) - ) - } - // 4. existing parent tracker, existing subsection tracker - // skip it - } - - finishTracker (section, subsection = null, key = null) { - if (section === null || section === undefined) { - this[_onError](`Tracker can't be null or undefined`) - } - - if (key === null) { - key = subsection - } - - const hasTracker = this[_progress].has(section) - const hasSubtracker = this[_progress].has(`${section}:${key}`) - - // 0. parent tracker exists, no subsection - // Finish parent tracker and remove from this[_progress] - if (hasTracker && subsection === null) { - // check if parent tracker does - // not have any remaining children - const keys = this[_progress].keys() - for (const key of keys) { - if (key.match(new RegExp(section + ':'))) { - this.finishTracker(section, key) - } - } - - // remove parent tracker - this[_progress].get(section).finish() - this[_progress].delete(section) - - // remove progress bar if all - // trackers are finished - if (this[_setProgress] && this[_progress].size === 0) { - npmlog.disableProgress() - } - } else if (!hasTracker && subsection === null) { - // 1. no existing parent tracker, no subsection - this[_onError](`Tracker "${section}" does not exist`) - } else if (!hasTracker || hasSubtracker) { - // 2. subtracker exists - // Finish subtracker and remove from this[_progress] - this[_progress].get(`${section}:${key}`).finish() - this[_progress].delete(`${section}:${key}`) - } - // 3. existing parent tracker, no subsection - } - - [_onError] (msg) { - if (this[_setProgress]) { - npmlog.disableProgress() - } - throw new Error(msg) - } -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/tree-check.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/tree-check.js deleted file mode 100644 index 62a50bc..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/tree-check.js +++ /dev/null @@ -1,155 +0,0 @@ -const debug = require('./debug.js') - -const checkTree = (tree, checkUnreachable = true) => { - const log = [['START TREE CHECK', tree.path]] - - // this can only happen in tests where we have a "tree" object - // that isn't actually a tree. - if (!tree.root || !tree.root.inventory) { - return tree - } - - const { inventory } = tree.root - const seen = new Set() - const check = (node, via = tree, viaType = 'self') => { - log.push([ - 'CHECK', - node && node.location, - via && via.location, - viaType, - 'seen=' + seen.has(node), - 'promise=' + !!(node && node.then), - 'root=' + !!(node && node.isRoot), - ]) - - if (!node || seen.has(node) || node.then) { - return - } - - seen.add(node) - - if (node.isRoot && node !== tree.root) { - throw Object.assign(new Error('double root'), { - node: node.path, - realpath: node.realpath, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - log, - }) - } - - if (node.root !== tree.root) { - throw Object.assign(new Error('node from other root in tree'), { - node: node.path, - realpath: node.realpath, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - otherRoot: node.root && node.root.path, - log, - }) - } - - if (!node.isRoot && node.inventory.size !== 0) { - throw Object.assign(new Error('non-root has non-zero inventory'), { - node: node.path, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - inventory: [...node.inventory.values()].map(node => - [node.path, node.location]), - log, - }) - } - - if (!node.isRoot && !inventory.has(node) && !node.dummy) { - throw Object.assign(new Error('not in inventory'), { - node: node.path, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - log, - }) - } - - const devEdges = [...node.edgesOut.values()].filter(e => e.dev) - if (!node.isTop && devEdges.length) { - throw Object.assign(new Error('dev edges on non-top node'), { - node: node.path, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - devEdges: devEdges.map(e => [e.type, e.name, e.spec, e.error]), - log, - }) - } - - if (node.path === tree.root.path && node !== tree.root && !tree.root.isLink) { - throw Object.assign(new Error('node with same path as root'), { - node: node.path, - tree: tree.path, - root: tree.root.path, - via: via.path, - viaType, - log, - }) - } - - if (!node.isLink && node.path !== node.realpath) { - throw Object.assign(new Error('non-link with mismatched path/realpath'), { - node: node.path, - tree: tree.path, - realpath: node.realpath, - root: tree.root.path, - via: via.path, - viaType, - log, - }) - } - - const { parent, fsParent, target } = node - check(parent, node, 'parent') - check(fsParent, node, 'fsParent') - check(target, node, 'target') - log.push(['CHILDREN', node.location, ...node.children.keys()]) - for (const kid of node.children.values()) { - check(kid, node, 'children') - } - for (const kid of node.fsChildren) { - check(kid, node, 'fsChildren') - } - for (const link of node.linksIn) { - check(link, node, 'linksIn') - } - for (const top of node.tops) { - check(top, node, 'tops') - } - log.push(['DONE', node.location]) - } - check(tree) - if (checkUnreachable) { - for (const node of inventory.values()) { - if (!seen.has(node) && node !== tree.root) { - throw Object.assign(new Error('unreachable in inventory'), { - node: node.path, - realpath: node.realpath, - location: node.location, - root: tree.root.path, - tree: tree.path, - log, - }) - } - } - } - return tree -} - -// should only ever run this check in debug mode -module.exports = tree => tree -debug(() => module.exports = checkTree) diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/version-from-tgz.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/version-from-tgz.js deleted file mode 100644 index be4405c..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/version-from-tgz.js +++ /dev/null @@ -1,48 +0,0 @@ -/* eslint node/no-deprecated-api: "off" */ -const semver = require('semver') -const { basename } = require('path') -const { parse } = require('url') -module.exports = (name, tgz) => { - const base = basename(tgz) - if (!base.endsWith('.tgz')) { - return null - } - - const u = parse(tgz) - if (/^https?:/.test(u.protocol)) { - // registry url? check for most likely pattern. - // either /@foo/bar/-/bar-1.2.3.tgz or - // /foo/-/foo-1.2.3.tgz, and fall through to - // basename checking. Note that registries can - // be mounted below the root url, so /a/b/-/x/y/foo/-/foo-1.2.3.tgz - // is a potential option. - const tfsplit = u.path.slice(1).split('/-/') - if (tfsplit.length > 1) { - const afterTF = tfsplit.pop() - if (afterTF === base) { - const pre = tfsplit.pop() - const preSplit = pre.split(/\/|%2f/i) - const project = preSplit.pop() - const scope = preSplit.pop() - return versionFromBaseScopeName(base, scope, project) - } - } - } - - const split = name.split(/\/|%2f/i) - const project = split.pop() - const scope = split.pop() - return versionFromBaseScopeName(base, scope, project) -} - -const versionFromBaseScopeName = (base, scope, name) => { - if (!base.startsWith(name + '-')) { - return null - } - - const parsed = semver.parse(base.substring(name.length + 1, base.length - 4)) - return parsed ? { - name: scope && scope.charAt(0) === '@' ? `${scope}/${name}` : name, - version: parsed.version, - } : null -} diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/vuln.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/vuln.js deleted file mode 100644 index 81b921d..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/vuln.js +++ /dev/null @@ -1,217 +0,0 @@ -// An object representing a vulnerability either as the result of an -// advisory or due to the package in question depending exclusively on -// vulnerable versions of a dep. -// -// - name: package name -// - range: Set of vulnerable versions -// - nodes: Set of nodes affected -// - effects: Set of vulns triggered by this one -// - advisories: Set of advisories (including metavulns) causing this vuln. -// All of the entries in via are vulnerability objects returned by -// @npmcli/metavuln-calculator -// - via: dependency vulns which cause this one - -const { satisfies, simplifyRange } = require('semver') -const semverOpt = { loose: true, includePrerelease: true } - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const npa = require('npm-package-arg') -const _range = Symbol('_range') -const _simpleRange = Symbol('_simpleRange') -const _fixAvailable = Symbol('_fixAvailable') - -const severities = new Map([ - ['info', 0], - ['low', 1], - ['moderate', 2], - ['high', 3], - ['critical', 4], - [null, -1], -]) - -for (const [name, val] of severities.entries()) { - severities.set(val, name) -} - -class Vuln { - constructor ({ name, advisory }) { - this.name = name - this.via = new Set() - this.advisories = new Set() - this.severity = null - this.effects = new Set() - this.topNodes = new Set() - this[_range] = null - this[_simpleRange] = null - this.nodes = new Set() - // assume a fix is available unless it hits a top node - // that locks it in place, setting this false or {isSemVerMajor, version}. - this[_fixAvailable] = true - this.addAdvisory(advisory) - this.packument = advisory.packument - this.versions = advisory.versions - } - - get fixAvailable () { - return this[_fixAvailable] - } - - set fixAvailable (f) { - this[_fixAvailable] = f - // if there's a fix available for this at the top level, it means that - // it will also fix the vulns that led to it being there. to get there, - // we set the vias to the most "strict" of fix availables. - // - false: no fix is available - // - {name, version, isSemVerMajor} fix requires -f, is semver major - // - {name, version} fix requires -f, not semver major - // - true: fix does not require -f - // TODO: duped entries may require different fixes but the current - // structure does not support this, so the case were a top level fix - // corrects a duped entry may mean you have to run fix more than once - for (const v of this.via) { - // don't blow up on loops - if (v.fixAvailable === f) { - continue - } - - if (f === false) { - v.fixAvailable = f - } else if (v.fixAvailable === true) { - v.fixAvailable = f - } else if (typeof f === 'object' && ( - typeof v.fixAvailable !== 'object' || !v.fixAvailable.isSemVerMajor)) { - v.fixAvailable = f - } - } - } - - get isDirect () { - for (const node of this.nodes.values()) { - for (const edge of node.edgesIn) { - if (edge.from.isProjectRoot || edge.from.isWorkspace) { - return true - } - } - } - return false - } - - testSpec (spec) { - const specObj = npa(spec) - if (!specObj.registry) { - return true - } - - if (specObj.subSpec) { - spec = specObj.subSpec.rawSpec - } - - for (const v of this.versions) { - if (satisfies(v, spec) && !satisfies(v, this.range, semverOpt)) { - return false - } - } - return true - } - - toJSON () { - return { - name: this.name, - severity: this.severity, - isDirect: this.isDirect, - // just loop over the advisories, since via is only Vuln objects, - // and calculated advisories have all the info we need - via: [...this.advisories].map(v => v.type === 'metavuln' ? v.dependency : { - ...v, - versions: undefined, - vulnerableVersions: undefined, - id: undefined, - }).sort((a, b) => - localeCompare(String(a.source || a), String(b.source || b))), - effects: [...this.effects].map(v => v.name).sort(localeCompare), - range: this.simpleRange, - nodes: [...this.nodes].map(n => n.location).sort(localeCompare), - fixAvailable: this[_fixAvailable], - } - } - - addVia (v) { - this.via.add(v) - v.effects.add(this) - // call the setter since we might add vias _after_ setting fixAvailable - this.fixAvailable = this.fixAvailable - } - - deleteVia (v) { - this.via.delete(v) - v.effects.delete(this) - } - - deleteAdvisory (advisory) { - this.advisories.delete(advisory) - // make sure we have the max severity of all the vulns causing this one - this.severity = null - this[_range] = null - this[_simpleRange] = null - // refresh severity - for (const advisory of this.advisories) { - this.addAdvisory(advisory) - } - - // remove any effects that are no longer relevant - const vias = new Set([...this.advisories].map(a => a.dependency)) - for (const via of this.via) { - if (!vias.has(via.name)) { - this.deleteVia(via) - } - } - } - - addAdvisory (advisory) { - this.advisories.add(advisory) - const sev = severities.get(advisory.severity) - this[_range] = null - this[_simpleRange] = null - if (sev > severities.get(this.severity)) { - this.severity = advisory.severity - } - } - - get range () { - return this[_range] || - (this[_range] = [...this.advisories].map(v => v.range).join(' || ')) - } - - get simpleRange () { - if (this[_simpleRange] && this[_simpleRange] === this[_range]) { - return this[_simpleRange] - } - - const versions = [...this.advisories][0].versions - const range = this.range - const simple = simplifyRange(versions, range, semverOpt) - return this[_simpleRange] = this[_range] = simple - } - - isVulnerable (node) { - if (this.nodes.has(node)) { - return true - } - - const { version } = node.package - if (!version) { - return false - } - - for (const v of this.advisories) { - if (v.testVersion(version)) { - this.nodes.add(node) - return true - } - } - - return false - } -} - -module.exports = Vuln diff --git a/node_modules/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js b/node_modules/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js deleted file mode 100644 index d5693a3..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/lib/yarn-lock.js +++ /dev/null @@ -1,377 +0,0 @@ -// parse a yarn lock file -// basic format -// -// [, ...]: -// -// : -// -// -// Assume that any key or value might be quoted, though that's only done -// in practice if certain chars are in the string. When writing back, we follow -// Yarn's rules for quoting, to cause minimal friction. -// -// The data format would support nested objects, but at this time, it -// appears that yarn does not use that for anything, so in the interest -// of a simpler parser algorithm, this implementation only supports a -// single layer of sub objects. -// -// This doesn't deterministically define the shape of the tree, and so -// cannot be used (on its own) for Arborist.loadVirtual. -// But it can give us resolved, integrity, and version, which is useful -// for Arborist.loadActual and for building the ideal tree. -// -// At the very least, when a yarn.lock file is present, we update it -// along the way, and save it back in Shrinkwrap.save() -// -// NIHing this rather than using @yarnpkg/lockfile because that module -// is an impenetrable 10kloc of webpack flow output, which is overkill -// for something relatively simple and tailored to Arborist's use case. - -const localeCompare = require('@isaacs/string-locale-compare')('en') -const consistentResolve = require('./consistent-resolve.js') -const { dirname } = require('path') -const { breadth } = require('treeverse') - -// Sort Yarn entries respecting the yarn.lock sort order -const yarnEntryPriorities = { - name: 1, - version: 2, - uid: 3, - resolved: 4, - integrity: 5, - registry: 6, - dependencies: 7, -} - -const priorityThenLocaleCompare = (a, b) => { - if (!yarnEntryPriorities[a] && !yarnEntryPriorities[b]) { - return localeCompare(a, b) - } - /* istanbul ignore next */ - return (yarnEntryPriorities[a] || 100) > (yarnEntryPriorities[b] || 100) ? 1 : -1 -} - -const quoteIfNeeded = val => { - if ( - typeof val === 'boolean' || - typeof val === 'number' || - val.startsWith('true') || - val.startsWith('false') || - /[:\s\n\\",[\]]/g.test(val) || - !/^[a-zA-Z]/g.test(val) - ) { - return JSON.stringify(val) - } - - return val -} - -// sort a key/value object into a string of JSON stringified keys and vals -const sortKV = obj => Object.keys(obj) - .sort(localeCompare) - .map(k => ` ${quoteIfNeeded(k)} ${quoteIfNeeded(obj[k])}`) - .join('\n') - -// for checking against previous entries -const match = (p, n) => - p.integrity && n.integrity ? p.integrity === n.integrity - : p.resolved && n.resolved ? p.resolved === n.resolved - : p.version && n.version ? p.version === n.version - : true - -const prefix = -`# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -` - -const nullSymbol = Symbol('null') -class YarnLock { - static parse (data) { - return new YarnLock().parse(data) - } - - static fromTree (tree) { - return new YarnLock().fromTree(tree) - } - - constructor () { - this.entries = null - this.endCurrent() - } - - endCurrent () { - this.current = null - this.subkey = nullSymbol - } - - parse (data) { - const ENTRY_START = /^[^\s].*:$/ - const SUBKEY = /^ {2}[^\s]+:$/ - const SUBVAL = /^ {4}[^\s]+ .+$/ - const METADATA = /^ {2}[^\s]+ .+$/ - this.entries = new Map() - this.current = null - const linere = /([^\r\n]*)\r?\n/gm - let match - let lineNum = 0 - if (!/\n$/.test(data)) { - data += '\n' - } - while (match = linere.exec(data)) { - const line = match[1] - lineNum++ - if (line.charAt(0) === '#') { - continue - } - if (line === '') { - this.endCurrent() - continue - } - if (ENTRY_START.test(line)) { - this.endCurrent() - const specs = this.splitQuoted(line.slice(0, -1), /, */) - this.current = new YarnLockEntry(specs) - specs.forEach(spec => this.entries.set(spec, this.current)) - continue - } - if (SUBKEY.test(line)) { - this.subkey = line.slice(2, -1) - this.current[this.subkey] = {} - continue - } - if (SUBVAL.test(line) && this.current && this.current[this.subkey]) { - const subval = this.splitQuoted(line.trimLeft(), ' ') - if (subval.length === 2) { - this.current[this.subkey][subval[0]] = subval[1] - continue - } - } - // any other metadata - if (METADATA.test(line) && this.current) { - const metadata = this.splitQuoted(line.trimLeft(), ' ') - if (metadata.length === 2) { - // strip off the legacy shasum hashes - if (metadata[0] === 'resolved') { - metadata[1] = metadata[1].replace(/#.*/, '') - } - this.current[metadata[0]] = metadata[1] - continue - } - } - - throw Object.assign(new Error('invalid or corrupted yarn.lock file'), { - position: match.index, - content: match[0], - line: lineNum, - }) - } - this.endCurrent() - return this - } - - splitQuoted (str, delim) { - // a,"b,c",d"e,f => ['a','"b','c"','d"e','f'] => ['a','b,c','d"e','f'] - const split = str.split(delim) - const out = [] - let o = 0 - for (let i = 0; i < split.length; i++) { - const chunk = split[i] - if (/^".*"$/.test(chunk)) { - out[o++] = chunk.trim().slice(1, -1) - } else if (/^"/.test(chunk)) { - let collect = chunk.trimLeft().slice(1) - while (++i < split.length) { - const n = split[i] - // something that is not a slash, followed by an even number - // of slashes then a " then end => ending on an unescaped " - if (/[^\\](\\\\)*"$/.test(n)) { - collect += n.trimRight().slice(0, -1) - break - } else { - collect += n - } - } - out[o++] = collect - } else { - out[o++] = chunk.trim() - } - } - return out - } - - toString () { - return prefix + [...new Set([...this.entries.values()])] - .map(e => e.toString()) - .sort((a, b) => localeCompare(a.replace(/"/g, ''), b.replace(/"/g, ''))).join('\n\n') + '\n' - } - - fromTree (tree) { - this.entries = new Map() - // walk the tree in a deterministic order, breadth-first, alphabetical - breadth({ - tree, - visit: node => this.addEntryFromNode(node), - getChildren: node => [...node.children.values(), ...node.fsChildren] - .sort((a, b) => a.depth - b.depth || localeCompare(a.name, b.name)), - }) - return this - } - - addEntryFromNode (node) { - const specs = [...node.edgesIn] - .map(e => `${node.name}@${e.spec}`) - .sort(localeCompare) - - // Note: - // yarn will do excessive duplication in a case like this: - // root -> (x@1.x, y@1.x, z@1.x) - // y@1.x -> (x@1.1, z@2.x) - // z@1.x -> () - // z@2.x -> (x@1.x) - // - // where x@1.2 exists, because the "x@1.x" spec will *always* resolve - // to x@1.2, which doesn't work for y's dep on x@1.1, so you'll get this: - // - // root - // +-- x@1.2.0 - // +-- y - // | +-- x@1.1.0 - // | +-- z@2 - // | +-- x@1.2.0 - // +-- z@1 - // - // instead of this more deduped tree that arborist builds by default: - // - // root - // +-- x@1.2.0 (dep is x@1.x, from root) - // +-- y - // | +-- x@1.1.0 - // | +-- z@2 (dep on x@1.x deduped to x@1.1.0 under y) - // +-- z@1 - // - // In order to not create an invalid yarn.lock file with conflicting - // entries, AND not tell yarn to create an invalid tree, we need to - // ignore the x@1.x spec coming from z, since it's already in the entries. - // - // So, if the integrity and resolved don't match a previous entry, skip it. - // We call this method on shallower nodes first, so this is fine. - const n = this.entryDataFromNode(node) - let priorEntry = null - const newSpecs = [] - for (const s of specs) { - const prev = this.entries.get(s) - // no previous entry for this spec at all, so it's new - if (!prev) { - // if we saw a match already, then assign this spec to it as well - if (priorEntry) { - priorEntry.addSpec(s) - } else { - newSpecs.push(s) - } - continue - } - - const m = match(prev, n) - // there was a prior entry, but a different thing. skip this one - if (!m) { - continue - } - - // previous matches, but first time seeing it, so already has this spec. - // go ahead and add all the previously unseen specs, though - if (!priorEntry) { - priorEntry = prev - for (const s of newSpecs) { - priorEntry.addSpec(s) - this.entries.set(s, priorEntry) - } - newSpecs.length = 0 - continue - } - - // have a prior entry matching n, and matching the prev we just saw - // add the spec to it - priorEntry.addSpec(s) - this.entries.set(s, priorEntry) - } - - // if we never found a matching prior, then this is a whole new thing - if (!priorEntry) { - const entry = Object.assign(new YarnLockEntry(newSpecs), n) - for (const s of newSpecs) { - this.entries.set(s, entry) - } - } else { - // pick up any new info that we got for this node, so that we can - // decorate with integrity/resolved/etc. - Object.assign(priorEntry, n) - } - } - - entryDataFromNode (node) { - const n = {} - if (node.package.dependencies) { - n.dependencies = node.package.dependencies - } - if (node.package.optionalDependencies) { - n.optionalDependencies = node.package.optionalDependencies - } - if (node.version) { - n.version = node.version - } - if (node.resolved) { - n.resolved = consistentResolve( - node.resolved, - node.isLink ? dirname(node.path) : node.path, - node.root.path, - true - ) - } - if (node.integrity) { - n.integrity = node.integrity - } - - return n - } - - static get Entry () { - return YarnLockEntry - } -} - -class YarnLockEntry { - #specs - constructor (specs) { - this.#specs = new Set(specs) - this.resolved = null - this.version = null - this.integrity = null - this.dependencies = null - this.optionalDependencies = null - } - - toString () { - // sort objects to the bottom, then alphabetical - return ([...this.#specs] - .sort(localeCompare) - .map(quoteIfNeeded).join(', ') + - ':\n' + - Object.getOwnPropertyNames(this) - .filter(prop => this[prop] !== null) - .sort(priorityThenLocaleCompare) - .map(prop => - typeof this[prop] !== 'object' - ? ` ${prop} ${prop === 'integrity' ? this[prop] : JSON.stringify(this[prop])}\n` - : Object.keys(this[prop]).length === 0 ? '' - : ` ${prop}:\n` + sortKV(this[prop]) + '\n') - .join('')).trim() - } - - addSpec (spec) { - this.#specs.add(spec) - } -} - -module.exports = YarnLock diff --git a/node_modules/npm/node_modules/@npmcli/arborist/package.json b/node_modules/npm/node_modules/@npmcli/arborist/package.json deleted file mode 100644 index 32e77f7..0000000 --- a/node_modules/npm/node_modules/@npmcli/arborist/package.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "name": "@npmcli/arborist", - "version": "7.2.2", - "description": "Manage node_modules trees", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/fs": "^3.1.0", - "@npmcli/installed-package-contents": "^2.0.2", - "@npmcli/map-workspaces": "^3.0.2", - "@npmcli/metavuln-calculator": "^7.0.0", - "@npmcli/name-from-folder": "^2.0.0", - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.0.0", - "@npmcli/query": "^3.0.1", - "@npmcli/run-script": "^7.0.2", - "bin-links": "^4.0.1", - "cacache": "^18.0.0", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^7.0.1", - "json-parse-even-better-errors": "^3.0.0", - "json-stringify-nice": "^1.1.4", - "minimatch": "^9.0.0", - "nopt": "^7.0.0", - "npm-install-checks": "^6.2.0", - "npm-package-arg": "^11.0.1", - "npm-pick-manifest": "^9.0.0", - "npm-registry-fetch": "^16.0.0", - "npmlog": "^7.0.1", - "pacote": "^17.0.4", - "parse-conflict-json": "^3.0.0", - "proc-log": "^3.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.2", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.7", - "ssri": "^10.0.5", - "treeverse": "^3.0.0", - "walk-up-path": "^3.0.1" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "benchmark": "^2.1.4", - "minify-registry-metadata": "^3.0.0", - "nock": "^13.3.3", - "tap": "^16.3.8", - "tar-stream": "^3.0.0", - "tcompare": "^5.0.6" - }, - "scripts": { - "test": "tap", - "posttest": "npm run lint", - "snap": "tap", - "test-proxy": "ARBORIST_TEST_PROXY=1 tap --snapshot", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "lintfix": "npm run lint -- --fix", - "benchmark": "node scripts/benchmark.js", - "benchclean": "rm -rf scripts/benchmark/*/", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/arborist" - }, - "author": "GitHub Inc.", - "license": "ISC", - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "bin": { - "arborist": "bin/index.js" - }, - "tap": { - "after": "test/fixtures/cleanup.js", - "test-env": [ - "LC_ALL=sk" - ], - "timeout": "360", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/config/LICENSE b/node_modules/npm/node_modules/@npmcli/config/LICENSE deleted file mode 100644 index 19cec97..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/config/README.md b/node_modules/npm/node_modules/@npmcli/config/README.md deleted file mode 100644 index 12a5e23..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/README.md +++ /dev/null @@ -1,257 +0,0 @@ -# `@npmcli/config` - -Configuration management for the npm cli. - -This module is the spiritual descendant of -[`npmconf`](http://npm.im/npmconf), and the code that once lived in npm's -`lib/config/` folder. - -It does the management of configuration files that npm uses, but -importantly, does _not_ define all the configuration defaults or types, as -those parts make more sense to live within the npm CLI itself. - -The only exceptions: - -- The `prefix` config value has some special semantics, setting the local - prefix if specified on the CLI options and not in global mode, or the - global prefix otherwise. -- The `project` config file is loaded based on the local prefix (which can - only be set by the CLI config options, and otherwise defaults to a walk - up the folder tree to the first parent containing a `node_modules` - folder, `package.json` file, or `package-lock.json` file.) -- The `userconfig` value, as set by the environment and CLI (defaulting to - `~/.npmrc`, is used to load user configs. -- The `globalconfig` value, as set by the environment, CLI, and - `userconfig` file (defaulting to `$PREFIX/etc/npmrc`) is used to load - global configs. -- A `builtin` config, read from a `npmrc` file in the root of the npm - project itself, overrides all defaults. - -The resulting hierarchy of configs: - -- CLI switches. eg `--some-key=some-value` on the command line. These are - parsed by [`nopt`](http://npm.im/nopt), which is not a great choice, but - it's the one that npm has used forever, and changing it will be - difficult. -- Environment variables. eg `npm_config_some_key=some_value` in the - environment. There is no way at this time to modify this prefix. -- INI-formatted project configs. eg `some-key = some-value` in the - `localPrefix` folder (ie, the `cwd`, or its nearest parent that contains - either a `node_modules` folder or `package.json` file.) -- INI-formatted userconfig file. eg `some-key = some-value` in `~/.npmrc`. - The `userconfig` config value can be overridden by the `cli`, `env`, or - `project` configs to change this value. -- INI-formatted globalconfig file. eg `some-key = some-value` in - the `globalPrefix` folder, which is inferred by looking at the location - of the node executable, or the `prefix` setting in the `cli`, `env`, - `project`, or `userconfig`. The `globalconfig` value at any of those - levels can override this. -- INI-formatted builtin config file. eg `some-key = some-value` in - `/usr/local/lib/node_modules/npm/npmrc`. This is not configurable, and - is determined by looking in the `npmPath` folder. -- Default values (passed in by npm when it loads this module). - -## USAGE - -```js -const Config = require('@npmcli/config') -const { shorthands, definitions, flatten } = require('@npmcli/config/lib/definitions') - -const conf = new Config({ - // path to the npm module being run - npmPath: resolve(__dirname, '..'), - definitions, - shorthands, - flatten, - // optional, defaults to process.argv - // argv: [] <- if you are using this package in your own cli - // and dont want to have colliding argv - argv: process.argv, - // optional, defaults to process.env - env: process.env, - // optional, defaults to process.execPath - execPath: process.execPath, - // optional, defaults to process.platform - platform: process.platform, - // optional, defaults to process.cwd() - cwd: process.cwd(), -}) - -// emits log events on the process object -// see `proc-log` for more info -process.on('log', (level, ...args) => { - console.log(level, ...args) -}) - -// returns a promise that fails if config loading fails, and -// resolves when the config object is ready for action -conf.load().then(() => { - conf.validate() - console.log('loaded ok! some-key = ' + conf.get('some-key')) -}).catch(er => { - console.error('error loading configs!', er) -}) -``` - -## API - -The `Config` class is the sole export. - -```js -const Config = require('@npmcli/config') -``` - -### static `Config.typeDefs` - -The type definitions passed to `nopt` for CLI option parsing and known -configuration validation. - -### constructor `new Config(options)` - -Options: - -- `types` Types of all known config values. Note that some are effectively - given semantic value in the config loading process itself. -- `shorthands` An object mapping a shorthand value to an array of CLI - arguments that replace it. -- `defaults` Default values for each of the known configuration keys. - These should be defined for all configs given a type, and must be valid. -- `npmPath` The path to the `npm` module, for loading the `builtin` config - file. -- `cwd` Optional, defaults to `process.cwd()`, used for inferring the - `localPrefix` and loading the `project` config. -- `platform` Optional, defaults to `process.platform`. Used when inferring - the `globalPrefix` from the `execPath`, since this is done diferently on - Windows. -- `execPath` Optional, defaults to `process.execPath`. Used to infer the - `globalPrefix`. -- `env` Optional, defaults to `process.env`. Source of the environment - variables for configuration. -- `argv` Optional, defaults to `process.argv`. Source of the CLI options - used for configuration. - -Returns a `config` object, which is not yet loaded. - -Fields: - -- `config.globalPrefix` The prefix for `global` operations. Set by the - `prefix` config value, or defaults based on the location of the - `execPath` option. -- `config.localPrefix` The prefix for `local` operations. Set by the - `prefix` config value on the CLI only, or defaults to either the `cwd` or - its nearest ancestor containing a `node_modules` folder or `package.json` - file. -- `config.sources` A read-only `Map` of the file (or a comment, if no file - found, or relevant) to the config level loaded from that source. -- `config.data` A `Map` of config level to `ConfigData` objects. These - objects should not be modified directly under any circumstances. - - `source` The source where this data was loaded from. - - `raw` The raw data used to generate this config data, as it was parsed - initially from the environment, config file, or CLI options. - - `data` The data object reflecting the inheritance of configs up to this - point in the chain. - - `loadError` Any errors encountered that prevented the loading of this - config data. -- `config.list` A list sorted in priority of all the config data objects in - the prototype chain. `config.list[0]` is the `cli` level, - `config.list[1]` is the `env` level, and so on. -- `cwd` The `cwd` param -- `env` The `env` param -- `argv` The `argv` param -- `execPath` The `execPath` param -- `platform` The `platform` param -- `defaults` The `defaults` param -- `shorthands` The `shorthands` param -- `types` The `types` param -- `npmPath` The `npmPath` param -- `globalPrefix` The effective `globalPrefix` -- `localPrefix` The effective `localPrefix` -- `prefix` If `config.get('global')` is true, then `globalPrefix`, - otherwise `localPrefix` -- `home` The user's home directory, found by looking at `env.HOME` or - calling `os.homedir()`. -- `loaded` A boolean indicating whether or not configs are loaded -- `valid` A getter that returns `true` if all the config objects are valid. - Any data objects that have been modified with `config.set(...)` will be - re-evaluated when `config.valid` is read. - -### `config.load()` - -Load configuration from the various sources of information. - -Returns a `Promise` that resolves when configuration is loaded, and fails -if a fatal error is encountered. - -### `config.find(key)` - -Find the effective place in the configuration levels a given key is set. -Returns one of: `cli`, `env`, `project`, `user`, `global`, `builtin`, or -`default`. - -Returns `null` if the key is not set. - -### `config.get(key, where = 'cli')` - -Load the given key from the config stack. - -### `config.set(key, value, where = 'cli')` - -Set the key to the specified value, at the specified level in the config -stack. - -### `config.delete(key, where = 'cli')` - -Delete the configuration key from the specified level in the config stack. - -### `config.validate(where)` - -Verify that all known configuration options are set to valid values, and -log a warning if they are invalid. - -Invalid auth options will cause this method to throw an error with a `code` -property of `ERR_INVALID_AUTH`, and a `problems` property listing the specific -concerns with the current configuration. - -If `where` is not set, then all config objects are validated. - -Returns `true` if all configs are valid. - -Note that it's usually enough (and more efficient) to just check -`config.valid`, since each data object is marked for re-evaluation on every -`config.set()` operation. - -### `config.repair(problems)` - -Accept an optional array of problems (as thrown by `config.validate()`) and -perform the necessary steps to resolve them. If no problems are provided, -this method will call `config.validate()` internally to retrieve them. - -Note that you must `await config.save('user')` in order to persist the changes. - -### `config.isDefault(key)` - -Returns `true` if the value is coming directly from the -default definitions, if the current value for the key config is -coming from any other source, returns `false`. - -This method can be used for avoiding or tweaking default values, e.g: - -> Given a global default definition of foo='foo' it's possible to read that -> value such as: -> -> ```js -> const save = config.get('foo') -> ``` -> -> Now in a different place of your app it's possible to avoid using the `foo` -> default value, by checking to see if the current config value is currently -> one that was defined by the default definitions: -> -> ```js -> const save = config.isDefault('foo') ? 'bar' : config.get('foo') -> ``` - -### `config.save(where)` - -Save the config file specified by the `where` param. Must be one of -`project`, `user`, `global`, `builtin`. diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definition.js b/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definition.js deleted file mode 100644 index 333a919..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definition.js +++ /dev/null @@ -1,253 +0,0 @@ -// class that describes a config key we know about -// this keeps us from defining a config key and not -// providing a default, description, etc. -// -// TODO: some kind of categorization system, so we can -// say "these are for registry access", "these are for -// version resolution" etc. - -const required = ['type', 'description', 'default', 'key'] - -const allowed = [ - 'default', - 'defaultDescription', - 'deprecated', - 'description', - 'exclusive', - 'flatten', - 'hint', - 'key', - 'short', - 'type', - 'typeDescription', - 'usage', - 'envExport', -] - -const { - semver: { type: semver }, - Umask: { type: Umask }, - url: { type: url }, - path: { type: path }, -} = require('../type-defs.js') - -class Definition { - constructor (key, def) { - this.key = key - // if it's set falsey, don't export it, otherwise we do by default - this.envExport = true - Object.assign(this, def) - this.validate() - if (!this.defaultDescription) { - this.defaultDescription = describeValue(this.default) - } - if (!this.typeDescription) { - this.typeDescription = describeType(this.type) - } - // hint is only used for non-boolean values - if (!this.hint) { - if (this.type === Number) { - this.hint = '' - } else { - this.hint = `<${this.key}>` - } - } - if (!this.usage) { - this.usage = describeUsage(this) - } - } - - validate () { - for (const req of required) { - if (!Object.prototype.hasOwnProperty.call(this, req)) { - throw new Error(`config lacks ${req}: ${this.key}`) - } - } - if (!this.key) { - throw new Error(`config lacks key: ${this.key}`) - } - for (const field of Object.keys(this)) { - if (!allowed.includes(field)) { - throw new Error(`config defines unknown field ${field}: ${this.key}`) - } - } - } - - // a textual description of this config, suitable for help output - describe () { - const description = unindent(this.description) - const noEnvExport = this.envExport - ? '' - : ` -This value is not exported to the environment for child processes. -` - const deprecated = !this.deprecated ? '' : `* DEPRECATED: ${unindent(this.deprecated)}\n` - /* eslint-disable-next-line max-len */ - const exclusive = !this.exclusive ? '' : `\nThis config can not be used with: \`${this.exclusive.join('`, `')}\`` - return wrapAll(`#### \`${this.key}\` - -* Default: ${unindent(this.defaultDescription)} -* Type: ${unindent(this.typeDescription)} -${deprecated} -${description} -${exclusive} -${noEnvExport}`) - } -} - -const describeUsage = def => { - let key = '' - - // Single type - if (!Array.isArray(def.type)) { - if (def.short) { - key = `-${def.short}|` - } - - if (def.type === Boolean && def.default !== false) { - key = `${key}--no-${def.key}` - } else { - key = `${key}--${def.key}` - } - - if (def.type !== Boolean) { - key = `${key} ${def.hint}` - } - - return key - } - - key = `--${def.key}` - if (def.short) { - key = `-${def.short}|--${def.key}` - } - - // Multiple types - let types = def.type - const multiple = types.includes(Array) - const bool = types.includes(Boolean) - - // null type means optional and doesn't currently affect usage output since - // all non-optional params have defaults so we render everything as optional - types = types.filter(t => t !== null && t !== Array && t !== Boolean) - - if (!types.length) { - return key - } - - let description - if (!types.some(t => typeof t !== 'string')) { - // Specific values, use specifics given - description = `<${types.filter(d => d).join('|')}>` - } else { - // Generic values, use hint - description = def.hint - } - - if (bool) { - // Currently none of our multi-type configs with boolean values default to - // false so all their hints should show `--no-`, if we ever add ones that - // default to false we can branch the logic here - key = `--no-${def.key}|${key}` - } - - const usage = `${key} ${description}` - if (multiple) { - return `${usage} [${usage} ...]` - } else { - return usage - } -} - -const describeType = type => { - if (Array.isArray(type)) { - const descriptions = type.filter(t => t !== Array).map(t => describeType(t)) - - // [a] => "a" - // [a, b] => "a or b" - // [a, b, c] => "a, b, or c" - // [a, Array] => "a (can be set multiple times)" - // [a, Array, b] => "a or b (can be set multiple times)" - const last = descriptions.length > 1 ? [descriptions.pop()] : [] - const oxford = descriptions.length > 1 ? ', or ' : ' or ' - const words = [descriptions.join(', ')].concat(last).join(oxford) - const multiple = type.includes(Array) ? ' (can be set multiple times)' : '' - return `${words}${multiple}` - } - - // Note: these are not quite the same as the description printed - // when validation fails. In that case, we want to give the user - // a bit more information to help them figure out what's wrong. - switch (type) { - case String: - return 'String' - case Number: - return 'Number' - case Umask: - return 'Octal numeric string in range 0000..0777 (0..511)' - case Boolean: - return 'Boolean' - case Date: - return 'Date' - case path: - return 'Path' - case semver: - return 'SemVer string' - case url: - return 'URL' - default: - return describeValue(type) - } -} - -// if it's a string, quote it. otherwise, just cast to string. -const describeValue = val => (typeof val === 'string' ? JSON.stringify(val) : String(val)) - -const unindent = s => { - // get the first \n followed by a bunch of spaces, and pluck off - // that many spaces from the start of every line. - const match = s.match(/\n +/) - return !match ? s.trim() : s.split(match[0]).join('\n').trim() -} - -const wrap = s => { - const cols = Math.min(Math.max(20, process.stdout.columns) || 80, 80) - 5 - return unindent(s) - .split(/[ \n]+/) - .reduce((left, right) => { - const last = left.split('\n').pop() - const join = last.length && last.length + right.length > cols ? '\n' : ' ' - return left + join + right - }) -} - -const wrapAll = s => { - let inCodeBlock = false - return s - .split('\n\n') - .map(block => { - if (inCodeBlock || block.startsWith('```')) { - inCodeBlock = !block.endsWith('```') - return block - } - - if (block.charAt(0) === '*') { - return ( - '* ' + - block - .slice(1) - .trim() - .split('\n* ') - .map(li => { - return wrap(li).replace(/\n/g, '\n ') - }) - .join('\n* ') - ) - } else { - return wrap(block) - } - }) - .join('\n\n') -} - -module.exports = Definition diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definitions.js b/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definitions.js deleted file mode 100644 index 9146505..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/definitions.js +++ /dev/null @@ -1,2403 +0,0 @@ -const definitions = {} -module.exports = definitions - -const Definition = require('./definition.js') - -const ciInfo = require('ci-info') -const querystring = require('querystring') -const { join } = require('path') - -const isWindows = process.platform === 'win32' - -// used by cafile flattening to flatOptions.ca -const fs = require('fs') -const maybeReadFile = file => { - try { - return fs.readFileSync(file, 'utf8') - } catch (er) { - if (er.code !== 'ENOENT') { - throw er - } - return null - } -} - -const buildOmitList = obj => { - const include = obj.include || [] - const omit = obj.omit || [] - - const only = obj.only - if (/^prod(uction)?$/.test(only) || obj.production) { - omit.push('dev') - } else if (obj.production === false) { - include.push('dev') - } - - if (/^dev/.test(obj.also)) { - include.push('dev') - } - - if (obj.dev) { - include.push('dev') - } - - if (obj.optional === false) { - omit.push('optional') - } else if (obj.optional === true) { - include.push('optional') - } - - obj.omit = [...new Set(omit)].filter(type => !include.includes(type)) - obj.include = [...new Set(include)] - - if (obj.omit.includes('dev')) { - process.env.NODE_ENV = 'production' - } - - return obj.omit -} - -const editor = process.env.EDITOR || - process.env.VISUAL || - (isWindows ? `${process.env.SYSTEMROOT}\\notepad.exe` : 'vi') - -const shell = isWindows ? process.env.ComSpec || 'cmd' - : process.env.SHELL || 'sh' - -const { networkInterfaces } = require('os') -const getLocalAddresses = () => { - try { - return Object.values(networkInterfaces()).map( - int => int.map(({ address }) => address) - ).reduce((set, addrs) => set.concat(addrs), [null]) - } catch (e) { - return [null] - } -} - -const unicode = /UTF-?8$/i.test( - process.env.LC_ALL || - process.env.LC_CTYPE || - process.env.LANG -) - -// use LOCALAPPDATA on Windows, if set -// https://github.com/npm/cli/pull/899 -const cacheRoot = (isWindows && process.env.LOCALAPPDATA) || '~' -const cacheExtra = isWindows ? 'npm-cache' : '.npm' -const cache = `${cacheRoot}/${cacheExtra}` - -// TODO: refactor these type definitions so that they are less -// weird to pull out of the config module. -// TODO: use better type definition/validation API, nopt's is so weird. -const { - semver: { type: semver }, - Umask: { type: Umask }, - url: { type: url }, - path: { type: path }, -} = require('../type-defs.js') - -const define = (key, def) => { - /* istanbul ignore if - this should never happen, prevents mistakes below */ - if (definitions[key]) { - throw new Error(`defining key more than once: ${key}`) - } - definitions[key] = new Definition(key, def) -} - -// basic flattening function, just copy it over camelCase -const flatten = (key, obj, flatOptions) => { - const camel = key.replace(/-([a-z])/g, (_0, _1) => _1.toUpperCase()) - flatOptions[camel] = obj[key] -} - -// TODO: -// Instead of having each definition provide a flatten method, -// provide the (?list of?) flat option field(s?) that it impacts. -// When that config is set, we mark the relevant flatOption fields -// dirty. Then, a getter for that field defines how we actually -// set it. -// -// So, `save-dev`, `save-optional`, `save-prod`, et al would indicate -// that they affect the `saveType` flat option. Then the config.flat -// object has a `get saveType () { ... }` that looks at the "real" -// config settings from files etc and returns the appropriate value. -// -// Getters will also (maybe?) give us a hook to audit flat option -// usage, so we can document and group these more appropriately. -// -// This will be a problem with cases where we currently do: -// const opts = { ...npm.flatOptions, foo: 'bar' }, but we can maybe -// instead do `npm.config.set('foo', 'bar')` prior to passing the -// config object down where it needs to go. -// -// This way, when we go hunting for "where does saveType come from anyway!?" -// while fixing some Arborist bug, we won't have to hunt through too -// many places. - -// Define all config keys we know about - -define('_auth', { - default: null, - type: [null, String], - description: ` - A basic-auth string to use when authenticating against the npm registry. - This will ONLY be used to authenticate against the npm registry. For other - registries you will need to scope it like "//other-registry.tld/:_auth" - - Warning: This should generally not be set via a command-line option. It - is safer to use a registry-provided authentication bearer token stored in - the ~/.npmrc file by running \`npm login\`. - `, - flatten, -}) - -define('access', { - default: null, - defaultDescription: ` - 'public' for new packages, existing packages it will not change the current level - `, - type: [null, 'restricted', 'public'], - description: ` - If you do not want your scoped package to be publicly viewable (and - installable) set \`--access=restricted\`. - - Unscoped packages can not be set to \`restricted\`. - - Note: This defaults to not changing the current access level for existing - packages. Specifying a value of \`restricted\` or \`public\` during - publish will change the access for an existing package the same way that - \`npm access set status\` would. - `, - flatten, -}) - -define('all', { - default: false, - type: Boolean, - short: 'a', - description: ` - When running \`npm outdated\` and \`npm ls\`, setting \`--all\` will show - all outdated or installed packages, rather than only those directly - depended upon by the current project. - `, - flatten, -}) - -define('allow-same-version', { - default: false, - type: Boolean, - description: ` - Prevents throwing an error when \`npm version\` is used to set the new - version to the same value as the current version. - `, - flatten, -}) - -define('also', { - default: null, - type: [null, 'dev', 'development'], - description: ` - When set to \`dev\` or \`development\`, this is an alias for - \`--include=dev\`. - `, - deprecated: 'Please use --include=dev instead.', - flatten (key, obj, flatOptions) { - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('audit', { - default: true, - type: Boolean, - description: ` - When "true" submit audit reports alongside the current npm command to the - default registry and all registries configured for scopes. See the - documentation for [\`npm audit\`](/commands/npm-audit) for details on what - is submitted. - `, - flatten, -}) - -define('audit-level', { - default: null, - type: [null, 'info', 'low', 'moderate', 'high', 'critical', 'none'], - description: ` - The minimum level of vulnerability for \`npm audit\` to exit with - a non-zero exit code. - `, - flatten, -}) - -define('auth-type', { - default: 'web', - type: ['legacy', 'web'], - description: ` - What authentication strategy to use with \`login\`. - Note that if an \`otp\` config is given, this value will always be set to \`legacy\`. - `, - flatten, -}) - -define('before', { - default: null, - type: [null, Date], - description: ` - If passed to \`npm install\`, will rebuild the npm tree such that only - versions that were available **on or before** the \`--before\` time get - installed. If there's no versions available for the current set of - direct dependencies, the command will error. - - If the requested version is a \`dist-tag\` and the given tag does not - pass the \`--before\` filter, the most recent version less than or equal - to that tag will be used. For example, \`foo@latest\` might install - \`foo@1.2\` even though \`latest\` is \`2.0\`. - `, - flatten, -}) - -define('bin-links', { - default: true, - type: Boolean, - description: ` - Tells npm to create symlinks (or \`.cmd\` shims on Windows) for package - executables. - - Set to false to have it not do this. This can be used to work around the - fact that some file systems don't support symlinks, even on ostensibly - Unix systems. - `, - flatten, -}) - -define('browser', { - default: null, - defaultDescription: ` - OS X: \`"open"\`, Windows: \`"start"\`, Others: \`"xdg-open"\` - `, - type: [null, Boolean, String], - description: ` - The browser that is called by npm commands to open websites. - - Set to \`false\` to suppress browser behavior and instead print urls to - terminal. - - Set to \`true\` to use default system URL opener. - `, - flatten, -}) - -define('ca', { - default: null, - type: [null, String, Array], - description: ` - The Certificate Authority signing certificate that is trusted for SSL - connections to the registry. Values should be in PEM format (Windows - calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the - string "\\n". For example: - - \`\`\`ini - ca="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" - \`\`\` - - Set to \`null\` to only allow "known" registrars, or to a specific CA - cert to trust only that specific signing authority. - - Multiple CAs can be trusted by specifying an array of certificates: - - \`\`\`ini - ca[]="..." - ca[]="..." - \`\`\` - - See also the \`strict-ssl\` config. - `, - flatten, -}) - -define('cache', { - default: cache, - defaultDescription: ` - Windows: \`%LocalAppData%\\npm-cache\`, Posix: \`~/.npm\` - `, - type: path, - description: ` - The location of npm's cache directory. - `, - flatten (key, obj, flatOptions) { - flatOptions.cache = join(obj.cache, '_cacache') - flatOptions.npxCache = join(obj.cache, '_npx') - flatOptions.tufCache = join(obj.cache, '_tuf') - }, -}) - -define('cache-max', { - default: Infinity, - type: Number, - description: ` - \`--cache-max=0\` is an alias for \`--prefer-online\` - `, - deprecated: ` - This option has been deprecated in favor of \`--prefer-online\` - `, - flatten (key, obj, flatOptions) { - if (obj[key] <= 0) { - flatOptions.preferOnline = true - } - }, -}) - -define('cache-min', { - default: 0, - type: Number, - description: ` - \`--cache-min=9999 (or bigger)\` is an alias for \`--prefer-offline\`. - `, - deprecated: ` - This option has been deprecated in favor of \`--prefer-offline\`. - `, - flatten (key, obj, flatOptions) { - if (obj[key] >= 9999) { - flatOptions.preferOffline = true - } - }, -}) - -define('cafile', { - default: null, - type: path, - description: ` - A path to a file containing one or multiple Certificate Authority signing - certificates. Similar to the \`ca\` setting, but allows for multiple - CA's, as well as for the CA information to be stored in a file on disk. - `, - flatten (key, obj, flatOptions) { - // always set to null in defaults - if (!obj.cafile) { - return - } - - const raw = maybeReadFile(obj.cafile) - if (!raw) { - return - } - - const delim = '-----END CERTIFICATE-----' - flatOptions.ca = raw.replace(/\r\n/g, '\n').split(delim) - .filter(section => section.trim()) - .map(section => section.trimLeft() + delim) - }, -}) - -define('call', { - default: '', - type: String, - short: 'c', - description: ` - Optional companion option for \`npm exec\`, \`npx\` that allows for - specifying a custom command to be run along with the installed packages. - - \`\`\`bash - npm exec --package yo --package generator-node --call "yo node" - \`\`\` - `, - flatten, -}) - -define('cert', { - default: null, - type: [null, String], - description: ` - A client certificate to pass when accessing the registry. Values should - be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with - newlines replaced by the string "\\n". For example: - - \`\`\`ini - cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----" - \`\`\` - - It is _not_ the path to a certificate file, though you can set a registry-scoped - "certfile" path like "//other-registry.tld/:certfile=/path/to/cert.pem". - `, - deprecated: ` - \`key\` and \`cert\` are no longer used for most registry operations. - Use registry scoped \`keyfile\` and \`certfile\` instead. - Example: - //other-registry.tld/:keyfile=/path/to/key.pem - //other-registry.tld/:certfile=/path/to/cert.crt - `, - flatten, -}) - -define('cidr', { - default: null, - type: [null, String, Array], - description: ` - This is a list of CIDR address to be used when configuring limited access - tokens with the \`npm token create\` command. - `, - flatten, -}) - -// This should never be directly used, the flattened value is the derived value -// and is sent to other modules, and is also exposed as `npm.color` for use -// inside npm itself. -define('color', { - default: !process.env.NO_COLOR || process.env.NO_COLOR === '0', - usage: '--color|--no-color|--color always', - defaultDescription: ` - true unless the NO_COLOR environ is set to something other than '0' - `, - type: ['always', Boolean], - description: ` - If false, never shows colors. If \`"always"\` then always shows colors. - If true, then only prints color codes for tty file descriptors. - `, - flatten (key, obj, flatOptions) { - flatOptions.color = !obj.color ? false - : obj.color === 'always' ? true - : !!process.stdout.isTTY - flatOptions.logColor = !obj.color ? false - : obj.color === 'always' ? true - : !!process.stderr.isTTY - }, -}) - -define('commit-hooks', { - default: true, - type: Boolean, - description: ` - Run git commit hooks when using the \`npm version\` command. - `, - flatten, -}) - -define('cpu', { - default: null, - type: [null, String], - description: ` - Override CPU architecture of native modules to install. - Acceptable values are same as \`cpu\` field of package.json, - which comes from \`process.arch\`. - `, - flatten, -}) - -define('os', { - default: null, - type: [null, String], - description: ` - Override OS of native modules to install. - Acceptable values are same as \`os\` field of package.json, - which comes from \`process.platform\`. - `, - flatten, -}) - -define('depth', { - default: null, - defaultDescription: ` - \`Infinity\` if \`--all\` is set, otherwise \`1\` - `, - type: [null, Number], - description: ` - The depth to go when recursing packages for \`npm ls\`. - - If not set, \`npm ls\` will show only the immediate dependencies of the - root project. If \`--all\` is set, then npm will show all dependencies - by default. - `, - flatten, -}) - -define('description', { - default: true, - type: Boolean, - usage: '--no-description', - description: ` - Show the description in \`npm search\` - `, - flatten (key, obj, flatOptions) { - flatOptions.search = flatOptions.search || { limit: 20 } - flatOptions.search[key] = obj[key] - }, -}) - -define('dev', { - default: false, - type: Boolean, - description: ` - Alias for \`--include=dev\`. - `, - deprecated: 'Please use --include=dev instead.', - flatten (key, obj, flatOptions) { - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('diff', { - default: [], - hint: '', - type: [String, Array], - description: ` - Define arguments to compare in \`npm diff\`. - `, - flatten, -}) - -define('diff-ignore-all-space', { - default: false, - type: Boolean, - description: ` - Ignore whitespace when comparing lines in \`npm diff\`. - `, - flatten, -}) - -define('diff-name-only', { - default: false, - type: Boolean, - description: ` - Prints only filenames when using \`npm diff\`. - `, - flatten, -}) - -define('diff-no-prefix', { - default: false, - type: Boolean, - description: ` - Do not show any source or destination prefix in \`npm diff\` output. - - Note: this causes \`npm diff\` to ignore the \`--diff-src-prefix\` and - \`--diff-dst-prefix\` configs. - `, - flatten, -}) - -define('diff-dst-prefix', { - default: 'b/', - hint: '', - type: String, - description: ` - Destination prefix to be used in \`npm diff\` output. - `, - flatten, -}) - -define('diff-src-prefix', { - default: 'a/', - hint: '', - type: String, - description: ` - Source prefix to be used in \`npm diff\` output. - `, - flatten, -}) - -define('diff-text', { - default: false, - type: Boolean, - description: ` - Treat all files as text in \`npm diff\`. - `, - flatten, -}) - -define('diff-unified', { - default: 3, - type: Number, - description: ` - The number of lines of context to print in \`npm diff\`. - `, - flatten, -}) - -define('dry-run', { - default: false, - type: Boolean, - description: ` - Indicates that you don't want npm to make any changes and that it should - only report what it would have done. This can be passed into any of the - commands that modify your local installation, eg, \`install\`, - \`update\`, \`dedupe\`, \`uninstall\`, as well as \`pack\` and - \`publish\`. - - Note: This is NOT honored by other network related commands, eg - \`dist-tags\`, \`owner\`, etc. - `, - flatten, -}) - -define('editor', { - default: editor, - defaultDescription: ` - The EDITOR or VISUAL environment variables, or '%SYSTEMROOT%\\notepad.exe' on Windows, - or 'vi' on Unix systems - `, - type: String, - description: ` - The command to run for \`npm edit\` and \`npm config edit\`. - `, - flatten, -}) - -define('engine-strict', { - default: false, - type: Boolean, - description: ` - If set to true, then npm will stubbornly refuse to install (or even - consider installing) any package that claims to not be compatible with - the current Node.js version. - - This can be overridden by setting the \`--force\` flag. - `, - flatten, -}) - -define('fetch-retries', { - default: 2, - type: Number, - description: ` - The "retries" config for the \`retry\` module to use when fetching - packages from the registry. - - npm will retry idempotent read requests to the registry in the case - of network failures or 5xx HTTP errors. - `, - flatten (key, obj, flatOptions) { - flatOptions.retry = flatOptions.retry || {} - flatOptions.retry.retries = obj[key] - }, -}) - -define('fetch-retry-factor', { - default: 10, - type: Number, - description: ` - The "factor" config for the \`retry\` module to use when fetching - packages. - `, - flatten (key, obj, flatOptions) { - flatOptions.retry = flatOptions.retry || {} - flatOptions.retry.factor = obj[key] - }, -}) - -define('fetch-retry-maxtimeout', { - default: 60000, - defaultDescription: '60000 (1 minute)', - type: Number, - description: ` - The "maxTimeout" config for the \`retry\` module to use when fetching - packages. - `, - flatten (key, obj, flatOptions) { - flatOptions.retry = flatOptions.retry || {} - flatOptions.retry.maxTimeout = obj[key] - }, -}) - -define('fetch-retry-mintimeout', { - default: 10000, - defaultDescription: '10000 (10 seconds)', - type: Number, - description: ` - The "minTimeout" config for the \`retry\` module to use when fetching - packages. - `, - flatten (key, obj, flatOptions) { - flatOptions.retry = flatOptions.retry || {} - flatOptions.retry.minTimeout = obj[key] - }, -}) - -define('fetch-timeout', { - default: 5 * 60 * 1000, - defaultDescription: `${5 * 60 * 1000} (5 minutes)`, - type: Number, - description: ` - The maximum amount of time to wait for HTTP requests to complete. - `, - flatten (key, obj, flatOptions) { - flatOptions.timeout = obj[key] - }, -}) - -define('force', { - default: false, - type: Boolean, - short: 'f', - description: ` - Removes various protections against unfortunate side effects, common - mistakes, unnecessary performance degradation, and malicious input. - - * Allow clobbering non-npm files in global installs. - * Allow the \`npm version\` command to work on an unclean git repository. - * Allow deleting the cache folder with \`npm cache clean\`. - * Allow installing packages that have an \`engines\` declaration - requiring a different version of npm. - * Allow installing packages that have an \`engines\` declaration - requiring a different version of \`node\`, even if \`--engine-strict\` - is enabled. - * Allow \`npm audit fix\` to install modules outside your stated - dependency range (including SemVer-major changes). - * Allow unpublishing all versions of a published package. - * Allow conflicting peerDependencies to be installed in the root project. - * Implicitly set \`--yes\` during \`npm init\`. - * Allow clobbering existing values in \`npm pkg\` - * Allow unpublishing of entire packages (not just a single version). - - If you don't have a clear idea of what you want to do, it is strongly - recommended that you do not use this option! - `, - flatten, -}) - -define('foreground-scripts', { - default: false, - type: Boolean, - description: ` - Run all build scripts (ie, \`preinstall\`, \`install\`, and - \`postinstall\`) scripts for installed packages in the foreground - process, sharing standard input, output, and error with the main npm - process. - - Note that this will generally make installs run slower, and be much - noisier, but can be useful for debugging. - `, - flatten, -}) - -define('format-package-lock', { - default: true, - type: Boolean, - description: ` - Format \`package-lock.json\` or \`npm-shrinkwrap.json\` as a human - readable file. - `, - flatten, -}) - -define('fund', { - default: true, - type: Boolean, - description: ` - When "true" displays the message at the end of each \`npm install\` - acknowledging the number of dependencies looking for funding. - See [\`npm fund\`](/commands/npm-fund) for details. - `, - flatten, -}) - -define('git', { - default: 'git', - type: String, - description: ` - The command to use for git commands. If git is installed on the - computer, but is not in the \`PATH\`, then set this to the full path to - the git binary. - `, - flatten, -}) - -define('git-tag-version', { - default: true, - type: Boolean, - description: ` - Tag the commit when using the \`npm version\` command. Setting this to - false results in no commit being made at all. - `, - flatten, -}) - -define('global', { - default: false, - type: Boolean, - short: 'g', - description: ` - Operates in "global" mode, so that packages are installed into the - \`prefix\` folder instead of the current working directory. See - [folders](/configuring-npm/folders) for more on the differences in - behavior. - - * packages are installed into the \`{prefix}/lib/node_modules\` folder, - instead of the current working directory. - * bin files are linked to \`{prefix}/bin\` - * man pages are linked to \`{prefix}/share/man\` - `, - flatten: (key, obj, flatOptions) => { - flatten(key, obj, flatOptions) - if (flatOptions.global) { - flatOptions.location = 'global' - } - }, -}) - -// the globalconfig has its default defined outside of this module -define('globalconfig', { - type: path, - default: '', - defaultDescription: ` - The global --prefix setting plus 'etc/npmrc'. For example, - '/usr/local/etc/npmrc' - `, - description: ` - The config file to read for global config options. - `, - flatten, -}) - -define('global-style', { - default: false, - type: Boolean, - description: ` - Only install direct dependencies in the top level \`node_modules\`, - but hoist on deeper dependencies. - Sets \`--install-strategy=shallow\`. - `, - deprecated: ` - This option has been deprecated in favor of \`--install-strategy=shallow\` - `, - flatten (key, obj, flatOptions) { - if (obj[key]) { - obj['install-strategy'] = 'shallow' - flatOptions.installStrategy = 'shallow' - } - }, -}) - -define('heading', { - default: 'npm', - type: String, - description: ` - The string that starts all the debugging log output. - `, - flatten, -}) - -define('https-proxy', { - default: null, - type: [null, url], - description: ` - A proxy to use for outgoing https requests. If the \`HTTPS_PROXY\` or - \`https_proxy\` or \`HTTP_PROXY\` or \`http_proxy\` environment variables - are set, proxy settings will be honored by the underlying - \`make-fetch-happen\` library. - `, - flatten, -}) - -define('if-present', { - default: false, - type: Boolean, - envExport: false, - description: ` - If true, npm will not exit with an error code when \`run-script\` is - invoked for a script that isn't defined in the \`scripts\` section of - \`package.json\`. This option can be used when it's desirable to - optionally run a script when it's present and fail if the script fails. - This is useful, for example, when running scripts that may only apply for - some builds in an otherwise generic CI setup. - `, - flatten, -}) - -define('ignore-scripts', { - default: false, - type: Boolean, - description: ` - If true, npm does not run scripts specified in package.json files. - - Note that commands explicitly intended to run a particular script, such - as \`npm start\`, \`npm stop\`, \`npm restart\`, \`npm test\`, and \`npm - run-script\` will still run their intended script if \`ignore-scripts\` is - set, but they will *not* run any pre- or post-scripts. - `, - flatten, -}) - -define('include', { - default: [], - type: [Array, 'prod', 'dev', 'optional', 'peer'], - description: ` - Option that allows for defining which types of dependencies to install. - - This is the inverse of \`--omit=\`. - - Dependency types specified in \`--include\` will not be omitted, - regardless of the order in which omit/include are specified on the - command-line. - `, - flatten (key, obj, flatOptions) { - // just call the omit flattener, it reads from obj.include - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('include-staged', { - default: false, - type: Boolean, - description: ` - Allow installing "staged" published packages, as defined by [npm RFC PR - #92](https://github.com/npm/rfcs/pull/92). - - This is experimental, and not implemented by the npm public registry. - `, - flatten, -}) - -define('include-workspace-root', { - default: false, - type: Boolean, - envExport: false, - description: ` - Include the workspace root when workspaces are enabled for a command. - - When false, specifying individual workspaces via the \`workspace\` config, - or all workspaces via the \`workspaces\` flag, will cause npm to operate only - on the specified workspaces, and not on the root project. - `, - flatten, -}) - -define('init-author-email', { - default: '', - hint: '', - type: String, - description: ` - The value \`npm init\` should use by default for the package author's - email. - `, -}) - -define('init-author-name', { - default: '', - hint: '', - type: String, - description: ` - The value \`npm init\` should use by default for the package author's name. - `, -}) - -define('init-author-url', { - default: '', - type: ['', url], - hint: '', - description: ` - The value \`npm init\` should use by default for the package author's homepage. - `, -}) - -define('init-license', { - default: 'ISC', - hint: '', - type: String, - description: ` - The value \`npm init\` should use by default for the package license. - `, -}) - -define('init-module', { - default: '~/.npm-init.js', - type: path, - hint: '', - description: ` - A module that will be loaded by the \`npm init\` command. See the - documentation for the - [init-package-json](https://github.com/npm/init-package-json) module for - more information, or [npm init](/commands/npm-init). - `, -}) - -define('init-version', { - default: '1.0.0', - type: semver, - hint: '', - description: ` - The value that \`npm init\` should use by default for the package - version number, if not already set in package.json. - `, -}) - -// these "aliases" are historically supported in .npmrc files, unfortunately -// They should be removed in a future npm version. -define('init.author.email', { - default: '', - type: String, - deprecated: ` - Use \`--init-author-email\` instead.`, - description: ` - Alias for \`--init-author-email\` - `, -}) - -define('init.author.name', { - default: '', - type: String, - deprecated: ` - Use \`--init-author-name\` instead. - `, - description: ` - Alias for \`--init-author-name\` - `, -}) - -define('init.author.url', { - default: '', - type: ['', url], - deprecated: ` - Use \`--init-author-url\` instead. - `, - description: ` - Alias for \`--init-author-url\` - `, -}) - -define('init.license', { - default: 'ISC', - type: String, - deprecated: ` - Use \`--init-license\` instead. - `, - description: ` - Alias for \`--init-license\` - `, -}) - -define('init.module', { - default: '~/.npm-init.js', - type: path, - deprecated: ` - Use \`--init-module\` instead. - `, - description: ` - Alias for \`--init-module\` - `, -}) - -define('init.version', { - default: '1.0.0', - type: semver, - deprecated: ` - Use \`--init-version\` instead. - `, - description: ` - Alias for \`--init-version\` - `, -}) - -define('install-links', { - default: false, - type: Boolean, - description: ` - When set file: protocol dependencies will be packed and installed as - regular dependencies instead of creating a symlink. This option has - no effect on workspaces. - `, - flatten, -}) - -define('install-strategy', { - default: 'hoisted', - type: ['hoisted', 'nested', 'shallow', 'linked'], - description: ` - Sets the strategy for installing packages in node_modules. - hoisted (default): Install non-duplicated in top-level, and duplicated as - necessary within directory structure. - nested: (formerly --legacy-bundling) install in place, no hoisting. - shallow (formerly --global-style) only install direct deps at top-level. - linked: (experimental) install in node_modules/.store, link in place, - unhoisted. - `, - flatten, -}) - -define('json', { - default: false, - type: Boolean, - description: ` - Whether or not to output JSON data, rather than the normal output. - - * In \`npm pkg set\` it enables parsing set values with JSON.parse() - before saving them to your \`package.json\`. - - Not supported by all npm commands. - `, - flatten, -}) - -define('key', { - default: null, - type: [null, String], - description: ` - A client key to pass when accessing the registry. Values should be in - PEM format with newlines replaced by the string "\\n". For example: - - \`\`\`ini - key="-----BEGIN PRIVATE KEY-----\\nXXXX\\nXXXX\\n-----END PRIVATE KEY-----" - \`\`\` - - It is _not_ the path to a key file, though you can set a registry-scoped - "keyfile" path like "//other-registry.tld/:keyfile=/path/to/key.pem". - `, - deprecated: ` - \`key\` and \`cert\` are no longer used for most registry operations. - Use registry scoped \`keyfile\` and \`certfile\` instead. - Example: - //other-registry.tld/:keyfile=/path/to/key.pem - //other-registry.tld/:certfile=/path/to/cert.crt - `, - flatten, -}) - -define('legacy-bundling', { - default: false, - type: Boolean, - description: ` - Instead of hoisting package installs in \`node_modules\`, install packages - in the same manner that they are depended on. This may cause very deep - directory structures and duplicate package installs as there is no - de-duplicating. - Sets \`--install-strategy=nested\`. - `, - deprecated: ` - This option has been deprecated in favor of \`--install-strategy=nested\` - `, - flatten (key, obj, flatOptions) { - if (obj[key]) { - obj['install-strategy'] = 'nested' - flatOptions.installStrategy = 'nested' - } - }, -}) - -define('legacy-peer-deps', { - default: false, - type: Boolean, - description: ` - Causes npm to completely ignore \`peerDependencies\` when building a - package tree, as in npm versions 3 through 6. - - If a package cannot be installed because of overly strict - \`peerDependencies\` that collide, it provides a way to move forward - resolving the situation. - - This differs from \`--omit=peer\`, in that \`--omit=peer\` will avoid - unpacking \`peerDependencies\` on disk, but will still design a tree such - that \`peerDependencies\` _could_ be unpacked in a correct place. - - Use of \`legacy-peer-deps\` is not recommended, as it will not enforce - the \`peerDependencies\` contract that meta-dependencies may rely on. - `, - flatten, -}) - -define('link', { - default: false, - type: Boolean, - description: ` - Used with \`npm ls\`, limiting output to only those packages that are - linked. - `, -}) - -define('local-address', { - default: null, - type: getLocalAddresses(), - typeDescription: 'IP Address', - description: ` - The IP address of the local interface to use when making connections to - the npm registry. Must be IPv4 in versions of Node prior to 0.12. - `, - flatten, -}) - -define('sbom-format', { - default: null, - type: [ - 'cyclonedx', - 'spdx', - ], - description: ` - SBOM format to use when generating SBOMs. - `, - flatten, -}) - -define('sbom-type', { - default: 'library', - type: [ - 'library', - 'application', - 'framework', - ], - description: ` - The type of package described by the generated SBOM. For SPDX, this is the - value for the \`primaryPackagePurpose\` field. For CycloneDX, this is the - value for the \`type\` field. - `, - flatten, -}) - -define('location', { - default: 'user', - short: 'L', - type: [ - 'global', - 'user', - 'project', - ], - defaultDescription: ` - "user" unless \`--global\` is passed, which will also set this value to "global" - `, - description: ` - When passed to \`npm config\` this refers to which config file to use. - - When set to "global" mode, packages are installed into the \`prefix\` folder - instead of the current working directory. See - [folders](/configuring-npm/folders) for more on the differences in behavior. - - * packages are installed into the \`{prefix}/lib/node_modules\` folder, - instead of the current working directory. - * bin files are linked to \`{prefix}/bin\` - * man pages are linked to \`{prefix}/share/man\` - `, - flatten: (key, obj, flatOptions) => { - flatten(key, obj, flatOptions) - if (flatOptions.global) { - flatOptions.location = 'global' - } - if (obj.location === 'global') { - flatOptions.global = true - } - }, -}) - -define('lockfile-version', { - default: null, - type: [null, 1, 2, 3, '1', '2', '3'], - defaultDescription: ` - Version 3 if no lockfile, auto-converting v1 lockfiles to v3, otherwise - maintain current lockfile version.`, - description: ` - Set the lockfile format version to be used in package-lock.json and - npm-shrinkwrap-json files. Possible options are: - - 1: The lockfile version used by npm versions 5 and 6. Lacks some data that - is used during the install, resulting in slower and possibly less - deterministic installs. Prevents lockfile churn when interoperating with - older npm versions. - - 2: The default lockfile version used by npm version 7 and 8. Includes both - the version 1 lockfile data and version 3 lockfile data, for maximum - determinism and interoperability, at the expense of more bytes on disk. - - 3: Only the new lockfile information introduced in npm version 7. Smaller - on disk than lockfile version 2, but not interoperable with older npm - versions. Ideal if all users are on npm version 7 and higher. - `, - flatten: (key, obj, flatOptions) => { - flatOptions.lockfileVersion = obj[key] && parseInt(obj[key], 10) - }, -}) - -define('loglevel', { - default: 'notice', - type: [ - 'silent', - 'error', - 'warn', - 'notice', - 'http', - 'info', - 'verbose', - 'silly', - ], - description: ` - What level of logs to report. All logs are written to a debug log, - with the path to that file printed if the execution of a command fails. - - Any logs of a higher level than the setting are shown. The default is - "notice". - - See also the \`foreground-scripts\` config. - `, - flatten (key, obj, flatOptions) { - flatOptions.silent = obj[key] === 'silent' - }, -}) - -define('logs-dir', { - default: null, - type: [null, path], - defaultDescription: ` - A directory named \`_logs\` inside the cache -`, - description: ` - The location of npm's log directory. See [\`npm - logging\`](/using-npm/logging) for more information. - `, -}) - -define('logs-max', { - default: 10, - type: Number, - description: ` - The maximum number of log files to store. - - If set to 0, no log files will be written for the current run. - `, -}) - -define('long', { - default: false, - type: Boolean, - short: 'l', - description: ` - Show extended information in \`ls\`, \`search\`, and \`help-search\`. - `, -}) - -define('maxsockets', { - default: 15, - type: Number, - description: ` - The maximum number of connections to use per origin (protocol/host/port - combination). - `, - flatten (key, obj, flatOptions) { - flatOptions.maxSockets = obj[key] - }, -}) - -define('message', { - default: '%s', - type: String, - short: 'm', - description: ` - Commit message which is used by \`npm version\` when creating version commit. - - Any "%s" in the message will be replaced with the version number. - `, - flatten, -}) - -define('node-options', { - default: null, - type: [null, String], - description: ` - Options to pass through to Node.js via the \`NODE_OPTIONS\` environment - variable. This does not impact how npm itself is executed but it does - impact how lifecycle scripts are called. - `, -}) - -define('noproxy', { - default: '', - defaultDescription: ` - The value of the NO_PROXY environment variable - `, - type: [String, Array], - description: ` - Domain extensions that should bypass any proxies. - - Also accepts a comma-delimited string. - `, - flatten (key, obj, flatOptions) { - if (Array.isArray(obj[key])) { - flatOptions.noProxy = obj[key].join(',') - } else { - flatOptions.noProxy = obj[key] - } - }, -}) - -define('offline', { - default: false, - type: Boolean, - description: ` - Force offline mode: no network requests will be done during install. To allow - the CLI to fill in missing cache data, see \`--prefer-offline\`. - `, - flatten, -}) - -define('omit', { - default: process.env.NODE_ENV === 'production' ? ['dev'] : [], - defaultDescription: ` - 'dev' if the \`NODE_ENV\` environment variable is set to 'production', - otherwise empty. - `, - type: [Array, 'dev', 'optional', 'peer'], - description: ` - Dependency types to omit from the installation tree on disk. - - Note that these dependencies _are_ still resolved and added to the - \`package-lock.json\` or \`npm-shrinkwrap.json\` file. They are just - not physically installed on disk. - - If a package type appears in both the \`--include\` and \`--omit\` - lists, then it will be included. - - If the resulting omit list includes \`'dev'\`, then the \`NODE_ENV\` - environment variable will be set to \`'production'\` for all lifecycle - scripts. - `, - flatten (key, obj, flatOptions) { - flatOptions.omit = buildOmitList(obj) - }, -}) - -define('omit-lockfile-registry-resolved', { - default: false, - type: Boolean, - description: ` - This option causes npm to create lock files without a \`resolved\` key for - registry dependencies. Subsequent installs will need to resolve tarball - endpoints with the configured registry, likely resulting in a longer install - time. - `, - flatten, -}) - -define('only', { - default: null, - type: [null, 'prod', 'production'], - deprecated: ` - Use \`--omit=dev\` to omit dev dependencies from the install. - `, - description: ` - When set to \`prod\` or \`production\`, this is an alias for - \`--omit=dev\`. - `, - flatten (key, obj, flatOptions) { - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('optional', { - default: null, - type: [null, Boolean], - deprecated: ` - Use \`--omit=optional\` to exclude optional dependencies, or - \`--include=optional\` to include them. - - Default value does install optional deps unless otherwise omitted. - `, - description: ` - Alias for --include=optional or --omit=optional - `, - flatten (key, obj, flatOptions) { - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('otp', { - default: null, - type: [null, String], - description: ` - This is a one-time password from a two-factor authenticator. It's needed - when publishing or changing package permissions with \`npm access\`. - - If not set, and a registry response fails with a challenge for a one-time - password, npm will prompt on the command line for one. - `, - flatten (key, obj, flatOptions) { - flatten(key, obj, flatOptions) - if (obj.otp) { - obj['auth-type'] = 'legacy' - flatten('auth-type', obj, flatOptions) - } - }, -}) - -define('package', { - default: [], - hint: '', - type: [String, Array], - description: ` - The package or packages to install for [\`npm exec\`](/commands/npm-exec) - `, - flatten, -}) - -define('package-lock', { - default: true, - type: Boolean, - description: ` - If set to false, then ignore \`package-lock.json\` files when installing. - This will also prevent _writing_ \`package-lock.json\` if \`save\` is - true. - `, - flatten: (key, obj, flatOptions) => { - flatten(key, obj, flatOptions) - if (flatOptions.packageLockOnly) { - flatOptions.packageLock = true - } - }, -}) - -define('package-lock-only', { - default: false, - type: Boolean, - description: ` - If set to true, the current operation will only use the \`package-lock.json\`, - ignoring \`node_modules\`. - - For \`update\` this means only the \`package-lock.json\` will be updated, - instead of checking \`node_modules\` and downloading dependencies. - - For \`list\` this means the output will be based on the tree described by the - \`package-lock.json\`, rather than the contents of \`node_modules\`. - `, - flatten: (key, obj, flatOptions) => { - flatten(key, obj, flatOptions) - if (flatOptions.packageLockOnly) { - flatOptions.packageLock = true - } - }, -}) - -define('pack-destination', { - default: '.', - type: String, - description: ` - Directory in which \`npm pack\` will save tarballs. - `, - flatten, -}) - -define('parseable', { - default: false, - type: Boolean, - short: 'p', - description: ` - Output parseable results from commands that write to standard output. For - \`npm search\`, this will be tab-separated table format. - `, - flatten, -}) - -define('prefer-dedupe', { - default: false, - type: Boolean, - description: ` - Prefer to deduplicate packages if possible, rather than - choosing a newer version of a dependency. - `, - flatten, -}) - -define('prefer-offline', { - default: false, - type: Boolean, - description: ` - If true, staleness checks for cached data will be bypassed, but missing - data will be requested from the server. To force full offline mode, use - \`--offline\`. - `, - flatten, -}) - -define('prefer-online', { - default: false, - type: Boolean, - description: ` - If true, staleness checks for cached data will be forced, making the CLI - look for updates immediately even for fresh package data. - `, - flatten, -}) - -// `prefix` has its default defined outside of this module -define('prefix', { - type: path, - short: 'C', - default: '', - defaultDescription: ` - In global mode, the folder where the node executable is installed. - Otherwise, the nearest parent folder containing either a package.json - file or a node_modules folder. - `, - description: ` - The location to install global items. If set on the command line, then - it forces non-global commands to run in the specified folder. - `, -}) - -define('preid', { - default: '', - hint: 'prerelease-id', - type: String, - description: ` - The "prerelease identifier" to use as a prefix for the "prerelease" part - of a semver. Like the \`rc\` in \`1.2.0-rc.8\`. - `, - flatten, -}) - -define('production', { - default: null, - type: [null, Boolean], - deprecated: 'Use `--omit=dev` instead.', - description: 'Alias for `--omit=dev`', - flatten (key, obj, flatOptions) { - definitions.omit.flatten('omit', obj, flatOptions) - }, -}) - -define('progress', { - default: !ciInfo.isCI, - defaultDescription: ` - \`true\` unless running in a known CI system - `, - type: Boolean, - description: ` - When set to \`true\`, npm will display a progress bar during time - intensive operations, if \`process.stderr\` is a TTY. - - Set to \`false\` to suppress the progress bar. - `, - flatten (key, obj, flatOptions) { - flatOptions.progress = !obj.progress ? false - : !!process.stderr.isTTY && process.env.TERM !== 'dumb' - }, -}) - -define('provenance', { - default: false, - type: Boolean, - exclusive: ['provenance-file'], - description: ` - When publishing from a supported cloud CI/CD system, the package will be - publicly linked to where it was built and published from. - `, - flatten, -}) - -define('provenance-file', { - default: null, - type: path, - hint: '', - exclusive: ['provenance'], - description: ` - When publishing, the provenance bundle at the given path will be used. - `, - flatten, -}) - -define('proxy', { - default: null, - type: [null, false, url], // allow proxy to be disabled explicitly - description: ` - A proxy to use for outgoing http requests. If the \`HTTP_PROXY\` or - \`http_proxy\` environment variables are set, proxy settings will be - honored by the underlying \`request\` library. - `, - flatten, -}) - -define('read-only', { - default: false, - type: Boolean, - description: ` - This is used to mark a token as unable to publish when configuring - limited access tokens with the \`npm token create\` command. - `, - flatten, -}) - -define('rebuild-bundle', { - default: true, - type: Boolean, - description: ` - Rebuild bundled dependencies after installation. - `, - flatten, -}) - -define('registry', { - default: 'https://registry.npmjs.org/', - type: url, - description: ` - The base URL of the npm registry. - `, - flatten, -}) - -define('replace-registry-host', { - default: 'npmjs', - hint: ' | hostname', - type: ['npmjs', 'never', 'always', String], - description: ` - Defines behavior for replacing the registry host in a lockfile with the - configured registry. - - The default behavior is to replace package dist URLs from the default - registry (https://registry.npmjs.org) to the configured registry. If set to - "never", then use the registry value. If set to "always", then replace the - registry host with the configured host every time. - - You may also specify a bare hostname (e.g., "registry.npmjs.org"). - `, - flatten, -}) - -define('save', { - default: true, - defaultDescription: `\`true\` unless when using \`npm update\` where it - defaults to \`false\``, - usage: '-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle', - type: Boolean, - short: 'S', - description: ` - Save installed packages to a \`package.json\` file as dependencies. - - When used with the \`npm rm\` command, removes the dependency from - \`package.json\`. - - Will also prevent writing to \`package-lock.json\` if set to \`false\`. - `, - flatten, -}) - -define('save-bundle', { - default: false, - type: Boolean, - short: 'B', - description: ` - If a package would be saved at install time by the use of \`--save\`, - \`--save-dev\`, or \`--save-optional\`, then also put it in the - \`bundleDependencies\` list. - - Ignored if \`--save-peer\` is set, since peerDependencies cannot be bundled. - `, - flatten (key, obj, flatOptions) { - // XXX update arborist to just ignore it if resulting saveType is peer - // otherwise this won't have the expected effect: - // - // npm config set save-peer true - // npm i foo --save-bundle --save-prod <-- should bundle - flatOptions.saveBundle = obj['save-bundle'] && !obj['save-peer'] - }, -}) - -// XXX: We should really deprecate all these `--save-blah` switches -// in favor of a single `--save-type` option. The unfortunate shortcut -// we took for `--save-peer --save-optional` being `--save-type=peerOptional` -// makes this tricky, and likely a breaking change. - -define('save-dev', { - default: false, - type: Boolean, - short: 'D', - description: ` - Save installed packages to a package.json file as \`devDependencies\`. - `, - flatten (key, obj, flatOptions) { - if (!obj[key]) { - if (flatOptions.saveType === 'dev') { - delete flatOptions.saveType - } - return - } - - flatOptions.saveType = 'dev' - }, -}) - -define('save-exact', { - default: false, - type: Boolean, - short: 'E', - description: ` - Dependencies saved to package.json will be configured with an exact - version rather than using npm's default semver range operator. - `, - flatten (key, obj, flatOptions) { - // just call the save-prefix flattener, it reads from obj['save-exact'] - definitions['save-prefix'].flatten('save-prefix', obj, flatOptions) - }, -}) - -define('save-optional', { - default: false, - type: Boolean, - short: 'O', - description: ` - Save installed packages to a package.json file as - \`optionalDependencies\`. - `, - flatten (key, obj, flatOptions) { - if (!obj[key]) { - if (flatOptions.saveType === 'optional') { - delete flatOptions.saveType - } else if (flatOptions.saveType === 'peerOptional') { - flatOptions.saveType = 'peer' - } - return - } - - if (flatOptions.saveType === 'peerOptional') { - return - } - - if (flatOptions.saveType === 'peer') { - flatOptions.saveType = 'peerOptional' - } else { - flatOptions.saveType = 'optional' - } - }, -}) - -define('save-peer', { - default: false, - type: Boolean, - description: ` - Save installed packages to a package.json file as \`peerDependencies\` - `, - flatten (key, obj, flatOptions) { - if (!obj[key]) { - if (flatOptions.saveType === 'peer') { - delete flatOptions.saveType - } else if (flatOptions.saveType === 'peerOptional') { - flatOptions.saveType = 'optional' - } - return - } - - if (flatOptions.saveType === 'peerOptional') { - return - } - - if (flatOptions.saveType === 'optional') { - flatOptions.saveType = 'peerOptional' - } else { - flatOptions.saveType = 'peer' - } - }, -}) - -define('save-prefix', { - default: '^', - type: String, - description: ` - Configure how versions of packages installed to a package.json file via - \`--save\` or \`--save-dev\` get prefixed. - - For example if a package has version \`1.2.3\`, by default its version is - set to \`^1.2.3\` which allows minor upgrades for that package, but after - \`npm config set save-prefix='~'\` it would be set to \`~1.2.3\` which - only allows patch upgrades. - `, - flatten (key, obj, flatOptions) { - flatOptions.savePrefix = obj['save-exact'] ? '' : obj['save-prefix'] - obj['save-prefix'] = flatOptions.savePrefix - }, -}) - -define('save-prod', { - default: false, - type: Boolean, - short: 'P', - description: ` - Save installed packages into \`dependencies\` specifically. This is - useful if a package already exists in \`devDependencies\` or - \`optionalDependencies\`, but you want to move it to be a non-optional - production dependency. - - This is the default behavior if \`--save\` is true, and neither - \`--save-dev\` or \`--save-optional\` are true. - `, - flatten (key, obj, flatOptions) { - if (!obj[key]) { - if (flatOptions.saveType === 'prod') { - delete flatOptions.saveType - } - return - } - - flatOptions.saveType = 'prod' - }, -}) - -define('scope', { - default: '', - defaultDescription: ` - the scope of the current project, if any, or "" - `, - type: String, - hint: '<@scope>', - description: ` - Associate an operation with a scope for a scoped registry. - - Useful when logging in to or out of a private registry: - - \`\`\` - # log in, linking the scope to the custom registry - npm login --scope=@mycorp --registry=https://registry.mycorp.com - - # log out, removing the link and the auth token - npm logout --scope=@mycorp - \`\`\` - - This will cause \`@mycorp\` to be mapped to the registry for future - installation of packages specified according to the pattern - \`@mycorp/package\`. - - This will also cause \`npm init\` to create a scoped package. - - \`\`\` - # accept all defaults, and create a package named "@foo/whatever", - # instead of just named "whatever" - npm init --scope=@foo --yes - \`\`\` - `, - flatten (key, obj, flatOptions) { - const value = obj[key] - const scope = value && !/^@/.test(value) ? `@${value}` : value - flatOptions.scope = scope - // projectScope is kept for compatibility with npm-registry-fetch - flatOptions.projectScope = scope - }, -}) - -define('script-shell', { - default: null, - defaultDescription: ` - '/bin/sh' on POSIX systems, 'cmd.exe' on Windows - `, - type: [null, String], - description: ` - The shell to use for scripts run with the \`npm exec\`, - \`npm run\` and \`npm init \` commands. - `, - flatten (key, obj, flatOptions) { - flatOptions.scriptShell = obj[key] || undefined - }, -}) - -define('searchexclude', { - default: '', - type: String, - description: ` - Space-separated options that limit the results from search. - `, - flatten (key, obj, flatOptions) { - flatOptions.search = flatOptions.search || { limit: 20 } - flatOptions.search.exclude = obj[key].toLowerCase() - }, -}) - -define('searchlimit', { - default: 20, - type: Number, - description: ` - Number of items to limit search results to. Will not apply at all to - legacy searches. - `, - flatten (key, obj, flatOptions) { - flatOptions.search = flatOptions.search || {} - flatOptions.search.limit = obj[key] - }, -}) - -define('searchopts', { - default: '', - type: String, - description: ` - Space-separated options that are always passed to search. - `, - flatten (key, obj, flatOptions) { - flatOptions.search = flatOptions.search || { limit: 20 } - flatOptions.search.opts = querystring.parse(obj[key]) - }, -}) - -define('searchstaleness', { - default: 15 * 60, - type: Number, - description: ` - The age of the cache, in seconds, before another registry request is made - if using legacy search endpoint. - `, - flatten (key, obj, flatOptions) { - flatOptions.search = flatOptions.search || { limit: 20 } - flatOptions.search.staleness = obj[key] - }, -}) - -define('shell', { - default: shell, - defaultDescription: ` - SHELL environment variable, or "bash" on Posix, or "cmd.exe" on Windows - `, - type: String, - description: ` - The shell to run for the \`npm explore\` command. - `, - flatten, -}) - -define('shrinkwrap', { - default: true, - type: Boolean, - deprecated: ` - Use the --package-lock setting instead. - `, - description: ` - Alias for --package-lock - `, - flatten (key, obj, flatOptions) { - obj['package-lock'] = obj.shrinkwrap - definitions['package-lock'].flatten('package-lock', obj, flatOptions) - }, -}) - -define('sign-git-commit', { - default: false, - type: Boolean, - description: ` - If set to true, then the \`npm version\` command will commit the new - package version using \`-S\` to add a signature. - - Note that git requires you to have set up GPG keys in your git configs - for this to work properly. - `, - flatten, -}) - -define('sign-git-tag', { - default: false, - type: Boolean, - description: ` - If set to true, then the \`npm version\` command will tag the version - using \`-s\` to add a signature. - - Note that git requires you to have set up GPG keys in your git configs - for this to work properly. - `, - flatten, -}) - -define('strict-peer-deps', { - default: false, - type: Boolean, - description: ` - If set to \`true\`, and \`--legacy-peer-deps\` is not set, then _any_ - conflicting \`peerDependencies\` will be treated as an install failure, - even if npm could reasonably guess the appropriate resolution based on - non-peer dependency relationships. - - By default, conflicting \`peerDependencies\` deep in the dependency graph - will be resolved using the nearest non-peer dependency specification, - even if doing so will result in some packages receiving a peer dependency - outside the range set in their package's \`peerDependencies\` object. - - When such an override is performed, a warning is printed, explaining the - conflict and the packages involved. If \`--strict-peer-deps\` is set, - then this warning is treated as a failure. - `, - flatten, -}) - -define('strict-ssl', { - default: true, - type: Boolean, - description: ` - Whether or not to do SSL key validation when making requests to the - registry via https. - - See also the \`ca\` config. - `, - flatten (key, obj, flatOptions) { - flatOptions.strictSSL = obj[key] - }, -}) - -define('tag', { - default: 'latest', - type: String, - description: ` - If you ask npm to install a package and don't tell it a specific version, - then it will install the specified tag. - - Also the tag that is added to the package@version specified by the \`npm - tag\` command, if no explicit tag is given. - - When used by the \`npm diff\` command, this is the tag used to fetch the - tarball that will be compared with the local files by default. - `, - flatten (key, obj, flatOptions) { - flatOptions.defaultTag = obj[key] - }, -}) - -define('tag-version-prefix', { - default: 'v', - type: String, - description: ` - If set, alters the prefix used when tagging a new version when performing - a version increment using \`npm version\`. To remove the prefix - altogether, set it to the empty string: \`""\`. - - Because other tools may rely on the convention that npm version tags look - like \`v1.0.0\`, _only use this property if it is absolutely necessary_. - In particular, use care when overriding this setting for public packages. - `, - flatten, -}) - -define('timing', { - default: false, - type: Boolean, - description: ` - If true, writes timing information to a process specific json file in - the cache or \`logs-dir\`. The file name ends with \`-timing.json\`. - - You can quickly view it with this [json](https://npm.im/json) command - line: \`cat ~/.npm/_logs/*-timing.json | npm exec -- json -g\`. - - Timing information will also be reported in the terminal. To suppress this - while still writing the timing file, use \`--silent\`. - `, -}) - -define('umask', { - default: 0, - type: Umask, - description: ` - The "umask" value to use when setting the file creation mode on files and - folders. - - Folders and executables are given a mode which is \`0o777\` masked - against this value. Other files are given a mode which is \`0o666\` - masked against this value. - - Note that the underlying system will _also_ apply its own umask value to - files and folders that are created, and npm does not circumvent this, but - rather adds the \`--umask\` config to it. - - Thus, the effective default umask value on most POSIX systems is 0o22, - meaning that folders and executables are created with a mode of 0o755 and - other files are created with a mode of 0o644. - `, - flatten, -}) - -define('unicode', { - default: unicode, - defaultDescription: ` - false on windows, true on mac/unix systems with a unicode locale, as - defined by the \`LC_ALL\`, \`LC_CTYPE\`, or \`LANG\` environment variables. - `, - type: Boolean, - description: ` - When set to true, npm uses unicode characters in the tree output. When - false, it uses ascii characters instead of unicode glyphs. - `, - flatten, -}) - -define('update-notifier', { - default: true, - type: Boolean, - description: ` - Set to false to suppress the update notification when using an older - version of npm than the latest. - `, -}) - -define('usage', { - default: false, - type: Boolean, - short: ['?', 'H', 'h'], - description: ` - Show short usage output about the command specified. - `, -}) - -define('user-agent', { - default: 'npm/{npm-version} ' + - 'node/{node-version} ' + - '{platform} ' + - '{arch} ' + - 'workspaces/{workspaces} ' + - '{ci}', - type: String, - description: ` - Sets the User-Agent request header. The following fields are replaced - with their actual counterparts: - - * \`{npm-version}\` - The npm version in use - * \`{node-version}\` - The Node.js version in use - * \`{platform}\` - The value of \`process.platform\` - * \`{arch}\` - The value of \`process.arch\` - * \`{workspaces}\` - Set to \`true\` if the \`workspaces\` or \`workspace\` - options are set. - * \`{ci}\` - The value of the \`ci-name\` config, if set, prefixed with - \`ci/\`, or an empty string if \`ci-name\` is empty. - `, - flatten (key, obj, flatOptions) { - const value = obj[key] - const ciName = ciInfo.name?.toLowerCase().split(' ').join('-') || null - let inWorkspaces = false - if (obj.workspaces || obj.workspace && obj.workspace.length) { - inWorkspaces = true - } - flatOptions.userAgent = - value.replace(/\{node-version\}/gi, process.version) - .replace(/\{npm-version\}/gi, obj['npm-version']) - .replace(/\{platform\}/gi, process.platform) - .replace(/\{arch\}/gi, process.arch) - .replace(/\{workspaces\}/gi, inWorkspaces) - .replace(/\{ci\}/gi, ciName ? `ci/${ciName}` : '') - .trim() - - // We can't clobber the original or else subsequent flattening will fail - // (i.e. when we change the underlying config values) - // obj[key] = flatOptions.userAgent - - // user-agent is a unique kind of config item that gets set from a template - // and ends up translated. Because of this, the normal "should we set this - // to process.env also doesn't work - process.env.npm_config_user_agent = flatOptions.userAgent - }, -}) - -define('userconfig', { - default: '~/.npmrc', - type: path, - description: ` - The location of user-level configuration settings. - - This may be overridden by the \`npm_config_userconfig\` environment - variable or the \`--userconfig\` command line option, but may _not_ - be overridden by settings in the \`globalconfig\` file. - `, -}) - -define('version', { - default: false, - type: Boolean, - short: 'v', - description: ` - If true, output the npm version and exit successfully. - - Only relevant when specified explicitly on the command line. - `, -}) - -define('versions', { - default: false, - type: Boolean, - description: ` - If true, output the npm version as well as node's \`process.versions\` - map and the version in the current working directory's \`package.json\` - file if one exists, and exit successfully. - - Only relevant when specified explicitly on the command line. - `, -}) - -define('viewer', { - default: isWindows ? 'browser' : 'man', - defaultDescription: ` - "man" on Posix, "browser" on Windows - `, - type: String, - description: ` - The program to use to view help content. - - Set to \`"browser"\` to view html help content in the default web browser. - `, -}) - -define('which', { - default: null, - hint: '', - type: [null, Number], - description: ` - If there are multiple funding sources, which 1-indexed source URL to open. - `, -}) - -define('workspace', { - default: [], - type: [String, Array], - hint: '', - short: 'w', - envExport: false, - description: ` - Enable running a command in the context of the configured workspaces of the - current project while filtering by running only the workspaces defined by - this configuration option. - - Valid values for the \`workspace\` config are either: - - * Workspace names - * Path to a workspace directory - * Path to a parent workspace directory (will result in selecting all - workspaces within that folder) - - When set for the \`npm init\` command, this may be set to the folder of - a workspace which does not yet exist, to create the folder and set it - up as a brand new workspace within the project. - `, - flatten: (key, obj, flatOptions) => { - definitions['user-agent'].flatten('user-agent', obj, flatOptions) - }, -}) - -define('workspaces', { - default: null, - type: [null, Boolean], - short: 'ws', - envExport: false, - description: ` - Set to true to run the command in the context of **all** configured - workspaces. - - Explicitly setting this to false will cause commands like \`install\` to - ignore workspaces altogether. - When not set explicitly: - - - Commands that operate on the \`node_modules\` tree (install, update, - etc.) will link workspaces into the \`node_modules\` folder. - - Commands that do other things (test, exec, publish, etc.) will operate - on the root project, _unless_ one or more workspaces are specified in - the \`workspace\` config. - `, - flatten: (key, obj, flatOptions) => { - definitions['user-agent'].flatten('user-agent', obj, flatOptions) - - // TODO: this is a derived value, and should be reworked when we have a - // pattern for derived value - - // workspacesEnabled is true whether workspaces is null or true - // commands contextually work with workspaces or not regardless of - // configuration, so we need an option specifically to disable workspaces - flatOptions.workspacesEnabled = obj[key] !== false - }, -}) - -define('workspaces-update', { - default: true, - type: Boolean, - description: ` - If set to true, the npm cli will run an update after operations that may - possibly change the workspaces installed to the \`node_modules\` folder. - `, - flatten, -}) - -define('yes', { - default: null, - type: [null, Boolean], - short: 'y', - description: ` - Automatically answer "yes" to any prompts that npm might print on - the command line. - `, -}) diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/index.js b/node_modules/npm/node_modules/@npmcli/config/lib/definitions/index.js deleted file mode 100644 index 8255a90..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/definitions/index.js +++ /dev/null @@ -1,66 +0,0 @@ -const definitions = require('./definitions.js') - -// use the defined flattening function, and copy over any scoped -// registries and registry-specific "nerfdart" configs verbatim -// -// TODO: make these getters so that we only have to make dirty -// the thing that changed, and then flatten the fields that -// could have changed when a config.set is called. -// -// TODO: move nerfdart auth stuff into a nested object that -// is only passed along to paths that end up calling npm-registry-fetch. -const flatten = (obj, flat = {}) => { - for (const [key, val] of Object.entries(obj)) { - const def = definitions[key] - if (def && def.flatten) { - def.flatten(key, obj, flat) - } else if (/@.*:registry$/i.test(key) || /^\/\//.test(key)) { - flat[key] = val - } - } - return flat -} - -const definitionProps = Object.entries(definitions) - .reduce((acc, [key, { short = [], default: d }]) => { - // can be either an array or string - for (const s of [].concat(short)) { - acc.shorthands[s] = [`--${key}`] - } - acc.defaults[key] = d - return acc - }, { shorthands: {}, defaults: {} }) - -// aliases where they get expanded into a completely different thing -// these are NOT supported in the environment or npmrc files, only -// expanded on the CLI. -// TODO: when we switch off of nopt, use an arg parser that supports -// more reasonable aliasing and short opts right in the definitions set. -const shorthands = { - 'enjoy-by': ['--before'], - d: ['--loglevel', 'info'], - dd: ['--loglevel', 'verbose'], - ddd: ['--loglevel', 'silly'], - quiet: ['--loglevel', 'warn'], - q: ['--loglevel', 'warn'], - s: ['--loglevel', 'silent'], - silent: ['--loglevel', 'silent'], - verbose: ['--loglevel', 'verbose'], - desc: ['--description'], - help: ['--usage'], - local: ['--no-global'], - n: ['--no-yes'], - no: ['--no-yes'], - porcelain: ['--parseable'], - readonly: ['--read-only'], - reg: ['--registry'], - iwr: ['--include-workspace-root'], - ...definitionProps.shorthands, -} - -module.exports = { - defaults: definitionProps.defaults, - definitions, - flatten, - shorthands, -} diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/env-replace.js b/node_modules/npm/node_modules/@npmcli/config/lib/env-replace.js deleted file mode 100644 index c851f6e..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/env-replace.js +++ /dev/null @@ -1,14 +0,0 @@ -// replace any ${ENV} values with the appropriate environ. - -const envExpr = /(? f.replace(envExpr, (orig, esc, name) => { - const val = env[name] !== undefined ? env[name] : `$\{${name}}` - - // consume the escape chars that are relevant. - if (esc.length % 2) { - return orig.slice((esc.length + 1) / 2) - } - - return (esc.slice(esc.length / 2)) + val -}) diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/errors.js b/node_modules/npm/node_modules/@npmcli/config/lib/errors.js deleted file mode 100644 index 6161509..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/errors.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -class ErrInvalidAuth extends Error { - constructor (problems) { - let message = 'Invalid auth configuration found: ' - message += problems.map((problem) => { - // istanbul ignore else - if (problem.action === 'delete') { - return `\`${problem.key}\` is not allowed in ${problem.where} config` - } else if (problem.action === 'rename') { - return `\`${problem.from}\` must be renamed to \`${problem.to}\` in ${problem.where} config` - } - }).join(', ') - message += '\nPlease run `npm config fix` to repair your configuration.`' - super(message) - this.code = 'ERR_INVALID_AUTH' - this.problems = problems - } -} - -module.exports = { - ErrInvalidAuth, -} diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/index.js b/node_modules/npm/node_modules/@npmcli/config/lib/index.js deleted file mode 100644 index b09ecc4..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/index.js +++ /dev/null @@ -1,959 +0,0 @@ -// TODO: set the scope config from package.json or explicit cli config -const { walkUp } = require('walk-up-path') -const ini = require('ini') -const nopt = require('nopt') -const mapWorkspaces = require('@npmcli/map-workspaces') -const rpj = require('read-package-json-fast') -const log = require('proc-log') - -const { resolve, dirname, join } = require('path') -const { homedir } = require('os') -const { - readFile, - writeFile, - chmod, - unlink, - stat, - mkdir, -} = require('fs/promises') - -const fileExists = (...p) => stat(resolve(...p)) - .then((st) => st.isFile()) - .catch(() => false) - -const dirExists = (...p) => stat(resolve(...p)) - .then((st) => st.isDirectory()) - .catch(() => false) - -const hasOwnProperty = (obj, key) => - Object.prototype.hasOwnProperty.call(obj, key) - -// define a custom getter, but turn into a normal prop -// if we set it. otherwise it can't be set on child objects -const settableGetter = (obj, key, get) => { - Object.defineProperty(obj, key, { - get, - set (value) { - Object.defineProperty(obj, key, { - value, - configurable: true, - writable: true, - enumerable: true, - }) - }, - configurable: true, - enumerable: true, - }) -} - -const typeDefs = require('./type-defs.js') -const nerfDart = require('./nerf-dart.js') -const envReplace = require('./env-replace.js') -const parseField = require('./parse-field.js') -const typeDescription = require('./type-description.js') -const setEnvs = require('./set-envs.js') - -const { - ErrInvalidAuth, -} = require('./errors.js') - -// types that can be saved back to -const confFileTypes = new Set([ - 'global', - 'user', - 'project', -]) - -const confTypes = new Set([ - 'default', - 'builtin', - ...confFileTypes, - 'env', - 'cli', -]) - -class Config { - #loaded = false - #flatten - // populated the first time we flatten the object - #flatOptions = null - - static get typeDefs () { - return typeDefs - } - - constructor ({ - definitions, - shorthands, - flatten, - npmPath, - - // options just to override in tests, mostly - env = process.env, - argv = process.argv, - platform = process.platform, - execPath = process.execPath, - cwd = process.cwd(), - excludeNpmCwd = false, - }) { - // turn the definitions into nopt's weirdo syntax - this.definitions = definitions - const types = {} - const defaults = {} - this.deprecated = {} - for (const [key, def] of Object.entries(definitions)) { - defaults[key] = def.default - types[key] = def.type - if (def.deprecated) { - this.deprecated[key] = def.deprecated.trim().replace(/\n +/, '\n') - } - } - - this.#flatten = flatten - this.types = types - this.shorthands = shorthands - this.defaults = defaults - - this.npmPath = npmPath - this.npmBin = join(this.npmPath, 'bin/npm-cli.js') - this.argv = argv - this.env = env - this.execPath = execPath - this.platform = platform - this.cwd = cwd - this.excludeNpmCwd = excludeNpmCwd - - // set when we load configs - this.globalPrefix = null - this.localPrefix = null - this.localPackage = null - - // defaults to env.HOME, but will always be *something* - this.home = null - - // set up the prototype chain of config objects - const wheres = [...confTypes] - this.data = new Map() - let parent = null - for (const where of wheres) { - this.data.set(where, parent = new ConfigData(parent)) - } - - this.data.set = () => { - throw new Error('cannot change internal config data structure') - } - this.data.delete = () => { - throw new Error('cannot change internal config data structure') - } - - this.sources = new Map([]) - - this.list = [] - for (const { data } of this.data.values()) { - this.list.unshift(data) - } - Object.freeze(this.list) - - this.#loaded = false - } - - get loaded () { - return this.#loaded - } - - get prefix () { - return this.#get('global') ? this.globalPrefix : this.localPrefix - } - - // return the location where key is found. - find (key) { - if (!this.loaded) { - throw new Error('call config.load() before reading values') - } - - // have to look in reverse order - const entries = [...this.data.entries()] - for (let i = entries.length - 1; i > -1; i--) { - const [where, { data }] = entries[i] - if (hasOwnProperty(data, key)) { - return where - } - } - return null - } - - get (key, where) { - if (!this.loaded) { - throw new Error('call config.load() before reading values') - } - return this.#get(key, where) - } - - // we need to get values sometimes, so use this internal one to do so - // while in the process of loading. - #get (key, where = null) { - if (where !== null && !confTypes.has(where)) { - throw new Error('invalid config location param: ' + where) - } - const { data } = this.data.get(where || 'cli') - return where === null || hasOwnProperty(data, key) ? data[key] : undefined - } - - set (key, val, where = 'cli') { - if (!this.loaded) { - throw new Error('call config.load() before setting values') - } - if (!confTypes.has(where)) { - throw new Error('invalid config location param: ' + where) - } - this.#checkDeprecated(key) - const { data, raw } = this.data.get(where) - data[key] = val - if (['global', 'user', 'project'].includes(where)) { - raw[key] = val - } - - // this is now dirty, the next call to this.valid will have to check it - this.data.get(where)[_valid] = null - - // the flat options are invalidated, regenerate next time they're needed - this.#flatOptions = null - } - - get flat () { - if (this.#flatOptions) { - return this.#flatOptions - } - - // create the object for flat options passed to deps - process.emit('time', 'config:load:flatten') - this.#flatOptions = {} - // walk from least priority to highest - for (const { data } of this.data.values()) { - this.#flatten(data, this.#flatOptions) - } - this.#flatOptions.nodeBin = this.execPath - this.#flatOptions.npmBin = this.npmBin - process.emit('timeEnd', 'config:load:flatten') - - return this.#flatOptions - } - - delete (key, where = 'cli') { - if (!this.loaded) { - throw new Error('call config.load() before deleting values') - } - if (!confTypes.has(where)) { - throw new Error('invalid config location param: ' + where) - } - const { data, raw } = this.data.get(where) - delete data[key] - if (['global', 'user', 'project'].includes(where)) { - delete raw[key] - } - } - - async load () { - if (this.loaded) { - throw new Error('attempting to load npm config multiple times') - } - - process.emit('time', 'config:load') - // first load the defaults, which sets the global prefix - process.emit('time', 'config:load:defaults') - this.loadDefaults() - process.emit('timeEnd', 'config:load:defaults') - - // next load the builtin config, as this sets new effective defaults - process.emit('time', 'config:load:builtin') - await this.loadBuiltinConfig() - process.emit('timeEnd', 'config:load:builtin') - - // cli and env are not async, and can set the prefix, relevant to project - process.emit('time', 'config:load:cli') - this.loadCLI() - process.emit('timeEnd', 'config:load:cli') - process.emit('time', 'config:load:env') - this.loadEnv() - process.emit('timeEnd', 'config:load:env') - - // next project config, which can affect userconfig location - process.emit('time', 'config:load:project') - await this.loadProjectConfig() - process.emit('timeEnd', 'config:load:project') - // then user config, which can affect globalconfig location - process.emit('time', 'config:load:user') - await this.loadUserConfig() - process.emit('timeEnd', 'config:load:user') - // last but not least, global config file - process.emit('time', 'config:load:global') - await this.loadGlobalConfig() - process.emit('timeEnd', 'config:load:global') - - // set this before calling setEnvs, so that we don't have to share - // private attributes, as that module also does a bunch of get operations - this.#loaded = true - - // set proper globalPrefix now that everything is loaded - this.globalPrefix = this.get('prefix') - - process.emit('time', 'config:load:setEnvs') - this.setEnvs() - process.emit('timeEnd', 'config:load:setEnvs') - - process.emit('timeEnd', 'config:load') - } - - loadDefaults () { - this.loadGlobalPrefix() - this.loadHome() - - const defaultsObject = { - ...this.defaults, - prefix: this.globalPrefix, - } - - try { - defaultsObject['npm-version'] = require(join(this.npmPath, 'package.json')).version - } catch { - // in some weird state where the passed in npmPath does not have a package.json - // this will never happen in npm, but is guarded here in case this is consumed - // in other ways + tests - } - - this.#loadObject(defaultsObject, 'default', 'default values') - - const { data } = this.data.get('default') - - // if the prefix is set on cli, env, or userconfig, then we need to - // default the globalconfig file to that location, instead of the default - // global prefix. It's weird that `npm get globalconfig --prefix=/foo` - // returns `/foo/etc/npmrc`, but better to not change it at this point. - settableGetter(data, 'globalconfig', () => resolve(this.#get('prefix'), 'etc/npmrc')) - } - - loadHome () { - this.home = this.env.HOME || homedir() - } - - loadGlobalPrefix () { - if (this.globalPrefix) { - throw new Error('cannot load default global prefix more than once') - } - - if (this.env.PREFIX) { - this.globalPrefix = this.env.PREFIX - } else if (this.platform === 'win32') { - // c:\node\node.exe --> prefix=c:\node\ - this.globalPrefix = dirname(this.execPath) - } else { - // /usr/local/bin/node --> prefix=/usr/local - this.globalPrefix = dirname(dirname(this.execPath)) - - // destdir only is respected on Unix - if (this.env.DESTDIR) { - this.globalPrefix = join(this.env.DESTDIR, this.globalPrefix) - } - } - } - - loadEnv () { - const conf = Object.create(null) - for (const [envKey, envVal] of Object.entries(this.env)) { - if (!/^npm_config_/i.test(envKey) || envVal === '') { - continue - } - let key = envKey.slice('npm_config_'.length) - if (!key.startsWith('//')) { // don't normalize nerf-darted keys - key = key.replace(/(?!^)_/g, '-') // don't replace _ at the start of the key - .toLowerCase() - } - conf[key] = envVal - } - this.#loadObject(conf, 'env', 'environment') - } - - loadCLI () { - nopt.invalidHandler = (k, val, type) => - this.invalidHandler(k, val, type, 'command line options', 'cli') - const conf = nopt(this.types, this.shorthands, this.argv) - nopt.invalidHandler = null - this.parsedArgv = conf.argv - delete conf.argv - this.#loadObject(conf, 'cli', 'command line options') - } - - get valid () { - for (const [where, { valid }] of this.data.entries()) { - if (valid === false || valid === null && !this.validate(where)) { - return false - } - } - return true - } - - validate (where) { - if (!where) { - let valid = true - const authProblems = [] - - for (const entryWhere of this.data.keys()) { - // no need to validate our defaults, we know they're fine - // cli was already validated when parsed the first time - if (entryWhere === 'default' || entryWhere === 'builtin' || entryWhere === 'cli') { - continue - } - const ret = this.validate(entryWhere) - valid = valid && ret - - if (['global', 'user', 'project'].includes(entryWhere)) { - // after validating everything else, we look for old auth configs we no longer support - // if these keys are found, we build up a list of them and the appropriate action and - // attach it as context on the thrown error - - // first, keys that should be removed - for (const key of ['_authtoken', '-authtoken']) { - if (this.get(key, entryWhere)) { - authProblems.push({ action: 'delete', key, where: entryWhere }) - } - } - - // NOTE we pull registry without restricting to the current 'where' because we want to - // suggest scoping things to the registry they would be applied to, which is the default - // regardless of where it was defined - const nerfedReg = nerfDart(this.get('registry')) - // keys that should be nerfed but currently are not - for (const key of ['_auth', '_authToken', 'username', '_password']) { - if (this.get(key, entryWhere)) { - // username and _password must both exist in the same file to be recognized correctly - if (key === 'username' && !this.get('_password', entryWhere)) { - authProblems.push({ action: 'delete', key, where: entryWhere }) - } else if (key === '_password' && !this.get('username', entryWhere)) { - authProblems.push({ action: 'delete', key, where: entryWhere }) - } else { - authProblems.push({ - action: 'rename', - from: key, - to: `${nerfedReg}:${key}`, - where: entryWhere, - }) - } - } - } - } - } - - if (authProblems.length) { - throw new ErrInvalidAuth(authProblems) - } - - return valid - } else { - const obj = this.data.get(where) - obj[_valid] = true - - nopt.invalidHandler = (k, val, type) => - this.invalidHandler(k, val, type, obj.source, where) - - nopt.clean(obj.data, this.types, typeDefs) - - nopt.invalidHandler = null - return obj[_valid] - } - } - - // fixes problems identified by validate(), accepts the 'problems' property from a thrown - // ErrInvalidAuth to avoid having to check everything again - repair (problems) { - if (!problems) { - try { - this.validate() - } catch (err) { - // coverage skipped here because we don't need to test re-throwing an error - // istanbul ignore next - if (err.code !== 'ERR_INVALID_AUTH') { - throw err - } - - problems = err.problems - } finally { - if (!problems) { - problems = [] - } - } - } - - for (const problem of problems) { - // coverage disabled for else branch because it doesn't do anything and shouldn't - // istanbul ignore else - if (problem.action === 'delete') { - this.delete(problem.key, problem.where) - } else if (problem.action === 'rename') { - const raw = this.data.get(problem.where).raw?.[problem.from] - const calculated = this.get(problem.from, problem.where) - this.set(problem.to, raw || calculated, problem.where) - this.delete(problem.from, problem.where) - } - } - } - - // Returns true if the value is coming directly from the source defined - // in default definitions, if the current value for the key config is - // coming from any other different source, returns false - isDefault (key) { - const [defaultType, ...types] = [...confTypes] - const defaultData = this.data.get(defaultType).data - - return hasOwnProperty(defaultData, key) - && types.every(type => { - const typeData = this.data.get(type).data - return !hasOwnProperty(typeData, key) - }) - } - - invalidHandler (k, val, type, source, where) { - log.warn( - 'invalid config', - k + '=' + JSON.stringify(val), - `set in ${source}` - ) - this.data.get(where)[_valid] = false - - if (Array.isArray(type)) { - if (type.includes(typeDefs.url.type)) { - type = typeDefs.url.type - } else { - /* istanbul ignore if - no actual configs matching this, but - * path types SHOULD be handled this way, like URLs, for the - * same reason */ - if (type.includes(typeDefs.path.type)) { - type = typeDefs.path.type - } - } - } - - const typeDesc = typeDescription(type) - const mustBe = typeDesc - .filter(m => m !== undefined && m !== Array) - const msg = 'Must be' + this.#getOneOfKeywords(mustBe, typeDesc) - const desc = mustBe.length === 1 ? mustBe[0] - : [...new Set(mustBe.map(n => typeof n === 'string' ? n : JSON.stringify(n)))].join(', ') - log.warn('invalid config', msg, desc) - } - - #getOneOfKeywords (mustBe, typeDesc) { - let keyword - if (mustBe.length === 1 && typeDesc.includes(Array)) { - keyword = ' one or more' - } else if (mustBe.length > 1 && typeDesc.includes(Array)) { - keyword = ' one or more of:' - } else if (mustBe.length > 1) { - keyword = ' one of:' - } else { - keyword = '' - } - return keyword - } - - #loadObject (obj, where, source, er = null) { - // obj is the raw data read from the file - const conf = this.data.get(where) - if (conf.source) { - const m = `double-loading "${where}" configs from ${source}, ` + - `previously loaded from ${conf.source}` - throw new Error(m) - } - - if (this.sources.has(source)) { - const m = `double-loading config "${source}" as "${where}", ` + - `previously loaded as "${this.sources.get(source)}"` - throw new Error(m) - } - - conf.source = source - this.sources.set(source, where) - if (er) { - conf.loadError = er - if (er.code !== 'ENOENT') { - log.verbose('config', `error loading ${where} config`, er) - } - } else { - conf.raw = obj - for (const [key, value] of Object.entries(obj)) { - const k = envReplace(key, this.env) - const v = this.parseField(value, k) - if (where !== 'default') { - this.#checkDeprecated(k, where, obj, [key, value]) - if (this.definitions[key]?.exclusive) { - for (const exclusive of this.definitions[key].exclusive) { - if (!this.isDefault(exclusive)) { - throw new TypeError(`--${key} can not be provided when using --${exclusive}`) - } - } - } - } - conf.data[k] = v - } - } - } - - #checkDeprecated (key, where, obj, kv) { - // XXX(npm9+) make this throw an error - if (this.deprecated[key]) { - log.warn('config', key, this.deprecated[key]) - } - } - - // Parse a field, coercing it to the best type available. - parseField (f, key, listElement = false) { - return parseField(f, key, this, listElement) - } - - async #loadFile (file, type) { - process.emit('time', 'config:load:file:' + file) - // only catch the error from readFile, not from the loadObject call - await readFile(file, 'utf8').then( - data => { - const parsedConfig = ini.parse(data) - if (type === 'project' && parsedConfig.prefix) { - // Log error if prefix is mentioned in project .npmrc - /* eslint-disable-next-line max-len */ - log.error('config', `prefix cannot be changed from project config: ${file}.`) - } - return this.#loadObject(parsedConfig, type, file) - }, - er => this.#loadObject(null, type, file, er) - ) - process.emit('timeEnd', 'config:load:file:' + file) - } - - loadBuiltinConfig () { - return this.#loadFile(resolve(this.npmPath, 'npmrc'), 'builtin') - } - - async loadProjectConfig () { - // the localPrefix can be set by the CLI config, but otherwise is - // found by walking up the folder tree. either way, we load it before - // we return to make sure localPrefix is set - await this.loadLocalPrefix() - - // if we have not detected a local package json yet, try now that we - // have a local prefix - if (this.localPackage == null) { - this.localPackage = await fileExists(this.localPrefix, 'package.json') - } - - if (this.#get('global') === true || this.#get('location') === 'global') { - this.data.get('project').source = '(global mode enabled, ignored)' - this.sources.set(this.data.get('project').source, 'project') - return - } - - const projectFile = resolve(this.localPrefix, '.npmrc') - // if we're in the ~ directory, and there happens to be a node_modules - // folder (which is not TOO uncommon, it turns out), then we can end - // up loading the "project" config where the "userconfig" will be, - // which causes some calamaties. So, we only load project config if - // it doesn't match what the userconfig will be. - if (projectFile !== this.#get('userconfig')) { - return this.#loadFile(projectFile, 'project') - } else { - this.data.get('project').source = '(same as "user" config, ignored)' - this.sources.set(this.data.get('project').source, 'project') - } - } - - async loadLocalPrefix () { - const cliPrefix = this.#get('prefix', 'cli') - if (cliPrefix) { - this.localPrefix = cliPrefix - return - } - - const cliWorkspaces = this.#get('workspaces', 'cli') - const isGlobal = this.#get('global') || this.#get('location') === 'global' - - for (const p of walkUp(this.cwd)) { - // HACK: this is an option set in tests to stop the local prefix from being set - // on tests that are created inside the npm repo - if (this.excludeNpmCwd && p === this.npmPath) { - break - } - - const hasPackageJson = await fileExists(p, 'package.json') - - if (!this.localPrefix && (hasPackageJson || await dirExists(p, 'node_modules'))) { - this.localPrefix = p - this.localPackage = hasPackageJson - - // if workspaces are disabled, or we're in global mode, return now - if (cliWorkspaces === false || isGlobal) { - return - } - - // otherwise, continue the loop - continue - } - - if (this.localPrefix && hasPackageJson) { - // if we already set localPrefix but this dir has a package.json - // then we need to see if `p` is a workspace root by reading its package.json - // however, if reading it fails then we should just move on - const pkg = await rpj(resolve(p, 'package.json')).catch(() => false) - if (!pkg) { - continue - } - - const workspaces = await mapWorkspaces({ cwd: p, pkg }) - for (const w of workspaces.values()) { - if (w === this.localPrefix) { - // see if there's a .npmrc file in the workspace, if so log a warning - if (await fileExists(this.localPrefix, '.npmrc')) { - log.warn(`ignoring workspace config at ${this.localPrefix}/.npmrc`) - } - - // set the workspace in the default layer, which allows it to be overridden easily - const { data } = this.data.get('default') - data.workspace = [this.localPrefix] - this.localPrefix = p - this.localPackage = hasPackageJson - log.info(`found workspace root at ${this.localPrefix}`) - // we found a root, so we return now - return - } - } - } - } - - if (!this.localPrefix) { - this.localPrefix = this.cwd - } - } - - loadUserConfig () { - return this.#loadFile(this.#get('userconfig'), 'user') - } - - loadGlobalConfig () { - return this.#loadFile(this.#get('globalconfig'), 'global') - } - - async save (where) { - if (!this.loaded) { - throw new Error('call config.load() before saving') - } - if (!confFileTypes.has(where)) { - throw new Error('invalid config location param: ' + where) - } - - const conf = this.data.get(where) - conf[_loadError] = null - - if (where === 'user') { - // if email is nerfed, then we want to de-nerf it - const nerfed = nerfDart(this.get('registry')) - const email = this.get(`${nerfed}:email`, 'user') - if (email) { - this.delete(`${nerfed}:email`, 'user') - this.set('email', email, 'user') - } - } - - // We need the actual raw data before we called parseField so that we are - // saving the same content back to the file - const iniData = ini.stringify(conf.raw).trim() + '\n' - if (!iniData.trim()) { - // ignore the unlink error (eg, if file doesn't exist) - await unlink(conf.source).catch(er => {}) - return - } - const dir = dirname(conf.source) - await mkdir(dir, { recursive: true }) - await writeFile(conf.source, iniData, 'utf8') - const mode = where === 'user' ? 0o600 : 0o666 - await chmod(conf.source, mode) - } - - clearCredentialsByURI (uri, level = 'user') { - const nerfed = nerfDart(uri) - const def = nerfDart(this.get('registry')) - if (def === nerfed) { - this.delete(`-authtoken`, level) - this.delete(`_authToken`, level) - this.delete(`_authtoken`, level) - this.delete(`_auth`, level) - this.delete(`_password`, level) - this.delete(`username`, level) - // de-nerf email if it's nerfed to the default registry - const email = this.get(`${nerfed}:email`, level) - if (email) { - this.set('email', email, level) - } - } - this.delete(`${nerfed}:_authToken`, level) - this.delete(`${nerfed}:_auth`, level) - this.delete(`${nerfed}:_password`, level) - this.delete(`${nerfed}:username`, level) - this.delete(`${nerfed}:email`, level) - this.delete(`${nerfed}:certfile`, level) - this.delete(`${nerfed}:keyfile`, level) - } - - setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) { - const nerfed = nerfDart(uri) - - // email is either provided, a top level key, or nothing - email = email || this.get('email', 'user') - - // field that hasn't been used as documented for a LONG time, - // and as of npm 7.10.0, isn't used at all. We just always - // send auth if we have it, only to the URIs under the nerf dart. - this.delete(`${nerfed}:always-auth`, 'user') - - this.delete(`${nerfed}:email`, 'user') - if (certfile && keyfile) { - this.set(`${nerfed}:certfile`, certfile, 'user') - this.set(`${nerfed}:keyfile`, keyfile, 'user') - // cert/key may be used in conjunction with other credentials, thus no `else` - } - if (token) { - this.set(`${nerfed}:_authToken`, token, 'user') - this.delete(`${nerfed}:_password`, 'user') - this.delete(`${nerfed}:username`, 'user') - } else if (username || password) { - if (!username) { - throw new Error('must include username') - } - if (!password) { - throw new Error('must include password') - } - this.delete(`${nerfed}:_authToken`, 'user') - this.set(`${nerfed}:username`, username, 'user') - // note: not encrypted, no idea why we bothered to do this, but oh well - // protects against shoulder-hacks if password is memorable, I guess? - const encoded = Buffer.from(password, 'utf8').toString('base64') - this.set(`${nerfed}:_password`, encoded, 'user') - } else if (!certfile || !keyfile) { - throw new Error('No credentials to set.') - } - } - - // this has to be a bit more complicated to support legacy data of all forms - getCredentialsByURI (uri) { - const nerfed = nerfDart(uri) - const def = nerfDart(this.get('registry')) - const creds = {} - - // email is handled differently, it used to always be nerfed and now it never should be - // if it's set nerfed to the default registry, then we copy it to the unnerfed key - // TODO: evaluate removing 'email' from the credentials object returned here - const email = this.get(`${nerfed}:email`) || this.get('email') - if (email) { - if (nerfed === def) { - this.set('email', email, 'user') - } - creds.email = email - } - - const certfileReg = this.get(`${nerfed}:certfile`) - const keyfileReg = this.get(`${nerfed}:keyfile`) - if (certfileReg && keyfileReg) { - creds.certfile = certfileReg - creds.keyfile = keyfileReg - // cert/key may be used in conjunction with other credentials, thus no `return` - } - - const tokenReg = this.get(`${nerfed}:_authToken`) - if (tokenReg) { - creds.token = tokenReg - return creds - } - - const userReg = this.get(`${nerfed}:username`) - const passReg = this.get(`${nerfed}:_password`) - if (userReg && passReg) { - creds.username = userReg - creds.password = Buffer.from(passReg, 'base64').toString('utf8') - const auth = `${creds.username}:${creds.password}` - creds.auth = Buffer.from(auth, 'utf8').toString('base64') - return creds - } - - const authReg = this.get(`${nerfed}:_auth`) - if (authReg) { - const authDecode = Buffer.from(authReg, 'base64').toString('utf8') - const authSplit = authDecode.split(':') - creds.username = authSplit.shift() - creds.password = authSplit.join(':') - creds.auth = authReg - return creds - } - - // at this point, nothing else is usable so just return what we do have - return creds - } - - // set up the environment object we have with npm_config_* environs - // for all configs that are different from their default values, and - // set EDITOR and HOME. - setEnvs () { - setEnvs(this) - } -} - -const _loadError = Symbol('loadError') -const _valid = Symbol('valid') - -class ConfigData { - #data - #source = null - #raw = null - constructor (parent) { - this.#data = Object.create(parent && parent.data) - this.#raw = {} - this[_valid] = true - } - - get data () { - return this.#data - } - - get valid () { - return this[_valid] - } - - set source (s) { - if (this.#source) { - throw new Error('cannot set ConfigData source more than once') - } - this.#source = s - } - - get source () { - return this.#source - } - - set loadError (e) { - if (this[_loadError] || (Object.keys(this.#raw).length)) { - throw new Error('cannot set ConfigData loadError after load') - } - this[_loadError] = e - } - - get loadError () { - return this[_loadError] - } - - set raw (r) { - if (Object.keys(this.#raw).length || this[_loadError]) { - throw new Error('cannot set ConfigData raw after load') - } - this.#raw = r - } - - get raw () { - return this.#raw - } -} - -module.exports = Config diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/nerf-dart.js b/node_modules/npm/node_modules/@npmcli/config/lib/nerf-dart.js deleted file mode 100644 index d6ae4aa..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/nerf-dart.js +++ /dev/null @@ -1,18 +0,0 @@ -const { URL } = require('url') - -/** - * Maps a URL to an identifier. - * - * Name courtesy schiffertronix media LLC, a New Jersey corporation - * - * @param {String} uri The URL to be nerfed. - * - * @returns {String} A nerfed URL. - */ -module.exports = (url) => { - const parsed = new URL(url) - const from = `${parsed.protocol}//${parsed.host}${parsed.pathname}` - const rel = new URL('.', from) - const res = `//${rel.host}${rel.pathname}` - return res -} diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/parse-field.js b/node_modules/npm/node_modules/@npmcli/config/lib/parse-field.js deleted file mode 100644 index 099b0b4..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/parse-field.js +++ /dev/null @@ -1,86 +0,0 @@ -// Parse a field, coercing it to the best type available. -const typeDefs = require('./type-defs.js') -const envReplace = require('./env-replace.js') -const { resolve } = require('path') - -const { parse: umaskParse } = require('./umask.js') - -const parseField = (f, key, opts, listElement = false) => { - if (typeof f !== 'string' && !Array.isArray(f)) { - return f - } - - const { platform, types, home, env } = opts - - // type can be array or a single thing. coerce to array. - const typeList = new Set([].concat(types[key])) - const isPath = typeList.has(typeDefs.path.type) - const isBool = typeList.has(typeDefs.Boolean.type) - const isString = isPath || typeList.has(typeDefs.String.type) - const isUmask = typeList.has(typeDefs.Umask.type) - const isNumber = typeList.has(typeDefs.Number.type) - const isList = !listElement && typeList.has(Array) - const isDate = typeList.has(typeDefs.Date.type) - - if (Array.isArray(f)) { - return !isList ? f : f.map(field => parseField(field, key, opts, true)) - } - - // now we know it's a string - f = f.trim() - - // list types get put in the environment separated by double-\n - // usually a single \n would suffice, but ca/cert configs can contain - // line breaks and multiple entries. - if (isList) { - return parseField(f.split('\n\n'), key, opts) - } - - // --foo is like --foo=true for boolean types - if (isBool && !isString && f === '') { - return true - } - - // string types can be the string 'true', 'false', etc. - // otherwise, parse these values out - if (!isString && !isPath && !isNumber) { - switch (f) { - case 'true': return true - case 'false': return false - case 'null': return null - case 'undefined': return undefined - } - } - - f = envReplace(f, env) - - if (isDate) { - return new Date(f) - } - - if (isPath) { - const homePattern = platform === 'win32' ? /^~(\/|\\)/ : /^~\// - if (homePattern.test(f) && home) { - f = resolve(home, f.slice(2)) - } else { - f = resolve(f) - } - } - - if (isUmask) { - try { - return umaskParse(f) - } catch (er) { - // let it warn later when we validate - return f - } - } - - if (isNumber && !isNaN(f)) { - f = +f - } - - return f -} - -module.exports = parseField diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/set-envs.js b/node_modules/npm/node_modules/@npmcli/config/lib/set-envs.js deleted file mode 100644 index b6f5a30..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/set-envs.js +++ /dev/null @@ -1,108 +0,0 @@ -// Set environment variables for any non-default configs, -// so that they're already there when we run lifecycle scripts. -// -// See https://github.com/npm/rfcs/pull/90 - -// Return the env key if this is a thing that belongs in the env. -// Ie, if the key isn't a @scope, //nerf.dart, or _private, -// and the value is a string or array. Otherwise return false. -const envKey = (key, val) => { - return !/^[/@_]/.test(key) && - (typeof envVal(val) === 'string') && - `npm_config_${key.replace(/-/g, '_').toLowerCase()}` -} - -const envVal = val => Array.isArray(val) ? val.map(v => envVal(v)).join('\n\n') - : val === null || val === undefined || val === false ? '' - : typeof val === 'object' ? null - : String(val) - -const sameConfigValue = (def, val) => - !Array.isArray(val) || !Array.isArray(def) ? def === val - : sameArrayValue(def, val) - -const sameArrayValue = (def, val) => { - if (def.length !== val.length) { - return false - } - - for (let i = 0; i < def.length; i++) { - /* istanbul ignore next - there are no array configs where the default - * is not an empty array, so this loop is a no-op, but it's the correct - * thing to do if we ever DO add a config like that. */ - if (def[i] !== val[i]) { - return false - } - } - return true -} - -const setEnv = (env, rawKey, rawVal) => { - const val = envVal(rawVal) - const key = envKey(rawKey, val) - if (key && val !== null) { - env[key] = val - } -} - -const setEnvs = (config) => { - // This ensures that all npm config values that are not the defaults are - // shared appropriately with child processes, without false positives. - const { - env, - defaults, - definitions, - list: [cliConf, envConf], - } = config - - env.INIT_CWD = process.cwd() - - // if the key is deprecated, skip it always. - // if the key is the default value, - // if the environ is NOT the default value, - // set the environ - // else skip it, it's fine - // if the key is NOT the default value, - // if the env is setting it, then leave it (already set) - // otherwise, set the env - const cliSet = new Set(Object.keys(cliConf)) - const envSet = new Set(Object.keys(envConf)) - for (const key in cliConf) { - const { deprecated, envExport = true } = definitions[key] || {} - if (deprecated || envExport === false) { - continue - } - - if (sameConfigValue(defaults[key], cliConf[key])) { - // config is the default, if the env thought different, then we - // have to set it BACK to the default in the environment. - if (!sameConfigValue(envConf[key], cliConf[key])) { - setEnv(env, key, cliConf[key]) - } - } else { - // config is not the default. if the env wasn't the one to set - // it that way, then we have to put it in the env - if (!(envSet.has(key) && !cliSet.has(key))) { - setEnv(env, key, cliConf[key]) - } - } - } - - // also set some other common nice envs that we want to rely on - env.HOME = config.home - env.npm_config_global_prefix = config.globalPrefix - env.npm_config_local_prefix = config.localPrefix - if (cliConf.editor) { - env.EDITOR = cliConf.editor - } - - // note: this doesn't afect the *current* node process, of course, since - // it's already started, but it does affect the options passed to scripts. - if (cliConf['node-options']) { - env.NODE_OPTIONS = cliConf['node-options'] - } - env.npm_execpath = config.npmBin - env.NODE = env.npm_node_execpath = config.execPath -} - -module.exports = setEnvs diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/type-defs.js b/node_modules/npm/node_modules/@npmcli/config/lib/type-defs.js deleted file mode 100644 index 20a827c..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/type-defs.js +++ /dev/null @@ -1,59 +0,0 @@ -const nopt = require('nopt') - -const { Umask, validate: validateUmask } = require('./umask.js') - -const semver = require('semver') -const validateSemver = (data, k, val) => { - const valid = semver.valid(val) - if (!valid) { - return false - } - data[k] = valid -} - -const noptValidatePath = nopt.typeDefs.path.validate -const validatePath = (data, k, val) => { - if (typeof val !== 'string') { - return false - } - return noptValidatePath(data, k, val) -} - -// add descriptions so we can validate more usefully -module.exports = { - ...nopt.typeDefs, - semver: { - type: semver, - validate: validateSemver, - description: 'full valid SemVer string', - }, - Umask: { - type: Umask, - validate: validateUmask, - description: 'octal number in range 0o000..0o777 (0..511)', - }, - url: { - ...nopt.typeDefs.url, - description: 'full url with "http://"', - }, - path: { - ...nopt.typeDefs.path, - validate: validatePath, - description: 'valid filesystem path', - }, - Number: { - ...nopt.typeDefs.Number, - description: 'numeric value', - }, - Boolean: { - ...nopt.typeDefs.Boolean, - description: 'boolean value (true or false)', - }, - Date: { - ...nopt.typeDefs.Date, - description: 'valid Date string', - }, -} - -// TODO: make nopt less of a global beast so this kludge isn't necessary -nopt.typeDefs = module.exports diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/type-description.js b/node_modules/npm/node_modules/@npmcli/config/lib/type-description.js deleted file mode 100644 index f5e0d16..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/type-description.js +++ /dev/null @@ -1,21 +0,0 @@ -// return the description of the valid values of a field -// returns a string for one thing, or an array of descriptions -const typeDefs = require('./type-defs.js') -const typeDescription = t => { - if (!t || typeof t !== 'function' && typeof t !== 'object') { - return t - } - - if (Array.isArray(t)) { - return t.map(t => typeDescription(t)) - } - - for (const { type, description } of Object.values(typeDefs)) { - if (type === t) { - return description || type - } - } - - return t -} -module.exports = t => [].concat(typeDescription(t)).filter(t => t !== undefined) diff --git a/node_modules/npm/node_modules/@npmcli/config/lib/umask.js b/node_modules/npm/node_modules/@npmcli/config/lib/umask.js deleted file mode 100644 index 4d9ebbd..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/lib/umask.js +++ /dev/null @@ -1,36 +0,0 @@ -class Umask {} -const parse = val => { - // this is run via nopt and parse field where everything is - // converted to a string first, ignoring coverage for now - // instead of figuring out what is happening under the hood in nopt - // istanbul ignore else - if (typeof val === 'string') { - if (/^0o?[0-7]+$/.test(val)) { - return parseInt(val.replace(/^0o?/, ''), 8) - } else if (/^[1-9][0-9]*$/.test(val)) { - return parseInt(val, 10) - } else { - throw new Error(`invalid umask value: ${val}`) - } - } else { - if (typeof val !== 'number') { - throw new Error(`invalid umask value: ${val}`) - } - val = Math.floor(val) - if (val < 0 || val > 511) { - throw new Error(`invalid umask value: ${val}`) - } - return val - } -} - -const validate = (data, k, val) => { - try { - data[k] = parse(val) - return true - } catch (er) { - return false - } -} - -module.exports = { Umask, parse, validate } diff --git a/node_modules/npm/node_modules/@npmcli/config/package.json b/node_modules/npm/node_modules/@npmcli/config/package.json deleted file mode 100644 index 39fc88b..0000000 --- a/node_modules/npm/node_modules/@npmcli/config/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@npmcli/config", - "version": "8.0.3", - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "description": "Configuration management for the npm cli", - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/config" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/mock-globals": "^1.0.0", - "@npmcli/template-oss": "4.21.3", - "tap": "^16.3.8" - }, - "dependencies": { - "@npmcli/map-workspaces": "^3.0.2", - "ci-info": "^4.0.0", - "ini": "^4.1.0", - "nopt": "^7.0.0", - "proc-log": "^3.0.0", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.5", - "walk-up-path": "^3.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/LICENSE b/node_modules/npm/node_modules/@npmcli/disparity-colors/LICENSE deleted file mode 100644 index dedcd7d..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/lib/index.js b/node_modules/npm/node_modules/@npmcli/disparity-colors/lib/index.js deleted file mode 100644 index 3d2aa56..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/lib/index.js +++ /dev/null @@ -1,34 +0,0 @@ -const ansi = require('ansi-styles') - -const colors = { - removed: ansi.red, - added: ansi.green, - header: ansi.yellow, - section: ansi.magenta, -} - -function colorize (str, opts) { - let headerLength = (opts || {}).headerLength - if (typeof headerLength !== 'number' || Number.isNaN(headerLength)) { - headerLength = 2 - } - - const color = (colorStr, colorId) => { - const { open, close } = colors[colorId] - // avoid highlighting the "\n" (would highlight till the end of the line) - return colorStr.replace(/[^\n\r]+/g, open + '$&' + close) - } - - // this RegExp will include all the `\n` chars into the lines, easier to join - const lines = ((typeof str === 'string' && str) || '').split(/^/m) - - const start = color(lines.slice(0, headerLength).join(''), 'header') - const end = lines.slice(headerLength).join('') - .replace(/^-.*/gm, color('$&', 'removed')) - .replace(/^\+.*/gm, color('$&', 'added')) - .replace(/^@@.+@@/gm, color('$&', 'section')) - - return start + end -} - -module.exports = colorize diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js b/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -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 = require('color-convert'); - } - - 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 -}); diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license b/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json b/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json deleted file mode 100644 index 7539328..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "4.3.0", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^2.0.1" - }, - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/disparity-colors/package.json b/node_modules/npm/node_modules/@npmcli/disparity-colors/package.json deleted file mode 100644 index 17eb484..0000000 --- a/node_modules/npm/node_modules/@npmcli/disparity-colors/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@npmcli/disparity-colors", - "version": "3.0.0", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "description": "Colorizes unified diff output", - "repository": { - "type": "git", - "url": "https://github.com/npm/disparity-colors.git" - }, - "keywords": [ - "disparity", - "npm", - "npmcli", - "diff", - "char", - "unified", - "multiline", - "string", - "color", - "ansi", - "terminal", - "cli", - "tty" - ], - "author": "GitHub Inc.", - "contributors": [ - { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com", - "twitter": "ruyadorno" - } - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.js\"", - "pretest": "npm run lint", - "test": "tap", - "snap": "tap", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", - "tap": "^16.0.1" - }, - "dependencies": { - "ansi-styles": "^4.3.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/fs/LICENSE.md b/node_modules/npm/node_modules/@npmcli/fs/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/common/get-options.js b/node_modules/npm/node_modules/@npmcli/fs/lib/common/get-options.js deleted file mode 100644 index cb5982f..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/common/get-options.js +++ /dev/null @@ -1,20 +0,0 @@ -// given an input that may or may not be an object, return an object that has -// a copy of every defined property listed in 'copy'. if the input is not an -// object, assign it to the property named by 'wrap' -const getOptions = (input, { copy, wrap }) => { - const result = {} - - if (input && typeof input === 'object') { - for (const prop of copy) { - if (input[prop] !== undefined) { - result[prop] = input[prop] - } - } - } else { - result[wrap] = input - } - - return result -} - -module.exports = getOptions diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/common/node.js b/node_modules/npm/node_modules/@npmcli/fs/lib/common/node.js deleted file mode 100644 index 4d13bc0..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/common/node.js +++ /dev/null @@ -1,9 +0,0 @@ -const semver = require('semver') - -const satisfies = (range) => { - return semver.satisfies(process.version, range, { includePrerelease: true }) -} - -module.exports = { - satisfies, -} diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/LICENSE b/node_modules/npm/node_modules/@npmcli/fs/lib/cp/LICENSE deleted file mode 100644 index 93546df..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -(The MIT License) - -Copyright (c) 2011-2017 JP Richardson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files -(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/errors.js b/node_modules/npm/node_modules/@npmcli/fs/lib/cp/errors.js deleted file mode 100644 index 1cd1e05..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/errors.js +++ /dev/null @@ -1,129 +0,0 @@ -'use strict' -const { inspect } = require('util') - -// adapted from node's internal/errors -// https://github.com/nodejs/node/blob/c8a04049/lib/internal/errors.js - -// close copy of node's internal SystemError class. -class SystemError { - constructor (code, prefix, context) { - // XXX context.code is undefined in all constructors used in cp/polyfill - // that may be a bug copied from node, maybe the constructor should use - // `code` not `errno`? nodejs/node#41104 - let message = `${prefix}: ${context.syscall} returned ` + - `${context.code} (${context.message})` - - if (context.path !== undefined) { - message += ` ${context.path}` - } - if (context.dest !== undefined) { - message += ` => ${context.dest}` - } - - this.code = code - Object.defineProperties(this, { - name: { - value: 'SystemError', - enumerable: false, - writable: true, - configurable: true, - }, - message: { - value: message, - enumerable: false, - writable: true, - configurable: true, - }, - info: { - value: context, - enumerable: true, - configurable: true, - writable: false, - }, - errno: { - get () { - return context.errno - }, - set (value) { - context.errno = value - }, - enumerable: true, - configurable: true, - }, - syscall: { - get () { - return context.syscall - }, - set (value) { - context.syscall = value - }, - enumerable: true, - configurable: true, - }, - }) - - if (context.path !== undefined) { - Object.defineProperty(this, 'path', { - get () { - return context.path - }, - set (value) { - context.path = value - }, - enumerable: true, - configurable: true, - }) - } - - if (context.dest !== undefined) { - Object.defineProperty(this, 'dest', { - get () { - return context.dest - }, - set (value) { - context.dest = value - }, - enumerable: true, - configurable: true, - }) - } - } - - toString () { - return `${this.name} [${this.code}]: ${this.message}` - } - - [Symbol.for('nodejs.util.inspect.custom')] (_recurseTimes, ctx) { - return inspect(this, { - ...ctx, - getters: true, - customInspect: false, - }) - } -} - -function E (code, message) { - module.exports[code] = class NodeError extends SystemError { - constructor (ctx) { - super(code, message, ctx) - } - } -} - -E('ERR_FS_CP_DIR_TO_NON_DIR', 'Cannot overwrite directory with non-directory') -E('ERR_FS_CP_EEXIST', 'Target already exists') -E('ERR_FS_CP_EINVAL', 'Invalid src or dest') -E('ERR_FS_CP_FIFO_PIPE', 'Cannot copy a FIFO pipe') -E('ERR_FS_CP_NON_DIR_TO_DIR', 'Cannot overwrite non-directory with directory') -E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file') -E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self') -E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type') -E('ERR_FS_EISDIR', 'Path is a directory') - -module.exports.ERR_INVALID_ARG_TYPE = class ERR_INVALID_ARG_TYPE extends Error { - constructor (name, expected, actual) { - super() - this.code = 'ERR_INVALID_ARG_TYPE' - this.message = `The ${name} argument must be ${expected}. Received ${typeof actual}` - } -} diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/index.js b/node_modules/npm/node_modules/@npmcli/fs/lib/cp/index.js deleted file mode 100644 index 972ce7a..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/index.js +++ /dev/null @@ -1,22 +0,0 @@ -const fs = require('fs/promises') -const getOptions = require('../common/get-options.js') -const node = require('../common/node.js') -const polyfill = require('./polyfill.js') - -// node 16.7.0 added fs.cp -const useNative = node.satisfies('>=16.7.0') - -const cp = async (src, dest, opts) => { - const options = getOptions(opts, { - copy: ['dereference', 'errorOnExist', 'filter', 'force', 'preserveTimestamps', 'recursive'], - }) - - // the polyfill is tested separately from this module, no need to hack - // process.version to try to trigger it just for coverage - // istanbul ignore next - return useNative - ? fs.cp(src, dest, options) - : polyfill(src, dest, options) -} - -module.exports = cp diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/polyfill.js b/node_modules/npm/node_modules/@npmcli/fs/lib/cp/polyfill.js deleted file mode 100644 index 80eb10d..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/cp/polyfill.js +++ /dev/null @@ -1,428 +0,0 @@ -// this file is a modified version of the code in node 17.2.0 -// which is, in turn, a modified version of the fs-extra module on npm -// node core changes: -// - Use of the assert module has been replaced with core's error system. -// - All code related to the glob dependency has been removed. -// - Bring your own custom fs module is not currently supported. -// - Some basic code cleanup. -// changes here: -// - remove all callback related code -// - drop sync support -// - change assertions back to non-internal methods (see options.js) -// - throws ENOTDIR when rmdir gets an ENOENT for a path that exists in Windows -'use strict' - -const { - ERR_FS_CP_DIR_TO_NON_DIR, - ERR_FS_CP_EEXIST, - ERR_FS_CP_EINVAL, - ERR_FS_CP_FIFO_PIPE, - ERR_FS_CP_NON_DIR_TO_DIR, - ERR_FS_CP_SOCKET, - ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY, - ERR_FS_CP_UNKNOWN, - ERR_FS_EISDIR, - ERR_INVALID_ARG_TYPE, -} = require('./errors.js') -const { - constants: { - errno: { - EEXIST, - EISDIR, - EINVAL, - ENOTDIR, - }, - }, -} = require('os') -const { - chmod, - copyFile, - lstat, - mkdir, - readdir, - readlink, - stat, - symlink, - unlink, - utimes, -} = require('fs/promises') -const { - dirname, - isAbsolute, - join, - parse, - resolve, - sep, - toNamespacedPath, -} = require('path') -const { fileURLToPath } = require('url') - -const defaultOptions = { - dereference: false, - errorOnExist: false, - filter: undefined, - force: true, - preserveTimestamps: false, - recursive: false, -} - -async function cp (src, dest, opts) { - if (opts != null && typeof opts !== 'object') { - throw new ERR_INVALID_ARG_TYPE('options', ['Object'], opts) - } - return cpFn( - toNamespacedPath(getValidatedPath(src)), - toNamespacedPath(getValidatedPath(dest)), - { ...defaultOptions, ...opts }) -} - -function getValidatedPath (fileURLOrPath) { - const path = fileURLOrPath != null && fileURLOrPath.href - && fileURLOrPath.origin - ? fileURLToPath(fileURLOrPath) - : fileURLOrPath - return path -} - -async function cpFn (src, dest, opts) { - // Warn about using preserveTimestamps on 32-bit node - // istanbul ignore next - if (opts.preserveTimestamps && process.arch === 'ia32') { - const warning = 'Using the preserveTimestamps option in 32-bit ' + - 'node is not recommended' - process.emitWarning(warning, 'TimestampPrecisionWarning') - } - const stats = await checkPaths(src, dest, opts) - const { srcStat, destStat } = stats - await checkParentPaths(src, srcStat, dest) - if (opts.filter) { - return handleFilter(checkParentDir, destStat, src, dest, opts) - } - return checkParentDir(destStat, src, dest, opts) -} - -async function checkPaths (src, dest, opts) { - const { 0: srcStat, 1: destStat } = await getStats(src, dest, opts) - if (destStat) { - if (areIdentical(srcStat, destStat)) { - throw new ERR_FS_CP_EINVAL({ - message: 'src and dest cannot be the same', - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - if (srcStat.isDirectory() && !destStat.isDirectory()) { - throw new ERR_FS_CP_DIR_TO_NON_DIR({ - message: `cannot overwrite directory ${src} ` + - `with non-directory ${dest}`, - path: dest, - syscall: 'cp', - errno: EISDIR, - }) - } - if (!srcStat.isDirectory() && destStat.isDirectory()) { - throw new ERR_FS_CP_NON_DIR_TO_DIR({ - message: `cannot overwrite non-directory ${src} ` + - `with directory ${dest}`, - path: dest, - syscall: 'cp', - errno: ENOTDIR, - }) - } - } - - if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${src} to a subdirectory of self ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return { srcStat, destStat } -} - -function areIdentical (srcStat, destStat) { - return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && - destStat.dev === srcStat.dev -} - -function getStats (src, dest, opts) { - const statFunc = opts.dereference ? - (file) => stat(file, { bigint: true }) : - (file) => lstat(file, { bigint: true }) - return Promise.all([ - statFunc(src), - statFunc(dest).catch((err) => { - // istanbul ignore next: unsure how to cover. - if (err.code === 'ENOENT') { - return null - } - // istanbul ignore next: unsure how to cover. - throw err - }), - ]) -} - -async function checkParentDir (destStat, src, dest, opts) { - const destParent = dirname(dest) - const dirExists = await pathExists(destParent) - if (dirExists) { - return getStatsForCopy(destStat, src, dest, opts) - } - await mkdir(destParent, { recursive: true }) - return getStatsForCopy(destStat, src, dest, opts) -} - -function pathExists (dest) { - return stat(dest).then( - () => true, - // istanbul ignore next: not sure when this would occur - (err) => (err.code === 'ENOENT' ? false : Promise.reject(err))) -} - -// Recursively check if dest parent is a subdirectory of src. -// It works for all file types including symlinks since it -// checks the src and dest inodes. It starts from the deepest -// parent and stops once it reaches the src parent or the root path. -async function checkParentPaths (src, srcStat, dest) { - const srcParent = resolve(dirname(src)) - const destParent = resolve(dirname(dest)) - if (destParent === srcParent || destParent === parse(destParent).root) { - return - } - let destStat - try { - destStat = await stat(destParent, { bigint: true }) - } catch (err) { - // istanbul ignore else: not sure when this would occur - if (err.code === 'ENOENT') { - return - } - // istanbul ignore next: not sure when this would occur - throw err - } - if (areIdentical(srcStat, destStat)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${src} to a subdirectory of self ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return checkParentPaths(src, srcStat, destParent) -} - -const normalizePathToArray = (path) => - resolve(path).split(sep).filter(Boolean) - -// Return true if dest is a subdir of src, otherwise false. -// It only checks the path strings. -function isSrcSubdir (src, dest) { - const srcArr = normalizePathToArray(src) - const destArr = normalizePathToArray(dest) - return srcArr.every((cur, i) => destArr[i] === cur) -} - -async function handleFilter (onInclude, destStat, src, dest, opts, cb) { - const include = await opts.filter(src, dest) - if (include) { - return onInclude(destStat, src, dest, opts, cb) - } -} - -function startCopy (destStat, src, dest, opts) { - if (opts.filter) { - return handleFilter(getStatsForCopy, destStat, src, dest, opts) - } - return getStatsForCopy(destStat, src, dest, opts) -} - -async function getStatsForCopy (destStat, src, dest, opts) { - const statFn = opts.dereference ? stat : lstat - const srcStat = await statFn(src) - // istanbul ignore else: can't portably test FIFO - if (srcStat.isDirectory() && opts.recursive) { - return onDir(srcStat, destStat, src, dest, opts) - } else if (srcStat.isDirectory()) { - throw new ERR_FS_EISDIR({ - message: `${src} is a directory (not copied)`, - path: src, - syscall: 'cp', - errno: EINVAL, - }) - } else if (srcStat.isFile() || - srcStat.isCharacterDevice() || - srcStat.isBlockDevice()) { - return onFile(srcStat, destStat, src, dest, opts) - } else if (srcStat.isSymbolicLink()) { - return onLink(destStat, src, dest) - } else if (srcStat.isSocket()) { - throw new ERR_FS_CP_SOCKET({ - message: `cannot copy a socket file: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } else if (srcStat.isFIFO()) { - throw new ERR_FS_CP_FIFO_PIPE({ - message: `cannot copy a FIFO pipe: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - // istanbul ignore next: should be unreachable - throw new ERR_FS_CP_UNKNOWN({ - message: `cannot copy an unknown file type: ${dest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) -} - -function onFile (srcStat, destStat, src, dest, opts) { - if (!destStat) { - return _copyFile(srcStat, src, dest, opts) - } - return mayCopyFile(srcStat, src, dest, opts) -} - -async function mayCopyFile (srcStat, src, dest, opts) { - if (opts.force) { - await unlink(dest) - return _copyFile(srcStat, src, dest, opts) - } else if (opts.errorOnExist) { - throw new ERR_FS_CP_EEXIST({ - message: `${dest} already exists`, - path: dest, - syscall: 'cp', - errno: EEXIST, - }) - } -} - -async function _copyFile (srcStat, src, dest, opts) { - await copyFile(src, dest) - if (opts.preserveTimestamps) { - return handleTimestampsAndMode(srcStat.mode, src, dest) - } - return setDestMode(dest, srcStat.mode) -} - -async function handleTimestampsAndMode (srcMode, src, dest) { - // Make sure the file is writable before setting the timestamp - // otherwise open fails with EPERM when invoked with 'r+' - // (through utimes call) - if (fileIsNotWritable(srcMode)) { - await makeFileWritable(dest, srcMode) - return setDestTimestampsAndMode(srcMode, src, dest) - } - return setDestTimestampsAndMode(srcMode, src, dest) -} - -function fileIsNotWritable (srcMode) { - return (srcMode & 0o200) === 0 -} - -function makeFileWritable (dest, srcMode) { - return setDestMode(dest, srcMode | 0o200) -} - -async function setDestTimestampsAndMode (srcMode, src, dest) { - await setDestTimestamps(src, dest) - return setDestMode(dest, srcMode) -} - -function setDestMode (dest, srcMode) { - return chmod(dest, srcMode) -} - -async function setDestTimestamps (src, dest) { - // The initial srcStat.atime cannot be trusted - // because it is modified by the read(2) system call - // (See https://nodejs.org/api/fs.html#fs_stat_time_values) - const updatedSrcStat = await stat(src) - return utimes(dest, updatedSrcStat.atime, updatedSrcStat.mtime) -} - -function onDir (srcStat, destStat, src, dest, opts) { - if (!destStat) { - return mkDirAndCopy(srcStat.mode, src, dest, opts) - } - return copyDir(src, dest, opts) -} - -async function mkDirAndCopy (srcMode, src, dest, opts) { - await mkdir(dest) - await copyDir(src, dest, opts) - return setDestMode(dest, srcMode) -} - -async function copyDir (src, dest, opts) { - const dir = await readdir(src) - for (let i = 0; i < dir.length; i++) { - const item = dir[i] - const srcItem = join(src, item) - const destItem = join(dest, item) - const { destStat } = await checkPaths(srcItem, destItem, opts) - await startCopy(destStat, srcItem, destItem, opts) - } -} - -async function onLink (destStat, src, dest) { - let resolvedSrc = await readlink(src) - if (!isAbsolute(resolvedSrc)) { - resolvedSrc = resolve(dirname(src), resolvedSrc) - } - if (!destStat) { - return symlink(resolvedSrc, dest) - } - let resolvedDest - try { - resolvedDest = await readlink(dest) - } catch (err) { - // Dest exists and is a regular file or directory, - // Windows may throw UNKNOWN error. If dest already exists, - // fs throws error anyway, so no need to guard against it here. - // istanbul ignore next: can only test on windows - if (err.code === 'EINVAL' || err.code === 'UNKNOWN') { - return symlink(resolvedSrc, dest) - } - // istanbul ignore next: should not be possible - throw err - } - if (!isAbsolute(resolvedDest)) { - resolvedDest = resolve(dirname(dest), resolvedDest) - } - if (isSrcSubdir(resolvedSrc, resolvedDest)) { - throw new ERR_FS_CP_EINVAL({ - message: `cannot copy ${resolvedSrc} to a subdirectory of self ` + - `${resolvedDest}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - // Do not copy if src is a subdir of dest since unlinking - // dest in this case would result in removing src contents - // and therefore a broken symlink would be created. - const srcStat = await stat(src) - if (srcStat.isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) { - throw new ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY({ - message: `cannot overwrite ${resolvedDest} with ${resolvedSrc}`, - path: dest, - syscall: 'cp', - errno: EINVAL, - }) - } - return copyLink(resolvedSrc, dest) -} - -async function copyLink (resolvedSrc, dest) { - await unlink(dest) - return symlink(resolvedSrc, dest) -} - -module.exports = cp diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/index.js b/node_modules/npm/node_modules/@npmcli/fs/lib/index.js deleted file mode 100644 index 81c7463..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -const cp = require('./cp/index.js') -const withTempDir = require('./with-temp-dir.js') -const readdirScoped = require('./readdir-scoped.js') -const moveFile = require('./move-file.js') - -module.exports = { - cp, - withTempDir, - readdirScoped, - moveFile, -} diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js b/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js deleted file mode 100644 index d56e06d..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/move-file.js +++ /dev/null @@ -1,78 +0,0 @@ -const { dirname, join, resolve, relative, isAbsolute } = require('path') -const fs = require('fs/promises') - -const pathExists = async path => { - try { - await fs.access(path) - return true - } catch (er) { - return er.code !== 'ENOENT' - } -} - -const moveFile = async (source, destination, options = {}, root = true, symlinks = []) => { - if (!source || !destination) { - throw new TypeError('`source` and `destination` file required') - } - - options = { - overwrite: true, - ...options, - } - - if (!options.overwrite && await pathExists(destination)) { - throw new Error(`The destination file exists: ${destination}`) - } - - await fs.mkdir(dirname(destination), { recursive: true }) - - try { - await fs.rename(source, destination) - } catch (error) { - if (error.code === 'EXDEV' || error.code === 'EPERM') { - const sourceStat = await fs.lstat(source) - if (sourceStat.isDirectory()) { - const files = await fs.readdir(source) - await Promise.all(files.map((file) => - moveFile(join(source, file), join(destination, file), options, false, symlinks) - )) - } else if (sourceStat.isSymbolicLink()) { - symlinks.push({ source, destination }) - } else { - await fs.copyFile(source, destination) - } - } else { - throw error - } - } - - if (root) { - await Promise.all(symlinks.map(async ({ source: symSource, destination: symDestination }) => { - let target = await fs.readlink(symSource) - // junction symlinks in windows will be absolute paths, so we need to - // make sure they point to the symlink destination - if (isAbsolute(target)) { - target = resolve(symDestination, relative(symSource, target)) - } - // try to determine what the actual file is so we can create the correct - // type of symlink in windows - let targetStat = 'file' - try { - targetStat = await fs.stat(resolve(dirname(symSource), target)) - if (targetStat.isDirectory()) { - targetStat = 'junction' - } - } catch { - // targetStat remains 'file' - } - await fs.symlink( - target, - symDestination, - targetStat - ) - })) - await fs.rm(source, { recursive: true, force: true }) - } -} - -module.exports = moveFile diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/readdir-scoped.js b/node_modules/npm/node_modules/@npmcli/fs/lib/readdir-scoped.js deleted file mode 100644 index cd601df..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/readdir-scoped.js +++ /dev/null @@ -1,20 +0,0 @@ -const { readdir } = require('fs/promises') -const { join } = require('path') - -const readdirScoped = async (dir) => { - const results = [] - - for (const item of await readdir(dir)) { - if (item.startsWith('@')) { - for (const scopedItem of await readdir(join(dir, item))) { - results.push(join(item, scopedItem)) - } - } else { - results.push(item) - } - } - - return results -} - -module.exports = readdirScoped diff --git a/node_modules/npm/node_modules/@npmcli/fs/lib/with-temp-dir.js b/node_modules/npm/node_modules/@npmcli/fs/lib/with-temp-dir.js deleted file mode 100644 index 0738ac4..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/lib/with-temp-dir.js +++ /dev/null @@ -1,39 +0,0 @@ -const { join, sep } = require('path') - -const getOptions = require('./common/get-options.js') -const { mkdir, mkdtemp, rm } = require('fs/promises') - -// create a temp directory, ensure its permissions match its parent, then call -// the supplied function passing it the path to the directory. clean up after -// the function finishes, whether it throws or not -const withTempDir = async (root, fn, opts) => { - const options = getOptions(opts, { - copy: ['tmpPrefix'], - }) - // create the directory - await mkdir(root, { recursive: true }) - - const target = await mkdtemp(join(`${root}${sep}`, options.tmpPrefix || '')) - let err - let result - - try { - result = await fn(target) - } catch (_err) { - err = _err - } - - try { - await rm(target, { force: true, recursive: true }) - } catch { - // ignore errors - } - - if (err) { - throw err - } - - return result -} - -module.exports = withTempDir diff --git a/node_modules/npm/node_modules/@npmcli/fs/package.json b/node_modules/npm/node_modules/@npmcli/fs/package.json deleted file mode 100644 index 28eb613..0000000 --- a/node_modules/npm/node_modules/@npmcli/fs/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@npmcli/fs", - "version": "3.1.0", - "description": "filesystem utilities for the npm cli", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "snap": "tap", - "test": "tap", - "npmclilint": "npmcli-lint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/fs.git" - }, - "keywords": [ - "npm", - "oss" - ], - "author": "GitHub Inc.", - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.8.0", - "tap": "^16.0.1" - }, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.8.0" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/git/LICENSE b/node_modules/npm/node_modules/@npmcli/git/LICENSE deleted file mode 100644 index 8f90f96..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE NPM DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE NPM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, -OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/clone.js b/node_modules/npm/node_modules/@npmcli/git/lib/clone.js deleted file mode 100644 index e25a4d1..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/clone.js +++ /dev/null @@ -1,172 +0,0 @@ -// The goal here is to minimize both git workload and -// the number of refs we download over the network. -// -// Every method ends up with the checked out working dir -// at the specified ref, and resolves with the git sha. - -// Only certain whitelisted hosts get shallow cloning. -// Many hosts (including GHE) don't always support it. -// A failed shallow fetch takes a LOT longer than a full -// fetch in most cases, so we skip it entirely. -// Set opts.gitShallow = true/false to force this behavior -// one way or the other. -const shallowHosts = new Set([ - 'github.com', - 'gist.github.com', - 'gitlab.com', - 'bitbucket.com', - 'bitbucket.org', -]) -// we have to use url.parse until we add the same shim that hosted-git-info has -// to handle scp:// urls -const { parse } = require('url') // eslint-disable-line node/no-deprecated-api -const path = require('path') - -const getRevs = require('./revs.js') -const spawn = require('./spawn.js') -const { isWindows } = require('./utils.js') - -const pickManifest = require('npm-pick-manifest') -const fs = require('fs/promises') - -module.exports = (repo, ref = 'HEAD', target = null, opts = {}) => - getRevs(repo, opts).then(revs => clone( - repo, - revs, - ref, - resolveRef(revs, ref, opts), - target || defaultTarget(repo, opts.cwd), - opts - )) - -const maybeShallow = (repo, opts) => { - if (opts.gitShallow === false || opts.gitShallow) { - return opts.gitShallow - } - return shallowHosts.has(parse(repo).host) -} - -const defaultTarget = (repo, /* istanbul ignore next */ cwd = process.cwd()) => - path.resolve(cwd, path.basename(repo.replace(/[/\\]?\.git$/, ''))) - -const clone = (repo, revs, ref, revDoc, target, opts) => { - if (!revDoc) { - return unresolved(repo, ref, target, opts) - } - if (revDoc.sha === revs.refs.HEAD.sha) { - return plain(repo, revDoc, target, opts) - } - if (revDoc.type === 'tag' || revDoc.type === 'branch') { - return branch(repo, revDoc, target, opts) - } - return other(repo, revDoc, target, opts) -} - -const resolveRef = (revs, ref, opts) => { - const { spec = {} } = opts - ref = spec.gitCommittish || ref - /* istanbul ignore next - will fail anyway, can't pull */ - if (!revs) { - return null - } - if (spec.gitRange) { - return pickManifest(revs, spec.gitRange, opts) - } - if (!ref) { - return revs.refs.HEAD - } - if (revs.refs[ref]) { - return revs.refs[ref] - } - if (revs.shas[ref]) { - return revs.refs[revs.shas[ref][0]] - } - return null -} - -// pull request or some other kind of advertised ref -const other = (repo, revDoc, target, opts) => { - const shallow = maybeShallow(repo, opts) - - const fetchOrigin = ['fetch', 'origin', revDoc.rawRef] - .concat(shallow ? ['--depth=1'] : []) - - const git = (args) => spawn(args, { ...opts, cwd: target }) - return fs.mkdir(target, { recursive: true }) - .then(() => git(['init'])) - .then(() => isWindows(opts) - ? git(['config', '--local', '--add', 'core.longpaths', 'true']) - : null) - .then(() => git(['remote', 'add', 'origin', repo])) - .then(() => git(fetchOrigin)) - .then(() => git(['checkout', revDoc.sha])) - .then(() => updateSubmodules(target, opts)) - .then(() => revDoc.sha) -} - -// tag or branches. use -b -const branch = (repo, revDoc, target, opts) => { - const args = [ - 'clone', - '-b', - revDoc.ref, - repo, - target, - '--recurse-submodules', - ] - if (maybeShallow(repo, opts)) { - args.push('--depth=1') - } - if (isWindows(opts)) { - args.push('--config', 'core.longpaths=true') - } - return spawn(args, opts).then(() => revDoc.sha) -} - -// just the head. clone it -const plain = (repo, revDoc, target, opts) => { - const args = [ - 'clone', - repo, - target, - '--recurse-submodules', - ] - if (maybeShallow(repo, opts)) { - args.push('--depth=1') - } - if (isWindows(opts)) { - args.push('--config', 'core.longpaths=true') - } - return spawn(args, opts).then(() => revDoc.sha) -} - -const updateSubmodules = async (target, opts) => { - const hasSubmodules = await fs.stat(`${target}/.gitmodules`) - .then(() => true) - .catch(() => false) - if (!hasSubmodules) { - return null - } - return spawn([ - 'submodule', - 'update', - '-q', - '--init', - '--recursive', - ], { ...opts, cwd: target }) -} - -const unresolved = (repo, ref, target, opts) => { - // can't do this one shallowly, because the ref isn't advertised - // but we can avoid checking out the working dir twice, at least - const lp = isWindows(opts) ? ['--config', 'core.longpaths=true'] : [] - const cloneArgs = ['clone', '--mirror', '-q', repo, target + '/.git'] - const git = (args) => spawn(args, { ...opts, cwd: target }) - return fs.mkdir(target, { recursive: true }) - .then(() => git(cloneArgs.concat(lp))) - .then(() => git(['init'])) - .then(() => git(['checkout', ref])) - .then(() => updateSubmodules(target, opts)) - .then(() => git(['rev-parse', '--revs-only', 'HEAD'])) - .then(({ stdout }) => stdout.trim()) -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/errors.js b/node_modules/npm/node_modules/@npmcli/git/lib/errors.js deleted file mode 100644 index 7aeac47..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/errors.js +++ /dev/null @@ -1,36 +0,0 @@ - -const maxRetry = 3 - -class GitError extends Error { - shouldRetry () { - return false - } -} - -class GitConnectionError extends GitError { - constructor (message) { - super('A git connection error occurred') - } - - shouldRetry (number) { - return number < maxRetry - } -} - -class GitPathspecError extends GitError { - constructor (message) { - super('The git reference could not be found') - } -} - -class GitUnknownError extends GitError { - constructor (message) { - super('An unknown git error occurred') - } -} - -module.exports = { - GitConnectionError, - GitPathspecError, - GitUnknownError, -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/find.js b/node_modules/npm/node_modules/@npmcli/git/lib/find.js deleted file mode 100644 index 34bd310..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/find.js +++ /dev/null @@ -1,15 +0,0 @@ -const is = require('./is.js') -const { dirname } = require('path') - -module.exports = async ({ cwd = process.cwd(), root } = {}) => { - while (true) { - if (await is({ cwd })) { - return cwd - } - const next = dirname(cwd) - if (cwd === root || cwd === next) { - return null - } - cwd = next - } -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/index.js b/node_modules/npm/node_modules/@npmcli/git/lib/index.js deleted file mode 100644 index 10a65f7..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/index.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - clone: require('./clone.js'), - revs: require('./revs.js'), - spawn: require('./spawn.js'), - is: require('./is.js'), - find: require('./find.js'), - isClean: require('./is-clean.js'), - errors: require('./errors.js'), -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/is-clean.js b/node_modules/npm/node_modules/@npmcli/git/lib/is-clean.js deleted file mode 100644 index 182373b..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/is-clean.js +++ /dev/null @@ -1,6 +0,0 @@ -const spawn = require('./spawn.js') - -module.exports = (opts = {}) => - spawn(['status', '--porcelain=v1', '-uno'], opts) - .then(res => !res.stdout.trim().split(/\r?\n+/) - .map(l => l.trim()).filter(l => l).length) diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/is.js b/node_modules/npm/node_modules/@npmcli/git/lib/is.js deleted file mode 100644 index e2542f2..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/is.js +++ /dev/null @@ -1,6 +0,0 @@ -// not an airtight indicator, but a good gut-check to even bother trying -const { promisify } = require('util') -const fs = require('fs') -const stat = promisify(fs.stat) -module.exports = ({ cwd = process.cwd() } = {}) => - stat(cwd + '/.git').then(() => true, () => false) diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/lines-to-revs.js b/node_modules/npm/node_modules/@npmcli/git/lib/lines-to-revs.js deleted file mode 100644 index 6bd7e7a..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/lines-to-revs.js +++ /dev/null @@ -1,147 +0,0 @@ -// turn an array of lines from `git ls-remote` into a thing -// vaguely resembling a packument, where docs are a resolved ref - -const semver = require('semver') - -module.exports = lines => finish(lines.reduce(linesToRevsReducer, { - versions: {}, - 'dist-tags': {}, - refs: {}, - shas: {}, -})) - -const finish = revs => distTags(shaList(peelTags(revs))) - -// We can check out shallow clones on specific SHAs if we have a ref -const shaList = revs => { - Object.keys(revs.refs).forEach(ref => { - const doc = revs.refs[ref] - if (!revs.shas[doc.sha]) { - revs.shas[doc.sha] = [ref] - } else { - revs.shas[doc.sha].push(ref) - } - }) - return revs -} - -// Replace any tags with their ^{} counterparts, if those exist -const peelTags = revs => { - Object.keys(revs.refs).filter(ref => ref.endsWith('^{}')).forEach(ref => { - const peeled = revs.refs[ref] - const unpeeled = revs.refs[ref.replace(/\^\{\}$/, '')] - if (unpeeled) { - unpeeled.sha = peeled.sha - delete revs.refs[ref] - } - }) - return revs -} - -const distTags = revs => { - // not entirely sure what situations would result in an - // ichabod repo, but best to be careful in Sleepy Hollow anyway - const HEAD = revs.refs.HEAD || /* istanbul ignore next */ {} - const versions = Object.keys(revs.versions) - versions.forEach(v => { - // simulate a dist-tags with latest pointing at the - // 'latest' branch if one exists and is a version, - // or HEAD if not. - const ver = revs.versions[v] - if (revs.refs.latest && ver.sha === revs.refs.latest.sha) { - revs['dist-tags'].latest = v - } else if (ver.sha === HEAD.sha) { - revs['dist-tags'].HEAD = v - if (!revs.refs.latest) { - revs['dist-tags'].latest = v - } - } - }) - return revs -} - -const refType = ref => { - if (ref.startsWith('refs/tags/')) { - return 'tag' - } - if (ref.startsWith('refs/heads/')) { - return 'branch' - } - if (ref.startsWith('refs/pull/')) { - return 'pull' - } - if (ref === 'HEAD') { - return 'head' - } - // Could be anything, ignore for now - /* istanbul ignore next */ - return 'other' -} - -// return the doc, or null if we should ignore it. -const lineToRevDoc = line => { - const split = line.trim().split(/\s+/, 2) - if (split.length < 2) { - return null - } - - const sha = split[0].trim() - const rawRef = split[1].trim() - const type = refType(rawRef) - - if (type === 'tag') { - // refs/tags/foo^{} is the 'peeled tag', ie the commit - // that is tagged by refs/tags/foo they resolve to the same - // content, just different objects in git's data structure. - // But, we care about the thing the tag POINTS to, not the tag - // object itself, so we only look at the peeled tag refs, and - // ignore the pointer. - // For now, though, we have to save both, because some tags - // don't have peels, if they were not annotated. - const ref = rawRef.slice('refs/tags/'.length) - return { sha, ref, rawRef, type } - } - - if (type === 'branch') { - const ref = rawRef.slice('refs/heads/'.length) - return { sha, ref, rawRef, type } - } - - if (type === 'pull') { - // NB: merged pull requests installable with #pull/123/merge - // for the merged pr, or #pull/123 for the PR head - const ref = rawRef.slice('refs/'.length).replace(/\/head$/, '') - return { sha, ref, rawRef, type } - } - - if (type === 'head') { - const ref = 'HEAD' - return { sha, ref, rawRef, type } - } - - // at this point, all we can do is leave the ref un-munged - return { sha, ref: rawRef, rawRef, type } -} - -const linesToRevsReducer = (revs, line) => { - const doc = lineToRevDoc(line) - - if (!doc) { - return revs - } - - revs.refs[doc.ref] = doc - revs.refs[doc.rawRef] = doc - - if (doc.type === 'tag') { - // try to pull a semver value out of tags like `release-v1.2.3` - // which is a pretty common pattern. - const match = !doc.ref.endsWith('^{}') && - doc.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/) - if (match && semver.valid(match[1], true)) { - revs.versions[semver.clean(match[1], true)] = doc - } - } - - return revs -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/make-error.js b/node_modules/npm/node_modules/@npmcli/git/lib/make-error.js deleted file mode 100644 index 7540ec7..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/make-error.js +++ /dev/null @@ -1,33 +0,0 @@ -const { - GitConnectionError, - GitPathspecError, - GitUnknownError, -} = require('./errors.js') - -const connectionErrorRe = new RegExp([ - 'remote error: Internal Server Error', - 'The remote end hung up unexpectedly', - 'Connection timed out', - 'Operation timed out', - 'Failed to connect to .* Timed out', - 'Connection reset by peer', - 'SSL_ERROR_SYSCALL', - 'The requested URL returned error: 503', -].join('|')) - -const missingPathspecRe = /pathspec .* did not match any file\(s\) known to git/ - -function makeError (er) { - const message = er.stderr - let gitEr - if (connectionErrorRe.test(message)) { - gitEr = new GitConnectionError(message) - } else if (missingPathspecRe.test(message)) { - gitEr = new GitPathspecError(message) - } else { - gitEr = new GitUnknownError(message) - } - return Object.assign(gitEr, er) -} - -module.exports = makeError diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/opts.js b/node_modules/npm/node_modules/@npmcli/git/lib/opts.js deleted file mode 100644 index 3119af1..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/opts.js +++ /dev/null @@ -1,12 +0,0 @@ -// Values we want to set if they're not already defined by the end user -// This defaults to accepting new ssh host key fingerprints -const gitEnv = { - GIT_ASKPASS: 'echo', - GIT_SSH_COMMAND: 'ssh -oStrictHostKeyChecking=accept-new', -} -module.exports = (opts = {}) => ({ - stdioString: true, - ...opts, - shell: false, - env: opts.env || { ...gitEnv, ...process.env }, -}) diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/revs.js b/node_modules/npm/node_modules/@npmcli/git/lib/revs.js deleted file mode 100644 index ca14837..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/revs.js +++ /dev/null @@ -1,28 +0,0 @@ -const pinflight = require('promise-inflight') -const spawn = require('./spawn.js') -const { LRUCache } = require('lru-cache') - -const revsCache = new LRUCache({ - max: 100, - ttl: 5 * 60 * 1000, -}) - -const linesToRevs = require('./lines-to-revs.js') - -module.exports = async (repo, opts = {}) => { - if (!opts.noGitRevCache) { - const cached = revsCache.get(repo) - if (cached) { - return cached - } - } - - return pinflight(`ls-remote:${repo}`, () => - spawn(['ls-remote', repo], opts) - .then(({ stdout }) => linesToRevs(stdout.trim().split('\n'))) - .then(revs => { - revsCache.set(repo, revs) - return revs - }) - ) -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/spawn.js b/node_modules/npm/node_modules/@npmcli/git/lib/spawn.js deleted file mode 100644 index 7098d7b..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/spawn.js +++ /dev/null @@ -1,44 +0,0 @@ -const spawn = require('@npmcli/promise-spawn') -const promiseRetry = require('promise-retry') -const log = require('proc-log') -const makeError = require('./make-error.js') -const whichGit = require('./which.js') -const makeOpts = require('./opts.js') - -module.exports = (gitArgs, opts = {}) => { - const gitPath = whichGit(opts) - - if (gitPath instanceof Error) { - return Promise.reject(gitPath) - } - - // undocumented option, mostly only here for tests - const args = opts.allowReplace || gitArgs[0] === '--no-replace-objects' - ? gitArgs - : ['--no-replace-objects', ...gitArgs] - - let retryOpts = opts.retry - if (retryOpts === null || retryOpts === undefined) { - retryOpts = { - retries: opts.fetchRetries || 2, - factor: opts.fetchRetryFactor || 10, - maxTimeout: opts.fetchRetryMaxtimeout || 60000, - minTimeout: opts.fetchRetryMintimeout || 1000, - } - } - return promiseRetry((retryFn, number) => { - if (number !== 1) { - log.silly('git', `Retrying git command: ${ - args.join(' ')} attempt # ${number}`) - } - - return spawn(gitPath, args, makeOpts(opts)) - .catch(er => { - const gitError = makeError(er) - if (!gitError.shouldRetry(number)) { - throw gitError - } - retryFn(gitError) - }) - }, retryOpts) -} diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/utils.js b/node_modules/npm/node_modules/@npmcli/git/lib/utils.js deleted file mode 100644 index fcd9578..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/utils.js +++ /dev/null @@ -1,3 +0,0 @@ -const isWindows = opts => (opts.fakePlatform || process.platform) === 'win32' - -exports.isWindows = isWindows diff --git a/node_modules/npm/node_modules/@npmcli/git/lib/which.js b/node_modules/npm/node_modules/@npmcli/git/lib/which.js deleted file mode 100644 index dc2a1ad..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/lib/which.js +++ /dev/null @@ -1,18 +0,0 @@ -const which = require('which') - -let gitPath -try { - gitPath = which.sync('git') -} catch { - // ignore errors -} - -module.exports = (opts = {}) => { - if (opts.git) { - return opts.git - } - if (!gitPath || opts.git === false) { - return Object.assign(new Error('No git binary found in $PATH'), { code: 'ENOGIT' }) - } - return gitPath -} diff --git a/node_modules/npm/node_modules/@npmcli/git/package.json b/node_modules/npm/node_modules/@npmcli/git/package.json deleted file mode 100644 index 6ab037d..0000000 --- a/node_modules/npm/node_modules/@npmcli/git/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@npmcli/git", - "version": "5.0.3", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "description": "a util for spawning git from npm CLI contexts", - "repository": { - "type": "git", - "url": "https://github.com/npm/git.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.js\"", - "snap": "tap", - "test": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "timeout": 600, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "npm-package-arg": "^11.0.0", - "slash": "^3.0.0", - "tap": "^16.0.1" - }, - "dependencies": { - "@npmcli/promise-spawn": "^7.0.0", - "lru-cache": "^10.0.1", - "npm-pick-manifest": "^9.0.0", - "proc-log": "^3.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^4.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": true, - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/installed-package-contents/LICENSE b/node_modules/npm/node_modules/@npmcli/installed-package-contents/LICENSE deleted file mode 100644 index 19cec97..0000000 --- a/node_modules/npm/node_modules/@npmcli/installed-package-contents/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/installed-package-contents/README.md b/node_modules/npm/node_modules/@npmcli/installed-package-contents/README.md deleted file mode 100644 index edd23bd..0000000 --- a/node_modules/npm/node_modules/@npmcli/installed-package-contents/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# @npmcli/installed-package-contents - -Get the list of files installed in a package in node_modules, including -bundled dependencies. - -This is useful if you want to remove a package node from the tree _without_ -removing its child nodes, for example to extract a new version of the -dependency into place safely. - -It's sort of the reflection of [npm-packlist](http://npm.im/npm-packlist), -but for listing out the _installed_ files rather than the files that _will_ -be installed. This is of course a much simpler operation, because we don't -have to handle ignore files or package.json `files` lists. - -## USAGE - -```js -// programmatic usage -const pkgContents = require('@npmcli/installed-package-contents') - -pkgContents({ path: 'node_modules/foo', depth: 1 }).then(files => { - // files is an array of items that need to be passed to - // rimraf or moved out of the way to make the folder empty - // if foo bundled dependencies, those will be included. - // It will not traverse into child directories, because we set - // depth:1 in the options. - // If the folder doesn't exist, this returns an empty array. -}) - -pkgContents({ path: 'node_modules/foo', depth: Infinity }).then(files => { - // setting depth:Infinity tells it to keep walking forever - // until it hits something that isn't a directory, so we'll - // just get the list of all files, but not their containing - // directories. -}) -``` - -As a CLI: - -```bash -$ installed-package-contents node_modules/bundle-some -d1 -node_modules/.bin/some -node_modules/bundle-some/package.json -node_modules/bundle-some/node_modules/@scope/baz -node_modules/bundle-some/node_modules/.bin/foo -node_modules/bundle-some/node_modules/foo -``` - -CLI options: - -``` -Usage: - installed-package-contents [-d --depth=] - -Lists the files installed for a package specified by . - -Options: - -d --depth= Provide a numeric value ("Infinity" is allowed) - to specify how deep in the file tree to traverse. - Default=1 - -h --help Show this usage information -``` - -## OPTIONS - -* `depth` Number, default `1`. How deep to traverse through folders to get - contents. Typically you'd want to set this to either `1` (to get the - surface files and folders) or `Infinity` (to get all files), but any - other positive number is supported as well. If set to `0` or a - negative number, returns the path provided and (if it is a package) its - set of linked bins. -* `path` Required. Path to the package in `node_modules` where traversal - should begin. - -## RETURN VALUE - -A Promise that resolves to an array of fully-resolved files and folders -matching the criteria. This includes all bundled dependencies in -`node_modules`, and any linked executables in `node_modules/.bin` that the -package caused to be installed. - -An empty or missing package folder will return an empty array. Empty -directories _within_ package contents are listed, even if the `depth` -argument would cause them to be traversed into. - -## CAVEAT - -If using this module to generate a list of files that should be recursively -removed to clear away the package, note that this will leave empty -directories behind in certain cases: - -- If all child packages are bundled dependencies, then the - `node_modules` folder will remain. -- If all child packages within a given scope were bundled dependencies, - then the `node_modules/@scope` folder will remain. -- If all linked bin scripts were removed, then an empty `node_modules/.bin` - folder will remain. - -In the interest of speed and algorithmic complexity, this module does _not_ -do a subsequent readdir to see if it would remove all directory entries, -though it would be easier to look at if it returned `node_modules` or -`.bin` in that case rather than the contents. However, if the intent is to -pass these arguments to `rimraf`, it hardly makes sense to do _two_ -`readdir` calls just so that we can have the luxury of having to make a -third. - -Since the primary use case is to delete a package's contents so that they -can be re-filled with a new version of that package, this caveat does not -pose a problem. Empty directories are already ignored by both npm and git. diff --git a/node_modules/npm/node_modules/@npmcli/installed-package-contents/lib/index.js b/node_modules/npm/node_modules/@npmcli/installed-package-contents/lib/index.js deleted file mode 100755 index 20b25c4..0000000 --- a/node_modules/npm/node_modules/@npmcli/installed-package-contents/lib/index.js +++ /dev/null @@ -1,242 +0,0 @@ -#! /usr/bin/env node - -// to GET CONTENTS for folder at PATH (which may be a PACKAGE): -// - if PACKAGE, read path/package.json -// - if bins in ../node_modules/.bin, add those to result -// - if depth >= maxDepth, add PATH to result, and finish -// - readdir(PATH, with file types) -// - add all FILEs in PATH to result -// - if PARENT: -// - if depth < maxDepth, add GET CONTENTS of all DIRs in PATH -// - else, add all DIRs in PATH -// - if no parent -// - if no bundled deps, -// - if depth < maxDepth, add GET CONTENTS of DIRs in path except -// node_modules -// - else, add all DIRs in path other than node_modules -// - if has bundled deps, -// - get list of bundled deps -// - add GET CONTENTS of bundled deps, PACKAGE=true, depth + 1 - -const bundled = require('npm-bundled') -const { promisify } = require('util') -const fs = require('fs') -const readFile = promisify(fs.readFile) -const readdir = promisify(fs.readdir) -const stat = promisify(fs.stat) -const lstat = promisify(fs.lstat) -const { relative, resolve, basename, dirname } = require('path') -const normalizePackageBin = require('npm-normalize-package-bin') - -const readPackage = ({ path, packageJsonCache }) => - packageJsonCache.has(path) ? Promise.resolve(packageJsonCache.get(path)) - : readFile(path).then(json => { - const pkg = normalizePackageBin(JSON.parse(json)) - packageJsonCache.set(path, pkg) - return pkg - }) - .catch(er => null) - -// just normalize bundle deps and bin, that's all we care about here. -const normalized = Symbol('package data has been normalized') -const rpj = ({ path, packageJsonCache }) => - readPackage({ path, packageJsonCache }) - .then(pkg => { - if (!pkg || pkg[normalized]) { - return pkg - } - if (pkg.bundledDependencies && !pkg.bundleDependencies) { - pkg.bundleDependencies = pkg.bundledDependencies - delete pkg.bundledDependencies - } - const bd = pkg.bundleDependencies - if (bd === true) { - pkg.bundleDependencies = [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.optionalDependencies || {}), - ] - } - if (typeof bd === 'object' && !Array.isArray(bd)) { - pkg.bundleDependencies = Object.keys(bd) - } - pkg[normalized] = true - return pkg - }) - -const pkgContents = async ({ - path, - depth, - currentDepth = 0, - pkg = null, - result = null, - packageJsonCache = null, -}) => { - if (!result) { - result = new Set() - } - - if (!packageJsonCache) { - packageJsonCache = new Map() - } - - if (pkg === true) { - return rpj({ path: path + '/package.json', packageJsonCache }) - .then(p => pkgContents({ - path, - depth, - currentDepth, - pkg: p, - result, - packageJsonCache, - })) - } - - if (pkg) { - // add all bins to result if they exist - if (pkg.bin) { - const dir = dirname(path) - const scope = basename(dir) - const nm = /^@.+/.test(scope) ? dirname(dir) : dir - - const binFiles = [] - Object.keys(pkg.bin).forEach(b => { - const base = resolve(nm, '.bin', b) - binFiles.push(base, base + '.cmd', base + '.ps1') - }) - - const bins = await Promise.all( - binFiles.map(b => stat(b).then(() => b).catch((er) => null)) - ) - bins.filter(b => b).forEach(b => result.add(b)) - } - } - - if (currentDepth >= depth) { - result.add(path) - return result - } - - // we'll need bundle list later, so get that now in parallel - const [dirEntries, bundleDeps] = await Promise.all([ - readdir(path, { withFileTypes: true }), - currentDepth === 0 && pkg && pkg.bundleDependencies - ? bundled({ path, packageJsonCache }) : null, - ]).catch(() => []) - - // not a thing, probably a missing folder - if (!dirEntries) { - return result - } - - // empty folder, just add the folder itself to the result - if (!dirEntries.length && !bundleDeps && currentDepth !== 0) { - result.add(path) - return result - } - - const recursePromises = [] - - // if we didn't get withFileTypes support, tack that on - if (typeof dirEntries[0] === 'string') { - // use a map so we can return a promise, but we mutate dirEntries in place - // this is much slower than getting the entries from the readdir call, - // but polyfills support for node versions before 10.10 - await Promise.all(dirEntries.map(async (name, index) => { - const p = resolve(path, name) - const st = await lstat(p) - dirEntries[index] = Object.assign(st, { name }) - })) - } - - for (const entry of dirEntries) { - const p = resolve(path, entry.name) - if (entry.isDirectory() === false) { - result.add(p) - continue - } - - if (currentDepth !== 0 || entry.name !== 'node_modules') { - if (currentDepth < depth - 1) { - recursePromises.push(pkgContents({ - path: p, - packageJsonCache, - depth, - currentDepth: currentDepth + 1, - result, - })) - } else { - result.add(p) - } - continue - } - } - - if (bundleDeps) { - // bundle deps are all folders - // we always recurse to get pkg bins, but if currentDepth is too high, - // it'll return early before walking their contents. - recursePromises.push(...bundleDeps.map(dep => { - const p = resolve(path, 'node_modules', dep) - return pkgContents({ - path: p, - packageJsonCache, - pkg: true, - depth, - currentDepth: currentDepth + 1, - result, - }) - })) - } - - if (recursePromises.length) { - await Promise.all(recursePromises) - } - - return result -} - -module.exports = ({ path, depth = 1, packageJsonCache }) => pkgContents({ - path: resolve(path), - depth, - pkg: true, - packageJsonCache, -}).then(results => [...results]) - -if (require.main === module) { - const options = { path: null, depth: 1 } - const usage = `Usage: - installed-package-contents [-d --depth=] - -Lists the files installed for a package specified by . - -Options: - -d --depth= Provide a numeric value ("Infinity" is allowed) - to specify how deep in the file tree to traverse. - Default=1 - -h --help Show this usage information` - - process.argv.slice(2).forEach(arg => { - let match - if ((match = arg.match(/^--depth=([0-9]+|Infinity)/)) || - (match = arg.match(/^-d([0-9]+|Infinity)/))) { - options.depth = +match[1] - } else if (arg === '-h' || arg === '--help') { - console.log(usage) - process.exit(0) - } else { - options.path = arg - } - }) - if (!options.path) { - console.error('ERROR: no path provided') - console.error(usage) - process.exit(1) - } - const cwd = process.cwd() - module.exports(options) - .then(list => list.sort().forEach(p => console.log(relative(cwd, p)))) - .catch(/* istanbul ignore next - pretty unusual */ er => { - console.error(er) - process.exit(1) - }) -} diff --git a/node_modules/npm/node_modules/@npmcli/installed-package-contents/package.json b/node_modules/npm/node_modules/@npmcli/installed-package-contents/package.json deleted file mode 100644 index 3554754..0000000 --- a/node_modules/npm/node_modules/@npmcli/installed-package-contents/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@npmcli/installed-package-contents", - "version": "2.0.2", - "description": "Get the list of files installed in a package in node_modules, including bundled dependencies", - "author": "GitHub Inc.", - "main": "lib/index.js", - "bin": { - "installed-package-contents": "lib/index.js" - }, - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.4", - "require-inject": "^1.4.4", - "tap": "^16.3.0" - }, - "dependencies": { - "npm-bundled": "^3.0.0", - "npm-normalize-package-bin": "^3.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/installed-package-contents.git" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.4" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/map-workspaces/LICENSE.md b/node_modules/npm/node_modules/@npmcli/map-workspaces/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/node_modules/npm/node_modules/@npmcli/map-workspaces/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js b/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js deleted file mode 100644 index 501dad8..0000000 --- a/node_modules/npm/node_modules/@npmcli/map-workspaces/lib/index.js +++ /dev/null @@ -1,211 +0,0 @@ -const path = require('path') - -const getName = require('@npmcli/name-from-folder') -const { minimatch } = require('minimatch') -const rpj = require('read-package-json-fast') -const { glob } = require('glob') - -function appendNegatedPatterns (patterns) { - const results = [] - for (let pattern of patterns) { - const excl = pattern.match(/^!+/) - if (excl) { - pattern = pattern.slice(excl[0].length) - } - - // strip off any / from the start of the pattern. /foo => foo - pattern = pattern.replace(/^\/+/, '') - - // an odd number of ! means a negated pattern. !!foo ==> foo - const negate = excl && excl[0].length % 2 === 1 - results.push({ pattern, negate }) - } - - return results -} - -function getPatterns (workspaces) { - const workspacesDeclaration = - Array.isArray(workspaces.packages) - ? workspaces.packages - : workspaces - - if (!Array.isArray(workspacesDeclaration)) { - throw getError({ - message: 'workspaces config expects an Array', - code: 'EWORKSPACESCONFIG', - }) - } - - return appendNegatedPatterns(workspacesDeclaration) -} - -function getPackageName (pkg, pathname) { - const { name } = pkg - return name || getName(pathname) -} - -function pkgPathmame (opts) { - return (...args) => { - const cwd = opts.cwd ? opts.cwd : process.cwd() - return path.join.apply(null, [cwd, ...args]) - } -} - -// make sure glob pattern only matches folders -function getGlobPattern (pattern) { - pattern = pattern.replace(/\\/g, '/') - return pattern.endsWith('/') - ? pattern - : `${pattern}/` -} - -function getError ({ Type = TypeError, message, code }) { - return Object.assign(new Type(message), { code }) -} - -function reverseResultMap (map) { - return new Map(Array.from(map, item => item.reverse())) -} - -async function mapWorkspaces (opts = {}) { - if (!opts || !opts.pkg) { - throw getError({ - message: 'mapWorkspaces missing pkg info', - code: 'EMAPWORKSPACESPKG', - }) - } - - const { workspaces = [] } = opts.pkg - const patterns = getPatterns(workspaces) - const results = new Map() - const seen = new Map() - - if (!patterns.length) { - return results - } - - const getGlobOpts = () => ({ - ...opts, - ignore: [ - ...opts.ignore || [], - ...['**/node_modules/**'], - ], - }) - - const getPackagePathname = pkgPathmame(opts) - - for (const item of patterns) { - let matches = await glob(getGlobPattern(item.pattern), getGlobOpts()) - // preserves glob@8 behavior - matches = matches.sort((a, b) => a.localeCompare(b, 'en')) - - for (const match of matches) { - let pkg - const packageJsonPathname = getPackagePathname(match, 'package.json') - const packagePathname = path.dirname(packageJsonPathname) - - try { - pkg = await rpj(packageJsonPathname) - } catch (err) { - if (err.code === 'ENOENT') { - continue - } else { - throw err - } - } - - const name = getPackageName(pkg, packagePathname) - - let seenPackagePathnames = seen.get(name) - if (!seenPackagePathnames) { - seenPackagePathnames = new Set() - seen.set(name, seenPackagePathnames) - } - if (item.negate) { - seenPackagePathnames.delete(packagePathname) - } else { - seenPackagePathnames.add(packagePathname) - } - } - } - - const errorMessageArray = ['must not have multiple workspaces with the same name'] - for (const [packageName, seenPackagePathnames] of seen) { - if (seenPackagePathnames.size === 0) { - continue - } - if (seenPackagePathnames.size > 1) { - addDuplicateErrorMessages(errorMessageArray, packageName, seenPackagePathnames) - } else { - results.set(packageName, seenPackagePathnames.values().next().value) - } - } - - if (errorMessageArray.length > 1) { - throw getError({ - Type: Error, - message: errorMessageArray.join('\n'), - code: 'EDUPLICATEWORKSPACE', - }) - } - - return results -} - -function addDuplicateErrorMessages (messageArray, packageName, packagePathnames) { - messageArray.push( - `package '${packageName}' has conflicts in the following paths:` - ) - - for (const packagePathname of packagePathnames) { - messageArray.push( - ' ' + packagePathname - ) - } -} - -mapWorkspaces.virtual = function (opts = {}) { - if (!opts || !opts.lockfile) { - throw getError({ - message: 'mapWorkspaces.virtual missing lockfile info', - code: 'EMAPWORKSPACESLOCKFILE', - }) - } - - const { packages = {} } = opts.lockfile - const { workspaces = [] } = packages[''] || {} - // uses a pathname-keyed map in order to negate the exact items - const results = new Map() - const patterns = getPatterns(workspaces) - if (!patterns.length) { - return results - } - patterns.push({ pattern: '**/node_modules/**', negate: true }) - - const getPackagePathname = pkgPathmame(opts) - - for (const packageKey of Object.keys(packages)) { - if (packageKey === '') { - continue - } - - for (const item of patterns) { - if (minimatch(packageKey, item.pattern)) { - const packagePathname = getPackagePathname(packageKey) - const name = getPackageName(packages[packageKey], packagePathname) - - if (item.negate) { - results.delete(packagePathname) - } else { - results.set(packagePathname, name) - } - } - } - } - - // Invert pathname-keyed to a proper name-to-pathnames Map - return reverseResultMap(results) -} - -module.exports = mapWorkspaces diff --git a/node_modules/npm/node_modules/@npmcli/map-workspaces/package.json b/node_modules/npm/node_modules/@npmcli/map-workspaces/package.json deleted file mode 100644 index 64cb7f9..0000000 --- a/node_modules/npm/node_modules/@npmcli/map-workspaces/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@npmcli/map-workspaces", - "version": "3.0.4", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "description": "Retrieves a name:pathname Map for a given workspaces config", - "repository": { - "type": "git", - "url": "https://github.com/npm/map-workspaces.git" - }, - "keywords": [ - "npm", - "npmcli", - "libnpm", - "cli", - "workspaces", - "map-workspaces" - ], - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.js\"", - "pretest": "npm run lint", - "test": "tap", - "snap": "tap", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", - "tap": "^16.0.1" - }, - "dependencies": { - "@npmcli/name-from-folder": "^2.0.0", - "glob": "^10.2.2", - "minimatch": "^9.0.0", - "read-package-json-fast": "^3.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/LICENSE b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/LICENSE deleted file mode 100644 index 19cec97..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js deleted file mode 100644 index 01f6a66..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/advisory.js +++ /dev/null @@ -1,435 +0,0 @@ -const hash = require('./hash.js') -const semver = require('semver') -const semverOpt = { includePrerelease: true, loose: true } -const getDepSpec = require('./get-dep-spec.js') - -// any fields that we don't want in the cache need to be hidden -const _source = Symbol('source') -const _packument = Symbol('packument') -const _versionVulnMemo = Symbol('versionVulnMemo') -const _updated = Symbol('updated') -const _options = Symbol('options') -const _specVulnMemo = Symbol('specVulnMemo') -const _testVersion = Symbol('testVersion') -const _testVersions = Symbol('testVersions') -const _calculateRange = Symbol('calculateRange') -const _markVulnerable = Symbol('markVulnerable') -const _testSpec = Symbol('testSpec') - -class Advisory { - constructor (name, source, options = {}) { - this.source = source.id - this[_source] = source - this[_options] = options - this.name = name - if (!source.name) { - source.name = name - } - - this.dependency = source.name - - if (this.type === 'advisory') { - this.title = source.title - this.url = source.url - } else { - this.title = `Depends on vulnerable versions of ${source.name}` - this.url = null - } - - this.severity = source.severity || 'high' - this.versions = [] - this.vulnerableVersions = [] - this.cwe = source.cwe - this.cvss = source.cvss - - // advisories have the range, metavulns do not - // if an advisory doesn't specify range, assume all are vulnerable - this.range = this.type === 'advisory' ? source.vulnerable_versions || '*' - : null - - this.id = hash(this) - - this[_packument] = null - // memoized list of which versions are vulnerable - this[_versionVulnMemo] = new Map() - // memoized list of which dependency specs are vulnerable - this[_specVulnMemo] = new Map() - this[_updated] = false - } - - // true if we updated from what we had in cache - get updated () { - return this[_updated] - } - - get type () { - return this.dependency === this.name ? 'advisory' : 'metavuln' - } - - get packument () { - return this[_packument] - } - - // load up the data from a cache entry and a fetched packument - load (cached, packument) { - // basic data integrity gutcheck - if (!cached || typeof cached !== 'object') { - throw new TypeError('invalid cached data, expected object') - } - - if (!packument || typeof packument !== 'object') { - throw new TypeError('invalid packument data, expected object') - } - - if (cached.id && cached.id !== this.id) { - throw Object.assign(new Error('loading from incorrect cache entry'), { - expected: this.id, - actual: cached.id, - }) - } - if (packument.name !== this.name) { - throw Object.assign(new Error('loading from incorrect packument'), { - expected: this.name, - actual: packument.name, - }) - } - if (this[_packument]) { - throw new Error('advisory object already loaded') - } - - // if we have a range from the initialization, and the cached - // data has a *different* range, then we know we have to recalc. - // just don't use the cached data, so we will definitely not match later - if (!this.range || cached.range && cached.range === this.range) { - Object.assign(this, cached) - } - - this[_packument] = packument - - const pakuVersions = Object.keys(packument.versions || {}) - const allVersions = new Set([...pakuVersions, ...this.versions]) - const versionsAdded = [] - const versionsRemoved = [] - for (const v of allVersions) { - if (!this.versions.includes(v)) { - versionsAdded.push(v) - this.versions.push(v) - } else if (!pakuVersions.includes(v)) { - versionsRemoved.push(v) - } - } - - // strip out any removed versions from our lists, and sort by semver - this.versions = semver.sort(this.versions.filter(v => - !versionsRemoved.includes(v)), semverOpt) - - // if no changes, then just return what we got from cache - // versions added or removed always means we changed - // otherwise, advisories change if the range changes, and - // metavulns change if the source was updated - const unchanged = this.type === 'advisory' - ? this.range && this.range === cached.range - : !this[_source].updated - - // if the underlying source changed, by an advisory updating the - // range, or a source advisory being updated, then we have to re-check - // otherwise, only recheck the new ones. - this.vulnerableVersions = !unchanged ? [] - : semver.sort(this.vulnerableVersions.filter(v => - !versionsRemoved.includes(v)), semverOpt) - - if (unchanged && !versionsAdded.length && !versionsRemoved.length) { - // nothing added or removed, nothing to do here. use the cached copy. - return this - } - - this[_updated] = true - - // test any versions newly added - if (!unchanged || versionsAdded.length) { - this[_testVersions](unchanged ? versionsAdded : this.versions) - } - this.vulnerableVersions = semver.sort(this.vulnerableVersions, semverOpt) - - // metavulns have to calculate their range, since cache is invalidated - // advisories just get their range from the advisory above - if (this.type === 'metavuln') { - this[_calculateRange]() - } - - return this - } - - [_calculateRange] () { - // calling semver.simplifyRange with a massive list of versions, and those - // versions all concatenated with `||` is a geometric CPU explosion! - // we can try to be a *little* smarter up front by doing x-y for all - // contiguous version sets in the list - const ranges = [] - this.versions = semver.sort(this.versions, semverOpt) - this.vulnerableVersions = semver.sort(this.vulnerableVersions, semverOpt) - for (let v = 0, vulnVer = 0; v < this.versions.length; v++) { - // figure out the vulnerable subrange - const vr = [this.versions[v]] - while (v < this.versions.length) { - if (this.versions[v] !== this.vulnerableVersions[vulnVer]) { - // we don't test prerelease versions, so just skip past it - if (/-/.test(this.versions[v])) { - v++ - continue - } - break - } - if (vr.length > 1) { - vr[1] = this.versions[v] - } else { - vr.push(this.versions[v]) - } - v++ - vulnVer++ - } - // it'll either be just the first version, which means no overlap, - // or the start and end versions, which might be the same version - if (vr.length > 1) { - const tail = this.versions[this.versions.length - 1] - ranges.push(vr[1] === tail ? `>=${vr[0]}` - : vr[0] === vr[1] ? vr[0] - : vr.join(' - ')) - } - } - const metavuln = ranges.join(' || ').trim() - this.range = !metavuln ? '<0.0.0-0' - : semver.simplifyRange(this.versions, metavuln, semverOpt) - } - - // returns true if marked as vulnerable, false if ok - // spec is a dependency specifier, for metavuln cases - // where the version might not be in the packument. if - // we have the packument and spec is not provided, then - // we use the dependency version from the manifest. - testVersion (version, spec = null) { - const sv = String(version) - if (this[_versionVulnMemo].has(sv)) { - return this[_versionVulnMemo].get(sv) - } - - const result = this[_testVersion](version, spec) - if (result) { - this[_markVulnerable](version) - } - this[_versionVulnMemo].set(sv, !!result) - return result - } - - [_markVulnerable] (version) { - const sv = String(version) - if (!this.vulnerableVersions.includes(sv)) { - this.vulnerableVersions.push(sv) - } - } - - [_testVersion] (version, spec) { - const sv = String(version) - if (this.vulnerableVersions.includes(sv)) { - return true - } - - if (this.type === 'advisory') { - // advisory, just test range - return semver.satisfies(version, this.range, semverOpt) - } - - // check the dependency of this version on the vulnerable dep - // if we got a version that's not in the packument, fall back on - // the spec provided, if possible. - const mani = this[_packument]?.versions?.[version] || { - dependencies: { - [this.dependency]: spec, - }, - } - - if (!spec) { - spec = getDepSpec(mani, this.dependency) - } - - // no dep, no vuln - if (spec === null) { - return false - } - - if (!semver.validRange(spec, semverOpt)) { - // not a semver range, nothing we can hope to do about it - return true - } - - const bd = mani.bundleDependencies - const bundled = bd && bd.includes(this[_source].name) - // XXX if bundled, then semver.intersects() means vulnerable - // else, pick a manifest and see if it can't be avoided - // try to pick a version of the dep that isn't vulnerable - const avoid = this[_source].range - - if (bundled) { - return semver.intersects(spec, avoid, semverOpt) - } - - return this[_source].testSpec(spec) - } - - testSpec (spec) { - // testing all the versions is a bit costly, and the spec tends to stay - // consistent across multiple versions, so memoize this as well, in case - // we're testing lots of versions. - const memo = this[_specVulnMemo] - if (memo.has(spec)) { - return memo.get(spec) - } - - const res = this[_testSpec](spec) - memo.set(spec, res) - return res - } - - [_testSpec] (spec) { - for (const v of this.versions) { - const satisfies = semver.satisfies(v, spec) - if (!satisfies) { - continue - } - if (!this.testVersion(v)) { - return false - } - } - // either vulnerable, or not installable because nothing satisfied - // either way, best avoided. - return true - } - - [_testVersions] (versions) { - if (!versions.length) { - return - } - - // set of lists of versions - const versionSets = new Set() - versions = semver.sort(versions.map(v => semver.parse(v, semverOpt))) - - // start out with the versions grouped by major and minor - let last = versions[0].major + '.' + versions[0].minor - let list = [] - versionSets.add(list) - for (const v of versions) { - const k = v.major + '.' + v.minor - if (k !== last) { - last = k - list = [] - versionSets.add(list) - } - list.push(v) - } - - for (const set of versionSets) { - // it's common to have version lists like: - // 1.0.0 - // 1.0.1-alpha.0 - // 1.0.1-alpha.1 - // ... - // 1.0.1-alpha.999 - // 1.0.1 - // 1.0.2-alpha.0 - // ... - // 1.0.2-alpha.99 - // 1.0.2 - // with a huge number of prerelease versions that are not installable - // anyway. - // If mid has a prerelease tag, and set[0] does not, then walk it - // back until we hit a non-prerelease version - // If mid has a prerelease tag, and set[set.length-1] does not, - // then walk it forward until we hit a version without a prerelease tag - // Similarly, if the head/tail is a prerelease, but there is a non-pr - // version in the set, then start there instead. - let h = 0 - const origHeadVuln = this.testVersion(set[h]) - while (h < set.length && /-/.test(String(set[h]))) { - h++ - } - - // don't filter out the whole list! they might all be pr's - if (h === set.length) { - h = 0 - } else if (origHeadVuln) { - // if the original was vulnerable, assume so are all of these - for (let hh = 0; hh < h; hh++) { - this[_markVulnerable](set[hh]) - } - } - - let t = set.length - 1 - const origTailVuln = this.testVersion(set[t]) - while (t > h && /-/.test(String(set[t]))) { - t-- - } - - // don't filter out the whole list! might all be pr's - if (t === h) { - t = set.length - 1 - } else if (origTailVuln) { - // if original tail was vulnerable, assume these are as well - for (let tt = set.length - 1; tt > t; tt--) { - this[_markVulnerable](set[tt]) - } - } - - const headVuln = h === 0 ? origHeadVuln - : this.testVersion(set[h]) - - const tailVuln = t === set.length - 1 ? origTailVuln - : this.testVersion(set[t]) - - // if head and tail both vulnerable, whole list is thrown out - if (headVuln && tailVuln) { - for (let v = h; v < t; v++) { - this[_markVulnerable](set[v]) - } - continue - } - - // if length is 2 or 1, then we marked them all already - if (t < h + 2) { - continue - } - - const mid = Math.floor(set.length / 2) - const pre = set.slice(0, mid) - const post = set.slice(mid) - - // if the parent list wasn't prereleases, then drop pr tags - // from end of the pre list, and beginning of the post list, - // marking as vulnerable if the midpoint item we picked is. - if (!/-/.test(String(pre[0]))) { - const midVuln = this.testVersion(pre[pre.length - 1]) - while (/-/.test(String(pre[pre.length - 1]))) { - const v = pre.pop() - if (midVuln) { - this[_markVulnerable](v) - } - } - } - - if (!/-/.test(String(post[post.length - 1]))) { - const midVuln = this.testVersion(post[0]) - while (/-/.test(String(post[0]))) { - const v = post.shift() - if (midVuln) { - this[_markVulnerable](v) - } - } - } - - versionSets.add(pre) - versionSets.add(post) - } - } -} - -module.exports = Advisory diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/get-dep-spec.js b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/get-dep-spec.js deleted file mode 100644 index 8d1d72b..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/get-dep-spec.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = (mani, name) => { - // skip dev because that only matters at the root, - // where we aren't fetching a manifest from the registry - // with multiple versions anyway. - const { - dependencies: deps = {}, - optionalDependencies: optDeps = {}, - peerDependencies: peerDeps = {}, - } = mani - - return deps && typeof deps[name] === 'string' ? deps[name] - : optDeps && typeof optDeps[name] === 'string' ? optDeps[name] - : peerDeps && typeof peerDeps[name] === 'string' ? peerDeps[name] - : null -} diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/hash.js b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/hash.js deleted file mode 100644 index 634bf99..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/hash.js +++ /dev/null @@ -1,5 +0,0 @@ -const { createHash } = require('crypto') - -module.exports = ({ name, source }) => createHash('sha512') - .update(JSON.stringify([name, source])) - .digest('base64') diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/index.js b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/index.js deleted file mode 100644 index 668f559..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/lib/index.js +++ /dev/null @@ -1,128 +0,0 @@ -// this is the public class that is used by consumers. -// the Advisory class handles all the calculation, and this -// class handles all the IO with the registry and cache. -const pacote = require('pacote') -const cacache = require('cacache') -const Advisory = require('./advisory.js') -const { homedir } = require('os') -const jsonParse = require('json-parse-even-better-errors') - -const _packument = Symbol('packument') -const _cachePut = Symbol('cachePut') -const _cacheGet = Symbol('cacheGet') -const _cacheData = Symbol('cacheData') -const _packuments = Symbol('packuments') -const _cache = Symbol('cache') -const _options = Symbol('options') -const _advisories = Symbol('advisories') -const _calculate = Symbol('calculate') - -class Calculator { - constructor (options = {}) { - this[_options] = { ...options } - this[_cache] = this[_options].cache || (homedir() + '/.npm/_cacache') - this[_options].cache = this[_cache] - this[_packuments] = new Map() - this[_cacheData] = new Map() - this[_advisories] = new Map() - } - - get cache () { - return this[_cache] - } - - get options () { - return { ...this[_options] } - } - - async calculate (name, source) { - const k = `security-advisory:${name}:${source.id}` - if (this[_advisories].has(k)) { - return this[_advisories].get(k) - } - - const p = this[_calculate](name, source) - this[_advisories].set(k, p) - return p - } - - async [_calculate] (name, source) { - const k = `security-advisory:${name}:${source.id}` - const t = `metavuln:calculate:${k}` - process.emit('time', t) - const advisory = new Advisory(name, source, this[_options]) - // load packument and cached advisory - const [cached, packument] = await Promise.all([ - this[_cacheGet](advisory), - this[_packument](name), - ]) - process.emit('time', `metavuln:load:${k}`) - advisory.load(cached, packument) - process.emit('timeEnd', `metavuln:load:${k}`) - if (advisory.updated) { - await this[_cachePut](advisory) - } - this[_advisories].set(k, advisory) - process.emit('timeEnd', t) - return advisory - } - - async [_cachePut] (advisory) { - const { name, id } = advisory - const key = `security-advisory:${name}:${id}` - process.emit('time', `metavuln:cache:put:${key}`) - const data = JSON.stringify(advisory) - const options = { ...this[_options] } - this[_cacheData].set(key, jsonParse(data)) - await cacache.put(this[_cache], key, data, options).catch(() => {}) - process.emit('timeEnd', `metavuln:cache:put:${key}`) - } - - async [_cacheGet] (advisory) { - const { name, id } = advisory - const key = `security-advisory:${name}:${id}` - /* istanbul ignore if - should be impossible, since we memoize the - * advisory object itself using the same key, just being cautious */ - if (this[_cacheData].has(key)) { - return this[_cacheData].get(key) - } - - process.emit('time', `metavuln:cache:get:${key}`) - const p = cacache.get(this[_cache], key, { ...this[_options] }) - .catch(() => ({ data: '{}' })) - .then(({ data }) => { - data = jsonParse(data) - process.emit('timeEnd', `metavuln:cache:get:${key}`) - this[_cacheData].set(key, data) - return data - }) - this[_cacheData].set(key, p) - return p - } - - async [_packument] (name) { - if (this[_packuments].has(name)) { - return this[_packuments].get(name) - } - - process.emit('time', `metavuln:packument:${name}`) - const p = pacote.packument(name, { ...this[_options] }) - .catch((er) => { - // presumably not something from the registry. - // an empty packument will have an effective range of * - return { - name, - versions: {}, - } - }) - .then(paku => { - process.emit('timeEnd', `metavuln:packument:${name}`) - this[_packuments].set(name, paku) - return paku - }) - this[_packuments].set(name, p) - return p - } -} - -module.exports = Calculator diff --git a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/package.json b/node_modules/npm/node_modules/@npmcli/metavuln-calculator/package.json deleted file mode 100644 index 4d0af03..0000000 --- a/node_modules/npm/node_modules/@npmcli/metavuln-calculator/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@npmcli/metavuln-calculator", - "version": "7.0.0", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "description": "Calculate meta-vulnerabilities from package security advisories", - "repository": { - "type": "git", - "url": "https://github.com/npm/metavuln-calculator.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "posttest": "npm run lint", - "snap": "tap", - "postsnap": "npm run lint", - "eslint": "eslint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "check-coverage": true, - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "require-inject": "^1.4.4", - "tap": "^16.0.1" - }, - "dependencies": { - "cacache": "^18.0.0", - "json-parse-even-better-errors": "^3.0.0", - "pacote": "^17.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": "true", - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/name-from-folder/LICENSE b/node_modules/npm/node_modules/@npmcli/name-from-folder/LICENSE deleted file mode 100644 index d24a9fc..0000000 --- a/node_modules/npm/node_modules/@npmcli/name-from-folder/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/name-from-folder/lib/index.js b/node_modules/npm/node_modules/@npmcli/name-from-folder/lib/index.js deleted file mode 100644 index afb1dbb..0000000 --- a/node_modules/npm/node_modules/@npmcli/name-from-folder/lib/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const { basename, dirname } = require('path') - -const getName = (parent, base) => - parent.charAt(0) === '@' ? `${parent}/${base}` : base - -module.exports = dir => dir ? getName(basename(dirname(dir)), basename(dir)) - : false diff --git a/node_modules/npm/node_modules/@npmcli/name-from-folder/package.json b/node_modules/npm/node_modules/@npmcli/name-from-folder/package.json deleted file mode 100644 index f0aa5b1..0000000 --- a/node_modules/npm/node_modules/@npmcli/name-from-folder/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@npmcli/name-from-folder", - "version": "2.0.0", - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "description": "Get the package name from a folder path", - "repository": { - "type": "git", - "url": "https://github.com/npm/name-from-folder.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.11.0", - "tap": "^16.3.2" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.0" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/node-gyp/lib/index.js b/node_modules/npm/node_modules/@npmcli/node-gyp/lib/index.js deleted file mode 100644 index cdf1856..0000000 --- a/node_modules/npm/node_modules/@npmcli/node-gyp/lib/index.js +++ /dev/null @@ -1,14 +0,0 @@ -const util = require('util') -const fs = require('fs') -const { stat } = fs.promises || { stat: util.promisify(fs.stat) } - -async function isNodeGypPackage (path) { - return await stat(`${path}/binding.gyp`) - .then(st => st.isFile()) - .catch(() => false) -} - -module.exports = { - isNodeGypPackage, - defaultGypInstallScript: 'node-gyp rebuild', -} diff --git a/node_modules/npm/node_modules/@npmcli/node-gyp/package.json b/node_modules/npm/node_modules/@npmcli/node-gyp/package.json deleted file mode 100644 index 999572b..0000000 --- a/node_modules/npm/node_modules/@npmcli/node-gyp/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "@npmcli/node-gyp", - "version": "3.0.0", - "description": "Tools for dealing with node-gyp packages", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/node-gyp.git" - }, - "keywords": [ - "npm", - "cli", - "node-gyp" - ], - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "author": "GitHub Inc.", - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^3.0.1", - "@npmcli/template-oss": "4.5.1", - "tap": "^16.0.1" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.5.1" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/package-json/LICENSE b/node_modules/npm/node_modules/@npmcli/package-json/LICENSE deleted file mode 100644 index 6a1f370..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -ISC License - -Copyright GitHub Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/package-json/lib/index.js b/node_modules/npm/node_modules/@npmcli/package-json/lib/index.js deleted file mode 100644 index 0cc41c6..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/lib/index.js +++ /dev/null @@ -1,277 +0,0 @@ -const { readFile, writeFile } = require('fs/promises') -const { resolve } = require('path') -const updateDeps = require('./update-dependencies.js') -const updateScripts = require('./update-scripts.js') -const updateWorkspaces = require('./update-workspaces.js') -const normalize = require('./normalize.js') - -const parseJSON = require('json-parse-even-better-errors') - -// a list of handy specialized helper functions that take -// care of special cases that are handled by the npm cli -const knownSteps = new Set([ - updateDeps, - updateScripts, - updateWorkspaces, -]) - -// list of all keys that are handled by "knownSteps" helpers -const knownKeys = new Set([ - ...updateDeps.knownKeys, - 'scripts', - 'workspaces', -]) - -class PackageJson { - static normalizeSteps = Object.freeze([ - '_id', - '_attributes', - 'bundledDependencies', - 'bundleDependencies', - 'optionalDedupe', - 'scripts', - 'funding', - 'bin', - ]) - - // npm pkg fix - static fixSteps = Object.freeze([ - 'binRefs', - 'bundleDependencies', - 'bundleDependenciesFalse', - 'fixNameField', - 'fixVersionField', - 'fixRepositoryField', - 'fixDependencies', - 'devDependencies', - 'scriptpath', - ]) - - static prepareSteps = Object.freeze([ - '_id', - '_attributes', - 'bundledDependencies', - 'bundleDependencies', - 'bundleDependenciesDeleteFalse', - 'gypfile', - 'serverjs', - 'scriptpath', - 'authors', - 'readme', - 'mans', - 'binDir', - 'gitHead', - 'fillTypes', - 'normalizeData', - 'binRefs', - ]) - - // create a new empty package.json, so we can save at the given path even - // though we didn't start from a parsed file - static async create (path, opts = {}) { - const p = new PackageJson() - await p.create(path) - if (opts.data) { - return p.update(opts.data) - } - return p - } - - // Loads a package.json at given path and JSON parses - static async load (path, opts = {}) { - const p = new PackageJson() - // Avoid try/catch if we aren't going to create - if (!opts.create) { - return p.load(path) - } - - try { - return await p.load(path) - } catch (err) { - if (!err.message.startsWith('Could not read package.json')) { - throw err - } - return await p.create(path) - } - } - - // npm pkg fix - static async fix (path, opts) { - const p = new PackageJson() - await p.load(path, true) - return p.fix(opts) - } - - // read-package-json compatible behavior - static async prepare (path, opts) { - const p = new PackageJson() - await p.load(path, true) - return p.prepare(opts) - } - - // read-package-json-fast compatible behavior - static async normalize (path, opts) { - const p = new PackageJson() - await p.load(path) - return p.normalize(opts) - } - - #path - #manifest - #readFileContent = '' - #canSave = true - - // Load content from given path - async load (path, parseIndex) { - this.#path = path - let parseErr - try { - this.#readFileContent = await readFile(this.filename, 'utf8') - } catch (err) { - err.message = `Could not read package.json: ${err}` - if (!parseIndex) { - throw err - } - parseErr = err - } - - if (parseErr) { - const indexFile = resolve(this.path, 'index.js') - let indexFileContent - try { - indexFileContent = await readFile(indexFile, 'utf8') - } catch (err) { - throw parseErr - } - try { - this.fromComment(indexFileContent) - } catch (err) { - throw parseErr - } - // This wasn't a package.json so prevent saving - this.#canSave = false - return this - } - - return this.fromJSON(this.#readFileContent) - } - - // Load data from a JSON string/buffer - fromJSON (data) { - try { - this.#manifest = parseJSON(data) - } catch (err) { - err.message = `Invalid package.json: ${err}` - throw err - } - return this - } - - // Load data from a comment - // /**package { "name": "foo", "version": "1.2.3", ... } **/ - fromComment (data) { - data = data.split(/^\/\*\*package(?:\s|$)/m) - - if (data.length < 2) { - throw new Error('File has no package in comments') - } - data = data[1] - data = data.split(/\*\*\/$/m) - - if (data.length < 2) { - throw new Error('File has no package in comments') - } - data = data[0] - data = data.replace(/^\s*\*/mg, '') - - this.#manifest = parseJSON(data) - return this - } - - get content () { - return this.#manifest - } - - get path () { - return this.#path - } - - get filename () { - if (this.path) { - return resolve(this.path, 'package.json') - } - return undefined - } - - create (path) { - this.#path = path - this.#manifest = {} - return this - } - - // This should be the ONLY way to set content in the manifest - update (content) { - if (!this.content) { - throw new Error('Can not update without content. Please `load` or `create`') - } - - for (const step of knownSteps) { - this.#manifest = step({ content, originalContent: this.content }) - } - - // unknown properties will just be overwitten - for (const [key, value] of Object.entries(content)) { - if (!knownKeys.has(key)) { - this.content[key] = value - } - } - - return this - } - - async save () { - if (!this.#canSave) { - throw new Error('No package.json to save to') - } - const { - [Symbol.for('indent')]: indent, - [Symbol.for('newline')]: newline, - } = this.content - - const format = indent === undefined ? ' ' : indent - const eol = newline === undefined ? '\n' : newline - const fileContent = `${ - JSON.stringify(this.content, null, format) - }\n` - .replace(/\n/g, eol) - - if (fileContent.trim() !== this.#readFileContent.trim()) { - return await writeFile(this.filename, fileContent) - } - } - - async normalize (opts = {}) { - if (!opts.steps) { - opts.steps = this.constructor.normalizeSteps - } - await normalize(this, opts) - return this - } - - async prepare (opts = {}) { - if (!opts.steps) { - opts.steps = this.constructor.prepareSteps - } - await normalize(this, opts) - return this - } - - async fix (opts = {}) { - // This one is not overridable - opts.steps = this.constructor.fixSteps - await normalize(this, opts) - return this - } -} - -module.exports = PackageJson diff --git a/node_modules/npm/node_modules/@npmcli/package-json/lib/normalize.js b/node_modules/npm/node_modules/@npmcli/package-json/lib/normalize.js deleted file mode 100644 index 204d4d8..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/lib/normalize.js +++ /dev/null @@ -1,558 +0,0 @@ -const semver = require('semver') -const fs = require('fs/promises') -const { glob } = require('glob') -const legacyFixer = require('normalize-package-data/lib/fixer.js') -const legacyMakeWarning = require('normalize-package-data/lib/make_warning.js') -const path = require('path') -const log = require('proc-log') -const git = require('@npmcli/git') -const hostedGitInfo = require('hosted-git-info') - -// used to be npm-normalize-package-bin -function normalizePackageBin (pkg, changes) { - if (pkg.bin) { - if (typeof pkg.bin === 'string' && pkg.name) { - changes?.push('"bin" was converted to an object') - pkg.bin = { [pkg.name]: pkg.bin } - } else if (Array.isArray(pkg.bin)) { - changes?.push('"bin" was converted to an object') - pkg.bin = pkg.bin.reduce((acc, k) => { - acc[path.basename(k)] = k - return acc - }, {}) - } - if (typeof pkg.bin === 'object') { - for (const binKey in pkg.bin) { - if (typeof pkg.bin[binKey] !== 'string') { - delete pkg.bin[binKey] - changes?.push(`removed invalid "bin[${binKey}]"`) - continue - } - const base = path.join('/', path.basename(binKey.replace(/\\|:/g, '/'))).slice(1) - if (!base) { - delete pkg.bin[binKey] - changes?.push(`removed invalid "bin[${binKey}]"`) - continue - } - - const binTarget = path.join('/', pkg.bin[binKey].replace(/\\/g, '/')) - .replace(/\\/g, '/').slice(1) - - if (!binTarget) { - delete pkg.bin[binKey] - changes?.push(`removed invalid "bin[${binKey}]"`) - continue - } - - if (base !== binKey) { - delete pkg.bin[binKey] - changes?.push(`"bin[${binKey}]" was renamed to "bin[${base}]"`) - } - if (binTarget !== pkg.bin[binKey]) { - changes?.push(`"bin[${base}]" script name was cleaned`) - } - pkg.bin[base] = binTarget - } - - if (Object.keys(pkg.bin).length === 0) { - changes?.push('empty "bin" was removed') - delete pkg.bin - } - - return pkg - } - } - delete pkg.bin -} - -function isCorrectlyEncodedName (spec) { - return !spec.match(/[/@\s+%:]/) && - spec === encodeURIComponent(spec) -} - -function isValidScopedPackageName (spec) { - if (spec.charAt(0) !== '@') { - return false - } - - const rest = spec.slice(1).split('/') - if (rest.length !== 2) { - return false - } - - return rest[0] && rest[1] && - rest[0] === encodeURIComponent(rest[0]) && - rest[1] === encodeURIComponent(rest[1]) -} - -// We don't want the `changes` array in here by default because this is a hot -// path for parsing packuments during install. So the calling method passes it -// in if it wants to track changes. -const normalize = async (pkg, { strict, steps, root, changes, allowLegacyCase }) => { - if (!pkg.content) { - throw new Error('Can not normalize without content') - } - const data = pkg.content - const scripts = data.scripts || {} - const pkgId = `${data.name ?? ''}@${data.version ?? ''}` - - // name and version are load bearing so we have to clean them up first - if (steps.includes('fixNameField') || steps.includes('normalizeData')) { - if (!data.name && !strict) { - changes?.push('Missing "name" field was set to an empty string') - data.name = '' - } else { - if (typeof data.name !== 'string') { - throw new Error('name field must be a string.') - } - if (!strict) { - const name = data.name.trim() - if (data.name !== name) { - changes?.push(`Whitespace was trimmed from "name"`) - data.name = name - } - } - - if (data.name.startsWith('.') || - !(isValidScopedPackageName(data.name) || isCorrectlyEncodedName(data.name)) || - (strict && (!allowLegacyCase) && data.name !== data.name.toLowerCase()) || - data.name.toLowerCase() === 'node_modules' || - data.name.toLowerCase() === 'favicon.ico') { - throw new Error('Invalid name: ' + JSON.stringify(data.name)) - } - } - } - - if (steps.includes('fixVersionField') || steps.includes('normalizeData')) { - // allow "loose" semver 1.0 versions in non-strict mode - // enforce strict semver 2.0 compliance in strict mode - const loose = !strict - if (!data.version) { - data.version = '' - } else { - if (!semver.valid(data.version, loose)) { - throw new Error(`Invalid version: "${data.version}"`) - } - const version = semver.clean(data.version, loose) - if (version !== data.version) { - changes?.push(`"version" was cleaned and set to "${version}"`) - data.version = version - } - } - } - // remove attributes that start with "_" - if (steps.includes('_attributes')) { - for (const key in data) { - if (key.startsWith('_')) { - changes?.push(`"${key}" was removed`) - delete pkg.content[key] - } - } - } - - // build the "_id" attribute - if (steps.includes('_id')) { - if (data.name && data.version) { - changes?.push(`"_id" was set to ${pkgId}`) - data._id = pkgId - } - } - - // fix bundledDependencies typo - // normalize bundleDependencies - if (steps.includes('bundledDependencies')) { - if (data.bundleDependencies === undefined && data.bundledDependencies !== undefined) { - data.bundleDependencies = data.bundledDependencies - } - changes?.push(`Deleted incorrect "bundledDependencies"`) - delete data.bundledDependencies - } - // expand "bundleDependencies: true or translate from object" - if (steps.includes('bundleDependencies')) { - const bd = data.bundleDependencies - if (bd === false && !steps.includes('bundleDependenciesDeleteFalse')) { - changes?.push(`"bundleDependencies" was changed from "false" to "[]"`) - data.bundleDependencies = [] - } else if (bd === true) { - changes?.push(`"bundleDependencies" was auto-populated from "dependencies"`) - data.bundleDependencies = Object.keys(data.dependencies || {}) - } else if (bd && typeof bd === 'object') { - if (!Array.isArray(bd)) { - changes?.push(`"bundleDependencies" was changed from an object to an array`) - data.bundleDependencies = Object.keys(bd) - } - } else if ('bundleDependencies' in data) { - changes?.push(`"bundleDependencies" was removed`) - delete data.bundleDependencies - } - } - - // it was once common practice to list deps both in optionalDependencies and - // in dependencies, to support npm versions that did not know about - // optionalDependencies. This is no longer a relevant need, so duplicating - // the deps in two places is unnecessary and excessive. - if (steps.includes('optionalDedupe')) { - if (data.dependencies && - data.optionalDependencies && typeof data.optionalDependencies === 'object') { - for (const name in data.optionalDependencies) { - changes?.push(`optionalDependencies."${name}" was removed`) - delete data.dependencies[name] - } - if (!Object.keys(data.dependencies).length) { - changes?.push(`Empty "optionalDependencies" was removed`) - delete data.dependencies - } - } - } - - // add "install" attribute if any "*.gyp" files exist - if (steps.includes('gypfile')) { - if (!scripts.install && !scripts.preinstall && data.gypfile !== false) { - const files = await glob('*.gyp', { cwd: pkg.path }) - if (files.length) { - scripts.install = 'node-gyp rebuild' - data.scripts = scripts - data.gypfile = true - changes?.push(`"scripts.install" was set to "node-gyp rebuild"`) - changes?.push(`"gypfile" was set to "true"`) - } - } - } - - // add "start" attribute if "server.js" exists - if (steps.includes('serverjs') && !scripts.start) { - try { - await fs.access(path.join(pkg.path, 'server.js')) - scripts.start = 'node server.js' - data.scripts = scripts - changes?.push('"scripts.start" was set to "node server.js"') - } catch { - // do nothing - } - } - - // strip "node_modules/.bin" from scripts entries - // remove invalid scripts entries (non-strings) - if (steps.includes('scripts') || steps.includes('scriptpath')) { - const spre = /^(\.[/\\])?node_modules[/\\].bin[\\/]/ - if (typeof data.scripts === 'object') { - for (const name in data.scripts) { - if (typeof data.scripts[name] !== 'string') { - delete data.scripts[name] - changes?.push(`Invalid scripts."${name}" was removed`) - } else if (steps.includes('scriptpath') && spre.test(data.scripts[name])) { - data.scripts[name] = data.scripts[name].replace(spre, '') - changes?.push(`scripts entry "${name}" was fixed to remove node_modules/.bin reference`) - } - } - } else { - changes?.push(`Removed invalid "scripts"`) - delete data.scripts - } - } - - if (steps.includes('funding')) { - if (data.funding && typeof data.funding === 'string') { - data.funding = { url: data.funding } - changes?.push(`"funding" was changed to an object with a url attribute`) - } - } - - // populate "authors" attribute - if (steps.includes('authors') && !data.contributors) { - try { - const authorData = await fs.readFile(path.join(pkg.path, 'AUTHORS'), 'utf8') - const authors = authorData.split(/\r?\n/g) - .map(line => line.replace(/^\s*#.*$/, '').trim()) - .filter(line => line) - data.contributors = authors - changes?.push('"contributors" was auto-populated with the contents of the "AUTHORS" file') - } catch { - // do nothing - } - } - - // populate "readme" attribute - if (steps.includes('readme') && !data.readme) { - const mdre = /\.m?a?r?k?d?o?w?n?$/i - const files = await glob('{README,README.*}', { cwd: pkg.path, nocase: true, mark: true }) - let readmeFile - for (const file of files) { - // don't accept directories. - if (!file.endsWith(path.sep)) { - if (file.match(mdre)) { - readmeFile = file - break - } - if (file.endsWith('README')) { - readmeFile = file - } - } - } - if (readmeFile) { - const readmeData = await fs.readFile(path.join(pkg.path, readmeFile), 'utf8') - data.readme = readmeData - data.readmeFilename = readmeFile - changes?.push(`"readme" was set to the contents of ${readmeFile}`) - changes?.push(`"readmeFilename" was set to ${readmeFile}`) - } - if (!data.readme) { - // this.warn('missingReadme') - data.readme = 'ERROR: No README data found!' - } - } - - // expand directories.man - if (steps.includes('mans') && !data.man && data.directories?.man) { - const manDir = data.directories.man - const cwd = path.resolve(pkg.path, manDir) - const files = await glob('**/*.[0-9]', { cwd }) - data.man = files.map(man => - path.relative(pkg.path, path.join(cwd, man)).split(path.sep).join('/') - ) - } - - if (steps.includes('bin') || steps.includes('binDir') || steps.includes('binRefs')) { - normalizePackageBin(data, changes) - } - - // expand "directories.bin" - if (steps.includes('binDir') && data.directories?.bin && !data.bin) { - const binsDir = path.resolve(pkg.path, path.join('.', path.join('/', data.directories.bin))) - const bins = await glob('**', { cwd: binsDir }) - data.bin = bins.reduce((acc, binFile) => { - if (binFile && !binFile.startsWith('.')) { - const binName = path.basename(binFile) - acc[binName] = path.join(data.directories.bin, binFile) - } - return acc - }, {}) - // *sigh* - normalizePackageBin(data, changes) - } - - // populate "gitHead" attribute - if (steps.includes('gitHead') && !data.gitHead) { - const gitRoot = await git.find({ cwd: pkg.path, root }) - let head - if (gitRoot) { - try { - head = await fs.readFile(path.resolve(gitRoot, '.git/HEAD'), 'utf8') - } catch (err) { - // do nothing - } - } - let headData - if (head) { - if (head.startsWith('ref: ')) { - const headRef = head.replace(/^ref: /, '').trim() - const headFile = path.resolve(gitRoot, '.git', headRef) - try { - headData = await fs.readFile(headFile, 'utf8') - headData = headData.replace(/^ref: /, '').trim() - } catch (err) { - // do nothing - } - if (!headData) { - const packFile = path.resolve(gitRoot, '.git/packed-refs') - try { - let refs = await fs.readFile(packFile, 'utf8') - if (refs) { - refs = refs.split('\n') - for (let i = 0; i < refs.length; i++) { - const match = refs[i].match(/^([0-9a-f]{40}) (.+)$/) - if (match && match[2].trim() === headRef) { - headData = match[1] - break - } - } - } - } catch { - // do nothing - } - } - } else { - headData = head.trim() - } - } - if (headData) { - data.gitHead = headData - } - } - - // populate "types" attribute - if (steps.includes('fillTypes')) { - const index = data.main || 'index.js' - - if (typeof index !== 'string') { - throw new TypeError('The "main" attribute must be of type string.') - } - - // TODO exports is much more complicated than this in verbose format - // We need to support for instance - - // "exports": { - // ".": [ - // { - // "default": "./lib/npm.js" - // }, - // "./lib/npm.js" - // ], - // "./package.json": "./package.json" - // }, - // as well as conditional exports - - // if (data.exports && typeof data.exports === 'string') { - // index = data.exports - // } - - // if (data.exports && data.exports['.']) { - // index = data.exports['.'] - // if (typeof index !== 'string') { - // } - // } - const extless = path.join(path.dirname(index), path.basename(index, path.extname(index))) - const dts = `./${extless}.d.ts` - const hasDTSFields = 'types' in data || 'typings' in data - if (!hasDTSFields) { - try { - await fs.access(path.join(pkg.path, dts)) - data.types = dts.split(path.sep).join('/') - } catch { - // do nothing - } - } - } - - // "normalizeData" from "read-package-json", which was just a call through to - // "normalize-package-data". We only call the "fixer" functions because - // outside of that it was also clobbering _id (which we already conditionally - // do) and also adding the gypfile script (which we also already - // conditionally do) - - // Some steps are isolated so we can do a limited subset of these in `fix` - if (steps.includes('fixRepositoryField') || steps.includes('normalizeData')) { - if (data.repositories) { - /* eslint-disable-next-line max-len */ - changes?.push(`"repository" was set to the first entry in "repositories" (${data.repository})`) - data.repository = data.repositories[0] - } - if (data.repository) { - if (typeof data.repository === 'string') { - changes?.push('"repository" was changed from a string to an object') - data.repository = { - type: 'git', - url: data.repository, - } - } - if (data.repository.url) { - const hosted = hostedGitInfo.fromUrl(data.repository.url) - let r - if (hosted) { - if (hosted.getDefaultRepresentation() === 'shortcut') { - r = hosted.https() - } else { - r = hosted.toString() - } - if (r !== data.repository.url) { - changes?.push(`"repository.url" was normalized to "${r}"`) - data.repository.url = r - } - } - } - } - } - - if (steps.includes('fixDependencies') || steps.includes('normalizeData')) { - // peerDependencies? - // devDependencies is meaningless here, it's ignored on an installed package - for (const type of ['dependencies', 'devDependencies', 'optionalDependencies']) { - if (data[type]) { - let secondWarning = true - if (typeof data[type] === 'string') { - changes?.push(`"${type}" was converted from a string into an object`) - data[type] = data[type].trim().split(/[\n\r\s\t ,]+/) - secondWarning = false - } - if (Array.isArray(data[type])) { - if (secondWarning) { - changes?.push(`"${type}" was converted from an array into an object`) - } - const o = {} - for (const d of data[type]) { - if (typeof d === 'string') { - const dep = d.trim().split(/(:?[@\s><=])/) - const dn = dep.shift() - const dv = dep.join('').replace(/^@/, '').trim() - o[dn] = dv - } - } - data[type] = o - } - } - } - // normalize-package-data used to put optional dependencies BACK into - // dependencies here, we no longer do this - - for (const deps of ['dependencies', 'devDependencies']) { - if (deps in data) { - if (!data[deps] || typeof data[deps] !== 'object') { - changes?.push(`Removed invalid "${deps}"`) - delete data[deps] - } else { - for (const d in data[deps]) { - const r = data[deps][d] - if (typeof r !== 'string') { - changes?.push(`Removed invalid "${deps}.${d}"`) - delete data[deps][d] - } - const hosted = hostedGitInfo.fromUrl(data[deps][d])?.toString() - if (hosted && hosted !== data[deps][d]) { - changes?.push(`Normalized git reference to "${deps}.${d}"`) - data[deps][d] = hosted.toString() - } - } - } - } - } - } - - if (steps.includes('normalizeData')) { - legacyFixer.warn = function () { - changes?.push(legacyMakeWarning.apply(null, arguments)) - } - - const legacySteps = [ - 'fixDescriptionField', - 'fixModulesField', - 'fixFilesField', - 'fixManField', - 'fixBugsField', - 'fixKeywordsField', - 'fixBundleDependenciesField', - 'fixHomepageField', - 'fixReadmeField', - 'fixLicenseField', - 'fixPeople', - 'fixTypos', - ] - for (const legacyStep of legacySteps) { - legacyFixer[legacyStep](data) - } - } - - // Warn if the bin references don't point to anything. This might be better - // in normalize-package-data if it had access to the file path. - if (steps.includes('binRefs') && data.bin instanceof Object) { - for (const key in data.bin) { - try { - await fs.access(path.resolve(pkg.path, data.bin[key])) - } catch { - log.warn('package-json', pkgId, `No bin file found at ${data.bin[key]}`) - // XXX: should a future breaking change delete bin entries that cannot be accessed? - } - } - } -} - -module.exports = normalize diff --git a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-dependencies.js b/node_modules/npm/node_modules/@npmcli/package-json/lib/update-dependencies.js deleted file mode 100644 index 7259949..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-dependencies.js +++ /dev/null @@ -1,75 +0,0 @@ -const depTypes = new Set([ - 'dependencies', - 'optionalDependencies', - 'devDependencies', - 'peerDependencies', -]) - -// sort alphabetically all types of deps for a given package -const orderDeps = (content) => { - for (const type of depTypes) { - if (content && content[type]) { - content[type] = Object.keys(content[type]) - .sort((a, b) => a.localeCompare(b, 'en')) - .reduce((res, key) => { - res[key] = content[type][key] - return res - }, {}) - } - } - return content -} - -const updateDependencies = ({ content, originalContent }) => { - const pkg = orderDeps({ - ...content, - }) - - // optionalDependencies don't need to be repeated in two places - if (pkg.dependencies) { - if (pkg.optionalDependencies) { - for (const name of Object.keys(pkg.optionalDependencies)) { - delete pkg.dependencies[name] - } - } - } - - const result = { ...originalContent } - - // loop through all types of dependencies and update package json pkg - for (const type of depTypes) { - if (pkg[type]) { - result[type] = pkg[type] - } - - // prune empty type props from resulting object - const emptyDepType = - pkg[type] - && typeof pkg === 'object' - && Object.keys(pkg[type]).length === 0 - if (emptyDepType) { - delete result[type] - } - } - - // if original package.json had dep in peerDeps AND deps, preserve that. - const { dependencies: origProd, peerDependencies: origPeer } = - originalContent || {} - const { peerDependencies: newPeer } = result - if (origProd && origPeer && newPeer) { - // we have original prod/peer deps, and new peer deps - // copy over any that were in both in the original - for (const name of Object.keys(origPeer)) { - if (origProd[name] !== undefined && newPeer[name] !== undefined) { - result.dependencies = result.dependencies || {} - result.dependencies[name] = newPeer[name] - } - } - } - - return result -} - -updateDependencies.knownKeys = depTypes - -module.exports = updateDependencies diff --git a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-scripts.js b/node_modules/npm/node_modules/@npmcli/package-json/lib/update-scripts.js deleted file mode 100644 index 30495e5..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-scripts.js +++ /dev/null @@ -1,29 +0,0 @@ -const updateScripts = ({ content, originalContent = {} }) => { - const newScripts = content.scripts - - if (!newScripts) { - return originalContent - } - - // validate scripts content being appended - const hasInvalidScripts = () => - Object.entries(newScripts) - .some(([key, value]) => - typeof key !== 'string' || typeof value !== 'string') - if (hasInvalidScripts()) { - throw Object.assign( - new TypeError( - 'package.json scripts should be a key-value pair of strings.'), - { code: 'ESCRIPTSINVALID' } - ) - } - - return { - ...originalContent, - scripts: { - ...newScripts, - }, - } -} - -module.exports = updateScripts diff --git a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-workspaces.js b/node_modules/npm/node_modules/@npmcli/package-json/lib/update-workspaces.js deleted file mode 100644 index 04bf632..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/lib/update-workspaces.js +++ /dev/null @@ -1,26 +0,0 @@ -const updateWorkspaces = ({ content, originalContent = {} }) => { - const newWorkspaces = content.workspaces - - if (!newWorkspaces) { - return originalContent - } - - // validate workspaces content being appended - const hasInvalidWorkspaces = () => - newWorkspaces.some(w => !(typeof w === 'string')) - if (!newWorkspaces.length || hasInvalidWorkspaces()) { - throw Object.assign( - new TypeError('workspaces should be an array of strings.'), - { code: 'EWORKSPACESINVALID' } - ) - } - - return { - ...originalContent, - workspaces: [ - ...newWorkspaces, - ], - } -} - -module.exports = updateWorkspaces diff --git a/node_modules/npm/node_modules/@npmcli/package-json/package.json b/node_modules/npm/node_modules/@npmcli/package-json/package.json deleted file mode 100644 index ab320e8..0000000 --- a/node_modules/npm/node_modules/@npmcli/package-json/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "@npmcli/package-json", - "version": "5.0.0", - "description": "Programmatic API to update package.json", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "snap": "tap", - "test": "tap", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "keywords": [ - "npm", - "oss" - ], - "author": "GitHub Inc.", - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "read-package-json": "^6.0.4", - "read-package-json-fast": "^3.0.2", - "tap": "^16.0.1" - }, - "dependencies": { - "@npmcli/git": "^5.0.0", - "glob": "^10.2.2", - "hosted-git-info": "^7.0.0", - "json-parse-even-better-errors": "^3.0.0", - "normalize-package-data": "^6.0.0", - "proc-log": "^3.0.0", - "semver": "^7.5.3" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/package-json.git" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": "true", - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ] - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/promise-spawn/LICENSE b/node_modules/npm/node_modules/@npmcli/promise-spawn/LICENSE deleted file mode 100644 index 8f90f96..0000000 --- a/node_modules/npm/node_modules/@npmcli/promise-spawn/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE NPM DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE NPM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, -OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/escape.js b/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/escape.js deleted file mode 100644 index 9aca8bd..0000000 --- a/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/escape.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict' - -// eslint-disable-next-line max-len -// this code adapted from: https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/ -const cmd = (input, doubleEscape) => { - if (!input.length) { - return '""' - } - - let result - if (!/[ \t\n\v"]/.test(input)) { - result = input - } else { - result = '"' - for (let i = 0; i <= input.length; ++i) { - let slashCount = 0 - while (input[i] === '\\') { - ++i - ++slashCount - } - - if (i === input.length) { - result += '\\'.repeat(slashCount * 2) - break - } - - if (input[i] === '"') { - result += '\\'.repeat(slashCount * 2 + 1) - result += input[i] - } else { - result += '\\'.repeat(slashCount) - result += input[i] - } - } - result += '"' - } - - // and finally, prefix shell meta chars with a ^ - result = result.replace(/[ !%^&()<>|"]/g, '^$&') - if (doubleEscape) { - result = result.replace(/[ !%^&()<>|"]/g, '^$&') - } - - return result -} - -const sh = (input) => { - if (!input.length) { - return `''` - } - - if (!/[\t\n\r "#$&'()*;<>?\\`|~]/.test(input)) { - return input - } - - // replace single quotes with '\'' and wrap the whole result in a fresh set of quotes - const result = `'${input.replace(/'/g, `'\\''`)}'` - // if the input string already had single quotes around it, clean those up - .replace(/^(?:'')+(?!$)/, '') - .replace(/\\'''/g, `\\'`) - - return result -} - -module.exports = { - cmd, - sh, -} diff --git a/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js b/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js deleted file mode 100644 index 571ff6b..0000000 --- a/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js +++ /dev/null @@ -1,195 +0,0 @@ -'use strict' - -const { spawn } = require('child_process') -const os = require('os') -const which = require('which') - -const escape = require('./escape.js') - -// 'extra' object is for decorating the error a bit more -const promiseSpawn = (cmd, args, opts = {}, extra = {}) => { - if (opts.shell) { - return spawnWithShell(cmd, args, opts, extra) - } - - let proc - - const p = new Promise((res, rej) => { - proc = spawn(cmd, args, opts) - - const stdout = [] - const stderr = [] - - const reject = er => rej(Object.assign(er, { - cmd, - args, - ...stdioResult(stdout, stderr, opts), - ...extra, - })) - - proc.on('error', reject) - - if (proc.stdout) { - proc.stdout.on('data', c => stdout.push(c)).on('error', reject) - proc.stdout.on('error', er => reject(er)) - } - - if (proc.stderr) { - proc.stderr.on('data', c => stderr.push(c)).on('error', reject) - proc.stderr.on('error', er => reject(er)) - } - - proc.on('close', (code, signal) => { - const result = { - cmd, - args, - code, - signal, - ...stdioResult(stdout, stderr, opts), - ...extra, - } - - if (code || signal) { - rej(Object.assign(new Error('command failed'), result)) - } else { - res(result) - } - }) - }) - - p.stdin = proc.stdin - p.process = proc - return p -} - -const spawnWithShell = (cmd, args, opts, extra) => { - let command = opts.shell - // if shell is set to true, we use a platform default. we can't let the core - // spawn method decide this for us because we need to know what shell is in use - // ahead of time so that we can escape arguments properly. we don't need coverage here. - if (command === true) { - // istanbul ignore next - command = process.platform === 'win32' ? process.env.ComSpec : 'sh' - } - - const options = { ...opts, shell: false } - const realArgs = [] - let script = cmd - - // first, determine if we're in windows because if we are we need to know if we're - // running an .exe or a .cmd/.bat since the latter requires extra escaping - const isCmd = /(?:^|\\)cmd(?:\.exe)?$/i.test(command) - if (isCmd) { - let doubleEscape = false - - // find the actual command we're running - let initialCmd = '' - let insideQuotes = false - for (let i = 0; i < cmd.length; ++i) { - const char = cmd.charAt(i) - if (char === ' ' && !insideQuotes) { - break - } - - initialCmd += char - if (char === '"' || char === "'") { - insideQuotes = !insideQuotes - } - } - - let pathToInitial - try { - pathToInitial = which.sync(initialCmd, { - path: (options.env && options.env.PATH) || process.env.PATH, - pathext: (options.env && options.env.PATHEXT) || process.env.PATHEXT, - }).toLowerCase() - } catch (err) { - pathToInitial = initialCmd.toLowerCase() - } - - doubleEscape = pathToInitial.endsWith('.cmd') || pathToInitial.endsWith('.bat') - for (const arg of args) { - script += ` ${escape.cmd(arg, doubleEscape)}` - } - realArgs.push('/d', '/s', '/c', script) - options.windowsVerbatimArguments = true - } else { - for (const arg of args) { - script += ` ${escape.sh(arg)}` - } - realArgs.push('-c', script) - } - - return promiseSpawn(command, realArgs, options, extra) -} - -// open a file with the default application as defined by the user's OS -const open = (_args, opts = {}, extra = {}) => { - const options = { ...opts, shell: true } - const args = [].concat(_args) - - let platform = process.platform - // process.platform === 'linux' may actually indicate WSL, if that's the case - // we want to treat things as win32 anyway so the host can open the argument - if (platform === 'linux' && os.release().toLowerCase().includes('microsoft')) { - platform = 'win32' - } - - let command = options.command - if (!command) { - if (platform === 'win32') { - // spawnWithShell does not do the additional os.release() check, so we - // have to force the shell here to make sure we treat WSL as windows. - options.shell = process.env.ComSpec - // also, the start command accepts a title so to make sure that we don't - // accidentally interpret the first arg as the title, we stick an empty - // string immediately after the start command - command = 'start ""' - } else if (platform === 'darwin') { - command = 'open' - } else { - command = 'xdg-open' - } - } - - return spawnWithShell(command, args, options, extra) -} -promiseSpawn.open = open - -const isPipe = (stdio = 'pipe', fd) => { - if (stdio === 'pipe' || stdio === null) { - return true - } - - if (Array.isArray(stdio)) { - return isPipe(stdio[fd], fd) - } - - return false -} - -const stdioResult = (stdout, stderr, { stdioString = true, stdio }) => { - const result = { - stdout: null, - stderr: null, - } - - // stdio is [stdin, stdout, stderr] - if (isPipe(stdio, 1)) { - result.stdout = Buffer.concat(stdout) - if (stdioString) { - result.stdout = result.stdout.toString().trim() - } - } - - if (isPipe(stdio, 2)) { - result.stderr = Buffer.concat(stderr) - if (stdioString) { - result.stderr = result.stderr.toString().trim() - } - } - - return result -} - -module.exports = promiseSpawn diff --git a/node_modules/npm/node_modules/@npmcli/promise-spawn/package.json b/node_modules/npm/node_modules/@npmcli/promise-spawn/package.json deleted file mode 100644 index ffd89f1..0000000 --- a/node_modules/npm/node_modules/@npmcli/promise-spawn/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@npmcli/promise-spawn", - "version": "7.0.0", - "files": [ - "bin/", - "lib/" - ], - "main": "./lib/index.js", - "description": "spawn processes the way the npm cli likes to do", - "repository": { - "type": "git", - "url": "https://github.com/npm/promise-spawn.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "spawk": "^1.7.1", - "tap": "^16.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ], - "version": "4.18.0", - "publish": true - }, - "dependencies": { - "which": "^4.0.0" - } -} diff --git a/node_modules/npm/node_modules/@npmcli/query/LICENSE b/node_modules/npm/node_modules/@npmcli/query/LICENSE deleted file mode 100644 index 5fc208f..0000000 --- a/node_modules/npm/node_modules/@npmcli/query/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/query/lib/index.js b/node_modules/npm/node_modules/@npmcli/query/lib/index.js deleted file mode 100644 index c7888d5..0000000 --- a/node_modules/npm/node_modules/@npmcli/query/lib/index.js +++ /dev/null @@ -1,213 +0,0 @@ -'use strict' - -const parser = require('postcss-selector-parser') - -const arrayDelimiter = Symbol('arrayDelimiter') - -const escapeSlashes = str => - str.replace(/\//g, '\\/') - -const unescapeSlashes = str => - str.replace(/\\\//g, '/') - -// recursively fixes up any :attr pseudo-class found -const fixupAttr = astNode => { - const properties = [] - const matcher = {} - for (const selectorAstNode of astNode.nodes) { - const [firstAstNode] = selectorAstNode.nodes - if (firstAstNode.type === 'tag') { - properties.push(firstAstNode.value) - } - } - - const lastSelectorAstNode = astNode.nodes.pop() - const [attributeAstNode] = lastSelectorAstNode.nodes - - if (attributeAstNode.value === ':attr') { - const appendParts = fixupAttr(attributeAstNode) - properties.push(arrayDelimiter, ...appendParts.lookupProperties) - matcher.qualifiedAttribute = appendParts.attributeMatcher.qualifiedAttribute - matcher.operator = appendParts.attributeMatcher.operator - matcher.value = appendParts.attributeMatcher.value - - // backwards compatibility - matcher.attribute = appendParts.attributeMatcher.attribute - - if (appendParts.attributeMatcher.insensitive) { - matcher.insensitive = true - } - } else { - if (attributeAstNode.type !== 'attribute') { - throw Object.assign( - new Error('`:attr` pseudo-class expects an attribute matcher as the last value'), - { code: 'EQUERYATTR' } - ) - } - - matcher.qualifiedAttribute = unescapeSlashes(attributeAstNode.qualifiedAttribute) - matcher.operator = attributeAstNode.operator - matcher.value = attributeAstNode.value - - // backwards compatibility - matcher.attribute = matcher.qualifiedAttribute - - if (attributeAstNode.insensitive) { - matcher.insensitive = true - } - } - - astNode.lookupProperties = properties - astNode.attributeMatcher = matcher - astNode.nodes.length = 0 - return astNode -} - -// fixed up nested pseudo nodes will have their internal selectors moved -// to a new root node that will be referenced by the `nestedNode` property, -// this tweak makes it simpler to reuse `retrieveNodesFromParsedAst` to -// recursively parse and extract results from the internal selectors -const fixupNestedPseudo = astNode => { - // create a new ast root node and relocate any children - // selectors of the current ast node to this new root - const newRootNode = parser.root() - astNode.nestedNode = newRootNode - newRootNode.nodes = [...astNode.nodes] - - // clean up the ast by removing the children nodes from the - // current ast node while also cleaning up their `parent` refs - astNode.nodes.length = 0 - for (const currAstNode of newRootNode.nodes) { - currAstNode.parent = newRootNode - } - - // recursively fixup nodes of any nested selector - transformAst(newRootNode) -} - -// :semver(, [version|range|selector], [function]) -// note: the first or second parameter must be a static version or range -const fixupSemverSpecs = astNode => { - // if we have three nodes, the last is the semver function to use, pull that out first - if (astNode.nodes.length === 3) { - const funcNode = astNode.nodes.pop().nodes[0] - if (funcNode.type === 'tag') { - astNode.semverFunc = funcNode.value - } else if (funcNode.type === 'string') { - // a string is always in some type of quotes, we don't want those so slice them off - astNode.semverFunc = funcNode.value.slice(1, -1) - } else { - // anything that isn't a tag or a string isn't a function name - throw Object.assign( - new Error('`:semver` pseudo-class expects a function name as last value'), - { code: 'ESEMVERFUNC' } - ) - } - } - - // now if we have 1 node, it's a static value - // istanbul ignore else - if (astNode.nodes.length === 1) { - const semverNode = astNode.nodes.pop() - astNode.semverValue = semverNode.nodes.reduce((res, next) => `${res}${String(next)}`, '') - } else if (astNode.nodes.length === 2) { - // and if we have two nodes, one of them is a static value and we need to determine which it is - for (let i = 0; i < astNode.nodes.length; ++i) { - const type = astNode.nodes[i].nodes[0].type - // the type of the first child may be combinator for ranges, such as >14 - if (type === 'tag' || type === 'combinator') { - const semverNode = astNode.nodes.splice(i, 1)[0] - astNode.semverValue = semverNode.nodes.reduce((res, next) => `${res}${String(next)}`, '') - astNode.semverPosition = i - break - } - } - - if (typeof astNode.semverValue === 'undefined') { - throw Object.assign( - new Error('`:semver` pseudo-class expects a static value in the first or second position'), - { code: 'ESEMVERVALUE' } - ) - } - } - - // if we got here, the last remaining child should be attribute selector - if (astNode.nodes.length === 1) { - fixupAttr(astNode) - } else { - // if we don't have a selector, we default to `[version]` - astNode.attributeMatcher = { - insensitive: false, - attribute: 'version', - qualifiedAttribute: 'version', - } - astNode.lookupProperties = [] - } - - astNode.nodes.length = 0 -} - -const fixupTypes = astNode => { - const [valueAstNode] = astNode.nodes[0].nodes - const { value } = valueAstNode || {} - astNode.typeValue = value - astNode.nodes.length = 0 -} - -const fixupPaths = astNode => { - astNode.pathValue = unescapeSlashes(String(astNode.nodes[0])) - astNode.nodes.length = 0 -} - -const fixupOutdated = astNode => { - if (astNode.nodes.length) { - astNode.outdatedKind = String(astNode.nodes[0]) - astNode.nodes.length = 0 - } -} - -// a few of the supported ast nodes need to be tweaked in order to properly be -// interpreted as proper arborist query selectors, namely semver ranges from -// both ids and :semver pseudo-class selectors need to be translated from what -// are usually multiple ast nodes, such as: tag:1, class:.0, class:.0 to a -// single `1.0.0` value, other pseudo-class selectors also get preprocessed in -// order to make it simpler to execute later when traversing each ast node -// using rootNode.walk(), such as :path, :type, etc. transformAst handles all -// these modifications to the parsed ast by doing an extra, initial traversal -// of the parsed ast from the query and modifying the parsed nodes accordingly -const transformAst = selector => { - selector.walk((nextAstNode) => { - switch (nextAstNode.value) { - case ':attr': - return fixupAttr(nextAstNode) - case ':is': - case ':has': - case ':not': - return fixupNestedPseudo(nextAstNode) - case ':path': - return fixupPaths(nextAstNode) - case ':semver': - return fixupSemverSpecs(nextAstNode) - case ':type': - return fixupTypes(nextAstNode) - case ':outdated': - return fixupOutdated(nextAstNode) - } - }) -} - -const queryParser = (query) => { - // if query is an empty string or any falsy - // value, just returns an empty result - if (!query) { - return [] - } - - return parser(transformAst) - .astSync(escapeSlashes(query), { lossless: false }) -} - -module.exports = { - parser: queryParser, - arrayDelimiter, -} diff --git a/node_modules/npm/node_modules/@npmcli/query/package.json b/node_modules/npm/node_modules/@npmcli/query/package.json deleted file mode 100644 index 5f9fb27..0000000 --- a/node_modules/npm/node_modules/@npmcli/query/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@npmcli/query", - "version": "3.0.1", - "description": "npm query parser and tools", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint" - }, - "contributors": [ - { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com", - "twitter": "ruyadorno" - } - ], - "keywords": [ - "ast", - "npm", - "npmcli", - "parser", - "postcss", - "postcss-selector-parser", - "query" - ], - "author": "GitHub Inc.", - "license": "ISC", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": true - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "tap": "^16.2.0" - }, - "dependencies": { - "postcss-selector-parser": "^6.0.10" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/query.git" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@npmcli/run-script/LICENSE b/node_modules/npm/node_modules/@npmcli/run-script/LICENSE deleted file mode 100644 index 19cec97..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/is-server-package.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/is-server-package.js deleted file mode 100644 index d168623..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/is-server-package.js +++ /dev/null @@ -1,12 +0,0 @@ -const util = require('util') -const fs = require('fs') -const { stat } = fs.promises || { stat: util.promisify(fs.stat) } -const { resolve } = require('path') -module.exports = async path => { - try { - const st = await stat(resolve(path, 'server.js')) - return st.isFile() - } catch (er) { - return false - } -} diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/is-windows.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/is-windows.js deleted file mode 100644 index 651917e..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/is-windows.js +++ /dev/null @@ -1,2 +0,0 @@ -const platform = process.env.__FAKE_TESTING_PLATFORM__ || process.platform -module.exports = platform === 'win32' diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js deleted file mode 100644 index 2b2f96a..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/make-spawn-args.js +++ /dev/null @@ -1,40 +0,0 @@ -/* eslint camelcase: "off" */ -const setPATH = require('./set-path.js') -const { resolve } = require('path') -const npm_config_node_gyp = require.resolve('node-gyp/bin/node-gyp.js') - -const makeSpawnArgs = options => { - const { - event, - path, - scriptShell = true, - binPaths, - env = {}, - stdio, - cmd, - args = [], - stdioString, - } = options - - const spawnEnv = setPATH(path, binPaths, { - // we need to at least save the PATH environment var - ...process.env, - ...env, - npm_package_json: resolve(path, 'package.json'), - npm_lifecycle_event: event, - npm_lifecycle_script: cmd, - npm_config_node_gyp, - }) - - const spawnOpts = { - env: spawnEnv, - stdioString, - stdio, - cwd: path, - shell: scriptShell, - } - - return [cmd, args, spawnOpts] -} - -module.exports = makeSpawnArgs diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp b/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp deleted file mode 100755 index 5bec64d..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env sh -node "$npm_config_node_gyp" "$@" diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd b/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd deleted file mode 100755 index 4c6987a..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp.cmd +++ /dev/null @@ -1 +0,0 @@ -@node "%npm_config_node_gyp%" %* diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/package-envs.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/package-envs.js deleted file mode 100644 index 6b538e5..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/package-envs.js +++ /dev/null @@ -1,26 +0,0 @@ -// https://github.com/npm/rfcs/pull/183 - -const envVal = val => Array.isArray(val) ? val.map(v => envVal(v)).join('\n\n') - : val === null || val === false ? '' - : String(val) - -const packageEnvs = (env, vals, prefix) => { - for (const [key, val] of Object.entries(vals)) { - if (val === undefined) { - continue - } else if (val && !Array.isArray(val) && typeof val === 'object') { - packageEnvs(env, val, `${prefix}${key}_`) - } else { - env[`${prefix}${key}`] = envVal(val) - } - } - return env -} - -module.exports = (env, pkg) => packageEnvs({ ...env }, { - name: pkg.name, - version: pkg.version, - config: pkg.config, - engines: pkg.engines, - bin: pkg.bin, -}, 'npm_package_') diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js deleted file mode 100644 index a551828..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js +++ /dev/null @@ -1,112 +0,0 @@ -const makeSpawnArgs = require('./make-spawn-args.js') -const promiseSpawn = require('@npmcli/promise-spawn') -const packageEnvs = require('./package-envs.js') -const { isNodeGypPackage, defaultGypInstallScript } = require('@npmcli/node-gyp') -const signalManager = require('./signal-manager.js') -const isServerPackage = require('./is-server-package.js') - -// you wouldn't like me when I'm angry... -const bruce = (id, event, cmd, args) => { - let banner = id - ? `\n> ${id} ${event}\n` - : `\n> ${event}\n` - banner += `> ${cmd.trim().replace(/\n/g, '\n> ')}` - if (args.length) { - banner += ` ${args.join(' ')}` - } - banner += '\n' - return banner -} - -const runScriptPkg = async options => { - const { - event, - path, - scriptShell, - binPaths = false, - env = {}, - stdio = 'pipe', - pkg, - args = [], - stdioString, - // note: only used when stdio:inherit - banner = true, - // how long to wait for a process.kill signal - // only exposed here so that we can make the test go a bit faster. - signalTimeout = 500, - } = options - - const { scripts = {}, gypfile } = pkg - let cmd = null - if (options.cmd) { - cmd = options.cmd - } else if (pkg.scripts && pkg.scripts[event]) { - cmd = pkg.scripts[event] - } else if ( - // If there is no preinstall or install script, default to rebuilding node-gyp packages. - event === 'install' && - !scripts.install && - !scripts.preinstall && - gypfile !== false && - await isNodeGypPackage(path) - ) { - cmd = defaultGypInstallScript - } else if (event === 'start' && await isServerPackage(path)) { - cmd = 'node server.js' - } - - if (!cmd) { - return { code: 0, signal: null } - } - - if (stdio === 'inherit' && banner !== false) { - // we're dumping to the parent's stdout, so print the banner - console.log(bruce(pkg._id, event, cmd, args)) - } - - const [spawnShell, spawnArgs, spawnOpts] = makeSpawnArgs({ - event, - path, - scriptShell, - binPaths, - env: packageEnvs(env, pkg), - stdio, - cmd, - args, - stdioString, - }) - - const p = promiseSpawn(spawnShell, spawnArgs, spawnOpts, { - event, - script: cmd, - pkgid: pkg._id, - path, - }) - - if (stdio === 'inherit') { - signalManager.add(p.process) - } - - if (p.stdin) { - p.stdin.end() - } - - return p.catch(er => { - const { signal } = er - if (stdio === 'inherit' && signal) { - // by the time we reach here, the child has already exited. we send the - // signal back to ourselves again so that npm will exit with the same - // status as the child - process.kill(process.pid, signal) - - // just in case we don't die, reject after 500ms - // this also keeps the node process open long enough to actually - // get the signal, rather than terminating gracefully. - return new Promise((res, rej) => setTimeout(() => rej(er), signalTimeout)) - } else { - throw er - } - }) -} - -module.exports = runScriptPkg diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js deleted file mode 100644 index e9d1826..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/run-script.js +++ /dev/null @@ -1,14 +0,0 @@ -const rpj = require('read-package-json-fast') -const runScriptPkg = require('./run-script-pkg.js') -const validateOptions = require('./validate-options.js') -const isServerPackage = require('./is-server-package.js') - -const runScript = options => { - validateOptions(options) - const { pkg, path } = options - return pkg ? runScriptPkg(options) - : rpj(path + '/package.json') - .then(readPackage => runScriptPkg({ ...options, pkg: readPackage })) -} - -module.exports = Object.assign(runScript, { isServerPackage }) diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/set-path.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/set-path.js deleted file mode 100644 index c59c270..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/set-path.js +++ /dev/null @@ -1,45 +0,0 @@ -const { resolve, dirname, delimiter } = require('path') -// the path here is relative, even though it does not need to be -// in order to make the posix tests pass in windows -const nodeGypPath = resolve(__dirname, '../lib/node-gyp-bin') - -// Windows typically calls its PATH environ 'Path', but this is not -// guaranteed, nor is it guaranteed to be the only one. Merge them -// all together in the order they appear in the object. -const setPATH = (projectPath, binPaths, env) => { - const PATH = Object.keys(env).filter(p => /^path$/i.test(p) && env[p]) - .map(p => env[p].split(delimiter)) - .reduce((set, p) => set.concat(p.filter(concatted => !set.includes(concatted))), []) - .join(delimiter) - - const pathArr = [] - if (binPaths) { - pathArr.push(...binPaths) - } - // unshift the ./node_modules/.bin from every folder - // walk up until dirname() does nothing, at the root - // XXX we should specify a cwd that we don't go above - let p = projectPath - let pp - do { - pathArr.push(resolve(p, 'node_modules', '.bin')) - pp = p - p = dirname(p) - } while (p !== pp) - pathArr.push(nodeGypPath, PATH) - - const pathVal = pathArr.join(delimiter) - - // XXX include the node-gyp-bin path somehow? Probably better for - // npm or arborist or whoever to just provide that by putting it in - // the PATH environ, since that's preserved anyway. - for (const key of Object.keys(env)) { - if (/^path$/i.test(key)) { - env[key] = pathVal - } - } - - return env -} - -module.exports = setPATH diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/signal-manager.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/signal-manager.js deleted file mode 100644 index efc00b4..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/signal-manager.js +++ /dev/null @@ -1,49 +0,0 @@ -const runningProcs = new Set() -let handlersInstalled = false - -// NOTE: these signals aren't actually forwarded anywhere. they're trapped and -// ignored until all child processes have exited. in our next breaking change -// we should rename this -const forwardedSignals = [ - 'SIGINT', - 'SIGTERM', -] - -// no-op, this is so receiving the signal doesn't cause us to exit immediately -// instead, we exit after all children have exited when we re-send the signal -// to ourselves. see the catch handler at the bottom of run-script-pkg.js -// istanbul ignore next - this function does nothing -const handleSignal = () => {} -const setupListeners = () => { - for (const signal of forwardedSignals) { - process.on(signal, handleSignal) - } - handlersInstalled = true -} - -const cleanupListeners = () => { - if (runningProcs.size === 0) { - for (const signal of forwardedSignals) { - process.removeListener(signal, handleSignal) - } - handlersInstalled = false - } -} - -const add = proc => { - runningProcs.add(proc) - if (!handlersInstalled) { - setupListeners() - } - - proc.once('exit', () => { - runningProcs.delete(proc) - cleanupListeners() - }) -} - -module.exports = { - add, - handleSignal, - forwardedSignals, -} diff --git a/node_modules/npm/node_modules/@npmcli/run-script/lib/validate-options.js b/node_modules/npm/node_modules/@npmcli/run-script/lib/validate-options.js deleted file mode 100644 index 8d85591..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/lib/validate-options.js +++ /dev/null @@ -1,39 +0,0 @@ -const validateOptions = options => { - if (typeof options !== 'object' || !options) { - throw new TypeError('invalid options object provided to runScript') - } - - const { - event, - path, - scriptShell, - env = {}, - stdio = 'pipe', - args = [], - cmd, - } = options - - if (!event || typeof event !== 'string') { - throw new TypeError('valid event not provided to runScript') - } - if (!path || typeof path !== 'string') { - throw new TypeError('valid path not provided to runScript') - } - if (scriptShell !== undefined && typeof scriptShell !== 'string') { - throw new TypeError('invalid scriptShell option provided to runScript') - } - if (typeof env !== 'object' || !env) { - throw new TypeError('invalid env option provided to runScript') - } - if (typeof stdio !== 'string' && !Array.isArray(stdio)) { - throw new TypeError('invalid stdio option provided to runScript') - } - if (!Array.isArray(args) || args.some(a => typeof a !== 'string')) { - throw new TypeError('invalid args option provided to runScript') - } - if (cmd !== undefined && typeof cmd !== 'string') { - throw new TypeError('invalid cmd option provided to runScript') - } -} - -module.exports = validateOptions diff --git a/node_modules/npm/node_modules/@npmcli/run-script/package.json b/node_modules/npm/node_modules/@npmcli/run-script/package.json deleted file mode 100644 index 21f00c7..0000000 --- a/node_modules/npm/node_modules/@npmcli/run-script/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "@npmcli/run-script", - "version": "7.0.2", - "description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "test": "tap", - "eslint": "eslint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "postlint": "template-oss-check", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "require-inject": "^1.4.4", - "tap": "^16.0.1" - }, - "dependencies": { - "@npmcli/node-gyp": "^3.0.0", - "@npmcli/promise-spawn": "^7.0.0", - "node-gyp": "^10.0.0", - "read-package-json-fast": "^3.0.0", - "which": "^4.0.0" - }, - "files": [ - "bin/", - "lib/" - ], - "main": "lib/run-script.js", - "repository": { - "type": "git", - "url": "https://github.com/npm/run-script.git" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.19.0", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/LICENSE b/node_modules/npm/node_modules/@pkgjs/parseargs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js deleted file mode 100644 index 0a67972..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/is-default-value.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -// This example shows how to understand if a default value is used or not. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string', default: 'FOO' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const isFileDefault = !tokens.some((token) => token.kind === 'option' && - token.name === 'file' -); - -console.log(values); -console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`); - -// Try the following: -// node is-default-value.js -// node is-default-value.js -f FILE -// node is-default-value.js --file FILE diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js deleted file mode 100644 index 943e643..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Require the use of `=` for long options and values by blocking -// the use of space separated values. -// So allow `--foo=bar`, and not allow `--foo bar`. -// -// Note: this is not a common behaviour, most CLIs allow both forms. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string' }, - log: { type: 'string' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const badToken = tokens.find((token) => token.kind === 'option' && - token.value != null && - token.rawName.startsWith('--') && - !token.inlineValue -); -if (badToken) { - throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`); -} - -console.log(values); - -// Try the following: -// node limit-long-syntax.js -f FILE --log=LOG -// node limit-long-syntax.js --file FILE diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/negate.js b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/negate.js deleted file mode 100644 index b663469..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/negate.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// How might I add my own support for --no-foo? - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - 'color': { type: 'boolean' }, - 'no-color': { type: 'boolean' }, - 'logfile': { type: 'string' }, - 'no-logfile': { type: 'boolean' }, -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -// Reprocess the option tokens and overwrite the returned values. -tokens - .filter((token) => token.kind === 'option') - .forEach((token) => { - if (token.name.startsWith('no-')) { - // Store foo:false for --no-foo - const positiveName = token.name.slice(3); - values[positiveName] = false; - delete values[token.name]; - } else { - // Resave value so last one wins if both --foo and --no-foo. - values[token.name] = token.value ?? true; - } - }); - -const color = values.color; -const logfile = values.logfile ?? 'default.log'; - -console.log({ logfile, color }); - -// Try the following: -// node negate.js -// node negate.js --no-logfile --no-color -// negate.js --logfile=test.log --color -// node negate.js --no-logfile --logfile=test.log --color --no-color diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js deleted file mode 100644 index 0c32468..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Throw an error if an option is used more than once. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - ding: { type: 'boolean', short: 'd' }, - beep: { type: 'boolean', short: 'b' } -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -const seenBefore = new Set(); -tokens.forEach((token) => { - if (token.kind !== 'option') return; - if (seenBefore.has(token.name)) { - throw new Error(`option '${token.name}' used multiple times`); - } - seenBefore.add(token.name); -}); - -console.log(values); - -// Try the following: -// node no-repeated-options --ding --beep -// node no-repeated-options --beep -b -// node no-repeated-options -ddd diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs deleted file mode 100644 index 8ab7367..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +++ /dev/null @@ -1,41 +0,0 @@ -// This is an example of using tokens to add a custom behaviour. -// -// This adds a option order check so that --some-unstable-option -// may only be used after --enable-experimental-options -// -// Note: this is not a common behaviour, the order of different options -// does not usually matter. - -import { parseArgs } from '../index.js'; - -function findTokenIndex(tokens, target) { - return tokens.findIndex((token) => token.kind === 'option' && - token.name === target - ); -} - -const experimentalName = 'enable-experimental-options'; -const unstableName = 'some-unstable-option'; - -const options = { - [experimentalName]: { type: 'boolean' }, - [unstableName]: { type: 'boolean' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const experimentalIndex = findTokenIndex(tokens, experimentalName); -const unstableIndex = findTokenIndex(tokens, unstableName); -if (unstableIndex !== -1 && - ((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) { - throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`); -} - -console.log(values); - -/* eslint-disable max-len */ -// Try the following: -// node ordered-options.mjs -// node ordered-options.mjs --some-unstable-option -// node ordered-options.mjs --some-unstable-option --enable-experimental-options -// node ordered-options.mjs --enable-experimental-options --some-unstable-option diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js b/node_modules/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js deleted file mode 100644 index eff04c2..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const args = ['-f', '--bar', 'b']; -const options = { - foo: { - type: 'boolean', - short: 'f' - }, - bar: { - type: 'string' - } -}; -const { - values, - positionals -} = parseArgs({ args, options }); -console.log(values, positionals); - -// Try the following: -// node simple-hard-coded.js diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/index.js b/node_modules/npm/node_modules/@pkgjs/parseargs/index.js deleted file mode 100644 index b1004c7..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/index.js +++ /dev/null @@ -1,396 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeForEach, - ArrayPrototypeIncludes, - ArrayPrototypeMap, - ArrayPrototypePush, - ArrayPrototypePushApply, - ArrayPrototypeShift, - ArrayPrototypeSlice, - ArrayPrototypeUnshiftApply, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIndexOf, - StringPrototypeSlice, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateArray, - validateBoolean, - validateBooleanArray, - validateObject, - validateString, - validateStringArray, - validateUnion, -} = require('./internal/validators'); - -const { - kEmptyObject, -} = require('./internal/util'); - -const { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -} = require('./utils'); - -const { - codes: { - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - }, -} = require('./internal/errors'); - -function getMainArgs() { - // Work out where to slice process.argv for user supplied arguments. - - // Check node options for scenarios where user CLI args follow executable. - const execArgv = process.execArgv; - if (ArrayPrototypeIncludes(execArgv, '-e') || - ArrayPrototypeIncludes(execArgv, '--eval') || - ArrayPrototypeIncludes(execArgv, '-p') || - ArrayPrototypeIncludes(execArgv, '--print')) { - return ArrayPrototypeSlice(process.argv, 1); - } - - // Normally first two arguments are executable and script, then CLI arguments - return ArrayPrototypeSlice(process.argv, 2); -} - -/** - * In strict mode, throw for possible usage errors like --foo --bar - * - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionLikeValue(token) { - if (!token.inlineValue && isOptionLikeValue(token.value)) { - // Only show short example if user used short option. - const example = StringPrototypeStartsWith(token.rawName, '--') ? - `'${token.rawName}=-XYZ'` : - `'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`; - const errorMessage = `Option '${token.rawName}' argument is ambiguous. -Did you forget to specify the option argument for '${token.rawName}'? -To specify an option argument starting with a dash use ${example}.`; - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); - } -} - -/** - * In strict mode, throw for usage errors. - * - * @param {object} config - from config passed to parseArgs - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionUsage(config, token) { - if (!ObjectHasOwn(config.options, token.name)) { - throw new ERR_PARSE_ARGS_UNKNOWN_OPTION( - token.rawName, config.allowPositionals); - } - - const short = optionsGetOwn(config.options, token.name, 'short'); - const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`; - const type = optionsGetOwn(config.options, token.name, 'type'); - if (type === 'string' && typeof token.value !== 'string') { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} ' argument missing`); - } - // (Idiomatic test for undefined||null, expecting undefined.) - if (type === 'boolean' && token.value != null) { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`); - } -} - - -/** - * Store the option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string|undefined} optionValue - value from user args - * @param {object} options - option configs, from parseArgs({ options }) - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeOption(longOption, optionValue, options, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - // We store based on the option value rather than option type, - // preserving the users intent for author to deal with. - const newValue = optionValue ?? true; - if (optionsGetOwn(options, longOption, 'multiple')) { - // Always store value in array, including for boolean. - // values[longOption] starts out not present, - // first value is added as new array [newValue], - // subsequent values are pushed to existing array. - // (note: values has null prototype, so simpler usage) - if (values[longOption]) { - ArrayPrototypePush(values[longOption], newValue); - } else { - values[longOption] = [newValue]; - } - } else { - values[longOption] = newValue; - } -} - -/** - * Store the default option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string - * | boolean - * | string[] - * | boolean[]} optionValue - default value from option config - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeDefaultOption(longOption, optionValue, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - values[longOption] = optionValue; -} - -/** - * Process args and turn into identified tokens: - * - option (along with value, if any) - * - positional - * - option-terminator - * - * @param {string[]} args - from parseArgs({ args }) or mainArgs - * @param {object} options - option configs, from parseArgs({ options }) - */ -function argsToTokens(args, options) { - const tokens = []; - let index = -1; - let groupCount = 0; - - const remainingArgs = ArrayPrototypeSlice(args); - while (remainingArgs.length > 0) { - const arg = ArrayPrototypeShift(remainingArgs); - const nextArg = remainingArgs[0]; - if (groupCount > 0) - groupCount--; - else - index++; - - // Check if `arg` is an options terminator. - // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html - if (arg === '--') { - // Everything after a bare '--' is considered a positional argument. - ArrayPrototypePush(tokens, { kind: 'option-terminator', index }); - ArrayPrototypePushApply( - tokens, ArrayPrototypeMap(remainingArgs, (arg) => { - return { kind: 'positional', index: ++index, value: arg }; - }) - ); - break; // Finished processing args, leave while loop. - } - - if (isLoneShortOption(arg)) { - // e.g. '-f' - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '-f', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isShortOptionGroup(arg, options)) { - // Expand -fXzy to -f -X -z -y - const expanded = []; - for (let index = 1; index < arg.length; index++) { - const shortOption = StringPrototypeCharAt(arg, index); - const longOption = findLongOptionForShort(shortOption, options); - if (optionsGetOwn(options, longOption, 'type') !== 'string' || - index === arg.length - 1) { - // Boolean option, or last short in group. Well formed. - ArrayPrototypePush(expanded, `-${shortOption}`); - } else { - // String option in middle. Yuck. - // Expand -abfFILE to -a -b -fFILE - ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); - break; // finished short group - } - } - ArrayPrototypeUnshiftApply(remainingArgs, expanded); - groupCount = expanded.length; - continue; - } - - if (isShortOptionAndValue(arg, options)) { - // e.g. -fFILE - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - const value = StringPrototypeSlice(arg, 2); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `-${shortOption}`, - index, value, inlineValue: true }); - continue; - } - - if (isLoneLongOption(arg)) { - // e.g. '--foo' - const longOption = StringPrototypeSlice(arg, 2); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '--foo', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isLongOptionAndValue(arg)) { - // e.g. --foo=bar - const equalIndex = StringPrototypeIndexOf(arg, '='); - const longOption = StringPrototypeSlice(arg, 2, equalIndex); - const value = StringPrototypeSlice(arg, equalIndex + 1); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `--${longOption}`, - index, value, inlineValue: true }); - continue; - } - - ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg }); - } - - return tokens; -} - -const parseArgs = (config = kEmptyObject) => { - const args = objectGetOwn(config, 'args') ?? getMainArgs(); - const strict = objectGetOwn(config, 'strict') ?? true; - const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict; - const returnTokens = objectGetOwn(config, 'tokens') ?? false; - const options = objectGetOwn(config, 'options') ?? { __proto__: null }; - // Bundle these up for passing to strict-mode checks. - const parseConfig = { args, strict, options, allowPositionals }; - - // Validate input configuration. - validateArray(args, 'args'); - validateBoolean(strict, 'strict'); - validateBoolean(allowPositionals, 'allowPositionals'); - validateBoolean(returnTokens, 'tokens'); - validateObject(options, 'options'); - ArrayPrototypeForEach( - ObjectEntries(options), - ({ 0: longOption, 1: optionConfig }) => { - validateObject(optionConfig, `options.${longOption}`); - - // type is required - const optionType = objectGetOwn(optionConfig, 'type'); - validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']); - - if (ObjectHasOwn(optionConfig, 'short')) { - const shortOption = optionConfig.short; - validateString(shortOption, `options.${longOption}.short`); - if (shortOption.length !== 1) { - throw new ERR_INVALID_ARG_VALUE( - `options.${longOption}.short`, - shortOption, - 'must be a single character' - ); - } - } - - const multipleOption = objectGetOwn(optionConfig, 'multiple'); - if (ObjectHasOwn(optionConfig, 'multiple')) { - validateBoolean(multipleOption, `options.${longOption}.multiple`); - } - - const defaultValue = objectGetOwn(optionConfig, 'default'); - if (defaultValue !== undefined) { - let validator; - switch (optionType) { - case 'string': - validator = multipleOption ? validateStringArray : validateString; - break; - - case 'boolean': - validator = multipleOption ? validateBooleanArray : validateBoolean; - break; - } - validator(defaultValue, `options.${longOption}.default`); - } - } - ); - - // Phase 1: identify tokens - const tokens = argsToTokens(args, options); - - // Phase 2: process tokens into parsed option values and positionals - const result = { - values: { __proto__: null }, - positionals: [], - }; - if (returnTokens) { - result.tokens = tokens; - } - ArrayPrototypeForEach(tokens, (token) => { - if (token.kind === 'option') { - if (strict) { - checkOptionUsage(parseConfig, token); - checkOptionLikeValue(token); - } - storeOption(token.name, token.value, options, result.values); - } else if (token.kind === 'positional') { - if (!allowPositionals) { - throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value); - } - ArrayPrototypePush(result.positionals, token.value); - } - }); - - // Phase 3: fill in default values for missing args - ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption, - 1: optionConfig }) => { - const mustSetDefault = useDefaultValueOption(longOption, - optionConfig, - result.values); - if (mustSetDefault) { - storeDefaultOption(longOption, - objectGetOwn(optionConfig, 'default'), - result.values); - } - }); - - - return result; -}; - -module.exports = { - parseArgs, -}; diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/errors.js b/node_modules/npm/node_modules/@pkgjs/parseargs/internal/errors.js deleted file mode 100644 index e1b237b..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/errors.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -class ERR_INVALID_ARG_TYPE extends TypeError { - constructor(name, expected, actual) { - super(`${name} must be ${expected} got ${actual}`); - this.code = 'ERR_INVALID_ARG_TYPE'; - } -} - -class ERR_INVALID_ARG_VALUE extends TypeError { - constructor(arg1, arg2, expected) { - super(`The property ${arg1} ${expected}. Received '${arg2}'`); - this.code = 'ERR_INVALID_ARG_VALUE'; - } -} - -class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error { - constructor(message) { - super(message); - this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE'; - } -} - -class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error { - constructor(option, allowPositionals) { - const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : ''; - super(`Unknown option '${option}'${suggestDashDash}`); - this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION'; - } -} - -class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error { - constructor(positional) { - super(`Unexpected argument '${positional}'. This command does not take positional arguments`); - this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL'; - } -} - -module.exports = { - codes: { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - } -}; diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/primordials.js b/node_modules/npm/node_modules/@pkgjs/parseargs/internal/primordials.js deleted file mode 100644 index 63e23ab..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/primordials.js +++ /dev/null @@ -1,393 +0,0 @@ -/* -This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js -under the following license: - -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -*/ - -'use strict'; - -/* eslint-disable node-core/prefer-primordials */ - -// This file subclasses and stores the JS builtins that come from the VM -// so that Node.js's builtin modules do not need to later look these up from -// the global proxy, which can be mutated by users. - -// Use of primordials have sometimes a dramatic impact on performance, please -// benchmark all changes made in performance-sensitive areas of the codebase. -// See: https://github.com/nodejs/node/pull/38248 - -const primordials = {}; - -const { - defineProperty: ReflectDefineProperty, - getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, - ownKeys: ReflectOwnKeys, -} = Reflect; - -// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. -// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` -// and `Function.prototype.call` after it may have been mutated by users. -const { apply, bind, call } = Function.prototype; -const uncurryThis = bind.bind(call); -primordials.uncurryThis = uncurryThis; - -// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. -// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` -// and `Function.prototype.apply` after it may have been mutated by users. -const applyBind = bind.bind(apply); -primordials.applyBind = applyBind; - -// Methods that accept a variable number of arguments, and thus it's useful to -// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, -// instead of `Function.prototype.call`, and thus doesn't require iterator -// destructuring. -const varargsMethods = [ - // 'ArrayPrototypeConcat' is omitted, because it performs the spread - // on its own for arrays and array-likes with a truthy - // @@isConcatSpreadable symbol property. - 'ArrayOf', - 'ArrayPrototypePush', - 'ArrayPrototypeUnshift', - // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' - // and 'FunctionPrototypeApply'. - 'MathHypot', - 'MathMax', - 'MathMin', - 'StringPrototypeConcat', - 'TypedArrayOf', -]; - -function getNewKey(key) { - return typeof key === 'symbol' ? - `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : - `${key[0].toUpperCase()}${key.slice(1)}`; -} - -function copyAccessor(dest, prefix, key, { enumerable, get, set }) { - ReflectDefineProperty(dest, `${prefix}Get${key}`, { - value: uncurryThis(get), - enumerable - }); - if (set !== undefined) { - ReflectDefineProperty(dest, `${prefix}Set${key}`, { - value: uncurryThis(set), - enumerable - }); - } -} - -function copyPropsRenamed(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - // `src` is bound as the `this` so that the static `this` points - // to the object it was defined on, - // e.g.: `ArrayOfApply` gets a `this` of `Array`: - value: applyBind(desc.value, src), - }); - } - } - } -} - -function copyPropsRenamedBound(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = value.bind(src); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value, src), - }); - } - } - } -} - -function copyPrototype(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = uncurryThis(value); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value), - }); - } - } - } -} - -// Create copies of configurable value properties of the global object -[ - 'Proxy', - 'globalThis', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - primordials[name] = globalThis[name]; -}); - -// Create copies of URI handling functions -[ - decodeURI, - decodeURIComponent, - encodeURI, - encodeURIComponent, -].forEach((fn) => { - primordials[fn.name] = fn; -}); - -// Create copies of the namespace objects -[ - 'JSON', - 'Math', - 'Proxy', - 'Reflect', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - copyPropsRenamed(global[name], primordials, name); -}); - -// Create copies of intrinsic objects -[ - 'Array', - 'ArrayBuffer', - 'BigInt', - 'BigInt64Array', - 'BigUint64Array', - 'Boolean', - 'DataView', - 'Date', - 'Error', - 'EvalError', - 'Float32Array', - 'Float64Array', - 'Function', - 'Int16Array', - 'Int32Array', - 'Int8Array', - 'Map', - 'Number', - 'Object', - 'RangeError', - 'ReferenceError', - 'RegExp', - 'Set', - 'String', - 'Symbol', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Uint16Array', - 'Uint32Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'WeakMap', - 'WeakSet', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamed(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of intrinsic objects that require a valid `this` to call -// static methods. -// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all -[ - 'Promise', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamedBound(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of abstract intrinsic objects that are not directly exposed -// on the global object. -// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object -[ - { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, - { name: 'ArrayIterator', original: { - prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), - } }, - { name: 'StringIterator', original: { - prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), - } }, -].forEach(({ name, original }) => { - primordials[name] = original; - // The static %TypedArray% methods require a valid `this`, but can't be bound, - // as they need a subclass constructor as the receiver: - copyPrototype(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -/* eslint-enable node-core/prefer-primordials */ - -const { - ArrayPrototypeForEach, - FunctionPrototypeCall, - Map, - ObjectFreeze, - ObjectSetPrototypeOf, - Set, - SymbolIterator, - WeakMap, - WeakSet, -} = primordials; - -// Because these functions are used by `makeSafe`, which is exposed -// on the `primordials` object, it's important to use const references -// to the primordials that they use: -const createSafeIterator = (factory, next) => { - class SafeIterator { - constructor(iterable) { - this._iterator = factory(iterable); - } - next() { - return next(this._iterator); - } - [SymbolIterator]() { - return this; - } - } - ObjectSetPrototypeOf(SafeIterator.prototype, null); - ObjectFreeze(SafeIterator.prototype); - ObjectFreeze(SafeIterator); - return SafeIterator; -}; - -primordials.SafeArrayIterator = createSafeIterator( - primordials.ArrayPrototypeSymbolIterator, - primordials.ArrayIteratorPrototypeNext -); -primordials.SafeStringIterator = createSafeIterator( - primordials.StringPrototypeSymbolIterator, - primordials.StringIteratorPrototypeNext -); - -const copyProps = (src, dest) => { - ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { - if (!ReflectGetOwnPropertyDescriptor(dest, key)) { - ReflectDefineProperty( - dest, - key, - ReflectGetOwnPropertyDescriptor(src, key)); - } - }); -}; - -const makeSafe = (unsafe, safe) => { - if (SymbolIterator in unsafe.prototype) { - const dummy = new unsafe(); - let next; // We can reuse the same `next` method. - - ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { - if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { - const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); - if ( - typeof desc.value === 'function' && - desc.value.length === 0 && - SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) - ) { - const createIterator = uncurryThis(desc.value); - next = next ?? uncurryThis(createIterator(dummy).next); - const SafeIterator = createSafeIterator(createIterator, next); - desc.value = function() { - return new SafeIterator(this); - }; - } - ReflectDefineProperty(safe.prototype, key, desc); - } - }); - } else { - copyProps(unsafe.prototype, safe.prototype); - } - copyProps(unsafe, safe); - - ObjectSetPrototypeOf(safe.prototype, null); - ObjectFreeze(safe.prototype); - ObjectFreeze(safe); - return safe; -}; -primordials.makeSafe = makeSafe; - -// Subclass the constructors because we need to use their prototype -// methods later. -// Defining the `constructor` is necessary here to avoid the default -// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. -primordials.SafeMap = makeSafe( - Map, - class SafeMap extends Map { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakMap = makeSafe( - WeakMap, - class SafeWeakMap extends WeakMap { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeSet = makeSafe( - Set, - class SafeSet extends Set { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakSet = makeSafe( - WeakSet, - class SafeWeakSet extends WeakSet { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); - -ObjectSetPrototypeOf(primordials, null); -ObjectFreeze(primordials); - -module.exports = primordials; diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/util.js b/node_modules/npm/node_modules/@pkgjs/parseargs/internal/util.js deleted file mode 100644 index b9b8fe5..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/util.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -// This is a placeholder for util.js in node.js land. - -const { - ObjectCreate, - ObjectFreeze, -} = require('./primordials'); - -const kEmptyObject = ObjectFreeze(ObjectCreate(null)); - -module.exports = { - kEmptyObject, -}; diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/validators.js b/node_modules/npm/node_modules/@pkgjs/parseargs/internal/validators.js deleted file mode 100644 index b5ac4fb..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/internal/validators.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -// This file is a proxy of the original file located at: -// https://github.com/nodejs/node/blob/main/lib/internal/validators.js -// Every addition or modification to this file must be evaluated -// during the PR review. - -const { - ArrayIsArray, - ArrayPrototypeIncludes, - ArrayPrototypeJoin, -} = require('./primordials'); - -const { - codes: { - ERR_INVALID_ARG_TYPE - } -} = require('./errors'); - -function validateString(value, name) { - if (typeof value !== 'string') { - throw new ERR_INVALID_ARG_TYPE(name, 'String', value); - } -} - -function validateUnion(value, name, union) { - if (!ArrayPrototypeIncludes(union, value)) { - throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value); - } -} - -function validateBoolean(value, name) { - if (typeof value !== 'boolean') { - throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value); - } -} - -function validateArray(value, name) { - if (!ArrayIsArray(value)) { - throw new ERR_INVALID_ARG_TYPE(name, 'Array', value); - } -} - -function validateStringArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateString(value[i], `${name}[${i}]`); - } -} - -function validateBooleanArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateBoolean(value[i], `${name}[${i}]`); - } -} - -/** - * @param {unknown} value - * @param {string} name - * @param {{ - * allowArray?: boolean, - * allowFunction?: boolean, - * nullable?: boolean - * }} [options] - */ -function validateObject(value, name, options) { - const useDefaultOptions = options == null; - const allowArray = useDefaultOptions ? false : options.allowArray; - const allowFunction = useDefaultOptions ? false : options.allowFunction; - const nullable = useDefaultOptions ? false : options.nullable; - if ((!nullable && value === null) || - (!allowArray && ArrayIsArray(value)) || - (typeof value !== 'object' && ( - !allowFunction || typeof value !== 'function' - ))) { - throw new ERR_INVALID_ARG_TYPE(name, 'Object', value); - } -} - -module.exports = { - validateArray, - validateObject, - validateString, - validateStringArray, - validateUnion, - validateBoolean, - validateBooleanArray, -}; diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/package.json b/node_modules/npm/node_modules/@pkgjs/parseargs/package.json deleted file mode 100644 index 0bcc05c..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@pkgjs/parseargs", - "version": "0.11.0", - "description": "Polyfill of future proposal for `util.parseArgs()`", - "engines": { - "node": ">=14" - }, - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "coverage": "c8 --check-coverage tape 'test/*.js'", - "test": "c8 tape 'test/*.js'", - "posttest": "eslint .", - "fix": "npm run posttest -- --fix" - }, - "repository": { - "type": "git", - "url": "git@github.com:pkgjs/parseargs.git" - }, - "keywords": [], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/pkgjs/parseargs/issues" - }, - "homepage": "https://github.com/pkgjs/parseargs#readme", - "devDependencies": { - "c8": "^7.10.0", - "eslint": "^8.2.0", - "eslint-plugin-node-core": "iansu/eslint-plugin-node-core", - "tape": "^5.2.2" - } -} diff --git a/node_modules/npm/node_modules/@pkgjs/parseargs/utils.js b/node_modules/npm/node_modules/@pkgjs/parseargs/utils.js deleted file mode 100644 index d7f420a..0000000 --- a/node_modules/npm/node_modules/@pkgjs/parseargs/utils.js +++ /dev/null @@ -1,198 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeFind, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIncludes, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateObject, -} = require('./internal/validators'); - -// These are internal utilities to make the parsing logic easier to read, and -// add lots of detail for the curious. They are in a separate file to allow -// unit testing, although that is not essential (this could be rolled into -// main file and just tested implicitly via API). -// -// These routines are for internal use, not for export to client. - -/** - * Return the named property, but only if it is an own property. - */ -function objectGetOwn(obj, prop) { - if (ObjectHasOwn(obj, prop)) - return obj[prop]; -} - -/** - * Return the named options property, but only if it is an own property. - */ -function optionsGetOwn(options, longOption, prop) { - if (ObjectHasOwn(options, longOption)) - return objectGetOwn(options[longOption], prop); -} - -/** - * Determines if the argument may be used as an option value. - * @example - * isOptionValue('V') // returns true - * isOptionValue('-v') // returns true (greedy) - * isOptionValue('--foo') // returns true (greedy) - * isOptionValue(undefined) // returns false - */ -function isOptionValue(value) { - if (value == null) return false; - - // Open Group Utility Conventions are that an option-argument - // is the argument after the option, and may start with a dash. - return true; // greedy! -} - -/** - * Detect whether there is possible confusion and user may have omitted - * the option argument, like `--port --verbose` when `port` of type:string. - * In strict mode we throw errors if value is option-like. - */ -function isOptionLikeValue(value) { - if (value == null) return false; - - return value.length > 1 && StringPrototypeCharAt(value, 0) === '-'; -} - -/** - * Determines if `arg` is just a short option. - * @example '-f' - */ -function isLoneShortOption(arg) { - return arg.length === 2 && - StringPrototypeCharAt(arg, 0) === '-' && - StringPrototypeCharAt(arg, 1) !== '-'; -} - -/** - * Determines if `arg` is a lone long option. - * @example - * isLoneLongOption('a') // returns false - * isLoneLongOption('-a') // returns false - * isLoneLongOption('--foo') // returns true - * isLoneLongOption('--foo=bar') // returns false - */ -function isLoneLongOption(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - !StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a long option and value in the same argument. - * @example - * isLongOptionAndValue('--foo') // returns false - * isLongOptionAndValue('--foo=bar') // returns true - */ -function isLongOptionAndValue(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a short option group. - * - * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). - * One or more options without option-arguments, followed by at most one - * option that takes an option-argument, should be accepted when grouped - * behind one '-' delimiter. - * @example - * isShortOptionGroup('-a', {}) // returns false - * isShortOptionGroup('-ab', {}) // returns true - * // -fb is an option and a value, not a short option group - * isShortOptionGroup('-fb', { - * options: { f: { type: 'string' } } - * }) // returns false - * isShortOptionGroup('-bf', { - * options: { f: { type: 'string' } } - * }) // returns true - * // -bfb is an edge case, return true and caller sorts it out - * isShortOptionGroup('-bfb', { - * options: { f: { type: 'string' } } - * }) // returns true - */ -function isShortOptionGroup(arg, options) { - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const firstShort = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(firstShort, options); - return optionsGetOwn(options, longOption, 'type') !== 'string'; -} - -/** - * Determine if arg is a short string option followed by its value. - * @example - * isShortOptionAndValue('-a', {}); // returns false - * isShortOptionAndValue('-ab', {}); // returns false - * isShortOptionAndValue('-fFILE', { - * options: { foo: { short: 'f', type: 'string' }} - * }) // returns true - */ -function isShortOptionAndValue(arg, options) { - validateObject(options, 'options'); - - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - return optionsGetOwn(options, longOption, 'type') === 'string'; -} - -/** - * Find the long option associated with a short option. Looks for a configured - * `short` and returns the short option itself if a long option is not found. - * @example - * findLongOptionForShort('a', {}) // returns 'a' - * findLongOptionForShort('b', { - * options: { bar: { short: 'b' } } - * }) // returns 'bar' - */ -function findLongOptionForShort(shortOption, options) { - validateObject(options, 'options'); - const longOptionEntry = ArrayPrototypeFind( - ObjectEntries(options), - ({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption - ); - return longOptionEntry?.[0] ?? shortOption; -} - -/** - * Check if the given option includes a default value - * and that option has not been set by the input args. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {object} optionConfig - the option configuration properties - * @param {object} values - option values returned in `values` by parseArgs - */ -function useDefaultValueOption(longOption, optionConfig, values) { - return objectGetOwn(optionConfig, 'default') !== undefined && - values[longOption] === undefined; -} - -module.exports = { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -}; diff --git a/node_modules/npm/node_modules/@sigstore/bundle/LICENSE b/node_modules/npm/node_modules/@sigstore/bundle/LICENSE deleted file mode 100644 index e9e7c16..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2023 The Sigstore Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/build.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/build.js deleted file mode 100644 index 6990f54..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/build.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toDSSEBundle = exports.toMessageSignatureBundle = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const protobuf_specs_1 = require("@sigstore/protobuf-specs"); -const bundle_1 = require("./bundle"); -// Message signature bundle - $case: 'messageSignature' -function toMessageSignatureBundle(options) { - return { - mediaType: bundle_1.BUNDLE_V02_MEDIA_TYPE, - content: { - $case: 'messageSignature', - messageSignature: { - messageDigest: { - algorithm: protobuf_specs_1.HashAlgorithm.SHA2_256, - digest: options.digest, - }, - signature: options.signature, - }, - }, - verificationMaterial: toVerificationMaterial(options), - }; -} -exports.toMessageSignatureBundle = toMessageSignatureBundle; -// DSSE envelope bundle - $case: 'dsseEnvelope' -function toDSSEBundle(options) { - return { - mediaType: bundle_1.BUNDLE_V02_MEDIA_TYPE, - content: { - $case: 'dsseEnvelope', - dsseEnvelope: toEnvelope(options), - }, - verificationMaterial: toVerificationMaterial(options), - }; -} -exports.toDSSEBundle = toDSSEBundle; -function toEnvelope(options) { - return { - payloadType: options.artifactType, - payload: options.artifact, - signatures: [toSignature(options)], - }; -} -function toSignature(options) { - return { - keyid: options.keyHint || '', - sig: options.signature, - }; -} -// Verification material -function toVerificationMaterial(options) { - return { - content: toKeyContent(options), - tlogEntries: [], - timestampVerificationData: { rfc3161Timestamps: [] }, - }; -} -function toKeyContent(options) { - if (options.certificate) { - return { - $case: 'x509CertificateChain', - x509CertificateChain: { - certificates: [{ rawBytes: options.certificate }], - }, - }; - } - else { - return { - $case: 'publicKey', - publicKey: { - hint: options.keyHint || '', - }, - }; - } -} diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/bundle.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/bundle.js deleted file mode 100644 index 8c01e2d..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/bundle.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isBundleWithDsseEnvelope = exports.isBundleWithMessageSignature = exports.isBundleWithPublicKey = exports.isBundleWithCertificateChain = exports.BUNDLE_V02_MEDIA_TYPE = exports.BUNDLE_V01_MEDIA_TYPE = void 0; -exports.BUNDLE_V01_MEDIA_TYPE = 'application/vnd.dev.sigstore.bundle+json;version=0.1'; -exports.BUNDLE_V02_MEDIA_TYPE = 'application/vnd.dev.sigstore.bundle+json;version=0.2'; -// Type guards for bundle variants. -function isBundleWithCertificateChain(b) { - return b.verificationMaterial.content.$case === 'x509CertificateChain'; -} -exports.isBundleWithCertificateChain = isBundleWithCertificateChain; -function isBundleWithPublicKey(b) { - return b.verificationMaterial.content.$case === 'publicKey'; -} -exports.isBundleWithPublicKey = isBundleWithPublicKey; -function isBundleWithMessageSignature(b) { - return b.content.$case === 'messageSignature'; -} -exports.isBundleWithMessageSignature = isBundleWithMessageSignature; -function isBundleWithDsseEnvelope(b) { - return b.content.$case === 'dsseEnvelope'; -} -exports.isBundleWithDsseEnvelope = isBundleWithDsseEnvelope; diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/error.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/error.js deleted file mode 100644 index f842953..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/error.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValidationError = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -class ValidationError extends Error { - constructor(message, fields) { - super(message); - this.fields = fields; - } -} -exports.ValidationError = ValidationError; diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/index.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/index.js deleted file mode 100644 index b016a16..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/index.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isBundleV01 = exports.assertBundleV01 = exports.assertBundleLatest = exports.assertBundle = exports.envelopeToJSON = exports.envelopeFromJSON = exports.bundleToJSON = exports.bundleFromJSON = exports.ValidationError = exports.isBundleWithPublicKey = exports.isBundleWithMessageSignature = exports.isBundleWithDsseEnvelope = exports.isBundleWithCertificateChain = exports.BUNDLE_V02_MEDIA_TYPE = exports.BUNDLE_V01_MEDIA_TYPE = exports.toMessageSignatureBundle = exports.toDSSEBundle = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var build_1 = require("./build"); -Object.defineProperty(exports, "toDSSEBundle", { enumerable: true, get: function () { return build_1.toDSSEBundle; } }); -Object.defineProperty(exports, "toMessageSignatureBundle", { enumerable: true, get: function () { return build_1.toMessageSignatureBundle; } }); -var bundle_1 = require("./bundle"); -Object.defineProperty(exports, "BUNDLE_V01_MEDIA_TYPE", { enumerable: true, get: function () { return bundle_1.BUNDLE_V01_MEDIA_TYPE; } }); -Object.defineProperty(exports, "BUNDLE_V02_MEDIA_TYPE", { enumerable: true, get: function () { return bundle_1.BUNDLE_V02_MEDIA_TYPE; } }); -Object.defineProperty(exports, "isBundleWithCertificateChain", { enumerable: true, get: function () { return bundle_1.isBundleWithCertificateChain; } }); -Object.defineProperty(exports, "isBundleWithDsseEnvelope", { enumerable: true, get: function () { return bundle_1.isBundleWithDsseEnvelope; } }); -Object.defineProperty(exports, "isBundleWithMessageSignature", { enumerable: true, get: function () { return bundle_1.isBundleWithMessageSignature; } }); -Object.defineProperty(exports, "isBundleWithPublicKey", { enumerable: true, get: function () { return bundle_1.isBundleWithPublicKey; } }); -var error_1 = require("./error"); -Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return error_1.ValidationError; } }); -var serialized_1 = require("./serialized"); -Object.defineProperty(exports, "bundleFromJSON", { enumerable: true, get: function () { return serialized_1.bundleFromJSON; } }); -Object.defineProperty(exports, "bundleToJSON", { enumerable: true, get: function () { return serialized_1.bundleToJSON; } }); -Object.defineProperty(exports, "envelopeFromJSON", { enumerable: true, get: function () { return serialized_1.envelopeFromJSON; } }); -Object.defineProperty(exports, "envelopeToJSON", { enumerable: true, get: function () { return serialized_1.envelopeToJSON; } }); -var validate_1 = require("./validate"); -Object.defineProperty(exports, "assertBundle", { enumerable: true, get: function () { return validate_1.assertBundle; } }); -Object.defineProperty(exports, "assertBundleLatest", { enumerable: true, get: function () { return validate_1.assertBundleLatest; } }); -Object.defineProperty(exports, "assertBundleV01", { enumerable: true, get: function () { return validate_1.assertBundleV01; } }); -Object.defineProperty(exports, "isBundleV01", { enumerable: true, get: function () { return validate_1.isBundleV01; } }); diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/serialized.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/serialized.js deleted file mode 100644 index f107335..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/serialized.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.envelopeToJSON = exports.envelopeFromJSON = exports.bundleToJSON = exports.bundleFromJSON = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const protobuf_specs_1 = require("@sigstore/protobuf-specs"); -const validate_1 = require("./validate"); -const bundleFromJSON = (obj) => { - const bundle = protobuf_specs_1.Bundle.fromJSON(obj); - (0, validate_1.assertBundle)(bundle); - return bundle; -}; -exports.bundleFromJSON = bundleFromJSON; -const bundleToJSON = (bundle) => { - return protobuf_specs_1.Bundle.toJSON(bundle); -}; -exports.bundleToJSON = bundleToJSON; -const envelopeFromJSON = (obj) => { - return protobuf_specs_1.Envelope.fromJSON(obj); -}; -exports.envelopeFromJSON = envelopeFromJSON; -const envelopeToJSON = (envelope) => { - return protobuf_specs_1.Envelope.toJSON(envelope); -}; -exports.envelopeToJSON = envelopeToJSON; diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/utility.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/utility.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/utility.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@sigstore/bundle/dist/validate.js b/node_modules/npm/node_modules/@sigstore/bundle/dist/validate.js deleted file mode 100644 index 015b6df..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/dist/validate.js +++ /dev/null @@ -1,160 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertBundleLatest = exports.isBundleV01 = exports.assertBundleV01 = exports.assertBundle = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const bundle_1 = require("./bundle"); -const error_1 = require("./error"); -// Performs basic validation of a Sigstore bundle to ensure that all required -// fields are populated. This is not a complete validation of the bundle, but -// rather a check that the bundle is in a valid state to be processed by the -// rest of the code. -function assertBundle(b) { - const invalidValues = []; - // Media type validation - if (b.mediaType === undefined || - !b.mediaType.startsWith('application/vnd.dev.sigstore.bundle+json;version=')) { - invalidValues.push('mediaType'); - } - // Content-related validation - if (b.content === undefined) { - invalidValues.push('content'); - } - else { - switch (b.content.$case) { - case 'messageSignature': - if (b.content.messageSignature.messageDigest === undefined) { - invalidValues.push('content.messageSignature.messageDigest'); - } - else { - if (b.content.messageSignature.messageDigest.digest.length === 0) { - invalidValues.push('content.messageSignature.messageDigest.digest'); - } - } - if (b.content.messageSignature.signature.length === 0) { - invalidValues.push('content.messageSignature.signature'); - } - break; - case 'dsseEnvelope': - if (b.content.dsseEnvelope.payload.length === 0) { - invalidValues.push('content.dsseEnvelope.payload'); - } - if (b.content.dsseEnvelope.signatures.length !== 1) { - invalidValues.push('content.dsseEnvelope.signatures'); - } - else { - if (b.content.dsseEnvelope.signatures[0].sig.length === 0) { - invalidValues.push('content.dsseEnvelope.signatures[0].sig'); - } - } - break; - } - } - // Verification material-related validation - if (b.verificationMaterial === undefined) { - invalidValues.push('verificationMaterial'); - } - else { - if (b.verificationMaterial.content === undefined) { - invalidValues.push('verificationMaterial.content'); - } - else { - switch (b.verificationMaterial.content.$case) { - case 'x509CertificateChain': - if (b.verificationMaterial.content.x509CertificateChain.certificates - .length === 0) { - invalidValues.push('verificationMaterial.content.x509CertificateChain.certificates'); - } - b.verificationMaterial.content.x509CertificateChain.certificates.forEach((cert, i) => { - if (cert.rawBytes.length === 0) { - invalidValues.push(`verificationMaterial.content.x509CertificateChain.certificates[${i}].rawBytes`); - } - }); - break; - } - } - if (b.verificationMaterial.tlogEntries === undefined) { - invalidValues.push('verificationMaterial.tlogEntries'); - } - else { - if (b.verificationMaterial.tlogEntries.length > 0) { - b.verificationMaterial.tlogEntries.forEach((entry, i) => { - if (entry.logId === undefined) { - invalidValues.push(`verificationMaterial.tlogEntries[${i}].logId`); - } - if (entry.kindVersion === undefined) { - invalidValues.push(`verificationMaterial.tlogEntries[${i}].kindVersion`); - } - }); - } - } - } - if (invalidValues.length > 0) { - throw new error_1.ValidationError('invalid bundle', invalidValues); - } -} -exports.assertBundle = assertBundle; -// Asserts that the given bundle conforms to the v0.1 bundle format. -function assertBundleV01(b) { - const invalidValues = []; - if (b.mediaType && b.mediaType !== bundle_1.BUNDLE_V01_MEDIA_TYPE) { - invalidValues.push('mediaType'); - } - if (b.verificationMaterial && - b.verificationMaterial.tlogEntries?.length > 0) { - b.verificationMaterial.tlogEntries.forEach((entry, i) => { - if (entry.inclusionPromise === undefined) { - invalidValues.push(`verificationMaterial.tlogEntries[${i}].inclusionPromise`); - } - }); - } - if (invalidValues.length > 0) { - throw new error_1.ValidationError('invalid v0.1 bundle', invalidValues); - } -} -exports.assertBundleV01 = assertBundleV01; -// Type guard to determine if Bundle is a v0.1 bundle. -function isBundleV01(b) { - try { - assertBundleV01(b); - return true; - } - catch (e) { - return false; - } -} -exports.isBundleV01 = isBundleV01; -// Asserts that the given bundle conforms to the newest (0.2) bundle format. -function assertBundleLatest(b) { - const invalidValues = []; - if (b.verificationMaterial && - b.verificationMaterial.tlogEntries?.length > 0) { - b.verificationMaterial.tlogEntries.forEach((entry, i) => { - if (entry.inclusionProof === undefined) { - invalidValues.push(`verificationMaterial.tlogEntries[${i}].inclusionProof`); - } - else { - if (entry.inclusionProof.checkpoint === undefined) { - invalidValues.push(`verificationMaterial.tlogEntries[${i}].inclusionProof.checkpoint`); - } - } - }); - } - if (invalidValues.length > 0) { - throw new error_1.ValidationError('invalid v0.2 bundle', invalidValues); - } -} -exports.assertBundleLatest = assertBundleLatest; diff --git a/node_modules/npm/node_modules/@sigstore/bundle/package.json b/node_modules/npm/node_modules/@sigstore/bundle/package.json deleted file mode 100644 index 7e26efa..0000000 --- a/node_modules/npm/node_modules/@sigstore/bundle/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@sigstore/bundle", - "version": "2.1.0", - "description": "Sigstore bundle type", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "clean": "shx rm -rf dist *.tsbuildinfo", - "build": "tsc --build", - "test": "jest" - }, - "files": [ - "dist", - "store" - ], - "author": "bdehamer@github.com", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "git+https://github.com/sigstore/sigstore-js.git" - }, - "bugs": { - "url": "https://github.com/sigstore/sigstore-js/issues" - }, - "homepage": "https://github.com/sigstore/sigstore-js/tree/main/packages/bundle#readme", - "publishConfig": { - "provenance": true - }, - "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/LICENSE b/node_modules/npm/node_modules/@sigstore/protobuf-specs/LICENSE deleted file mode 100644 index e9e7c16..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2023 The Sigstore Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js deleted file mode 100644 index 0c367a8..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/* eslint-disable */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Signature = exports.Envelope = void 0; -function createBaseEnvelope() { - return { payload: Buffer.alloc(0), payloadType: "", signatures: [] }; -} -exports.Envelope = { - fromJSON(object) { - return { - payload: isSet(object.payload) ? Buffer.from(bytesFromBase64(object.payload)) : Buffer.alloc(0), - payloadType: isSet(object.payloadType) ? String(object.payloadType) : "", - signatures: Array.isArray(object?.signatures) ? object.signatures.map((e) => exports.Signature.fromJSON(e)) : [], - }; - }, - toJSON(message) { - const obj = {}; - message.payload !== undefined && - (obj.payload = base64FromBytes(message.payload !== undefined ? message.payload : Buffer.alloc(0))); - message.payloadType !== undefined && (obj.payloadType = message.payloadType); - if (message.signatures) { - obj.signatures = message.signatures.map((e) => e ? exports.Signature.toJSON(e) : undefined); - } - else { - obj.signatures = []; - } - return obj; - }, -}; -function createBaseSignature() { - return { sig: Buffer.alloc(0), keyid: "" }; -} -exports.Signature = { - fromJSON(object) { - return { - sig: isSet(object.sig) ? Buffer.from(bytesFromBase64(object.sig)) : Buffer.alloc(0), - keyid: isSet(object.keyid) ? String(object.keyid) : "", - }; - }, - toJSON(message) { - const obj = {}; - message.sig !== undefined && (obj.sig = base64FromBytes(message.sig !== undefined ? message.sig : Buffer.alloc(0))); - message.keyid !== undefined && (obj.keyid = message.keyid); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js deleted file mode 100644 index 073093b..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CloudEventBatch = exports.CloudEvent_CloudEventAttributeValue = exports.CloudEvent_AttributesEntry = exports.CloudEvent = void 0; -/* eslint-disable */ -const any_1 = require("./google/protobuf/any"); -const timestamp_1 = require("./google/protobuf/timestamp"); -function createBaseCloudEvent() { - return { id: "", source: "", specVersion: "", type: "", attributes: {}, data: undefined }; -} -exports.CloudEvent = { - fromJSON(object) { - return { - id: isSet(object.id) ? String(object.id) : "", - source: isSet(object.source) ? String(object.source) : "", - specVersion: isSet(object.specVersion) ? String(object.specVersion) : "", - type: isSet(object.type) ? String(object.type) : "", - attributes: isObject(object.attributes) - ? Object.entries(object.attributes).reduce((acc, [key, value]) => { - acc[key] = exports.CloudEvent_CloudEventAttributeValue.fromJSON(value); - return acc; - }, {}) - : {}, - data: isSet(object.binaryData) - ? { $case: "binaryData", binaryData: Buffer.from(bytesFromBase64(object.binaryData)) } - : isSet(object.textData) - ? { $case: "textData", textData: String(object.textData) } - : isSet(object.protoData) - ? { $case: "protoData", protoData: any_1.Any.fromJSON(object.protoData) } - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.id !== undefined && (obj.id = message.id); - message.source !== undefined && (obj.source = message.source); - message.specVersion !== undefined && (obj.specVersion = message.specVersion); - message.type !== undefined && (obj.type = message.type); - obj.attributes = {}; - if (message.attributes) { - Object.entries(message.attributes).forEach(([k, v]) => { - obj.attributes[k] = exports.CloudEvent_CloudEventAttributeValue.toJSON(v); - }); - } - message.data?.$case === "binaryData" && - (obj.binaryData = message.data?.binaryData !== undefined ? base64FromBytes(message.data?.binaryData) : undefined); - message.data?.$case === "textData" && (obj.textData = message.data?.textData); - message.data?.$case === "protoData" && - (obj.protoData = message.data?.protoData ? any_1.Any.toJSON(message.data?.protoData) : undefined); - return obj; - }, -}; -function createBaseCloudEvent_AttributesEntry() { - return { key: "", value: undefined }; -} -exports.CloudEvent_AttributesEntry = { - fromJSON(object) { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? exports.CloudEvent_CloudEventAttributeValue.fromJSON(object.value) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.key !== undefined && (obj.key = message.key); - message.value !== undefined && - (obj.value = message.value ? exports.CloudEvent_CloudEventAttributeValue.toJSON(message.value) : undefined); - return obj; - }, -}; -function createBaseCloudEvent_CloudEventAttributeValue() { - return { attr: undefined }; -} -exports.CloudEvent_CloudEventAttributeValue = { - fromJSON(object) { - return { - attr: isSet(object.ceBoolean) - ? { $case: "ceBoolean", ceBoolean: Boolean(object.ceBoolean) } - : isSet(object.ceInteger) - ? { $case: "ceInteger", ceInteger: Number(object.ceInteger) } - : isSet(object.ceString) - ? { $case: "ceString", ceString: String(object.ceString) } - : isSet(object.ceBytes) - ? { $case: "ceBytes", ceBytes: Buffer.from(bytesFromBase64(object.ceBytes)) } - : isSet(object.ceUri) - ? { $case: "ceUri", ceUri: String(object.ceUri) } - : isSet(object.ceUriRef) - ? { $case: "ceUriRef", ceUriRef: String(object.ceUriRef) } - : isSet(object.ceTimestamp) - ? { $case: "ceTimestamp", ceTimestamp: fromJsonTimestamp(object.ceTimestamp) } - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.attr?.$case === "ceBoolean" && (obj.ceBoolean = message.attr?.ceBoolean); - message.attr?.$case === "ceInteger" && (obj.ceInteger = Math.round(message.attr?.ceInteger)); - message.attr?.$case === "ceString" && (obj.ceString = message.attr?.ceString); - message.attr?.$case === "ceBytes" && - (obj.ceBytes = message.attr?.ceBytes !== undefined ? base64FromBytes(message.attr?.ceBytes) : undefined); - message.attr?.$case === "ceUri" && (obj.ceUri = message.attr?.ceUri); - message.attr?.$case === "ceUriRef" && (obj.ceUriRef = message.attr?.ceUriRef); - message.attr?.$case === "ceTimestamp" && (obj.ceTimestamp = message.attr?.ceTimestamp.toISOString()); - return obj; - }, -}; -function createBaseCloudEventBatch() { - return { events: [] }; -} -exports.CloudEventBatch = { - fromJSON(object) { - return { events: Array.isArray(object?.events) ? object.events.map((e) => exports.CloudEvent.fromJSON(e)) : [] }; - }, - toJSON(message) { - const obj = {}; - if (message.events) { - obj.events = message.events.map((e) => e ? exports.CloudEvent.toJSON(e) : undefined); - } - else { - obj.events = []; - } - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(timestamp_1.Timestamp.fromJSON(o)); - } -} -function isObject(value) { - return typeof value === "object" && value !== null; -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js deleted file mode 100644 index da62749..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -/* eslint-disable */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fieldBehaviorToJSON = exports.fieldBehaviorFromJSON = exports.FieldBehavior = void 0; -/** - * An indicator of the behavior of a given field (for example, that a field - * is required in requests, or given as output but ignored as input). - * This **does not** change the behavior in protocol buffers itself; it only - * denotes the behavior and may affect how API tooling handles the field. - * - * Note: This enum **may** receive new values in the future. - */ -var FieldBehavior; -(function (FieldBehavior) { - /** FIELD_BEHAVIOR_UNSPECIFIED - Conventional default for enums. Do not use this. */ - FieldBehavior[FieldBehavior["FIELD_BEHAVIOR_UNSPECIFIED"] = 0] = "FIELD_BEHAVIOR_UNSPECIFIED"; - /** - * OPTIONAL - Specifically denotes a field as optional. - * While all fields in protocol buffers are optional, this may be specified - * for emphasis if appropriate. - */ - FieldBehavior[FieldBehavior["OPTIONAL"] = 1] = "OPTIONAL"; - /** - * REQUIRED - Denotes a field as required. - * This indicates that the field **must** be provided as part of the request, - * and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - */ - FieldBehavior[FieldBehavior["REQUIRED"] = 2] = "REQUIRED"; - /** - * OUTPUT_ONLY - Denotes a field as output only. - * This indicates that the field is provided in responses, but including the - * field in a request does nothing (the server *must* ignore it and - * *must not* throw an error as a result of the field's presence). - */ - FieldBehavior[FieldBehavior["OUTPUT_ONLY"] = 3] = "OUTPUT_ONLY"; - /** - * INPUT_ONLY - Denotes a field as input only. - * This indicates that the field is provided in requests, and the - * corresponding field is not included in output. - */ - FieldBehavior[FieldBehavior["INPUT_ONLY"] = 4] = "INPUT_ONLY"; - /** - * IMMUTABLE - Denotes a field as immutable. - * This indicates that the field may be set once in a request to create a - * resource, but may not be changed thereafter. - */ - FieldBehavior[FieldBehavior["IMMUTABLE"] = 5] = "IMMUTABLE"; - /** - * UNORDERED_LIST - Denotes that a (repeated) field is an unordered list. - * This indicates that the service may provide the elements of the list - * in any arbitrary order, rather than the order the user originally - * provided. Additionally, the list's order may or may not be stable. - */ - FieldBehavior[FieldBehavior["UNORDERED_LIST"] = 6] = "UNORDERED_LIST"; -})(FieldBehavior = exports.FieldBehavior || (exports.FieldBehavior = {})); -function fieldBehaviorFromJSON(object) { - switch (object) { - case 0: - case "FIELD_BEHAVIOR_UNSPECIFIED": - return FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED; - case 1: - case "OPTIONAL": - return FieldBehavior.OPTIONAL; - case 2: - case "REQUIRED": - return FieldBehavior.REQUIRED; - case 3: - case "OUTPUT_ONLY": - return FieldBehavior.OUTPUT_ONLY; - case 4: - case "INPUT_ONLY": - return FieldBehavior.INPUT_ONLY; - case 5: - case "IMMUTABLE": - return FieldBehavior.IMMUTABLE; - case 6: - case "UNORDERED_LIST": - return FieldBehavior.UNORDERED_LIST; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); - } -} -exports.fieldBehaviorFromJSON = fieldBehaviorFromJSON; -function fieldBehaviorToJSON(object) { - switch (object) { - case FieldBehavior.FIELD_BEHAVIOR_UNSPECIFIED: - return "FIELD_BEHAVIOR_UNSPECIFIED"; - case FieldBehavior.OPTIONAL: - return "OPTIONAL"; - case FieldBehavior.REQUIRED: - return "REQUIRED"; - case FieldBehavior.OUTPUT_ONLY: - return "OUTPUT_ONLY"; - case FieldBehavior.INPUT_ONLY: - return "INPUT_ONLY"; - case FieldBehavior.IMMUTABLE: - return "IMMUTABLE"; - case FieldBehavior.UNORDERED_LIST: - return "UNORDERED_LIST"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldBehavior"); - } -} -exports.fieldBehaviorToJSON = fieldBehaviorToJSON; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js deleted file mode 100644 index 6b3f3c9..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -/* eslint-disable */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Any = void 0; -function createBaseAny() { - return { typeUrl: "", value: Buffer.alloc(0) }; -} -exports.Any = { - fromJSON(object) { - return { - typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "", - value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : Buffer.alloc(0))); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js deleted file mode 100644 index d429aac..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +++ /dev/null @@ -1,1308 +0,0 @@ -"use strict"; -/* eslint-disable */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.MethodOptions = exports.ServiceOptions = exports.EnumValueOptions = exports.EnumOptions = exports.OneofOptions = exports.FieldOptions = exports.MessageOptions = exports.FileOptions = exports.MethodDescriptorProto = exports.ServiceDescriptorProto = exports.EnumValueDescriptorProto = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.OneofDescriptorProto = exports.FieldDescriptorProto = exports.ExtensionRangeOptions = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.FileDescriptorProto = exports.FileDescriptorSet = exports.methodOptions_IdempotencyLevelToJSON = exports.methodOptions_IdempotencyLevelFromJSON = exports.MethodOptions_IdempotencyLevel = exports.fieldOptions_JSTypeToJSON = exports.fieldOptions_JSTypeFromJSON = exports.FieldOptions_JSType = exports.fieldOptions_CTypeToJSON = exports.fieldOptions_CTypeFromJSON = exports.FieldOptions_CType = exports.fileOptions_OptimizeModeToJSON = exports.fileOptions_OptimizeModeFromJSON = exports.FileOptions_OptimizeMode = exports.fieldDescriptorProto_LabelToJSON = exports.fieldDescriptorProto_LabelFromJSON = exports.FieldDescriptorProto_Label = exports.fieldDescriptorProto_TypeToJSON = exports.fieldDescriptorProto_TypeFromJSON = exports.FieldDescriptorProto_Type = void 0; -var FieldDescriptorProto_Type; -(function (FieldDescriptorProto_Type) { - /** - * TYPE_DOUBLE - 0 is reserved for errors. - * Order is weird for historical reasons. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_DOUBLE"] = 1] = "TYPE_DOUBLE"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FLOAT"] = 2] = "TYPE_FLOAT"; - /** - * TYPE_INT64 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT64"] = 3] = "TYPE_INT64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT64"] = 4] = "TYPE_UINT64"; - /** - * TYPE_INT32 - Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - * negative values are likely. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_INT32"] = 5] = "TYPE_INT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED64"] = 6] = "TYPE_FIXED64"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_FIXED32"] = 7] = "TYPE_FIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BOOL"] = 8] = "TYPE_BOOL"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_STRING"] = 9] = "TYPE_STRING"; - /** - * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported in proto3. However, Proto3 - * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. - */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_GROUP"] = 10] = "TYPE_GROUP"; - /** TYPE_MESSAGE - Length-delimited aggregate. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_MESSAGE"] = 11] = "TYPE_MESSAGE"; - /** TYPE_BYTES - New in version 2. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_BYTES"] = 12] = "TYPE_BYTES"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_UINT32"] = 13] = "TYPE_UINT32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_ENUM"] = 14] = "TYPE_ENUM"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED32"] = 15] = "TYPE_SFIXED32"; - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SFIXED64"] = 16] = "TYPE_SFIXED64"; - /** TYPE_SINT32 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT32"] = 17] = "TYPE_SINT32"; - /** TYPE_SINT64 - Uses ZigZag encoding. */ - FieldDescriptorProto_Type[FieldDescriptorProto_Type["TYPE_SINT64"] = 18] = "TYPE_SINT64"; -})(FieldDescriptorProto_Type = exports.FieldDescriptorProto_Type || (exports.FieldDescriptorProto_Type = {})); -function fieldDescriptorProto_TypeFromJSON(object) { - switch (object) { - case 1: - case "TYPE_DOUBLE": - return FieldDescriptorProto_Type.TYPE_DOUBLE; - case 2: - case "TYPE_FLOAT": - return FieldDescriptorProto_Type.TYPE_FLOAT; - case 3: - case "TYPE_INT64": - return FieldDescriptorProto_Type.TYPE_INT64; - case 4: - case "TYPE_UINT64": - return FieldDescriptorProto_Type.TYPE_UINT64; - case 5: - case "TYPE_INT32": - return FieldDescriptorProto_Type.TYPE_INT32; - case 6: - case "TYPE_FIXED64": - return FieldDescriptorProto_Type.TYPE_FIXED64; - case 7: - case "TYPE_FIXED32": - return FieldDescriptorProto_Type.TYPE_FIXED32; - case 8: - case "TYPE_BOOL": - return FieldDescriptorProto_Type.TYPE_BOOL; - case 9: - case "TYPE_STRING": - return FieldDescriptorProto_Type.TYPE_STRING; - case 10: - case "TYPE_GROUP": - return FieldDescriptorProto_Type.TYPE_GROUP; - case 11: - case "TYPE_MESSAGE": - return FieldDescriptorProto_Type.TYPE_MESSAGE; - case 12: - case "TYPE_BYTES": - return FieldDescriptorProto_Type.TYPE_BYTES; - case 13: - case "TYPE_UINT32": - return FieldDescriptorProto_Type.TYPE_UINT32; - case 14: - case "TYPE_ENUM": - return FieldDescriptorProto_Type.TYPE_ENUM; - case 15: - case "TYPE_SFIXED32": - return FieldDescriptorProto_Type.TYPE_SFIXED32; - case 16: - case "TYPE_SFIXED64": - return FieldDescriptorProto_Type.TYPE_SFIXED64; - case 17: - case "TYPE_SINT32": - return FieldDescriptorProto_Type.TYPE_SINT32; - case 18: - case "TYPE_SINT64": - return FieldDescriptorProto_Type.TYPE_SINT64; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); - } -} -exports.fieldDescriptorProto_TypeFromJSON = fieldDescriptorProto_TypeFromJSON; -function fieldDescriptorProto_TypeToJSON(object) { - switch (object) { - case FieldDescriptorProto_Type.TYPE_DOUBLE: - return "TYPE_DOUBLE"; - case FieldDescriptorProto_Type.TYPE_FLOAT: - return "TYPE_FLOAT"; - case FieldDescriptorProto_Type.TYPE_INT64: - return "TYPE_INT64"; - case FieldDescriptorProto_Type.TYPE_UINT64: - return "TYPE_UINT64"; - case FieldDescriptorProto_Type.TYPE_INT32: - return "TYPE_INT32"; - case FieldDescriptorProto_Type.TYPE_FIXED64: - return "TYPE_FIXED64"; - case FieldDescriptorProto_Type.TYPE_FIXED32: - return "TYPE_FIXED32"; - case FieldDescriptorProto_Type.TYPE_BOOL: - return "TYPE_BOOL"; - case FieldDescriptorProto_Type.TYPE_STRING: - return "TYPE_STRING"; - case FieldDescriptorProto_Type.TYPE_GROUP: - return "TYPE_GROUP"; - case FieldDescriptorProto_Type.TYPE_MESSAGE: - return "TYPE_MESSAGE"; - case FieldDescriptorProto_Type.TYPE_BYTES: - return "TYPE_BYTES"; - case FieldDescriptorProto_Type.TYPE_UINT32: - return "TYPE_UINT32"; - case FieldDescriptorProto_Type.TYPE_ENUM: - return "TYPE_ENUM"; - case FieldDescriptorProto_Type.TYPE_SFIXED32: - return "TYPE_SFIXED32"; - case FieldDescriptorProto_Type.TYPE_SFIXED64: - return "TYPE_SFIXED64"; - case FieldDescriptorProto_Type.TYPE_SINT32: - return "TYPE_SINT32"; - case FieldDescriptorProto_Type.TYPE_SINT64: - return "TYPE_SINT64"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Type"); - } -} -exports.fieldDescriptorProto_TypeToJSON = fieldDescriptorProto_TypeToJSON; -var FieldDescriptorProto_Label; -(function (FieldDescriptorProto_Label) { - /** LABEL_OPTIONAL - 0 is reserved for errors */ - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_OPTIONAL"] = 1] = "LABEL_OPTIONAL"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REQUIRED"] = 2] = "LABEL_REQUIRED"; - FieldDescriptorProto_Label[FieldDescriptorProto_Label["LABEL_REPEATED"] = 3] = "LABEL_REPEATED"; -})(FieldDescriptorProto_Label = exports.FieldDescriptorProto_Label || (exports.FieldDescriptorProto_Label = {})); -function fieldDescriptorProto_LabelFromJSON(object) { - switch (object) { - case 1: - case "LABEL_OPTIONAL": - return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 2: - case "LABEL_REQUIRED": - return FieldDescriptorProto_Label.LABEL_REQUIRED; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); - } -} -exports.fieldDescriptorProto_LabelFromJSON = fieldDescriptorProto_LabelFromJSON; -function fieldDescriptorProto_LabelToJSON(object) { - switch (object) { - case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REQUIRED: - return "LABEL_REQUIRED"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldDescriptorProto_Label"); - } -} -exports.fieldDescriptorProto_LabelToJSON = fieldDescriptorProto_LabelToJSON; -/** Generated classes can be optimized for speed or code size. */ -var FileOptions_OptimizeMode; -(function (FileOptions_OptimizeMode) { - /** SPEED - Generate complete code for parsing, serialization, */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["SPEED"] = 1] = "SPEED"; - /** CODE_SIZE - etc. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["CODE_SIZE"] = 2] = "CODE_SIZE"; - /** LITE_RUNTIME - Generate code using MessageLite and the lite runtime. */ - FileOptions_OptimizeMode[FileOptions_OptimizeMode["LITE_RUNTIME"] = 3] = "LITE_RUNTIME"; -})(FileOptions_OptimizeMode = exports.FileOptions_OptimizeMode || (exports.FileOptions_OptimizeMode = {})); -function fileOptions_OptimizeModeFromJSON(object) { - switch (object) { - case 1: - case "SPEED": - return FileOptions_OptimizeMode.SPEED; - case 2: - case "CODE_SIZE": - return FileOptions_OptimizeMode.CODE_SIZE; - case 3: - case "LITE_RUNTIME": - return FileOptions_OptimizeMode.LITE_RUNTIME; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); - } -} -exports.fileOptions_OptimizeModeFromJSON = fileOptions_OptimizeModeFromJSON; -function fileOptions_OptimizeModeToJSON(object) { - switch (object) { - case FileOptions_OptimizeMode.SPEED: - return "SPEED"; - case FileOptions_OptimizeMode.CODE_SIZE: - return "CODE_SIZE"; - case FileOptions_OptimizeMode.LITE_RUNTIME: - return "LITE_RUNTIME"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FileOptions_OptimizeMode"); - } -} -exports.fileOptions_OptimizeModeToJSON = fileOptions_OptimizeModeToJSON; -var FieldOptions_CType; -(function (FieldOptions_CType) { - /** STRING - Default mode. */ - FieldOptions_CType[FieldOptions_CType["STRING"] = 0] = "STRING"; - FieldOptions_CType[FieldOptions_CType["CORD"] = 1] = "CORD"; - FieldOptions_CType[FieldOptions_CType["STRING_PIECE"] = 2] = "STRING_PIECE"; -})(FieldOptions_CType = exports.FieldOptions_CType || (exports.FieldOptions_CType = {})); -function fieldOptions_CTypeFromJSON(object) { - switch (object) { - case 0: - case "STRING": - return FieldOptions_CType.STRING; - case 1: - case "CORD": - return FieldOptions_CType.CORD; - case 2: - case "STRING_PIECE": - return FieldOptions_CType.STRING_PIECE; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); - } -} -exports.fieldOptions_CTypeFromJSON = fieldOptions_CTypeFromJSON; -function fieldOptions_CTypeToJSON(object) { - switch (object) { - case FieldOptions_CType.STRING: - return "STRING"; - case FieldOptions_CType.CORD: - return "CORD"; - case FieldOptions_CType.STRING_PIECE: - return "STRING_PIECE"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_CType"); - } -} -exports.fieldOptions_CTypeToJSON = fieldOptions_CTypeToJSON; -var FieldOptions_JSType; -(function (FieldOptions_JSType) { - /** JS_NORMAL - Use the default type. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NORMAL"] = 0] = "JS_NORMAL"; - /** JS_STRING - Use JavaScript strings. */ - FieldOptions_JSType[FieldOptions_JSType["JS_STRING"] = 1] = "JS_STRING"; - /** JS_NUMBER - Use JavaScript numbers. */ - FieldOptions_JSType[FieldOptions_JSType["JS_NUMBER"] = 2] = "JS_NUMBER"; -})(FieldOptions_JSType = exports.FieldOptions_JSType || (exports.FieldOptions_JSType = {})); -function fieldOptions_JSTypeFromJSON(object) { - switch (object) { - case 0: - case "JS_NORMAL": - return FieldOptions_JSType.JS_NORMAL; - case 1: - case "JS_STRING": - return FieldOptions_JSType.JS_STRING; - case 2: - case "JS_NUMBER": - return FieldOptions_JSType.JS_NUMBER; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); - } -} -exports.fieldOptions_JSTypeFromJSON = fieldOptions_JSTypeFromJSON; -function fieldOptions_JSTypeToJSON(object) { - switch (object) { - case FieldOptions_JSType.JS_NORMAL: - return "JS_NORMAL"; - case FieldOptions_JSType.JS_STRING: - return "JS_STRING"; - case FieldOptions_JSType.JS_NUMBER: - return "JS_NUMBER"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum FieldOptions_JSType"); - } -} -exports.fieldOptions_JSTypeToJSON = fieldOptions_JSTypeToJSON; -/** - * Is this method side-effect-free (or safe in HTTP parlance), or idempotent, - * or neither? HTTP based RPC implementation may choose GET verb for safe - * methods, and PUT verb for idempotent methods instead of the default POST. - */ -var MethodOptions_IdempotencyLevel; -(function (MethodOptions_IdempotencyLevel) { - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0] = "IDEMPOTENCY_UNKNOWN"; - /** NO_SIDE_EFFECTS - implies idempotent */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1] = "NO_SIDE_EFFECTS"; - /** IDEMPOTENT - idempotent, but may have side effects */ - MethodOptions_IdempotencyLevel[MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2] = "IDEMPOTENT"; -})(MethodOptions_IdempotencyLevel = exports.MethodOptions_IdempotencyLevel || (exports.MethodOptions_IdempotencyLevel = {})); -function methodOptions_IdempotencyLevelFromJSON(object) { - switch (object) { - case 0: - case "IDEMPOTENCY_UNKNOWN": - return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; - case 1: - case "NO_SIDE_EFFECTS": - return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; - case 2: - case "IDEMPOTENT": - return MethodOptions_IdempotencyLevel.IDEMPOTENT; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); - } -} -exports.methodOptions_IdempotencyLevelFromJSON = methodOptions_IdempotencyLevelFromJSON; -function methodOptions_IdempotencyLevelToJSON(object) { - switch (object) { - case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return "IDEMPOTENCY_UNKNOWN"; - case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return "NO_SIDE_EFFECTS"; - case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return "IDEMPOTENT"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum MethodOptions_IdempotencyLevel"); - } -} -exports.methodOptions_IdempotencyLevelToJSON = methodOptions_IdempotencyLevelToJSON; -function createBaseFileDescriptorSet() { - return { file: [] }; -} -exports.FileDescriptorSet = { - fromJSON(object) { - return { file: Array.isArray(object?.file) ? object.file.map((e) => exports.FileDescriptorProto.fromJSON(e)) : [] }; - }, - toJSON(message) { - const obj = {}; - if (message.file) { - obj.file = message.file.map((e) => e ? exports.FileDescriptorProto.toJSON(e) : undefined); - } - else { - obj.file = []; - } - return obj; - }, -}; -function createBaseFileDescriptorProto() { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: undefined, - sourceCodeInfo: undefined, - syntax: "", - }; -} -exports.FileDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) ? object.dependency.map((e) => String(e)) : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e) => Number(e)) - : [], - weakDependency: Array.isArray(object?.weakDependency) ? object.weakDependency.map((e) => Number(e)) : [], - messageType: Array.isArray(object?.messageType) - ? object.messageType.map((e) => exports.DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) : [], - service: Array.isArray(object?.service) ? object.service.map((e) => exports.ServiceDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e) => exports.FieldDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? exports.FileOptions.fromJSON(object.options) : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) ? exports.SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.package !== undefined && (obj.package = message.package); - if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); - } - else { - obj.dependency = []; - } - if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => Math.round(e)); - } - else { - obj.publicDependency = []; - } - if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); - } - else { - obj.weakDependency = []; - } - if (message.messageType) { - obj.messageType = message.messageType.map((e) => e ? exports.DescriptorProto.toJSON(e) : undefined); - } - else { - obj.messageType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? exports.EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.service) { - obj.service = message.service.map((e) => e ? exports.ServiceDescriptorProto.toJSON(e) : undefined); - } - else { - obj.service = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - message.options !== undefined && (obj.options = message.options ? exports.FileOptions.toJSON(message.options) : undefined); - message.sourceCodeInfo !== undefined && - (obj.sourceCodeInfo = message.sourceCodeInfo ? exports.SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined); - message.syntax !== undefined && (obj.syntax = message.syntax); - return obj; - }, -}; -function createBaseDescriptorProto() { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} -exports.DescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) ? object.field.map((e) => exports.FieldDescriptorProto.fromJSON(e)) : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e) => exports.FieldDescriptorProto.fromJSON(e)) - : [], - nestedType: Array.isArray(object?.nestedType) - ? object.nestedType.map((e) => exports.DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) ? object.enumType.map((e) => exports.EnumDescriptorProto.fromJSON(e)) : [], - extensionRange: Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e) => exports.DescriptorProto_ExtensionRange.fromJSON(e)) - : [], - oneofDecl: Array.isArray(object?.oneofDecl) - ? object.oneofDecl.map((e) => exports.OneofDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? exports.MessageOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e) => exports.DescriptorProto_ReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) ? object.reservedName.map((e) => String(e)) : [], - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.field) { - obj.field = message.field.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.field = []; - } - if (message.extension) { - obj.extension = message.extension.map((e) => e ? exports.FieldDescriptorProto.toJSON(e) : undefined); - } - else { - obj.extension = []; - } - if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => e ? exports.DescriptorProto.toJSON(e) : undefined); - } - else { - obj.nestedType = []; - } - if (message.enumType) { - obj.enumType = message.enumType.map((e) => e ? exports.EnumDescriptorProto.toJSON(e) : undefined); - } - else { - obj.enumType = []; - } - if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => e ? exports.DescriptorProto_ExtensionRange.toJSON(e) : undefined); - } - else { - obj.extensionRange = []; - } - if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => e ? exports.OneofDescriptorProto.toJSON(e) : undefined); - } - else { - obj.oneofDecl = []; - } - message.options !== undefined && - (obj.options = message.options ? exports.MessageOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? exports.DescriptorProto_ReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, -}; -function createBaseDescriptorProto_ExtensionRange() { - return { start: 0, end: 0, options: undefined }; -} -exports.DescriptorProto_ExtensionRange = { - fromJSON(object) { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) ? exports.ExtensionRangeOptions.fromJSON(object.options) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - message.options !== undefined && - (obj.options = message.options ? exports.ExtensionRangeOptions.toJSON(message.options) : undefined); - return obj; - }, -}; -function createBaseDescriptorProto_ReservedRange() { - return { start: 0, end: 0 }; -} -exports.DescriptorProto_ReservedRange = { - fromJSON(object) { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, -}; -function createBaseExtensionRangeOptions() { - return { uninterpretedOption: [] }; -} -exports.ExtensionRangeOptions = { - fromJSON(object) { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseFieldDescriptorProto() { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: undefined, - proto3Optional: false, - }; -} -exports.FieldDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", - oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) ? exports.FieldOptions.fromJSON(object.options) : undefined, - proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); - message.typeName !== undefined && (obj.typeName = message.typeName); - message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex)); - message.jsonName !== undefined && (obj.jsonName = message.jsonName); - message.options !== undefined && (obj.options = message.options ? exports.FieldOptions.toJSON(message.options) : undefined); - message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); - return obj; - }, -}; -function createBaseOneofDescriptorProto() { - return { name: "", options: undefined }; -} -exports.OneofDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) ? exports.OneofOptions.fromJSON(object.options) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.options !== undefined && (obj.options = message.options ? exports.OneofOptions.toJSON(message.options) : undefined); - return obj; - }, -}; -function createBaseEnumDescriptorProto() { - return { name: "", value: [], options: undefined, reservedRange: [], reservedName: [] }; -} -exports.EnumDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) ? object.value.map((e) => exports.EnumValueDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? exports.EnumOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e) => exports.EnumDescriptorProto_EnumReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e) => String(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.value) { - obj.value = message.value.map((e) => e ? exports.EnumValueDescriptorProto.toJSON(e) : undefined); - } - else { - obj.value = []; - } - message.options !== undefined && (obj.options = message.options ? exports.EnumOptions.toJSON(message.options) : undefined); - if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => e ? exports.EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined); - } - else { - obj.reservedRange = []; - } - if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); - } - else { - obj.reservedName = []; - } - return obj; - }, -}; -function createBaseEnumDescriptorProto_EnumReservedRange() { - return { start: 0, end: 0 }; -} -exports.EnumDescriptorProto_EnumReservedRange = { - fromJSON(object) { - return { start: isSet(object.start) ? Number(object.start) : 0, end: isSet(object.end) ? Number(object.end) : 0 }; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, -}; -function createBaseEnumValueDescriptorProto() { - return { name: "", number: 0, options: undefined }; -} -exports.EnumValueDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) ? exports.EnumValueOptions.fromJSON(object.options) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.options !== undefined && - (obj.options = message.options ? exports.EnumValueOptions.toJSON(message.options) : undefined); - return obj; - }, -}; -function createBaseServiceDescriptorProto() { - return { name: "", method: [], options: undefined }; -} -exports.ServiceDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) ? object.method.map((e) => exports.MethodDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) ? exports.ServiceOptions.fromJSON(object.options) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - if (message.method) { - obj.method = message.method.map((e) => e ? exports.MethodDescriptorProto.toJSON(e) : undefined); - } - else { - obj.method = []; - } - message.options !== undefined && - (obj.options = message.options ? exports.ServiceOptions.toJSON(message.options) : undefined); - return obj; - }, -}; -function createBaseMethodDescriptorProto() { - return { - name: "", - inputType: "", - outputType: "", - options: undefined, - clientStreaming: false, - serverStreaming: false, - }; -} -exports.MethodDescriptorProto = { - fromJSON(object) { - return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) ? String(object.outputType) : "", - options: isSet(object.options) ? exports.MethodOptions.fromJSON(object.options) : undefined, - clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, - serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.name !== undefined && (obj.name = message.name); - message.inputType !== undefined && (obj.inputType = message.inputType); - message.outputType !== undefined && (obj.outputType = message.outputType); - message.options !== undefined && - (obj.options = message.options ? exports.MethodOptions.toJSON(message.options) : undefined); - message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); - return obj; - }, -}; -function createBaseFileOptions() { - return { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", - uninterpretedOption: [], - }; -} -exports.FileOptions = { - fromJSON(object) { - return { - javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) ? Boolean(object.javaMultipleFiles) : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) - : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? Boolean(object.javaStringCheckUtf8) : false, - optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) ? Boolean(object.ccGenericServices) : false, - javaGenericServices: isSet(object.javaGenericServices) ? Boolean(object.javaGenericServices) : false, - pyGenericServices: isSet(object.pyGenericServices) ? Boolean(object.pyGenericServices) : false, - phpGenericServices: isSet(object.phpGenericServices) ? Boolean(object.phpGenericServices) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, - objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", - csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", - swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", - phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? String(object.phpMetadataNamespace) : "", - rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); - message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); - message.javaGenerateEqualsAndHash !== undefined && - (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); - message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8); - message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); - message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); - message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); - message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); - message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseMessageOptions() { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [], - }; -} -exports.MessageOptions = { - fromJSON(object) { - return { - messageSetWireFormat: isSet(object.messageSetWireFormat) ? Boolean(object.messageSetWireFormat) : false, - noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) - ? Boolean(object.noStandardDescriptorAccessor) - : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat); - message.noStandardDescriptorAccessor !== undefined && - (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseFieldOptions() { - return { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - unverifiedLazy: false, - deprecated: false, - weak: false, - uninterpretedOption: [], - }; -} -exports.FieldOptions = { - fromJSON(object) { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, - packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - unverifiedLazy: isSet(object.unverifiedLazy) ? Boolean(object.unverifiedLazy) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); - message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); - message.lazy !== undefined && (obj.lazy = message.lazy); - message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.weak !== undefined && (obj.weak = message.weak); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseOneofOptions() { - return { uninterpretedOption: [] }; -} -exports.OneofOptions = { - fromJSON(object) { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseEnumOptions() { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; -} -exports.EnumOptions = { - fromJSON(object) { - return { - allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseEnumValueOptions() { - return { deprecated: false, uninterpretedOption: [] }; -} -exports.EnumValueOptions = { - fromJSON(object) { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseServiceOptions() { - return { deprecated: false, uninterpretedOption: [] }; -} -exports.ServiceOptions = { - fromJSON(object) { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseMethodOptions() { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; -} -exports.MethodOptions = { - fromJSON(object) { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - idempotencyLevel: isSet(object.idempotencyLevel) - ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) - : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e) => exports.UninterpretedOption.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); - if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? exports.UninterpretedOption.toJSON(e) : undefined); - } - else { - obj.uninterpretedOption = []; - } - return obj; - }, -}; -function createBaseUninterpretedOption() { - return { - name: [], - identifierValue: "", - positiveIntValue: "0", - negativeIntValue: "0", - doubleValue: 0, - stringValue: Buffer.alloc(0), - aggregateValue: "", - }; -} -exports.UninterpretedOption = { - fromJSON(object) { - return { - name: Array.isArray(object?.name) ? object.name.map((e) => exports.UninterpretedOption_NamePart.fromJSON(e)) : [], - identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? String(object.positiveIntValue) : "0", - negativeIntValue: isSet(object.negativeIntValue) ? String(object.negativeIntValue) : "0", - doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, - stringValue: isSet(object.stringValue) ? Buffer.from(bytesFromBase64(object.stringValue)) : Buffer.alloc(0), - aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", - }; - }, - toJSON(message) { - const obj = {}; - if (message.name) { - obj.name = message.name.map((e) => e ? exports.UninterpretedOption_NamePart.toJSON(e) : undefined); - } - else { - obj.name = []; - } - message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); - message.stringValue !== undefined && - (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : Buffer.alloc(0))); - message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); - return obj; - }, -}; -function createBaseUninterpretedOption_NamePart() { - return { namePart: "", isExtension: false }; -} -exports.UninterpretedOption_NamePart = { - fromJSON(object) { - return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && (obj.isExtension = message.isExtension); - return obj; - }, -}; -function createBaseSourceCodeInfo() { - return { location: [] }; -} -exports.SourceCodeInfo = { - fromJSON(object) { - return { - location: Array.isArray(object?.location) - ? object.location.map((e) => exports.SourceCodeInfo_Location.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.location) { - obj.location = message.location.map((e) => e ? exports.SourceCodeInfo_Location.toJSON(e) : undefined); - } - else { - obj.location = []; - } - return obj; - }, -}; -function createBaseSourceCodeInfo_Location() { - return { path: [], span: [], leadingComments: "", trailingComments: "", leadingDetachedComments: [] }; -} -exports.SourceCodeInfo_Location = { - fromJSON(object) { - return { - path: Array.isArray(object?.path) ? object.path.map((e) => Number(e)) : [], - span: Array.isArray(object?.span) ? object.span.map((e) => Number(e)) : [], - leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", - trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) - ? object.leadingDetachedComments.map((e) => String(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); - } - else { - obj.path = []; - } - if (message.span) { - obj.span = message.span.map((e) => Math.round(e)); - } - else { - obj.span = []; - } - message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); - if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e); - } - else { - obj.leadingDetachedComments = []; - } - return obj; - }, -}; -function createBaseGeneratedCodeInfo() { - return { annotation: [] }; -} -exports.GeneratedCodeInfo = { - fromJSON(object) { - return { - annotation: Array.isArray(object?.annotation) - ? object.annotation.map((e) => exports.GeneratedCodeInfo_Annotation.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.annotation) { - obj.annotation = message.annotation.map((e) => e ? exports.GeneratedCodeInfo_Annotation.toJSON(e) : undefined); - } - else { - obj.annotation = []; - } - return obj; - }, -}; -function createBaseGeneratedCodeInfo_Annotation() { - return { path: [], sourceFile: "", begin: 0, end: 0 }; -} -exports.GeneratedCodeInfo_Annotation = { - fromJSON(object) { - return { - path: Array.isArray(object?.path) ? object.path.map((e) => Number(e)) : [], - sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; - }, - toJSON(message) { - const obj = {}; - if (message.path) { - obj.path = message.path.map((e) => Math.round(e)); - } - else { - obj.path = []; - } - message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = Math.round(message.begin)); - message.end !== undefined && (obj.end = Math.round(message.end)); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js deleted file mode 100644 index 159135f..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -/* eslint-disable */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Timestamp = void 0; -function createBaseTimestamp() { - return { seconds: "0", nanos: 0 }; -} -exports.Timestamp = { - fromJSON(object) { - return { - seconds: isSet(object.seconds) ? String(object.seconds) : "0", - nanos: isSet(object.nanos) ? Number(object.nanos) : 0, - }; - }, - toJSON(message) { - const obj = {}; - message.seconds !== undefined && (obj.seconds = message.seconds); - message.nanos !== undefined && (obj.nanos = Math.round(message.nanos)); - return obj; - }, -}; -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js deleted file mode 100644 index 1ef3e1b..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Bundle = exports.VerificationMaterial = exports.TimestampVerificationData = void 0; -/* eslint-disable */ -const envelope_1 = require("./envelope"); -const sigstore_common_1 = require("./sigstore_common"); -const sigstore_rekor_1 = require("./sigstore_rekor"); -function createBaseTimestampVerificationData() { - return { rfc3161Timestamps: [] }; -} -exports.TimestampVerificationData = { - fromJSON(object) { - return { - rfc3161Timestamps: Array.isArray(object?.rfc3161Timestamps) - ? object.rfc3161Timestamps.map((e) => sigstore_common_1.RFC3161SignedTimestamp.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.rfc3161Timestamps) { - obj.rfc3161Timestamps = message.rfc3161Timestamps.map((e) => e ? sigstore_common_1.RFC3161SignedTimestamp.toJSON(e) : undefined); - } - else { - obj.rfc3161Timestamps = []; - } - return obj; - }, -}; -function createBaseVerificationMaterial() { - return { content: undefined, tlogEntries: [], timestampVerificationData: undefined }; -} -exports.VerificationMaterial = { - fromJSON(object) { - return { - content: isSet(object.publicKey) - ? { $case: "publicKey", publicKey: sigstore_common_1.PublicKeyIdentifier.fromJSON(object.publicKey) } - : isSet(object.x509CertificateChain) - ? { - $case: "x509CertificateChain", - x509CertificateChain: sigstore_common_1.X509CertificateChain.fromJSON(object.x509CertificateChain), - } - : undefined, - tlogEntries: Array.isArray(object?.tlogEntries) - ? object.tlogEntries.map((e) => sigstore_rekor_1.TransparencyLogEntry.fromJSON(e)) - : [], - timestampVerificationData: isSet(object.timestampVerificationData) - ? exports.TimestampVerificationData.fromJSON(object.timestampVerificationData) - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.content?.$case === "publicKey" && - (obj.publicKey = message.content?.publicKey ? sigstore_common_1.PublicKeyIdentifier.toJSON(message.content?.publicKey) : undefined); - message.content?.$case === "x509CertificateChain" && - (obj.x509CertificateChain = message.content?.x509CertificateChain - ? sigstore_common_1.X509CertificateChain.toJSON(message.content?.x509CertificateChain) - : undefined); - if (message.tlogEntries) { - obj.tlogEntries = message.tlogEntries.map((e) => e ? sigstore_rekor_1.TransparencyLogEntry.toJSON(e) : undefined); - } - else { - obj.tlogEntries = []; - } - message.timestampVerificationData !== undefined && - (obj.timestampVerificationData = message.timestampVerificationData - ? exports.TimestampVerificationData.toJSON(message.timestampVerificationData) - : undefined); - return obj; - }, -}; -function createBaseBundle() { - return { mediaType: "", verificationMaterial: undefined, content: undefined }; -} -exports.Bundle = { - fromJSON(object) { - return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", - verificationMaterial: isSet(object.verificationMaterial) - ? exports.VerificationMaterial.fromJSON(object.verificationMaterial) - : undefined, - content: isSet(object.messageSignature) - ? { $case: "messageSignature", messageSignature: sigstore_common_1.MessageSignature.fromJSON(object.messageSignature) } - : isSet(object.dsseEnvelope) - ? { $case: "dsseEnvelope", dsseEnvelope: envelope_1.Envelope.fromJSON(object.dsseEnvelope) } - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - message.verificationMaterial !== undefined && (obj.verificationMaterial = message.verificationMaterial - ? exports.VerificationMaterial.toJSON(message.verificationMaterial) - : undefined); - message.content?.$case === "messageSignature" && (obj.messageSignature = message.content?.messageSignature - ? sigstore_common_1.MessageSignature.toJSON(message.content?.messageSignature) - : undefined); - message.content?.$case === "dsseEnvelope" && - (obj.dsseEnvelope = message.content?.dsseEnvelope ? envelope_1.Envelope.toJSON(message.content?.dsseEnvelope) : undefined); - return obj; - }, -}; -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js deleted file mode 100644 index bcd654e..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +++ /dev/null @@ -1,457 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimeRange = exports.X509CertificateChain = exports.SubjectAlternativeName = exports.X509Certificate = exports.DistinguishedName = exports.ObjectIdentifierValuePair = exports.ObjectIdentifier = exports.PublicKeyIdentifier = exports.PublicKey = exports.RFC3161SignedTimestamp = exports.LogId = exports.MessageSignature = exports.HashOutput = exports.subjectAlternativeNameTypeToJSON = exports.subjectAlternativeNameTypeFromJSON = exports.SubjectAlternativeNameType = exports.publicKeyDetailsToJSON = exports.publicKeyDetailsFromJSON = exports.PublicKeyDetails = exports.hashAlgorithmToJSON = exports.hashAlgorithmFromJSON = exports.HashAlgorithm = void 0; -/* eslint-disable */ -const timestamp_1 = require("./google/protobuf/timestamp"); -/** - * Only a subset of the secure hash standard algorithms are supported. - * See for more - * details. - * UNSPECIFIED SHOULD not be used, primary reason for inclusion is to force - * any proto JSON serialization to emit the used hash algorithm, as default - * option is to *omit* the default value of an enum (which is the first - * value, represented by '0'. - */ -var HashAlgorithm; -(function (HashAlgorithm) { - HashAlgorithm[HashAlgorithm["HASH_ALGORITHM_UNSPECIFIED"] = 0] = "HASH_ALGORITHM_UNSPECIFIED"; - HashAlgorithm[HashAlgorithm["SHA2_256"] = 1] = "SHA2_256"; -})(HashAlgorithm = exports.HashAlgorithm || (exports.HashAlgorithm = {})); -function hashAlgorithmFromJSON(object) { - switch (object) { - case 0: - case "HASH_ALGORITHM_UNSPECIFIED": - return HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED; - case 1: - case "SHA2_256": - return HashAlgorithm.SHA2_256; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); - } -} -exports.hashAlgorithmFromJSON = hashAlgorithmFromJSON; -function hashAlgorithmToJSON(object) { - switch (object) { - case HashAlgorithm.HASH_ALGORITHM_UNSPECIFIED: - return "HASH_ALGORITHM_UNSPECIFIED"; - case HashAlgorithm.SHA2_256: - return "SHA2_256"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HashAlgorithm"); - } -} -exports.hashAlgorithmToJSON = hashAlgorithmToJSON; -/** - * Details of a specific public key, capturing the the key encoding method, - * and signature algorithm. - * To avoid the possibility of contradicting formats such as PKCS1 with - * ED25519 the valid permutations are listed as a linear set instead of a - * cartesian set (i.e one combined variable instead of two, one for encoding - * and one for the signature algorithm). - */ -var PublicKeyDetails; -(function (PublicKeyDetails) { - PublicKeyDetails[PublicKeyDetails["PUBLIC_KEY_DETAILS_UNSPECIFIED"] = 0] = "PUBLIC_KEY_DETAILS_UNSPECIFIED"; - /** PKCS1_RSA_PKCS1V5 - RSA */ - PublicKeyDetails[PublicKeyDetails["PKCS1_RSA_PKCS1V5"] = 1] = "PKCS1_RSA_PKCS1V5"; - /** PKCS1_RSA_PSS - See RFC8017 */ - PublicKeyDetails[PublicKeyDetails["PKCS1_RSA_PSS"] = 2] = "PKCS1_RSA_PSS"; - PublicKeyDetails[PublicKeyDetails["PKIX_RSA_PKCS1V5"] = 3] = "PKIX_RSA_PKCS1V5"; - PublicKeyDetails[PublicKeyDetails["PKIX_RSA_PSS"] = 4] = "PKIX_RSA_PSS"; - /** PKIX_ECDSA_P256_SHA_256 - ECDSA */ - PublicKeyDetails[PublicKeyDetails["PKIX_ECDSA_P256_SHA_256"] = 5] = "PKIX_ECDSA_P256_SHA_256"; - /** PKIX_ECDSA_P256_HMAC_SHA_256 - See RFC6979 */ - PublicKeyDetails[PublicKeyDetails["PKIX_ECDSA_P256_HMAC_SHA_256"] = 6] = "PKIX_ECDSA_P256_HMAC_SHA_256"; - /** PKIX_ED25519 - Ed 25519 */ - PublicKeyDetails[PublicKeyDetails["PKIX_ED25519"] = 7] = "PKIX_ED25519"; -})(PublicKeyDetails = exports.PublicKeyDetails || (exports.PublicKeyDetails = {})); -function publicKeyDetailsFromJSON(object) { - switch (object) { - case 0: - case "PUBLIC_KEY_DETAILS_UNSPECIFIED": - return PublicKeyDetails.PUBLIC_KEY_DETAILS_UNSPECIFIED; - case 1: - case "PKCS1_RSA_PKCS1V5": - return PublicKeyDetails.PKCS1_RSA_PKCS1V5; - case 2: - case "PKCS1_RSA_PSS": - return PublicKeyDetails.PKCS1_RSA_PSS; - case 3: - case "PKIX_RSA_PKCS1V5": - return PublicKeyDetails.PKIX_RSA_PKCS1V5; - case 4: - case "PKIX_RSA_PSS": - return PublicKeyDetails.PKIX_RSA_PSS; - case 5: - case "PKIX_ECDSA_P256_SHA_256": - return PublicKeyDetails.PKIX_ECDSA_P256_SHA_256; - case 6: - case "PKIX_ECDSA_P256_HMAC_SHA_256": - return PublicKeyDetails.PKIX_ECDSA_P256_HMAC_SHA_256; - case 7: - case "PKIX_ED25519": - return PublicKeyDetails.PKIX_ED25519; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); - } -} -exports.publicKeyDetailsFromJSON = publicKeyDetailsFromJSON; -function publicKeyDetailsToJSON(object) { - switch (object) { - case PublicKeyDetails.PUBLIC_KEY_DETAILS_UNSPECIFIED: - return "PUBLIC_KEY_DETAILS_UNSPECIFIED"; - case PublicKeyDetails.PKCS1_RSA_PKCS1V5: - return "PKCS1_RSA_PKCS1V5"; - case PublicKeyDetails.PKCS1_RSA_PSS: - return "PKCS1_RSA_PSS"; - case PublicKeyDetails.PKIX_RSA_PKCS1V5: - return "PKIX_RSA_PKCS1V5"; - case PublicKeyDetails.PKIX_RSA_PSS: - return "PKIX_RSA_PSS"; - case PublicKeyDetails.PKIX_ECDSA_P256_SHA_256: - return "PKIX_ECDSA_P256_SHA_256"; - case PublicKeyDetails.PKIX_ECDSA_P256_HMAC_SHA_256: - return "PKIX_ECDSA_P256_HMAC_SHA_256"; - case PublicKeyDetails.PKIX_ED25519: - return "PKIX_ED25519"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum PublicKeyDetails"); - } -} -exports.publicKeyDetailsToJSON = publicKeyDetailsToJSON; -var SubjectAlternativeNameType; -(function (SubjectAlternativeNameType) { - SubjectAlternativeNameType[SubjectAlternativeNameType["SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"] = 0] = "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"; - SubjectAlternativeNameType[SubjectAlternativeNameType["EMAIL"] = 1] = "EMAIL"; - SubjectAlternativeNameType[SubjectAlternativeNameType["URI"] = 2] = "URI"; - /** - * OTHER_NAME - OID 1.3.6.1.4.1.57264.1.7 - * See https://github.com/sigstore/fulcio/blob/main/docs/oid-info.md#1361415726417--othername-san - * for more details. - */ - SubjectAlternativeNameType[SubjectAlternativeNameType["OTHER_NAME"] = 3] = "OTHER_NAME"; -})(SubjectAlternativeNameType = exports.SubjectAlternativeNameType || (exports.SubjectAlternativeNameType = {})); -function subjectAlternativeNameTypeFromJSON(object) { - switch (object) { - case 0: - case "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED": - return SubjectAlternativeNameType.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED; - case 1: - case "EMAIL": - return SubjectAlternativeNameType.EMAIL; - case 2: - case "URI": - return SubjectAlternativeNameType.URI; - case 3: - case "OTHER_NAME": - return SubjectAlternativeNameType.OTHER_NAME; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); - } -} -exports.subjectAlternativeNameTypeFromJSON = subjectAlternativeNameTypeFromJSON; -function subjectAlternativeNameTypeToJSON(object) { - switch (object) { - case SubjectAlternativeNameType.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED: - return "SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED"; - case SubjectAlternativeNameType.EMAIL: - return "EMAIL"; - case SubjectAlternativeNameType.URI: - return "URI"; - case SubjectAlternativeNameType.OTHER_NAME: - return "OTHER_NAME"; - default: - throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum SubjectAlternativeNameType"); - } -} -exports.subjectAlternativeNameTypeToJSON = subjectAlternativeNameTypeToJSON; -function createBaseHashOutput() { - return { algorithm: 0, digest: Buffer.alloc(0) }; -} -exports.HashOutput = { - fromJSON(object) { - return { - algorithm: isSet(object.algorithm) ? hashAlgorithmFromJSON(object.algorithm) : 0, - digest: isSet(object.digest) ? Buffer.from(bytesFromBase64(object.digest)) : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.algorithm !== undefined && (obj.algorithm = hashAlgorithmToJSON(message.algorithm)); - message.digest !== undefined && - (obj.digest = base64FromBytes(message.digest !== undefined ? message.digest : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseMessageSignature() { - return { messageDigest: undefined, signature: Buffer.alloc(0) }; -} -exports.MessageSignature = { - fromJSON(object) { - return { - messageDigest: isSet(object.messageDigest) ? exports.HashOutput.fromJSON(object.messageDigest) : undefined, - signature: isSet(object.signature) ? Buffer.from(bytesFromBase64(object.signature)) : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.messageDigest !== undefined && - (obj.messageDigest = message.messageDigest ? exports.HashOutput.toJSON(message.messageDigest) : undefined); - message.signature !== undefined && - (obj.signature = base64FromBytes(message.signature !== undefined ? message.signature : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseLogId() { - return { keyId: Buffer.alloc(0) }; -} -exports.LogId = { - fromJSON(object) { - return { keyId: isSet(object.keyId) ? Buffer.from(bytesFromBase64(object.keyId)) : Buffer.alloc(0) }; - }, - toJSON(message) { - const obj = {}; - message.keyId !== undefined && - (obj.keyId = base64FromBytes(message.keyId !== undefined ? message.keyId : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseRFC3161SignedTimestamp() { - return { signedTimestamp: Buffer.alloc(0) }; -} -exports.RFC3161SignedTimestamp = { - fromJSON(object) { - return { - signedTimestamp: isSet(object.signedTimestamp) - ? Buffer.from(bytesFromBase64(object.signedTimestamp)) - : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.signedTimestamp !== undefined && - (obj.signedTimestamp = base64FromBytes(message.signedTimestamp !== undefined ? message.signedTimestamp : Buffer.alloc(0))); - return obj; - }, -}; -function createBasePublicKey() { - return { rawBytes: undefined, keyDetails: 0, validFor: undefined }; -} -exports.PublicKey = { - fromJSON(object) { - return { - rawBytes: isSet(object.rawBytes) ? Buffer.from(bytesFromBase64(object.rawBytes)) : undefined, - keyDetails: isSet(object.keyDetails) ? publicKeyDetailsFromJSON(object.keyDetails) : 0, - validFor: isSet(object.validFor) ? exports.TimeRange.fromJSON(object.validFor) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.rawBytes !== undefined && - (obj.rawBytes = message.rawBytes !== undefined ? base64FromBytes(message.rawBytes) : undefined); - message.keyDetails !== undefined && (obj.keyDetails = publicKeyDetailsToJSON(message.keyDetails)); - message.validFor !== undefined && - (obj.validFor = message.validFor ? exports.TimeRange.toJSON(message.validFor) : undefined); - return obj; - }, -}; -function createBasePublicKeyIdentifier() { - return { hint: "" }; -} -exports.PublicKeyIdentifier = { - fromJSON(object) { - return { hint: isSet(object.hint) ? String(object.hint) : "" }; - }, - toJSON(message) { - const obj = {}; - message.hint !== undefined && (obj.hint = message.hint); - return obj; - }, -}; -function createBaseObjectIdentifier() { - return { id: [] }; -} -exports.ObjectIdentifier = { - fromJSON(object) { - return { id: Array.isArray(object?.id) ? object.id.map((e) => Number(e)) : [] }; - }, - toJSON(message) { - const obj = {}; - if (message.id) { - obj.id = message.id.map((e) => Math.round(e)); - } - else { - obj.id = []; - } - return obj; - }, -}; -function createBaseObjectIdentifierValuePair() { - return { oid: undefined, value: Buffer.alloc(0) }; -} -exports.ObjectIdentifierValuePair = { - fromJSON(object) { - return { - oid: isSet(object.oid) ? exports.ObjectIdentifier.fromJSON(object.oid) : undefined, - value: isSet(object.value) ? Buffer.from(bytesFromBase64(object.value)) : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.oid !== undefined && (obj.oid = message.oid ? exports.ObjectIdentifier.toJSON(message.oid) : undefined); - message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseDistinguishedName() { - return { organization: "", commonName: "" }; -} -exports.DistinguishedName = { - fromJSON(object) { - return { - organization: isSet(object.organization) ? String(object.organization) : "", - commonName: isSet(object.commonName) ? String(object.commonName) : "", - }; - }, - toJSON(message) { - const obj = {}; - message.organization !== undefined && (obj.organization = message.organization); - message.commonName !== undefined && (obj.commonName = message.commonName); - return obj; - }, -}; -function createBaseX509Certificate() { - return { rawBytes: Buffer.alloc(0) }; -} -exports.X509Certificate = { - fromJSON(object) { - return { rawBytes: isSet(object.rawBytes) ? Buffer.from(bytesFromBase64(object.rawBytes)) : Buffer.alloc(0) }; - }, - toJSON(message) { - const obj = {}; - message.rawBytes !== undefined && - (obj.rawBytes = base64FromBytes(message.rawBytes !== undefined ? message.rawBytes : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseSubjectAlternativeName() { - return { type: 0, identity: undefined }; -} -exports.SubjectAlternativeName = { - fromJSON(object) { - return { - type: isSet(object.type) ? subjectAlternativeNameTypeFromJSON(object.type) : 0, - identity: isSet(object.regexp) - ? { $case: "regexp", regexp: String(object.regexp) } - : isSet(object.value) - ? { $case: "value", value: String(object.value) } - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.type !== undefined && (obj.type = subjectAlternativeNameTypeToJSON(message.type)); - message.identity?.$case === "regexp" && (obj.regexp = message.identity?.regexp); - message.identity?.$case === "value" && (obj.value = message.identity?.value); - return obj; - }, -}; -function createBaseX509CertificateChain() { - return { certificates: [] }; -} -exports.X509CertificateChain = { - fromJSON(object) { - return { - certificates: Array.isArray(object?.certificates) - ? object.certificates.map((e) => exports.X509Certificate.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.certificates) { - obj.certificates = message.certificates.map((e) => e ? exports.X509Certificate.toJSON(e) : undefined); - } - else { - obj.certificates = []; - } - return obj; - }, -}; -function createBaseTimeRange() { - return { start: undefined, end: undefined }; -} -exports.TimeRange = { - fromJSON(object) { - return { - start: isSet(object.start) ? fromJsonTimestamp(object.start) : undefined, - end: isSet(object.end) ? fromJsonTimestamp(object.end) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.start !== undefined && (obj.start = message.start.toISOString()); - message.end !== undefined && (obj.end = message.end.toISOString()); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function fromTimestamp(t) { - let millis = Number(t.seconds) * 1000; - millis += t.nanos / 1000000; - return new Date(millis); -} -function fromJsonTimestamp(o) { - if (o instanceof Date) { - return o; - } - else if (typeof o === "string") { - return new Date(o); - } - else { - return fromTimestamp(timestamp_1.Timestamp.fromJSON(o)); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js deleted file mode 100644 index 398193b..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TransparencyLogEntry = exports.InclusionPromise = exports.InclusionProof = exports.Checkpoint = exports.KindVersion = void 0; -/* eslint-disable */ -const sigstore_common_1 = require("./sigstore_common"); -function createBaseKindVersion() { - return { kind: "", version: "" }; -} -exports.KindVersion = { - fromJSON(object) { - return { - kind: isSet(object.kind) ? String(object.kind) : "", - version: isSet(object.version) ? String(object.version) : "", - }; - }, - toJSON(message) { - const obj = {}; - message.kind !== undefined && (obj.kind = message.kind); - message.version !== undefined && (obj.version = message.version); - return obj; - }, -}; -function createBaseCheckpoint() { - return { envelope: "" }; -} -exports.Checkpoint = { - fromJSON(object) { - return { envelope: isSet(object.envelope) ? String(object.envelope) : "" }; - }, - toJSON(message) { - const obj = {}; - message.envelope !== undefined && (obj.envelope = message.envelope); - return obj; - }, -}; -function createBaseInclusionProof() { - return { logIndex: "0", rootHash: Buffer.alloc(0), treeSize: "0", hashes: [], checkpoint: undefined }; -} -exports.InclusionProof = { - fromJSON(object) { - return { - logIndex: isSet(object.logIndex) ? String(object.logIndex) : "0", - rootHash: isSet(object.rootHash) ? Buffer.from(bytesFromBase64(object.rootHash)) : Buffer.alloc(0), - treeSize: isSet(object.treeSize) ? String(object.treeSize) : "0", - hashes: Array.isArray(object?.hashes) ? object.hashes.map((e) => Buffer.from(bytesFromBase64(e))) : [], - checkpoint: isSet(object.checkpoint) ? exports.Checkpoint.fromJSON(object.checkpoint) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.logIndex !== undefined && (obj.logIndex = message.logIndex); - message.rootHash !== undefined && - (obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : Buffer.alloc(0))); - message.treeSize !== undefined && (obj.treeSize = message.treeSize); - if (message.hashes) { - obj.hashes = message.hashes.map((e) => base64FromBytes(e !== undefined ? e : Buffer.alloc(0))); - } - else { - obj.hashes = []; - } - message.checkpoint !== undefined && - (obj.checkpoint = message.checkpoint ? exports.Checkpoint.toJSON(message.checkpoint) : undefined); - return obj; - }, -}; -function createBaseInclusionPromise() { - return { signedEntryTimestamp: Buffer.alloc(0) }; -} -exports.InclusionPromise = { - fromJSON(object) { - return { - signedEntryTimestamp: isSet(object.signedEntryTimestamp) - ? Buffer.from(bytesFromBase64(object.signedEntryTimestamp)) - : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.signedEntryTimestamp !== undefined && - (obj.signedEntryTimestamp = base64FromBytes(message.signedEntryTimestamp !== undefined ? message.signedEntryTimestamp : Buffer.alloc(0))); - return obj; - }, -}; -function createBaseTransparencyLogEntry() { - return { - logIndex: "0", - logId: undefined, - kindVersion: undefined, - integratedTime: "0", - inclusionPromise: undefined, - inclusionProof: undefined, - canonicalizedBody: Buffer.alloc(0), - }; -} -exports.TransparencyLogEntry = { - fromJSON(object) { - return { - logIndex: isSet(object.logIndex) ? String(object.logIndex) : "0", - logId: isSet(object.logId) ? sigstore_common_1.LogId.fromJSON(object.logId) : undefined, - kindVersion: isSet(object.kindVersion) ? exports.KindVersion.fromJSON(object.kindVersion) : undefined, - integratedTime: isSet(object.integratedTime) ? String(object.integratedTime) : "0", - inclusionPromise: isSet(object.inclusionPromise) ? exports.InclusionPromise.fromJSON(object.inclusionPromise) : undefined, - inclusionProof: isSet(object.inclusionProof) ? exports.InclusionProof.fromJSON(object.inclusionProof) : undefined, - canonicalizedBody: isSet(object.canonicalizedBody) - ? Buffer.from(bytesFromBase64(object.canonicalizedBody)) - : Buffer.alloc(0), - }; - }, - toJSON(message) { - const obj = {}; - message.logIndex !== undefined && (obj.logIndex = message.logIndex); - message.logId !== undefined && (obj.logId = message.logId ? sigstore_common_1.LogId.toJSON(message.logId) : undefined); - message.kindVersion !== undefined && - (obj.kindVersion = message.kindVersion ? exports.KindVersion.toJSON(message.kindVersion) : undefined); - message.integratedTime !== undefined && (obj.integratedTime = message.integratedTime); - message.inclusionPromise !== undefined && - (obj.inclusionPromise = message.inclusionPromise ? exports.InclusionPromise.toJSON(message.inclusionPromise) : undefined); - message.inclusionProof !== undefined && - (obj.inclusionProof = message.inclusionProof ? exports.InclusionProof.toJSON(message.inclusionProof) : undefined); - message.canonicalizedBody !== undefined && - (obj.canonicalizedBody = base64FromBytes(message.canonicalizedBody !== undefined ? message.canonicalizedBody : Buffer.alloc(0))); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js deleted file mode 100644 index 05e5667..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TrustedRoot = exports.CertificateAuthority = exports.TransparencyLogInstance = void 0; -/* eslint-disable */ -const sigstore_common_1 = require("./sigstore_common"); -function createBaseTransparencyLogInstance() { - return { baseUrl: "", hashAlgorithm: 0, publicKey: undefined, logId: undefined }; -} -exports.TransparencyLogInstance = { - fromJSON(object) { - return { - baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) : "", - hashAlgorithm: isSet(object.hashAlgorithm) ? (0, sigstore_common_1.hashAlgorithmFromJSON)(object.hashAlgorithm) : 0, - publicKey: isSet(object.publicKey) ? sigstore_common_1.PublicKey.fromJSON(object.publicKey) : undefined, - logId: isSet(object.logId) ? sigstore_common_1.LogId.fromJSON(object.logId) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.baseUrl !== undefined && (obj.baseUrl = message.baseUrl); - message.hashAlgorithm !== undefined && (obj.hashAlgorithm = (0, sigstore_common_1.hashAlgorithmToJSON)(message.hashAlgorithm)); - message.publicKey !== undefined && - (obj.publicKey = message.publicKey ? sigstore_common_1.PublicKey.toJSON(message.publicKey) : undefined); - message.logId !== undefined && (obj.logId = message.logId ? sigstore_common_1.LogId.toJSON(message.logId) : undefined); - return obj; - }, -}; -function createBaseCertificateAuthority() { - return { subject: undefined, uri: "", certChain: undefined, validFor: undefined }; -} -exports.CertificateAuthority = { - fromJSON(object) { - return { - subject: isSet(object.subject) ? sigstore_common_1.DistinguishedName.fromJSON(object.subject) : undefined, - uri: isSet(object.uri) ? String(object.uri) : "", - certChain: isSet(object.certChain) ? sigstore_common_1.X509CertificateChain.fromJSON(object.certChain) : undefined, - validFor: isSet(object.validFor) ? sigstore_common_1.TimeRange.fromJSON(object.validFor) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.subject !== undefined && - (obj.subject = message.subject ? sigstore_common_1.DistinguishedName.toJSON(message.subject) : undefined); - message.uri !== undefined && (obj.uri = message.uri); - message.certChain !== undefined && - (obj.certChain = message.certChain ? sigstore_common_1.X509CertificateChain.toJSON(message.certChain) : undefined); - message.validFor !== undefined && - (obj.validFor = message.validFor ? sigstore_common_1.TimeRange.toJSON(message.validFor) : undefined); - return obj; - }, -}; -function createBaseTrustedRoot() { - return { mediaType: "", tlogs: [], certificateAuthorities: [], ctlogs: [], timestampAuthorities: [] }; -} -exports.TrustedRoot = { - fromJSON(object) { - return { - mediaType: isSet(object.mediaType) ? String(object.mediaType) : "", - tlogs: Array.isArray(object?.tlogs) ? object.tlogs.map((e) => exports.TransparencyLogInstance.fromJSON(e)) : [], - certificateAuthorities: Array.isArray(object?.certificateAuthorities) - ? object.certificateAuthorities.map((e) => exports.CertificateAuthority.fromJSON(e)) - : [], - ctlogs: Array.isArray(object?.ctlogs) - ? object.ctlogs.map((e) => exports.TransparencyLogInstance.fromJSON(e)) - : [], - timestampAuthorities: Array.isArray(object?.timestampAuthorities) - ? object.timestampAuthorities.map((e) => exports.CertificateAuthority.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - message.mediaType !== undefined && (obj.mediaType = message.mediaType); - if (message.tlogs) { - obj.tlogs = message.tlogs.map((e) => e ? exports.TransparencyLogInstance.toJSON(e) : undefined); - } - else { - obj.tlogs = []; - } - if (message.certificateAuthorities) { - obj.certificateAuthorities = message.certificateAuthorities.map((e) => e ? exports.CertificateAuthority.toJSON(e) : undefined); - } - else { - obj.certificateAuthorities = []; - } - if (message.ctlogs) { - obj.ctlogs = message.ctlogs.map((e) => e ? exports.TransparencyLogInstance.toJSON(e) : undefined); - } - else { - obj.ctlogs = []; - } - if (message.timestampAuthorities) { - obj.timestampAuthorities = message.timestampAuthorities.map((e) => e ? exports.CertificateAuthority.toJSON(e) : undefined); - } - else { - obj.timestampAuthorities = []; - } - return obj; - }, -}; -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js deleted file mode 100644 index 8a72b89..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +++ /dev/null @@ -1,273 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Input = exports.Artifact = exports.ArtifactVerificationOptions_TimestampAuthorityOptions = exports.ArtifactVerificationOptions_CtlogOptions = exports.ArtifactVerificationOptions_TlogOptions = exports.ArtifactVerificationOptions = exports.PublicKeyIdentities = exports.CertificateIdentities = exports.CertificateIdentity = void 0; -/* eslint-disable */ -const sigstore_bundle_1 = require("./sigstore_bundle"); -const sigstore_common_1 = require("./sigstore_common"); -const sigstore_trustroot_1 = require("./sigstore_trustroot"); -function createBaseCertificateIdentity() { - return { issuer: "", san: undefined, oids: [] }; -} -exports.CertificateIdentity = { - fromJSON(object) { - return { - issuer: isSet(object.issuer) ? String(object.issuer) : "", - san: isSet(object.san) ? sigstore_common_1.SubjectAlternativeName.fromJSON(object.san) : undefined, - oids: Array.isArray(object?.oids) ? object.oids.map((e) => sigstore_common_1.ObjectIdentifierValuePair.fromJSON(e)) : [], - }; - }, - toJSON(message) { - const obj = {}; - message.issuer !== undefined && (obj.issuer = message.issuer); - message.san !== undefined && (obj.san = message.san ? sigstore_common_1.SubjectAlternativeName.toJSON(message.san) : undefined); - if (message.oids) { - obj.oids = message.oids.map((e) => e ? sigstore_common_1.ObjectIdentifierValuePair.toJSON(e) : undefined); - } - else { - obj.oids = []; - } - return obj; - }, -}; -function createBaseCertificateIdentities() { - return { identities: [] }; -} -exports.CertificateIdentities = { - fromJSON(object) { - return { - identities: Array.isArray(object?.identities) - ? object.identities.map((e) => exports.CertificateIdentity.fromJSON(e)) - : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.identities) { - obj.identities = message.identities.map((e) => e ? exports.CertificateIdentity.toJSON(e) : undefined); - } - else { - obj.identities = []; - } - return obj; - }, -}; -function createBasePublicKeyIdentities() { - return { publicKeys: [] }; -} -exports.PublicKeyIdentities = { - fromJSON(object) { - return { - publicKeys: Array.isArray(object?.publicKeys) ? object.publicKeys.map((e) => sigstore_common_1.PublicKey.fromJSON(e)) : [], - }; - }, - toJSON(message) { - const obj = {}; - if (message.publicKeys) { - obj.publicKeys = message.publicKeys.map((e) => e ? sigstore_common_1.PublicKey.toJSON(e) : undefined); - } - else { - obj.publicKeys = []; - } - return obj; - }, -}; -function createBaseArtifactVerificationOptions() { - return { signers: undefined, tlogOptions: undefined, ctlogOptions: undefined, tsaOptions: undefined }; -} -exports.ArtifactVerificationOptions = { - fromJSON(object) { - return { - signers: isSet(object.certificateIdentities) - ? { - $case: "certificateIdentities", - certificateIdentities: exports.CertificateIdentities.fromJSON(object.certificateIdentities), - } - : isSet(object.publicKeys) - ? { $case: "publicKeys", publicKeys: exports.PublicKeyIdentities.fromJSON(object.publicKeys) } - : undefined, - tlogOptions: isSet(object.tlogOptions) - ? exports.ArtifactVerificationOptions_TlogOptions.fromJSON(object.tlogOptions) - : undefined, - ctlogOptions: isSet(object.ctlogOptions) - ? exports.ArtifactVerificationOptions_CtlogOptions.fromJSON(object.ctlogOptions) - : undefined, - tsaOptions: isSet(object.tsaOptions) - ? exports.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(object.tsaOptions) - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.signers?.$case === "certificateIdentities" && - (obj.certificateIdentities = message.signers?.certificateIdentities - ? exports.CertificateIdentities.toJSON(message.signers?.certificateIdentities) - : undefined); - message.signers?.$case === "publicKeys" && (obj.publicKeys = message.signers?.publicKeys - ? exports.PublicKeyIdentities.toJSON(message.signers?.publicKeys) - : undefined); - message.tlogOptions !== undefined && (obj.tlogOptions = message.tlogOptions - ? exports.ArtifactVerificationOptions_TlogOptions.toJSON(message.tlogOptions) - : undefined); - message.ctlogOptions !== undefined && (obj.ctlogOptions = message.ctlogOptions - ? exports.ArtifactVerificationOptions_CtlogOptions.toJSON(message.ctlogOptions) - : undefined); - message.tsaOptions !== undefined && (obj.tsaOptions = message.tsaOptions - ? exports.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(message.tsaOptions) - : undefined); - return obj; - }, -}; -function createBaseArtifactVerificationOptions_TlogOptions() { - return { threshold: 0, performOnlineVerification: false, disable: false }; -} -exports.ArtifactVerificationOptions_TlogOptions = { - fromJSON(object) { - return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - performOnlineVerification: isSet(object.performOnlineVerification) - ? Boolean(object.performOnlineVerification) - : false, - disable: isSet(object.disable) ? Boolean(object.disable) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.performOnlineVerification !== undefined && - (obj.performOnlineVerification = message.performOnlineVerification); - message.disable !== undefined && (obj.disable = message.disable); - return obj; - }, -}; -function createBaseArtifactVerificationOptions_CtlogOptions() { - return { threshold: 0, detachedSct: false, disable: false }; -} -exports.ArtifactVerificationOptions_CtlogOptions = { - fromJSON(object) { - return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - detachedSct: isSet(object.detachedSct) ? Boolean(object.detachedSct) : false, - disable: isSet(object.disable) ? Boolean(object.disable) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.detachedSct !== undefined && (obj.detachedSct = message.detachedSct); - message.disable !== undefined && (obj.disable = message.disable); - return obj; - }, -}; -function createBaseArtifactVerificationOptions_TimestampAuthorityOptions() { - return { threshold: 0, disable: false }; -} -exports.ArtifactVerificationOptions_TimestampAuthorityOptions = { - fromJSON(object) { - return { - threshold: isSet(object.threshold) ? Number(object.threshold) : 0, - disable: isSet(object.disable) ? Boolean(object.disable) : false, - }; - }, - toJSON(message) { - const obj = {}; - message.threshold !== undefined && (obj.threshold = Math.round(message.threshold)); - message.disable !== undefined && (obj.disable = message.disable); - return obj; - }, -}; -function createBaseArtifact() { - return { data: undefined }; -} -exports.Artifact = { - fromJSON(object) { - return { - data: isSet(object.artifactUri) - ? { $case: "artifactUri", artifactUri: String(object.artifactUri) } - : isSet(object.artifact) - ? { $case: "artifact", artifact: Buffer.from(bytesFromBase64(object.artifact)) } - : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.data?.$case === "artifactUri" && (obj.artifactUri = message.data?.artifactUri); - message.data?.$case === "artifact" && - (obj.artifact = message.data?.artifact !== undefined ? base64FromBytes(message.data?.artifact) : undefined); - return obj; - }, -}; -function createBaseInput() { - return { - artifactTrustRoot: undefined, - artifactVerificationOptions: undefined, - bundle: undefined, - artifact: undefined, - }; -} -exports.Input = { - fromJSON(object) { - return { - artifactTrustRoot: isSet(object.artifactTrustRoot) ? sigstore_trustroot_1.TrustedRoot.fromJSON(object.artifactTrustRoot) : undefined, - artifactVerificationOptions: isSet(object.artifactVerificationOptions) - ? exports.ArtifactVerificationOptions.fromJSON(object.artifactVerificationOptions) - : undefined, - bundle: isSet(object.bundle) ? sigstore_bundle_1.Bundle.fromJSON(object.bundle) : undefined, - artifact: isSet(object.artifact) ? exports.Artifact.fromJSON(object.artifact) : undefined, - }; - }, - toJSON(message) { - const obj = {}; - message.artifactTrustRoot !== undefined && - (obj.artifactTrustRoot = message.artifactTrustRoot ? sigstore_trustroot_1.TrustedRoot.toJSON(message.artifactTrustRoot) : undefined); - message.artifactVerificationOptions !== undefined && - (obj.artifactVerificationOptions = message.artifactVerificationOptions - ? exports.ArtifactVerificationOptions.toJSON(message.artifactVerificationOptions) - : undefined); - message.bundle !== undefined && (obj.bundle = message.bundle ? sigstore_bundle_1.Bundle.toJSON(message.bundle) : undefined); - message.artifact !== undefined && (obj.artifact = message.artifact ? exports.Artifact.toJSON(message.artifact) : undefined); - return obj; - }, -}; -var tsProtoGlobalThis = (() => { - if (typeof globalThis !== "undefined") { - return globalThis; - } - if (typeof self !== "undefined") { - return self; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - throw "Unable to locate global object"; -})(); -function bytesFromBase64(b64) { - if (tsProtoGlobalThis.Buffer) { - return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64")); - } - else { - const bin = tsProtoGlobalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} -function base64FromBytes(arr) { - if (tsProtoGlobalThis.Buffer) { - return tsProtoGlobalThis.Buffer.from(arr).toString("base64"); - } - else { - const bin = []; - arr.forEach((byte) => { - bin.push(String.fromCharCode(byte)); - }); - return tsProtoGlobalThis.btoa(bin.join("")); - } -} -function isSet(value) { - return value !== null && value !== undefined; -} diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/index.js b/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/index.js deleted file mode 100644 index eafb768..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/index.js +++ /dev/null @@ -1,37 +0,0 @@ -"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 __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 }); -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -__exportStar(require("./__generated__/envelope"), exports); -__exportStar(require("./__generated__/sigstore_bundle"), exports); -__exportStar(require("./__generated__/sigstore_common"), exports); -__exportStar(require("./__generated__/sigstore_rekor"), exports); -__exportStar(require("./__generated__/sigstore_trustroot"), exports); -__exportStar(require("./__generated__/sigstore_verification"), exports); diff --git a/node_modules/npm/node_modules/@sigstore/protobuf-specs/package.json b/node_modules/npm/node_modules/@sigstore/protobuf-specs/package.json deleted file mode 100644 index 450abb1..0000000 --- a/node_modules/npm/node_modules/@sigstore/protobuf-specs/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@sigstore/protobuf-specs", - "version": "0.2.1", - "description": "code-signing for npm packages", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "build": "tsc" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/sigstore/protobuf-specs.git" - }, - "files": [ - "dist" - ], - "author": "bdehamer@github.com", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/sigstore/protobuf-specs/issues" - }, - "homepage": "https://github.com/sigstore/protobuf-specs#readme", - "devDependencies": { - "@tsconfig/node14": "^1.0.3", - "@types/node": "^18.14.0", - "typescript": "^4.9.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/LICENSE b/node_modules/npm/node_modules/@sigstore/sign/LICENSE deleted file mode 100644 index e9e7c16..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2023 The Sigstore Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/base.js b/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/base.js deleted file mode 100644 index 61d5eba..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/base.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseBundleBuilder = void 0; -// BaseBundleBuilder is a base class for BundleBuilder implementations. It -// provides a the basic wokflow for signing and witnessing an artifact. -// Subclasses must implement the `package` method to assemble a valid bundle -// with the generated signature and verification material. -class BaseBundleBuilder { - constructor(options) { - this.signer = options.signer; - this.witnesses = options.witnesses; - } - // Executes the signing/witnessing process for the given artifact. - async create(artifact) { - const signature = await this.prepare(artifact).then((blob) => this.signer.sign(blob)); - const bundle = await this.package(artifact, signature); - // Invoke all of the witnesses in parallel - const verificationMaterials = await Promise.all(this.witnesses.map((witness) => witness.testify(bundle.content, publicKey(signature.key)))); - // Collect the verification material from all of the witnesses - const tlogEntryList = []; - const timestampList = []; - verificationMaterials.forEach(({ tlogEntries, rfc3161Timestamps }) => { - tlogEntryList.push(...(tlogEntries ?? [])); - timestampList.push(...(rfc3161Timestamps ?? [])); - }); - // Merge the collected verification material into the bundle - bundle.verificationMaterial.tlogEntries = tlogEntryList; - bundle.verificationMaterial.timestampVerificationData = { - rfc3161Timestamps: timestampList, - }; - return bundle; - } - // Override this function to apply any pre-signing transformations to the - // artifact. The returned buffer will be signed by the signer. The default - // implementation simply returns the artifact data. - async prepare(artifact) { - return artifact.data; - } -} -exports.BaseBundleBuilder = BaseBundleBuilder; -// Extracts the public key from a KeyMaterial. Returns either the public key -// or the certificate, depending on the type of key material. -function publicKey(key) { - switch (key.$case) { - case 'publicKey': - return key.publicKey; - case 'x509Certificate': - return key.certificate; - } -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js b/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js deleted file mode 100644 index f01aac2..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/bundle.js +++ /dev/null @@ -1,70 +0,0 @@ -"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.toDSSEBundle = exports.toMessageSignatureBundle = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const sigstore = __importStar(require("@sigstore/bundle")); -const util_1 = require("../util"); -// Helper functions for assembling the parts of a Sigstore bundle -// Message signature bundle - $case: 'messageSignature' -function toMessageSignatureBundle(artifact, signature) { - const digest = util_1.crypto.hash(artifact.data); - return sigstore.toMessageSignatureBundle({ - digest, - signature: signature.signature, - certificate: signature.key.$case === 'x509Certificate' - ? util_1.pem.toDER(signature.key.certificate) - : undefined, - keyHint: signature.key.$case === 'publicKey' ? signature.key.hint : undefined, - }); -} -exports.toMessageSignatureBundle = toMessageSignatureBundle; -// DSSE envelope bundle - $case: 'dsseEnvelope' -function toDSSEBundle(artifact, signature) { - return sigstore.toDSSEBundle({ - artifact: artifact.data, - artifactType: artifact.type, - signature: signature.signature, - certificate: signature.key.$case === 'x509Certificate' - ? util_1.pem.toDER(signature.key.certificate) - : undefined, - keyHint: signature.key.$case === 'publicKey' ? signature.key.hint : undefined, - }); -} -exports.toDSSEBundle = toDSSEBundle; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/dsse.js b/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/dsse.js deleted file mode 100644 index 486d289..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/dsse.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DSSEBundleBuilder = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const util_1 = require("../util"); -const base_1 = require("./base"); -const bundle_1 = require("./bundle"); -// BundleBuilder implementation for DSSE wrapped attestations -class DSSEBundleBuilder extends base_1.BaseBundleBuilder { - constructor(options) { - super(options); - } - // DSSE requires the artifact to be pre-encoded with the payload type - // before the signature is generated. - async prepare(artifact) { - const a = artifactDefaults(artifact); - return util_1.dsse.preAuthEncoding(a.type, a.data); - } - // Packages the artifact and signature into a DSSE bundle - async package(artifact, signature) { - return (0, bundle_1.toDSSEBundle)(artifactDefaults(artifact), signature); - } -} -exports.DSSEBundleBuilder = DSSEBundleBuilder; -// Defaults the artifact type to an empty string if not provided -function artifactDefaults(artifact) { - return { - ...artifact, - type: artifact.type ?? '', - }; -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/index.js deleted file mode 100644 index d67c8c3..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageSignatureBundleBuilder = exports.DSSEBundleBuilder = void 0; -var dsse_1 = require("./dsse"); -Object.defineProperty(exports, "DSSEBundleBuilder", { enumerable: true, get: function () { return dsse_1.DSSEBundleBuilder; } }); -var message_1 = require("./message"); -Object.defineProperty(exports, "MessageSignatureBundleBuilder", { enumerable: true, get: function () { return message_1.MessageSignatureBundleBuilder; } }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/message.js b/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/message.js deleted file mode 100644 index e3991f4..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/bundler/message.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MessageSignatureBundleBuilder = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const base_1 = require("./base"); -const bundle_1 = require("./bundle"); -// BundleBuilder implementation for raw message signatures -class MessageSignatureBundleBuilder extends base_1.BaseBundleBuilder { - constructor(options) { - super(options); - } - async package(artifact, signature) { - return (0, bundle_1.toMessageSignatureBundle)(artifact, signature); - } -} -exports.MessageSignatureBundleBuilder = MessageSignatureBundleBuilder; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/error.js b/node_modules/npm/node_modules/@sigstore/sign/dist/error.js deleted file mode 100644 index d57e456..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/error.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.internalError = exports.InternalError = void 0; -const error_1 = require("./external/error"); -class InternalError extends Error { - constructor({ code, message, cause, }) { - super(message); - this.name = this.constructor.name; - this.cause = cause; - this.code = code; - } -} -exports.InternalError = InternalError; -function internalError(err, code, message) { - if (err instanceof error_1.HTTPError) { - message += ` - ${err.message}`; - } - throw new InternalError({ - code: code, - message: message, - cause: err, - }); -} -exports.internalError = internalError; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/external/error.js b/node_modules/npm/node_modules/@sigstore/sign/dist/external/error.js deleted file mode 100644 index 0dad92e..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/external/error.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkStatus = exports.HTTPError = void 0; -class HTTPError extends Error { - constructor({ status, message, location, }) { - super(`(${status}) ${message}`); - this.statusCode = status; - this.location = location; - } -} -exports.HTTPError = HTTPError; -const checkStatus = async (response) => { - if (response.ok) { - return response; - } - else { - let message = response.statusText; - const location = response.headers?.get('Location') || undefined; - const contentType = response.headers?.get('Content-Type'); - // If response type is JSON, try to parse the body for a message - if (contentType?.includes('application/json')) { - try { - await response.json().then((body) => { - message = body.message; - }); - } - catch (e) { - // ignore - } - } - throw new HTTPError({ - status: response.status, - message: message, - location: location, - }); - } -}; -exports.checkStatus = checkStatus; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/external/fulcio.js b/node_modules/npm/node_modules/@sigstore/sign/dist/external/fulcio.js deleted file mode 100644 index f00b62e..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/external/fulcio.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Fulcio = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const make_fetch_happen_1 = __importDefault(require("make-fetch-happen")); -const util_1 = require("../util"); -const error_1 = require("./error"); -/** - * Fulcio API client. - */ -class Fulcio { - constructor(options) { - this.fetch = make_fetch_happen_1.default.defaults({ - retry: options.retry, - timeout: options.timeout, - headers: { - 'Content-Type': 'application/json', - 'User-Agent': util_1.ua.getUserAgent(), - }, - }); - this.baseUrl = options.baseURL; - } - async createSigningCertificate(request) { - const url = `${this.baseUrl}/api/v2/signingCert`; - const response = await this.fetch(url, { - method: 'POST', - body: JSON.stringify(request), - }); - await (0, error_1.checkStatus)(response); - const data = await response.json(); - return data; - } -} -exports.Fulcio = Fulcio; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/external/rekor.js b/node_modules/npm/node_modules/@sigstore/sign/dist/external/rekor.js deleted file mode 100644 index 6f6cb96..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/external/rekor.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Rekor = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const make_fetch_happen_1 = __importDefault(require("make-fetch-happen")); -const util_1 = require("../util"); -const error_1 = require("./error"); -/** - * Rekor API client. - */ -class Rekor { - constructor(options) { - this.fetch = make_fetch_happen_1.default.defaults({ - retry: options.retry, - timeout: options.timeout, - headers: { - Accept: 'application/json', - 'User-Agent': util_1.ua.getUserAgent(), - }, - }); - this.baseUrl = options.baseURL; - } - /** - * Create a new entry in the Rekor log. - * @param propsedEntry {ProposedEntry} Data to create a new entry - * @returns {Promise} The created entry - */ - async createEntry(propsedEntry) { - const url = `${this.baseUrl}/api/v1/log/entries`; - const response = await this.fetch(url, { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(propsedEntry), - }); - await (0, error_1.checkStatus)(response); - const data = await response.json(); - return entryFromResponse(data); - } - /** - * Get an entry from the Rekor log. - * @param uuid {string} The UUID of the entry to retrieve - * @returns {Promise} The retrieved entry - */ - async getEntry(uuid) { - const url = `${this.baseUrl}/api/v1/log/entries/${uuid}`; - const response = await this.fetch(url); - await (0, error_1.checkStatus)(response); - const data = await response.json(); - return entryFromResponse(data); - } - /** - * Search the Rekor log index for entries matching the given query. - * @param opts {SearchIndex} Options to search the Rekor log - * @returns {Promise} UUIDs of matching entries - */ - async searchIndex(opts) { - const url = `${this.baseUrl}/api/v1/index/retrieve`; - const response = await this.fetch(url, { - method: 'POST', - body: JSON.stringify(opts), - headers: { 'Content-Type': 'application/json' }, - }); - await (0, error_1.checkStatus)(response); - const data = await response.json(); - return data; - } - /** - * Search the Rekor logs for matching the given query. - * @param opts {SearchLogQuery} Query to search the Rekor log - * @returns {Promise} List of matching entries - */ - async searchLog(opts) { - const url = `${this.baseUrl}/api/v1/log/entries/retrieve`; - const response = await this.fetch(url, { - method: 'POST', - body: JSON.stringify(opts), - headers: { 'Content-Type': 'application/json' }, - }); - await (0, error_1.checkStatus)(response); - const rawData = await response.json(); - const data = rawData.map((d) => entryFromResponse(d)); - return data; - } -} -exports.Rekor = Rekor; -// Unpack the response from the Rekor API into a more convenient format. -function entryFromResponse(data) { - const entries = Object.entries(data); - if (entries.length != 1) { - throw new Error('Received multiple entries in Rekor response'); - } - // Grab UUID and entry data from the response - const [uuid, entry] = entries[0]; - return { - ...entry, - uuid, - }; -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/external/tsa.js b/node_modules/npm/node_modules/@sigstore/sign/dist/external/tsa.js deleted file mode 100644 index 252c14f..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/external/tsa.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimestampAuthority = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const make_fetch_happen_1 = __importDefault(require("make-fetch-happen")); -const util_1 = require("../util"); -const error_1 = require("./error"); -class TimestampAuthority { - constructor(options) { - this.fetch = make_fetch_happen_1.default.defaults({ - retry: options.retry, - timeout: options.timeout, - headers: { - 'Content-Type': 'application/json', - 'User-Agent': util_1.ua.getUserAgent(), - }, - }); - this.baseUrl = options.baseURL; - } - async createTimestamp(request) { - const url = `${this.baseUrl}/api/v1/timestamp`; - const response = await this.fetch(url, { - method: 'POST', - body: JSON.stringify(request), - }); - await (0, error_1.checkStatus)(response); - return response.buffer(); - } -} -exports.TimestampAuthority = TimestampAuthority; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/ci.js b/node_modules/npm/node_modules/@sigstore/sign/dist/identity/ci.js deleted file mode 100644 index d791339..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/ci.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CIContextProvider = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const make_fetch_happen_1 = __importDefault(require("make-fetch-happen")); -// Collection of all the CI-specific providers we have implemented -const providers = [getGHAToken, getEnv]; -/** - * CIContextProvider is a composite identity provider which will iterate - * over all of the CI-specific providers and return the token from the first - * one that resolves. - */ -class CIContextProvider { - /* istanbul ignore next */ - constructor(audience = 'sigstore') { - this.audience = audience; - } - // Invoke all registered ProviderFuncs and return the value of whichever one - // resolves first. - async getToken() { - return Promise.any(providers.map((getToken) => getToken(this.audience))).catch(() => Promise.reject('CI: no tokens available')); - } -} -exports.CIContextProvider = CIContextProvider; -/** - * getGHAToken can retrieve an OIDC token when running in a GitHub Actions - * workflow - */ -async function getGHAToken(audience) { - // Check to see if we're running in GitHub Actions - if (!process.env.ACTIONS_ID_TOKEN_REQUEST_URL || - !process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN) { - return Promise.reject('no token available'); - } - // Construct URL to request token w/ appropriate audience - const url = new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL); - url.searchParams.append('audience', audience); - const response = await (0, make_fetch_happen_1.default)(url.href, { - retry: 2, - headers: { - Accept: 'application/json', - Authorization: `Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`, - }, - }); - return response.json().then((data) => data.value); -} -/** - * getEnv can retrieve an OIDC token from an environment variable. - * This matches the behavior of https://github.com/sigstore/cosign/tree/main/pkg/providers/envvar - */ -async function getEnv() { - if (!process.env.SIGSTORE_ID_TOKEN) { - return Promise.reject('no token available'); - } - return process.env.SIGSTORE_ID_TOKEN; -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/identity/index.js deleted file mode 100644 index 1c1223b..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CIContextProvider = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var ci_1 = require("./ci"); -Object.defineProperty(exports, "CIContextProvider", { enumerable: true, get: function () { return ci_1.CIContextProvider; } }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/provider.js b/node_modules/npm/node_modules/@sigstore/sign/dist/identity/provider.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/identity/provider.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/index.js deleted file mode 100644 index 383b760..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TSAWitness = exports.RekorWitness = exports.DEFAULT_REKOR_URL = exports.FulcioSigner = exports.DEFAULT_FULCIO_URL = exports.CIContextProvider = exports.InternalError = exports.MessageSignatureBundleBuilder = exports.DSSEBundleBuilder = void 0; -var bundler_1 = require("./bundler"); -Object.defineProperty(exports, "DSSEBundleBuilder", { enumerable: true, get: function () { return bundler_1.DSSEBundleBuilder; } }); -Object.defineProperty(exports, "MessageSignatureBundleBuilder", { enumerable: true, get: function () { return bundler_1.MessageSignatureBundleBuilder; } }); -var error_1 = require("./error"); -Object.defineProperty(exports, "InternalError", { enumerable: true, get: function () { return error_1.InternalError; } }); -var identity_1 = require("./identity"); -Object.defineProperty(exports, "CIContextProvider", { enumerable: true, get: function () { return identity_1.CIContextProvider; } }); -var signer_1 = require("./signer"); -Object.defineProperty(exports, "DEFAULT_FULCIO_URL", { enumerable: true, get: function () { return signer_1.DEFAULT_FULCIO_URL; } }); -Object.defineProperty(exports, "FulcioSigner", { enumerable: true, get: function () { return signer_1.FulcioSigner; } }); -var witness_1 = require("./witness"); -Object.defineProperty(exports, "DEFAULT_REKOR_URL", { enumerable: true, get: function () { return witness_1.DEFAULT_REKOR_URL; } }); -Object.defineProperty(exports, "RekorWitness", { enumerable: true, get: function () { return witness_1.RekorWitness; } }); -Object.defineProperty(exports, "TSAWitness", { enumerable: true, get: function () { return witness_1.TSAWitness; } }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js b/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js deleted file mode 100644 index 81b421e..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CAClient = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const error_1 = require("../../error"); -const fulcio_1 = require("../../external/fulcio"); -class CAClient { - constructor(options) { - this.fulcio = new fulcio_1.Fulcio({ - baseURL: options.fulcioBaseURL, - retry: options.retry, - timeout: options.timeout, - }); - } - async createSigningCertificate(identityToken, publicKey, challenge) { - const request = toCertificateRequest(identityToken, publicKey, challenge); - try { - const resp = await this.fulcio.createSigningCertificate(request); - // Account for the fact that the response may contain either a - // signedCertificateEmbeddedSct or a signedCertificateDetachedSct. - const cert = resp.signedCertificateEmbeddedSct - ? resp.signedCertificateEmbeddedSct - : resp.signedCertificateDetachedSct; - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return cert.chain.certificates; - } - catch (err) { - (0, error_1.internalError)(err, 'CA_CREATE_SIGNING_CERTIFICATE_ERROR', 'error creating signing certificate'); - } - } -} -exports.CAClient = CAClient; -function toCertificateRequest(identityToken, publicKey, challenge) { - return { - credentials: { - oidcIdentityToken: identityToken, - }, - publicKeyRequest: { - publicKey: { - algorithm: 'ECDSA', - content: publicKey, - }, - proofOfPossession: challenge.toString('base64'), - }, - }; -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js b/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js deleted file mode 100644 index 481aa5c..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EphemeralSigner = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const crypto_1 = __importDefault(require("crypto")); -const EC_KEYPAIR_TYPE = 'ec'; -const P256_CURVE = 'P-256'; -// Signer implementation which uses an ephemeral keypair to sign artifacts. -// The private key lives only in memory and is tied to the lifetime of the -// EphemeralSigner instance. -class EphemeralSigner { - constructor() { - this.keypair = crypto_1.default.generateKeyPairSync(EC_KEYPAIR_TYPE, { - namedCurve: P256_CURVE, - }); - } - async sign(data) { - const signature = crypto_1.default.sign(null, data, this.keypair.privateKey); - const publicKey = this.keypair.publicKey - .export({ format: 'pem', type: 'spki' }) - .toString('ascii'); - return { - signature: signature, - key: { $case: 'publicKey', publicKey }, - }; - } -} -exports.EphemeralSigner = EphemeralSigner; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/index.js deleted file mode 100644 index 89a4325..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/fulcio/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FulcioSigner = exports.DEFAULT_FULCIO_URL = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const error_1 = require("../../error"); -const util_1 = require("../../util"); -const ca_1 = require("./ca"); -const ephemeral_1 = require("./ephemeral"); -exports.DEFAULT_FULCIO_URL = 'https://fulcio.sigstore.dev'; -// Signer implementation which can be used to decorate another signer -// with a Fulcio-issued signing certificate for the signer's public key. -// Must be instantiated with an identity provider which can provide a JWT -// which represents the identity to be bound to the signing certificate. -class FulcioSigner { - constructor(options) { - this.ca = new ca_1.CAClient({ - ...options, - fulcioBaseURL: options.fulcioBaseURL || /* istanbul ignore next */ exports.DEFAULT_FULCIO_URL, - }); - this.identityProvider = options.identityProvider; - this.keyHolder = options.keyHolder || new ephemeral_1.EphemeralSigner(); - } - async sign(data) { - // Retrieve identity token from the supplied identity provider - const identityToken = await this.getIdentityToken(); - // Extract challenge claim from OIDC token - let subject; - try { - subject = util_1.oidc.extractJWTSubject(identityToken); - } - catch (err) { - throw new error_1.InternalError({ - code: 'IDENTITY_TOKEN_PARSE_ERROR', - message: `invalid identity token: ${identityToken}`, - cause: err, - }); - } - // Construct challenge value by signing the subject claim - const challenge = await this.keyHolder.sign(Buffer.from(subject)); - if (challenge.key.$case !== 'publicKey') { - throw new error_1.InternalError({ - code: 'CA_CREATE_SIGNING_CERTIFICATE_ERROR', - message: 'unexpected format for signing key', - }); - } - // Create signing certificate - const certificates = await this.ca.createSigningCertificate(identityToken, challenge.key.publicKey, challenge.signature); - // Generate artifact signature - const signature = await this.keyHolder.sign(data); - // Specifically returning only the first certificate in the chain - // as the key. - return { - signature: signature.signature, - key: { - $case: 'x509Certificate', - certificate: certificates[0], - }, - }; - } - async getIdentityToken() { - try { - return await this.identityProvider.getToken(); - } - catch (err) { - throw new error_1.InternalError({ - code: 'IDENTITY_TOKEN_READ_ERROR', - message: 'error retrieving identity token', - cause: err, - }); - } - } -} -exports.FulcioSigner = FulcioSigner; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/signer/index.js deleted file mode 100644 index 06ec9db..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FulcioSigner = exports.DEFAULT_FULCIO_URL = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var fulcio_1 = require("./fulcio"); -Object.defineProperty(exports, "DEFAULT_FULCIO_URL", { enumerable: true, get: function () { return fulcio_1.DEFAULT_FULCIO_URL; } }); -Object.defineProperty(exports, "FulcioSigner", { enumerable: true, get: function () { return fulcio_1.FulcioSigner; } }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/signer.js b/node_modules/npm/node_modules/@sigstore/sign/dist/signer/signer.js deleted file mode 100644 index b92c541..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/signer/signer.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/types/fetch.js b/node_modules/npm/node_modules/@sigstore/sign/dist/types/fetch.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/types/fetch.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/crypto.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/crypto.js deleted file mode 100644 index 11aad2f..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/crypto.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hash = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const crypto_1 = __importDefault(require("crypto")); -const SHA256_ALGORITHM = 'sha256'; -function hash(data, algorithm = SHA256_ALGORITHM) { - return crypto_1.default.createHash(algorithm).update(data).digest(); -} -exports.hash = hash; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/dsse.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/dsse.js deleted file mode 100644 index befcdbd..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/dsse.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.preAuthEncoding = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const PAE_PREFIX = 'DSSEv1'; -// DSSE Pre-Authentication Encoding -function preAuthEncoding(payloadType, payload) { - const prefix = Buffer.from(`${PAE_PREFIX} ${payloadType.length} ${payloadType} ${payload.length} `, 'ascii'); - return Buffer.concat([prefix, payload]); -} -exports.preAuthEncoding = preAuthEncoding; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/encoding.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/encoding.js deleted file mode 100644 index b020ac4..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/encoding.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.base64Decode = exports.base64Encode = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const BASE64_ENCODING = 'base64'; -const UTF8_ENCODING = 'utf-8'; -function base64Encode(str) { - return Buffer.from(str, UTF8_ENCODING).toString(BASE64_ENCODING); -} -exports.base64Encode = base64Encode; -function base64Decode(str) { - return Buffer.from(str, BASE64_ENCODING).toString(UTF8_ENCODING); -} -exports.base64Decode = base64Decode; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/index.js deleted file mode 100644 index 567e5db..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"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.ua = exports.pem = exports.oidc = exports.json = exports.encoding = exports.dsse = exports.crypto = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -exports.crypto = __importStar(require("./crypto")); -exports.dsse = __importStar(require("./dsse")); -exports.encoding = __importStar(require("./encoding")); -exports.json = __importStar(require("./json")); -exports.oidc = __importStar(require("./oidc")); -exports.pem = __importStar(require("./pem")); -exports.ua = __importStar(require("./ua")); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/json.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/json.js deleted file mode 100644 index 69176ad..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/json.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.canonicalize = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// JSON canonicalization per https://github.com/cyberphone/json-canonicalization -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function canonicalize(object) { - let buffer = ''; - if (object === null || typeof object !== 'object' || object.toJSON != null) { - // Primitives or toJSONable objects - buffer += JSON.stringify(object); - } - else if (Array.isArray(object)) { - // Array - maintain element order - buffer += '['; - let first = true; - object.forEach((element) => { - if (!first) { - buffer += ','; - } - first = false; - // recursive call - buffer += canonicalize(element); - }); - buffer += ']'; - } - else { - // Object - Sort properties before serializing - buffer += '{'; - let first = true; - Object.keys(object) - .sort() - .forEach((property) => { - if (!first) { - buffer += ','; - } - first = false; - buffer += JSON.stringify(property); - buffer += ':'; - // recursive call - buffer += canonicalize(object[property]); - }); - buffer += '}'; - } - return buffer; -} -exports.canonicalize = canonicalize; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/oidc.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/oidc.js deleted file mode 100644 index 8b49f3b..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/oidc.js +++ /dev/null @@ -1,54 +0,0 @@ -"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.extractJWTSubject = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const enc = __importStar(require("./encoding")); -function extractJWTSubject(jwt) { - const parts = jwt.split('.', 3); - const payload = JSON.parse(enc.base64Decode(parts[1])); - switch (payload.iss) { - case 'https://accounts.google.com': - case 'https://oauth2.sigstore.dev/auth': - return payload.email; - default: - return payload.sub; - } -} -exports.extractJWTSubject = extractJWTSubject; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/pem.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/pem.js deleted file mode 100644 index 36eeebd..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/pem.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toDER = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const PEM_HEADER = /-----BEGIN (.*)-----/; -const PEM_FOOTER = /-----END (.*)-----/; -function toDER(certificate) { - const lines = certificate - .split('\n') - .map((line) => line.match(PEM_HEADER) || line.match(PEM_FOOTER) ? '' : line); - return Buffer.from(lines.join(''), 'base64'); -} -exports.toDER = toDER; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/util/ua.js b/node_modules/npm/node_modules/@sigstore/sign/dist/util/ua.js deleted file mode 100644 index c142330..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/util/ua.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getUserAgent = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const os_1 = __importDefault(require("os")); -// Format User-Agent: / () -// source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent -const getUserAgent = () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const packageVersion = require('../../package.json').version; - const nodeVersion = process.version; - const platformName = os_1.default.platform(); - const archName = os_1.default.arch(); - return `sigstore-js/${packageVersion} (Node ${nodeVersion}) (${platformName}/${archName})`; -}; -exports.getUserAgent = getUserAgent; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/index.js deleted file mode 100644 index e200d06..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TSAWitness = exports.RekorWitness = exports.DEFAULT_REKOR_URL = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -var tlog_1 = require("./tlog"); -Object.defineProperty(exports, "DEFAULT_REKOR_URL", { enumerable: true, get: function () { return tlog_1.DEFAULT_REKOR_URL; } }); -Object.defineProperty(exports, "RekorWitness", { enumerable: true, get: function () { return tlog_1.RekorWitness; } }); -var tsa_1 = require("./tsa"); -Object.defineProperty(exports, "TSAWitness", { enumerable: true, get: function () { return tsa_1.TSAWitness; } }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/client.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/client.js deleted file mode 100644 index 22c895f..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/client.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TLogClient = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const error_1 = require("../../error"); -const error_2 = require("../../external/error"); -const rekor_1 = require("../../external/rekor"); -class TLogClient { - constructor(options) { - this.fetchOnConflict = options.fetchOnConflict ?? false; - this.rekor = new rekor_1.Rekor({ - baseURL: options.rekorBaseURL, - retry: options.retry, - timeout: options.timeout, - }); - } - async createEntry(proposedEntry) { - let entry; - try { - entry = await this.rekor.createEntry(proposedEntry); - } - catch (err) { - // If the entry already exists, fetch it (if enabled) - if (entryExistsError(err) && this.fetchOnConflict) { - // Grab the UUID of the existing entry from the location header - /* istanbul ignore next */ - const uuid = err.location.split('/').pop() || ''; - try { - entry = await this.rekor.getEntry(uuid); - } - catch (err) { - (0, error_1.internalError)(err, 'TLOG_FETCH_ENTRY_ERROR', 'error fetching tlog entry'); - } - } - else { - (0, error_1.internalError)(err, 'TLOG_CREATE_ENTRY_ERROR', 'error creating tlog entry'); - } - } - return entry; - } -} -exports.TLogClient = TLogClient; -function entryExistsError(value) { - return (value instanceof error_2.HTTPError && - value.statusCode === 409 && - value.location !== undefined); -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/entry.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/entry.js deleted file mode 100644 index c237523..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/entry.js +++ /dev/null @@ -1,136 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toProposedEntry = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const bundle_1 = require("@sigstore/bundle"); -const util_1 = require("../../util"); -function toProposedEntry(content, publicKey, -// TODO: Remove this parameter once have completely switched to 'dsse' entries -entryType = 'intoto') { - switch (content.$case) { - case 'dsseEnvelope': - // TODO: Remove this conditional once have completely switched to 'dsse' entries - if (entryType === 'dsse') { - return toProposedDSSEEntry(content.dsseEnvelope, publicKey); - } - return toProposedIntotoEntry(content.dsseEnvelope, publicKey); - case 'messageSignature': - return toProposedHashedRekordEntry(content.messageSignature, publicKey); - } -} -exports.toProposedEntry = toProposedEntry; -// Returns a properly formatted Rekor "hashedrekord" entry for the given digest -// and signature -function toProposedHashedRekordEntry(messageSignature, publicKey) { - const hexDigest = messageSignature.messageDigest.digest.toString('hex'); - const b64Signature = messageSignature.signature.toString('base64'); - const b64Key = util_1.encoding.base64Encode(publicKey); - return { - apiVersion: '0.0.1', - kind: 'hashedrekord', - spec: { - data: { - hash: { - algorithm: 'sha256', - value: hexDigest, - }, - }, - signature: { - content: b64Signature, - publicKey: { - content: b64Key, - }, - }, - }, - }; -} -// Returns a properly formatted Rekor "dsse" entry for the given DSSE envelope -// and signature -function toProposedDSSEEntry(envelope, publicKey) { - const envelopeJSON = JSON.stringify((0, bundle_1.envelopeToJSON)(envelope)); - const encodedKey = util_1.encoding.base64Encode(publicKey); - return { - apiVersion: '0.0.1', - kind: 'dsse', - spec: { - proposedContent: { - envelope: envelopeJSON, - verifiers: [encodedKey], - }, - }, - }; -} -// Returns a properly formatted Rekor "intoto" entry for the given DSSE -// envelope and signature -function toProposedIntotoEntry(envelope, publicKey) { - // Calculate the value for the payloadHash field in the Rekor entry - const payloadHash = util_1.crypto.hash(envelope.payload).toString('hex'); - // Calculate the value for the hash field in the Rekor entry - const envelopeHash = calculateDSSEHash(envelope, publicKey); - // Collect values for re-creating the DSSE envelope. - // Double-encode payload and signature cause that's what Rekor expects - const payload = util_1.encoding.base64Encode(envelope.payload.toString('base64')); - const sig = util_1.encoding.base64Encode(envelope.signatures[0].sig.toString('base64')); - const keyid = envelope.signatures[0].keyid; - const encodedKey = util_1.encoding.base64Encode(publicKey); - // Create the envelope portion of the entry. Note the inclusion of the - // publicKey in the signature struct is not a standard part of a DSSE - // envelope, but is required by Rekor. - const dsse = { - payloadType: envelope.payloadType, - payload: payload, - signatures: [{ sig, publicKey: encodedKey }], - }; - // If the keyid is an empty string, Rekor seems to remove it altogether. We - // need to do the same here so that we can properly recreate the entry for - // verification. - if (keyid.length > 0) { - dsse.signatures[0].keyid = keyid; - } - return { - apiVersion: '0.0.2', - kind: 'intoto', - spec: { - content: { - envelope: dsse, - hash: { algorithm: 'sha256', value: envelopeHash }, - payloadHash: { algorithm: 'sha256', value: payloadHash }, - }, - }, - }; -} -// Calculates the hash of a DSSE envelope for inclusion in a Rekor entry. -// There is no standard way to do this, so the scheme we're using as as -// follows: -// * payload is base64 encoded -// * signature is base64 encoded (only the first signature is used) -// * keyid is included ONLY if it is NOT an empty string -// * The resulting JSON is canonicalized and hashed to a hex string -function calculateDSSEHash(envelope, publicKey) { - const dsse = { - payloadType: envelope.payloadType, - payload: envelope.payload.toString('base64'), - signatures: [ - { sig: envelope.signatures[0].sig.toString('base64'), publicKey }, - ], - }; - // If the keyid is an empty string, Rekor seems to remove it altogether. - if (envelope.signatures[0].keyid.length > 0) { - dsse.signatures[0].keyid = envelope.signatures[0].keyid; - } - return util_1.crypto.hash(util_1.json.canonicalize(dsse)).toString('hex'); -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js deleted file mode 100644 index 6197b09..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RekorWitness = exports.DEFAULT_REKOR_URL = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const util_1 = require("../../util"); -const client_1 = require("./client"); -const entry_1 = require("./entry"); -exports.DEFAULT_REKOR_URL = 'https://rekor.sigstore.dev'; -class RekorWitness { - constructor(options) { - this.entryType = options.entryType; - this.tlog = new client_1.TLogClient({ - ...options, - rekorBaseURL: options.rekorBaseURL || /* istanbul ignore next */ exports.DEFAULT_REKOR_URL, - }); - } - async testify(content, publicKey) { - const proposedEntry = (0, entry_1.toProposedEntry)(content, publicKey, this.entryType); - const entry = await this.tlog.createEntry(proposedEntry); - return toTransparencyLogEntry(entry); - } -} -exports.RekorWitness = RekorWitness; -function toTransparencyLogEntry(entry) { - const logID = Buffer.from(entry.logID, 'hex'); - // Parse entry body so we can extract the kind and version. - const bodyJSON = util_1.encoding.base64Decode(entry.body); - const entryBody = JSON.parse(bodyJSON); - const promise = entry?.verification?.signedEntryTimestamp - ? inclusionPromise(entry.verification.signedEntryTimestamp) - : undefined; - const proof = entry?.verification?.inclusionProof - ? inclusionProof(entry.verification.inclusionProof) - : undefined; - const tlogEntry = { - logIndex: entry.logIndex.toString(), - logId: { - keyId: logID, - }, - integratedTime: entry.integratedTime.toString(), - kindVersion: { - kind: entryBody.kind, - version: entryBody.apiVersion, - }, - inclusionPromise: promise, - inclusionProof: proof, - canonicalizedBody: Buffer.from(entry.body, 'base64'), - }; - return { - tlogEntries: [tlogEntry], - }; -} -function inclusionPromise(promise) { - return { - signedEntryTimestamp: Buffer.from(promise, 'base64'), - }; -} -function inclusionProof(proof) { - return { - logIndex: proof.logIndex.toString(), - treeSize: proof.treeSize.toString(), - rootHash: Buffer.from(proof.rootHash, 'hex'), - hashes: proof.hashes.map((h) => Buffer.from(h, 'hex')), - checkpoint: { - envelope: proof.checkpoint, - }, - }; -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/client.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/client.js deleted file mode 100644 index a334deb..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/client.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TSAClient = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const error_1 = require("../../error"); -const tsa_1 = require("../../external/tsa"); -const util_1 = require("../../util"); -class TSAClient { - constructor(options) { - this.tsa = new tsa_1.TimestampAuthority({ - baseURL: options.tsaBaseURL, - retry: options.retry, - timeout: options.timeout, - }); - } - async createTimestamp(signature) { - const request = { - artifactHash: util_1.crypto.hash(signature).toString('base64'), - hashAlgorithm: 'sha256', - }; - try { - return await this.tsa.createTimestamp(request); - } - catch (err) { - (0, error_1.internalError)(err, 'TSA_CREATE_TIMESTAMP_ERROR', 'error creating timestamp'); - } - } -} -exports.TSAClient = TSAClient; diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/index.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/index.js deleted file mode 100644 index d4f5c7c..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/tsa/index.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TSAWitness = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const client_1 = require("./client"); -class TSAWitness { - constructor(options) { - this.tsa = new client_1.TSAClient({ - tsaBaseURL: options.tsaBaseURL, - retry: options.retry, - timeout: options.timeout, - }); - } - async testify(content) { - const signature = extractSignature(content); - const timestamp = await this.tsa.createTimestamp(signature); - return { - rfc3161Timestamps: [{ signedTimestamp: timestamp }], - }; - } -} -exports.TSAWitness = TSAWitness; -function extractSignature(content) { - switch (content.$case) { - case 'dsseEnvelope': - return content.dsseEnvelope.signatures[0].sig; - case 'messageSignature': - return content.messageSignature.signature; - } -} diff --git a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/witness.js b/node_modules/npm/node_modules/@sigstore/sign/dist/witness/witness.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/dist/witness/witness.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@sigstore/sign/package.json b/node_modules/npm/node_modules/@sigstore/sign/package.json deleted file mode 100644 index 7075ee1..0000000 --- a/node_modules/npm/node_modules/@sigstore/sign/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@sigstore/sign", - "version": "2.2.0", - "description": "Sigstore signing library", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "clean": "shx rm -rf dist *.tsbuildinfo", - "build": "tsc --build", - "test": "jest" - }, - "files": [ - "dist" - ], - "author": "bdehamer@github.com", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "git+https://github.com/sigstore/sigstore-js.git" - }, - "bugs": { - "url": "https://github.com/sigstore/sigstore-js/issues" - }, - "homepage": "https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme", - "publishConfig": { - "provenance": true - }, - "devDependencies": { - "@sigstore/jest": "^0.0.0", - "@sigstore/mock": "^0.6.0", - "@sigstore/rekor-types": "^2.0.0", - "@types/make-fetch-happen": "^10.0.3" - }, - "dependencies": { - "@sigstore/bundle": "^2.1.0", - "@sigstore/protobuf-specs": "^0.2.1", - "make-fetch-happen": "^13.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/@sigstore/tuf/LICENSE b/node_modules/npm/node_modules/@sigstore/tuf/LICENSE deleted file mode 100644 index e9e7c16..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2023 The Sigstore Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/npm/node_modules/@sigstore/tuf/dist/appdata.js b/node_modules/npm/node_modules/@sigstore/tuf/dist/appdata.js deleted file mode 100644 index c9a8ee9..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/dist/appdata.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.appDataPath = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const os_1 = __importDefault(require("os")); -const path_1 = __importDefault(require("path")); -function appDataPath(name) { - const homedir = os_1.default.homedir(); - switch (process.platform) { - /* istanbul ignore next */ - case 'darwin': { - const appSupport = path_1.default.join(homedir, 'Library', 'Application Support'); - return path_1.default.join(appSupport, name); - } - /* istanbul ignore next */ - case 'win32': { - const localAppData = process.env.LOCALAPPDATA || path_1.default.join(homedir, 'AppData', 'Local'); - return path_1.default.join(localAppData, name, 'Data'); - } - /* istanbul ignore next */ - default: { - const localData = process.env.XDG_DATA_HOME || path_1.default.join(homedir, '.local', 'share'); - return path_1.default.join(localData, name); - } - } -} -exports.appDataPath = appDataPath; diff --git a/node_modules/npm/node_modules/@sigstore/tuf/dist/client.js b/node_modules/npm/node_modules/@sigstore/tuf/dist/client.js deleted file mode 100644 index 865d52b..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/dist/client.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TUFClient = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const fs_1 = __importDefault(require("fs")); -const path_1 = __importDefault(require("path")); -const tuf_js_1 = require("tuf-js"); -const target_1 = require("./target"); -class TUFClient { - constructor(options) { - initTufCache(options); - const remote = initRemoteConfig(options); - this.updater = initClient(options.cachePath, remote, options); - } - async refresh() { - return this.updater.refresh(); - } - getTarget(targetName) { - return (0, target_1.readTarget)(this.updater, targetName); - } -} -exports.TUFClient = TUFClient; -// Initializes the TUF cache directory structure including the initial -// root.json file. If the cache directory does not exist, it will be -// created. If the targets directory does not exist, it will be created. -// If the root.json file does not exist, it will be copied from the -// rootPath argument. -function initTufCache({ cachePath, rootPath: tufRootPath, force, }) { - const targetsPath = path_1.default.join(cachePath, 'targets'); - const cachedRootPath = path_1.default.join(cachePath, 'root.json'); - if (!fs_1.default.existsSync(cachePath)) { - fs_1.default.mkdirSync(cachePath, { recursive: true }); - } - if (!fs_1.default.existsSync(targetsPath)) { - fs_1.default.mkdirSync(targetsPath); - } - // If the root.json file does not exist (or we're forcing re-initialization), - // copy it from the rootPath argument - if (!fs_1.default.existsSync(cachedRootPath) || force) { - fs_1.default.copyFileSync(tufRootPath, cachedRootPath); - } - return cachePath; -} -// Initializes the remote.json file, which contains the URL of the TUF -// repository. If the file does not exist, it will be created. If the file -// exists, it will be parsed and returned. -function initRemoteConfig({ cachePath, mirrorURL, force, }) { - let remoteConfig; - const remoteConfigPath = path_1.default.join(cachePath, 'remote.json'); - // If the remote config file exists, read it and parse it (skip if force is - // true) - if (!force && fs_1.default.existsSync(remoteConfigPath)) { - const data = fs_1.default.readFileSync(remoteConfigPath, 'utf-8'); - remoteConfig = JSON.parse(data); - } - // If the remote config file does not exist (or we're forcing initialization), - // create it - if (!remoteConfig || force) { - remoteConfig = { mirror: mirrorURL }; - fs_1.default.writeFileSync(remoteConfigPath, JSON.stringify(remoteConfig)); - } - return remoteConfig; -} -function initClient(cachePath, remote, options) { - const baseURL = remote.mirror; - const config = { - fetchTimeout: options.timeout, - fetchRetry: options.retry, - }; - return new tuf_js_1.Updater({ - metadataBaseUrl: baseURL, - targetBaseUrl: `${baseURL}/targets`, - metadataDir: cachePath, - targetDir: path_1.default.join(cachePath, 'targets'), - config, - }); -} diff --git a/node_modules/npm/node_modules/@sigstore/tuf/dist/error.js b/node_modules/npm/node_modules/@sigstore/tuf/dist/error.js deleted file mode 100644 index e13971b..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/dist/error.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TUFError = void 0; -class TUFError extends Error { - constructor({ code, message, cause, }) { - super(message); - this.code = code; - this.cause = cause; - this.name = this.constructor.name; - } -} -exports.TUFError = TUFError; diff --git a/node_modules/npm/node_modules/@sigstore/tuf/dist/index.js b/node_modules/npm/node_modules/@sigstore/tuf/dist/index.js deleted file mode 100644 index 297c723..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/dist/index.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TUFError = exports.initTUF = exports.getTrustedRoot = exports.DEFAULT_MIRROR_URL = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const protobuf_specs_1 = require("@sigstore/protobuf-specs"); -const appdata_1 = require("./appdata"); -const client_1 = require("./client"); -exports.DEFAULT_MIRROR_URL = 'https://tuf-repo-cdn.sigstore.dev'; -const DEFAULT_CACHE_DIR = 'sigstore-js'; -const DEFAULT_TUF_ROOT_PATH = '../store/public-good-instance-root.json'; -const DEFAULT_RETRY = { retries: 2 }; -const DEFAULT_TIMEOUT = 5000; -const TRUSTED_ROOT_TARGET = 'trusted_root.json'; -async function getTrustedRoot( -/* istanbul ignore next */ -options = {}) { - const client = createClient(options); - const trustedRoot = await client.getTarget(TRUSTED_ROOT_TARGET); - return protobuf_specs_1.TrustedRoot.fromJSON(JSON.parse(trustedRoot)); -} -exports.getTrustedRoot = getTrustedRoot; -async function initTUF( -/* istanbul ignore next */ -options = {}) { - const client = createClient(options); - return client.refresh().then(() => client); -} -exports.initTUF = initTUF; -// Create a TUF client with default options -function createClient(options) { - /* istanbul ignore next */ - return new client_1.TUFClient({ - cachePath: options.cachePath || (0, appdata_1.appDataPath)(DEFAULT_CACHE_DIR), - rootPath: options.rootPath || require.resolve(DEFAULT_TUF_ROOT_PATH), - mirrorURL: options.mirrorURL || exports.DEFAULT_MIRROR_URL, - retry: options.retry ?? DEFAULT_RETRY, - timeout: options.timeout ?? DEFAULT_TIMEOUT, - force: options.force ?? false, - }); -} -var error_1 = require("./error"); -Object.defineProperty(exports, "TUFError", { enumerable: true, get: function () { return error_1.TUFError; } }); diff --git a/node_modules/npm/node_modules/@sigstore/tuf/dist/target.js b/node_modules/npm/node_modules/@sigstore/tuf/dist/target.js deleted file mode 100644 index 29eaf99..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/dist/target.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readTarget = void 0; -/* -Copyright 2023 The Sigstore Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -const fs_1 = __importDefault(require("fs")); -const error_1 = require("./error"); -// Downloads and returns the specified target from the provided TUF Updater. -async function readTarget(tuf, targetPath) { - const path = await getTargetPath(tuf, targetPath); - return new Promise((resolve, reject) => { - fs_1.default.readFile(path, 'utf-8', (err, data) => { - if (err) { - reject(new error_1.TUFError({ - code: 'TUF_READ_TARGET_ERROR', - message: `error reading target ${path}`, - cause: err, - })); - } - else { - resolve(data); - } - }); - }); -} -exports.readTarget = readTarget; -// Returns the local path to the specified target. If the target is not yet -// cached locally, the provided TUF Updater will be used to download and -// cache the target. -async function getTargetPath(tuf, target) { - let targetInfo; - try { - targetInfo = await tuf.getTargetInfo(target); - } - catch (err) { - throw new error_1.TUFError({ - code: 'TUF_REFRESH_METADATA_ERROR', - message: 'error refreshing TUF metadata', - cause: err, - }); - } - if (!targetInfo) { - throw new error_1.TUFError({ - code: 'TUF_FIND_TARGET_ERROR', - message: `target ${target} not found`, - }); - } - let path = await tuf.findCachedTarget(targetInfo); - // An empty path here means the target has not been cached locally, or is - // out of date. In either case, we need to download it. - if (!path) { - try { - path = await tuf.downloadTarget(targetInfo); - } - catch (err) { - throw new error_1.TUFError({ - code: 'TUF_DOWNLOAD_TARGET_ERROR', - message: `error downloading target ${path}`, - cause: err, - }); - } - } - return path; -} diff --git a/node_modules/npm/node_modules/@sigstore/tuf/package.json b/node_modules/npm/node_modules/@sigstore/tuf/package.json deleted file mode 100644 index 38d5a03..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@sigstore/tuf", - "version": "2.2.0", - "description": "Client for the Sigstore TUF repository", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "scripts": { - "clean": "shx rm -rf dist *.tsbuildinfo", - "build": "tsc --build", - "test": "jest" - }, - "files": [ - "dist", - "store" - ], - "author": "bdehamer@github.com", - "license": "Apache-2.0", - "repository": { - "type": "git", - "url": "git+https://github.com/sigstore/sigstore-js.git" - }, - "bugs": { - "url": "https://github.com/sigstore/sigstore-js/issues" - }, - "homepage": "https://github.com/sigstore/sigstore-js/tree/main/packages/tuf#readme", - "publishConfig": { - "provenance": true - }, - "devDependencies": { - "@sigstore/jest": "^0.0.0", - "@tufjs/repo-mock": "^2.0.0", - "@types/make-fetch-happen": "^10.0.0" - }, - "dependencies": { - "@sigstore/protobuf-specs": "^0.2.1", - "tuf-js": "^2.1.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/@sigstore/tuf/store/public-good-instance-root.json b/node_modules/npm/node_modules/@sigstore/tuf/store/public-good-instance-root.json deleted file mode 100644 index e95c7e8..0000000 --- a/node_modules/npm/node_modules/@sigstore/tuf/store/public-good-instance-root.json +++ /dev/null @@ -1 +0,0 @@ -{"signed":{"_type":"root","spec_version":"1.0","version":7,"expires":"2023-10-04T13:08:11Z","keys":{"25a0eb450fd3ee2bd79218c963dce3f1cc6118badf251bf149f0bd07d5cabe99":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEXsz3SZXFb8jMV42j6pJlyjbjR8K\nN3Bwocexq6LMIb5qsWKOQvLN16NUefLc4HswOoumRsVVaajSpQS6fobkRw==\n-----END PUBLIC KEY-----\n"}},"2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0ghrh92Lw1Yr3idGV5WqCtMDB8Cx\n+D8hdC4w2ZLNIplVRoVGLskYa3gheMyOjiJ8kPi15aQ2//7P+oj7UvJPGw==\n-----END PUBLIC KEY-----\n"}},"45b283825eb184cabd582eb17b74fc8ed404f68cf452acabdad2ed6f90ce216b":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAELrWvNt94v4R085ELeeCMxHp7PldF\n0/T1GxukUh2ODuggLGJE0pc1e8CSBf6CS91Fwo9FUOuRsjBUld+VqSyCdQ==\n-----END PUBLIC KEY-----\n"}},"7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEinikSsAQmYkNeH5eYq/CnIzLaacO\nxlSaawQDOwqKy/tCqxq5xxPSJc21K4WIhs9GyOkKfzueY3GILzcMJZ4cWw==\n-----END PUBLIC KEY-----\n"}},"e1863ba02070322ebc626dcecf9d881a3a38c35c3b41a83765b6ad6c37eaec2a":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEWRiGr5+j+3J5SsH+Ztr5nE2H2wO7\nBV+nO3s93gLca18qTOzHY1oWyAGDykMSsGTUBSt9D+An0KfKsD2mfSM42Q==\n-----END PUBLIC KEY-----\n"}},"f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzBzVOmHCPojMVLSI364WiiV8NPrD\n6IgRxVliskz/v+y3JER5mcVGcONliDcWMC5J2lfHmjPNPhb4H7xm8LzfSA==\n-----END PUBLIC KEY-----\n"}},"ff51e17fcf253119b7033f6f57512631da4a0969442afcf9fc8b141c7f2be99c":{"keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","keyid_hash_algorithms":["sha256","sha512"],"keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEy8XKsmhBYDI8Jc0GwzBxeKax0cm5\nSTKEU65HPFunUn41sT8pi0FjM4IkHz/YUmwmLUO0Wt7lxhj6BkLIK4qYAw==\n-----END PUBLIC KEY-----\n"}}},"roles":{"root":{"keyids":["ff51e17fcf253119b7033f6f57512631da4a0969442afcf9fc8b141c7f2be99c","25a0eb450fd3ee2bd79218c963dce3f1cc6118badf251bf149f0bd07d5cabe99","f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f","7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b","2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de"],"threshold":3},"snapshot":{"keyids":["45b283825eb184cabd582eb17b74fc8ed404f68cf452acabdad2ed6f90ce216b"],"threshold":1},"targets":{"keyids":["ff51e17fcf253119b7033f6f57512631da4a0969442afcf9fc8b141c7f2be99c","25a0eb450fd3ee2bd79218c963dce3f1cc6118badf251bf149f0bd07d5cabe99","f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f","7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b","2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de"],"threshold":3},"timestamp":{"keyids":["e1863ba02070322ebc626dcecf9d881a3a38c35c3b41a83765b6ad6c37eaec2a"],"threshold":1}},"consistent_snapshot":true},"signatures":[{"keyid":"25a0eb450fd3ee2bd79218c963dce3f1cc6118badf251bf149f0bd07d5cabe99","sig":"3046022100c0610c0055ce5c4a52d054d7322e7b514d55baf44423d63aa4daa077cc60fd1f022100a097f2803f090fb66c42ead915a2c46ebe7db53a32bf18f2188275cc936f8bdd"},{"keyid":"f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f","sig":"304502203134f0468810299d5493a867c40630b341296b92e59c29821311d353343bb3a4022100e667ae3d304e7e3da0894c7425f6b9ecd917106841280e5cf6f3496ad5f8f68e"},{"keyid":"7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b","sig":"3045022037fe5f45426f21eaaf4730d2136f2b1611d6379688f79b9d1e3f61719997135c022100b63b022d7b79d4694b96f416d88aa4d7b1a3bff8a01f4fb51e0f42137c7d2d06"},{"keyid":"2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de","sig":"3044022007cc8fcc4940809f2751ad5b535f4c5f53f5b4952f5b5696b09668e743306ac1022006dfcdf94e94c92163eeb1b47796db62cedaa730aa13aa61b573fe23714730f2"}]} diff --git a/node_modules/npm/node_modules/@tufjs/canonical-json/LICENSE b/node_modules/npm/node_modules/@tufjs/canonical-json/LICENSE deleted file mode 100644 index 420700f..0000000 --- a/node_modules/npm/node_modules/@tufjs/canonical-json/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 GitHub and the TUF Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/@tufjs/canonical-json/lib/index.js b/node_modules/npm/node_modules/@tufjs/canonical-json/lib/index.js deleted file mode 100644 index d480696..0000000 --- a/node_modules/npm/node_modules/@tufjs/canonical-json/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -const COMMA = ','; -const COLON = ':'; -const LEFT_SQUARE_BRACKET = '['; -const RIGHT_SQUARE_BRACKET = ']'; -const LEFT_CURLY_BRACKET = '{'; -const RIGHT_CURLY_BRACKET = '}'; - -// Recursively encodes the supplied object according to the canonical JSON form -// as specified at http://wiki.laptop.org/go/Canonical_JSON. It's a restricted -// dialect of JSON in which keys are lexically sorted, floats are not allowed, -// and only double quotes and backslashes are escaped. -function canonicalize(object) { - const buffer = []; - if (typeof object === 'string') { - buffer.push(canonicalizeString(object)); - } else if (typeof object === 'boolean') { - buffer.push(JSON.stringify(object)); - } else if (Number.isInteger(object)) { - buffer.push(JSON.stringify(object)); - } else if (object === null) { - buffer.push(JSON.stringify(object)); - } else if (Array.isArray(object)) { - buffer.push(LEFT_SQUARE_BRACKET); - let first = true; - object.forEach((element) => { - if (!first) { - buffer.push(COMMA); - } - first = false; - buffer.push(canonicalize(element)); - }); - buffer.push(RIGHT_SQUARE_BRACKET); - } else if (typeof object === 'object') { - buffer.push(LEFT_CURLY_BRACKET); - let first = true; - Object.keys(object) - .sort() - .forEach((property) => { - if (!first) { - buffer.push(COMMA); - } - first = false; - buffer.push(canonicalizeString(property)); - buffer.push(COLON); - buffer.push(canonicalize(object[property])); - }); - buffer.push(RIGHT_CURLY_BRACKET); - } else { - throw new TypeError('cannot encode ' + object.toString()); - } - - return buffer.join(''); -} - -// String canonicalization consists of escaping backslash (\) and double -// quote (") characters and wrapping the resulting string in double quotes. -function canonicalizeString(string) { - const escapedString = string.replace(/\\/g, '\\\\').replace(/"/g, '\\"'); - return '"' + escapedString + '"'; -} - -module.exports = { - canonicalize, -}; diff --git a/node_modules/npm/node_modules/@tufjs/canonical-json/package.json b/node_modules/npm/node_modules/@tufjs/canonical-json/package.json deleted file mode 100644 index 886c0c3..0000000 --- a/node_modules/npm/node_modules/@tufjs/canonical-json/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@tufjs/canonical-json", - "version": "2.0.0", - "description": "OLPC JSON canonicalization", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "license": "MIT", - "keywords": [ - "json", - "canonical", - "canonicalize", - "canonicalization", - "crypto", - "signature", - "olpc" - ], - "author": "bdehamer@github.com", - "repository": { - "type": "git", - "url": "git+https://github.com/theupdateframework/tuf-js.git" - }, - "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/canonical-json#readme", - "bugs": { - "url": "https://github.com/theupdateframework/tuf-js/issues" - }, - "files": [ - "lib/" - ], - "scripts": { - "test": "jest" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/@tufjs/models/LICENSE b/node_modules/npm/node_modules/@tufjs/models/LICENSE deleted file mode 100644 index 420700f..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 GitHub and the TUF Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/base.js b/node_modules/npm/node_modules/@tufjs/models/dist/base.js deleted file mode 100644 index 259f679..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/base.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Signed = exports.isMetadataKind = exports.MetadataKind = void 0; -const util_1 = __importDefault(require("util")); -const error_1 = require("./error"); -const utils_1 = require("./utils"); -const SPECIFICATION_VERSION = ['1', '0', '31']; -var MetadataKind; -(function (MetadataKind) { - MetadataKind["Root"] = "root"; - MetadataKind["Timestamp"] = "timestamp"; - MetadataKind["Snapshot"] = "snapshot"; - MetadataKind["Targets"] = "targets"; -})(MetadataKind || (exports.MetadataKind = MetadataKind = {})); -function isMetadataKind(value) { - return (typeof value === 'string' && - Object.values(MetadataKind).includes(value)); -} -exports.isMetadataKind = isMetadataKind; -/*** - * A base class for the signed part of TUF metadata. - * - * Objects with base class Signed are usually included in a ``Metadata`` object - * on the signed attribute. This class provides attributes and methods that - * are common for all TUF metadata types (roles). - */ -class Signed { - constructor(options) { - this.specVersion = options.specVersion || SPECIFICATION_VERSION.join('.'); - const specList = this.specVersion.split('.'); - if (!(specList.length === 2 || specList.length === 3) || - !specList.every((item) => isNumeric(item))) { - throw new error_1.ValueError('Failed to parse specVersion'); - } - // major version must match - if (specList[0] != SPECIFICATION_VERSION[0]) { - throw new error_1.ValueError('Unsupported specVersion'); - } - this.expires = options.expires || new Date().toISOString(); - this.version = options.version || 1; - this.unrecognizedFields = options.unrecognizedFields || {}; - } - equals(other) { - if (!(other instanceof Signed)) { - return false; - } - return (this.specVersion === other.specVersion && - this.expires === other.expires && - this.version === other.version && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - isExpired(referenceTime) { - if (!referenceTime) { - referenceTime = new Date(); - } - return referenceTime >= new Date(this.expires); - } - static commonFieldsFromJSON(data) { - const { spec_version, expires, version, ...rest } = data; - if (utils_1.guard.isDefined(spec_version) && !(typeof spec_version === 'string')) { - throw new TypeError('spec_version must be a string'); - } - if (utils_1.guard.isDefined(expires) && !(typeof expires === 'string')) { - throw new TypeError('expires must be a string'); - } - if (utils_1.guard.isDefined(version) && !(typeof version === 'number')) { - throw new TypeError('version must be a number'); - } - return { - specVersion: spec_version, - expires, - version, - unrecognizedFields: rest, - }; - } -} -exports.Signed = Signed; -function isNumeric(str) { - return !isNaN(Number(str)); -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/delegations.js b/node_modules/npm/node_modules/@tufjs/models/dist/delegations.js deleted file mode 100644 index 7165f1e..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/delegations.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Delegations = void 0; -const util_1 = __importDefault(require("util")); -const error_1 = require("./error"); -const key_1 = require("./key"); -const role_1 = require("./role"); -const utils_1 = require("./utils"); -/** - * A container object storing information about all delegations. - * - * Targets roles that are trusted to provide signed metadata files - * describing targets with designated pathnames and/or further delegations. - */ -class Delegations { - constructor(options) { - this.keys = options.keys; - this.unrecognizedFields = options.unrecognizedFields || {}; - if (options.roles) { - if (Object.keys(options.roles).some((roleName) => role_1.TOP_LEVEL_ROLE_NAMES.includes(roleName))) { - throw new error_1.ValueError('Delegated role name conflicts with top-level role name'); - } - } - this.succinctRoles = options.succinctRoles; - this.roles = options.roles; - } - equals(other) { - if (!(other instanceof Delegations)) { - return false; - } - return (util_1.default.isDeepStrictEqual(this.keys, other.keys) && - util_1.default.isDeepStrictEqual(this.roles, other.roles) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields) && - util_1.default.isDeepStrictEqual(this.succinctRoles, other.succinctRoles)); - } - *rolesForTarget(targetPath) { - if (this.roles) { - for (const role of Object.values(this.roles)) { - if (role.isDelegatedPath(targetPath)) { - yield { role: role.name, terminating: role.terminating }; - } - } - } - else if (this.succinctRoles) { - yield { - role: this.succinctRoles.getRoleForTarget(targetPath), - terminating: true, - }; - } - } - toJSON() { - const json = { - keys: keysToJSON(this.keys), - ...this.unrecognizedFields, - }; - if (this.roles) { - json.roles = rolesToJSON(this.roles); - } - else if (this.succinctRoles) { - json.succinct_roles = this.succinctRoles.toJSON(); - } - return json; - } - static fromJSON(data) { - const { keys, roles, succinct_roles, ...unrecognizedFields } = data; - let succinctRoles; - if (utils_1.guard.isObject(succinct_roles)) { - succinctRoles = role_1.SuccinctRoles.fromJSON(succinct_roles); - } - return new Delegations({ - keys: keysFromJSON(keys), - roles: rolesFromJSON(roles), - unrecognizedFields, - succinctRoles, - }); - } -} -exports.Delegations = Delegations; -function keysToJSON(keys) { - return Object.entries(keys).reduce((acc, [keyId, key]) => ({ - ...acc, - [keyId]: key.toJSON(), - }), {}); -} -function rolesToJSON(roles) { - return Object.values(roles).map((role) => role.toJSON()); -} -function keysFromJSON(data) { - if (!utils_1.guard.isObjectRecord(data)) { - throw new TypeError('keys is malformed'); - } - return Object.entries(data).reduce((acc, [keyID, keyData]) => ({ - ...acc, - [keyID]: key_1.Key.fromJSON(keyID, keyData), - }), {}); -} -function rolesFromJSON(data) { - let roleMap; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObjectArray(data)) { - throw new TypeError('roles is malformed'); - } - roleMap = data.reduce((acc, role) => { - const delegatedRole = role_1.DelegatedRole.fromJSON(role); - return { - ...acc, - [delegatedRole.name]: delegatedRole, - }; - }, {}); - } - return roleMap; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/error.js b/node_modules/npm/node_modules/@tufjs/models/dist/error.js deleted file mode 100644 index ba80698..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/error.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnsupportedAlgorithmError = exports.CryptoError = exports.LengthOrHashMismatchError = exports.UnsignedMetadataError = exports.RepositoryError = exports.ValueError = void 0; -// An error about insufficient values -class ValueError extends Error { -} -exports.ValueError = ValueError; -// An error with a repository's state, such as a missing file. -// It covers all exceptions that come from the repository side when -// looking from the perspective of users of metadata API or ngclient. -class RepositoryError extends Error { -} -exports.RepositoryError = RepositoryError; -// An error about metadata object with insufficient threshold of signatures. -class UnsignedMetadataError extends RepositoryError { -} -exports.UnsignedMetadataError = UnsignedMetadataError; -// An error while checking the length and hash values of an object. -class LengthOrHashMismatchError extends RepositoryError { -} -exports.LengthOrHashMismatchError = LengthOrHashMismatchError; -class CryptoError extends Error { -} -exports.CryptoError = CryptoError; -class UnsupportedAlgorithmError extends CryptoError { -} -exports.UnsupportedAlgorithmError = UnsupportedAlgorithmError; diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/file.js b/node_modules/npm/node_modules/@tufjs/models/dist/file.js deleted file mode 100644 index b35fe59..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/file.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TargetFile = exports.MetaFile = void 0; -const crypto_1 = __importDefault(require("crypto")); -const util_1 = __importDefault(require("util")); -const error_1 = require("./error"); -const utils_1 = require("./utils"); -// A container with information about a particular metadata file. -// -// This class is used for Timestamp and Snapshot metadata. -class MetaFile { - constructor(opts) { - if (opts.version <= 0) { - throw new error_1.ValueError('Metafile version must be at least 1'); - } - if (opts.length !== undefined) { - validateLength(opts.length); - } - this.version = opts.version; - this.length = opts.length; - this.hashes = opts.hashes; - this.unrecognizedFields = opts.unrecognizedFields || {}; - } - equals(other) { - if (!(other instanceof MetaFile)) { - return false; - } - return (this.version === other.version && - this.length === other.length && - util_1.default.isDeepStrictEqual(this.hashes, other.hashes) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - verify(data) { - // Verifies that the given data matches the expected length. - if (this.length !== undefined) { - if (data.length !== this.length) { - throw new error_1.LengthOrHashMismatchError(`Expected length ${this.length} but got ${data.length}`); - } - } - // Verifies that the given data matches the supplied hashes. - if (this.hashes) { - Object.entries(this.hashes).forEach(([key, value]) => { - let hash; - try { - hash = crypto_1.default.createHash(key); - } - catch (e) { - throw new error_1.LengthOrHashMismatchError(`Hash algorithm ${key} not supported`); - } - const observedHash = hash.update(data).digest('hex'); - if (observedHash !== value) { - throw new error_1.LengthOrHashMismatchError(`Expected hash ${value} but got ${observedHash}`); - } - }); - } - } - toJSON() { - const json = { - version: this.version, - ...this.unrecognizedFields, - }; - if (this.length !== undefined) { - json.length = this.length; - } - if (this.hashes) { - json.hashes = this.hashes; - } - return json; - } - static fromJSON(data) { - const { version, length, hashes, ...rest } = data; - if (typeof version !== 'number') { - throw new TypeError('version must be a number'); - } - if (utils_1.guard.isDefined(length) && typeof length !== 'number') { - throw new TypeError('length must be a number'); - } - if (utils_1.guard.isDefined(hashes) && !utils_1.guard.isStringRecord(hashes)) { - throw new TypeError('hashes must be string keys and values'); - } - return new MetaFile({ - version, - length, - hashes, - unrecognizedFields: rest, - }); - } -} -exports.MetaFile = MetaFile; -// Container for info about a particular target file. -// -// This class is used for Target metadata. -class TargetFile { - constructor(opts) { - validateLength(opts.length); - this.length = opts.length; - this.path = opts.path; - this.hashes = opts.hashes; - this.unrecognizedFields = opts.unrecognizedFields || {}; - } - get custom() { - const custom = this.unrecognizedFields['custom']; - if (!custom || Array.isArray(custom) || !(typeof custom === 'object')) { - return {}; - } - return custom; - } - equals(other) { - if (!(other instanceof TargetFile)) { - return false; - } - return (this.length === other.length && - this.path === other.path && - util_1.default.isDeepStrictEqual(this.hashes, other.hashes) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - async verify(stream) { - let observedLength = 0; - // Create a digest for each hash algorithm - const digests = Object.keys(this.hashes).reduce((acc, key) => { - try { - acc[key] = crypto_1.default.createHash(key); - } - catch (e) { - throw new error_1.LengthOrHashMismatchError(`Hash algorithm ${key} not supported`); - } - return acc; - }, {}); - // Read stream chunk by chunk - for await (const chunk of stream) { - // Keep running tally of stream length - observedLength += chunk.length; - // Append chunk to each digest - Object.values(digests).forEach((digest) => { - digest.update(chunk); - }); - } - // Verify length matches expected value - if (observedLength !== this.length) { - throw new error_1.LengthOrHashMismatchError(`Expected length ${this.length} but got ${observedLength}`); - } - // Verify each digest matches expected value - Object.entries(digests).forEach(([key, value]) => { - const expected = this.hashes[key]; - const actual = value.digest('hex'); - if (actual !== expected) { - throw new error_1.LengthOrHashMismatchError(`Expected hash ${expected} but got ${actual}`); - } - }); - } - toJSON() { - return { - length: this.length, - hashes: this.hashes, - ...this.unrecognizedFields, - }; - } - static fromJSON(path, data) { - const { length, hashes, ...rest } = data; - if (typeof length !== 'number') { - throw new TypeError('length must be a number'); - } - if (!utils_1.guard.isStringRecord(hashes)) { - throw new TypeError('hashes must have string keys and values'); - } - return new TargetFile({ - length, - path, - hashes, - unrecognizedFields: rest, - }); - } -} -exports.TargetFile = TargetFile; -// Check that supplied length if valid -function validateLength(length) { - if (length < 0) { - throw new error_1.ValueError('Length must be at least 0'); - } -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/index.js b/node_modules/npm/node_modules/@tufjs/models/dist/index.js deleted file mode 100644 index a4dc783..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Timestamp = exports.Targets = exports.Snapshot = exports.Signature = exports.Root = exports.Metadata = exports.Key = exports.TargetFile = exports.MetaFile = exports.ValueError = exports.MetadataKind = void 0; -var base_1 = require("./base"); -Object.defineProperty(exports, "MetadataKind", { enumerable: true, get: function () { return base_1.MetadataKind; } }); -var error_1 = require("./error"); -Object.defineProperty(exports, "ValueError", { enumerable: true, get: function () { return error_1.ValueError; } }); -var file_1 = require("./file"); -Object.defineProperty(exports, "MetaFile", { enumerable: true, get: function () { return file_1.MetaFile; } }); -Object.defineProperty(exports, "TargetFile", { enumerable: true, get: function () { return file_1.TargetFile; } }); -var key_1 = require("./key"); -Object.defineProperty(exports, "Key", { enumerable: true, get: function () { return key_1.Key; } }); -var metadata_1 = require("./metadata"); -Object.defineProperty(exports, "Metadata", { enumerable: true, get: function () { return metadata_1.Metadata; } }); -var root_1 = require("./root"); -Object.defineProperty(exports, "Root", { enumerable: true, get: function () { return root_1.Root; } }); -var signature_1 = require("./signature"); -Object.defineProperty(exports, "Signature", { enumerable: true, get: function () { return signature_1.Signature; } }); -var snapshot_1 = require("./snapshot"); -Object.defineProperty(exports, "Snapshot", { enumerable: true, get: function () { return snapshot_1.Snapshot; } }); -var targets_1 = require("./targets"); -Object.defineProperty(exports, "Targets", { enumerable: true, get: function () { return targets_1.Targets; } }); -var timestamp_1 = require("./timestamp"); -Object.defineProperty(exports, "Timestamp", { enumerable: true, get: function () { return timestamp_1.Timestamp; } }); diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/key.js b/node_modules/npm/node_modules/@tufjs/models/dist/key.js deleted file mode 100644 index 5e55b09..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/key.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Key = void 0; -const util_1 = __importDefault(require("util")); -const error_1 = require("./error"); -const utils_1 = require("./utils"); -const key_1 = require("./utils/key"); -// A container class representing the public portion of a Key. -class Key { - constructor(options) { - const { keyID, keyType, scheme, keyVal, unrecognizedFields } = options; - this.keyID = keyID; - this.keyType = keyType; - this.scheme = scheme; - this.keyVal = keyVal; - this.unrecognizedFields = unrecognizedFields || {}; - } - // Verifies the that the metadata.signatures contains a signature made with - // this key and is correctly signed. - verifySignature(metadata) { - const signature = metadata.signatures[this.keyID]; - if (!signature) - throw new error_1.UnsignedMetadataError('no signature for key found in metadata'); - if (!this.keyVal.public) - throw new error_1.UnsignedMetadataError('no public key found'); - const publicKey = (0, key_1.getPublicKey)({ - keyType: this.keyType, - scheme: this.scheme, - keyVal: this.keyVal.public, - }); - const signedData = metadata.signed.toJSON(); - try { - if (!utils_1.crypto.verifySignature(signedData, publicKey, signature.sig)) { - throw new error_1.UnsignedMetadataError(`failed to verify ${this.keyID} signature`); - } - } - catch (error) { - if (error instanceof error_1.UnsignedMetadataError) { - throw error; - } - throw new error_1.UnsignedMetadataError(`failed to verify ${this.keyID} signature`); - } - } - equals(other) { - if (!(other instanceof Key)) { - return false; - } - return (this.keyID === other.keyID && - this.keyType === other.keyType && - this.scheme === other.scheme && - util_1.default.isDeepStrictEqual(this.keyVal, other.keyVal) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - toJSON() { - return { - keytype: this.keyType, - scheme: this.scheme, - keyval: this.keyVal, - ...this.unrecognizedFields, - }; - } - static fromJSON(keyID, data) { - const { keytype, scheme, keyval, ...rest } = data; - if (typeof keytype !== 'string') { - throw new TypeError('keytype must be a string'); - } - if (typeof scheme !== 'string') { - throw new TypeError('scheme must be a string'); - } - if (!utils_1.guard.isStringRecord(keyval)) { - throw new TypeError('keyval must be a string record'); - } - return new Key({ - keyID, - keyType: keytype, - scheme, - keyVal: keyval, - unrecognizedFields: rest, - }); - } -} -exports.Key = Key; diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/metadata.js b/node_modules/npm/node_modules/@tufjs/models/dist/metadata.js deleted file mode 100644 index 9668b6f..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/metadata.js +++ /dev/null @@ -1,158 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Metadata = void 0; -const canonical_json_1 = require("@tufjs/canonical-json"); -const util_1 = __importDefault(require("util")); -const base_1 = require("./base"); -const error_1 = require("./error"); -const root_1 = require("./root"); -const signature_1 = require("./signature"); -const snapshot_1 = require("./snapshot"); -const targets_1 = require("./targets"); -const timestamp_1 = require("./timestamp"); -const utils_1 = require("./utils"); -/*** - * A container for signed TUF metadata. - * - * Provides methods to convert to and from json, read and write to and - * from JSON and to create and verify metadata signatures. - * - * ``Metadata[T]`` is a generic container type where T can be any one type of - * [``Root``, ``Timestamp``, ``Snapshot``, ``Targets``]. The purpose of this - * is to allow static type checking of the signed attribute in code using - * Metadata:: - * - * root_md = Metadata[Root].fromJSON("root.json") - * # root_md type is now Metadata[Root]. This means signed and its - * # attributes like consistent_snapshot are now statically typed and the - * # types can be verified by static type checkers and shown by IDEs - * - * Using a type constraint is not required but not doing so means T is not a - * specific type so static typing cannot happen. Note that the type constraint - * ``[Root]`` is not validated at runtime (as pure annotations are not available - * then). - * - * Apart from ``expires`` all of the arguments to the inner constructors have - * reasonable default values for new metadata. - */ -class Metadata { - constructor(signed, signatures, unrecognizedFields) { - this.signed = signed; - this.signatures = signatures || {}; - this.unrecognizedFields = unrecognizedFields || {}; - } - sign(signer, append = true) { - const bytes = Buffer.from((0, canonical_json_1.canonicalize)(this.signed.toJSON())); - const signature = signer(bytes); - if (!append) { - this.signatures = {}; - } - this.signatures[signature.keyID] = signature; - } - verifyDelegate(delegatedRole, delegatedMetadata) { - let role; - let keys = {}; - switch (this.signed.type) { - case base_1.MetadataKind.Root: - keys = this.signed.keys; - role = this.signed.roles[delegatedRole]; - break; - case base_1.MetadataKind.Targets: - if (!this.signed.delegations) { - throw new error_1.ValueError(`No delegations found for ${delegatedRole}`); - } - keys = this.signed.delegations.keys; - if (this.signed.delegations.roles) { - role = this.signed.delegations.roles[delegatedRole]; - } - else if (this.signed.delegations.succinctRoles) { - if (this.signed.delegations.succinctRoles.isDelegatedRole(delegatedRole)) { - role = this.signed.delegations.succinctRoles; - } - } - break; - default: - throw new TypeError('invalid metadata type'); - } - if (!role) { - throw new error_1.ValueError(`no delegation found for ${delegatedRole}`); - } - const signingKeys = new Set(); - role.keyIDs.forEach((keyID) => { - const key = keys[keyID]; - // If we dont' have the key, continue checking other keys - if (!key) { - return; - } - try { - key.verifySignature(delegatedMetadata); - signingKeys.add(key.keyID); - } - catch (error) { - // continue - } - }); - if (signingKeys.size < role.threshold) { - throw new error_1.UnsignedMetadataError(`${delegatedRole} was signed by ${signingKeys.size}/${role.threshold} keys`); - } - } - equals(other) { - if (!(other instanceof Metadata)) { - return false; - } - return (this.signed.equals(other.signed) && - util_1.default.isDeepStrictEqual(this.signatures, other.signatures) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - toJSON() { - const signatures = Object.values(this.signatures).map((signature) => { - return signature.toJSON(); - }); - return { - signatures, - signed: this.signed.toJSON(), - ...this.unrecognizedFields, - }; - } - static fromJSON(type, data) { - const { signed, signatures, ...rest } = data; - if (!utils_1.guard.isDefined(signed) || !utils_1.guard.isObject(signed)) { - throw new TypeError('signed is not defined'); - } - if (type !== signed._type) { - throw new error_1.ValueError(`expected '${type}', got ${signed['_type']}`); - } - let signedObj; - switch (type) { - case base_1.MetadataKind.Root: - signedObj = root_1.Root.fromJSON(signed); - break; - case base_1.MetadataKind.Timestamp: - signedObj = timestamp_1.Timestamp.fromJSON(signed); - break; - case base_1.MetadataKind.Snapshot: - signedObj = snapshot_1.Snapshot.fromJSON(signed); - break; - case base_1.MetadataKind.Targets: - signedObj = targets_1.Targets.fromJSON(signed); - break; - default: - throw new TypeError('invalid metadata type'); - } - const sigMap = signaturesFromJSON(signatures); - return new Metadata(signedObj, sigMap, rest); - } -} -exports.Metadata = Metadata; -function signaturesFromJSON(data) { - if (!utils_1.guard.isObjectArray(data)) { - throw new TypeError('signatures is not an array'); - } - return data.reduce((acc, sigData) => { - const signature = signature_1.Signature.fromJSON(sigData); - return { ...acc, [signature.keyID]: signature }; - }, {}); -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/role.js b/node_modules/npm/node_modules/@tufjs/models/dist/role.js deleted file mode 100644 index f7ddbc6..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/role.js +++ /dev/null @@ -1,299 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SuccinctRoles = exports.DelegatedRole = exports.Role = exports.TOP_LEVEL_ROLE_NAMES = void 0; -const crypto_1 = __importDefault(require("crypto")); -const minimatch_1 = require("minimatch"); -const util_1 = __importDefault(require("util")); -const error_1 = require("./error"); -const utils_1 = require("./utils"); -exports.TOP_LEVEL_ROLE_NAMES = [ - 'root', - 'targets', - 'snapshot', - 'timestamp', -]; -/** - * Container that defines which keys are required to sign roles metadata. - * - * Role defines how many keys are required to successfully sign the roles - * metadata, and which keys are accepted. - */ -class Role { - constructor(options) { - const { keyIDs, threshold, unrecognizedFields } = options; - if (hasDuplicates(keyIDs)) { - throw new error_1.ValueError('duplicate key IDs found'); - } - if (threshold < 1) { - throw new error_1.ValueError('threshold must be at least 1'); - } - this.keyIDs = keyIDs; - this.threshold = threshold; - this.unrecognizedFields = unrecognizedFields || {}; - } - equals(other) { - if (!(other instanceof Role)) { - return false; - } - return (this.threshold === other.threshold && - util_1.default.isDeepStrictEqual(this.keyIDs, other.keyIDs) && - util_1.default.isDeepStrictEqual(this.unrecognizedFields, other.unrecognizedFields)); - } - toJSON() { - return { - keyids: this.keyIDs, - threshold: this.threshold, - ...this.unrecognizedFields, - }; - } - static fromJSON(data) { - const { keyids, threshold, ...rest } = data; - if (!utils_1.guard.isStringArray(keyids)) { - throw new TypeError('keyids must be an array'); - } - if (typeof threshold !== 'number') { - throw new TypeError('threshold must be a number'); - } - return new Role({ - keyIDs: keyids, - threshold, - unrecognizedFields: rest, - }); - } -} -exports.Role = Role; -function hasDuplicates(array) { - return new Set(array).size !== array.length; -} -/** - * A container with information about a delegated role. - * - * A delegation can happen in two ways: - * - ``paths`` is set: delegates targets matching any path pattern in ``paths`` - * - ``pathHashPrefixes`` is set: delegates targets whose target path hash - * starts with any of the prefixes in ``pathHashPrefixes`` - * - * ``paths`` and ``pathHashPrefixes`` are mutually exclusive: both cannot be - * set, at least one of them must be set. - */ -class DelegatedRole extends Role { - constructor(opts) { - super(opts); - const { name, terminating, paths, pathHashPrefixes } = opts; - this.name = name; - this.terminating = terminating; - if (opts.paths && opts.pathHashPrefixes) { - throw new error_1.ValueError('paths and pathHashPrefixes are mutually exclusive'); - } - this.paths = paths; - this.pathHashPrefixes = pathHashPrefixes; - } - equals(other) { - if (!(other instanceof DelegatedRole)) { - return false; - } - return (super.equals(other) && - this.name === other.name && - this.terminating === other.terminating && - util_1.default.isDeepStrictEqual(this.paths, other.paths) && - util_1.default.isDeepStrictEqual(this.pathHashPrefixes, other.pathHashPrefixes)); - } - isDelegatedPath(targetFilepath) { - if (this.paths) { - return this.paths.some((pathPattern) => isTargetInPathPattern(targetFilepath, pathPattern)); - } - if (this.pathHashPrefixes) { - const hasher = crypto_1.default.createHash('sha256'); - const pathHash = hasher.update(targetFilepath).digest('hex'); - return this.pathHashPrefixes.some((pathHashPrefix) => pathHash.startsWith(pathHashPrefix)); - } - return false; - } - toJSON() { - const json = { - ...super.toJSON(), - name: this.name, - terminating: this.terminating, - }; - if (this.paths) { - json.paths = this.paths; - } - if (this.pathHashPrefixes) { - json.path_hash_prefixes = this.pathHashPrefixes; - } - return json; - } - static fromJSON(data) { - const { keyids, threshold, name, terminating, paths, path_hash_prefixes, ...rest } = data; - if (!utils_1.guard.isStringArray(keyids)) { - throw new TypeError('keyids must be an array of strings'); - } - if (typeof threshold !== 'number') { - throw new TypeError('threshold must be a number'); - } - if (typeof name !== 'string') { - throw new TypeError('name must be a string'); - } - if (typeof terminating !== 'boolean') { - throw new TypeError('terminating must be a boolean'); - } - if (utils_1.guard.isDefined(paths) && !utils_1.guard.isStringArray(paths)) { - throw new TypeError('paths must be an array of strings'); - } - if (utils_1.guard.isDefined(path_hash_prefixes) && - !utils_1.guard.isStringArray(path_hash_prefixes)) { - throw new TypeError('path_hash_prefixes must be an array of strings'); - } - return new DelegatedRole({ - keyIDs: keyids, - threshold, - name, - terminating, - paths, - pathHashPrefixes: path_hash_prefixes, - unrecognizedFields: rest, - }); - } -} -exports.DelegatedRole = DelegatedRole; -// JS version of Ruby's Array#zip -const zip = (a, b) => a.map((k, i) => [k, b[i]]); -function isTargetInPathPattern(target, pattern) { - const targetParts = target.split('/'); - const patternParts = pattern.split('/'); - if (patternParts.length != targetParts.length) { - return false; - } - return zip(targetParts, patternParts).every(([targetPart, patternPart]) => (0, minimatch_1.minimatch)(targetPart, patternPart)); -} -/** - * Succinctly defines a hash bin delegation graph. - * - * A ``SuccinctRoles`` object describes a delegation graph that covers all - * targets, distributing them uniformly over the delegated roles (i.e. bins) - * in the graph. - * - * The total number of bins is 2 to the power of the passed ``bit_length``. - * - * Bin names are the concatenation of the passed ``name_prefix`` and a - * zero-padded hex representation of the bin index separated by a hyphen. - * - * The passed ``keyids`` and ``threshold`` is used for each bin, and each bin - * is 'terminating'. - * - * For details: https://github.com/theupdateframework/taps/blob/master/tap15.md - */ -class SuccinctRoles extends Role { - constructor(opts) { - super(opts); - const { bitLength, namePrefix } = opts; - if (bitLength <= 0 || bitLength > 32) { - throw new error_1.ValueError('bitLength must be between 1 and 32'); - } - this.bitLength = bitLength; - this.namePrefix = namePrefix; - // Calculate the suffix_len value based on the total number of bins in - // hex. If bit_length = 10 then number_of_bins = 1024 or bin names will - // have a suffix between "000" and "3ff" in hex and suffix_len will be 3 - // meaning the third bin will have a suffix of "003". - this.numberOfBins = Math.pow(2, bitLength); - // suffix_len is calculated based on "number_of_bins - 1" as the name - // of the last bin contains the number "number_of_bins -1" as a suffix. - this.suffixLen = (this.numberOfBins - 1).toString(16).length; - } - equals(other) { - if (!(other instanceof SuccinctRoles)) { - return false; - } - return (super.equals(other) && - this.bitLength === other.bitLength && - this.namePrefix === other.namePrefix); - } - /*** - * Calculates the name of the delegated role responsible for 'target_filepath'. - * - * The target at path ''target_filepath' is assigned to a bin by casting - * the left-most 'bit_length' of bits of the file path hash digest to - * int, using it as bin index between 0 and '2**bit_length - 1'. - * - * Args: - * target_filepath: URL path to a target file, relative to a base - * targets URL. - */ - getRoleForTarget(targetFilepath) { - const hasher = crypto_1.default.createHash('sha256'); - const hasherBuffer = hasher.update(targetFilepath).digest(); - // can't ever need more than 4 bytes (32 bits). - const hashBytes = hasherBuffer.subarray(0, 4); - // Right shift hash bytes, so that we only have the leftmost - // bit_length bits that we care about. - const shiftValue = 32 - this.bitLength; - const binNumber = hashBytes.readUInt32BE() >>> shiftValue; - // Add zero padding if necessary and cast to hex the suffix. - const suffix = binNumber.toString(16).padStart(this.suffixLen, '0'); - return `${this.namePrefix}-${suffix}`; - } - *getRoles() { - for (let i = 0; i < this.numberOfBins; i++) { - const suffix = i.toString(16).padStart(this.suffixLen, '0'); - yield `${this.namePrefix}-${suffix}`; - } - } - /*** - * Determines whether the given ``role_name`` is in one of - * the delegated roles that ``SuccinctRoles`` represents. - * - * Args: - * role_name: The name of the role to check against. - */ - isDelegatedRole(roleName) { - const desiredPrefix = this.namePrefix + '-'; - if (!roleName.startsWith(desiredPrefix)) { - return false; - } - const suffix = roleName.slice(desiredPrefix.length, roleName.length); - if (suffix.length != this.suffixLen) { - return false; - } - // make sure the suffix is a hex string - if (!suffix.match(/^[0-9a-fA-F]+$/)) { - return false; - } - const num = parseInt(suffix, 16); - return 0 <= num && num < this.numberOfBins; - } - toJSON() { - const json = { - ...super.toJSON(), - bit_length: this.bitLength, - name_prefix: this.namePrefix, - }; - return json; - } - static fromJSON(data) { - const { keyids, threshold, bit_length, name_prefix, ...rest } = data; - if (!utils_1.guard.isStringArray(keyids)) { - throw new TypeError('keyids must be an array of strings'); - } - if (typeof threshold !== 'number') { - throw new TypeError('threshold must be a number'); - } - if (typeof bit_length !== 'number') { - throw new TypeError('bit_length must be a number'); - } - if (typeof name_prefix !== 'string') { - throw new TypeError('name_prefix must be a string'); - } - return new SuccinctRoles({ - keyIDs: keyids, - threshold, - bitLength: bit_length, - namePrefix: name_prefix, - unrecognizedFields: rest, - }); - } -} -exports.SuccinctRoles = SuccinctRoles; diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/root.js b/node_modules/npm/node_modules/@tufjs/models/dist/root.js deleted file mode 100644 index 36d0ef0..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/root.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Root = void 0; -const util_1 = __importDefault(require("util")); -const base_1 = require("./base"); -const error_1 = require("./error"); -const key_1 = require("./key"); -const role_1 = require("./role"); -const utils_1 = require("./utils"); -/** - * A container for the signed part of root metadata. - * - * The top-level role and metadata file signed by the root keys. - * This role specifies trusted keys for all other top-level roles, which may further delegate trust. - */ -class Root extends base_1.Signed { - constructor(options) { - super(options); - this.type = base_1.MetadataKind.Root; - this.keys = options.keys || {}; - this.consistentSnapshot = options.consistentSnapshot ?? true; - if (!options.roles) { - this.roles = role_1.TOP_LEVEL_ROLE_NAMES.reduce((acc, role) => ({ - ...acc, - [role]: new role_1.Role({ keyIDs: [], threshold: 1 }), - }), {}); - } - else { - const roleNames = new Set(Object.keys(options.roles)); - if (!role_1.TOP_LEVEL_ROLE_NAMES.every((role) => roleNames.has(role))) { - throw new error_1.ValueError('missing top-level role'); - } - this.roles = options.roles; - } - } - addKey(key, role) { - if (!this.roles[role]) { - throw new error_1.ValueError(`role ${role} does not exist`); - } - if (!this.roles[role].keyIDs.includes(key.keyID)) { - this.roles[role].keyIDs.push(key.keyID); - } - this.keys[key.keyID] = key; - } - equals(other) { - if (!(other instanceof Root)) { - return false; - } - return (super.equals(other) && - this.consistentSnapshot === other.consistentSnapshot && - util_1.default.isDeepStrictEqual(this.keys, other.keys) && - util_1.default.isDeepStrictEqual(this.roles, other.roles)); - } - toJSON() { - return { - _type: this.type, - spec_version: this.specVersion, - version: this.version, - expires: this.expires, - keys: keysToJSON(this.keys), - roles: rolesToJSON(this.roles), - consistent_snapshot: this.consistentSnapshot, - ...this.unrecognizedFields, - }; - } - static fromJSON(data) { - const { unrecognizedFields, ...commonFields } = base_1.Signed.commonFieldsFromJSON(data); - const { keys, roles, consistent_snapshot, ...rest } = unrecognizedFields; - if (typeof consistent_snapshot !== 'boolean') { - throw new TypeError('consistent_snapshot must be a boolean'); - } - return new Root({ - ...commonFields, - keys: keysFromJSON(keys), - roles: rolesFromJSON(roles), - consistentSnapshot: consistent_snapshot, - unrecognizedFields: rest, - }); - } -} -exports.Root = Root; -function keysToJSON(keys) { - return Object.entries(keys).reduce((acc, [keyID, key]) => ({ ...acc, [keyID]: key.toJSON() }), {}); -} -function rolesToJSON(roles) { - return Object.entries(roles).reduce((acc, [roleName, role]) => ({ ...acc, [roleName]: role.toJSON() }), {}); -} -function keysFromJSON(data) { - let keys; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObjectRecord(data)) { - throw new TypeError('keys must be an object'); - } - keys = Object.entries(data).reduce((acc, [keyID, keyData]) => ({ - ...acc, - [keyID]: key_1.Key.fromJSON(keyID, keyData), - }), {}); - } - return keys; -} -function rolesFromJSON(data) { - let roles; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObjectRecord(data)) { - throw new TypeError('roles must be an object'); - } - roles = Object.entries(data).reduce((acc, [roleName, roleData]) => ({ - ...acc, - [roleName]: role_1.Role.fromJSON(roleData), - }), {}); - } - return roles; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/signature.js b/node_modules/npm/node_modules/@tufjs/models/dist/signature.js deleted file mode 100644 index 33eb204..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/signature.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Signature = void 0; -/** - * A container class containing information about a signature. - * - * Contains a signature and the keyid uniquely identifying the key used - * to generate the signature. - * - * Provide a `fromJSON` method to create a Signature from a JSON object. - */ -class Signature { - constructor(options) { - const { keyID, sig } = options; - this.keyID = keyID; - this.sig = sig; - } - toJSON() { - return { - keyid: this.keyID, - sig: this.sig, - }; - } - static fromJSON(data) { - const { keyid, sig } = data; - if (typeof keyid !== 'string') { - throw new TypeError('keyid must be a string'); - } - if (typeof sig !== 'string') { - throw new TypeError('sig must be a string'); - } - return new Signature({ - keyID: keyid, - sig: sig, - }); - } -} -exports.Signature = Signature; diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/snapshot.js b/node_modules/npm/node_modules/@tufjs/models/dist/snapshot.js deleted file mode 100644 index e90ea8e..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/snapshot.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Snapshot = void 0; -const util_1 = __importDefault(require("util")); -const base_1 = require("./base"); -const file_1 = require("./file"); -const utils_1 = require("./utils"); -/** - * A container for the signed part of snapshot metadata. - * - * Snapshot contains information about all target Metadata files. - * A top-level role that specifies the latest versions of all targets metadata files, - * and hence the latest versions of all targets (including any dependencies between them) on the repository. - */ -class Snapshot extends base_1.Signed { - constructor(opts) { - super(opts); - this.type = base_1.MetadataKind.Snapshot; - this.meta = opts.meta || { 'targets.json': new file_1.MetaFile({ version: 1 }) }; - } - equals(other) { - if (!(other instanceof Snapshot)) { - return false; - } - return super.equals(other) && util_1.default.isDeepStrictEqual(this.meta, other.meta); - } - toJSON() { - return { - _type: this.type, - meta: metaToJSON(this.meta), - spec_version: this.specVersion, - version: this.version, - expires: this.expires, - ...this.unrecognizedFields, - }; - } - static fromJSON(data) { - const { unrecognizedFields, ...commonFields } = base_1.Signed.commonFieldsFromJSON(data); - const { meta, ...rest } = unrecognizedFields; - return new Snapshot({ - ...commonFields, - meta: metaFromJSON(meta), - unrecognizedFields: rest, - }); - } -} -exports.Snapshot = Snapshot; -function metaToJSON(meta) { - return Object.entries(meta).reduce((acc, [path, metadata]) => ({ - ...acc, - [path]: metadata.toJSON(), - }), {}); -} -function metaFromJSON(data) { - let meta; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObjectRecord(data)) { - throw new TypeError('meta field is malformed'); - } - else { - meta = Object.entries(data).reduce((acc, [path, metadata]) => ({ - ...acc, - [path]: file_1.MetaFile.fromJSON(metadata), - }), {}); - } - } - return meta; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/targets.js b/node_modules/npm/node_modules/@tufjs/models/dist/targets.js deleted file mode 100644 index 54bd8f8..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/targets.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Targets = void 0; -const util_1 = __importDefault(require("util")); -const base_1 = require("./base"); -const delegations_1 = require("./delegations"); -const file_1 = require("./file"); -const utils_1 = require("./utils"); -// Container for the signed part of targets metadata. -// -// Targets contains verifying information about target files and also delegates -// responsible to other Targets roles. -class Targets extends base_1.Signed { - constructor(options) { - super(options); - this.type = base_1.MetadataKind.Targets; - this.targets = options.targets || {}; - this.delegations = options.delegations; - } - addTarget(target) { - this.targets[target.path] = target; - } - equals(other) { - if (!(other instanceof Targets)) { - return false; - } - return (super.equals(other) && - util_1.default.isDeepStrictEqual(this.targets, other.targets) && - util_1.default.isDeepStrictEqual(this.delegations, other.delegations)); - } - toJSON() { - const json = { - _type: this.type, - spec_version: this.specVersion, - version: this.version, - expires: this.expires, - targets: targetsToJSON(this.targets), - ...this.unrecognizedFields, - }; - if (this.delegations) { - json.delegations = this.delegations.toJSON(); - } - return json; - } - static fromJSON(data) { - const { unrecognizedFields, ...commonFields } = base_1.Signed.commonFieldsFromJSON(data); - const { targets, delegations, ...rest } = unrecognizedFields; - return new Targets({ - ...commonFields, - targets: targetsFromJSON(targets), - delegations: delegationsFromJSON(delegations), - unrecognizedFields: rest, - }); - } -} -exports.Targets = Targets; -function targetsToJSON(targets) { - return Object.entries(targets).reduce((acc, [path, target]) => ({ - ...acc, - [path]: target.toJSON(), - }), {}); -} -function targetsFromJSON(data) { - let targets; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObjectRecord(data)) { - throw new TypeError('targets must be an object'); - } - else { - targets = Object.entries(data).reduce((acc, [path, target]) => ({ - ...acc, - [path]: file_1.TargetFile.fromJSON(path, target), - }), {}); - } - } - return targets; -} -function delegationsFromJSON(data) { - let delegations; - if (utils_1.guard.isDefined(data)) { - if (!utils_1.guard.isObject(data)) { - throw new TypeError('delegations must be an object'); - } - else { - delegations = delegations_1.Delegations.fromJSON(data); - } - } - return delegations; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/timestamp.js b/node_modules/npm/node_modules/@tufjs/models/dist/timestamp.js deleted file mode 100644 index 9880c4c..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/timestamp.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Timestamp = void 0; -const base_1 = require("./base"); -const file_1 = require("./file"); -const utils_1 = require("./utils"); -/** - * A container for the signed part of timestamp metadata. - * - * A top-level that specifies the latest version of the snapshot role metadata file, - * and hence the latest versions of all metadata and targets on the repository. - */ -class Timestamp extends base_1.Signed { - constructor(options) { - super(options); - this.type = base_1.MetadataKind.Timestamp; - this.snapshotMeta = options.snapshotMeta || new file_1.MetaFile({ version: 1 }); - } - equals(other) { - if (!(other instanceof Timestamp)) { - return false; - } - return super.equals(other) && this.snapshotMeta.equals(other.snapshotMeta); - } - toJSON() { - return { - _type: this.type, - spec_version: this.specVersion, - version: this.version, - expires: this.expires, - meta: { 'snapshot.json': this.snapshotMeta.toJSON() }, - ...this.unrecognizedFields, - }; - } - static fromJSON(data) { - const { unrecognizedFields, ...commonFields } = base_1.Signed.commonFieldsFromJSON(data); - const { meta, ...rest } = unrecognizedFields; - return new Timestamp({ - ...commonFields, - snapshotMeta: snapshotMetaFromJSON(meta), - unrecognizedFields: rest, - }); - } -} -exports.Timestamp = Timestamp; -function snapshotMetaFromJSON(data) { - let snapshotMeta; - if (utils_1.guard.isDefined(data)) { - const snapshotData = data['snapshot.json']; - if (!utils_1.guard.isDefined(snapshotData) || !utils_1.guard.isObject(snapshotData)) { - throw new TypeError('missing snapshot.json in meta'); - } - else { - snapshotMeta = file_1.MetaFile.fromJSON(snapshotData); - } - } - return snapshotMeta; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/guard.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/guard.js deleted file mode 100644 index efe5588..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/guard.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isObjectRecord = exports.isStringRecord = exports.isObjectArray = exports.isStringArray = exports.isObject = exports.isDefined = void 0; -function isDefined(val) { - return val !== undefined; -} -exports.isDefined = isDefined; -function isObject(value) { - return typeof value === 'object' && value !== null; -} -exports.isObject = isObject; -function isStringArray(value) { - return Array.isArray(value) && value.every((v) => typeof v === 'string'); -} -exports.isStringArray = isStringArray; -function isObjectArray(value) { - return Array.isArray(value) && value.every(isObject); -} -exports.isObjectArray = isObjectArray; -function isStringRecord(value) { - return (typeof value === 'object' && - value !== null && - Object.keys(value).every((k) => typeof k === 'string') && - Object.values(value).every((v) => typeof v === 'string')); -} -exports.isStringRecord = isStringRecord; -function isObjectRecord(value) { - return (typeof value === 'object' && - value !== null && - Object.keys(value).every((k) => typeof k === 'string') && - Object.values(value).every((v) => typeof v === 'object' && v !== null)); -} -exports.isObjectRecord = isObjectRecord; diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/index.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/index.js deleted file mode 100644 index 872aae2..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"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.crypto = exports.guard = void 0; -exports.guard = __importStar(require("./guard")); -exports.crypto = __importStar(require("./verify")); diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/key.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/key.js deleted file mode 100644 index 1f795ba..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/key.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPublicKey = void 0; -const crypto_1 = __importDefault(require("crypto")); -const error_1 = require("../error"); -const oid_1 = require("./oid"); -const ASN1_TAG_SEQUENCE = 0x30; -const ANS1_TAG_BIT_STRING = 0x03; -const NULL_BYTE = 0x00; -const OID_EDDSA = '1.3.101.112'; -const OID_EC_PUBLIC_KEY = '1.2.840.10045.2.1'; -const OID_EC_CURVE_P256V1 = '1.2.840.10045.3.1.7'; -const PEM_HEADER = '-----BEGIN PUBLIC KEY-----'; -function getPublicKey(keyInfo) { - switch (keyInfo.keyType) { - case 'rsa': - return getRSAPublicKey(keyInfo); - case 'ed25519': - return getED25519PublicKey(keyInfo); - case 'ecdsa': - case 'ecdsa-sha2-nistp256': - case 'ecdsa-sha2-nistp384': - return getECDCSAPublicKey(keyInfo); - default: - throw new error_1.UnsupportedAlgorithmError(`Unsupported key type: ${keyInfo.keyType}`); - } -} -exports.getPublicKey = getPublicKey; -function getRSAPublicKey(keyInfo) { - // Only support PEM-encoded RSA keys - if (!keyInfo.keyVal.startsWith(PEM_HEADER)) { - throw new error_1.CryptoError('Invalid key format'); - } - const key = crypto_1.default.createPublicKey(keyInfo.keyVal); - switch (keyInfo.scheme) { - case 'rsassa-pss-sha256': - return { - key: key, - padding: crypto_1.default.constants.RSA_PKCS1_PSS_PADDING, - }; - default: - throw new error_1.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${keyInfo.scheme}`); - } -} -function getED25519PublicKey(keyInfo) { - let key; - // If key is already PEM-encoded we can just parse it - if (keyInfo.keyVal.startsWith(PEM_HEADER)) { - key = crypto_1.default.createPublicKey(keyInfo.keyVal); - } - else { - // If key is not PEM-encoded it had better be hex - if (!isHex(keyInfo.keyVal)) { - throw new error_1.CryptoError('Invalid key format'); - } - key = crypto_1.default.createPublicKey({ - key: ed25519.hexToDER(keyInfo.keyVal), - format: 'der', - type: 'spki', - }); - } - return { key }; -} -function getECDCSAPublicKey(keyInfo) { - let key; - // If key is already PEM-encoded we can just parse it - if (keyInfo.keyVal.startsWith(PEM_HEADER)) { - key = crypto_1.default.createPublicKey(keyInfo.keyVal); - } - else { - // If key is not PEM-encoded it had better be hex - if (!isHex(keyInfo.keyVal)) { - throw new error_1.CryptoError('Invalid key format'); - } - key = crypto_1.default.createPublicKey({ - key: ecdsa.hexToDER(keyInfo.keyVal), - format: 'der', - type: 'spki', - }); - } - return { key }; -} -const ed25519 = { - // Translates a hex key into a crypto KeyObject - // https://keygen.sh/blog/how-to-use-hexadecimal-ed25519-keys-in-node/ - hexToDER: (hex) => { - const key = Buffer.from(hex, 'hex'); - const oid = (0, oid_1.encodeOIDString)(OID_EDDSA); - // Create a byte sequence containing the OID and key - const elements = Buffer.concat([ - Buffer.concat([ - Buffer.from([ASN1_TAG_SEQUENCE]), - Buffer.from([oid.length]), - oid, - ]), - Buffer.concat([ - Buffer.from([ANS1_TAG_BIT_STRING]), - Buffer.from([key.length + 1]), - Buffer.from([NULL_BYTE]), - key, - ]), - ]); - // Wrap up by creating a sequence of elements - const der = Buffer.concat([ - Buffer.from([ASN1_TAG_SEQUENCE]), - Buffer.from([elements.length]), - elements, - ]); - return der; - }, -}; -const ecdsa = { - hexToDER: (hex) => { - const key = Buffer.from(hex, 'hex'); - const bitString = Buffer.concat([ - Buffer.from([ANS1_TAG_BIT_STRING]), - Buffer.from([key.length + 1]), - Buffer.from([NULL_BYTE]), - key, - ]); - const oids = Buffer.concat([ - (0, oid_1.encodeOIDString)(OID_EC_PUBLIC_KEY), - (0, oid_1.encodeOIDString)(OID_EC_CURVE_P256V1), - ]); - const oidSequence = Buffer.concat([ - Buffer.from([ASN1_TAG_SEQUENCE]), - Buffer.from([oids.length]), - oids, - ]); - // Wrap up by creating a sequence of elements - const der = Buffer.concat([ - Buffer.from([ASN1_TAG_SEQUENCE]), - Buffer.from([oidSequence.length + bitString.length]), - oidSequence, - bitString, - ]); - return der; - }, -}; -const isHex = (key) => /^[0-9a-fA-F]+$/.test(key); diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/oid.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/oid.js deleted file mode 100644 index e1bb7af..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/oid.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeOIDString = void 0; -const ANS1_TAG_OID = 0x06; -function encodeOIDString(oid) { - const parts = oid.split('.'); - // The first two subidentifiers are encoded into the first byte - const first = parseInt(parts[0], 10) * 40 + parseInt(parts[1], 10); - const rest = []; - parts.slice(2).forEach((part) => { - const bytes = encodeVariableLengthInteger(parseInt(part, 10)); - rest.push(...bytes); - }); - const der = Buffer.from([first, ...rest]); - return Buffer.from([ANS1_TAG_OID, der.length, ...der]); -} -exports.encodeOIDString = encodeOIDString; -function encodeVariableLengthInteger(value) { - const bytes = []; - let mask = 0x00; - while (value > 0) { - bytes.unshift((value & 0x7f) | mask); - value >>= 7; - mask = 0x80; - } - return bytes; -} diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/types.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/types.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/npm/node_modules/@tufjs/models/dist/utils/verify.js b/node_modules/npm/node_modules/@tufjs/models/dist/utils/verify.js deleted file mode 100644 index 8232b6f..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/dist/utils/verify.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySignature = void 0; -const canonical_json_1 = require("@tufjs/canonical-json"); -const crypto_1 = __importDefault(require("crypto")); -const verifySignature = (metaDataSignedData, key, signature) => { - const canonicalData = Buffer.from((0, canonical_json_1.canonicalize)(metaDataSignedData)); - return crypto_1.default.verify(undefined, canonicalData, key, Buffer.from(signature, 'hex')); -}; -exports.verifySignature = verifySignature; diff --git a/node_modules/npm/node_modules/@tufjs/models/package.json b/node_modules/npm/node_modules/@tufjs/models/package.json deleted file mode 100644 index 6036824..0000000 --- a/node_modules/npm/node_modules/@tufjs/models/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@tufjs/models", - "version": "2.0.0", - "description": "TUF metadata models", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "files": [ - "dist" - ], - "scripts": { - "build": "tsc --build", - "clean": "rm -rf dist && rm tsconfig.tsbuildinfo", - "test": "jest" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/theupdateframework/tuf-js.git" - }, - "keywords": [ - "tuf", - "security", - "update" - ], - "author": "bdehamer@github.com", - "license": "MIT", - "bugs": { - "url": "https://github.com/theupdateframework/tuf-js/issues" - }, - "homepage": "https://github.com/theupdateframework/tuf-js/tree/main/packages/models#readme", - "dependencies": { - "@tufjs/canonical-json": "2.0.0", - "minimatch": "^9.0.3" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } -} diff --git a/node_modules/npm/node_modules/abbrev/LICENSE b/node_modules/npm/node_modules/abbrev/LICENSE deleted file mode 100644 index 9bcfa9d..0000000 --- a/node_modules/npm/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -This software is dual-licensed under the ISC and MIT licenses. -You may use this software under EITHER of the following licenses. - ----------- - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----------- - -Copyright Isaac Z. Schlueter and Contributors -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/abbrev/lib/index.js b/node_modules/npm/node_modules/abbrev/lib/index.js deleted file mode 100644 index 9f48801..0000000 --- a/node_modules/npm/node_modules/abbrev/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ -module.exports = abbrev - -function abbrev (...args) { - let list = args.length === 1 || Array.isArray(args[0]) ? args[0] : args - - for (let i = 0, l = list.length; i < l; i++) { - list[i] = typeof list[i] === 'string' ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - list = list.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - const abbrevs = {} - let prev = '' - for (let ii = 0, ll = list.length; ii < ll; ii++) { - const current = list[ii] - const next = list[ii + 1] || '' - let nextMatches = true - let prevMatches = true - if (current === next) { - continue - } - let j = 0 - const cl = current.length - for (; j < cl; j++) { - const curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (let a = current.slice(0, j); j <= cl; j++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} diff --git a/node_modules/npm/node_modules/abbrev/package.json b/node_modules/npm/node_modules/abbrev/package.json deleted file mode 100644 index e264004..0000000 --- a/node_modules/npm/node_modules/abbrev/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "abbrev", - "version": "2.0.0", - "description": "Like ruby's abbrev module, but in js", - "author": "GitHub Inc.", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/abbrev-js.git" - }, - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.8.0", - "tap": "^16.3.0" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.8.0" - } -} diff --git a/node_modules/npm/node_modules/abort-controller/LICENSE b/node_modules/npm/node_modules/abort-controller/LICENSE deleted file mode 100644 index c914149..0000000 --- a/node_modules/npm/node_modules/abort-controller/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Toru Nagashima - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/abort-controller/browser.js b/node_modules/npm/node_modules/abort-controller/browser.js deleted file mode 100644 index b0c5ec3..0000000 --- a/node_modules/npm/node_modules/abort-controller/browser.js +++ /dev/null @@ -1,13 +0,0 @@ -/*globals self, window */ -"use strict" - -/*eslint-disable @mysticatea/prettier */ -const { AbortController, AbortSignal } = - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - /* otherwise */ undefined -/*eslint-enable @mysticatea/prettier */ - -module.exports = AbortController -module.exports.AbortSignal = AbortSignal -module.exports.default = AbortController diff --git a/node_modules/npm/node_modules/abort-controller/browser.mjs b/node_modules/npm/node_modules/abort-controller/browser.mjs deleted file mode 100644 index a8f321a..0000000 --- a/node_modules/npm/node_modules/abort-controller/browser.mjs +++ /dev/null @@ -1,11 +0,0 @@ -/*globals self, window */ - -/*eslint-disable @mysticatea/prettier */ -const { AbortController, AbortSignal } = - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - /* otherwise */ undefined -/*eslint-enable @mysticatea/prettier */ - -export default AbortController -export { AbortController, AbortSignal } diff --git a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.js b/node_modules/npm/node_modules/abort-controller/dist/abort-controller.js deleted file mode 100644 index 49af739..0000000 --- a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.js +++ /dev/null @@ -1,127 +0,0 @@ -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var eventTargetShim = require('event-target-shim'); - -/** - * The signal class. - * @see https://dom.spec.whatwg.org/#abortsignal - */ -class AbortSignal extends eventTargetShim.EventTarget { - /** - * AbortSignal cannot be constructed directly. - */ - constructor() { - super(); - throw new TypeError("AbortSignal cannot be constructed directly"); - } - /** - * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. - */ - get aborted() { - const aborted = abortedFlags.get(this); - if (typeof aborted !== "boolean") { - throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); - } - return aborted; - } -} -eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); -/** - * Create an AbortSignal object. - */ -function createAbortSignal() { - const signal = Object.create(AbortSignal.prototype); - eventTargetShim.EventTarget.call(signal); - abortedFlags.set(signal, false); - return signal; -} -/** - * Abort a given signal. - */ -function abortSignal(signal) { - if (abortedFlags.get(signal) !== false) { - return; - } - abortedFlags.set(signal, true); - signal.dispatchEvent({ type: "abort" }); -} -/** - * Aborted flag for each instances. - */ -const abortedFlags = new WeakMap(); -// Properties should be enumerable. -Object.defineProperties(AbortSignal.prototype, { - aborted: { enumerable: true }, -}); -// `toString()` should return `"[object AbortSignal]"` -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortSignal", - }); -} - -/** - * The AbortController. - * @see https://dom.spec.whatwg.org/#abortcontroller - */ -class AbortController { - /** - * Initialize this controller. - */ - constructor() { - signals.set(this, createAbortSignal()); - } - /** - * Returns the `AbortSignal` object associated with this object. - */ - get signal() { - return getSignal(this); - } - /** - * Abort and signal to any observers that the associated activity is to be aborted. - */ - abort() { - abortSignal(getSignal(this)); - } -} -/** - * Associated signals. - */ -const signals = new WeakMap(); -/** - * Get the associated signal of a given controller. - */ -function getSignal(controller) { - const signal = signals.get(controller); - if (signal == null) { - throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); - } - return signal; -} -// Properties should be enumerable. -Object.defineProperties(AbortController.prototype, { - signal: { enumerable: true }, - abort: { enumerable: true }, -}); -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortController", - }); -} - -exports.AbortController = AbortController; -exports.AbortSignal = AbortSignal; -exports.default = AbortController; - -module.exports = AbortController -module.exports.AbortController = module.exports["default"] = AbortController -module.exports.AbortSignal = AbortSignal -//# sourceMappingURL=abort-controller.js.map diff --git a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.mjs b/node_modules/npm/node_modules/abort-controller/dist/abort-controller.mjs deleted file mode 100644 index 88ba22d..0000000 --- a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.mjs +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ -import { EventTarget, defineEventAttribute } from 'event-target-shim'; - -/** - * The signal class. - * @see https://dom.spec.whatwg.org/#abortsignal - */ -class AbortSignal extends EventTarget { - /** - * AbortSignal cannot be constructed directly. - */ - constructor() { - super(); - throw new TypeError("AbortSignal cannot be constructed directly"); - } - /** - * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. - */ - get aborted() { - const aborted = abortedFlags.get(this); - if (typeof aborted !== "boolean") { - throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); - } - return aborted; - } -} -defineEventAttribute(AbortSignal.prototype, "abort"); -/** - * Create an AbortSignal object. - */ -function createAbortSignal() { - const signal = Object.create(AbortSignal.prototype); - EventTarget.call(signal); - abortedFlags.set(signal, false); - return signal; -} -/** - * Abort a given signal. - */ -function abortSignal(signal) { - if (abortedFlags.get(signal) !== false) { - return; - } - abortedFlags.set(signal, true); - signal.dispatchEvent({ type: "abort" }); -} -/** - * Aborted flag for each instances. - */ -const abortedFlags = new WeakMap(); -// Properties should be enumerable. -Object.defineProperties(AbortSignal.prototype, { - aborted: { enumerable: true }, -}); -// `toString()` should return `"[object AbortSignal]"` -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortSignal", - }); -} - -/** - * The AbortController. - * @see https://dom.spec.whatwg.org/#abortcontroller - */ -class AbortController { - /** - * Initialize this controller. - */ - constructor() { - signals.set(this, createAbortSignal()); - } - /** - * Returns the `AbortSignal` object associated with this object. - */ - get signal() { - return getSignal(this); - } - /** - * Abort and signal to any observers that the associated activity is to be aborted. - */ - abort() { - abortSignal(getSignal(this)); - } -} -/** - * Associated signals. - */ -const signals = new WeakMap(); -/** - * Get the associated signal of a given controller. - */ -function getSignal(controller) { - const signal = signals.get(controller); - if (signal == null) { - throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); - } - return signal; -} -// Properties should be enumerable. -Object.defineProperties(AbortController.prototype, { - signal: { enumerable: true }, - abort: { enumerable: true }, -}); -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortController", - }); -} - -export default AbortController; -export { AbortController, AbortSignal }; -//# sourceMappingURL=abort-controller.mjs.map diff --git a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.umd.js b/node_modules/npm/node_modules/abort-controller/dist/abort-controller.umd.js deleted file mode 100644 index f643cfd..0000000 --- a/node_modules/npm/node_modules/abort-controller/dist/abort-controller.umd.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.AbortControllerShim={}))})(this,function(a){'use strict';function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){for(var c,d=0;d=6.5" - }, - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "browser": "./browser.js", - "devDependencies": { - "@babel/core": "^7.2.2", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/preset-env": "^7.3.0", - "@babel/register": "^7.0.0", - "@mysticatea/eslint-plugin": "^8.0.1", - "@mysticatea/spy": "^0.1.2", - "@types/mocha": "^5.2.5", - "@types/node": "^10.12.18", - "assert": "^1.4.1", - "codecov": "^3.1.0", - "dts-bundle-generator": "^2.0.0", - "eslint": "^5.12.1", - "karma": "^3.1.4", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.2", - "karma-firefox-launcher": "^1.1.0", - "karma-growl-reporter": "^1.0.0", - "karma-ie-launcher": "^1.0.0", - "karma-mocha": "^1.3.0", - "karma-rollup-preprocessor": "^7.0.0-rc.2", - "mocha": "^5.2.0", - "npm-run-all": "^4.1.5", - "nyc": "^13.1.0", - "opener": "^1.5.1", - "rimraf": "^2.6.3", - "rollup": "^1.1.2", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-babel-minify": "^7.0.0", - "rollup-plugin-commonjs": "^9.2.0", - "rollup-plugin-node-resolve": "^4.0.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-typescript": "^1.0.0", - "rollup-watch": "^4.3.1", - "ts-node": "^8.0.1", - "type-tester": "^1.0.0", - "typescript": "^3.2.4" - }, - "scripts": { - "preversion": "npm test", - "version": "npm run -s build && git add dist/*", - "postversion": "git push && git push --tags", - "clean": "rimraf .nyc_output coverage", - "coverage": "opener coverage/lcov-report/index.html", - "lint": "eslint . --ext .ts", - "build": "run-s -s build:*", - "build:rollup": "rollup -c", - "build:dts": "dts-bundle-generator -o dist/abort-controller.d.ts src/abort-controller.ts && ts-node scripts/fix-dts", - "test": "run-s -s lint test:*", - "test:mocha": "nyc mocha test/*.ts", - "test:karma": "karma start --single-run", - "watch": "run-p -s watch:*", - "watch:mocha": "mocha test/*.ts --require ts-node/register --watch-extensions ts --watch --growl", - "watch:karma": "karma start --watch", - "codecov": "codecov" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/abort-controller.git" - }, - "keywords": [ - "w3c", - "whatwg", - "event", - "events", - "abort", - "cancel", - "abortcontroller", - "abortsignal", - "controller", - "signal", - "shim" - ], - "author": "Toru Nagashima (https://github.com/mysticatea)", - "license": "MIT", - "bugs": { - "url": "https://github.com/mysticatea/abort-controller/issues" - }, - "homepage": "https://github.com/mysticatea/abort-controller#readme" -} diff --git a/node_modules/npm/node_modules/abort-controller/polyfill.js b/node_modules/npm/node_modules/abort-controller/polyfill.js deleted file mode 100644 index 3ca8923..0000000 --- a/node_modules/npm/node_modules/abort-controller/polyfill.js +++ /dev/null @@ -1,21 +0,0 @@ -/*globals require, self, window */ -"use strict" - -const ac = require("./dist/abort-controller") - -/*eslint-disable @mysticatea/prettier */ -const g = - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - typeof global !== "undefined" ? global : - /* otherwise */ undefined -/*eslint-enable @mysticatea/prettier */ - -if (g) { - if (typeof g.AbortController === "undefined") { - g.AbortController = ac.AbortController - } - if (typeof g.AbortSignal === "undefined") { - g.AbortSignal = ac.AbortSignal - } -} diff --git a/node_modules/npm/node_modules/abort-controller/polyfill.mjs b/node_modules/npm/node_modules/abort-controller/polyfill.mjs deleted file mode 100644 index 0602a64..0000000 --- a/node_modules/npm/node_modules/abort-controller/polyfill.mjs +++ /dev/null @@ -1,19 +0,0 @@ -/*globals self, window */ -import * as ac from "./dist/abort-controller" - -/*eslint-disable @mysticatea/prettier */ -const g = - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - typeof global !== "undefined" ? global : - /* otherwise */ undefined -/*eslint-enable @mysticatea/prettier */ - -if (g) { - if (typeof g.AbortController === "undefined") { - g.AbortController = ac.AbortController - } - if (typeof g.AbortSignal === "undefined") { - g.AbortSignal = ac.AbortSignal - } -} diff --git a/node_modules/npm/node_modules/agent-base/dist/helpers.js b/node_modules/npm/node_modules/agent-base/dist/helpers.js deleted file mode 100644 index ef3f920..0000000 --- a/node_modules/npm/node_modules/agent-base/dist/helpers.js +++ /dev/null @@ -1,66 +0,0 @@ -"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.req = exports.json = exports.toBuffer = void 0; -const http = __importStar(require("http")); -const https = __importStar(require("https")); -async function toBuffer(stream) { - let length = 0; - const chunks = []; - for await (const chunk of stream) { - length += chunk.length; - chunks.push(chunk); - } - return Buffer.concat(chunks, length); -} -exports.toBuffer = toBuffer; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -async function json(stream) { - const buf = await toBuffer(stream); - const str = buf.toString('utf8'); - try { - return JSON.parse(str); - } - catch (_err) { - const err = _err; - err.message += ` (input: ${str})`; - throw err; - } -} -exports.json = json; -function req(url, opts = {}) { - const href = typeof url === 'string' ? url : url.href; - const req = (href.startsWith('https:') ? https : http).request(url, opts); - const promise = new Promise((resolve, reject) => { - req - .once('response', resolve) - .once('error', reject) - .end(); - }); - req.then = promise.then.bind(promise); - return req; -} -exports.req = req; -//# sourceMappingURL=helpers.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/agent-base/dist/index.js b/node_modules/npm/node_modules/agent-base/dist/index.js deleted file mode 100644 index 7bafc8c..0000000 --- a/node_modules/npm/node_modules/agent-base/dist/index.js +++ /dev/null @@ -1,112 +0,0 @@ -"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 __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.Agent = void 0; -const http = __importStar(require("http")); -__exportStar(require("./helpers"), exports); -const INTERNAL = Symbol('AgentBaseInternalState'); -class Agent extends http.Agent { - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } - /** - * Determine whether this is an `http` or `https` request. - */ - isSecureEndpoint(options) { - if (options) { - // First check the `secureEndpoint` property explicitly, since this - // means that a parent `Agent` is "passing through" to this instance. - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (typeof options.secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - // If no explicit `secure` endpoint, check if `protocol` property is - // set. This will usually be the case since using a full string URL - // or `URL` instance should be the most common usage. - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } - } - // Finally, if no `protocol` property was set, then fall back to - // checking the stack trace of the current call stack, and try to - // detect the "https" module. - const { stack } = new Error(); - if (typeof stack !== 'string') - return false; - return stack - .split('\n') - .some((l) => l.indexOf('(https.js:') !== -1 || - l.indexOf('node:https:') !== -1); - } - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), - }; - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then((socket) => { - if (socket instanceof http.Agent) { - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - return socket.addRequest(req, connectOpts); - } - this[INTERNAL].currentSocket = socket; - // @ts-expect-error `createSocket()` isn't defined in `@types/node` - super.createSocket(req, options, cb); - }, cb); - } - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); - } - return socket; - } - get defaultPort() { - return (this[INTERNAL].defaultPort ?? - (this.protocol === 'https:' ? 443 : 80)); - } - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; - } - } - get protocol() { - return (this[INTERNAL].protocol ?? - (this.isSecureEndpoint() ? 'https:' : 'http:')); - } - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; - } - } -} -exports.Agent = Agent; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/agent-base/package.json b/node_modules/npm/node_modules/agent-base/package.json deleted file mode 100644 index 7178f49..0000000 --- a/node_modules/npm/node_modules/agent-base/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "agent-base", - "version": "7.1.0", - "description": "Turn a function into an `http.Agent` instance", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "https://github.com/TooTallNate/proxy-agents.git", - "directory": "packages/agent-base" - }, - "keywords": [ - "http", - "agent", - "base", - "barebones", - "https" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "dependencies": { - "debug": "^4.3.4" - }, - "devDependencies": { - "@types/debug": "^4.1.7", - "@types/jest": "^29.5.1", - "@types/node": "^14.18.45", - "@types/semver": "^7.3.13", - "@types/ws": "^6.0.4", - "async-listen": "^3.0.0", - "jest": "^29.5.0", - "ts-jest": "^29.1.0", - "typescript": "^5.0.4", - "ws": "^3.3.3", - "tsconfig": "0.0.0" - }, - "engines": { - "node": ">= 14" - }, - "scripts": { - "build": "tsc", - "test": "jest --env node --verbose --bail", - "lint": "eslint . --ext .ts", - "pack": "node ../../scripts/pack.mjs" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/aggregate-error/index.js b/node_modules/npm/node_modules/aggregate-error/index.js deleted file mode 100644 index ba5bf02..0000000 --- a/node_modules/npm/node_modules/aggregate-error/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; -const indentString = require('indent-string'); -const cleanStack = require('clean-stack'); - -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; diff --git a/node_modules/npm/node_modules/aggregate-error/license b/node_modules/npm/node_modules/aggregate-error/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/aggregate-error/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/aggregate-error/package.json b/node_modules/npm/node_modules/aggregate-error/package.json deleted file mode 100644 index 74fcc37..0000000 --- a/node_modules/npm/node_modules/aggregate-error/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "aggregate-error", - "version": "3.1.0", - "description": "Create an error from multiple errors", - "license": "MIT", - "repository": "sindresorhus/aggregate-error", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "aggregate", - "error", - "combine", - "multiple", - "many", - "collection", - "iterable", - "iterator" - ], - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.7.1", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/ansi-regex/index.js b/node_modules/npm/node_modules/ansi-regex/index.js deleted file mode 100644 index 130a092..0000000 --- a/node_modules/npm/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function ansiRegex({onlyFirst = false} = {}) { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} diff --git a/node_modules/npm/node_modules/ansi-regex/license b/node_modules/npm/node_modules/ansi-regex/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/npm/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/ansi-regex/package.json b/node_modules/npm/node_modules/ansi-regex/package.json deleted file mode 100644 index 7bbb563..0000000 --- a/node_modules/npm/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "ansi-regex", - "version": "6.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "funding": "https://github.com/chalk/ansi-regex?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - } -} diff --git a/node_modules/npm/node_modules/ansi-styles/index.js b/node_modules/npm/node_modules/ansi-styles/index.js deleted file mode 100644 index d7bede4..0000000 --- a/node_modules/npm/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,223 +0,0 @@ -const ANSI_BACKGROUND_OFFSET = 10; - -const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; - -const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; - -const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; - -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], - overline: [53, 55], - 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], - gray: [90, 39], // Alias of `blackBright` - grey: [90, 39], // Alias of `blackBright` - 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], - bgGray: [100, 49], // Alias of `bgBlackBright` - bgGrey: [100, 49], // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49], - }, -}; - -export const modifierNames = Object.keys(styles.modifier); -export const foregroundColorNames = Object.keys(styles.color); -export const backgroundColorNames = Object.keys(styles.bgColor); -export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; - -function assembleStyles() { - const codes = new Map(); - - 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'; - - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - - // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js - Object.defineProperties(styles, { - rgbToAnsi256: { - value: (red, green, blue) => { - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - - if (red > 248) { - return 231; - } - - return Math.round(((red - 8) / 247) * 24) + 232; - } - - return 16 - + (36 * Math.round(red / 255 * 5)) - + (6 * Math.round(green / 255 * 5)) - + Math.round(blue / 255 * 5); - }, - enumerable: false, - }, - hexToRgb: { - value: hex => { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - - let [colorString] = matches; - - if (colorString.length === 3) { - colorString = [...colorString].map(character => character + character).join(''); - } - - const integer = Number.parseInt(colorString, 16); - - return [ - /* eslint-disable no-bitwise */ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false, - }, - hexToAnsi256: { - value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false, - }, - ansi256ToAnsi: { - value: code => { - if (code < 8) { - return 30 + code; - } - - if (code < 16) { - return 90 + (code - 8); - } - - let red; - let green; - let blue; - - if (code >= 232) { - red = (((code - 232) * 10) + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - - const remainder = code % 36; - - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = (remainder % 6) / 5; - } - - const value = Math.max(red, green, blue) * 2; - - if (value === 0) { - return 30; - } - - // eslint-disable-next-line no-bitwise - let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); - - if (value === 2) { - result += 60; - } - - return result; - }, - enumerable: false, - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false, - }, - hexToAnsi: { - value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false, - }, - }); - - return styles; -} - -const ansiStyles = assembleStyles(); - -export default ansiStyles; diff --git a/node_modules/npm/node_modules/ansi-styles/license b/node_modules/npm/node_modules/ansi-styles/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/npm/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/ansi-styles/package.json b/node_modules/npm/node_modules/ansi-styles/package.json deleted file mode 100644 index 6cd3ca5..0000000 --- a/node_modules/npm/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "ansi-styles", - "version": "6.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "ava": "^3.15.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.19.0", - "xo": "^0.47.0" - } -} diff --git a/node_modules/npm/node_modules/aproba/LICENSE b/node_modules/npm/node_modules/aproba/LICENSE deleted file mode 100644 index f4be44d..0000000 --- a/node_modules/npm/node_modules/aproba/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/npm/node_modules/aproba/index.js b/node_modules/npm/node_modules/aproba/index.js deleted file mode 100644 index fd94748..0000000 --- a/node_modules/npm/node_modules/aproba/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -module.exports = validate - -function isArguments (thingy) { - return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') -} - -const types = { - '*': {label: 'any', check: () => true}, - A: {label: 'array', check: _ => Array.isArray(_) || isArguments(_)}, - S: {label: 'string', check: _ => typeof _ === 'string'}, - N: {label: 'number', check: _ => typeof _ === 'number'}, - F: {label: 'function', check: _ => typeof _ === 'function'}, - O: {label: 'object', check: _ => typeof _ === 'object' && _ != null && !types.A.check(_) && !types.E.check(_)}, - B: {label: 'boolean', check: _ => typeof _ === 'boolean'}, - E: {label: 'error', check: _ => _ instanceof Error}, - Z: {label: 'null', check: _ => _ == null} -} - -function addSchema (schema, arity) { - const group = arity[schema.length] = arity[schema.length] || [] - if (group.indexOf(schema) === -1) group.push(schema) -} - -function validate (rawSchemas, args) { - if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) - if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') - if (!args) throw missingRequiredArg(1, 'args') - if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) - if (!types.A.check(args)) throw invalidType(1, ['array'], args) - const schemas = rawSchemas.split('|') - const arity = {} - - schemas.forEach(schema => { - for (let ii = 0; ii < schema.length; ++ii) { - const type = schema[ii] - if (!types[type]) throw unknownType(ii, type) - } - if (/E.*E/.test(schema)) throw moreThanOneError(schema) - addSchema(schema, arity) - if (/E/.test(schema)) { - addSchema(schema.replace(/E.*$/, 'E'), arity) - addSchema(schema.replace(/E/, 'Z'), arity) - if (schema.length === 1) addSchema('', arity) - } - }) - let matching = arity[args.length] - if (!matching) { - throw wrongNumberOfArgs(Object.keys(arity), args.length) - } - for (let ii = 0; ii < args.length; ++ii) { - let newMatching = matching.filter(schema => { - const type = schema[ii] - const typeCheck = types[type].check - return typeCheck(args[ii]) - }) - if (!newMatching.length) { - const labels = matching.map(_ => types[_[ii]].label).filter(_ => _ != null) - throw invalidType(ii, labels, args[ii]) - } - matching = newMatching - } -} - -function missingRequiredArg (num) { - return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) -} - -function unknownType (num, type) { - return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) -} - -function invalidType (num, expectedTypes, value) { - let valueType - Object.keys(types).forEach(typeCode => { - if (types[typeCode].check(value)) valueType = types[typeCode].label - }) - return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + - englishList(expectedTypes) + ' but got ' + valueType) -} - -function englishList (list) { - return list.join(', ').replace(/, ([^,]+)$/, ' or $1') -} - -function wrongNumberOfArgs (expected, got) { - const english = englishList(expected) - const args = expected.every(ex => ex.length === 1) - ? 'argument' - : 'arguments' - return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) -} - -function moreThanOneError (schema) { - return newException('ETOOMANYERRORTYPES', - 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') -} - -function newException (code, msg) { - const err = new Error(msg) - err.code = code - /* istanbul ignore else */ - if (Error.captureStackTrace) Error.captureStackTrace(err, validate) - return err -} diff --git a/node_modules/npm/node_modules/aproba/package.json b/node_modules/npm/node_modules/aproba/package.json deleted file mode 100644 index d2212d3..0000000 --- a/node_modules/npm/node_modules/aproba/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "aproba", - "version": "2.0.0", - "description": "A ridiculously light-weight argument validator (now browser friendly)", - "main": "index.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "standard": "^11.0.1", - "tap": "^12.0.1" - }, - "files": [ - "index.js" - ], - "scripts": { - "pretest": "standard", - "test": "tap --100 -J test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/aproba" - }, - "keywords": [ - "argument", - "validate" - ], - "author": "Rebecca Turner ", - "license": "ISC", - "bugs": { - "url": "https://github.com/iarna/aproba/issues" - }, - "homepage": "https://github.com/iarna/aproba" -} diff --git a/node_modules/npm/node_modules/archy/LICENSE b/node_modules/npm/node_modules/archy/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/npm/node_modules/archy/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/archy/examples/beep.js b/node_modules/npm/node_modules/archy/examples/beep.js deleted file mode 100644 index 9c07047..0000000 --- a/node_modules/npm/node_modules/archy/examples/beep.js +++ /dev/null @@ -1,24 +0,0 @@ -var archy = require('../'); -var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party\ntime!' - ] - } - ] -}); -console.log(s); diff --git a/node_modules/npm/node_modules/archy/examples/multi_line.js b/node_modules/npm/node_modules/archy/examples/multi_line.js deleted file mode 100644 index 8afdfad..0000000 --- a/node_modules/npm/node_modules/archy/examples/multi_line.js +++ /dev/null @@ -1,25 +0,0 @@ -var archy = require('../'); - -var s = archy({ - label : 'beep\none\ntwo', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O\nwheee', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny\nmeat' ] - }, - 'creature' - ] - }, - 'party\ntime!' - ] - } - ] -}); -console.log(s); diff --git a/node_modules/npm/node_modules/archy/index.js b/node_modules/npm/node_modules/archy/index.js deleted file mode 100644 index 869d64e..0000000 --- a/node_modules/npm/node_modules/archy/index.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = function archy (obj, prefix, opts) { - if (prefix === undefined) prefix = ''; - if (!opts) opts = {}; - var chr = function (s) { - var chars = { - '│' : '|', - '└' : '`', - '├' : '+', - '─' : '-', - '┬' : '-' - }; - return opts.unicode === false ? chars[s] : s; - }; - - if (typeof obj === 'string') obj = { label : obj }; - - var nodes = obj.nodes || []; - var lines = (obj.label || '').split('\n'); - var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; - - return prefix - + lines.join(splitter) + '\n' - + nodes.map(function (node, ix) { - var last = ix === nodes.length - 1; - var more = node.nodes && node.nodes.length; - var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; - - return prefix - + (last ? chr('└') : chr('├')) + chr('─') - + (more ? chr('┬') : chr('─')) + ' ' - + archy(node, prefix_, opts).slice(prefix.length + 2) - ; - }).join('') - ; -}; diff --git a/node_modules/npm/node_modules/archy/package.json b/node_modules/npm/node_modules/archy/package.json deleted file mode 100644 index 0ce3149..0000000 --- a/node_modules/npm/node_modules/archy/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name" : "archy", - "version" : "1.0.0", - "description" : "render nested hierarchies `npm ls` style with unicode pipes", - "main" : "index.js", - "devDependencies" : { - "tap" : "~0.3.3", - "tape" : "~0.1.1" - }, - "scripts" : { - "test" : "tap test" - }, - "testling" : { - "files" : "test/*.js", - "browsers" : { - "iexplore" : [ "6.0", "7.0", "8.0", "9.0" ], - "chrome" : [ "20.0" ], - "firefox" : [ "10.0", "15.0" ], - "safari" : [ "5.1" ], - "opera" : [ "12.0" ] - } - }, - "repository" : { - "type" : "git", - "url" : "http://github.com/substack/node-archy.git" - }, - "keywords" : [ - "hierarchy", - "npm ls", - "unicode", - "pretty", - "print" - ], - "author" : { - "name" : "James Halliday", - "email" : "mail@substack.net", - "url" : "http://substack.net" - }, - "license" : "MIT" -} diff --git a/node_modules/npm/node_modules/archy/test/beep.js b/node_modules/npm/node_modules/archy/test/beep.js deleted file mode 100644 index 4ea74f9..0000000 --- a/node_modules/npm/node_modules/archy/test/beep.js +++ /dev/null @@ -1,40 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('beep', function (t) { - var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party!' - ] - } - ] - }); - t.equal(s, [ - 'beep', - '├── ity', - '└─┬ boop', - ' ├─┬ o_O', - ' │ ├─┬ oh', - ' │ │ ├── hello', - ' │ │ └── puny', - ' │ └── human', - ' └── party!', - '' - ].join('\n')); - t.end(); -}); diff --git a/node_modules/npm/node_modules/archy/test/multi_line.js b/node_modules/npm/node_modules/archy/test/multi_line.js deleted file mode 100644 index 2cf2154..0000000 --- a/node_modules/npm/node_modules/archy/test/multi_line.js +++ /dev/null @@ -1,45 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('multi-line', function (t) { - var s = archy({ - label : 'beep\none\ntwo', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O\nwheee', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny\nmeat' ] - }, - 'creature' - ] - }, - 'party\ntime!' - ] - } - ] - }); - t.equal(s, [ - 'beep', - '│ one', - '│ two', - '├── ity', - '└─┬ boop', - ' ├─┬ o_O', - ' │ │ wheee', - ' │ ├─┬ oh', - ' │ │ ├── hello', - ' │ │ └── puny', - ' │ │ meat', - ' │ └── creature', - ' └── party', - ' time!', - '' - ].join('\n')); - t.end(); -}); diff --git a/node_modules/npm/node_modules/archy/test/non_unicode.js b/node_modules/npm/node_modules/archy/test/non_unicode.js deleted file mode 100644 index 7204d33..0000000 --- a/node_modules/npm/node_modules/archy/test/non_unicode.js +++ /dev/null @@ -1,40 +0,0 @@ -var test = require('tape'); -var archy = require('../'); - -test('beep', function (t) { - var s = archy({ - label : 'beep', - nodes : [ - 'ity', - { - label : 'boop', - nodes : [ - { - label : 'o_O', - nodes : [ - { - label : 'oh', - nodes : [ 'hello', 'puny' ] - }, - 'human' - ] - }, - 'party!' - ] - } - ] - }, '', { unicode : false }); - t.equal(s, [ - 'beep', - '+-- ity', - '`-- boop', - ' +-- o_O', - ' | +-- oh', - ' | | +-- hello', - ' | | `-- puny', - ' | `-- human', - ' `-- party!', - '' - ].join('\n')); - t.end(); -}); diff --git a/node_modules/npm/node_modules/are-we-there-yet/LICENSE.md b/node_modules/npm/node_modules/are-we-there-yet/LICENSE.md deleted file mode 100644 index 845be76..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/are-we-there-yet/lib/index.js b/node_modules/npm/node_modules/are-we-there-yet/lib/index.js deleted file mode 100644 index 57d8743..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/lib/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -exports.TrackerGroup = require('./tracker-group.js') -exports.Tracker = require('./tracker.js') -exports.TrackerStream = require('./tracker-stream.js') diff --git a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-base.js b/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-base.js deleted file mode 100644 index 1b5e0dc..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-base.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' -const EventEmitter = require('events') - -let trackerId = 0 -class TrackerBase extends EventEmitter { - constructor (name) { - super() - this.id = ++trackerId - this.name = name - } -} - -module.exports = TrackerBase diff --git a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-group.js b/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-group.js deleted file mode 100644 index 162c225..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-group.js +++ /dev/null @@ -1,112 +0,0 @@ -'use strict' -const TrackerBase = require('./tracker-base.js') -const Tracker = require('./tracker.js') -const TrackerStream = require('./tracker-stream.js') - -class TrackerGroup extends TrackerBase { - parentGroup = null - trackers = [] - completion = {} - weight = {} - totalWeight = 0 - finished = false - bubbleChange = bubbleChange(this) - - nameInTree () { - var names = [] - var from = this - while (from) { - names.unshift(from.name) - from = from.parentGroup - } - return names.join('/') - } - - addUnit (unit, weight) { - if (unit.addUnit) { - var toTest = this - while (toTest) { - if (unit === toTest) { - throw new Error( - 'Attempted to add tracker group ' + - unit.name + ' to tree that already includes it ' + - this.nameInTree(this)) - } - toTest = toTest.parentGroup - } - unit.parentGroup = this - } - this.weight[unit.id] = weight || 1 - this.totalWeight += this.weight[unit.id] - this.trackers.push(unit) - this.completion[unit.id] = unit.completed() - unit.on('change', this.bubbleChange) - if (!this.finished) { - this.emit('change', unit.name, this.completion[unit.id], unit) - } - return unit - } - - completed () { - if (this.trackers.length === 0) { - return 0 - } - var valPerWeight = 1 / this.totalWeight - var completed = 0 - for (var ii = 0; ii < this.trackers.length; ii++) { - var trackerId = this.trackers[ii].id - completed += - valPerWeight * this.weight[trackerId] * this.completion[trackerId] - } - return completed - } - - newGroup (name, weight) { - return this.addUnit(new TrackerGroup(name), weight) - } - - newItem (name, todo, weight) { - return this.addUnit(new Tracker(name, todo), weight) - } - - newStream (name, todo, weight) { - return this.addUnit(new TrackerStream(name, todo), weight) - } - - finish () { - this.finished = true - if (!this.trackers.length) { - this.addUnit(new Tracker(), 1, true) - } - for (var ii = 0; ii < this.trackers.length; ii++) { - var tracker = this.trackers[ii] - tracker.finish() - tracker.removeListener('change', this.bubbleChange) - } - this.emit('change', this.name, 1, this) - } - - debug (depth = 0) { - const indent = ' '.repeat(depth) - let output = `${indent}${this.name || 'top'}: ${this.completed()}\n` - - this.trackers.forEach(function (tracker) { - output += tracker instanceof TrackerGroup - ? tracker.debug(depth + 1) - : `${indent} ${tracker.name}: ${tracker.completed()}\n` - }) - return output - } -} - -function bubbleChange (trackerGroup) { - return function (name, completed, tracker) { - trackerGroup.completion[tracker.id] = completed - if (trackerGroup.finished) { - return - } - trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) - } -} - -module.exports = TrackerGroup diff --git a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-stream.js b/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-stream.js deleted file mode 100644 index 4b111b6..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker-stream.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' -const stream = require('readable-stream') -const delegate = require('delegates') -const Tracker = require('./tracker.js') - -class TrackerStream extends stream.Transform { - constructor (name, size, options) { - super(options) - this.tracker = new Tracker(name, size) - this.name = name - this.id = this.tracker.id - this.tracker.on('change', delegateChange(this)) - } - - _transform (data, encoding, cb) { - this.tracker.completeWork(data.length ? data.length : 1) - this.push(data) - cb() - } - - _flush (cb) { - this.tracker.finish() - cb() - } -} - -function delegateChange (trackerStream) { - return function (name, completion, tracker) { - trackerStream.emit('change', name, completion, trackerStream) - } -} - -delegate(TrackerStream.prototype, 'tracker') - .method('completed') - .method('addWork') - .method('finish') - -module.exports = TrackerStream diff --git a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker.js b/node_modules/npm/node_modules/are-we-there-yet/lib/tracker.js deleted file mode 100644 index 02e879c..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/lib/tracker.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict' -const TrackerBase = require('./tracker-base.js') - -class Tracker extends TrackerBase { - constructor (name, todo) { - super(name) - this.workDone = 0 - this.workTodo = todo || 0 - } - - completed () { - return this.workTodo === 0 ? 0 : this.workDone / this.workTodo - } - - addWork (work) { - this.workTodo += work - this.emit('change', this.name, this.completed(), this) - } - - completeWork (work) { - this.workDone += work - if (this.workDone > this.workTodo) { - this.workDone = this.workTodo - } - this.emit('change', this.name, this.completed(), this) - } - - finish () { - this.workTodo = this.workDone = 1 - this.emit('change', this.name, 1, this) - } -} - -module.exports = Tracker diff --git a/node_modules/npm/node_modules/are-we-there-yet/package.json b/node_modules/npm/node_modules/are-we-there-yet/package.json deleted file mode 100644 index e238c65..0000000 --- a/node_modules/npm/node_modules/are-we-there-yet/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "are-we-there-yet", - "version": "4.0.1", - "description": "Keep track of the overall completion of many disparate processes", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "postsnap": "npm run lintfix --", - "snap": "tap", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/are-we-there-yet.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/are-we-there-yet/issues" - }, - "homepage": "https://github.com/npm/are-we-there-yet", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.17.0", - "tap": "^16.0.1" - }, - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^4.1.0" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "tap": { - "branches": 68, - "statements": 92, - "functions": 86, - "lines": 92, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.17.0", - "publish": true - } -} diff --git a/node_modules/npm/node_modules/balanced-match/LICENSE.md b/node_modules/npm/node_modules/balanced-match/LICENSE.md deleted file mode 100644 index 2cdc8e4..0000000 --- a/node_modules/npm/node_modules/balanced-match/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/balanced-match/index.js b/node_modules/npm/node_modules/balanced-match/index.js deleted file mode 100644 index c67a646..0000000 --- a/node_modules/npm/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'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) { - if(a===b) { - return [ai, bi]; - } - 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; -} diff --git a/node_modules/npm/node_modules/balanced-match/package.json b/node_modules/npm/node_modules/balanced-match/package.json deleted file mode 100644 index ce6073e..0000000 --- a/node_modules/npm/node_modules/balanced-match/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/node_modules/npm/node_modules/base64-js/LICENSE b/node_modules/npm/node_modules/base64-js/LICENSE deleted file mode 100644 index 6d52b8a..0000000 --- a/node_modules/npm/node_modules/base64-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/base64-js/base64js.min.js b/node_modules/npm/node_modules/base64-js/base64js.min.js deleted file mode 100644 index 908ac83..0000000 --- a/node_modules/npm/node_modules/base64-js/base64js.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;fj?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} diff --git a/node_modules/npm/node_modules/base64-js/package.json b/node_modules/npm/node_modules/base64-js/package.json deleted file mode 100644 index c3972e3..0000000 --- a/node_modules/npm/node_modules/base64-js/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "base64-js", - "description": "Base64 encoding/decoding in pure JS", - "version": "1.5.1", - "author": "T. Jameson Little ", - "typings": "index.d.ts", - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "devDependencies": { - "babel-minify": "^0.5.1", - "benchmark": "^2.1.4", - "browserify": "^16.3.0", - "standard": "*", - "tape": "4.x" - }, - "homepage": "https://github.com/beatgammit/base64-js", - "keywords": [ - "base64" - ], - "license": "MIT", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "build": "browserify -s base64js -r ./ | minify > base64js.min.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/npm/node_modules/bin-links/LICENSE b/node_modules/npm/node_modules/bin-links/LICENSE deleted file mode 100644 index 19cec97..0000000 --- a/node_modules/npm/node_modules/bin-links/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/bin-links/lib/bin-target.js b/node_modules/npm/node_modules/bin-links/lib/bin-target.js deleted file mode 100644 index 0629285..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/bin-target.js +++ /dev/null @@ -1,9 +0,0 @@ -const isWindows = require('./is-windows.js') -const getPrefix = require('./get-prefix.js') -const getNodeModules = require('./get-node-modules.js') -const { dirname } = require('path') - -module.exports = ({ top, path }) => - !top ? getNodeModules(path) + '/.bin' - : isWindows ? getPrefix(path) - : dirname(getPrefix(path)) + '/bin' diff --git a/node_modules/npm/node_modules/bin-links/lib/check-bin.js b/node_modules/npm/node_modules/bin-links/lib/check-bin.js deleted file mode 100644 index c5b997b..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/check-bin.js +++ /dev/null @@ -1,74 +0,0 @@ -// check to see if a bin is allowed to be overwritten -// either rejects or resolves to nothing. return value not relevant. -const isWindows = require('./is-windows.js') -const binTarget = require('./bin-target.js') -const { resolve, dirname } = require('path') -const readCmdShim = require('read-cmd-shim') -const { readlink } = require('fs/promises') - -const checkBin = async ({ bin, path, top, global, force }) => { - // always ok to clobber when forced - // always ok to clobber local bins, or when forced - if (force || !global || !top) { - return - } - - // ok, need to make sure, then - const target = resolve(binTarget({ path, top }), bin) - path = resolve(path) - return isWindows ? checkShim({ target, path }) : checkLink({ target, path }) -} - -// only enoent is allowed. anything else is a problem. -const handleReadLinkError = async ({ er, target }) => - er.code === 'ENOENT' ? null - : failEEXIST({ target }) - -const checkLink = async ({ target, path }) => { - const current = await readlink(target) - .catch(er => handleReadLinkError({ er, target })) - - if (!current) { - return - } - - const resolved = resolve(dirname(target), current) - - if (resolved.toLowerCase().indexOf(path.toLowerCase()) !== 0) { - return failEEXIST({ target }) - } -} - -const handleReadCmdShimError = ({ er, target }) => - er.code === 'ENOENT' ? null - : failEEXIST({ target }) - -const failEEXIST = ({ target }) => - Promise.reject(Object.assign(new Error('EEXIST: file already exists'), { - path: target, - code: 'EEXIST', - })) - -const checkShim = async ({ target, path }) => { - const shims = [ - target, - target + '.cmd', - target + '.ps1', - ] - await Promise.all(shims.map(async shim => { - const current = await readCmdShim(shim) - .catch(er => handleReadCmdShimError({ er, target: shim })) - - if (!current) { - return - } - - const resolved = resolve(dirname(shim), current.replace(/\\/g, '/')) - - if (resolved.toLowerCase().indexOf(path.toLowerCase()) !== 0) { - return failEEXIST({ target: shim }) - } - })) -} - -module.exports = checkBin diff --git a/node_modules/npm/node_modules/bin-links/lib/check-bins.js b/node_modules/npm/node_modules/bin-links/lib/check-bins.js deleted file mode 100644 index 76a683c..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/check-bins.js +++ /dev/null @@ -1,18 +0,0 @@ -const checkBin = require('./check-bin.js') -const normalize = require('npm-normalize-package-bin') -const checkBins = async ({ pkg, path, top, global, force }) => { - // always ok to clobber when forced - // always ok to clobber local bins, or when forced - if (force || !global || !top) { - return - } - - pkg = normalize(pkg) - if (!pkg.bin) { - return - } - - await Promise.all(Object.keys(pkg.bin) - .map(bin => checkBin({ bin, path, top, global, force }))) -} -module.exports = checkBins diff --git a/node_modules/npm/node_modules/bin-links/lib/fix-bin.js b/node_modules/npm/node_modules/bin-links/lib/fix-bin.js deleted file mode 100644 index 453bd4f..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/fix-bin.js +++ /dev/null @@ -1,42 +0,0 @@ -// make sure that bins are executable, and that they don't have -// windows line-endings on the hashbang line. -const { - chmod, - open, - readFile, -} = require('fs/promises') - -const execMode = 0o777 & (~process.umask()) - -const writeFileAtomic = require('write-file-atomic') - -const isWindowsHashBang = buf => - buf[0] === '#'.charCodeAt(0) && - buf[1] === '!'.charCodeAt(0) && - /^#![^\n]+\r\n/.test(buf.toString()) - -const isWindowsHashbangFile = file => { - const FALSE = () => false - return open(file, 'r').then(fh => { - const buf = Buffer.alloc(2048) - return fh.read(buf, 0, 2048, 0) - .then( - () => { - const isWHB = isWindowsHashBang(buf) - return fh.close().then(() => isWHB, () => isWHB) - }, - // don't leak FD if read() fails - () => fh.close().then(FALSE, FALSE) - ) - }, FALSE) -} - -const dos2Unix = file => - readFile(file, 'utf8').then(content => - writeFileAtomic(file, content.replace(/^(#![^\n]+)\r\n/, '$1\n'))) - -const fixBin = (file, mode = execMode) => chmod(file, mode) - .then(() => isWindowsHashbangFile(file)) - .then(isWHB => isWHB ? dos2Unix(file) : null) - -module.exports = fixBin diff --git a/node_modules/npm/node_modules/bin-links/lib/get-node-modules.js b/node_modules/npm/node_modules/bin-links/lib/get-node-modules.js deleted file mode 100644 index 5c16b3b..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/get-node-modules.js +++ /dev/null @@ -1,19 +0,0 @@ -// we know it's global and/or not top, so the path has to be -// {prefix}/node_modules/{name}. Can't rely on pkg.name, because -// it might be installed as an alias. - -const { dirname, basename } = require('path') -// this gets called a lot and can't change, so memoize it -const memo = new Map() -module.exports = path => { - if (memo.has(path)) { - return memo.get(path) - } - - const scopeOrNm = dirname(path) - const nm = basename(scopeOrNm) === 'node_modules' ? scopeOrNm - : dirname(scopeOrNm) - - memo.set(path, nm) - return nm -} diff --git a/node_modules/npm/node_modules/bin-links/lib/get-paths.js b/node_modules/npm/node_modules/bin-links/lib/get-paths.js deleted file mode 100644 index b93e698..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/get-paths.js +++ /dev/null @@ -1,42 +0,0 @@ -// get all the paths that are (or might be) installed for a given pkg -// There's no guarantee that all of these will be installed, but if they -// are present, then we can assume that they're associated. -const binTarget = require('./bin-target.js') -const manTarget = require('./man-target.js') -const { resolve, basename, extname } = require('path') -const isWindows = require('./is-windows.js') -module.exports = ({ path, pkg, global, top }) => { - if (top && !global) { - return [] - } - - const binSet = [] - const binTarg = binTarget({ path, top }) - if (pkg.bin) { - for (const bin of Object.keys(pkg.bin)) { - const b = resolve(binTarg, bin) - binSet.push(b) - if (isWindows) { - binSet.push(b + '.cmd') - binSet.push(b + '.ps1') - } - } - } - - const manTarg = manTarget({ path, top }) - const manSet = [] - if (manTarg && pkg.man && Array.isArray(pkg.man) && pkg.man.length) { - for (const man of pkg.man) { - if (!/.\.[0-9]+(\.gz)?$/.test(man)) { - return binSet - } - - const section = extname(basename(man, '.gz')).slice(1) - const base = basename(man) - - manSet.push(resolve(manTarg, 'man' + section, base)) - } - } - - return manSet.length ? [...binSet, ...manSet] : binSet -} diff --git a/node_modules/npm/node_modules/bin-links/lib/get-prefix.js b/node_modules/npm/node_modules/bin-links/lib/get-prefix.js deleted file mode 100644 index d5cf9c9..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/get-prefix.js +++ /dev/null @@ -1,3 +0,0 @@ -const { dirname } = require('path') -const getNodeModules = require('./get-node-modules.js') -module.exports = path => dirname(getNodeModules(path)) diff --git a/node_modules/npm/node_modules/bin-links/lib/index.js b/node_modules/npm/node_modules/bin-links/lib/index.js deleted file mode 100644 index ab3bd13..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/index.js +++ /dev/null @@ -1,44 +0,0 @@ -const linkBins = require('./link-bins.js') -const linkMans = require('./link-mans.js') - -const binLinks = opts => { - const { path, pkg, force, global, top } = opts - // global top pkgs on windows get bins installed in {prefix}, and no mans - // - // unix global top pkgs get their bins installed in {prefix}/bin, - // and mans in {prefix}/share/man - // - // non-top pkgs get their bins installed in {prefix}/node_modules/.bin, - // and do not install mans - // - // non-global top pkgs don't have any bins or mans linked. From here on - // out, if it's top, we know that it's global, so no need to pass that - // option further down the stack. - if (top && !global) { - return Promise.resolve() - } - - return Promise.all([ - // allow clobbering within the local node_modules/.bin folder. - // only global bins are protected in this way, or else it is - // yet another vector for excessive dependency conflicts. - linkBins({ path, pkg, top, force: force || !top }), - linkMans({ path, pkg, top, force }), - ]) -} - -const shimBin = require('./shim-bin.js') -const linkGently = require('./link-gently.js') -const resetSeen = () => { - shimBin.resetSeen() - linkGently.resetSeen() -} - -const checkBins = require('./check-bins.js') -const getPaths = require('./get-paths.js') - -module.exports = Object.assign(binLinks, { - checkBins, - resetSeen, - getPaths, -}) diff --git a/node_modules/npm/node_modules/bin-links/lib/is-windows.js b/node_modules/npm/node_modules/bin-links/lib/is-windows.js deleted file mode 100644 index da3b2fb..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/is-windows.js +++ /dev/null @@ -1,2 +0,0 @@ -const platform = process.env.__TESTING_BIN_LINKS_PLATFORM__ || process.platform -module.exports = platform === 'win32' diff --git a/node_modules/npm/node_modules/bin-links/lib/link-bin.js b/node_modules/npm/node_modules/bin-links/lib/link-bin.js deleted file mode 100644 index fb57935..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/link-bin.js +++ /dev/null @@ -1,9 +0,0 @@ -const linkGently = require('./link-gently.js') -const fixBin = require('./fix-bin.js') - -// linking bins is simple. just symlink, and if we linked it, fix the bin up -const linkBin = ({ path, to, from, absFrom, force }) => - linkGently({ path, to, from, absFrom, force }) - .then(linked => linked && fixBin(absFrom)) - -module.exports = linkBin diff --git a/node_modules/npm/node_modules/bin-links/lib/link-bins.js b/node_modules/npm/node_modules/bin-links/lib/link-bins.js deleted file mode 100644 index 9bf7d72..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/link-bins.js +++ /dev/null @@ -1,23 +0,0 @@ -const isWindows = require('./is-windows.js') -const binTarget = require('./bin-target.js') -const { dirname, resolve, relative } = require('path') -const linkBin = isWindows ? require('./shim-bin.js') : require('./link-bin.js') -const normalize = require('npm-normalize-package-bin') - -const linkBins = ({ path, pkg, top, force }) => { - pkg = normalize(pkg) - if (!pkg.bin) { - return Promise.resolve([]) - } - const promises = [] - const target = binTarget({ path, top }) - for (const [key, val] of Object.entries(pkg.bin)) { - const to = resolve(target, key) - const absFrom = resolve(path, val) - const from = relative(dirname(to), absFrom) - promises.push(linkBin({ path, from, to, absFrom, force })) - } - return Promise.all(promises) -} - -module.exports = linkBins diff --git a/node_modules/npm/node_modules/bin-links/lib/link-gently.js b/node_modules/npm/node_modules/bin-links/lib/link-gently.js deleted file mode 100644 index d1e955e..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/link-gently.js +++ /dev/null @@ -1,90 +0,0 @@ -// if the thing isn't there, skip it -// if there's a non-symlink there already, eexist -// if there's a symlink already, pointing somewhere else, eexist -// if there's a symlink already, pointing into our pkg, remove it first -// then create the symlink - -const { resolve, dirname } = require('path') -const { lstat, mkdir, readlink, rm, symlink } = require('fs/promises') -const throwNonEnoent = er => { - if (er.code !== 'ENOENT') { - throw er - } -} - -const rmOpts = { - recursive: true, - force: true, -} - -// even in --force mode, we never create a link over a link we've -// already created. you can have multiple packages in a tree trying -// to contend for the same bin, or the same manpage listed multiple times, -// which creates a race condition and nondeterminism. -const seen = new Set() - -const SKIP = Symbol('skip - missing or already installed') -const CLOBBER = Symbol('clobber - ours or in forceful mode') - -const linkGently = async ({ path, to, from, absFrom, force }) => { - if (seen.has(to)) { - return false - } - seen.add(to) - - // if the script or manpage isn't there, just ignore it. - // this arguably *should* be an install error of some sort, - // or at least a warning, but npm has always behaved this - // way in the past, so it'd be a breaking change - return Promise.all([ - lstat(absFrom).catch(throwNonEnoent), - lstat(to).catch(throwNonEnoent), - ]).then(([stFrom, stTo]) => { - // not present in package, skip it - if (!stFrom) { - return SKIP - } - - // exists! maybe clobber if we can - if (stTo) { - if (!stTo.isSymbolicLink()) { - return force && rm(to, rmOpts).then(() => CLOBBER) - } - - return readlink(to).then(target => { - if (target === from) { - return SKIP - } // skip it, already set up like we want it. - - target = resolve(dirname(to), target) - if (target.indexOf(path) === 0 || force) { - return rm(to, rmOpts).then(() => CLOBBER) - } - // neither skip nor clobber - return false - }) - } else { - // doesn't exist, dir might not either - return mkdir(dirname(to), { recursive: true }) - } - }) - .then(skipOrClobber => { - if (skipOrClobber === SKIP) { - return false - } - return symlink(from, to, 'file').catch(er => { - if (skipOrClobber === CLOBBER || force) { - return rm(to, rmOpts).then(() => symlink(from, to, 'file')) - } - throw er - }).then(() => true) - }) -} - -const resetSeen = () => { - for (const p of seen) { - seen.delete(p) - } -} - -module.exports = Object.assign(linkGently, { resetSeen }) diff --git a/node_modules/npm/node_modules/bin-links/lib/link-mans.js b/node_modules/npm/node_modules/bin-links/lib/link-mans.js deleted file mode 100644 index b6dd214..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/link-mans.js +++ /dev/null @@ -1,53 +0,0 @@ -const { dirname, relative, join, resolve, basename } = require('path') -const linkGently = require('./link-gently.js') -const manTarget = require('./man-target.js') - -const linkMans = async ({ path, pkg, top, force }) => { - const target = manTarget({ path, top }) - if (!target || !Array.isArray(pkg?.man) || !pkg.man.length) { - return [] - } - - const links = [] - // `new Set` to filter out duplicates - for (let man of new Set(pkg.man)) { - if (!man || typeof man !== 'string') { - continue - } - // break any links to c:\\blah or /foo/blah or ../blah - man = join('/', man).replace(/\\|:/g, '/').slice(1) - const parseMan = man.match(/\.([0-9]+)(\.gz)?$/) - if (!parseMan) { - throw Object.assign(new Error('invalid man entry name\n' + - 'Man files must end with a number, ' + - 'and optionally a .gz suffix if they are compressed.' - ), { - code: 'EBADMAN', - path, - pkgid: pkg._id, - man, - }) - } - - const section = parseMan[1] - const base = basename(man) - const absFrom = resolve(path, man) - /* istanbul ignore if - that unpossible */ - if (absFrom.indexOf(path) !== 0) { - throw Object.assign(new Error('invalid man entry'), { - code: 'EBADMAN', - path, - pkgid: pkg._id, - man, - }) - } - - const to = resolve(target, 'man' + section, base) - const from = relative(dirname(to), absFrom) - - links.push(linkGently({ from, to, path, absFrom, force })) - } - return Promise.all(links) -} - -module.exports = linkMans diff --git a/node_modules/npm/node_modules/bin-links/lib/man-target.js b/node_modules/npm/node_modules/bin-links/lib/man-target.js deleted file mode 100644 index efe66f3..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/man-target.js +++ /dev/null @@ -1,6 +0,0 @@ -const isWindows = require('./is-windows.js') -const getPrefix = require('./get-prefix.js') -const { dirname } = require('path') - -module.exports = ({ top, path }) => !top || isWindows ? null - : dirname(getPrefix(path)) + '/share/man' diff --git a/node_modules/npm/node_modules/bin-links/lib/shim-bin.js b/node_modules/npm/node_modules/bin-links/lib/shim-bin.js deleted file mode 100644 index d5e19c0..0000000 --- a/node_modules/npm/node_modules/bin-links/lib/shim-bin.js +++ /dev/null @@ -1,86 +0,0 @@ -const { resolve, dirname } = require('path') -const { lstat } = require('fs/promises') -const throwNonEnoent = er => { - if (er.code !== 'ENOENT') { - throw er - } -} - -const cmdShim = require('cmd-shim') -const readCmdShim = require('read-cmd-shim') - -const fixBin = require('./fix-bin.js') - -// even in --force mode, we never create a shim over a shim we've -// already created. you can have multiple packages in a tree trying -// to contend for the same bin, which creates a race condition and -// nondeterminism. -const seen = new Set() - -const failEEXIST = ({ path, to, from }) => - Promise.reject(Object.assign(new Error('EEXIST: file already exists'), { - path: to, - dest: from, - code: 'EEXIST', - })) - -const handleReadCmdShimError = ({ er, from, to }) => - er.code === 'ENOENT' ? null - : er.code === 'ENOTASHIM' ? failEEXIST({ from, to }) - : Promise.reject(er) - -const SKIP = Symbol('skip - missing or already installed') -const shimBin = ({ path, to, from, absFrom, force }) => { - const shims = [ - to, - to + '.cmd', - to + '.ps1', - ] - - for (const shim of shims) { - if (seen.has(shim)) { - return true - } - seen.add(shim) - } - - return Promise.all([ - ...shims, - absFrom, - ].map(f => lstat(f).catch(throwNonEnoent))).then((stats) => { - const [, , , stFrom] = stats - if (!stFrom) { - return SKIP - } - - if (force) { - return false - } - - return Promise.all(shims.map((s, i) => [s, stats[i]]).map(([s, st]) => { - if (!st) { - return false - } - return readCmdShim(s) - .then(target => { - target = resolve(dirname(to), target) - if (target.indexOf(resolve(path)) !== 0) { - return failEEXIST({ from, to, path }) - } - return false - }, er => handleReadCmdShimError({ er, from, to })) - })) - }) - .then(skip => skip !== SKIP && doShim(absFrom, to)) -} - -const doShim = (absFrom, to) => - cmdShim(absFrom, to).then(() => fixBin(absFrom)) - -const resetSeen = () => { - for (const p of seen) { - seen.delete(p) - } -} - -module.exports = Object.assign(shimBin, { resetSeen }) diff --git a/node_modules/npm/node_modules/bin-links/package.json b/node_modules/npm/node_modules/bin-links/package.json deleted file mode 100644 index d5c11f7..0000000 --- a/node_modules/npm/node_modules/bin-links/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "bin-links", - "version": "4.0.3", - "description": "JavaScript package binary linker", - "main": "./lib/index.js", - "scripts": { - "snap": "tap", - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/bin-links.git" - }, - "keywords": [ - "npm", - "link", - "bins" - ], - "license": "ISC", - "dependencies": { - "cmd-shim": "^6.0.0", - "npm-normalize-package-bin": "^3.0.0", - "read-cmd-shim": "^4.0.0", - "write-file-atomic": "^5.0.0" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "require-inject": "^1.4.4", - "tap": "^16.0.1" - }, - "tap": { - "check-coverage": true, - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "windowsCI": false, - "version": "4.19.0", - "publish": true - } -} diff --git a/node_modules/npm/node_modules/binary-extensions/binary-extensions.json b/node_modules/npm/node_modules/binary-extensions/binary-extensions.json deleted file mode 100644 index 4aab383..0000000 --- a/node_modules/npm/node_modules/binary-extensions/binary-extensions.json +++ /dev/null @@ -1,260 +0,0 @@ -[ - "3dm", - "3ds", - "3g2", - "3gp", - "7z", - "a", - "aac", - "adp", - "ai", - "aif", - "aiff", - "alz", - "ape", - "apk", - "appimage", - "ar", - "arj", - "asf", - "au", - "avi", - "bak", - "baml", - "bh", - "bin", - "bk", - "bmp", - "btif", - "bz2", - "bzip2", - "cab", - "caf", - "cgm", - "class", - "cmx", - "cpio", - "cr2", - "cur", - "dat", - "dcm", - "deb", - "dex", - "djvu", - "dll", - "dmg", - "dng", - "doc", - "docm", - "docx", - "dot", - "dotm", - "dra", - "DS_Store", - "dsk", - "dts", - "dtshd", - "dvb", - "dwg", - "dxf", - "ecelp4800", - "ecelp7470", - "ecelp9600", - "egg", - "eol", - "eot", - "epub", - "exe", - "f4v", - "fbs", - "fh", - "fla", - "flac", - "flatpak", - "fli", - "flv", - "fpx", - "fst", - "fvt", - "g3", - "gh", - "gif", - "graffle", - "gz", - "gzip", - "h261", - "h263", - "h264", - "icns", - "ico", - "ief", - "img", - "ipa", - "iso", - "jar", - "jpeg", - "jpg", - "jpgv", - "jpm", - "jxr", - "key", - "ktx", - "lha", - "lib", - "lvp", - "lz", - "lzh", - "lzma", - "lzo", - "m3u", - "m4a", - "m4v", - "mar", - "mdi", - "mht", - "mid", - "midi", - "mj2", - "mka", - "mkv", - "mmr", - "mng", - "mobi", - "mov", - "movie", - "mp3", - "mp4", - "mp4a", - "mpeg", - "mpg", - "mpga", - "mxu", - "nef", - "npx", - "numbers", - "nupkg", - "o", - "odp", - "ods", - "odt", - "oga", - "ogg", - "ogv", - "otf", - "ott", - "pages", - "pbm", - "pcx", - "pdb", - "pdf", - "pea", - "pgm", - "pic", - "png", - "pnm", - "pot", - "potm", - "potx", - "ppa", - "ppam", - "ppm", - "pps", - "ppsm", - "ppsx", - "ppt", - "pptm", - "pptx", - "psd", - "pya", - "pyc", - "pyo", - "pyv", - "qt", - "rar", - "ras", - "raw", - "resources", - "rgb", - "rip", - "rlc", - "rmf", - "rmvb", - "rpm", - "rtf", - "rz", - "s3m", - "s7z", - "scpt", - "sgi", - "shar", - "snap", - "sil", - "sketch", - "slk", - "smv", - "snk", - "so", - "stl", - "suo", - "sub", - "swf", - "tar", - "tbz", - "tbz2", - "tga", - "tgz", - "thmx", - "tif", - "tiff", - "tlz", - "ttc", - "ttf", - "txz", - "udf", - "uvh", - "uvi", - "uvm", - "uvp", - "uvs", - "uvu", - "viv", - "vob", - "war", - "wav", - "wax", - "wbmp", - "wdp", - "weba", - "webm", - "webp", - "whl", - "wim", - "wm", - "wma", - "wmv", - "wmx", - "woff", - "woff2", - "wrm", - "wvx", - "xbm", - "xif", - "xla", - "xlam", - "xls", - "xlsb", - "xlsm", - "xlsx", - "xlt", - "xltm", - "xltx", - "xm", - "xmind", - "xpi", - "xpm", - "xwd", - "xz", - "z", - "zip", - "zipx" -] diff --git a/node_modules/npm/node_modules/binary-extensions/index.js b/node_modules/npm/node_modules/binary-extensions/index.js deleted file mode 100644 index d46e468..0000000 --- a/node_modules/npm/node_modules/binary-extensions/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./binary-extensions.json'); diff --git a/node_modules/npm/node_modules/binary-extensions/license b/node_modules/npm/node_modules/binary-extensions/license deleted file mode 100644 index 401b1c7..0000000 --- a/node_modules/npm/node_modules/binary-extensions/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/binary-extensions/package.json b/node_modules/npm/node_modules/binary-extensions/package.json deleted file mode 100644 index c4d3641..0000000 --- a/node_modules/npm/node_modules/binary-extensions/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "binary-extensions", - "version": "2.2.0", - "description": "List of binary file extensions", - "license": "MIT", - "repository": "sindresorhus/binary-extensions", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts", - "binary-extensions.json", - "binary-extensions.json.d.ts" - ], - "keywords": [ - "binary", - "extensions", - "extension", - "file", - "json", - "list", - "array" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/npm/node_modules/brace-expansion/LICENSE b/node_modules/npm/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de32266..0000000 --- a/node_modules/npm/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/brace-expansion/index.js b/node_modules/npm/node_modules/brace-expansion/index.js deleted file mode 100644 index 4af9dde..0000000 --- a/node_modules/npm/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,203 +0,0 @@ -var balanced = require('balanced-match'); - -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 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) return [str]; - - // 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) - : ['']; - - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length; k++) { - var expansion = pre+ '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } else { - 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) { - 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. - 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 = []; - - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], 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; -} - diff --git a/node_modules/npm/node_modules/brace-expansion/package.json b/node_modules/npm/node_modules/brace-expansion/package.json deleted file mode 100644 index 7097d41..0000000 --- a/node_modules/npm/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0" - }, - "devDependencies": { - "@c4312/matcha": "^1.3.1", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/node_modules/npm/node_modules/buffer/AUTHORS.md b/node_modules/npm/node_modules/buffer/AUTHORS.md deleted file mode 100644 index 468aa19..0000000 --- a/node_modules/npm/node_modules/buffer/AUTHORS.md +++ /dev/null @@ -1,73 +0,0 @@ -# Authors - -#### Ordered by first contribution. - -- Romain Beauxis (toots@rastageeks.org) -- Tobias Koppers (tobias.koppers@googlemail.com) -- Janus (ysangkok@gmail.com) -- Rainer Dreyer (rdrey1@gmail.com) -- Tõnis Tiigi (tonistiigi@gmail.com) -- James Halliday (mail@substack.net) -- Michael Williamson (mike@zwobble.org) -- elliottcable (github@elliottcable.name) -- rafael (rvalle@livelens.net) -- Andrew Kelley (superjoe30@gmail.com) -- Andreas Madsen (amwebdk@gmail.com) -- Mike Brevoort (mike.brevoort@pearson.com) -- Brian White (mscdex@mscdex.net) -- Feross Aboukhadijeh (feross@feross.org) -- Ruben Verborgh (ruben@verborgh.org) -- eliang (eliang.cs@gmail.com) -- Jesse Tane (jesse.tane@gmail.com) -- Alfonso Boza (alfonso@cloud.com) -- Mathias Buus (mathiasbuus@gmail.com) -- Devon Govett (devongovett@gmail.com) -- Daniel Cousens (github@dcousens.com) -- Joseph Dykstra (josephdykstra@gmail.com) -- Parsha Pourkhomami (parshap+git@gmail.com) -- Damjan Košir (damjan.kosir@gmail.com) -- daverayment (dave.rayment@gmail.com) -- kawanet (u-suke@kawa.net) -- Linus Unnebäck (linus@folkdatorn.se) -- Nolan Lawson (nolan.lawson@gmail.com) -- Calvin Metcalf (calvin.metcalf@gmail.com) -- Koki Takahashi (hakatasiloving@gmail.com) -- Guy Bedford (guybedford@gmail.com) -- Jan Schär (jscissr@gmail.com) -- RaulTsc (tomescu.raul@gmail.com) -- Matthieu Monsch (monsch@alum.mit.edu) -- Dan Ehrenberg (littledan@chromium.org) -- Kirill Fomichev (fanatid@ya.ru) -- Yusuke Kawasaki (u-suke@kawa.net) -- DC (dcposch@dcpos.ch) -- John-David Dalton (john.david.dalton@gmail.com) -- adventure-yunfei (adventure030@gmail.com) -- Emil Bay (github@tixz.dk) -- Sam Sudar (sudar.sam@gmail.com) -- Volker Mische (volker.mische@gmail.com) -- David Walton (support@geekstocks.com) -- Сковорода Никита Андреевич (chalkerx@gmail.com) -- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) -- ukstv (sergey.ukustov@machinomy.com) -- Renée Kooi (renee@kooi.me) -- ranbochen (ranbochen@qq.com) -- Vladimir Borovik (bobahbdb@gmail.com) -- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) -- kumavis (aaron@kumavis.me) -- Sergey Ukustov (sergey.ukustov@machinomy.com) -- Fei Liu (liu.feiwood@gmail.com) -- Blaine Bublitz (blaine.bublitz@gmail.com) -- clement (clement@seald.io) -- Koushik Dutta (koushd@gmail.com) -- Jordan Harband (ljharb@gmail.com) -- Niklas Mischkulnig (mischnic@users.noreply.github.com) -- Nikolai Vavilov (vvnicholas@gmail.com) -- Fedor Nezhivoi (gyzerok@users.noreply.github.com) -- shuse2 (shus.toda@gmail.com) -- Peter Newman (peternewman@users.noreply.github.com) -- mathmakgakpak (44949126+mathmakgakpak@users.noreply.github.com) -- jkkang (jkkang@smartauth.kr) -- Deklan Webster (deklanw@gmail.com) -- Martin Heidegger (martin.heidegger@gmail.com) - -#### Generated by bin/update-authors.sh. diff --git a/node_modules/npm/node_modules/buffer/LICENSE b/node_modules/npm/node_modules/buffer/LICENSE deleted file mode 100644 index d6bf75d..0000000 --- a/node_modules/npm/node_modules/buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/buffer/index.js b/node_modules/npm/node_modules/buffer/index.js deleted file mode 100644 index 7a0e9c2..0000000 --- a/node_modules/npm/node_modules/buffer/index.js +++ /dev/null @@ -1,2106 +0,0 @@ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -'use strict' - -const base64 = require('base64-js') -const ieee754 = require('ieee754') -const customInspectSymbol = - (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation - ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation - : null - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -const K_MAX_LENGTH = 0x7fffffff -exports.kMaxLength = K_MAX_LENGTH - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Print warning and recommend using `buffer` v4.x which has an Object - * implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * We report that the browser does not support typed arrays if the are not subclassable - * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` - * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support - * for __proto__ and has a buggy typed array implementation. - */ -Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() - -if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && - typeof console.error === 'function') { - console.error( - 'This browser lacks typed array (Uint8Array) support which is required by ' + - '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' - ) -} - -function typedArraySupport () { - // Can typed array instances can be augmented? - try { - const arr = new Uint8Array(1) - const proto = { foo: function () { return 42 } } - Object.setPrototypeOf(proto, Uint8Array.prototype) - Object.setPrototypeOf(arr, proto) - return arr.foo() === 42 - } catch (e) { - return false - } -} - -Object.defineProperty(Buffer.prototype, 'parent', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.buffer - } -}) - -Object.defineProperty(Buffer.prototype, 'offset', { - enumerable: true, - get: function () { - if (!Buffer.isBuffer(this)) return undefined - return this.byteOffset - } -}) - -function createBuffer (length) { - if (length > K_MAX_LENGTH) { - throw new RangeError('The value "' + length + '" is invalid for option "size"') - } - // Return an augmented `Uint8Array` instance - const buf = new Uint8Array(length) - Object.setPrototypeOf(buf, Buffer.prototype) - return buf -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new TypeError( - 'The "string" argument must be of type string. Received type number' - ) - } - return allocUnsafe(arg) - } - return from(arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -function from (value, encodingOrOffset, length) { - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - if (ArrayBuffer.isView(value)) { - return fromArrayView(value) - } - - if (value == null) { - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) - } - - if (isInstance(value, ArrayBuffer) || - (value && isInstance(value.buffer, ArrayBuffer))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof SharedArrayBuffer !== 'undefined' && - (isInstance(value, SharedArrayBuffer) || - (value && isInstance(value.buffer, SharedArrayBuffer)))) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'number') { - throw new TypeError( - 'The "value" argument must not be of type number. Received type number' - ) - } - - const valueOf = value.valueOf && value.valueOf() - if (valueOf != null && valueOf !== value) { - return Buffer.from(valueOf, encodingOrOffset, length) - } - - const b = fromObject(value) - if (b) return b - - if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && - typeof value[Symbol.toPrimitive] === 'function') { - return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length) - } - - throw new TypeError( - 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + - 'or Array-like Object. Received type ' + (typeof value) - ) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(value, encodingOrOffset, length) -} - -// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: -// https://github.com/feross/buffer/pull/148 -Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) -Object.setPrototypeOf(Buffer, Uint8Array) - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be of type number') - } else if (size < 0) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } -} - -function alloc (size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpreted as a start offset. - return typeof encoding === 'string' - ? createBuffer(size).fill(fill, encoding) - : createBuffer(size).fill(fill) - } - return createBuffer(size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(size, fill, encoding) -} - -function allocUnsafe (size) { - assertSize(size) - return createBuffer(size < 0 ? 0 : checked(size) | 0) -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(size) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - - const length = byteLength(string, encoding) | 0 - let buf = createBuffer(length) - - const actual = buf.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - buf = buf.slice(0, actual) - } - - return buf -} - -function fromArrayLike (array) { - const length = array.length < 0 ? 0 : checked(array.length) | 0 - const buf = createBuffer(length) - for (let i = 0; i < length; i += 1) { - buf[i] = array[i] & 255 - } - return buf -} - -function fromArrayView (arrayView) { - if (isInstance(arrayView, Uint8Array)) { - const copy = new Uint8Array(arrayView) - return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) - } - return fromArrayLike(arrayView) -} - -function fromArrayBuffer (array, byteOffset, length) { - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('"offset" is outside of buffer bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('"length" is outside of buffer bounds') - } - - let buf - if (byteOffset === undefined && length === undefined) { - buf = new Uint8Array(array) - } else if (length === undefined) { - buf = new Uint8Array(array, byteOffset) - } else { - buf = new Uint8Array(array, byteOffset, length) - } - - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(buf, Buffer.prototype) - - return buf -} - -function fromObject (obj) { - if (Buffer.isBuffer(obj)) { - const len = checked(obj.length) | 0 - const buf = createBuffer(len) - - if (buf.length === 0) { - return buf - } - - obj.copy(buf, 0, 0, len) - return buf - } - - if (obj.length !== undefined) { - if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { - return createBuffer(0) - } - return fromArrayLike(obj) - } - - if (obj.type === 'Buffer' && Array.isArray(obj.data)) { - return fromArrayLike(obj.data) - } -} - -function checked (length) { - // Note: cannot use `length < K_MAX_LENGTH` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= K_MAX_LENGTH) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return b != null && b._isBuffer === true && - b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false -} - -Buffer.compare = function compare (a, b) { - if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) - if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError( - 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' - ) - } - - if (a === b) return 0 - - let x = a.length - let y = b.length - - for (let i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!Array.isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - let i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - const buffer = Buffer.allocUnsafe(length) - let pos = 0 - for (i = 0; i < list.length; ++i) { - let buf = list[i] - if (isInstance(buf, Uint8Array)) { - if (pos + buf.length > buffer.length) { - if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf) - buf.copy(buffer, pos) - } else { - Uint8Array.prototype.set.call( - buffer, - buf, - pos - ) - } - } else if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } else { - buf.copy(buffer, pos) - } - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - throw new TypeError( - 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + - 'Received type ' + typeof string - ) - } - - const len = string.length - const mustMatch = (arguments.length > 2 && arguments[2] === true) - if (!mustMatch && len === 0) return 0 - - // Use a for loop to avoid recursion - let loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) { - return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 - } - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - let loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coercion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) -// to detect a Buffer instance. It's not possible to use `instanceof Buffer` -// reliably in a browserify context because there could be multiple different -// copies of the 'buffer' package in use. This method works even for Buffer -// instances that were created from another copy of the `buffer` package. -// See: https://github.com/feross/buffer/issues/154 -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - const i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - const len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (let i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - const len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (let i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - const len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (let i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - const length = this.length - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.toLocaleString = Buffer.prototype.toString - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - let str = '' - const max = exports.INSPECT_MAX_BYTES - str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() - if (this.length > max) str += ' ... ' - return '' -} -if (customInspectSymbol) { - Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (isInstance(target, Uint8Array)) { - target = Buffer.from(target, target.offset, target.byteLength) - } - if (!Buffer.isBuffer(target)) { - throw new TypeError( - 'The "target" argument must be one of type Buffer or Uint8Array. ' + - 'Received type ' + (typeof target) - ) - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - let x = thisEnd - thisStart - let y = end - start - const len = Math.min(x, y) - - const thisCopy = this.slice(thisStart, thisEnd) - const targetCopy = target.slice(start, end) - - for (let i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (numberIsNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - let indexSize = 1 - let arrLength = arr.length - let valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - let i - if (dir) { - let foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - let found = true - for (let j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - const remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - const strLen = string.length - - if (length > strLen / 2) { - length = strLen / 2 - } - let i - for (i = 0; i < length; ++i) { - const parsed = parseInt(string.substr(i * 2, 2), 16) - if (numberIsNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset >>> 0 - if (isFinite(length)) { - length = length >>> 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - const remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - let loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - case 'latin1': - case 'binary': - return asciiWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - const res = [] - - let i = start - while (i < end) { - const firstByte = buf[i] - let codePoint = null - let bytesPerSequence = (firstByte > 0xEF) - ? 4 - : (firstByte > 0xDF) - ? 3 - : (firstByte > 0xBF) - ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - let secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -const MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - const len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - let res = '' - let i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - let ret = '' - end = Math.min(buf.length, end) - - for (let i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - let ret = '' - end = Math.min(buf.length, end) - - for (let i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - const len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - let out = '' - for (let i = start; i < end; ++i) { - out += hexSliceLookupTable[buf[i]] - } - return out -} - -function utf16leSlice (buf, start, end) { - const bytes = buf.slice(start, end) - let res = '' - // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) - for (let i = 0; i < bytes.length - 1; i += 2) { - res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - const len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - const newBuf = this.subarray(start, end) - // Return an augmented `Uint8Array` instance - Object.setPrototypeOf(newBuf, Buffer.prototype) - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUintLE = -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - let val = this[offset] - let mul = 1 - let i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUintBE = -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - let val = this[offset + --byteLength] - let mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUint8 = -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUint16LE = -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUint16BE = -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUint32LE = -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUint32BE = -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) { - offset = offset >>> 0 - validateNumber(offset, 'offset') - const first = this[offset] - const last = this[offset + 7] - if (first === undefined || last === undefined) { - boundsError(offset, this.length - 8) - } - - const lo = first + - this[++offset] * 2 ** 8 + - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 24 - - const hi = this[++offset] + - this[++offset] * 2 ** 8 + - this[++offset] * 2 ** 16 + - last * 2 ** 24 - - return BigInt(lo) + (BigInt(hi) << BigInt(32)) -}) - -Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) { - offset = offset >>> 0 - validateNumber(offset, 'offset') - const first = this[offset] - const last = this[offset + 7] - if (first === undefined || last === undefined) { - boundsError(offset, this.length - 8) - } - - const hi = first * 2 ** 24 + - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 8 + - this[++offset] - - const lo = this[++offset] * 2 ** 24 + - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 8 + - last - - return (BigInt(hi) << BigInt(32)) + BigInt(lo) -}) - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - let val = this[offset] - let mul = 1 - let i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - let i = byteLength - let mul = 1 - let val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - const val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 2, this.length) - const val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) { - offset = offset >>> 0 - validateNumber(offset, 'offset') - const first = this[offset] - const last = this[offset + 7] - if (first === undefined || last === undefined) { - boundsError(offset, this.length - 8) - } - - const val = this[offset + 4] + - this[offset + 5] * 2 ** 8 + - this[offset + 6] * 2 ** 16 + - (last << 24) // Overflow - - return (BigInt(val) << BigInt(32)) + - BigInt(first + - this[++offset] * 2 ** 8 + - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 24) -}) - -Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) { - offset = offset >>> 0 - validateNumber(offset, 'offset') - const first = this[offset] - const last = this[offset + 7] - if (first === undefined || last === undefined) { - boundsError(offset, this.length - 8) - } - - const val = (first << 24) + // Overflow - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 8 + - this[++offset] - - return (BigInt(val) << BigInt(32)) + - BigInt(this[++offset] * 2 ** 24 + - this[++offset] * 2 ** 16 + - this[++offset] * 2 ** 8 + - last) -}) - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - offset = offset >>> 0 - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUintLE = -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - const maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - let mul = 1 - let i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUintBE = -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - byteLength = byteLength >>> 0 - if (!noAssert) { - const maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - let i = byteLength - 1 - let mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUint8 = -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeUint16LE = -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeUint16BE = -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeUint32LE = -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeUint32BE = -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -function wrtBigUInt64LE (buf, value, offset, min, max) { - checkIntBI(value, min, max, buf, offset, 7) - - let lo = Number(value & BigInt(0xffffffff)) - buf[offset++] = lo - lo = lo >> 8 - buf[offset++] = lo - lo = lo >> 8 - buf[offset++] = lo - lo = lo >> 8 - buf[offset++] = lo - let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) - buf[offset++] = hi - hi = hi >> 8 - buf[offset++] = hi - hi = hi >> 8 - buf[offset++] = hi - hi = hi >> 8 - buf[offset++] = hi - return offset -} - -function wrtBigUInt64BE (buf, value, offset, min, max) { - checkIntBI(value, min, max, buf, offset, 7) - - let lo = Number(value & BigInt(0xffffffff)) - buf[offset + 7] = lo - lo = lo >> 8 - buf[offset + 6] = lo - lo = lo >> 8 - buf[offset + 5] = lo - lo = lo >> 8 - buf[offset + 4] = lo - let hi = Number(value >> BigInt(32) & BigInt(0xffffffff)) - buf[offset + 3] = hi - hi = hi >> 8 - buf[offset + 2] = hi - hi = hi >> 8 - buf[offset + 1] = hi - hi = hi >> 8 - buf[offset] = hi - return offset + 8 -} - -Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) { - return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) -}) - -Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) { - return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')) -}) - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - const limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - let i = 0 - let mul = 1 - let sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - const limit = Math.pow(2, (8 * byteLength) - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - let i = byteLength - 1 - let mul = 1 - let sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - return offset + 4 -} - -Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) { - return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) -}) - -Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) { - return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')) -}) - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - value = +value - offset = offset >>> 0 - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('Index out of range') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - const len = end - start - - if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { - // Use built-in when available, missing from IE11 - this.copyWithin(targetStart, start, end) - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, end), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - if (val.length === 1) { - const code = val.charCodeAt(0) - if ((encoding === 'utf8' && code < 128) || - encoding === 'latin1') { - // Fast path: If `val` fits into a single byte, use that numeric value. - val = code - } - } - } else if (typeof val === 'number') { - val = val & 255 - } else if (typeof val === 'boolean') { - val = Number(val) - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - let i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - const bytes = Buffer.isBuffer(val) - ? val - : Buffer.from(val, encoding) - const len = bytes.length - if (len === 0) { - throw new TypeError('The value "' + val + - '" is invalid for argument "value"') - } - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// CUSTOM ERRORS -// ============= - -// Simplified versions from Node, changed for Buffer-only usage -const errors = {} -function E (sym, getMessage, Base) { - errors[sym] = class NodeError extends Base { - constructor () { - super() - - Object.defineProperty(this, 'message', { - value: getMessage.apply(this, arguments), - writable: true, - configurable: true - }) - - // Add the error code to the name to include it in the stack trace. - this.name = `${this.name} [${sym}]` - // Access the stack to generate the error message including the error code - // from the name. - this.stack // eslint-disable-line no-unused-expressions - // Reset the name to the actual name. - delete this.name - } - - get code () { - return sym - } - - set code (value) { - Object.defineProperty(this, 'code', { - configurable: true, - enumerable: true, - value, - writable: true - }) - } - - toString () { - return `${this.name} [${sym}]: ${this.message}` - } - } -} - -E('ERR_BUFFER_OUT_OF_BOUNDS', - function (name) { - if (name) { - return `${name} is outside of buffer bounds` - } - - return 'Attempt to access memory outside buffer bounds' - }, RangeError) -E('ERR_INVALID_ARG_TYPE', - function (name, actual) { - return `The "${name}" argument must be of type number. Received type ${typeof actual}` - }, TypeError) -E('ERR_OUT_OF_RANGE', - function (str, range, input) { - let msg = `The value of "${str}" is out of range.` - let received = input - if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) { - received = addNumericalSeparator(String(input)) - } else if (typeof input === 'bigint') { - received = String(input) - if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) { - received = addNumericalSeparator(received) - } - received += 'n' - } - msg += ` It must be ${range}. Received ${received}` - return msg - }, RangeError) - -function addNumericalSeparator (val) { - let res = '' - let i = val.length - const start = val[0] === '-' ? 1 : 0 - for (; i >= start + 4; i -= 3) { - res = `_${val.slice(i - 3, i)}${res}` - } - return `${val.slice(0, i)}${res}` -} - -// CHECK FUNCTIONS -// =============== - -function checkBounds (buf, offset, byteLength) { - validateNumber(offset, 'offset') - if (buf[offset] === undefined || buf[offset + byteLength] === undefined) { - boundsError(offset, buf.length - (byteLength + 1)) - } -} - -function checkIntBI (value, min, max, buf, offset, byteLength) { - if (value > max || value < min) { - const n = typeof min === 'bigint' ? 'n' : '' - let range - if (byteLength > 3) { - if (min === 0 || min === BigInt(0)) { - range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}` - } else { - range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` + - `${(byteLength + 1) * 8 - 1}${n}` - } - } else { - range = `>= ${min}${n} and <= ${max}${n}` - } - throw new errors.ERR_OUT_OF_RANGE('value', range, value) - } - checkBounds(buf, offset, byteLength) -} - -function validateNumber (value, name) { - if (typeof value !== 'number') { - throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value) - } -} - -function boundsError (value, length, type) { - if (Math.floor(value) !== value) { - validateNumber(value, type) - throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value) - } - - if (length < 0) { - throw new errors.ERR_BUFFER_OUT_OF_BOUNDS() - } - - throw new errors.ERR_OUT_OF_RANGE(type || 'offset', - `>= ${type ? 1 : 0} and <= ${length}`, - value) -} - -// HELPER FUNCTIONS -// ================ - -const INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node takes equal signs as end of the Base64 encoding - str = str.split('=')[0] - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = str.trim().replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function utf8ToBytes (string, units) { - units = units || Infinity - let codePoint - const length = string.length - let leadSurrogate = null - const bytes = [] - - for (let i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - const byteArray = [] - for (let i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - let c, hi, lo - const byteArray = [] - for (let i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - let i - for (i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass -// the `instanceof` check but they should be treated as of that type. -// See: https://github.com/feross/buffer/issues/166 -function isInstance (obj, type) { - return obj instanceof type || - (obj != null && obj.constructor != null && obj.constructor.name != null && - obj.constructor.name === type.name) -} -function numberIsNaN (obj) { - // For IE11 support - return obj !== obj // eslint-disable-line no-self-compare -} - -// Create lookup table for `toString('hex')` -// See: https://github.com/feross/buffer/issues/219 -const hexSliceLookupTable = (function () { - const alphabet = '0123456789abcdef' - const table = new Array(256) - for (let i = 0; i < 16; ++i) { - const i16 = i * 16 - for (let j = 0; j < 16; ++j) { - table[i16 + j] = alphabet[i] + alphabet[j] - } - } - return table -})() - -// Return not function with Error if BigInt not supported -function defineBigIntMethod (fn) { - return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn -} - -function BufferBigIntNotDefined () { - throw new Error('BigInt not supported') -} diff --git a/node_modules/npm/node_modules/buffer/package.json b/node_modules/npm/node_modules/buffer/package.json deleted file mode 100644 index ca1ad9a..0000000 --- a/node_modules/npm/node_modules/buffer/package.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "name": "buffer", - "description": "Node.js Buffer API, for the browser", - "version": "6.0.3", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "bugs": { - "url": "https://github.com/feross/buffer/issues" - }, - "contributors": [ - "Romain Beauxis ", - "James Halliday " - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - }, - "devDependencies": { - "airtap": "^3.0.0", - "benchmark": "^2.1.4", - "browserify": "^17.0.0", - "concat-stream": "^2.0.0", - "hyperquest": "^2.1.3", - "is-buffer": "^2.0.5", - "is-nan": "^1.3.0", - "split": "^1.0.1", - "standard": "*", - "tape": "^5.0.1", - "through2": "^4.0.2", - "uglify-js": "^3.11.5" - }, - "homepage": "https://github.com/feross/buffer", - "jspm": { - "map": { - "./index.js": { - "node": "@node/buffer" - } - } - }, - "keywords": [ - "arraybuffer", - "browser", - "browserify", - "buffer", - "compatible", - "dataview", - "uint8array" - ], - "license": "MIT", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/buffer.git" - }, - "scripts": { - "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", - "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", - "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", - "test": "standard && node ./bin/test.js", - "test-browser-old": "airtap -- test/*.js", - "test-browser-old-local": "airtap --local -- test/*.js", - "test-browser-new": "airtap -- test/*.js test/node/*.js", - "test-browser-new-local": "airtap --local -- test/*.js test/node/*.js", - "test-node": "tape test/*.js test/node/*.js", - "update-authors": "./bin/update-authors.sh" - }, - "standard": { - "ignore": [ - "test/node/**/*.js", - "test/common.js", - "test/_polyfill.js", - "perf/**/*.js" - ] - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/npm/node_modules/builtins/License b/node_modules/npm/node_modules/builtins/License deleted file mode 100644 index b142e5d..0000000 --- a/node_modules/npm/node_modules/builtins/License +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2015 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/builtins/index.js b/node_modules/npm/node_modules/builtins/index.js deleted file mode 100644 index b715278..0000000 --- a/node_modules/npm/node_modules/builtins/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const semver = require('semver') - -const permanentModules = [ - 'assert', - 'buffer', - 'child_process', - 'cluster', - 'console', - 'constants', - 'crypto', - 'dgram', - 'dns', - 'domain', - 'events', - 'fs', - 'http', - 'https', - 'module', - 'net', - 'os', - 'path', - 'punycode', - 'querystring', - 'readline', - 'repl', - 'stream', - 'string_decoder', - 'sys', - 'timers', - 'tls', - 'tty', - 'url', - 'util', - 'vm', - 'zlib' -] - -const versionLockedModules = { - freelist: '<6.0.0', - v8: '>=1.0.0', - process: '>=1.1.0', - inspector: '>=8.0.0', - async_hooks: '>=8.1.0', - http2: '>=8.4.0', - perf_hooks: '>=8.5.0', - trace_events: '>=10.0.0', - worker_threads: '>=12.0.0', - 'node:test': '>=18.0.0' -} - -const experimentalModules = { - worker_threads: '>=10.5.0', - wasi: '>=12.16.0', - diagnostics_channel: '^14.17.0 || >=15.1.0' -} - -module.exports = ({ version = process.version, experimental = false } = {}) => { - const builtins = [...permanentModules] - - for (const [name, semverRange] of Object.entries(versionLockedModules)) { - if (version === '*' || semver.satisfies(version, semverRange)) { - builtins.push(name) - } - } - - if (experimental) { - for (const [name, semverRange] of Object.entries(experimentalModules)) { - if ( - !builtins.includes(name) && - (version === '*' || semver.satisfies(version, semverRange)) - ) { - builtins.push(name) - } - } - } - - return builtins -} diff --git a/node_modules/npm/node_modules/builtins/package.json b/node_modules/npm/node_modules/builtins/package.json deleted file mode 100644 index 1c43660..0000000 --- a/node_modules/npm/node_modules/builtins/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "builtins", - "version": "5.0.1", - "description": "List of node.js builtin modules", - "repository": "juliangruber/builtins", - "license": "MIT", - "main": "index.js", - "files": [], - "scripts": { - "test": "prettier-standard && standard && node-core-test" - }, - "dependencies": { - "semver": "^7.0.0" - }, - "devDependencies": { - "node-core-test": "^1.4.0", - "prettier-standard": "^15.0.1", - "standard": "^14.3.4" - } -} diff --git a/node_modules/npm/node_modules/cacache/LICENSE.md b/node_modules/npm/node_modules/cacache/LICENSE.md deleted file mode 100644 index 8d28acf..0000000 --- a/node_modules/npm/node_modules/cacache/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/cacache/lib/content/path.js b/node_modules/npm/node_modules/cacache/lib/content/path.js deleted file mode 100644 index ad5a76a..0000000 --- a/node_modules/npm/node_modules/cacache/lib/content/path.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict' - -const contentVer = require('../../package.json')['cache-version'].content -const hashToSegments = require('../util/hash-to-segments') -const path = require('path') -const ssri = require('ssri') - -// Current format of content file path: -// -// sha512-BaSE64Hex= -> -// ~/.my-cache/content-v2/sha512/ba/da/55deadbeefc0ffee -// -module.exports = contentPath - -function contentPath (cache, integrity) { - const sri = ssri.parse(integrity, { single: true }) - // contentPath is the *strongest* algo given - return path.join( - contentDir(cache), - sri.algorithm, - ...hashToSegments(sri.hexDigest()) - ) -} - -module.exports.contentDir = contentDir - -function contentDir (cache) { - return path.join(cache, `content-v${contentVer}`) -} diff --git a/node_modules/npm/node_modules/cacache/lib/content/read.js b/node_modules/npm/node_modules/cacache/lib/content/read.js deleted file mode 100644 index f41b539..0000000 --- a/node_modules/npm/node_modules/cacache/lib/content/read.js +++ /dev/null @@ -1,166 +0,0 @@ -'use strict' - -const fs = require('fs/promises') -const fsm = require('fs-minipass') -const ssri = require('ssri') -const contentPath = require('./path') -const Pipeline = require('minipass-pipeline') - -module.exports = read - -const MAX_SINGLE_READ_SIZE = 64 * 1024 * 1024 -async function read (cache, integrity, opts = {}) { - const { size } = opts - const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => { - // get size - const stat = await fs.stat(cpath) - return { stat, cpath, sri } - }) - if (typeof size === 'number' && stat.size !== size) { - throw sizeError(size, stat.size) - } - - if (stat.size > MAX_SINGLE_READ_SIZE) { - return readPipeline(cpath, stat.size, sri, new Pipeline()).concat() - } - - const data = await fs.readFile(cpath, { encoding: null }) - if (!ssri.checkData(data, sri)) { - throw integrityError(sri, cpath) - } - - return data -} - -const readPipeline = (cpath, size, sri, stream) => { - stream.push( - new fsm.ReadStream(cpath, { - size, - readSize: MAX_SINGLE_READ_SIZE, - }), - ssri.integrityStream({ - integrity: sri, - size, - }) - ) - return stream -} - -module.exports.stream = readStream -module.exports.readStream = readStream - -function readStream (cache, integrity, opts = {}) { - const { size } = opts - const stream = new Pipeline() - // Set all this up to run on the stream and then just return the stream - Promise.resolve().then(async () => { - const { stat, cpath, sri } = await withContentSri(cache, integrity, async (cpath, sri) => { - // just stat to ensure it exists - const stat = await fs.stat(cpath) - return { stat, cpath, sri } - }) - if (typeof size === 'number' && size !== stat.size) { - return stream.emit('error', sizeError(size, stat.size)) - } - - return readPipeline(cpath, stat.size, sri, stream) - }).catch(err => stream.emit('error', err)) - - return stream -} - -module.exports.copy = copy - -function copy (cache, integrity, dest) { - return withContentSri(cache, integrity, (cpath, sri) => { - return fs.copyFile(cpath, dest) - }) -} - -module.exports.hasContent = hasContent - -async function hasContent (cache, integrity) { - if (!integrity) { - return false - } - - try { - return await withContentSri(cache, integrity, async (cpath, sri) => { - const stat = await fs.stat(cpath) - return { size: stat.size, sri, stat } - }) - } catch (err) { - if (err.code === 'ENOENT') { - return false - } - - if (err.code === 'EPERM') { - /* istanbul ignore else */ - if (process.platform !== 'win32') { - throw err - } else { - return false - } - } - } -} - -async function withContentSri (cache, integrity, fn) { - const sri = ssri.parse(integrity) - // If `integrity` has multiple entries, pick the first digest - // with available local data. - const algo = sri.pickAlgorithm() - const digests = sri[algo] - - if (digests.length <= 1) { - const cpath = contentPath(cache, digests[0]) - return fn(cpath, digests[0]) - } else { - // Can't use race here because a generic error can happen before - // a ENOENT error, and can happen before a valid result - const results = await Promise.all(digests.map(async (meta) => { - try { - return await withContentSri(cache, meta, fn) - } catch (err) { - if (err.code === 'ENOENT') { - return Object.assign( - new Error('No matching content found for ' + sri.toString()), - { code: 'ENOENT' } - ) - } - return err - } - })) - // Return the first non error if it is found - const result = results.find((r) => !(r instanceof Error)) - if (result) { - return result - } - - // Throw the No matching content found error - const enoentError = results.find((r) => r.code === 'ENOENT') - if (enoentError) { - throw enoentError - } - - // Throw generic error - throw results.find((r) => r instanceof Error) - } -} - -function sizeError (expected, found) { - /* eslint-disable-next-line max-len */ - const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) - err.expected = expected - err.found = found - err.code = 'EBADSIZE' - return err -} - -function integrityError (sri, path) { - const err = new Error(`Integrity verification failed for ${sri} (${path})`) - err.code = 'EINTEGRITY' - err.sri = sri - err.path = path - return err -} diff --git a/node_modules/npm/node_modules/cacache/lib/content/rm.js b/node_modules/npm/node_modules/cacache/lib/content/rm.js deleted file mode 100644 index ce58d67..0000000 --- a/node_modules/npm/node_modules/cacache/lib/content/rm.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const fs = require('fs/promises') -const contentPath = require('./path') -const { hasContent } = require('./read') - -module.exports = rm - -async function rm (cache, integrity) { - const content = await hasContent(cache, integrity) - // ~pretty~ sure we can't end up with a content lacking sri, but be safe - if (content && content.sri) { - await fs.rm(contentPath(cache, content.sri), { recursive: true, force: true }) - return true - } else { - return false - } -} diff --git a/node_modules/npm/node_modules/cacache/lib/content/write.js b/node_modules/npm/node_modules/cacache/lib/content/write.js deleted file mode 100644 index 09ca4e4..0000000 --- a/node_modules/npm/node_modules/cacache/lib/content/write.js +++ /dev/null @@ -1,206 +0,0 @@ -'use strict' - -const events = require('events') - -const contentPath = require('./path') -const fs = require('fs/promises') -const { moveFile } = require('@npmcli/fs') -const { Minipass } = require('minipass') -const Pipeline = require('minipass-pipeline') -const Flush = require('minipass-flush') -const path = require('path') -const ssri = require('ssri') -const uniqueFilename = require('unique-filename') -const fsm = require('fs-minipass') - -module.exports = write - -// Cache of move operations in process so we don't duplicate -const moveOperations = new Map() - -async function write (cache, data, opts = {}) { - const { algorithms, size, integrity } = opts - - if (typeof size === 'number' && data.length !== size) { - throw sizeError(size, data.length) - } - - const sri = ssri.fromData(data, algorithms ? { algorithms } : {}) - if (integrity && !ssri.checkData(data, integrity, opts)) { - throw checksumError(integrity, sri) - } - - for (const algo in sri) { - const tmp = await makeTmp(cache, opts) - const hash = sri[algo].toString() - try { - await fs.writeFile(tmp.target, data, { flag: 'wx' }) - await moveToDestination(tmp, cache, hash, opts) - } finally { - if (!tmp.moved) { - await fs.rm(tmp.target, { recursive: true, force: true }) - } - } - } - return { integrity: sri, size: data.length } -} - -module.exports.stream = writeStream - -// writes proxied to the 'inputStream' that is passed to the Promise -// 'end' is deferred until content is handled. -class CacacheWriteStream extends Flush { - constructor (cache, opts) { - super() - this.opts = opts - this.cache = cache - this.inputStream = new Minipass() - this.inputStream.on('error', er => this.emit('error', er)) - this.inputStream.on('drain', () => this.emit('drain')) - this.handleContentP = null - } - - write (chunk, encoding, cb) { - if (!this.handleContentP) { - this.handleContentP = handleContent( - this.inputStream, - this.cache, - this.opts - ) - this.handleContentP.catch(error => this.emit('error', error)) - } - return this.inputStream.write(chunk, encoding, cb) - } - - flush (cb) { - this.inputStream.end(() => { - if (!this.handleContentP) { - const e = new Error('Cache input stream was empty') - e.code = 'ENODATA' - // empty streams are probably emitting end right away. - // defer this one tick by rejecting a promise on it. - return Promise.reject(e).catch(cb) - } - // eslint-disable-next-line promise/catch-or-return - this.handleContentP.then( - (res) => { - res.integrity && this.emit('integrity', res.integrity) - // eslint-disable-next-line promise/always-return - res.size !== null && this.emit('size', res.size) - cb() - }, - (er) => cb(er) - ) - }) - } -} - -function writeStream (cache, opts = {}) { - return new CacacheWriteStream(cache, opts) -} - -async function handleContent (inputStream, cache, opts) { - const tmp = await makeTmp(cache, opts) - try { - const res = await pipeToTmp(inputStream, cache, tmp.target, opts) - await moveToDestination( - tmp, - cache, - res.integrity, - opts - ) - return res - } finally { - if (!tmp.moved) { - await fs.rm(tmp.target, { recursive: true, force: true }) - } - } -} - -async function pipeToTmp (inputStream, cache, tmpTarget, opts) { - const outStream = new fsm.WriteStream(tmpTarget, { - flags: 'wx', - }) - - if (opts.integrityEmitter) { - // we need to create these all simultaneously since they can fire in any order - const [integrity, size] = await Promise.all([ - events.once(opts.integrityEmitter, 'integrity').then(res => res[0]), - events.once(opts.integrityEmitter, 'size').then(res => res[0]), - new Pipeline(inputStream, outStream).promise(), - ]) - return { integrity, size } - } - - let integrity - let size - const hashStream = ssri.integrityStream({ - integrity: opts.integrity, - algorithms: opts.algorithms, - size: opts.size, - }) - hashStream.on('integrity', i => { - integrity = i - }) - hashStream.on('size', s => { - size = s - }) - - const pipeline = new Pipeline(inputStream, hashStream, outStream) - await pipeline.promise() - return { integrity, size } -} - -async function makeTmp (cache, opts) { - const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - await fs.mkdir(path.dirname(tmpTarget), { recursive: true }) - return { - target: tmpTarget, - moved: false, - } -} - -async function moveToDestination (tmp, cache, sri, opts) { - const destination = contentPath(cache, sri) - const destDir = path.dirname(destination) - if (moveOperations.has(destination)) { - return moveOperations.get(destination) - } - moveOperations.set( - destination, - fs.mkdir(destDir, { recursive: true }) - .then(async () => { - await moveFile(tmp.target, destination, { overwrite: false }) - tmp.moved = true - return tmp.moved - }) - .catch(err => { - if (!err.message.startsWith('The destination file exists')) { - throw Object.assign(err, { code: 'EEXIST' }) - } - }).finally(() => { - moveOperations.delete(destination) - }) - - ) - return moveOperations.get(destination) -} - -function sizeError (expected, found) { - /* eslint-disable-next-line max-len */ - const err = new Error(`Bad data size: expected inserted data to be ${expected} bytes, but got ${found} instead`) - err.expected = expected - err.found = found - err.code = 'EBADSIZE' - return err -} - -function checksumError (expected, found) { - const err = new Error(`Integrity check failed: - Wanted: ${expected} - Found: ${found}`) - err.code = 'EINTEGRITY' - err.expected = expected - err.found = found - return err -} diff --git a/node_modules/npm/node_modules/cacache/lib/entry-index.js b/node_modules/npm/node_modules/cacache/lib/entry-index.js deleted file mode 100644 index 722a37a..0000000 --- a/node_modules/npm/node_modules/cacache/lib/entry-index.js +++ /dev/null @@ -1,330 +0,0 @@ -'use strict' - -const crypto = require('crypto') -const { - appendFile, - mkdir, - readFile, - readdir, - rm, - writeFile, -} = require('fs/promises') -const { Minipass } = require('minipass') -const path = require('path') -const ssri = require('ssri') -const uniqueFilename = require('unique-filename') - -const contentPath = require('./content/path') -const hashToSegments = require('./util/hash-to-segments') -const indexV = require('../package.json')['cache-version'].index -const { moveFile } = require('@npmcli/fs') - -module.exports.NotFoundError = class NotFoundError extends Error { - constructor (cache, key) { - super(`No cache entry for ${key} found in ${cache}`) - this.code = 'ENOENT' - this.cache = cache - this.key = key - } -} - -module.exports.compact = compact - -async function compact (cache, key, matchFn, opts = {}) { - const bucket = bucketPath(cache, key) - const entries = await bucketEntries(bucket) - const newEntries = [] - // we loop backwards because the bottom-most result is the newest - // since we add new entries with appendFile - for (let i = entries.length - 1; i >= 0; --i) { - const entry = entries[i] - // a null integrity could mean either a delete was appended - // or the user has simply stored an index that does not map - // to any content. we determine if the user wants to keep the - // null integrity based on the validateEntry function passed in options. - // if the integrity is null and no validateEntry is provided, we break - // as we consider the null integrity to be a deletion of everything - // that came before it. - if (entry.integrity === null && !opts.validateEntry) { - break - } - - // if this entry is valid, and it is either the first entry or - // the newEntries array doesn't already include an entry that - // matches this one based on the provided matchFn, then we add - // it to the beginning of our list - if ((!opts.validateEntry || opts.validateEntry(entry) === true) && - (newEntries.length === 0 || - !newEntries.find((oldEntry) => matchFn(oldEntry, entry)))) { - newEntries.unshift(entry) - } - } - - const newIndex = '\n' + newEntries.map((entry) => { - const stringified = JSON.stringify(entry) - const hash = hashEntry(stringified) - return `${hash}\t${stringified}` - }).join('\n') - - const setup = async () => { - const target = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) - await mkdir(path.dirname(target), { recursive: true }) - return { - target, - moved: false, - } - } - - const teardown = async (tmp) => { - if (!tmp.moved) { - return rm(tmp.target, { recursive: true, force: true }) - } - } - - const write = async (tmp) => { - await writeFile(tmp.target, newIndex, { flag: 'wx' }) - await mkdir(path.dirname(bucket), { recursive: true }) - // we use @npmcli/move-file directly here because we - // want to overwrite the existing file - await moveFile(tmp.target, bucket) - tmp.moved = true - } - - // write the file atomically - const tmp = await setup() - try { - await write(tmp) - } finally { - await teardown(tmp) - } - - // we reverse the list we generated such that the newest - // entries come first in order to make looping through them easier - // the true passed to formatEntry tells it to keep null - // integrity values, if they made it this far it's because - // validateEntry returned true, and as such we should return it - return newEntries.reverse().map((entry) => formatEntry(cache, entry, true)) -} - -module.exports.insert = insert - -async function insert (cache, key, integrity, opts = {}) { - const { metadata, size, time } = opts - const bucket = bucketPath(cache, key) - const entry = { - key, - integrity: integrity && ssri.stringify(integrity), - time: time || Date.now(), - size, - metadata, - } - try { - await mkdir(path.dirname(bucket), { recursive: true }) - const stringified = JSON.stringify(entry) - // NOTE - Cleverness ahoy! - // - // This works because it's tremendously unlikely for an entry to corrupt - // another while still preserving the string length of the JSON in - // question. So, we just slap the length in there and verify it on read. - // - // Thanks to @isaacs for the whiteboarding session that ended up with - // this. - await appendFile(bucket, `\n${hashEntry(stringified)}\t${stringified}`) - } catch (err) { - if (err.code === 'ENOENT') { - return undefined - } - - throw err - } - return formatEntry(cache, entry) -} - -module.exports.find = find - -async function find (cache, key) { - const bucket = bucketPath(cache, key) - try { - const entries = await bucketEntries(bucket) - return entries.reduce((latest, next) => { - if (next && next.key === key) { - return formatEntry(cache, next) - } else { - return latest - } - }, null) - } catch (err) { - if (err.code === 'ENOENT') { - return null - } else { - throw err - } - } -} - -module.exports.delete = del - -function del (cache, key, opts = {}) { - if (!opts.removeFully) { - return insert(cache, key, null, opts) - } - - const bucket = bucketPath(cache, key) - return rm(bucket, { recursive: true, force: true }) -} - -module.exports.lsStream = lsStream - -function lsStream (cache) { - const indexDir = bucketDir(cache) - const stream = new Minipass({ objectMode: true }) - - // Set all this up to run on the stream and then just return the stream - Promise.resolve().then(async () => { - const buckets = await readdirOrEmpty(indexDir) - await Promise.all(buckets.map(async (bucket) => { - const bucketPath = path.join(indexDir, bucket) - const subbuckets = await readdirOrEmpty(bucketPath) - await Promise.all(subbuckets.map(async (subbucket) => { - const subbucketPath = path.join(bucketPath, subbucket) - - // "/cachename//./*" - const subbucketEntries = await readdirOrEmpty(subbucketPath) - await Promise.all(subbucketEntries.map(async (entry) => { - const entryPath = path.join(subbucketPath, entry) - try { - const entries = await bucketEntries(entryPath) - // using a Map here prevents duplicate keys from showing up - // twice, I guess? - const reduced = entries.reduce((acc, entry) => { - acc.set(entry.key, entry) - return acc - }, new Map()) - // reduced is a map of key => entry - for (const entry of reduced.values()) { - const formatted = formatEntry(cache, entry) - if (formatted) { - stream.write(formatted) - } - } - } catch (err) { - if (err.code === 'ENOENT') { - return undefined - } - throw err - } - })) - })) - })) - stream.end() - return stream - }).catch(err => stream.emit('error', err)) - - return stream -} - -module.exports.ls = ls - -async function ls (cache) { - const entries = await lsStream(cache).collect() - return entries.reduce((acc, xs) => { - acc[xs.key] = xs - return acc - }, {}) -} - -module.exports.bucketEntries = bucketEntries - -async function bucketEntries (bucket, filter) { - const data = await readFile(bucket, 'utf8') - return _bucketEntries(data, filter) -} - -function _bucketEntries (data, filter) { - const entries = [] - data.split('\n').forEach((entry) => { - if (!entry) { - return - } - - const pieces = entry.split('\t') - if (!pieces[1] || hashEntry(pieces[1]) !== pieces[0]) { - // Hash is no good! Corruption or malice? Doesn't matter! - // EJECT EJECT - return - } - let obj - try { - obj = JSON.parse(pieces[1]) - } catch (_) { - // eslint-ignore-next-line no-empty-block - } - // coverage disabled here, no need to test with an entry that parses to something falsey - // istanbul ignore else - if (obj) { - entries.push(obj) - } - }) - return entries -} - -module.exports.bucketDir = bucketDir - -function bucketDir (cache) { - return path.join(cache, `index-v${indexV}`) -} - -module.exports.bucketPath = bucketPath - -function bucketPath (cache, key) { - const hashed = hashKey(key) - return path.join.apply( - path, - [bucketDir(cache)].concat(hashToSegments(hashed)) - ) -} - -module.exports.hashKey = hashKey - -function hashKey (key) { - return hash(key, 'sha256') -} - -module.exports.hashEntry = hashEntry - -function hashEntry (str) { - return hash(str, 'sha1') -} - -function hash (str, digest) { - return crypto - .createHash(digest) - .update(str) - .digest('hex') -} - -function formatEntry (cache, entry, keepAll) { - // Treat null digests as deletions. They'll shadow any previous entries. - if (!entry.integrity && !keepAll) { - return null - } - - return { - key: entry.key, - integrity: entry.integrity, - path: entry.integrity ? contentPath(cache, entry.integrity) : undefined, - size: entry.size, - time: entry.time, - metadata: entry.metadata, - } -} - -function readdirOrEmpty (dir) { - return readdir(dir).catch((err) => { - if (err.code === 'ENOENT' || err.code === 'ENOTDIR') { - return [] - } - - throw err - }) -} diff --git a/node_modules/npm/node_modules/cacache/lib/get.js b/node_modules/npm/node_modules/cacache/lib/get.js deleted file mode 100644 index 80ec206..0000000 --- a/node_modules/npm/node_modules/cacache/lib/get.js +++ /dev/null @@ -1,170 +0,0 @@ -'use strict' - -const Collect = require('minipass-collect') -const { Minipass } = require('minipass') -const Pipeline = require('minipass-pipeline') - -const index = require('./entry-index') -const memo = require('./memoization') -const read = require('./content/read') - -async function getData (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) { - return { - metadata: memoized.entry.metadata, - data: memoized.data, - integrity: memoized.entry.integrity, - size: memoized.entry.size, - } - } - - const entry = await index.find(cache, key, opts) - if (!entry) { - throw new index.NotFoundError(cache, key) - } - const data = await read(cache, entry.integrity, { integrity, size }) - if (memoize) { - memo.put(cache, entry, data, opts) - } - - return { - data, - metadata: entry.metadata, - size: entry.size, - integrity: entry.integrity, - } -} -module.exports = getData - -async function getDataByDigest (cache, key, opts = {}) { - const { integrity, memoize, size } = opts - const memoized = memo.get.byDigest(cache, key, opts) - if (memoized && memoize !== false) { - return memoized - } - - const res = await read(cache, key, { integrity, size }) - if (memoize) { - memo.put.byDigest(cache, key, res, opts) - } - return res -} -module.exports.byDigest = getDataByDigest - -const getMemoizedStream = (memoized) => { - const stream = new Minipass() - stream.on('newListener', function (ev, cb) { - ev === 'metadata' && cb(memoized.entry.metadata) - ev === 'integrity' && cb(memoized.entry.integrity) - ev === 'size' && cb(memoized.entry.size) - }) - stream.end(memoized.data) - return stream -} - -function getStream (cache, key, opts = {}) { - const { memoize, size } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) { - return getMemoizedStream(memoized) - } - - const stream = new Pipeline() - // Set all this up to run on the stream and then just return the stream - Promise.resolve().then(async () => { - const entry = await index.find(cache, key) - if (!entry) { - throw new index.NotFoundError(cache, key) - } - - stream.emit('metadata', entry.metadata) - stream.emit('integrity', entry.integrity) - stream.emit('size', entry.size) - stream.on('newListener', function (ev, cb) { - ev === 'metadata' && cb(entry.metadata) - ev === 'integrity' && cb(entry.integrity) - ev === 'size' && cb(entry.size) - }) - - const src = read.readStream( - cache, - entry.integrity, - { ...opts, size: typeof size !== 'number' ? entry.size : size } - ) - - if (memoize) { - const memoStream = new Collect.PassThrough() - memoStream.on('collect', data => memo.put(cache, entry, data, opts)) - stream.unshift(memoStream) - } - stream.unshift(src) - return stream - }).catch((err) => stream.emit('error', err)) - - return stream -} - -module.exports.stream = getStream - -function getStreamDigest (cache, integrity, opts = {}) { - const { memoize } = opts - const memoized = memo.get.byDigest(cache, integrity, opts) - if (memoized && memoize !== false) { - const stream = new Minipass() - stream.end(memoized) - return stream - } else { - const stream = read.readStream(cache, integrity, opts) - if (!memoize) { - return stream - } - - const memoStream = new Collect.PassThrough() - memoStream.on('collect', data => memo.put.byDigest( - cache, - integrity, - data, - opts - )) - return new Pipeline(stream, memoStream) - } -} - -module.exports.stream.byDigest = getStreamDigest - -function info (cache, key, opts = {}) { - const { memoize } = opts - const memoized = memo.get(cache, key, opts) - if (memoized && memoize !== false) { - return Promise.resolve(memoized.entry) - } else { - return index.find(cache, key) - } -} -module.exports.info = info - -async function copy (cache, key, dest, opts = {}) { - const entry = await index.find(cache, key, opts) - if (!entry) { - throw new index.NotFoundError(cache, key) - } - await read.copy(cache, entry.integrity, dest, opts) - return { - metadata: entry.metadata, - size: entry.size, - integrity: entry.integrity, - } -} - -module.exports.copy = copy - -async function copyByDigest (cache, key, dest, opts = {}) { - await read.copy(cache, key, dest, opts) - return key -} - -module.exports.copy.byDigest = copyByDigest - -module.exports.hasContent = read.hasContent diff --git a/node_modules/npm/node_modules/cacache/lib/index.js b/node_modules/npm/node_modules/cacache/lib/index.js deleted file mode 100644 index c9b0da5..0000000 --- a/node_modules/npm/node_modules/cacache/lib/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -const get = require('./get.js') -const put = require('./put.js') -const rm = require('./rm.js') -const verify = require('./verify.js') -const { clearMemoized } = require('./memoization.js') -const tmp = require('./util/tmp.js') -const index = require('./entry-index.js') - -module.exports.index = {} -module.exports.index.compact = index.compact -module.exports.index.insert = index.insert - -module.exports.ls = index.ls -module.exports.ls.stream = index.lsStream - -module.exports.get = get -module.exports.get.byDigest = get.byDigest -module.exports.get.stream = get.stream -module.exports.get.stream.byDigest = get.stream.byDigest -module.exports.get.copy = get.copy -module.exports.get.copy.byDigest = get.copy.byDigest -module.exports.get.info = get.info -module.exports.get.hasContent = get.hasContent - -module.exports.put = put -module.exports.put.stream = put.stream - -module.exports.rm = rm.entry -module.exports.rm.all = rm.all -module.exports.rm.entry = module.exports.rm -module.exports.rm.content = rm.content - -module.exports.clearMemoized = clearMemoized - -module.exports.tmp = {} -module.exports.tmp.mkdir = tmp.mkdir -module.exports.tmp.withTmp = tmp.withTmp - -module.exports.verify = verify -module.exports.verify.lastRun = verify.lastRun diff --git a/node_modules/npm/node_modules/cacache/lib/memoization.js b/node_modules/npm/node_modules/cacache/lib/memoization.js deleted file mode 100644 index 2ecc609..0000000 --- a/node_modules/npm/node_modules/cacache/lib/memoization.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict' - -const { LRUCache } = require('lru-cache') - -const MEMOIZED = new LRUCache({ - max: 500, - maxSize: 50 * 1024 * 1024, // 50MB - ttl: 3 * 60 * 1000, // 3 minutes - sizeCalculation: (entry, key) => key.startsWith('key:') ? entry.data.length : entry.length, -}) - -module.exports.clearMemoized = clearMemoized - -function clearMemoized () { - const old = {} - MEMOIZED.forEach((v, k) => { - old[k] = v - }) - MEMOIZED.clear() - return old -} - -module.exports.put = put - -function put (cache, entry, data, opts) { - pickMem(opts).set(`key:${cache}:${entry.key}`, { entry, data }) - putDigest(cache, entry.integrity, data, opts) -} - -module.exports.put.byDigest = putDigest - -function putDigest (cache, integrity, data, opts) { - pickMem(opts).set(`digest:${cache}:${integrity}`, data) -} - -module.exports.get = get - -function get (cache, key, opts) { - return pickMem(opts).get(`key:${cache}:${key}`) -} - -module.exports.get.byDigest = getDigest - -function getDigest (cache, integrity, opts) { - return pickMem(opts).get(`digest:${cache}:${integrity}`) -} - -class ObjProxy { - constructor (obj) { - this.obj = obj - } - - get (key) { - return this.obj[key] - } - - set (key, val) { - this.obj[key] = val - } -} - -function pickMem (opts) { - if (!opts || !opts.memoize) { - return MEMOIZED - } else if (opts.memoize.get && opts.memoize.set) { - return opts.memoize - } else if (typeof opts.memoize === 'object') { - return new ObjProxy(opts.memoize) - } else { - return MEMOIZED - } -} diff --git a/node_modules/npm/node_modules/cacache/lib/put.js b/node_modules/npm/node_modules/cacache/lib/put.js deleted file mode 100644 index 9fc932d..0000000 --- a/node_modules/npm/node_modules/cacache/lib/put.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const index = require('./entry-index') -const memo = require('./memoization') -const write = require('./content/write') -const Flush = require('minipass-flush') -const { PassThrough } = require('minipass-collect') -const Pipeline = require('minipass-pipeline') - -const putOpts = (opts) => ({ - algorithms: ['sha512'], - ...opts, -}) - -module.exports = putData - -async function putData (cache, key, data, opts = {}) { - const { memoize } = opts - opts = putOpts(opts) - const res = await write(cache, data, opts) - const entry = await index.insert(cache, key, res.integrity, { ...opts, size: res.size }) - if (memoize) { - memo.put(cache, entry, data, opts) - } - - return res.integrity -} - -module.exports.stream = putStream - -function putStream (cache, key, opts = {}) { - const { memoize } = opts - opts = putOpts(opts) - let integrity - let size - let error - - let memoData - const pipeline = new Pipeline() - // first item in the pipeline is the memoizer, because we need - // that to end first and get the collected data. - if (memoize) { - const memoizer = new PassThrough().on('collect', data => { - memoData = data - }) - pipeline.push(memoizer) - } - - // contentStream is a write-only, not a passthrough - // no data comes out of it. - const contentStream = write.stream(cache, opts) - .on('integrity', (int) => { - integrity = int - }) - .on('size', (s) => { - size = s - }) - .on('error', (err) => { - error = err - }) - - pipeline.push(contentStream) - - // last but not least, we write the index and emit hash and size, - // and memoize if we're doing that - pipeline.push(new Flush({ - async flush () { - if (!error) { - const entry = await index.insert(cache, key, integrity, { ...opts, size }) - if (memoize && memoData) { - memo.put(cache, entry, memoData, opts) - } - pipeline.emit('integrity', integrity) - pipeline.emit('size', size) - } - }, - })) - - return pipeline -} diff --git a/node_modules/npm/node_modules/cacache/lib/rm.js b/node_modules/npm/node_modules/cacache/lib/rm.js deleted file mode 100644 index a94760c..0000000 --- a/node_modules/npm/node_modules/cacache/lib/rm.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' - -const { rm } = require('fs/promises') -const glob = require('./util/glob.js') -const index = require('./entry-index') -const memo = require('./memoization') -const path = require('path') -const rmContent = require('./content/rm') - -module.exports = entry -module.exports.entry = entry - -function entry (cache, key, opts) { - memo.clearMemoized() - return index.delete(cache, key, opts) -} - -module.exports.content = content - -function content (cache, integrity) { - memo.clearMemoized() - return rmContent(cache, integrity) -} - -module.exports.all = all - -async function all (cache) { - memo.clearMemoized() - const paths = await glob(path.join(cache, '*(content-*|index-*)'), { silent: true, nosort: true }) - return Promise.all(paths.map((p) => rm(p, { recursive: true, force: true }))) -} diff --git a/node_modules/npm/node_modules/cacache/lib/util/glob.js b/node_modules/npm/node_modules/cacache/lib/util/glob.js deleted file mode 100644 index 8500c1c..0000000 --- a/node_modules/npm/node_modules/cacache/lib/util/glob.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -const { glob } = require('glob') -const path = require('path') - -const globify = (pattern) => pattern.split(path.win32.sep).join(path.posix.sep) -module.exports = (path, options) => glob(globify(path), options) diff --git a/node_modules/npm/node_modules/cacache/lib/util/hash-to-segments.js b/node_modules/npm/node_modules/cacache/lib/util/hash-to-segments.js deleted file mode 100644 index 445599b..0000000 --- a/node_modules/npm/node_modules/cacache/lib/util/hash-to-segments.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -module.exports = hashToSegments - -function hashToSegments (hash) { - return [hash.slice(0, 2), hash.slice(2, 4), hash.slice(4)] -} diff --git a/node_modules/npm/node_modules/cacache/lib/util/tmp.js b/node_modules/npm/node_modules/cacache/lib/util/tmp.js deleted file mode 100644 index 0bf5302..0000000 --- a/node_modules/npm/node_modules/cacache/lib/util/tmp.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' - -const { withTempDir } = require('@npmcli/fs') -const fs = require('fs/promises') -const path = require('path') - -module.exports.mkdir = mktmpdir - -async function mktmpdir (cache, opts = {}) { - const { tmpPrefix } = opts - const tmpDir = path.join(cache, 'tmp') - await fs.mkdir(tmpDir, { recursive: true, owner: 'inherit' }) - // do not use path.join(), it drops the trailing / if tmpPrefix is unset - const target = `${tmpDir}${path.sep}${tmpPrefix || ''}` - return fs.mkdtemp(target, { owner: 'inherit' }) -} - -module.exports.withTmp = withTmp - -function withTmp (cache, opts, cb) { - if (!cb) { - cb = opts - opts = {} - } - return withTempDir(path.join(cache, 'tmp'), cb, opts) -} diff --git a/node_modules/npm/node_modules/cacache/lib/verify.js b/node_modules/npm/node_modules/cacache/lib/verify.js deleted file mode 100644 index 62e85c9..0000000 --- a/node_modules/npm/node_modules/cacache/lib/verify.js +++ /dev/null @@ -1,257 +0,0 @@ -'use strict' - -const { - mkdir, - readFile, - rm, - stat, - truncate, - writeFile, -} = require('fs/promises') -const pMap = require('p-map') -const contentPath = require('./content/path') -const fsm = require('fs-minipass') -const glob = require('./util/glob.js') -const index = require('./entry-index') -const path = require('path') -const ssri = require('ssri') - -const hasOwnProperty = (obj, key) => - Object.prototype.hasOwnProperty.call(obj, key) - -const verifyOpts = (opts) => ({ - concurrency: 20, - log: { silly () {} }, - ...opts, -}) - -module.exports = verify - -async function verify (cache, opts) { - opts = verifyOpts(opts) - opts.log.silly('verify', 'verifying cache at', cache) - - const steps = [ - markStartTime, - fixPerms, - garbageCollect, - rebuildIndex, - cleanTmp, - writeVerifile, - markEndTime, - ] - - const stats = {} - for (const step of steps) { - const label = step.name - const start = new Date() - const s = await step(cache, opts) - if (s) { - Object.keys(s).forEach((k) => { - stats[k] = s[k] - }) - } - const end = new Date() - if (!stats.runTime) { - stats.runTime = {} - } - stats.runTime[label] = end - start - } - stats.runTime.total = stats.endTime - stats.startTime - opts.log.silly( - 'verify', - 'verification finished for', - cache, - 'in', - `${stats.runTime.total}ms` - ) - return stats -} - -async function markStartTime (cache, opts) { - return { startTime: new Date() } -} - -async function markEndTime (cache, opts) { - return { endTime: new Date() } -} - -async function fixPerms (cache, opts) { - opts.log.silly('verify', 'fixing cache permissions') - await mkdir(cache, { recursive: true }) - return null -} - -// Implements a naive mark-and-sweep tracing garbage collector. -// -// The algorithm is basically as follows: -// 1. Read (and filter) all index entries ("pointers") -// 2. Mark each integrity value as "live" -// 3. Read entire filesystem tree in `content-vX/` dir -// 4. If content is live, verify its checksum and delete it if it fails -// 5. If content is not marked as live, rm it. -// -async function garbageCollect (cache, opts) { - opts.log.silly('verify', 'garbage collecting content') - const indexStream = index.lsStream(cache) - const liveContent = new Set() - indexStream.on('data', (entry) => { - if (opts.filter && !opts.filter(entry)) { - return - } - - // integrity is stringified, re-parse it so we can get each hash - const integrity = ssri.parse(entry.integrity) - for (const algo in integrity) { - liveContent.add(integrity[algo].toString()) - } - }) - await new Promise((resolve, reject) => { - indexStream.on('end', resolve).on('error', reject) - }) - const contentDir = contentPath.contentDir(cache) - const files = await glob(path.join(contentDir, '**'), { - follow: false, - nodir: true, - nosort: true, - }) - const stats = { - verifiedContent: 0, - reclaimedCount: 0, - reclaimedSize: 0, - badContentCount: 0, - keptSize: 0, - } - await pMap( - files, - async (f) => { - const split = f.split(/[/\\]/) - const digest = split.slice(split.length - 3).join('') - const algo = split[split.length - 4] - const integrity = ssri.fromHex(digest, algo) - if (liveContent.has(integrity.toString())) { - const info = await verifyContent(f, integrity) - if (!info.valid) { - stats.reclaimedCount++ - stats.badContentCount++ - stats.reclaimedSize += info.size - } else { - stats.verifiedContent++ - stats.keptSize += info.size - } - } else { - // No entries refer to this content. We can delete. - stats.reclaimedCount++ - const s = await stat(f) - await rm(f, { recursive: true, force: true }) - stats.reclaimedSize += s.size - } - return stats - }, - { concurrency: opts.concurrency } - ) - return stats -} - -async function verifyContent (filepath, sri) { - const contentInfo = {} - try { - const { size } = await stat(filepath) - contentInfo.size = size - contentInfo.valid = true - await ssri.checkStream(new fsm.ReadStream(filepath), sri) - } catch (err) { - if (err.code === 'ENOENT') { - return { size: 0, valid: false } - } - if (err.code !== 'EINTEGRITY') { - throw err - } - - await rm(filepath, { recursive: true, force: true }) - contentInfo.valid = false - } - return contentInfo -} - -async function rebuildIndex (cache, opts) { - opts.log.silly('verify', 'rebuilding index') - const entries = await index.ls(cache) - const stats = { - missingContent: 0, - rejectedEntries: 0, - totalEntries: 0, - } - const buckets = {} - for (const k in entries) { - /* istanbul ignore else */ - if (hasOwnProperty(entries, k)) { - const hashed = index.hashKey(k) - const entry = entries[k] - const excluded = opts.filter && !opts.filter(entry) - excluded && stats.rejectedEntries++ - if (buckets[hashed] && !excluded) { - buckets[hashed].push(entry) - } else if (buckets[hashed] && excluded) { - // skip - } else if (excluded) { - buckets[hashed] = [] - buckets[hashed]._path = index.bucketPath(cache, k) - } else { - buckets[hashed] = [entry] - buckets[hashed]._path = index.bucketPath(cache, k) - } - } - } - await pMap( - Object.keys(buckets), - (key) => { - return rebuildBucket(cache, buckets[key], stats, opts) - }, - { concurrency: opts.concurrency } - ) - return stats -} - -async function rebuildBucket (cache, bucket, stats, opts) { - await truncate(bucket._path) - // This needs to be serialized because cacache explicitly - // lets very racy bucket conflicts clobber each other. - for (const entry of bucket) { - const content = contentPath(cache, entry.integrity) - try { - await stat(content) - await index.insert(cache, entry.key, entry.integrity, { - metadata: entry.metadata, - size: entry.size, - time: entry.time, - }) - stats.totalEntries++ - } catch (err) { - if (err.code === 'ENOENT') { - stats.rejectedEntries++ - stats.missingContent++ - } else { - throw err - } - } - } -} - -function cleanTmp (cache, opts) { - opts.log.silly('verify', 'cleaning tmp directory') - return rm(path.join(cache, 'tmp'), { recursive: true, force: true }) -} - -async function writeVerifile (cache, opts) { - const verifile = path.join(cache, '_lastverified') - opts.log.silly('verify', 'writing verifile to ' + verifile) - return writeFile(verifile, `${Date.now()}`) -} - -module.exports.lastRun = lastRun - -async function lastRun (cache) { - const data = await readFile(path.join(cache, '_lastverified'), { encoding: 'utf8' }) - return new Date(+data) -} diff --git a/node_modules/npm/node_modules/cacache/package.json b/node_modules/npm/node_modules/cacache/package.json deleted file mode 100644 index 83037c3..0000000 --- a/node_modules/npm/node_modules/cacache/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "cacache", - "version": "18.0.1", - "cache-version": { - "content": "2", - "index": "5" - }, - "description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "test": "tap", - "snap": "tap", - "coverage": "tap", - "test-docker": "docker run -it --rm --name pacotest -v \"$PWD\":/tmp -w /tmp node:latest npm test", - "lint": "eslint \"**/*.js\"", - "npmclilint": "npmcli-lint", - "lintfix": "npm run lint -- --fix", - "postsnap": "npm run lintfix --", - "postlint": "template-oss-check", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cacache.git" - }, - "keywords": [ - "cache", - "caching", - "content-addressable", - "sri", - "sri hash", - "subresource integrity", - "cache", - "storage", - "store", - "file store", - "filesystem", - "disk cache", - "disk storage" - ], - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^3.1.0", - "fs-minipass": "^3.0.0", - "glob": "^10.2.2", - "lru-cache": "^10.0.1", - "minipass": "^7.0.3", - "minipass-collect": "^2.0.1", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "p-map": "^4.0.0", - "ssri": "^10.0.0", - "tar": "^6.1.11", - "unique-filename": "^3.0.0" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "tap": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "windowsCI": false, - "version": "4.19.0", - "publish": "true" - }, - "author": "GitHub Inc.", - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/chalk/license b/node_modules/npm/node_modules/chalk/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/npm/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/chalk/package.json b/node_modules/npm/node_modules/chalk/package.json deleted file mode 100644 index 3c50010..0000000 --- a/node_modules/npm/node_modules/chalk/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "chalk", - "version": "5.3.0", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "funding": "https://github.com/chalk/chalk?sponsor=1", - "type": "module", - "main": "./source/index.js", - "exports": "./source/index.js", - "imports": { - "#ansi-styles": "./source/vendor/ansi-styles/index.js", - "#supports-color": { - "node": "./source/vendor/supports-color/index.js", - "default": "./source/vendor/supports-color/browser.js" - } - }, - "types": "./source/index.d.ts", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "scripts": { - "test": "xo && c8 ava && tsd", - "bench": "matcha benchmark.js" - }, - "files": [ - "source", - "!source/index.test-d.ts" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "@types/node": "^16.11.10", - "ava": "^3.15.0", - "c8": "^7.10.0", - "color-convert": "^2.0.1", - "execa": "^6.0.0", - "log-update": "^5.0.0", - "matcha": "^0.7.0", - "tsd": "^0.19.0", - "xo": "^0.53.0", - "yoctodelay": "^2.0.0" - }, - "sideEffects": false, - "xo": { - "rules": { - "unicorn/prefer-string-slice": "off", - "@typescript-eslint/consistent-type-imports": "off", - "@typescript-eslint/consistent-type-exports": "off", - "@typescript-eslint/consistent-type-definitions": "off", - "unicorn/expiring-todo-comments": "off" - } - }, - "c8": { - "reporter": [ - "text", - "lcov" - ], - "exclude": [ - "source/vendor" - ] - } -} diff --git a/node_modules/npm/node_modules/chalk/source/index.js b/node_modules/npm/node_modules/chalk/source/index.js deleted file mode 100644 index 8bc993d..0000000 --- a/node_modules/npm/node_modules/chalk/source/index.js +++ /dev/null @@ -1,225 +0,0 @@ -import ansiStyles from '#ansi-styles'; -import supportsColor from '#supports-color'; -import { // eslint-disable-line import/order - stringReplaceAll, - stringEncaseCRLFWithFirstIndex, -} from './utilities.js'; - -const {stdout: stdoutColor, stderr: stderrColor} = supportsColor; - -const GENERATOR = Symbol('GENERATOR'); -const STYLER = Symbol('STYLER'); -const IS_EMPTY = Symbol('IS_EMPTY'); - -// `supportsColor.level` → `ansiStyles.color[name]` mapping -const levelMapping = [ - 'ansi', - 'ansi', - 'ansi256', - 'ansi16m', -]; - -const styles = Object.create(null); - -const applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - 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; -}; - -export class Chalk { - constructor(options) { - // eslint-disable-next-line no-constructor-return - return chalkFactory(options); - } -} - -const chalkFactory = options => { - const chalk = (...strings) => strings.join(' '); - applyOptions(chalk, options); - - Object.setPrototypeOf(chalk, createChalk.prototype); - - return chalk; -}; - -function createChalk(options) { - return chalkFactory(options); -} - -Object.setPrototypeOf(createChalk.prototype, Function.prototype); - -for (const [styleName, style] of Object.entries(ansiStyles)) { - styles[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); - 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 getModelAnsi = (model, level, type, ...arguments_) => { - if (model === 'rgb') { - if (level === 'ansi16m') { - return ansiStyles[type].ansi16m(...arguments_); - } - - if (level === 'ansi256') { - return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_)); - } - - return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_)); - } - - if (model === 'hex') { - return getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_)); - } - - return ansiStyles[type][model](...arguments_); -}; - -const usedModels = ['rgb', 'hex', 'ansi256']; - -for (const model of usedModels) { - styles[model] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - }, - }; - - const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1); - styles[bgModel] = { - get() { - const {level} = this; - return function (...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - }, - }; -} - -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) => { - // Single argument is hot path, implicit coercion is faster than anything - // eslint-disable-next-line no-implicit-coercion - const builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' ')); - - // We alter the prototype because we must return a function, but there is - // no way to create a function with a different prototype - Object.setPrototypeOf(builder, proto); - - builder[GENERATOR] = self; - builder[STYLER] = _styler; - builder[IS_EMPTY] = _isEmpty; - - return builder; -}; - -const applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self[IS_EMPTY] ? '' : string; - } - - let styler = self[STYLER]; - - if (styler === undefined) { - return string; - } - - const {openAll, closeAll} = styler; - if (string.includes('\u001B')) { - 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; -}; - -Object.defineProperties(createChalk.prototype, styles); - -const chalk = createChalk(); -export const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0}); - -export { - modifierNames, - foregroundColorNames, - backgroundColorNames, - colorNames, - - // TODO: Remove these aliases in the next major version - modifierNames as modifiers, - foregroundColorNames as foregroundColors, - backgroundColorNames as backgroundColors, - colorNames as colors, -} from './vendor/ansi-styles/index.js'; - -export { - stdoutColor as supportsColor, - stderrColor as supportsColorStderr, -}; - -export default chalk; diff --git a/node_modules/npm/node_modules/chalk/source/utilities.js b/node_modules/npm/node_modules/chalk/source/utilities.js deleted file mode 100644 index 4366dee..0000000 --- a/node_modules/npm/node_modules/chalk/source/utilities.js +++ /dev/null @@ -1,33 +0,0 @@ -// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`. -export function 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.slice(endIndex, index) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - - returnValue += string.slice(endIndex); - return returnValue; -} - -export function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { - let endIndex = 0; - let returnValue = ''; - do { - const gotCR = string[index - 1] === '\r'; - returnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\r\n' : '\n') + postfix; - endIndex = index + 1; - index = string.indexOf('\n', endIndex); - } while (index !== -1); - - returnValue += string.slice(endIndex); - return returnValue; -} diff --git a/node_modules/npm/node_modules/chalk/source/vendor/ansi-styles/index.js b/node_modules/npm/node_modules/chalk/source/vendor/ansi-styles/index.js deleted file mode 100644 index eaa7bed..0000000 --- a/node_modules/npm/node_modules/chalk/source/vendor/ansi-styles/index.js +++ /dev/null @@ -1,223 +0,0 @@ -const ANSI_BACKGROUND_OFFSET = 10; - -const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; - -const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; - -const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; - -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], - overline: [53, 55], - 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], - gray: [90, 39], // Alias of `blackBright` - grey: [90, 39], // Alias of `blackBright` - 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], - bgGray: [100, 49], // Alias of `bgBlackBright` - bgGrey: [100, 49], // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49], - }, -}; - -export const modifierNames = Object.keys(styles.modifier); -export const foregroundColorNames = Object.keys(styles.color); -export const backgroundColorNames = Object.keys(styles.bgColor); -export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; - -function assembleStyles() { - const codes = new Map(); - - 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'; - - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - - // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js - Object.defineProperties(styles, { - rgbToAnsi256: { - value(red, green, blue) { - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - - if (red > 248) { - return 231; - } - - return Math.round(((red - 8) / 247) * 24) + 232; - } - - return 16 - + (36 * Math.round(red / 255 * 5)) - + (6 * Math.round(green / 255 * 5)) - + Math.round(blue / 255 * 5); - }, - enumerable: false, - }, - hexToRgb: { - value(hex) { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - - let [colorString] = matches; - - if (colorString.length === 3) { - colorString = [...colorString].map(character => character + character).join(''); - } - - const integer = Number.parseInt(colorString, 16); - - return [ - /* eslint-disable no-bitwise */ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false, - }, - hexToAnsi256: { - value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false, - }, - ansi256ToAnsi: { - value(code) { - if (code < 8) { - return 30 + code; - } - - if (code < 16) { - return 90 + (code - 8); - } - - let red; - let green; - let blue; - - if (code >= 232) { - red = (((code - 232) * 10) + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - - const remainder = code % 36; - - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = (remainder % 6) / 5; - } - - const value = Math.max(red, green, blue) * 2; - - if (value === 0) { - return 30; - } - - // eslint-disable-next-line no-bitwise - let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); - - if (value === 2) { - result += 60; - } - - return result; - }, - enumerable: false, - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false, - }, - hexToAnsi: { - value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false, - }, - }); - - return styles; -} - -const ansiStyles = assembleStyles(); - -export default ansiStyles; diff --git a/node_modules/npm/node_modules/chalk/source/vendor/supports-color/browser.js b/node_modules/npm/node_modules/chalk/source/vendor/supports-color/browser.js deleted file mode 100644 index 9fa6888..0000000 --- a/node_modules/npm/node_modules/chalk/source/vendor/supports-color/browser.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-env browser */ - -const level = (() => { - if (navigator.userAgentData) { - const brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium'); - if (brand && brand.version > 93) { - return 3; - } - } - - if (/\b(Chrome|Chromium)\//.test(navigator.userAgent)) { - return 1; - } - - return 0; -})(); - -const colorSupport = level !== 0 && { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3, -}; - -const supportsColor = { - stdout: colorSupport, - stderr: colorSupport, -}; - -export default supportsColor; diff --git a/node_modules/npm/node_modules/chalk/source/vendor/supports-color/index.js b/node_modules/npm/node_modules/chalk/source/vendor/supports-color/index.js deleted file mode 100644 index 4ce0a2d..0000000 --- a/node_modules/npm/node_modules/chalk/source/vendor/supports-color/index.js +++ /dev/null @@ -1,182 +0,0 @@ -import process from 'node:process'; -import os from 'node:os'; -import tty from 'node:tty'; - -// From: https://github.com/sindresorhus/has-flag/blob/main/index.js -/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) { -function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : 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); -} - -const {env} = process; - -let flagForceColor; -if ( - hasFlag('no-color') - || hasFlag('no-colors') - || hasFlag('color=false') - || hasFlag('color=never') -) { - flagForceColor = 0; -} else if ( - hasFlag('color') - || hasFlag('colors') - || hasFlag('color=true') - || hasFlag('color=always') -) { - flagForceColor = 1; -} - -function envForceColor() { - if ('FORCE_COLOR' in env) { - if (env.FORCE_COLOR === 'true') { - return 1; - } - - if (env.FORCE_COLOR === 'false') { - return 0; - } - - return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.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, sniffFlags = true} = {}) { - const noFlagForceColor = envForceColor(); - if (noFlagForceColor !== undefined) { - flagForceColor = noFlagForceColor; - } - - const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; - - if (forceColor === 0) { - return 0; - } - - if (sniffFlags) { - if (hasFlag('color=16m') - || hasFlag('color=full') - || hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - } - - // Check for Azure DevOps pipelines. - // Has to be above the `!streamIsTTY` check. - if ('TF_BUILD' in env && 'AGENT_NAME' in env) { - return 1; - } - - 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]) >= 10_586 - ) { - return Number(osRelease[2]) >= 14_931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if ('GITHUB_ACTIONS' in env || 'GITEA_ACTIONS' in env) { - return 3; - } - - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].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 (env.TERM === 'xterm-kitty') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = Number.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; -} - -export function createSupportsColor(stream, options = {}) { - const level = _supportsColor(stream, { - streamIsTTY: stream && stream.isTTY, - ...options, - }); - - return translateLevel(level); -} - -const supportsColor = { - stdout: createSupportsColor({isTTY: tty.isatty(1)}), - stderr: createSupportsColor({isTTY: tty.isatty(2)}), -}; - -export default supportsColor; diff --git a/node_modules/npm/node_modules/chownr/LICENSE b/node_modules/npm/node_modules/chownr/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/chownr/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/chownr/chownr.js b/node_modules/npm/node_modules/chownr/chownr.js deleted file mode 100644 index 0d40932..0000000 --- a/node_modules/npm/node_modules/chownr/chownr.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict' -const fs = require('fs') -const path = require('path') - -/* istanbul ignore next */ -const LCHOWN = fs.lchown ? 'lchown' : 'chown' -/* istanbul ignore next */ -const LCHOWNSYNC = fs.lchownSync ? 'lchownSync' : 'chownSync' - -/* istanbul ignore next */ -const needEISDIRHandled = fs.lchown && - !process.version.match(/v1[1-9]+\./) && - !process.version.match(/v10\.[6-9]/) - -const lchownSync = (path, uid, gid) => { - try { - return fs[LCHOWNSYNC](path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const chownSync = (path, uid, gid) => { - try { - return fs.chownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'ENOENT') - throw er - } -} - -/* istanbul ignore next */ -const handleEISDIR = - needEISDIRHandled ? (path, uid, gid, cb) => er => { - // Node prior to v10 had a very questionable implementation of - // fs.lchown, which would always try to call fs.open on a directory - // Fall back to fs.chown in those cases. - if (!er || er.code !== 'EISDIR') - cb(er) - else - fs.chown(path, uid, gid, cb) - } - : (_, __, ___, cb) => cb - -/* istanbul ignore next */ -const handleEISDirSync = - needEISDIRHandled ? (path, uid, gid) => { - try { - return lchownSync(path, uid, gid) - } catch (er) { - if (er.code !== 'EISDIR') - throw er - chownSync(path, uid, gid) - } - } - : (path, uid, gid) => lchownSync(path, uid, gid) - -// fs.readdir could only accept an options object as of node v6 -const nodeVersion = process.version -let readdir = (path, options, cb) => fs.readdir(path, options, cb) -let readdirSync = (path, options) => fs.readdirSync(path, options) -/* istanbul ignore next */ -if (/^v4\./.test(nodeVersion)) - readdir = (path, options, cb) => fs.readdir(path, cb) - -const chown = (cpath, uid, gid, cb) => { - fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { - // Skip ENOENT error - cb(er && er.code !== 'ENOENT' ? er : null) - })) -} - -const chownrKid = (p, child, uid, gid, cb) => { - if (typeof child === 'string') - return fs.lstat(path.resolve(p, child), (er, stats) => { - // Skip ENOENT error - if (er) - return cb(er.code !== 'ENOENT' ? er : null) - stats.name = child - chownrKid(p, stats, uid, gid, cb) - }) - - if (child.isDirectory()) { - chownr(path.resolve(p, child.name), uid, gid, er => { - if (er) - return cb(er) - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - }) - } else { - const cpath = path.resolve(p, child.name) - chown(cpath, uid, gid, cb) - } -} - - -const chownr = (p, uid, gid, cb) => { - readdir(p, { withFileTypes: true }, (er, children) => { - // any error other than ENOTDIR or ENOTSUP means it's not readable, - // or doesn't exist. give up. - if (er) { - if (er.code === 'ENOENT') - return cb() - else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') - return cb(er) - } - if (er || !children.length) - return chown(p, uid, gid, cb) - - let len = children.length - let errState = null - const then = er => { - if (errState) - return - if (er) - return cb(errState = er) - if (-- len === 0) - return chown(p, uid, gid, cb) - } - - children.forEach(child => chownrKid(p, child, uid, gid, then)) - }) -} - -const chownrKidSync = (p, child, uid, gid) => { - if (typeof child === 'string') { - try { - const stats = fs.lstatSync(path.resolve(p, child)) - stats.name = child - child = stats - } catch (er) { - if (er.code === 'ENOENT') - return - else - throw er - } - } - - if (child.isDirectory()) - chownrSync(path.resolve(p, child.name), uid, gid) - - handleEISDirSync(path.resolve(p, child.name), uid, gid) -} - -const chownrSync = (p, uid, gid) => { - let children - try { - children = readdirSync(p, { withFileTypes: true }) - } catch (er) { - if (er.code === 'ENOENT') - return - else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') - return handleEISDirSync(p, uid, gid) - else - throw er - } - - if (children && children.length) - children.forEach(child => chownrKidSync(p, child, uid, gid)) - - return handleEISDirSync(p, uid, gid) -} - -module.exports = chownr -chownr.sync = chownrSync diff --git a/node_modules/npm/node_modules/chownr/package.json b/node_modules/npm/node_modules/chownr/package.json deleted file mode 100644 index 5b0214c..0000000 --- a/node_modules/npm/node_modules/chownr/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "chownr", - "description": "like `chown -R`", - "version": "2.0.0", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/chownr.git" - }, - "main": "chownr.js", - "files": [ - "chownr.js" - ], - "devDependencies": { - "mkdirp": "0.3", - "rimraf": "^2.7.1", - "tap": "^14.10.6" - }, - "tap": { - "check-coverage": true - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "license": "ISC", - "engines": { - "node": ">=10" - } -} diff --git a/node_modules/npm/node_modules/ci-info/LICENSE b/node_modules/npm/node_modules/ci-info/LICENSE deleted file mode 100644 index 95f61da..0000000 --- a/node_modules/npm/node_modules/ci-info/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Thomas Watson Steen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/ci-info/index.js b/node_modules/npm/node_modules/ci-info/index.js deleted file mode 100644 index 4790726..0000000 --- a/node_modules/npm/node_modules/ci-info/index.js +++ /dev/null @@ -1,90 +0,0 @@ -'use strict' - -const vendors = require('./vendors.json') - -const 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) { - const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env] - const isCI = envs.every(function (obj) { - return checkEnv(obj) - }) - - exports[vendor.constant] = isCI - - if (!isCI) { - return - } - - 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 !== 'false' && // Bypass all checks if CI env is explicitly set to 'false' - (env.BUILD_ID || // Jenkins, Cloudbees - env.BUILD_NUMBER || // Jenkins, TeamCity - env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari - env.CI_APP_ID || // Appflow - env.CI_BUILD_ID || // Appflow - env.CI_BUILD_NUMBER || // Appflow - env.CI_NAME || // Codeship and others - env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI - env.RUN_ID || // TaskCluster, dsari - exports.name || - false) -) - -function checkEnv (obj) { - // "env": "CIRRUS" - if (typeof obj === 'string') return !!env[obj] - - // "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" } - if ('env' in obj) { - // Currently there are no other types, uncomment when there are - // if ('includes' in obj) { - return env[obj.env] && env[obj.env].includes(obj.includes) - // } - } - if ('any' in obj) { - return obj.any.some(function (k) { - return !!env[k] - }) - } - return Object.keys(obj).every(function (k) { - return env[k] === obj[k] - }) -} diff --git a/node_modules/npm/node_modules/ci-info/package.json b/node_modules/npm/node_modules/ci-info/package.json deleted file mode 100644 index 3c6b9e4..0000000 --- a/node_modules/npm/node_modules/ci-info/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "ci-info", - "version": "4.0.0", - "description": "Get details about the current Continuous Integration environment", - "main": "index.js", - "typings": "index.d.ts", - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", - "license": "MIT", - "repository": "https://github.com/watson/ci-info.git", - "bugs": "https://github.com/watson/ci-info/issues", - "homepage": "https://github.com/watson/ci-info", - "keywords": [ - "ci", - "continuous", - "integration", - "test", - "detect" - ], - "files": [ - "vendors.json", - "index.js", - "index.d.ts", - "CHANGELOG.md" - ], - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "scripts": { - "lint:fix": "standard --fix", - "test": "standard && node test.js", - "prepare": "husky install" - }, - "devDependencies": { - "clear-module": "^4.1.2", - "husky": "^8.0.3", - "standard": "^17.1.0", - "tape": "^5.7.0" - }, - "engines": { - "node": ">=8" - } -} diff --git a/node_modules/npm/node_modules/ci-info/vendors.json b/node_modules/npm/node_modules/ci-info/vendors.json deleted file mode 100644 index 6b65e3f..0000000 --- a/node_modules/npm/node_modules/ci-info/vendors.json +++ /dev/null @@ -1,336 +0,0 @@ -[ - { - "name": "Agola CI", - "constant": "AGOLA", - "env": "AGOLA_GIT_REF", - "pr": "AGOLA_PULL_REQUEST_ID" - }, - { - "name": "Appcircle", - "constant": "APPCIRCLE", - "env": "AC_APPCIRCLE" - }, - { - "name": "AppVeyor", - "constant": "APPVEYOR", - "env": "APPVEYOR", - "pr": "APPVEYOR_PULL_REQUEST_NUMBER" - }, - { - "name": "AWS CodeBuild", - "constant": "CODEBUILD", - "env": "CODEBUILD_BUILD_ARN" - }, - { - "name": "Azure Pipelines", - "constant": "AZURE_PIPELINES", - "env": "TF_BUILD", - "pr": { - "BUILD_REASON": "PullRequest" - } - }, - { - "name": "Bamboo", - "constant": "BAMBOO", - "env": "bamboo_planKey" - }, - { - "name": "Bitbucket Pipelines", - "constant": "BITBUCKET", - "env": "BITBUCKET_COMMIT", - "pr": "BITBUCKET_PR_ID" - }, - { - "name": "Bitrise", - "constant": "BITRISE", - "env": "BITRISE_IO", - "pr": "BITRISE_PULL_REQUEST" - }, - { - "name": "Buddy", - "constant": "BUDDY", - "env": "BUDDY_WORKSPACE_ID", - "pr": "BUDDY_EXECUTION_PULL_REQUEST_ID" - }, - { - "name": "Buildkite", - "constant": "BUILDKITE", - "env": "BUILDKITE", - "pr": { - "env": "BUILDKITE_PULL_REQUEST", - "ne": "false" - } - }, - { - "name": "CircleCI", - "constant": "CIRCLE", - "env": "CIRCLECI", - "pr": "CIRCLE_PULL_REQUEST" - }, - { - "name": "Cirrus CI", - "constant": "CIRRUS", - "env": "CIRRUS_CI", - "pr": "CIRRUS_PR" - }, - { - "name": "Codefresh", - "constant": "CODEFRESH", - "env": "CF_BUILD_ID", - "pr": { - "any": [ - "CF_PULL_REQUEST_NUMBER", - "CF_PULL_REQUEST_ID" - ] - } - }, - { - "name": "Codemagic", - "constant": "CODEMAGIC", - "env": "CM_BUILD_ID", - "pr": "CM_PULL_REQUEST" - }, - { - "name": "Codeship", - "constant": "CODESHIP", - "env": { - "CI_NAME": "codeship" - } - }, - { - "name": "Drone", - "constant": "DRONE", - "env": "DRONE", - "pr": { - "DRONE_BUILD_EVENT": "pull_request" - } - }, - { - "name": "dsari", - "constant": "DSARI", - "env": "DSARI" - }, - { - "name": "Earthly", - "constant": "EARTHLY", - "env": "EARTHLY_CI" - }, - { - "name": "Expo Application Services", - "constant": "EAS", - "env": "EAS_BUILD" - }, - { - "name": "Gerrit", - "constant": "GERRIT", - "env": "GERRIT_PROJECT" - }, - { - "name": "Gitea Actions", - "constant": "GITEA_ACTIONS", - "env": "GITEA_ACTIONS" - }, - { - "name": "GitHub Actions", - "constant": "GITHUB_ACTIONS", - "env": "GITHUB_ACTIONS", - "pr": { - "GITHUB_EVENT_NAME": "pull_request" - } - }, - { - "name": "GitLab CI", - "constant": "GITLAB", - "env": "GITLAB_CI", - "pr": "CI_MERGE_REQUEST_ID" - }, - { - "name": "GoCD", - "constant": "GOCD", - "env": "GO_PIPELINE_LABEL" - }, - { - "name": "Google Cloud Build", - "constant": "GOOGLE_CLOUD_BUILD", - "env": "BUILDER_OUTPUT" - }, - { - "name": "Harness CI", - "constant": "HARNESS", - "env": "HARNESS_BUILD_ID" - }, - { - "name": "Heroku", - "constant": "HEROKU", - "env": { - "env": "NODE", - "includes": "/app/.heroku/node/bin/node" - } - }, - { - "name": "Hudson", - "constant": "HUDSON", - "env": "HUDSON_URL" - }, - { - "name": "Jenkins", - "constant": "JENKINS", - "env": [ - "JENKINS_URL", - "BUILD_ID" - ], - "pr": { - "any": [ - "ghprbPullId", - "CHANGE_ID" - ] - } - }, - { - "name": "LayerCI", - "constant": "LAYERCI", - "env": "LAYERCI", - "pr": "LAYERCI_PULL_REQUEST" - }, - { - "name": "Magnum CI", - "constant": "MAGNUM", - "env": "MAGNUM" - }, - { - "name": "Netlify CI", - "constant": "NETLIFY", - "env": "NETLIFY", - "pr": { - "env": "PULL_REQUEST", - "ne": "false" - } - }, - { - "name": "Nevercode", - "constant": "NEVERCODE", - "env": "NEVERCODE", - "pr": { - "env": "NEVERCODE_PULL_REQUEST", - "ne": "false" - } - }, - { - "name": "Prow", - "constant": "PROW", - "env": "PROW_JOB_ID" - }, - { - "name": "ReleaseHub", - "constant": "RELEASEHUB", - "env": "RELEASE_BUILD_ID" - }, - { - "name": "Render", - "constant": "RENDER", - "env": "RENDER", - "pr": { - "IS_PULL_REQUEST": "true" - } - }, - { - "name": "Sail CI", - "constant": "SAIL", - "env": "SAILCI", - "pr": "SAIL_PULL_REQUEST_NUMBER" - }, - { - "name": "Screwdriver", - "constant": "SCREWDRIVER", - "env": "SCREWDRIVER", - "pr": { - "env": "SD_PULL_REQUEST", - "ne": "false" - } - }, - { - "name": "Semaphore", - "constant": "SEMAPHORE", - "env": "SEMAPHORE", - "pr": "PULL_REQUEST_NUMBER" - }, - { - "name": "Sourcehut", - "constant": "SOURCEHUT", - "env": { - "CI_NAME": "sourcehut" - } - }, - { - "name": "Strider CD", - "constant": "STRIDER", - "env": "STRIDER" - }, - { - "name": "TaskCluster", - "constant": "TASKCLUSTER", - "env": [ - "TASK_ID", - "RUN_ID" - ] - }, - { - "name": "TeamCity", - "constant": "TEAMCITY", - "env": "TEAMCITY_VERSION" - }, - { - "name": "Travis CI", - "constant": "TRAVIS", - "env": "TRAVIS", - "pr": { - "env": "TRAVIS_PULL_REQUEST", - "ne": "false" - } - }, - { - "name": "Vela", - "constant": "VELA", - "env": "VELA", - "pr": { - "VELA_PULL_REQUEST": "1" - } - }, - { - "name": "Vercel", - "constant": "VERCEL", - "env": { - "any": [ - "NOW_BUILDER", - "VERCEL" - ] - }, - "pr": "VERCEL_GIT_PULL_REQUEST_ID" - }, - { - "name": "Visual Studio App Center", - "constant": "APPCENTER", - "env": "APPCENTER_BUILD_ID" - }, - { - "name": "Woodpecker", - "constant": "WOODPECKER", - "env": { - "CI": "woodpecker" - }, - "pr": { - "CI_BUILD_EVENT": "pull_request" - } - }, - { - "name": "Xcode Cloud", - "constant": "XCODE_CLOUD", - "env": "CI_XCODE_PROJECT", - "pr": "CI_PULL_REQUEST_NUMBER" - }, - { - "name": "Xcode Server", - "constant": "XCODE_SERVER", - "env": "XCS" - } -] diff --git a/node_modules/npm/node_modules/cidr-regex/LICENSE b/node_modules/npm/node_modules/cidr-regex/LICENSE deleted file mode 100644 index 9669c20..0000000 --- a/node_modules/npm/node_modules/cidr-regex/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) silverwind -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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/npm/node_modules/cidr-regex/index.js b/node_modules/npm/node_modules/cidr-regex/index.js deleted file mode 100644 index 61597c6..0000000 --- a/node_modules/npm/node_modules/cidr-regex/index.js +++ /dev/null @@ -1,15 +0,0 @@ -import ipRegex from "ip-regex"; - -const defaultOpts = {exact: false}; -const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; -const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; - -// pre-compile only the exact regexes as global flag makes regex objects stateful -const v4exact = new RegExp(`^${v4str}$`); -const v6exact = new RegExp(`^${v6str}$`); -const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); - -const cidrRegex = ({exact} = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); -export const v4 = cidrRegex.v4 = ({exact} = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); -export const v6 = cidrRegex.v6 = ({exact} = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); -export default cidrRegex; diff --git a/node_modules/npm/node_modules/cidr-regex/package.json b/node_modules/npm/node_modules/cidr-regex/package.json deleted file mode 100644 index 4f74346..0000000 --- a/node_modules/npm/node_modules/cidr-regex/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "cidr-regex", - "version": "4.0.3", - "description": "Regular expression for matching IP addresses in CIDR notation", - "author": "silverwind ", - "contributors": [ - "Felipe Apostol (http://flipjs.io/)" - ], - "repository": "silverwind/cidr-regex", - "license": "BSD-2-Clause", - "type": "module", - "exports": "./index.js", - "sideEffects": false, - "engines": { - "node": ">=14" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "dependencies": { - "ip-regex": "^5.0.0" - }, - "devDependencies": { - "eslint": "8.37.0", - "eslint-config-silverwind": "65.1.3", - "tsd": "0.28.1", - "updates": "13.2.9", - "versions": "10.4.2", - "vitest": "0.29.8" - } -} diff --git a/node_modules/npm/node_modules/clean-stack/index.js b/node_modules/npm/node_modules/clean-stack/index.js deleted file mode 100644 index 8c1dcc4..0000000 --- a/node_modules/npm/node_modules/clean-stack/index.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; -const os = require('os'); - -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'); -}; diff --git a/node_modules/npm/node_modules/clean-stack/license b/node_modules/npm/node_modules/clean-stack/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/clean-stack/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/clean-stack/package.json b/node_modules/npm/node_modules/clean-stack/package.json deleted file mode 100644 index 719fdff..0000000 --- a/node_modules/npm/node_modules/clean-stack/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "clean-stack", - "version": "2.2.0", - "description": "Clean up error stack traces", - "license": "MIT", - "repository": "sindresorhus/clean-stack", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "clean", - "stack", - "trace", - "traces", - "error", - "err", - "electron" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "browser": { - "os": false - } -} diff --git a/node_modules/npm/node_modules/cli-columns/color.js b/node_modules/npm/node_modules/cli-columns/color.js deleted file mode 100644 index 1102704..0000000 --- a/node_modules/npm/node_modules/cli-columns/color.js +++ /dev/null @@ -1,16 +0,0 @@ -const chalk = require('chalk'); -const columns = require('.'); - -// prettier-ignore -const values = [ - 'blue' + chalk.bgBlue('berry'), - '笔菠萝' + chalk.yellow('苹果笔'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'パイナップル', 'apricot', 'banana', - 'pineapple', chalk.bgRed.yellow('orange') -]; - -console.log(''); -console.log(columns(values)); -console.log(''); diff --git a/node_modules/npm/node_modules/cli-columns/index.js b/node_modules/npm/node_modules/cli-columns/index.js deleted file mode 100644 index 1090aa2..0000000 --- a/node_modules/npm/node_modules/cli-columns/index.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict'; - -const stringWidth = require('string-width'); -const stripAnsi = require('strip-ansi'); - -const concat = Array.prototype.concat; -const defaults = { - character: ' ', - newline: '\n', - padding: 2, - sort: true, - width: 0, -}; - -function byPlainText(a, b) { - const plainA = stripAnsi(a); - const plainB = stripAnsi(b); - - if (plainA === plainB) { - return 0; - } - - if (plainA > plainB) { - return 1; - } - - return -1; -} - -function makeArray() { - return []; -} - -function makeList(count) { - return Array.apply(null, Array(count)); -} - -function padCell(fullWidth, character, value) { - const valueWidth = stringWidth(value); - const filler = makeList(fullWidth - valueWidth + 1); - - return value + filler.join(character); -} - -function toRows(rows, cell, i) { - rows[i % rows.length].push(cell); - - return rows; -} - -function toString(arr) { - return arr.join(''); -} - -function columns(values, options) { - values = concat.apply([], values); - options = Object.assign({}, defaults, options); - - let cells = values.filter(Boolean).map(String); - - if (options.sort !== false) { - cells = cells.sort(byPlainText); - } - - const termWidth = options.width || process.stdout.columns; - const cellWidth = - Math.max.apply(null, cells.map(stringWidth)) + options.padding; - const columnCount = Math.floor(termWidth / cellWidth) || 1; - const rowCount = Math.ceil(cells.length / columnCount) || 1; - - if (columnCount === 1) { - return cells.join(options.newline); - } - - return cells - .map(padCell.bind(null, cellWidth, options.character)) - .reduce(toRows, makeList(rowCount).map(makeArray)) - .map(toString) - .join(options.newline); -} - -module.exports = columns; diff --git a/node_modules/npm/node_modules/cli-columns/license b/node_modules/npm/node_modules/cli-columns/license deleted file mode 100644 index 67147a9..0000000 --- a/node_modules/npm/node_modules/cli-columns/license +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Shannon Moeller (shannonmoeller.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js b/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/license b/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json b/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js b/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/license b/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json b/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/cli-columns/package.json b/node_modules/npm/node_modules/cli-columns/package.json deleted file mode 100644 index 129f2c1..0000000 --- a/node_modules/npm/node_modules/cli-columns/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "cli-columns", - "version": "4.0.0", - "description": "Columnated lists for the CLI.", - "scripts": { - "lint": "npx eslint --fix '*.js' && npx prettier --write '*.js'", - "test": "node test.js && node color.js" - }, - "keywords": [ - "ansi", - "cli", - "column", - "columnate", - "columns", - "grid", - "list", - "log", - "ls", - "row", - "rows", - "unicode", - "unix" - ], - "author": "Shannon Moeller (http://shannonmoeller.com)", - "homepage": "https://github.com/shannonmoeller/cli-columns#readme", - "repository": "shannonmoeller/cli-columns", - "license": "MIT", - "main": "index.js", - "files": [ - "*.js" - ], - "dependencies": { - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "devDependencies": { - "chalk": "^4.1.2" - }, - "engines": { - "node": ">= 10" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true - }, - "parserOptions": { - "ecmaVersion": 8 - } - }, - "prettier": { - "singleQuote": true - } -} diff --git a/node_modules/npm/node_modules/cli-columns/test.js b/node_modules/npm/node_modules/cli-columns/test.js deleted file mode 100644 index 4d95e7c..0000000 --- a/node_modules/npm/node_modules/cli-columns/test.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const chalk = require('chalk'); -const stripAnsi = require('strip-ansi'); -const columns = require('./index.js'); -const tests = []; - -function test(msg, fn) { - tests.push([msg, fn]); -} - -process.nextTick(async function run() { - for (const [msg, fn] of tests) { - try { - await fn(assert); - console.log(`pass - ${msg}`); - } catch (error) { - console.error(`fail - ${msg}`, error); - process.exit(1); - } - } -}); - -// prettier-ignore -test('should print one column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bar', 'qux']], { - width: 1 - }); - - const expected = - 'bar\n' + - 'bar\n' + - 'baz\n' + - 'foo\n' + - 'qux'; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print three column list', t => { - const cols = columns(['foo', ['bar', 'baz'], ['bat', 'qux']], { - width: 16 - }); - - const expected = - 'bar baz qux \n' + - 'bat foo '; - - t.equal(cols, expected); -}); - -// prettier-ignore -test('should print complex list', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - width: 80 - } - ); - - const expected = - 'apple bar durian star fruit \n' + - 'apricot baz foo 嶜憃撊 噾噿嚁 \n' + - 'banana pineapple blueberry pomegranate '; - - t.equal(stripAnsi(cols), expected); -}); - -// prettier-ignore -test('should optionally not sort', t => { - const cols = columns( - [ - 'foo', 'bar', 'baz', - chalk.cyan('嶜憃撊') + ' 噾噿嚁', - 'blue' + chalk.bgBlue('berry'), - chalk.red('apple'), 'pomegranate', - 'durian', chalk.green('star fruit'), - 'apricot', 'banana pineapple' - ], - { - sort: false, - width: 80 - } - ); - - const expected = - 'foo 嶜憃撊 噾噿嚁 pomegranate apricot \n' + - 'bar blueberry durian banana pineapple \n' + - 'baz apple star fruit '; - - t.equal(stripAnsi(cols), expected); -}); diff --git a/node_modules/npm/node_modules/cli-table3/LICENSE b/node_modules/npm/node_modules/cli-table3/LICENSE deleted file mode 100644 index a09b7de..0000000 --- a/node_modules/npm/node_modules/cli-table3/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2014 James Talmage - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/cli-table3/index.js b/node_modules/npm/node_modules/cli-table3/index.js deleted file mode 100644 index b49d920..0000000 --- a/node_modules/npm/node_modules/cli-table3/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/table'); \ No newline at end of file diff --git a/node_modules/npm/node_modules/cli-table3/package.json b/node_modules/npm/node_modules/cli-table3/package.json deleted file mode 100644 index 6e84bf6..0000000 --- a/node_modules/npm/node_modules/cli-table3/package.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "name": "cli-table3", - "version": "0.6.3", - "description": "Pretty unicode tables for the command line. Based on the original cli-table.", - "main": "index.js", - "types": "index.d.ts", - "files": [ - "src/", - "index.d.ts", - "index.js" - ], - "directories": { - "test": "test" - }, - "dependencies": { - "string-width": "^4.2.0" - }, - "devDependencies": { - "cli-table": "^0.3.1", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-prettier": "^3.0.0", - "jest": "^25.2.4", - "jest-runner-eslint": "^0.7.0", - "lerna-changelog": "^1.0.1", - "prettier": "2.3.2" - }, - "optionalDependencies": { - "@colors/colors": "1.5.0" - }, - "scripts": { - "changelog": "lerna-changelog", - "docs": "node ./scripts/update-docs.js", - "prettier": "prettier --write '{examples,lib,scripts,src,test}/**/*.js'", - "test": "jest --color", - "test:watch": "jest --color --watchAll --notify" - }, - "repository": { - "type": "git", - "url": "https://github.com/cli-table/cli-table3.git" - }, - "keywords": [ - "node", - "command", - "line", - "cli", - "table", - "tables", - "tabular", - "unicode", - "colors", - "grid" - ], - "author": "James Talmage", - "license": "MIT", - "bugs": { - "url": "https://github.com/cli-table/cli-table3/issues" - }, - "homepage": "https://github.com/cli-table/cli-table3", - "engines": { - "node": "10.* || >= 12.*" - }, - "changelog": { - "repo": "cli-table/cli-table3", - "labels": { - "breaking": ":boom: Breaking Change", - "enhancement": ":rocket: Enhancement", - "bug": ":bug: Bug Fix", - "documentation": ":memo: Documentation", - "internal": ":house: Internal" - } - }, - "jest": { - "projects": [ - { - "displayName": "test", - "testMatch": [ - "/test/**/*.js" - ] - }, - { - "runner": "jest-runner-eslint", - "displayName": "lint", - "testMatch": [ - "/examples/**/*.js", - "/lib/**/*.js", - "/scripts/**/*.js", - "/src/**/*.js", - "/test/**/*.js" - ] - } - ] - }, - "prettier": { - "printWidth": 120, - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "es5" - } -} diff --git a/node_modules/npm/node_modules/cli-table3/src/cell.js b/node_modules/npm/node_modules/cli-table3/src/cell.js deleted file mode 100644 index 8c3df35..0000000 --- a/node_modules/npm/node_modules/cli-table3/src/cell.js +++ /dev/null @@ -1,409 +0,0 @@ -const { info, debug } = require('./debug'); -const utils = require('./utils'); - -class Cell { - /** - * A representation of a cell within the table. - * Implementations must have `init` and `draw` methods, - * as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties. - * @param options - * @constructor - */ - constructor(options) { - this.setOptions(options); - - /** - * Each cell will have it's `x` and `y` values set by the `layout-manager` prior to - * `init` being called; - * @type {Number} - */ - this.x = null; - this.y = null; - } - - setOptions(options) { - if (['boolean', 'number', 'string'].indexOf(typeof options) !== -1) { - options = { content: '' + options }; - } - options = options || {}; - this.options = options; - let content = options.content; - if (['boolean', 'number', 'string'].indexOf(typeof content) !== -1) { - this.content = String(content); - } else if (!content) { - this.content = this.options.href || ''; - } else { - throw new Error('Content needs to be a primitive, got: ' + typeof content); - } - this.colSpan = options.colSpan || 1; - this.rowSpan = options.rowSpan || 1; - if (this.options.href) { - Object.defineProperty(this, 'href', { - get() { - return this.options.href; - }, - }); - } - } - - mergeTableOptions(tableOptions, cells) { - this.cells = cells; - - let optionsChars = this.options.chars || {}; - let tableChars = tableOptions.chars; - let chars = (this.chars = {}); - CHAR_NAMES.forEach(function (name) { - setOption(optionsChars, tableChars, name, chars); - }); - - this.truncate = this.options.truncate || tableOptions.truncate; - - let style = (this.options.style = this.options.style || {}); - let tableStyle = tableOptions.style; - setOption(style, tableStyle, 'padding-left', this); - setOption(style, tableStyle, 'padding-right', this); - this.head = style.head || tableStyle.head; - this.border = style.border || tableStyle.border; - - this.fixedWidth = tableOptions.colWidths[this.x]; - this.lines = this.computeLines(tableOptions); - - this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight; - this.desiredHeight = this.lines.length; - } - - computeLines(tableOptions) { - const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap; - const { wordWrap = tableWordWrap } = this.options; - if (this.fixedWidth && wordWrap) { - this.fixedWidth -= this.paddingLeft + this.paddingRight; - if (this.colSpan) { - let i = 1; - while (i < this.colSpan) { - this.fixedWidth += tableOptions.colWidths[this.x + i]; - i++; - } - } - const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions; - const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options; - return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary)); - } - return this.wrapLines(this.content.split('\n')); - } - - wrapLines(computedLines) { - const lines = utils.colorizeLines(computedLines); - if (this.href) { - return lines.map((line) => utils.hyperlink(this.href, line)); - } - return lines; - } - - /** - * Initializes the Cells data structure. - * - * @param tableOptions - A fully populated set of tableOptions. - * In addition to the standard default values, tableOptions must have fully populated the - * `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number - * of columns or rows (respectively) in this table, and each array item must be a Number. - * - */ - init(tableOptions) { - let x = this.x; - let y = this.y; - this.widths = tableOptions.colWidths.slice(x, x + this.colSpan); - this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan); - this.width = this.widths.reduce(sumPlusOne, -1); - this.height = this.heights.reduce(sumPlusOne, -1); - - this.hAlign = this.options.hAlign || tableOptions.colAligns[x]; - this.vAlign = this.options.vAlign || tableOptions.rowAligns[y]; - - this.drawRight = x + this.colSpan == tableOptions.colWidths.length; - } - - /** - * Draws the given line of the cell. - * This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`. - * @param lineNum - can be `top`, `bottom` or a numerical line number. - * @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how - * many rows below it's being called from. Otherwise it's undefined. - * @returns {String} The representation of this line. - */ - draw(lineNum, spanningCell) { - if (lineNum == 'top') return this.drawTop(this.drawRight); - if (lineNum == 'bottom') return this.drawBottom(this.drawRight); - let content = utils.truncate(this.content, 10, this.truncate); - if (!lineNum) { - info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`); - } else { - // debug(`${lineNum}-${this.x}: 1x${this.colSpan} RowSpanCell ${content}`); - } - let padLen = Math.max(this.height - this.lines.length, 0); - let padTop; - switch (this.vAlign) { - case 'center': - padTop = Math.ceil(padLen / 2); - break; - case 'bottom': - padTop = padLen; - break; - default: - padTop = 0; - } - if (lineNum < padTop || lineNum >= padTop + this.lines.length) { - return this.drawEmpty(this.drawRight, spanningCell); - } - let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height; - return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell); - } - - /** - * Renders the top line of the cell. - * @param drawRight - true if this method should render the right edge of the cell. - * @returns {String} - */ - drawTop(drawRight) { - let content = []; - if (this.cells) { - //TODO: cells should always exist - some tests don't fill it in though - this.widths.forEach(function (width, index) { - content.push(this._topLeftChar(index)); - content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], width)); - }, this); - } else { - content.push(this._topLeftChar(0)); - content.push(utils.repeat(this.chars[this.y == 0 ? 'top' : 'mid'], this.width)); - } - if (drawRight) { - content.push(this.chars[this.y == 0 ? 'topRight' : 'rightMid']); - } - return this.wrapWithStyleColors('border', content.join('')); - } - - _topLeftChar(offset) { - let x = this.x + offset; - let leftChar; - if (this.y == 0) { - leftChar = x == 0 ? 'topLeft' : offset == 0 ? 'topMid' : 'top'; - } else { - if (x == 0) { - leftChar = 'leftMid'; - } else { - leftChar = offset == 0 ? 'midMid' : 'bottomMid'; - if (this.cells) { - //TODO: cells should always exist - some tests don't fill it in though - let spanAbove = this.cells[this.y - 1][x] instanceof Cell.ColSpanCell; - if (spanAbove) { - leftChar = offset == 0 ? 'topMid' : 'mid'; - } - if (offset == 0) { - let i = 1; - while (this.cells[this.y][x - i] instanceof Cell.ColSpanCell) { - i++; - } - if (this.cells[this.y][x - i] instanceof Cell.RowSpanCell) { - leftChar = 'leftMid'; - } - } - } - } - } - return this.chars[leftChar]; - } - - wrapWithStyleColors(styleProperty, content) { - if (this[styleProperty] && this[styleProperty].length) { - try { - let colors = require('@colors/colors/safe'); - for (let i = this[styleProperty].length - 1; i >= 0; i--) { - colors = colors[this[styleProperty][i]]; - } - return colors(content); - } catch (e) { - return content; - } - } else { - return content; - } - } - - /** - * Renders a line of text. - * @param lineNum - Which line of text to render. This is not necessarily the line within the cell. - * There may be top-padding above the first line of text. - * @param drawRight - true if this method should render the right edge of the cell. - * @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even - * if the text fits. This is used when the cell is vertically truncated. If `false` the text should - * only include the truncation symbol if the text will not fit horizontally within the cell width. - * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined. - * @returns {String} - */ - drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) { - let left = this.chars[this.x == 0 ? 'left' : 'middle']; - if (this.x && spanningCell && this.cells) { - let cellLeft = this.cells[this.y + spanningCell][this.x - 1]; - while (cellLeft instanceof ColSpanCell) { - cellLeft = this.cells[cellLeft.y][cellLeft.x - 1]; - } - if (!(cellLeft instanceof RowSpanCell)) { - left = this.chars['rightMid']; - } - } - let leftPadding = utils.repeat(' ', this.paddingLeft); - let right = drawRight ? this.chars['right'] : ''; - let rightPadding = utils.repeat(' ', this.paddingRight); - let line = this.lines[lineNum]; - let len = this.width - (this.paddingLeft + this.paddingRight); - if (forceTruncationSymbol) line += this.truncate || '…'; - let content = utils.truncate(line, len, this.truncate); - content = utils.pad(content, len, ' ', this.hAlign); - content = leftPadding + content + rightPadding; - return this.stylizeLine(left, content, right); - } - - stylizeLine(left, content, right) { - left = this.wrapWithStyleColors('border', left); - right = this.wrapWithStyleColors('border', right); - if (this.y === 0) { - content = this.wrapWithStyleColors('head', content); - } - return left + content + right; - } - - /** - * Renders the bottom line of the cell. - * @param drawRight - true if this method should render the right edge of the cell. - * @returns {String} - */ - drawBottom(drawRight) { - let left = this.chars[this.x == 0 ? 'bottomLeft' : 'bottomMid']; - let content = utils.repeat(this.chars.bottom, this.width); - let right = drawRight ? this.chars['bottomRight'] : ''; - return this.wrapWithStyleColors('border', left + content + right); - } - - /** - * Renders a blank line of text within the cell. Used for top and/or bottom padding. - * @param drawRight - true if this method should render the right edge of the cell. - * @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined. - * @returns {String} - */ - drawEmpty(drawRight, spanningCell) { - let left = this.chars[this.x == 0 ? 'left' : 'middle']; - if (this.x && spanningCell && this.cells) { - let cellLeft = this.cells[this.y + spanningCell][this.x - 1]; - while (cellLeft instanceof ColSpanCell) { - cellLeft = this.cells[cellLeft.y][cellLeft.x - 1]; - } - if (!(cellLeft instanceof RowSpanCell)) { - left = this.chars['rightMid']; - } - } - let right = drawRight ? this.chars['right'] : ''; - let content = utils.repeat(' ', this.width); - return this.stylizeLine(left, content, right); - } -} - -class ColSpanCell { - /** - * A Cell that doesn't do anything. It just draws empty lines. - * Used as a placeholder in column spanning. - * @constructor - */ - constructor() {} - - draw(lineNum) { - if (typeof lineNum === 'number') { - debug(`${this.y}-${this.x}: 1x1 ColSpanCell`); - } - return ''; - } - - init() {} - - mergeTableOptions() {} -} - -class RowSpanCell { - /** - * A placeholder Cell for a Cell that spans multiple rows. - * It delegates rendering to the original cell, but adds the appropriate offset. - * @param originalCell - * @constructor - */ - constructor(originalCell) { - this.originalCell = originalCell; - } - - init(tableOptions) { - let y = this.y; - let originalY = this.originalCell.y; - this.cellOffset = y - originalY; - this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset); - } - - draw(lineNum) { - if (lineNum == 'top') { - return this.originalCell.draw(this.offset, this.cellOffset); - } - if (lineNum == 'bottom') { - return this.originalCell.draw('bottom'); - } - debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`); - return this.originalCell.draw(this.offset + 1 + lineNum); - } - - mergeTableOptions() {} -} - -function firstDefined(...args) { - return args.filter((v) => v !== undefined && v !== null).shift(); -} - -// HELPER FUNCTIONS -function setOption(objA, objB, nameB, targetObj) { - let nameA = nameB.split('-'); - if (nameA.length > 1) { - nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1); - nameA = nameA.join(''); - targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]); - } else { - targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]); - } -} - -function findDimension(dimensionTable, startingIndex, span) { - let ret = dimensionTable[startingIndex]; - for (let i = 1; i < span; i++) { - ret += 1 + dimensionTable[startingIndex + i]; - } - return ret; -} - -function sumPlusOne(a, b) { - return a + b + 1; -} - -let CHAR_NAMES = [ - 'top', - 'top-mid', - 'top-left', - 'top-right', - 'bottom', - 'bottom-mid', - 'bottom-left', - 'bottom-right', - 'left', - 'left-mid', - 'mid', - 'mid-mid', - 'right', - 'right-mid', - 'middle', -]; - -module.exports = Cell; -module.exports.ColSpanCell = ColSpanCell; -module.exports.RowSpanCell = RowSpanCell; diff --git a/node_modules/npm/node_modules/cli-table3/src/debug.js b/node_modules/npm/node_modules/cli-table3/src/debug.js deleted file mode 100644 index 6acfb03..0000000 --- a/node_modules/npm/node_modules/cli-table3/src/debug.js +++ /dev/null @@ -1,28 +0,0 @@ -let messages = []; -let level = 0; - -const debug = (msg, min) => { - if (level >= min) { - messages.push(msg); - } -}; - -debug.WARN = 1; -debug.INFO = 2; -debug.DEBUG = 3; - -debug.reset = () => { - messages = []; -}; - -debug.setDebugLevel = (v) => { - level = v; -}; - -debug.warn = (msg) => debug(msg, debug.WARN); -debug.info = (msg) => debug(msg, debug.INFO); -debug.debug = (msg) => debug(msg, debug.DEBUG); - -debug.debugMessages = () => messages; - -module.exports = debug; diff --git a/node_modules/npm/node_modules/cli-table3/src/layout-manager.js b/node_modules/npm/node_modules/cli-table3/src/layout-manager.js deleted file mode 100644 index 3937452..0000000 --- a/node_modules/npm/node_modules/cli-table3/src/layout-manager.js +++ /dev/null @@ -1,254 +0,0 @@ -const { warn, debug } = require('./debug'); -const Cell = require('./cell'); -const { ColSpanCell, RowSpanCell } = Cell; - -(function () { - function next(alloc, col) { - if (alloc[col] > 0) { - return next(alloc, col + 1); - } - return col; - } - - function layoutTable(table) { - let alloc = {}; - table.forEach(function (row, rowIndex) { - let col = 0; - row.forEach(function (cell) { - cell.y = rowIndex; - // Avoid erroneous call to next() on first row - cell.x = rowIndex ? next(alloc, col) : col; - const rowSpan = cell.rowSpan || 1; - const colSpan = cell.colSpan || 1; - if (rowSpan > 1) { - for (let cs = 0; cs < colSpan; cs++) { - alloc[cell.x + cs] = rowSpan; - } - } - col = cell.x + colSpan; - }); - Object.keys(alloc).forEach((idx) => { - alloc[idx]--; - if (alloc[idx] < 1) delete alloc[idx]; - }); - }); - } - - function maxWidth(table) { - let mw = 0; - table.forEach(function (row) { - row.forEach(function (cell) { - mw = Math.max(mw, cell.x + (cell.colSpan || 1)); - }); - }); - return mw; - } - - function maxHeight(table) { - return table.length; - } - - function cellsConflict(cell1, cell2) { - let yMin1 = cell1.y; - let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1); - let yMin2 = cell2.y; - let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1); - let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1); - - let xMin1 = cell1.x; - let xMax1 = cell1.x - 1 + (cell1.colSpan || 1); - let xMin2 = cell2.x; - let xMax2 = cell2.x - 1 + (cell2.colSpan || 1); - let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1); - - return yConflict && xConflict; - } - - function conflictExists(rows, x, y) { - let i_max = Math.min(rows.length - 1, y); - let cell = { x: x, y: y }; - for (let i = 0; i <= i_max; i++) { - let row = rows[i]; - for (let j = 0; j < row.length; j++) { - if (cellsConflict(cell, row[j])) { - return true; - } - } - } - return false; - } - - function allBlank(rows, y, xMin, xMax) { - for (let x = xMin; x < xMax; x++) { - if (conflictExists(rows, x, y)) { - return false; - } - } - return true; - } - - function addRowSpanCells(table) { - table.forEach(function (row, rowIndex) { - row.forEach(function (cell) { - for (let i = 1; i < cell.rowSpan; i++) { - let rowSpanCell = new RowSpanCell(cell); - rowSpanCell.x = cell.x; - rowSpanCell.y = cell.y + i; - rowSpanCell.colSpan = cell.colSpan; - insertCell(rowSpanCell, table[rowIndex + i]); - } - }); - }); - } - - function addColSpanCells(cellRows) { - for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) { - let cellColumns = cellRows[rowIndex]; - for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) { - let cell = cellColumns[columnIndex]; - for (let k = 1; k < cell.colSpan; k++) { - let colSpanCell = new ColSpanCell(); - colSpanCell.x = cell.x + k; - colSpanCell.y = cell.y; - cellColumns.splice(columnIndex + 1, 0, colSpanCell); - } - } - } - } - - function insertCell(cell, row) { - let x = 0; - while (x < row.length && row[x].x < cell.x) { - x++; - } - row.splice(x, 0, cell); - } - - function fillInTable(table) { - let h_max = maxHeight(table); - let w_max = maxWidth(table); - debug(`Max rows: ${h_max}; Max cols: ${w_max}`); - for (let y = 0; y < h_max; y++) { - for (let x = 0; x < w_max; x++) { - if (!conflictExists(table, x, y)) { - let opts = { x: x, y: y, colSpan: 1, rowSpan: 1 }; - x++; - while (x < w_max && !conflictExists(table, x, y)) { - opts.colSpan++; - x++; - } - let y2 = y + 1; - while (y2 < h_max && allBlank(table, y2, opts.x, opts.x + opts.colSpan)) { - opts.rowSpan++; - y2++; - } - let cell = new Cell(opts); - cell.x = opts.x; - cell.y = opts.y; - warn(`Missing cell at ${cell.y}-${cell.x}.`); - insertCell(cell, table[y]); - } - } - } - } - - function generateCells(rows) { - return rows.map(function (row) { - if (!Array.isArray(row)) { - let key = Object.keys(row)[0]; - row = row[key]; - if (Array.isArray(row)) { - row = row.slice(); - row.unshift(key); - } else { - row = [key, row]; - } - } - return row.map(function (cell) { - return new Cell(cell); - }); - }); - } - - function makeTableLayout(rows) { - let cellRows = generateCells(rows); - layoutTable(cellRows); - fillInTable(cellRows); - addRowSpanCells(cellRows); - addColSpanCells(cellRows); - return cellRows; - } - - module.exports = { - makeTableLayout: makeTableLayout, - layoutTable: layoutTable, - addRowSpanCells: addRowSpanCells, - maxWidth: maxWidth, - fillInTable: fillInTable, - computeWidths: makeComputeWidths('colSpan', 'desiredWidth', 'x', 1), - computeHeights: makeComputeWidths('rowSpan', 'desiredHeight', 'y', 1), - }; -})(); - -function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) { - return function (vals, table) { - let result = []; - let spanners = []; - let auto = {}; - table.forEach(function (row) { - row.forEach(function (cell) { - if ((cell[colSpan] || 1) > 1) { - spanners.push(cell); - } else { - result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin); - } - }); - }); - - vals.forEach(function (val, index) { - if (typeof val === 'number') { - result[index] = val; - } - }); - - //spanners.forEach(function(cell){ - for (let k = spanners.length - 1; k >= 0; k--) { - let cell = spanners[k]; - let span = cell[colSpan]; - let col = cell[x]; - let existingWidth = result[col]; - let editableCols = typeof vals[col] === 'number' ? 0 : 1; - if (typeof existingWidth === 'number') { - for (let i = 1; i < span; i++) { - existingWidth += 1 + result[col + i]; - if (typeof vals[col + i] !== 'number') { - editableCols++; - } - } - } else { - existingWidth = desiredWidth === 'desiredWidth' ? cell.desiredWidth - 1 : 1; - if (!auto[col] || auto[col] < existingWidth) { - auto[col] = existingWidth; - } - } - - if (cell[desiredWidth] > existingWidth) { - let i = 0; - while (editableCols > 0 && cell[desiredWidth] > existingWidth) { - if (typeof vals[col + i] !== 'number') { - let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols); - existingWidth += dif; - result[col + i] += dif; - editableCols--; - } - i++; - } - } - } - - Object.assign(vals, result, auto); - for (let j = 0; j < vals.length; j++) { - vals[j] = Math.max(forcedMin, vals[j] || 0); - } - }; -} diff --git a/node_modules/npm/node_modules/cli-table3/src/table.js b/node_modules/npm/node_modules/cli-table3/src/table.js deleted file mode 100644 index eb4a9bd..0000000 --- a/node_modules/npm/node_modules/cli-table3/src/table.js +++ /dev/null @@ -1,106 +0,0 @@ -const debug = require('./debug'); -const utils = require('./utils'); -const tableLayout = require('./layout-manager'); - -class Table extends Array { - constructor(opts) { - super(); - - const options = utils.mergeOptions(opts); - Object.defineProperty(this, 'options', { - value: options, - enumerable: options.debug, - }); - - if (options.debug) { - switch (typeof options.debug) { - case 'boolean': - debug.setDebugLevel(debug.WARN); - break; - case 'number': - debug.setDebugLevel(options.debug); - break; - case 'string': - debug.setDebugLevel(parseInt(options.debug, 10)); - break; - default: - debug.setDebugLevel(debug.WARN); - debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`); - } - Object.defineProperty(this, 'messages', { - get() { - return debug.debugMessages(); - }, - }); - } - } - - toString() { - let array = this; - let headersPresent = this.options.head && this.options.head.length; - if (headersPresent) { - array = [this.options.head]; - if (this.length) { - array.push.apply(array, this); - } - } else { - this.options.style.head = []; - } - - let cells = tableLayout.makeTableLayout(array); - - cells.forEach(function (row) { - row.forEach(function (cell) { - cell.mergeTableOptions(this.options, cells); - }, this); - }, this); - - tableLayout.computeWidths(this.options.colWidths, cells); - tableLayout.computeHeights(this.options.rowHeights, cells); - - cells.forEach(function (row) { - row.forEach(function (cell) { - cell.init(this.options); - }, this); - }, this); - - let result = []; - - for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) { - let row = cells[rowIndex]; - let heightOfRow = this.options.rowHeights[rowIndex]; - - if (rowIndex === 0 || !this.options.style.compact || (rowIndex == 1 && headersPresent)) { - doDraw(row, 'top', result); - } - - for (let lineNum = 0; lineNum < heightOfRow; lineNum++) { - doDraw(row, lineNum, result); - } - - if (rowIndex + 1 == cells.length) { - doDraw(row, 'bottom', result); - } - } - - return result.join('\n'); - } - - get width() { - let str = this.toString().split('\n'); - return str[0].length; - } -} - -Table.reset = () => debug.reset(); - -function doDraw(row, lineNum, result) { - let line = []; - row.forEach(function (cell) { - line.push(cell.draw(lineNum)); - }); - let str = line.join(''); - if (str.length) result.push(str); -} - -module.exports = Table; diff --git a/node_modules/npm/node_modules/cli-table3/src/utils.js b/node_modules/npm/node_modules/cli-table3/src/utils.js deleted file mode 100644 index c922c5b..0000000 --- a/node_modules/npm/node_modules/cli-table3/src/utils.js +++ /dev/null @@ -1,336 +0,0 @@ -const stringWidth = require('string-width'); - -function codeRegex(capture) { - return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g; -} - -function strlen(str) { - let code = codeRegex(); - let stripped = ('' + str).replace(code, ''); - let split = stripped.split('\n'); - return split.reduce(function (memo, s) { - return stringWidth(s) > memo ? stringWidth(s) : memo; - }, 0); -} - -function repeat(str, times) { - return Array(times + 1).join(str); -} - -function pad(str, len, pad, dir) { - let length = strlen(str); - if (len + 1 >= length) { - let padlen = len - length; - switch (dir) { - case 'right': { - str = repeat(pad, padlen) + str; - break; - } - case 'center': { - let right = Math.ceil(padlen / 2); - let left = padlen - right; - str = repeat(pad, left) + str + repeat(pad, right); - break; - } - default: { - str = str + repeat(pad, padlen); - break; - } - } - } - return str; -} - -let codeCache = {}; - -function addToCodeCache(name, on, off) { - on = '\u001b[' + on + 'm'; - off = '\u001b[' + off + 'm'; - codeCache[on] = { set: name, to: true }; - codeCache[off] = { set: name, to: false }; - codeCache[name] = { on: on, off: off }; -} - -//https://github.com/Marak/colors.js/blob/master/lib/styles.js -addToCodeCache('bold', 1, 22); -addToCodeCache('italics', 3, 23); -addToCodeCache('underline', 4, 24); -addToCodeCache('inverse', 7, 27); -addToCodeCache('strikethrough', 9, 29); - -function updateState(state, controlChars) { - let controlCode = controlChars[1] ? parseInt(controlChars[1].split(';')[0]) : 0; - if ((controlCode >= 30 && controlCode <= 39) || (controlCode >= 90 && controlCode <= 97)) { - state.lastForegroundAdded = controlChars[0]; - return; - } - if ((controlCode >= 40 && controlCode <= 49) || (controlCode >= 100 && controlCode <= 107)) { - state.lastBackgroundAdded = controlChars[0]; - return; - } - if (controlCode === 0) { - for (let i in state) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(state, i)) { - delete state[i]; - } - } - return; - } - let info = codeCache[controlChars[0]]; - if (info) { - state[info.set] = info.to; - } -} - -function readState(line) { - let code = codeRegex(true); - let controlChars = code.exec(line); - let state = {}; - while (controlChars !== null) { - updateState(state, controlChars); - controlChars = code.exec(line); - } - return state; -} - -function unwindState(state, ret) { - let lastBackgroundAdded = state.lastBackgroundAdded; - let lastForegroundAdded = state.lastForegroundAdded; - - delete state.lastBackgroundAdded; - delete state.lastForegroundAdded; - - Object.keys(state).forEach(function (key) { - if (state[key]) { - ret += codeCache[key].off; - } - }); - - if (lastBackgroundAdded && lastBackgroundAdded != '\u001b[49m') { - ret += '\u001b[49m'; - } - if (lastForegroundAdded && lastForegroundAdded != '\u001b[39m') { - ret += '\u001b[39m'; - } - - return ret; -} - -function rewindState(state, ret) { - let lastBackgroundAdded = state.lastBackgroundAdded; - let lastForegroundAdded = state.lastForegroundAdded; - - delete state.lastBackgroundAdded; - delete state.lastForegroundAdded; - - Object.keys(state).forEach(function (key) { - if (state[key]) { - ret = codeCache[key].on + ret; - } - }); - - if (lastBackgroundAdded && lastBackgroundAdded != '\u001b[49m') { - ret = lastBackgroundAdded + ret; - } - if (lastForegroundAdded && lastForegroundAdded != '\u001b[39m') { - ret = lastForegroundAdded + ret; - } - - return ret; -} - -function truncateWidth(str, desiredLength) { - if (str.length === strlen(str)) { - return str.substr(0, desiredLength); - } - - while (strlen(str) > desiredLength) { - str = str.slice(0, -1); - } - - return str; -} - -function truncateWidthWithAnsi(str, desiredLength) { - let code = codeRegex(true); - let split = str.split(codeRegex()); - let splitIndex = 0; - let retLen = 0; - let ret = ''; - let myArray; - let state = {}; - - while (retLen < desiredLength) { - myArray = code.exec(str); - let toAdd = split[splitIndex]; - splitIndex++; - if (retLen + strlen(toAdd) > desiredLength) { - toAdd = truncateWidth(toAdd, desiredLength - retLen); - } - ret += toAdd; - retLen += strlen(toAdd); - - if (retLen < desiredLength) { - if (!myArray) { - break; - } // full-width chars may cause a whitespace which cannot be filled - ret += myArray[0]; - updateState(state, myArray); - } - } - - return unwindState(state, ret); -} - -function truncate(str, desiredLength, truncateChar) { - truncateChar = truncateChar || '…'; - let lengthOfStr = strlen(str); - if (lengthOfStr <= desiredLength) { - return str; - } - desiredLength -= strlen(truncateChar); - - let ret = truncateWidthWithAnsi(str, desiredLength); - - return ret + truncateChar; -} - -function defaultOptions() { - return { - chars: { - top: '─', - 'top-mid': '┬', - 'top-left': '┌', - 'top-right': '┐', - bottom: '─', - 'bottom-mid': '┴', - 'bottom-left': '└', - 'bottom-right': '┘', - left: '│', - 'left-mid': '├', - mid: '─', - 'mid-mid': '┼', - right: '│', - 'right-mid': '┤', - middle: '│', - }, - truncate: '…', - colWidths: [], - rowHeights: [], - colAligns: [], - rowAligns: [], - style: { - 'padding-left': 1, - 'padding-right': 1, - head: ['red'], - border: ['grey'], - compact: false, - }, - head: [], - }; -} - -function mergeOptions(options, defaults) { - options = options || {}; - defaults = defaults || defaultOptions(); - let ret = Object.assign({}, defaults, options); - ret.chars = Object.assign({}, defaults.chars, options.chars); - ret.style = Object.assign({}, defaults.style, options.style); - return ret; -} - -// Wrap on word boundary -function wordWrap(maxLength, input) { - let lines = []; - let split = input.split(/(\s+)/g); - let line = []; - let lineLength = 0; - let whitespace; - for (let i = 0; i < split.length; i += 2) { - let word = split[i]; - let newLength = lineLength + strlen(word); - if (lineLength > 0 && whitespace) { - newLength += whitespace.length; - } - if (newLength > maxLength) { - if (lineLength !== 0) { - lines.push(line.join('')); - } - line = [word]; - lineLength = strlen(word); - } else { - line.push(whitespace || '', word); - lineLength = newLength; - } - whitespace = split[i + 1]; - } - if (lineLength) { - lines.push(line.join('')); - } - return lines; -} - -// Wrap text (ignoring word boundaries) -function textWrap(maxLength, input) { - let lines = []; - let line = ''; - function pushLine(str, ws) { - if (line.length && ws) line += ws; - line += str; - while (line.length > maxLength) { - lines.push(line.slice(0, maxLength)); - line = line.slice(maxLength); - } - } - let split = input.split(/(\s+)/g); - for (let i = 0; i < split.length; i += 2) { - pushLine(split[i], i && split[i - 1]); - } - if (line.length) lines.push(line); - return lines; -} - -function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) { - let output = []; - input = input.split('\n'); - const handler = wrapOnWordBoundary ? wordWrap : textWrap; - for (let i = 0; i < input.length; i++) { - output.push.apply(output, handler(maxLength, input[i])); - } - return output; -} - -function colorizeLines(input) { - let state = {}; - let output = []; - for (let i = 0; i < input.length; i++) { - let line = rewindState(state, input[i]); - state = readState(line); - let temp = Object.assign({}, state); - output.push(unwindState(temp, line)); - } - return output; -} - -/** - * Credit: Matheus Sampaio https://github.com/matheussampaio - */ -function hyperlink(url, text) { - const OSC = '\u001B]'; - const BEL = '\u0007'; - const SEP = ';'; - - return [OSC, '8', SEP, SEP, url || text, BEL, text, OSC, '8', SEP, SEP, BEL].join(''); -} - -module.exports = { - strlen: strlen, - repeat: repeat, - pad: pad, - truncate: truncate, - mergeOptions: mergeOptions, - wordWrap: multiLineWordWrap, - colorizeLines: colorizeLines, - hyperlink, -}; diff --git a/node_modules/npm/node_modules/clone/LICENSE b/node_modules/npm/node_modules/clone/LICENSE deleted file mode 100644 index cc3c87b..0000000 --- a/node_modules/npm/node_modules/clone/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2011-2015 Paul Vorbach - -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, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/clone/clone.iml b/node_modules/npm/node_modules/clone/clone.iml deleted file mode 100644 index 30de8ae..0000000 --- a/node_modules/npm/node_modules/clone/clone.iml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/node_modules/npm/node_modules/clone/clone.js b/node_modules/npm/node_modules/clone/clone.js deleted file mode 100644 index ba200c2..0000000 --- a/node_modules/npm/node_modules/clone/clone.js +++ /dev/null @@ -1,166 +0,0 @@ -var clone = (function() { -'use strict'; - -/** - * Clones (copies) an Object using deep copying. - * - * This function supports circular references by default, but if you are certain - * there are no circular references in your object, you can save some CPU time - * by calling clone(obj, false). - * - * Caution: if `circular` is false and `parent` contains circular references, - * your program may enter an infinite loop and crash. - * - * @param `parent` - the object to be cloned - * @param `circular` - set to true if the object to be cloned may contain - * circular references. (optional - true by default) - * @param `depth` - set to a number if the object is only to be cloned to - * a particular depth. (optional - defaults to Infinity) - * @param `prototype` - sets the prototype to be used when cloning an object. - * (optional - defaults to parent prototype). -*/ -function clone(parent, circular, depth, prototype) { - var filter; - if (typeof circular === 'object') { - depth = circular.depth; - prototype = circular.prototype; - filter = circular.filter; - circular = circular.circular - } - // maintain two arrays for circular references, where corresponding parents - // and children have the same index - var allParents = []; - var allChildren = []; - - var useBuffer = typeof Buffer != 'undefined'; - - if (typeof circular == 'undefined') - circular = true; - - if (typeof depth == 'undefined') - depth = Infinity; - - // recurse this function so we don't reset allParents and allChildren - function _clone(parent, depth) { - // cloning null always returns null - if (parent === null) - return null; - - if (depth == 0) - return parent; - - var child; - var proto; - if (typeof parent != 'object') { - return parent; - } - - if (clone.__isArray(parent)) { - child = []; - } else if (clone.__isRegExp(parent)) { - child = new RegExp(parent.source, __getRegExpFlags(parent)); - if (parent.lastIndex) child.lastIndex = parent.lastIndex; - } else if (clone.__isDate(parent)) { - child = new Date(parent.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent)) { - if (Buffer.allocUnsafe) { - // Node.js >= 4.5.0 - child = Buffer.allocUnsafe(parent.length); - } else { - // Older Node.js versions - child = new Buffer(parent.length); - } - parent.copy(child); - return child; - } else { - if (typeof prototype == 'undefined') { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - else { - child = Object.create(prototype); - proto = prototype; - } - } - - if (circular) { - var index = allParents.indexOf(parent); - - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - } - - for (var i in parent) { - var attrs; - if (proto) { - attrs = Object.getOwnPropertyDescriptor(proto, i); - } - - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i], depth - 1); - } - - return child; - } - - return _clone(parent, depth); -} - -/** - * Simple flat clone using prototype, accepts only objects, usefull for property - * override on FLAT configuration object (no nested props). - * - * USE WITH CAUTION! This may not behave as you wish if you do not know how this - * works. - */ -clone.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - - var c = function () {}; - c.prototype = parent; - return new c(); -}; - -// private utility functions - -function __objToStr(o) { - return Object.prototype.toString.call(o); -}; -clone.__objToStr = __objToStr; - -function __isDate(o) { - return typeof o === 'object' && __objToStr(o) === '[object Date]'; -}; -clone.__isDate = __isDate; - -function __isArray(o) { - return typeof o === 'object' && __objToStr(o) === '[object Array]'; -}; -clone.__isArray = __isArray; - -function __isRegExp(o) { - return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; -}; -clone.__isRegExp = __isRegExp; - -function __getRegExpFlags(re) { - var flags = ''; - if (re.global) flags += 'g'; - if (re.ignoreCase) flags += 'i'; - if (re.multiline) flags += 'm'; - return flags; -}; -clone.__getRegExpFlags = __getRegExpFlags; - -return clone; -})(); - -if (typeof module === 'object' && module.exports) { - module.exports = clone; -} diff --git a/node_modules/npm/node_modules/clone/package.json b/node_modules/npm/node_modules/clone/package.json deleted file mode 100644 index 3ddd242..0000000 --- a/node_modules/npm/node_modules/clone/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "clone", - "description": "deep cloning of objects and arrays", - "tags": [ - "clone", - "object", - "array", - "function", - "date" - ], - "version": "1.0.4", - "repository": { - "type": "git", - "url": "git://github.com/pvorb/node-clone.git" - }, - "bugs": { - "url": "https://github.com/pvorb/node-clone/issues" - }, - "main": "clone.js", - "author": "Paul Vorbach (http://paul.vorba.ch/)", - "contributors": [ - "Blake Miner (http://www.blakeminer.com/)", - "Tian You (http://blog.axqd.net/)", - "George Stagas (http://stagas.com/)", - "Tobiasz Cudnik (https://github.com/TobiaszCudnik)", - "Pavel Lang (https://github.com/langpavel)", - "Dan MacTough (http://yabfog.com/)", - "w1nk (https://github.com/w1nk)", - "Hugh Kennedy (http://twitter.com/hughskennedy)", - "Dustin Diaz (http://dustindiaz.com)", - "Ilya Shaisultanov (https://github.com/diversario)", - "Nathan MacInnes (http://macinn.es/)", - "Benjamin E. Coe (https://twitter.com/benjamincoe)", - "Nathan Zadoks (https://github.com/nathan7)", - "Róbert Oroszi (https://github.com/oroce)", - "Aurélio A. Heckert (http://softwarelivre.org/aurium)", - "Guy Ellis (http://www.guyellisrocks.com/)" - ], - "license": "MIT", - "engines": { - "node": ">=0.8" - }, - "dependencies": {}, - "devDependencies": { - "nodeunit": "~0.9.0" - }, - "optionalDependencies": {}, - "scripts": { - "test": "nodeunit test.js" - } -} diff --git a/node_modules/npm/node_modules/cmd-shim/LICENSE b/node_modules/npm/node_modules/cmd-shim/LICENSE deleted file mode 100644 index 20a4762..0000000 --- a/node_modules/npm/node_modules/cmd-shim/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm, Inc. and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/cmd-shim/lib/index.js b/node_modules/npm/node_modules/cmd-shim/lib/index.js deleted file mode 100644 index 9cf2243..0000000 --- a/node_modules/npm/node_modules/cmd-shim/lib/index.js +++ /dev/null @@ -1,247 +0,0 @@ -// On windows, create a .cmd file. -// Read the #! in the file to see what it uses. The vast majority -// of the time, this will be either: -// "#!/usr/bin/env " -// or: -// "#! " -// -// Write a binroot/pkg.bin + ".cmd" file that has this line in it: -// @ %dp0% %* - -const { - chmod, - mkdir, - readFile, - stat, - unlink, - writeFile, -} = require('fs/promises') - -const { dirname, relative } = require('path') -const toBatchSyntax = require('./to-batch-syntax') -// linting disabled because this regex is really long -// eslint-disable-next-line max-len -const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s+(?:-S\s+)?((?:[^ \t=]+=[^ \t=]+\s+)*))?([^ \t]+)(.*)$/ - -const cmdShimIfExists = (from, to) => - stat(from).then(() => cmdShim(from, to), () => {}) - -// Try to unlink, but ignore errors. -// Any problems will surface later. -const rm = path => unlink(path).catch(() => {}) - -const cmdShim = (from, to) => - stat(from).then(() => cmdShim_(from, to)) - -const cmdShim_ = (from, to) => Promise.all([ - rm(to), - rm(to + '.cmd'), - rm(to + '.ps1'), -]).then(() => writeShim(from, to)) - -const writeShim = (from, to) => - // make a cmd file and a sh script - // First, check if the bin is a #! of some sort. - // If not, then assume it's something that'll be compiled, or some other - // sort of script, and just call it directly. - mkdir(dirname(to), { recursive: true }) - .then(() => readFile(from, 'utf8')) - .then(data => { - const firstLine = data.trim().split(/\r*\n/)[0] - const shebang = firstLine.match(shebangExpr) - if (!shebang) { - return writeShim_(from, to) - } - const vars = shebang[1] || '' - const prog = shebang[2] - const args = shebang[3] || '' - return writeShim_(from, to, prog, args, vars) - }, er => writeShim_(from, to)) - -const writeShim_ = (from, to, prog, args, variables) => { - let shTarget = relative(dirname(to), from) - let target = shTarget.split('/').join('\\') - let longProg - let shProg = prog && prog.split('\\').join('/') - let shLongProg - let pwshProg = shProg && `"${shProg}$exe"` - let pwshLongProg - shTarget = shTarget.split('\\').join('/') - args = args || '' - variables = variables || '' - if (!prog) { - prog = `"%dp0%\\${target}"` - shProg = `"$basedir/${shTarget}"` - pwshProg = shProg - args = '' - target = '' - shTarget = '' - } else { - longProg = `"%dp0%\\${prog}.exe"` - shLongProg = `"$basedir/${prog}"` - pwshLongProg = `"$basedir/${prog}$exe"` - target = `"%dp0%\\${target}"` - shTarget = `"$basedir/${shTarget}"` - } - - // Subroutine trick to fix https://github.com/npm/cmd-shim/issues/10 - // and https://github.com/npm/cli/issues/969 - const head = '@ECHO off\r\n' + - 'GOTO start\r\n' + - ':find_dp0\r\n' + - 'SET dp0=%~dp0\r\n' + - 'EXIT /b\r\n' + - ':start\r\n' + - 'SETLOCAL\r\n' + - 'CALL :find_dp0\r\n' - - let cmd - if (longProg) { - shLongProg = shLongProg.trim() - args = args.trim() - const variablesBatch = toBatchSyntax.convertToSetCommands(variables) - cmd = head - + variablesBatch - + '\r\n' - + `IF EXIST ${longProg} (\r\n` - + ` SET "_prog=${longProg.replace(/(^")|("$)/g, '')}"\r\n` - + ') ELSE (\r\n' - + ` SET "_prog=${prog.replace(/(^")|("$)/g, '')}"\r\n` - + ' SET PATHEXT=%PATHEXT:;.JS;=;%\r\n' - + ')\r\n' - + '\r\n' - // prevent "Terminate Batch Job? (Y/n)" message - // https://github.com/npm/cli/issues/969#issuecomment-737496588 - + 'endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & ' - + `"%_prog%" ${args} ${target} %*\r\n` - } else { - cmd = `${head}${prog} ${args} ${target} %*\r\n` - } - - // #!/bin/sh - // basedir=`dirname "$0"` - // - // case `uname` in - // *CYGWIN*|*MINGW*|*MSYS*) - // if command -v cygpath > /dev/null 2>&1; then - // basedir=`cygpath -w "$basedir"` - // fi - // ;; - // esac - // - // if [ -x "$basedir/node.exe" ]; then - // exec "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // else - // exec node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // fi - - let sh = '#!/bin/sh\n' - - sh = sh - + `basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")\n` - + '\n' - + 'case `uname` in\n' - + ' *CYGWIN*|*MINGW*|*MSYS*)\n' - + ' if command -v cygpath > /dev/null 2>&1; then\n' - + ' basedir=`cygpath -w "$basedir"`\n' - + ' fi\n' - + ' ;;\n' - + 'esac\n' - + '\n' - - if (shLongProg) { - sh = sh - + `if [ -x ${shLongProg} ]; then\n` - + ` exec ${variables}${shLongProg} ${args} ${shTarget} "$@"\n` - + 'else \n' - + ` exec ${variables}${shProg} ${args} ${shTarget} "$@"\n` - + 'fi\n' - } else { - sh = sh - + `exec ${shProg} ${args} ${shTarget} "$@"\n` - } - - // #!/usr/bin/env pwsh - // $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - // - // $ret=0 - // $exe = "" - // if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - // # Fix case when both the Windows and Linux builds of Node - // # are installed in the same directory - // $exe = ".exe" - // } - // if (Test-Path "$basedir/node") { - // # Suport pipeline input - // if ($MyInvocation.ExpectingInput) { - // input | & "$basedir/node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // } else { - // & "$basedir/node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // } - // $ret=$LASTEXITCODE - // } else { - // # Support pipeline input - // if ($MyInvocation.ExpectingInput) { - // $input | & "node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // } else { - // & "node$exe" "$basedir/node_modules/npm/bin/npm-cli.js" $args - // } - // $ret=$LASTEXITCODE - // } - // exit $ret - let pwsh = '#!/usr/bin/env pwsh\n' - + '$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent\n' - + '\n' - + '$exe=""\n' - + 'if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {\n' - + ' # Fix case when both the Windows and Linux builds of Node\n' - + ' # are installed in the same directory\n' - + ' $exe=".exe"\n' - + '}\n' - if (shLongProg) { - pwsh = pwsh - + '$ret=0\n' - + `if (Test-Path ${pwshLongProg}) {\n` - + ' # Support pipeline input\n' - + ' if ($MyInvocation.ExpectingInput) {\n' - + ` $input | & ${pwshLongProg} ${args} ${shTarget} $args\n` - + ' } else {\n' - + ` & ${pwshLongProg} ${args} ${shTarget} $args\n` - + ' }\n' - + ' $ret=$LASTEXITCODE\n' - + '} else {\n' - + ' # Support pipeline input\n' - + ' if ($MyInvocation.ExpectingInput) {\n' - + ` $input | & ${pwshProg} ${args} ${shTarget} $args\n` - + ' } else {\n' - + ` & ${pwshProg} ${args} ${shTarget} $args\n` - + ' }\n' - + ' $ret=$LASTEXITCODE\n' - + '}\n' - + 'exit $ret\n' - } else { - pwsh = pwsh - + '# Support pipeline input\n' - + 'if ($MyInvocation.ExpectingInput) {\n' - + ` $input | & ${pwshProg} ${args} ${shTarget} $args\n` - + '} else {\n' - + ` & ${pwshProg} ${args} ${shTarget} $args\n` - + '}\n' - + 'exit $LASTEXITCODE\n' - } - - return Promise.all([ - writeFile(to + '.ps1', pwsh, 'utf8'), - writeFile(to + '.cmd', cmd, 'utf8'), - writeFile(to, sh, 'utf8'), - ]).then(() => chmodShim(to)) -} - -const chmodShim = to => Promise.all([ - chmod(to, 0o755), - chmod(to + '.cmd', 0o755), - chmod(to + '.ps1', 0o755), -]) - -module.exports = cmdShim -cmdShim.ifExists = cmdShimIfExists diff --git a/node_modules/npm/node_modules/cmd-shim/lib/to-batch-syntax.js b/node_modules/npm/node_modules/cmd-shim/lib/to-batch-syntax.js deleted file mode 100644 index 86a3f01..0000000 --- a/node_modules/npm/node_modules/cmd-shim/lib/to-batch-syntax.js +++ /dev/null @@ -1,49 +0,0 @@ -exports.replaceDollarWithPercentPair = replaceDollarWithPercentPair -exports.convertToSetCommand = convertToSetCommand -exports.convertToSetCommands = convertToSetCommands - -function convertToSetCommand (key, value) { - var line = '' - key = key || '' - key = key.trim() - value = value || '' - value = value.trim() - if (key && value && value.length > 0) { - line = '@SET ' + key + '=' + replaceDollarWithPercentPair(value) + '\r\n' - } - return line -} - -function extractVariableValuePairs (declarations) { - var pairs = {} - declarations.map(function (declaration) { - var split = declaration.split('=') - pairs[split[0]] = split[1] - }) - return pairs -} - -function convertToSetCommands (variableString) { - var variableValuePairs = extractVariableValuePairs(variableString.split(' ')) - var variableDeclarationsAsBatch = '' - Object.keys(variableValuePairs).forEach(function (key) { - variableDeclarationsAsBatch += convertToSetCommand(key, variableValuePairs[key]) - }) - return variableDeclarationsAsBatch -} - -function replaceDollarWithPercentPair (value) { - var dollarExpressions = /\$\{?([^$@#?\- \t{}:]+)\}?/g - var result = '' - var startIndex = 0 - do { - var match = dollarExpressions.exec(value) - if (match) { - var betweenMatches = value.substring(startIndex, match.index) || '' - result += betweenMatches + '%' + match[1] + '%' - startIndex = dollarExpressions.lastIndex - } - } while (dollarExpressions.lastIndex > 0) - result += value.slice(startIndex) - return result -} diff --git a/node_modules/npm/node_modules/cmd-shim/package.json b/node_modules/npm/node_modules/cmd-shim/package.json deleted file mode 100644 index ec274b2..0000000 --- a/node_modules/npm/node_modules/cmd-shim/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "cmd-shim", - "version": "6.0.2", - "description": "Used in npm for command line application support", - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cmd-shim.git" - }, - "license": "ISC", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "tap": "^16.0.1" - }, - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "tap": { - "before": "test/00-setup.js", - "after": "test/zz-cleanup.js", - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.19.0", - "publish": true - } -} diff --git a/node_modules/npm/node_modules/color-convert/LICENSE b/node_modules/npm/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386..0000000 --- a/node_modules/npm/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/npm/node_modules/color-convert/conversions.js b/node_modules/npm/node_modules/color-convert/conversions.js deleted file mode 100644 index 2657f26..0000000 --- a/node_modules/npm/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,839 +0,0 @@ -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = require('color-name'); - -// 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]; -}; diff --git a/node_modules/npm/node_modules/color-convert/index.js b/node_modules/npm/node_modules/color-convert/index.js deleted file mode 100644 index b648e57..0000000 --- a/node_modules/npm/node_modules/color-convert/index.js +++ /dev/null @@ -1,81 +0,0 @@ -const conversions = require('./conversions'); -const route = require('./route'); - -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; diff --git a/node_modules/npm/node_modules/color-convert/package.json b/node_modules/npm/node_modules/color-convert/package.json deleted file mode 100644 index 6e48000..0000000 --- a/node_modules/npm/node_modules/color-convert/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "color-convert", - "description": "Plain color conversion functions", - "version": "2.0.1", - "author": "Heather Arthur ", - "license": "MIT", - "repository": "Qix-/color-convert", - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "engines": { - "node": ">=7.0.0" - }, - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "files": [ - "index.js", - "conversions.js", - "route.js" - ], - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - }, - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "dependencies": { - "color-name": "~1.1.4" - } -} diff --git a/node_modules/npm/node_modules/color-convert/route.js b/node_modules/npm/node_modules/color-convert/route.js deleted file mode 100644 index 1a08521..0000000 --- a/node_modules/npm/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -const conversions = require('./conversions'); - -/* - 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; -}; - diff --git a/node_modules/npm/node_modules/color-name/LICENSE b/node_modules/npm/node_modules/color-name/LICENSE deleted file mode 100644 index c6b1001..0000000 --- a/node_modules/npm/node_modules/color-name/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/npm/node_modules/color-name/index.js b/node_modules/npm/node_modules/color-name/index.js deleted file mode 100644 index b7c198a..0000000 --- a/node_modules/npm/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'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] -}; diff --git a/node_modules/npm/node_modules/color-name/package.json b/node_modules/npm/node_modules/color-name/package.json deleted file mode 100644 index 782dd82..0000000 --- a/node_modules/npm/node_modules/color-name/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "color-name", - "version": "1.1.4", - "description": "A list of color names and its values", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git@github.com:colorjs/color-name.git" - }, - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "author": "DY ", - "license": "MIT", - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "homepage": "https://github.com/colorjs/color-name" -} diff --git a/node_modules/npm/node_modules/color-support/LICENSE b/node_modules/npm/node_modules/color-support/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/color-support/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/color-support/README.md b/node_modules/npm/node_modules/color-support/README.md deleted file mode 100644 index f89aa17..0000000 --- a/node_modules/npm/node_modules/color-support/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# color-support - -A module which will endeavor to guess your terminal's level of color -support. - -[![Build Status](https://travis-ci.org/isaacs/color-support.svg?branch=master)](https://travis-ci.org/isaacs/color-support) [![Coverage Status](https://coveralls.io/repos/github/isaacs/color-support/badge.svg?branch=master)](https://coveralls.io/github/isaacs/color-support?branch=master) - -This is similar to `supports-color`, but it does not read -`process.argv`. - -1. If not in a node environment, not supported. - -2. If stdout is not a TTY, not supported, unless the `ignoreTTY` - option is set. - -3. If the `TERM` environ is `dumb`, not supported, unless the - `ignoreDumb` option is set. - -4. If on Windows, then support 16 colors. - -5. If using Tmux, then support 256 colors. - -7. Handle continuous-integration servers. If `CI` or - `TEAMCITY_VERSION` are set in the environment, and `TRAVIS` is not - set, then color is not supported, unless `ignoreCI` option is set. - -6. Guess based on the `TERM_PROGRAM` environ. These terminals support - 16m colors: - - - `iTerm.app` version 3.x supports 16m colors, below support 256 - - `MacTerm` supports 16m colors - - `Apple_Terminal` supports 256 colors - - Have more things that belong on this list? Send a PR! - -8. Make a guess based on the `TERM` environment variable. Any - `xterm-256color` will get 256 colors. Any screen, xterm, vt100, - color, ansi, cygwin, or linux `TERM` will get 16 colors. - -9. If `COLORTERM` environment variable is set, then support 16 colors. - -10. At this point, we assume that color is not supported. - -## USAGE - -```javascript -var testColorSupport = require('color-support') -var colorSupport = testColorSupport(/* options object */) - -if (!colorSupport) { - console.log('color is not supported') -} else if (colorSupport.has16m) { - console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m') -} else if (colorSupport.has256) { - console.log('\x1b[38;5;119m256 colors\x1b[0m') -} else if (colorSupport.hasBasic) { - console.log('\x1b[31mbasic colors\x1b[0m') -} else { - console.log('this is impossible, but colors are not supported') -} -``` - -If you don't have any options to set, you can also just look at the -flags which will all be set on the test function itself. (Of course, -this doesn't return a falsey value when colors aren't supported, and -doesn't allow you to set options.) - -```javascript -var colorSupport = require('color-support') - -if (colorSupport.has16m) { - console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m') -} else if (colorSupport.has256) { - console.log('\x1b[38;5;119m256 colors\x1b[0m') -} else if (colorSupport.hasBasic) { - console.log('\x1b[31mbasic colors\x1b[0m') -} else { - console.log('colors are not supported') -} -``` - -## Options - -You can pass in the following options. - -* ignoreTTY - default false. Ignore the `isTTY` check. -* ignoreDumb - default false. Ignore `TERM=dumb` environ check. -* ignoreCI - default false. Ignore `CI` environ check. -* env - Object for environment vars. Defaults to `process.env`. -* stream - Stream for `isTTY` check. Defaults to `process.stdout`. -* term - String for `TERM` checking. Defaults to `env.TERM`. -* alwaysReturn - default false. Return an object when colors aren't - supported (instead of returning `false`). -* level - A number from 0 to 3. This will return a result for the - specified level. This is useful if you want to be able to set the - color support level explicitly as a number in an environment - variable or config, but then use the object flags in your program. - Except for `alwaysReturn` to return an object for level 0, all other - options are ignored, since no checking is done if a level is - explicitly set. - -## Return Value - -If no color support is available, then `false` is returned by default, -unless the `alwaysReturn` flag is set to `true`. This is so that the -simple question of "can I use colors or not" can treat any truthy -return as "yes". - -Otherwise, the return object has the following fields: - -* `level` - A number from 0 to 3 - * `0` - No color support - * `1` - Basic (16) color support - * `2` - 256 color support - * `3` - 16 million (true) color support -* `hasBasic` - Boolean -* `has256` - Boolean -* `has16m` - Boolean - -## CLI - -You can run the `color-support` bin from the command line which will -just dump the values as this module calculates them in whatever env -it's run. It takes no command line arguments. - -## Credits - -This is a spiritual, if not actual, fork of -[supports-color](http://npm.im/supports-color) by the ever prolific -[Sindre Sorhus](http://npm.im/~sindresorhus). diff --git a/node_modules/npm/node_modules/color-support/bin.js b/node_modules/npm/node_modules/color-support/bin.js deleted file mode 100755 index 3c0a967..0000000 --- a/node_modules/npm/node_modules/color-support/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var colorSupport = require('./')({alwaysReturn: true }) -console.log(JSON.stringify(colorSupport, null, 2)) diff --git a/node_modules/npm/node_modules/color-support/browser.js b/node_modules/npm/node_modules/color-support/browser.js deleted file mode 100644 index ab5c663..0000000 --- a/node_modules/npm/node_modules/color-support/browser.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = colorSupport({ alwaysReturn: true }, colorSupport) - -function colorSupport(options, obj) { - obj = obj || {} - options = options || {} - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - if (!options.alwaysReturn) { - return false - } - return obj -} diff --git a/node_modules/npm/node_modules/color-support/index.js b/node_modules/npm/node_modules/color-support/index.js deleted file mode 100644 index 6b6f3b2..0000000 --- a/node_modules/npm/node_modules/color-support/index.js +++ /dev/null @@ -1,134 +0,0 @@ -// call it on itself so we can test the export val for basic stuff -module.exports = colorSupport({ alwaysReturn: true }, colorSupport) - -function hasNone (obj, options) { - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - if (!options.alwaysReturn) { - return false - } - return obj -} - -function hasBasic (obj) { - obj.hasBasic = true - obj.has256 = false - obj.has16m = false - obj.level = 1 - return obj -} - -function has256 (obj) { - obj.hasBasic = true - obj.has256 = true - obj.has16m = false - obj.level = 2 - return obj -} - -function has16m (obj) { - obj.hasBasic = true - obj.has256 = true - obj.has16m = true - obj.level = 3 - return obj -} - -function colorSupport (options, obj) { - options = options || {} - - obj = obj || {} - - // if just requesting a specific level, then return that. - if (typeof options.level === 'number') { - switch (options.level) { - case 0: - return hasNone(obj, options) - case 1: - return hasBasic(obj) - case 2: - return has256(obj) - case 3: - return has16m(obj) - } - } - - obj.level = 0 - obj.hasBasic = false - obj.has256 = false - obj.has16m = false - - if (typeof process === 'undefined' || - !process || - !process.stdout || - !process.env || - !process.platform) { - return hasNone(obj, options) - } - - var env = options.env || process.env - var stream = options.stream || process.stdout - var term = options.term || env.TERM || '' - var platform = options.platform || process.platform - - if (!options.ignoreTTY && !stream.isTTY) { - return hasNone(obj, options) - } - - if (!options.ignoreDumb && term === 'dumb' && !env.COLORTERM) { - return hasNone(obj, options) - } - - if (platform === 'win32') { - return hasBasic(obj) - } - - if (env.TMUX) { - return has256(obj) - } - - if (!options.ignoreCI && (env.CI || env.TEAMCITY_VERSION)) { - if (env.TRAVIS) { - return has256(obj) - } else { - return hasNone(obj, options) - } - } - - // TODO: add more term programs - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - var ver = env.TERM_PROGRAM_VERSION || '0.' - if (/^[0-2]\./.test(ver)) { - return has256(obj) - } else { - return has16m(obj) - } - - case 'HyperTerm': - case 'Hyper': - return has16m(obj) - - case 'MacTerm': - return has16m(obj) - - case 'Apple_Terminal': - return has256(obj) - } - - if (/^xterm-256/.test(term)) { - return has256(obj) - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(term)) { - return hasBasic(obj) - } - - if (env.COLORTERM) { - return hasBasic(obj) - } - - return hasNone(obj, options) -} diff --git a/node_modules/npm/node_modules/color-support/package.json b/node_modules/npm/node_modules/color-support/package.json deleted file mode 100644 index f3e3b77..0000000 --- a/node_modules/npm/node_modules/color-support/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "color-support", - "version": "1.1.3", - "description": "A module which will endeavor to guess your terminal's level of color support.", - "main": "index.js", - "browser": "browser.js", - "bin": "bin.js", - "devDependencies": { - "tap": "^10.3.3" - }, - "scripts": { - "test": "tap test/*.js --100 -J", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/color-support.git" - }, - "keywords": [ - "terminal", - "color", - "support", - "xterm", - "truecolor", - "256" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "files": [ - "browser.js", - "index.js", - "bin.js" - ] -} diff --git a/node_modules/npm/node_modules/columnify/LICENSE b/node_modules/npm/node_modules/columnify/LICENSE deleted file mode 100644 index ed47678..0000000 --- a/node_modules/npm/node_modules/columnify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Tim Oxley - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/columnify/Makefile b/node_modules/npm/node_modules/columnify/Makefile deleted file mode 100644 index 3a67c57..0000000 --- a/node_modules/npm/node_modules/columnify/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - -all: columnify.js - -prepublish: all - -columnify.js: index.js package.json - babel index.js > columnify.js - -.PHONY: all prepublish diff --git a/node_modules/npm/node_modules/columnify/columnify.js b/node_modules/npm/node_modules/columnify/columnify.js deleted file mode 100644 index dcef923..0000000 --- a/node_modules/npm/node_modules/columnify/columnify.js +++ /dev/null @@ -1,306 +0,0 @@ -"use strict"; - -var wcwidth = require('./width'); - -var _require = require('./utils'), - padRight = _require.padRight, - padCenter = _require.padCenter, - padLeft = _require.padLeft, - splitIntoLines = _require.splitIntoLines, - splitLongWords = _require.splitLongWords, - truncateString = _require.truncateString; - -var DEFAULT_HEADING_TRANSFORM = function DEFAULT_HEADING_TRANSFORM(key) { - return key.toUpperCase(); -}; - -var DEFAULT_DATA_TRANSFORM = function DEFAULT_DATA_TRANSFORM(cell, column, index) { - return cell; -}; - -var DEFAULTS = Object.freeze({ - maxWidth: Infinity, - minWidth: 0, - columnSplitter: ' ', - truncate: false, - truncateMarker: '…', - preserveNewLines: false, - paddingChr: ' ', - showHeaders: true, - headingTransform: DEFAULT_HEADING_TRANSFORM, - dataTransform: DEFAULT_DATA_TRANSFORM -}); - -module.exports = function (items) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - - var columnConfigs = options.config || {}; - delete options.config; // remove config so doesn't appear on every column. - - var maxLineWidth = options.maxLineWidth || Infinity; - if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity; - delete options.maxLineWidth; // this is a line control option, don't pass it to column - - // Option defaults inheritance: - // options.config[columnName] => options => DEFAULTS - options = mixin({}, DEFAULTS, options); - - options.config = options.config || Object.create(null); - - options.spacing = options.spacing || '\n'; // probably useless - options.preserveNewLines = !!options.preserveNewLines; - options.showHeaders = !!options.showHeaders; - options.columns = options.columns || options.include; // alias include/columns, prefer columns if supplied - var columnNames = options.columns || []; // optional user-supplied columns to include - - items = toArray(items, columnNames); - - // if not suppled column names, automatically determine columns from data keys - if (!columnNames.length) { - items.forEach(function (item) { - for (var columnName in item) { - if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName); - } - }); - } - - // initialize column defaults (each column inherits from options.config) - var columns = columnNames.reduce(function (columns, columnName) { - var column = Object.create(options); - columns[columnName] = mixin(column, columnConfigs[columnName]); - return columns; - }, Object.create(null)); - - // sanitize column settings - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - column.name = columnName; - column.maxWidth = Math.ceil(column.maxWidth); - column.minWidth = Math.ceil(column.minWidth); - column.truncate = !!column.truncate; - column.align = column.align || 'left'; - }); - - // sanitize data - items = items.map(function (item) { - var result = Object.create(null); - columnNames.forEach(function (columnName) { - // null/undefined -> '' - result[columnName] = item[columnName] != null ? item[columnName] : ''; - // toString everything - result[columnName] = '' + result[columnName]; - if (columns[columnName].preserveNewLines) { - // merge non-newline whitespace chars - result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' '); - } else { - // merge all whitespace chars - result[columnName] = result[columnName].replace(/\s/gmi, ' '); - } - }); - return result; - }); - - // transform data cells - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - items = items.map(function (item, index) { - var col = Object.create(column); - item[columnName] = column.dataTransform(item[columnName], col, index); - - var changedKeys = Object.keys(col); - // disable default heading transform if we wrote to column.name - if (changedKeys.indexOf('name') !== -1) { - if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return; - column.headingTransform = function (heading) { - return heading; - }; - } - changedKeys.forEach(function (key) { - return column[key] = col[key]; - }); - return item; - }); - }); - - // add headers - var headers = {}; - if (options.showHeaders) { - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - - if (!column.showHeaders) { - headers[columnName] = ''; - return; - } - - headers[columnName] = column.headingTransform(column.name); - }); - items.unshift(headers); - } - // get actual max-width between min & max - // based on length of data in columns - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - column.width = items.map(function (item) { - return item[columnName]; - }).reduce(function (min, cur) { - // if already at maxWidth don't bother testing - if (min >= column.maxWidth) return min; - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); - }, 0); - }); - - // split long words so they can break onto multiple lines - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - items = items.map(function (item) { - item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker); - return item; - }); - }); - - // wrap long lines. each item is now an array of lines. - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - items = items.map(function (item, index) { - var cell = item[columnName]; - item[columnName] = splitIntoLines(cell, column.width); - - // if truncating required, only include first line + add truncation char - if (column.truncate && item[columnName].length > 1) { - item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)); - var firstLine = item[columnName][0]; - if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker; - item[columnName] = item[columnName].slice(0, 1); - } - return item; - }); - }); - - // recalculate column widths from truncated output/lines - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - column.width = items.map(function (item) { - return item[columnName].reduce(function (min, cur) { - if (min >= column.maxWidth) return min; - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))); - }, 0); - }).reduce(function (min, cur) { - if (min >= column.maxWidth) return min; - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))); - }, 0); - }); - - var rows = createRows(items, columns, columnNames, options.paddingChr); // merge lines into rows - // conceive output - return rows.reduce(function (output, row) { - return output.concat(row.reduce(function (rowOut, line) { - return rowOut.concat(line.join(options.columnSplitter)); - }, [])); - }, []).map(function (line) { - return truncateString(line, maxLineWidth); - }).join(options.spacing); -}; - -/** - * Convert wrapped lines into rows with padded values. - * - * @param Array items data to process - * @param Array columns column width settings for wrapping - * @param Array columnNames column ordering - * @return Array items wrapped in arrays, corresponding to lines - */ - -function createRows(items, columns, columnNames, paddingChr) { - return items.map(function (item) { - var row = []; - var numLines = 0; - columnNames.forEach(function (columnName) { - numLines = Math.max(numLines, item[columnName].length); - }); - // combine matching lines of each rows - - var _loop = function _loop(i) { - row[i] = row[i] || []; - columnNames.forEach(function (columnName) { - var column = columns[columnName]; - var val = item[columnName][i] || ''; // || '' ensures empty columns get padded - if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr));else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr));else row[i].push(padRight(val, column.width, paddingChr)); - }); - }; - - for (var i = 0; i < numLines; i++) { - _loop(i); - } - return row; - }); -} - -/** - * Object.assign - * - * @return Object Object with properties mixed in. - */ - -function mixin() { - if (Object.assign) return Object.assign.apply(Object, arguments); - return ObjectAssign.apply(undefined, arguments); -} - -function ObjectAssign(target, firstSource) { - "use strict"; - - if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object"); - - var to = Object(target); - - var hasPendingException = false; - var pendingException; - - for (var i = 1; i < arguments.length; i++) { - var nextSource = arguments[i]; - if (nextSource === undefined || nextSource === null) continue; - - var keysArray = Object.keys(Object(nextSource)); - for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { - var nextKey = keysArray[nextIndex]; - try { - var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey]; - } catch (e) { - if (!hasPendingException) { - hasPendingException = true; - pendingException = e; - } - } - } - - if (hasPendingException) throw pendingException; - } - return to; -} - -/** - * Adapted from String.prototype.endsWith polyfill. - */ - -function endsWith(target, searchString, position) { - position = position || target.length; - position = position - searchString.length; - var lastIndex = target.lastIndexOf(searchString); - return lastIndex !== -1 && lastIndex === position; -} - -function toArray(items, columnNames) { - if (Array.isArray(items)) return items; - var rows = []; - for (var key in items) { - var item = {}; - item[columnNames[0] || 'key'] = key; - item[columnNames[1] || 'value'] = items[key]; - rows.push(item); - } - return rows; -} - diff --git a/node_modules/npm/node_modules/columnify/index.js b/node_modules/npm/node_modules/columnify/index.js deleted file mode 100644 index 221269b..0000000 --- a/node_modules/npm/node_modules/columnify/index.js +++ /dev/null @@ -1,297 +0,0 @@ -"use strict" - -const wcwidth = require('./width') -const { - padRight, - padCenter, - padLeft, - splitIntoLines, - splitLongWords, - truncateString -} = require('./utils') - -const DEFAULT_HEADING_TRANSFORM = key => key.toUpperCase() - -const DEFAULT_DATA_TRANSFORM = (cell, column, index) => cell - -const DEFAULTS = Object.freeze({ - maxWidth: Infinity, - minWidth: 0, - columnSplitter: ' ', - truncate: false, - truncateMarker: '…', - preserveNewLines: false, - paddingChr: ' ', - showHeaders: true, - headingTransform: DEFAULT_HEADING_TRANSFORM, - dataTransform: DEFAULT_DATA_TRANSFORM -}) - -module.exports = function(items, options = {}) { - - let columnConfigs = options.config || {} - delete options.config // remove config so doesn't appear on every column. - - let maxLineWidth = options.maxLineWidth || Infinity - if (maxLineWidth === 'auto') maxLineWidth = process.stdout.columns || Infinity - delete options.maxLineWidth // this is a line control option, don't pass it to column - - // Option defaults inheritance: - // options.config[columnName] => options => DEFAULTS - options = mixin({}, DEFAULTS, options) - - options.config = options.config || Object.create(null) - - options.spacing = options.spacing || '\n' // probably useless - options.preserveNewLines = !!options.preserveNewLines - options.showHeaders = !!options.showHeaders; - options.columns = options.columns || options.include // alias include/columns, prefer columns if supplied - let columnNames = options.columns || [] // optional user-supplied columns to include - - items = toArray(items, columnNames) - - // if not suppled column names, automatically determine columns from data keys - if (!columnNames.length) { - items.forEach(function(item) { - for (let columnName in item) { - if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName) - } - }) - } - - // initialize column defaults (each column inherits from options.config) - let columns = columnNames.reduce((columns, columnName) => { - let column = Object.create(options) - columns[columnName] = mixin(column, columnConfigs[columnName]) - return columns - }, Object.create(null)) - - // sanitize column settings - columnNames.forEach(columnName => { - let column = columns[columnName] - column.name = columnName - column.maxWidth = Math.ceil(column.maxWidth) - column.minWidth = Math.ceil(column.minWidth) - column.truncate = !!column.truncate - column.align = column.align || 'left' - }) - - // sanitize data - items = items.map(item => { - let result = Object.create(null) - columnNames.forEach(columnName => { - // null/undefined -> '' - result[columnName] = item[columnName] != null ? item[columnName] : '' - // toString everything - result[columnName] = '' + result[columnName] - if (columns[columnName].preserveNewLines) { - // merge non-newline whitespace chars - result[columnName] = result[columnName].replace(/[^\S\n]/gmi, ' ') - } else { - // merge all whitespace chars - result[columnName] = result[columnName].replace(/\s/gmi, ' ') - } - }) - return result - }) - - // transform data cells - columnNames.forEach(columnName => { - let column = columns[columnName] - items = items.map((item, index) => { - let col = Object.create(column) - item[columnName] = column.dataTransform(item[columnName], col, index) - - let changedKeys = Object.keys(col) - // disable default heading transform if we wrote to column.name - if (changedKeys.indexOf('name') !== -1) { - if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return - column.headingTransform = heading => heading - } - changedKeys.forEach(key => column[key] = col[key]) - return item - }) - }) - - // add headers - let headers = {} - if(options.showHeaders) { - columnNames.forEach(columnName => { - let column = columns[columnName] - - if(!column.showHeaders){ - headers[columnName] = ''; - return; - } - - headers[columnName] = column.headingTransform(column.name) - }) - items.unshift(headers) - } - // get actual max-width between min & max - // based on length of data in columns - columnNames.forEach(columnName => { - let column = columns[columnName] - column.width = items - .map(item => item[columnName]) - .reduce((min, cur) => { - // if already at maxWidth don't bother testing - if (min >= column.maxWidth) return min - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) - }, 0) - }) - - // split long words so they can break onto multiple lines - columnNames.forEach(columnName => { - let column = columns[columnName] - items = items.map(item => { - item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker) - return item - }) - }) - - // wrap long lines. each item is now an array of lines. - columnNames.forEach(columnName => { - let column = columns[columnName] - items = items.map((item, index) => { - let cell = item[columnName] - item[columnName] = splitIntoLines(cell, column.width) - - // if truncating required, only include first line + add truncation char - if (column.truncate && item[columnName].length > 1) { - item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker)) - let firstLine = item[columnName][0] - if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker - item[columnName] = item[columnName].slice(0, 1) - } - return item - }) - }) - - // recalculate column widths from truncated output/lines - columnNames.forEach(columnName => { - let column = columns[columnName] - column.width = items.map(item => { - return item[columnName].reduce((min, cur) => { - if (min >= column.maxWidth) return min - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur)))) - }, 0) - }).reduce((min, cur) => { - if (min >= column.maxWidth) return min - return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur))) - }, 0) - }) - - - let rows = createRows(items, columns, columnNames, options.paddingChr) // merge lines into rows - // conceive output - return rows.reduce((output, row) => { - return output.concat(row.reduce((rowOut, line) => { - return rowOut.concat(line.join(options.columnSplitter)) - }, [])) - }, []) - .map(line => truncateString(line, maxLineWidth)) - .join(options.spacing) -} - -/** - * Convert wrapped lines into rows with padded values. - * - * @param Array items data to process - * @param Array columns column width settings for wrapping - * @param Array columnNames column ordering - * @return Array items wrapped in arrays, corresponding to lines - */ - -function createRows(items, columns, columnNames, paddingChr) { - return items.map(item => { - let row = [] - let numLines = 0 - columnNames.forEach(columnName => { - numLines = Math.max(numLines, item[columnName].length) - }) - // combine matching lines of each rows - for (let i = 0; i < numLines; i++) { - row[i] = row[i] || [] - columnNames.forEach(columnName => { - let column = columns[columnName] - let val = item[columnName][i] || '' // || '' ensures empty columns get padded - if (column.align === 'right') row[i].push(padLeft(val, column.width, paddingChr)) - else if (column.align === 'center' || column.align === 'centre') row[i].push(padCenter(val, column.width, paddingChr)) - else row[i].push(padRight(val, column.width, paddingChr)) - }) - } - return row - }) -} - -/** - * Object.assign - * - * @return Object Object with properties mixed in. - */ - -function mixin(...args) { - if (Object.assign) return Object.assign(...args) - return ObjectAssign(...args) -} - -function ObjectAssign(target, firstSource) { - "use strict"; - if (target === undefined || target === null) - throw new TypeError("Cannot convert first argument to object"); - - var to = Object(target); - - var hasPendingException = false; - var pendingException; - - for (var i = 1; i < arguments.length; i++) { - var nextSource = arguments[i]; - if (nextSource === undefined || nextSource === null) - continue; - - var keysArray = Object.keys(Object(nextSource)); - for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { - var nextKey = keysArray[nextIndex]; - try { - var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - if (desc !== undefined && desc.enumerable) - to[nextKey] = nextSource[nextKey]; - } catch (e) { - if (!hasPendingException) { - hasPendingException = true; - pendingException = e; - } - } - } - - if (hasPendingException) - throw pendingException; - } - return to; -} - -/** - * Adapted from String.prototype.endsWith polyfill. - */ - -function endsWith(target, searchString, position) { - position = position || target.length; - position = position - searchString.length; - let lastIndex = target.lastIndexOf(searchString); - return lastIndex !== -1 && lastIndex === position; -} - - -function toArray(items, columnNames) { - if (Array.isArray(items)) return items - let rows = [] - for (let key in items) { - let item = {} - item[columnNames[0] || 'key'] = key - item[columnNames[1] || 'value'] = items[key] - rows.push(item) - } - return rows -} diff --git a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/index.js b/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/license b/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/package.json b/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/license b/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/npm/node_modules/columnify/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/columnify/package.json b/node_modules/npm/node_modules/columnify/package.json deleted file mode 100644 index 2956540..0000000 --- a/node_modules/npm/node_modules/columnify/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "columnify", - "version": "1.6.0", - "description": "Render data in text columns. Supports in-column text-wrap.", - "main": "columnify.js", - "scripts": { - "pretest": "npm prune", - "test": "make prepublish && tape test/*.js | tap-spec", - "bench": "npm test && node bench", - "prepublish": "make prepublish" - }, - "babel": { - "presets": [ - "es2015" - ] - }, - "author": "Tim Oxley", - "license": "MIT", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-preset-es2015": "^6.3.13", - "chalk": "^1.1.1", - "tap-spec": "^5.0.0", - "tape": "^4.4.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/timoxley/columnify.git" - }, - "keywords": [ - "column", - "text", - "ansi", - "console", - "terminal", - "wrap", - "table" - ], - "bugs": { - "url": "https://github.com/timoxley/columnify/issues" - }, - "homepage": "https://github.com/timoxley/columnify", - "engines": { - "node": ">=8.0.0" - }, - "dependencies": { - "strip-ansi": "^6.0.1", - "wcwidth": "^1.0.0" - }, - "directories": { - "test": "test" - } -} diff --git a/node_modules/npm/node_modules/columnify/utils.js b/node_modules/npm/node_modules/columnify/utils.js deleted file mode 100644 index df3e6cc..0000000 --- a/node_modules/npm/node_modules/columnify/utils.js +++ /dev/null @@ -1,193 +0,0 @@ -"use strict" - -var wcwidth = require('./width') - -/** - * repeat string `str` up to total length of `len` - * - * @param String str string to repeat - * @param Number len total length of output string - */ - -function repeatString(str, len) { - return Array.apply(null, {length: len + 1}).join(str).slice(0, len) -} - -/** - * Pad `str` up to total length `max` with `chr`. - * If `str` is longer than `max`, padRight will return `str` unaltered. - * - * @param String str string to pad - * @param Number max total length of output string - * @param String chr optional. Character to pad with. default: ' ' - * @return String padded str - */ - -function padRight(str, max, chr) { - str = str != null ? str : '' - str = String(str) - var length = max - wcwidth(str) - if (length <= 0) return str - return str + repeatString(chr || ' ', length) -} - -/** - * Pad `str` up to total length `max` with `chr`. - * If `str` is longer than `max`, padCenter will return `str` unaltered. - * - * @param String str string to pad - * @param Number max total length of output string - * @param String chr optional. Character to pad with. default: ' ' - * @return String padded str - */ - -function padCenter(str, max, chr) { - str = str != null ? str : '' - str = String(str) - var length = max - wcwidth(str) - if (length <= 0) return str - var lengthLeft = Math.floor(length/2) - var lengthRight = length - lengthLeft - return repeatString(chr || ' ', lengthLeft) + str + repeatString(chr || ' ', lengthRight) -} - -/** - * Pad `str` up to total length `max` with `chr`, on the left. - * If `str` is longer than `max`, padRight will return `str` unaltered. - * - * @param String str string to pad - * @param Number max total length of output string - * @param String chr optional. Character to pad with. default: ' ' - * @return String padded str - */ - -function padLeft(str, max, chr) { - str = str != null ? str : '' - str = String(str) - var length = max - wcwidth(str) - if (length <= 0) return str - return repeatString(chr || ' ', length) + str -} - -/** - * Split a String `str` into lines of maxiumum length `max`. - * Splits on word boundaries. Preserves existing new lines. - * - * @param String str string to split - * @param Number max length of each line - * @return Array Array containing lines. - */ - -function splitIntoLines(str, max) { - function _splitIntoLines(str, max) { - return str.trim().split(' ').reduce(function(lines, word) { - var line = lines[lines.length - 1] - if (line && wcwidth(line.join(' ')) + wcwidth(word) < max) { - lines[lines.length - 1].push(word) // add to line - } - else lines.push([word]) // new line - return lines - }, []).map(function(l) { - return l.join(' ') - }) - } - return str.split('\n').map(function(str) { - return _splitIntoLines(str, max) - }).reduce(function(lines, line) { - return lines.concat(line) - }, []) -} - -/** - * Add spaces and `truncationChar` between words of - * `str` which are longer than `max`. - * - * @param String str string to split - * @param Number max length of each line - * @param Number truncationChar character to append to split words - * @return String - */ - -function splitLongWords(str, max, truncationChar) { - str = str.trim() - var result = [] - var words = str.split(' ') - var remainder = '' - - var truncationWidth = wcwidth(truncationChar) - - while (remainder || words.length) { - if (remainder) { - var word = remainder - remainder = '' - } else { - var word = words.shift() - } - - if (wcwidth(word) > max) { - // slice is based on length no wcwidth - var i = 0 - var wwidth = 0 - var limit = max - truncationWidth - while (i < word.length) { - var w = wcwidth(word.charAt(i)) - if (w + wwidth > limit) { - break - } - wwidth += w - ++i - } - - remainder = word.slice(i) // get remainder - // save remainder for next loop - - word = word.slice(0, i) // grab truncated word - word += truncationChar // add trailing … or whatever - } - result.push(word) - } - - return result.join(' ') -} - - -/** - * Truncate `str` into total width `max` - * If `str` is shorter than `max`, will return `str` unaltered. - * - * @param String str string to truncated - * @param Number max total wcwidth of output string - * @return String truncated str - */ - -function truncateString(str, max) { - - str = str != null ? str : '' - str = String(str) - - if(max == Infinity) return str - - var i = 0 - var wwidth = 0 - while (i < str.length) { - var w = wcwidth(str.charAt(i)) - if(w + wwidth > max) - break - wwidth += w - ++i - } - return str.slice(0, i) -} - - - -/** - * Exports - */ - -module.exports.padRight = padRight -module.exports.padCenter = padCenter -module.exports.padLeft = padLeft -module.exports.splitIntoLines = splitIntoLines -module.exports.splitLongWords = splitLongWords -module.exports.truncateString = truncateString diff --git a/node_modules/npm/node_modules/columnify/width.js b/node_modules/npm/node_modules/columnify/width.js deleted file mode 100644 index a9f5333..0000000 --- a/node_modules/npm/node_modules/columnify/width.js +++ /dev/null @@ -1,6 +0,0 @@ -var stripAnsi = require('strip-ansi') -var wcwidth = require('wcwidth') - -module.exports = function(str) { - return wcwidth(stripAnsi(str)) -} diff --git a/node_modules/npm/node_modules/common-ancestor-path/LICENSE b/node_modules/npm/node_modules/common-ancestor-path/LICENSE deleted file mode 100644 index 05eeeb8..0000000 --- a/node_modules/npm/node_modules/common-ancestor-path/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/common-ancestor-path/index.js b/node_modules/npm/node_modules/common-ancestor-path/index.js deleted file mode 100644 index 09ae317..0000000 --- a/node_modules/npm/node_modules/common-ancestor-path/index.js +++ /dev/null @@ -1,17 +0,0 @@ -const {parse, sep, normalize: norm} = require('path') - -function* commonArrayMembers (a, b) { - const [l, s] = a.length > b.length ? [a, b] : [b, a] - for (const x of s) { - if (x === l.shift()) - yield x - else - break - } -} - -const commonAncestorPath = (a, b) => a === b ? a - : parse(a).root !== parse(b).root ? null - : [...commonArrayMembers(norm(a).split(sep), norm(b).split(sep))].join(sep) - -module.exports = (...paths) => paths.reduce(commonAncestorPath) diff --git a/node_modules/npm/node_modules/common-ancestor-path/package.json b/node_modules/npm/node_modules/common-ancestor-path/package.json deleted file mode 100644 index 4375d1d..0000000 --- a/node_modules/npm/node_modules/common-ancestor-path/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "common-ancestor-path", - "version": "1.0.1", - "files": [ - "index.js" - ], - "description": "Find the common ancestor of 2 or more paths on Windows or Unix", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/common-ancestor-path" - }, - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags" - }, - "tap": { - "check-coverage": true - }, - "devDependencies": { - "require-inject": "^1.4.4", - "tap": "^14.10.7" - } -} diff --git a/node_modules/npm/node_modules/console-control-strings/LICENSE b/node_modules/npm/node_modules/console-control-strings/LICENSE deleted file mode 100644 index e756052..0000000 --- a/node_modules/npm/node_modules/console-control-strings/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2014, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/console-control-strings/index.js b/node_modules/npm/node_modules/console-control-strings/index.js deleted file mode 100644 index bf89034..0000000 --- a/node_modules/npm/node_modules/console-control-strings/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict' - -// These tables borrowed from `ansi` - -var prefix = '\x1b[' - -exports.up = function up (num) { - return prefix + (num || '') + 'A' -} - -exports.down = function down (num) { - return prefix + (num || '') + 'B' -} - -exports.forward = function forward (num) { - return prefix + (num || '') + 'C' -} - -exports.back = function back (num) { - return prefix + (num || '') + 'D' -} - -exports.nextLine = function nextLine (num) { - return prefix + (num || '') + 'E' -} - -exports.previousLine = function previousLine (num) { - return prefix + (num || '') + 'F' -} - -exports.horizontalAbsolute = function horizontalAbsolute (num) { - if (num == null) throw new Error('horizontalAboslute requires a column to position to') - return prefix + num + 'G' -} - -exports.eraseData = function eraseData () { - return prefix + 'J' -} - -exports.eraseLine = function eraseLine () { - return prefix + 'K' -} - -exports.goto = function (x, y) { - return prefix + y + ';' + x + 'H' -} - -exports.gotoSOL = function () { - return '\r' -} - -exports.beep = function () { - return '\x07' -} - -exports.hideCursor = function hideCursor () { - return prefix + '?25l' -} - -exports.showCursor = function showCursor () { - return prefix + '?25h' -} - -var colors = { - reset: 0, -// styles - bold: 1, - italic: 3, - underline: 4, - inverse: 7, -// resets - stopBold: 22, - stopItalic: 23, - stopUnderline: 24, - stopInverse: 27, -// colors - white: 37, - black: 30, - blue: 34, - cyan: 36, - green: 32, - magenta: 35, - red: 31, - yellow: 33, - bgWhite: 47, - bgBlack: 40, - bgBlue: 44, - bgCyan: 46, - bgGreen: 42, - bgMagenta: 45, - bgRed: 41, - bgYellow: 43, - - grey: 90, - brightBlack: 90, - brightRed: 91, - brightGreen: 92, - brightYellow: 93, - brightBlue: 94, - brightMagenta: 95, - brightCyan: 96, - brightWhite: 97, - - bgGrey: 100, - bgBrightBlack: 100, - bgBrightRed: 101, - bgBrightGreen: 102, - bgBrightYellow: 103, - bgBrightBlue: 104, - bgBrightMagenta: 105, - bgBrightCyan: 106, - bgBrightWhite: 107 -} - -exports.color = function color (colorWith) { - if (arguments.length !== 1 || !Array.isArray(colorWith)) { - colorWith = Array.prototype.slice.call(arguments) - } - return prefix + colorWith.map(colorNameToCode).join(';') + 'm' -} - -function colorNameToCode (color) { - if (colors[color] != null) return colors[color] - throw new Error('Unknown color or style name: ' + color) -} diff --git a/node_modules/npm/node_modules/console-control-strings/package.json b/node_modules/npm/node_modules/console-control-strings/package.json deleted file mode 100644 index eb6c62a..0000000 --- a/node_modules/npm/node_modules/console-control-strings/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "console-control-strings", - "version": "1.1.0", - "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "standard && tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/console-control-strings" - }, - "keywords": [], - "author": "Rebecca Turner (http://re-becca.org/)", - "license": "ISC", - "files": [ - "LICENSE", - "index.js" - ], - "devDependencies": { - "standard": "^7.1.2", - "tap": "^5.7.2" - } -} diff --git a/node_modules/npm/node_modules/cross-spawn/LICENSE b/node_modules/npm/node_modules/cross-spawn/LICENSE deleted file mode 100644 index 8407b9a..0000000 --- a/node_modules/npm/node_modules/cross-spawn/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Made With MOXY Lda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/cross-spawn/index.js b/node_modules/npm/node_modules/cross-spawn/index.js deleted file mode 100644 index 5509742..0000000 --- a/node_modules/npm/node_modules/cross-spawn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -const cp = require('child_process'); -const parse = require('./lib/parse'); -const enoent = require('./lib/enoent'); - -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; diff --git a/node_modules/npm/node_modules/cross-spawn/lib/enoent.js b/node_modules/npm/node_modules/cross-spawn/lib/enoent.js deleted file mode 100644 index 14df9b6..0000000 --- a/node_modules/npm/node_modules/cross-spawn/lib/enoent.js +++ /dev/null @@ -1,59 +0,0 @@ -'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, -}; diff --git a/node_modules/npm/node_modules/cross-spawn/lib/parse.js b/node_modules/npm/node_modules/cross-spawn/lib/parse.js deleted file mode 100644 index 0129d74..0000000 --- a/node_modules/npm/node_modules/cross-spawn/lib/parse.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; - -const path = require('path'); -const resolveCommand = require('./util/resolveCommand'); -const escape = require('./util/escape'); -const readShebang = require('./util/readShebang'); - -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; diff --git a/node_modules/npm/node_modules/cross-spawn/lib/util/escape.js b/node_modules/npm/node_modules/cross-spawn/lib/util/escape.js deleted file mode 100644 index b0bb84c..0000000 --- a/node_modules/npm/node_modules/cross-spawn/lib/util/escape.js +++ /dev/null @@ -1,45 +0,0 @@ -'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; diff --git a/node_modules/npm/node_modules/cross-spawn/lib/util/readShebang.js b/node_modules/npm/node_modules/cross-spawn/lib/util/readShebang.js deleted file mode 100644 index 5e83733..0000000 --- a/node_modules/npm/node_modules/cross-spawn/lib/util/readShebang.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const shebangCommand = require('shebang-command'); - -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; diff --git a/node_modules/npm/node_modules/cross-spawn/lib/util/resolveCommand.js b/node_modules/npm/node_modules/cross-spawn/lib/util/resolveCommand.js deleted file mode 100644 index 7972455..0000000 --- a/node_modules/npm/node_modules/cross-spawn/lib/util/resolveCommand.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const path = require('path'); -const which = require('which'); -const getPathKey = require('path-key'); - -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; diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/.bin/node-which b/node_modules/npm/node_modules/cross-spawn/node_modules/.bin/node-which deleted file mode 120000 index 6f8415e..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/.bin/node-which +++ /dev/null @@ -1 +0,0 @@ -../which/bin/node-which \ No newline at end of file diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/which/LICENSE b/node_modules/npm/node_modules/cross-spawn/node_modules/which/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/which/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/which/README.md b/node_modules/npm/node_modules/cross-spawn/node_modules/which/README.md deleted file mode 100644 index cd83350..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/which/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# which - -Like the unix `which` utility. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. - -## USAGE - -```javascript -var which = require('which') - -// async usage -which('node', function (er, resolvedPath) { - // er is returned if no "node" is found on the PATH - // if it is found, then the absolute path to the exec is returned -}) - -// or promise -which('node').then(resolvedPath => { ... }).catch(er => { ... not found ... }) - -// sync usage -// throws if not found -var resolved = which.sync('node') - -// if nothrow option is used, returns null if not found -resolved = which.sync('node', {nothrow: true}) - -// Pass options to override the PATH and PATHEXT environment vars. -which('node', { path: someOtherPath }, function (er, resolved) { - if (er) - throw er - console.log('found at %j', resolved) -}) -``` - -## CLI USAGE - -Same as the BSD `which(1)` binary. - -``` -usage: which [-as] program ... -``` - -## OPTIONS - -You may pass an options object as the second argument. - -- `path`: Use instead of the `PATH` environment variable. -- `pathExt`: Use instead of the `PATHEXT` environment variable. -- `all`: Return all matches, instead of just the first one. Note that - this means the function returns an array of strings instead of a - single string. diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/which/bin/node-which b/node_modules/npm/node_modules/cross-spawn/node_modules/which/bin/node-which deleted file mode 100755 index 7cee372..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/which/bin/node-which +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) - usage() - -function usage () { - console.error('usage: which [-as] program ...') - process.exit(1) -} - -var all = false -var silent = false -var dashdash = false -var args = process.argv.slice(2).filter(function (arg) { - if (dashdash || !/^-/.test(arg)) - return true - - if (arg === '--') { - dashdash = true - return false - } - - var flags = arg.substr(1).split('') - for (var f = 0; f < flags.length; f++) { - var flag = flags[f] - switch (flag) { - case 's': - silent = true - break - case 'a': - all = true - break - default: - console.error('which: illegal option -- ' + flag) - usage() - } - } - return false -}) - -process.exit(args.reduce(function (pv, current) { - try { - var f = which.sync(current, { all: all }) - if (all) - f = f.join('\n') - if (!silent) - console.log(f) - return pv; - } catch (e) { - return 1; - } -}, 0)) diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/which/package.json b/node_modules/npm/node_modules/cross-spawn/node_modules/which/package.json deleted file mode 100644 index 97ad7fb..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/which/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "2.0.2", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "node-which": "./bin/node-which" - }, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "devDependencies": { - "mkdirp": "^0.5.0", - "rimraf": "^2.6.2", - "tap": "^14.6.9" - }, - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublish": "npm run changelog", - "prechangelog": "bash gen-changelog.sh", - "changelog": "git add CHANGELOG.md", - "postchangelog": "git commit -m 'update changelog - '${npm_package_version}", - "postpublish": "git push origin --follow-tags" - }, - "files": [ - "which.js", - "bin/node-which" - ], - "tap": { - "check-coverage": true - }, - "engines": { - "node": ">= 8" - } -} diff --git a/node_modules/npm/node_modules/cross-spawn/node_modules/which/which.js b/node_modules/npm/node_modules/cross-spawn/node_modules/which/which.js deleted file mode 100644 index 82afffd..0000000 --- a/node_modules/npm/node_modules/cross-spawn/node_modules/which/which.js +++ /dev/null @@ -1,125 +0,0 @@ -const isWindows = process.platform === 'win32' || - process.env.OSTYPE === 'cygwin' || - process.env.OSTYPE === 'msys' - -const path = require('path') -const COLON = isWindows ? ';' : ':' -const isexe = require('isexe') - -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 diff --git a/node_modules/npm/node_modules/cross-spawn/package.json b/node_modules/npm/node_modules/cross-spawn/package.json deleted file mode 100644 index 232ff97..0000000 --- a/node_modules/npm/node_modules/cross-spawn/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "cross-spawn", - "version": "7.0.3", - "description": "Cross platform child_process#spawn and child_process#spawnSync", - "keywords": [ - "spawn", - "spawnSync", - "windows", - "cross-platform", - "path-ext", - "shebang", - "cmd", - "execute" - ], - "author": "André Cruz ", - "homepage": "https://github.com/moxystudio/node-cross-spawn", - "repository": { - "type": "git", - "url": "git@github.com:moxystudio/node-cross-spawn.git" - }, - "license": "MIT", - "main": "index.js", - "files": [ - "lib" - ], - "scripts": { - "lint": "eslint .", - "test": "jest --env node --coverage", - "prerelease": "npm t && npm run lint", - "release": "standard-version", - "postrelease": "git push --follow-tags origin HEAD && npm publish" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ] - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "devDependencies": { - "@commitlint/cli": "^8.1.0", - "@commitlint/config-conventional": "^8.1.0", - "babel-core": "^6.26.3", - "babel-jest": "^24.9.0", - "babel-preset-moxy": "^3.1.0", - "eslint": "^5.16.0", - "eslint-config-moxy": "^7.1.0", - "husky": "^3.0.5", - "jest": "^24.9.0", - "lint-staged": "^9.2.5", - "mkdirp": "^0.5.1", - "rimraf": "^3.0.0", - "standard-version": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } -} diff --git a/node_modules/npm/node_modules/cssesc/LICENSE-MIT.txt b/node_modules/npm/node_modules/cssesc/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/npm/node_modules/cssesc/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/cssesc/README.md b/node_modules/npm/node_modules/cssesc/README.md deleted file mode 100644 index 58fb8fe..0000000 --- a/node_modules/npm/node_modules/cssesc/README.md +++ /dev/null @@ -1,201 +0,0 @@ -# cssesc [![Build status](https://travis-ci.org/mathiasbynens/cssesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/cssesc) [![Code coverage status](https://img.shields.io/codecov/c/github/mathiasbynens/cssesc.svg)](https://codecov.io/gh/mathiasbynens/cssesc) - -A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output. - -This is a JavaScript library for [escaping text for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes) while generating the shortest possible valid ASCII-only output. [Here’s an online demo.](https://mothereff.in/css-escapes) - -[A polyfill for the CSSOM `CSS.escape()` method is available in a separate repository.](https://mths.be/cssescape) (In comparison, _cssesc_ is much more powerful.) - -Feel free to fork if you see possible improvements! - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install cssesc -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/): - -```js -const cssesc = require('cssesc'); -``` - -In Ruby using [the `ruby-cssesc` wrapper gem](https://github.com/borodean/ruby-cssesc): - -```bash -gem install ruby-cssesc -``` - -```ruby -require 'ruby-cssesc' -CSSEsc.escape('I ♥ Ruby', is_identifier: true) -``` - -In Sass using [`sassy-escape`](https://github.com/borodean/sassy-escape): - -```bash -gem install sassy-escape -``` - -```scss -body { - content: escape('I ♥ Sass', $is-identifier: true); -} -``` - -## API - -### `cssesc(value, options)` - -This function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes). - -```js -cssesc('Ich ♥ Bücher'); -// → 'Ich \\2665 B\\FC cher' - -cssesc('foo 𝌆 bar'); -// → 'foo \\1D306 bar' -``` - -By default, `cssesc` returns a string that can be used as part of a CSS string. If the target is a CSS identifier rather than a CSS string, use the `isIdentifier: true` setting (see below). - -The optional `options` argument accepts an object with the following options: - -#### `isIdentifier` - -The default value for the `isIdentifier` option is `false`. This means that the input text will be escaped for use in a CSS string literal. If you want to use the result as a CSS identifier instead (in a selector, for example), set this option to `true`. - -```js -cssesc('123a2b'); -// → '123a2b' - -cssesc('123a2b', { - 'isIdentifier': true -}); -// → '\\31 23a2b' -``` - -#### `quotes` - -The default value for the `quotes` option is `'single'`. This means that any occurences of `'` in the input text will be escaped as `\'`, so that the output can be used in a CSS string literal wrapped in single quotes. - -```js -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.'); -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' -// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc." - -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'single' -}); -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.' -// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc." -``` - -If you want to use the output as part of a CSS string literal wrapped in double quotes, set the `quotes` option to `'double'`. - -```js -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'double' -}); -// → 'Lorem ipsum \\"dolor\\" sit \'amet\' etc.' -// → "Lorem ipsum \\\"dolor\\\" sit 'amet' etc." -``` - -#### `wrap` - -The `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output will be a valid CSS string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting. - -```js -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'single', - 'wrap': true -}); -// → '\'Lorem ipsum "dolor" sit \\\'amet\\\' etc.\'' -// → "\'Lorem ipsum \"dolor\" sit \\\'amet\\\' etc.\'" - -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', { - 'quotes': 'double', - 'wrap': true -}); -// → '"Lorem ipsum \\"dolor\\" sit \'amet\' etc."' -// → "\"Lorem ipsum \\\"dolor\\\" sit \'amet\' etc.\"" -``` - -#### `escapeEverything` - -The `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output will be escaped, even printable ASCII symbols. - -```js -cssesc('lolwat"foo\'bar', { - 'escapeEverything': true -}); -// → '\\6C\\6F\\6C\\77\\61\\74\\"\\66\\6F\\6F\\\'\\62\\61\\72' -// → "\\6C\\6F\\6C\\77\\61\\74\\\"\\66\\6F\\6F\\'\\62\\61\\72" -``` - -#### Overriding the default options globally - -The global default settings can be overridden by modifying the `css.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting. - -```js -// Read the global default setting for `escapeEverything`: -cssesc.options.escapeEverything; -// → `false` by default - -// Override the global default setting for `escapeEverything`: -cssesc.options.escapeEverything = true; - -// Using the global default setting for `escapeEverything`, which is now `true`: -cssesc('foo © bar ≠ baz 𝌆 qux'); -// → '\\66\\6F\\6F\\ \\A9\\ \\62\\61\\72\\ \\2260\\ \\62\\61\\7A\\ \\1D306\\ \\71\\75\\78' -``` - -### `cssesc.version` - -A string representing the semantic version number. - -### Using the `cssesc` binary - -To use the `cssesc` binary in your shell, simply install cssesc globally using npm: - -```bash -npm install -g cssesc -``` - -After that you will be able to escape text for use in CSS strings or identifiers from the command line: - -```bash -$ cssesc 'föo ♥ bår 𝌆 baz' -f\F6o \2665 b\E5r \1D306 baz -``` - -If the output needs to be a CSS identifier rather than part of a string literal, use the `-i`/`--identifier` option: - -```bash -$ cssesc --identifier 'föo ♥ bår 𝌆 baz' -f\F6o\ \2665\ b\E5r\ \1D306\ baz -``` - -See `cssesc --help` for the full list of options. - -## Support - -This library supports the Node.js and browser versions mentioned in [`.babelrc`](https://github.com/mathiasbynens/cssesc/blob/master/.babelrc). For a version that supports a wider variety of legacy browsers and environments out-of-the-box, [see v0.1.0](https://github.com/mathiasbynens/cssesc/releases/tag/v0.1.0). - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -This library is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/npm/node_modules/cssesc/bin/cssesc b/node_modules/npm/node_modules/cssesc/bin/cssesc deleted file mode 100755 index 188c034..0000000 --- a/node_modules/npm/node_modules/cssesc/bin/cssesc +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env node -const fs = require('fs'); -const cssesc = require('../cssesc.js'); -const strings = process.argv.splice(2); -const stdin = process.stdin; -const options = {}; -const log = console.log; - -const main = function() { - const option = strings[0]; - - if (/^(?:-h|--help|undefined)$/.test(option)) { - log( - 'cssesc v%s - https://mths.be/cssesc', - cssesc.version - ); - log([ - '\nUsage:\n', - '\tcssesc [string]', - '\tcssesc [-i | --identifier] [string]', - '\tcssesc [-s | --single-quotes] [string]', - '\tcssesc [-d | --double-quotes] [string]', - '\tcssesc [-w | --wrap] [string]', - '\tcssesc [-e | --escape-everything] [string]', - '\tcssesc [-v | --version]', - '\tcssesc [-h | --help]', - '\nExamples:\n', - '\tcssesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tcssesc --identifier \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tcssesc --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\tcssesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'', - '\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | cssesc' - ].join('\n')); - return process.exit(1); - } - - if (/^(?:-v|--version)$/.test(option)) { - log('v%s', cssesc.version); - return process.exit(1); - } - - strings.forEach(function(string) { - // Process options - if (/^(?:-i|--identifier)$/.test(string)) { - options.isIdentifier = true; - return; - } - if (/^(?:-s|--single-quotes)$/.test(string)) { - options.quotes = 'single'; - return; - } - if (/^(?:-d|--double-quotes)$/.test(string)) { - options.quotes = 'double'; - return; - } - if (/^(?:-w|--wrap)$/.test(string)) { - options.wrap = true; - return; - } - if (/^(?:-e|--escape-everything)$/.test(string)) { - options.escapeEverything = true; - return; - } - - // Process string(s) - let result; - try { - result = cssesc(string, options); - log(result); - } catch (exception) { - log(exception.message + '\n'); - log('Error: failed to escape.'); - log('If you think this is a bug in cssesc, please report it:'); - log('https://github.com/mathiasbynens/cssesc/issues/new'); - log( - '\nStack trace using cssesc@%s:\n', - cssesc.version - ); - log(exception.stack); - return process.exit(1); - } - }); - // Return with exit status 0 outside of the `forEach` loop, in case - // multiple strings were passed in. - return process.exit(0); - -}; - -if (stdin.isTTY) { - // handle shell arguments - main(); -} else { - let timeout; - // Either the script is called from within a non-TTY context, or `stdin` - // content is being piped in. - if (!process.stdout.isTTY) { - // The script was called from a non-TTY context. This is a rather uncommon - // use case we don’t actively support. However, we don’t want the script - // to wait forever in such cases, so… - timeout = setTimeout(function() { - // …if no piped data arrived after a whole minute, handle shell - // arguments instead. - main(); - }, 60000); - } - let data = ''; - stdin.on('data', function(chunk) { - clearTimeout(timeout); - data += chunk; - }); - stdin.on('end', function() { - strings.push(data.trim()); - main(); - }); - stdin.resume(); -} diff --git a/node_modules/npm/node_modules/cssesc/cssesc.js b/node_modules/npm/node_modules/cssesc/cssesc.js deleted file mode 100644 index 1c0928e..0000000 --- a/node_modules/npm/node_modules/cssesc/cssesc.js +++ /dev/null @@ -1,110 +0,0 @@ -/*! https://mths.be/cssesc v3.0.0 by @mathias */ -'use strict'; - -var object = {}; -var hasOwnProperty = object.hasOwnProperty; -var merge = function merge(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - for (var key in defaults) { - // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since - // only recognized option names are used. - result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; - } - return result; -}; - -var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; -var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; -var regexAlwaysEscape = /['"\\]/; -var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; - -// https://mathiasbynens.be/notes/css-escapes#css -var cssesc = function cssesc(string, options) { - options = merge(options, cssesc.options); - if (options.quotes != 'single' && options.quotes != 'double') { - options.quotes = 'single'; - } - var quote = options.quotes == 'double' ? '"' : '\''; - var isIdentifier = options.isIdentifier; - - var firstChar = string.charAt(0); - var output = ''; - var counter = 0; - var length = string.length; - while (counter < length) { - var character = string.charAt(counter++); - var codePoint = character.charCodeAt(); - var value = void 0; - // If it’s not a printable ASCII character… - if (codePoint < 0x20 || codePoint > 0x7E) { - if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { - // It’s a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // next character is low surrogate - codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; - } else { - // It’s an unmatched surrogate; only append this code unit, in case - // the next code unit is the high surrogate of a surrogate pair. - counter--; - } - } - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else { - if (options.escapeEverything) { - if (regexAnySingleEscape.test(character)) { - value = '\\' + character; - } else { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } - } else if (/[\t\n\f\r\x0B]/.test(character)) { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { - value = '\\' + character; - } else { - value = character; - } - } - output += value; - } - - if (isIdentifier) { - if (/^-[-\d]/.test(output)) { - output = '\\-' + output.slice(1); - } else if (/\d/.test(firstChar)) { - output = '\\3' + firstChar + ' ' + output.slice(1); - } - } - - // Remove spaces after `\HEX` escapes that are not followed by a hex digit, - // since they’re redundant. Note that this is only possible if the escape - // sequence isn’t preceded by an odd number of backslashes. - output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { - if ($1 && $1.length % 2) { - // It’s not safe to remove the space, so don’t. - return $0; - } - // Strip the space. - return ($1 || '') + $2; - }); - - if (!isIdentifier && options.wrap) { - return quote + output + quote; - } - return output; -}; - -// Expose default options (so they can be overridden globally). -cssesc.options = { - 'escapeEverything': false, - 'isIdentifier': false, - 'quotes': 'single', - 'wrap': false -}; - -cssesc.version = '3.0.0'; - -module.exports = cssesc; diff --git a/node_modules/npm/node_modules/cssesc/man/cssesc.1 b/node_modules/npm/node_modules/cssesc/man/cssesc.1 deleted file mode 100644 index eee4996..0000000 --- a/node_modules/npm/node_modules/cssesc/man/cssesc.1 +++ /dev/null @@ -1,70 +0,0 @@ -.Dd August 9, 2013 -.Dt cssesc 1 -.Sh NAME -.Nm cssesc -.Nd escape text for use in CSS string literals or identifiers -.Sh SYNOPSIS -.Nm -.Op Fl i | -identifier Ar string -.br -.Op Fl s | -single-quotes Ar string -.br -.Op Fl d | -double-quotes Ar string -.br -.Op Fl w | -wrap Ar string -.br -.Op Fl e | -escape-everything Ar string -.br -.Op Fl v | -version -.br -.Op Fl h | -help -.Sh DESCRIPTION -.Nm -escapes strings for use in CSS string literals or identifiers while generating the shortest possible valid ASCII-only output. -.Sh OPTIONS -.Bl -ohang -offset -.It Sy "-s, --single-quotes" -Escape any occurences of ' in the input string as \\', so that the output can be used in a CSS string literal wrapped in single quotes. -.It Sy "-d, --double-quotes" -Escape any occurences of " in the input string as \\", so that the output can be used in a CSS string literal wrapped in double quotes. -.It Sy "-w, --wrap" -Make sure the output is a valid CSS string literal wrapped in quotes. The type of quotes can be specified using the -.Ar -s | --single-quotes -or -.Ar -d | --double-quotes -settings. -.It Sy "-e, --escape-everything" -Escape all the symbols in the output, even printable ASCII symbols. -.It Sy "-v, --version" -Print cssesc's version. -.It Sy "-h, --help" -Show the help screen. -.El -.Sh EXIT STATUS -The -.Nm cssesc -utility exits with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It Li 0 -.Nm -successfully escaped the given text and printed the result. -.It Li 1 -.Nm -wasn't instructed to escape anything (for example, the -.Ar --help -flag was set); or, an error occurred. -.El -.Sh EXAMPLES -.Bl -ohang -offset -.It Sy "cssesc 'foo bar baz'" -Print an escaped version of the given text. -.It Sy echo\ 'foo bar baz'\ |\ cssesc -Print an escaped version of the text that gets piped in. -.El -.Sh BUGS -cssesc's bug tracker is located at . -.Sh AUTHOR -Mathias Bynens -.Sh WWW - diff --git a/node_modules/npm/node_modules/cssesc/package.json b/node_modules/npm/node_modules/cssesc/package.json deleted file mode 100644 index 076c84d..0000000 --- a/node_modules/npm/node_modules/cssesc/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "cssesc", - "version": "3.0.0", - "description": "A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.", - "homepage": "https://mths.be/cssesc", - "engines": { - "node": ">=4" - }, - "main": "cssesc.js", - "bin": "bin/cssesc", - "man": "man/cssesc.1", - "keywords": [ - "css", - "escape", - "identifier", - "string", - "tool" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/cssesc.git" - }, - "bugs": "https://github.com/mathiasbynens/cssesc/issues", - "files": [ - "LICENSE-MIT.txt", - "cssesc.js", - "bin/", - "man/" - ], - "scripts": { - "build": "grunt template && babel cssesc.js -o cssesc.js", - "test": "mocha tests", - "cover": "istanbul cover --report html node_modules/.bin/_mocha tests -- -u exports -R spec" - }, - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-preset-env": "^1.6.1", - "codecov": "^1.0.1", - "grunt": "^1.0.1", - "grunt-template": "^1.0.0", - "istanbul": "^0.4.4", - "mocha": "^2.5.3", - "regenerate": "^1.2.1", - "requirejs": "^2.1.16" - } -} diff --git a/node_modules/npm/node_modules/debug/LICENSE b/node_modules/npm/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/node_modules/npm/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/npm/node_modules/debug/node_modules/ms/index.js b/node_modules/npm/node_modules/debug/node_modules/ms/index.js deleted file mode 100644 index c4498bc..0000000 --- a/node_modules/npm/node_modules/debug/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -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' && isFinite(val)) { - 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|weeks?|w|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 'weeks': - case 'week': - case 'w': - return n * w; - 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) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/npm/node_modules/debug/node_modules/ms/license.md b/node_modules/npm/node_modules/debug/node_modules/ms/license.md deleted file mode 100644 index 69b6125..0000000 --- a/node_modules/npm/node_modules/debug/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/debug/node_modules/ms/package.json b/node_modules/npm/node_modules/debug/node_modules/ms/package.json deleted file mode 100644 index eea666e..0000000 --- a/node_modules/npm/node_modules/debug/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ms", - "version": "2.1.2", - "description": "Tiny millisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.12.1", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1" - } -} diff --git a/node_modules/npm/node_modules/debug/package.json b/node_modules/npm/node_modules/debug/package.json deleted file mode 100644 index 3bcdc24..0000000 --- a/node_modules/npm/node_modules/debug/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "debug", - "version": "4.3.4", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon ", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "istanbul cover _mocha -- test.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "2.1.2" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "istanbul": "^0.4.5", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - } -} diff --git a/node_modules/npm/node_modules/debug/src/browser.js b/node_modules/npm/node_modules/debug/src/browser.js deleted file mode 100644 index cd0fc35..0000000 --- a/node_modules/npm/node_modules/debug/src/browser.js +++ /dev/null @@ -1,269 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * 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; - } - - const 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 - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, 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.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * 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() { - let 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 = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * 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; - } -}; diff --git a/node_modules/npm/node_modules/debug/src/common.js b/node_modules/npm/node_modules/debug/src/common.js deleted file mode 100644 index e3291b2..0000000 --- a/node_modules/npm/node_modules/debug/src/common.js +++ /dev/null @@ -1,274 +0,0 @@ - -/** - * 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 = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * 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 debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let 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) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const 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 - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const 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); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * 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.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const 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.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * 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; - } - - let i; - let 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; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/npm/node_modules/debug/src/index.js b/node_modules/npm/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/node_modules/npm/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * 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 = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/npm/node_modules/debug/src/node.js b/node_modules/npm/node_modules/debug/src/node.js deleted file mode 100644 index 79bc085..0000000 --- a/node_modules/npm/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * 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; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * 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 - const supportsColor = require('supports-color'); - - 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(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let 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) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[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(...args) { - return process.stderr.write(util.format(...args) + '\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 = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * 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(str => 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); -}; diff --git a/node_modules/npm/node_modules/defaults/LICENSE b/node_modules/npm/node_modules/defaults/LICENSE deleted file mode 100644 index 11eb6fd..0000000 --- a/node_modules/npm/node_modules/defaults/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2022 Sindre Sorhus -Copyright (c) 2015 Elijah Insua - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/npm/node_modules/defaults/index.js b/node_modules/npm/node_modules/defaults/index.js deleted file mode 100644 index cb7d75c..0000000 --- a/node_modules/npm/node_modules/defaults/index.js +++ /dev/null @@ -1,13 +0,0 @@ -var clone = require('clone'); - -module.exports = function(options, defaults) { - options = options || {}; - - Object.keys(defaults).forEach(function(key) { - if (typeof options[key] === 'undefined') { - options[key] = clone(defaults[key]); - } - }); - - return options; -}; \ No newline at end of file diff --git a/node_modules/npm/node_modules/defaults/package.json b/node_modules/npm/node_modules/defaults/package.json deleted file mode 100644 index 44f72b1..0000000 --- a/node_modules/npm/node_modules/defaults/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "defaults", - "version": "1.0.4", - "description": "merge single level defaults over a config object", - "main": "index.js", - "funding": "https://github.com/sponsors/sindresorhus", - "scripts": { - "test": "node test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/sindresorhus/node-defaults.git" - }, - "keywords": [ - "config", - "defaults", - "options", - "object", - "merge", - "assign", - "properties", - "deep" - ], - "author": "Elijah Insua ", - "license": "MIT", - "readmeFilename": "README.md", - "dependencies": { - "clone": "^1.0.2" - }, - "devDependencies": { - "tap": "^2.0.0" - } -} diff --git a/node_modules/npm/node_modules/defaults/test.js b/node_modules/npm/node_modules/defaults/test.js deleted file mode 100644 index 60e0ffb..0000000 --- a/node_modules/npm/node_modules/defaults/test.js +++ /dev/null @@ -1,34 +0,0 @@ -var defaults = require('./'), - test = require('tap').test; - -test("ensure options is an object", function(t) { - var options = defaults(false, { a : true }); - t.ok(options.a); - t.end() -}); - -test("ensure defaults override keys", function(t) { - var result = defaults({}, { a: false, b: true }); - t.ok(result.b, 'b merges over undefined'); - t.equal(result.a, false, 'a merges over undefined'); - t.end(); -}); - -test("ensure defined keys are not overwritten", function(t) { - var result = defaults({ b: false }, { a: false, b: true }); - t.equal(result.b, false, 'b not merged'); - t.equal(result.a, false, 'a merges over undefined'); - t.end(); -}); - -test("ensure defaults clone nested objects", function(t) { - var d = { a: [1,2,3], b: { hello : 'world' } }; - var result = defaults({}, d); - t.equal(result.a.length, 3, 'objects should be clones'); - t.ok(result.a !== d.a, 'objects should be clones'); - - t.equal(Object.keys(result.b).length, 1, 'objects should be clones'); - t.ok(result.b !== d.b, 'objects should be clones'); - t.end(); -}); - diff --git a/node_modules/npm/node_modules/delegates/History.md b/node_modules/npm/node_modules/delegates/History.md deleted file mode 100644 index 25959ea..0000000 --- a/node_modules/npm/node_modules/delegates/History.md +++ /dev/null @@ -1,22 +0,0 @@ - -1.0.0 / 2015-12-14 -================== - - * Merge pull request #12 from kasicka/master - * Add license text - -0.1.0 / 2014-10-17 -================== - - * adds `.fluent()` to api - -0.0.3 / 2014-01-13 -================== - - * fix receiver for .method() - -0.0.2 / 2014-01-13 -================== - - * Object.defineProperty() sucks - * Initial commit diff --git a/node_modules/npm/node_modules/delegates/License b/node_modules/npm/node_modules/delegates/License deleted file mode 100644 index 60de60a..0000000 --- a/node_modules/npm/node_modules/delegates/License +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2015 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/delegates/Makefile b/node_modules/npm/node_modules/delegates/Makefile deleted file mode 100644 index a9dcfd5..0000000 --- a/node_modules/npm/node_modules/delegates/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/node_modules/npm/node_modules/delegates/index.js b/node_modules/npm/node_modules/delegates/index.js deleted file mode 100644 index 17c222d..0000000 --- a/node_modules/npm/node_modules/delegates/index.js +++ /dev/null @@ -1,121 +0,0 @@ - -/** - * Expose `Delegator`. - */ - -module.exports = Delegator; - -/** - * Initialize a delegator. - * - * @param {Object} proto - * @param {String} target - * @api public - */ - -function Delegator(proto, target) { - if (!(this instanceof Delegator)) return new Delegator(proto, target); - this.proto = proto; - this.target = target; - this.methods = []; - this.getters = []; - this.setters = []; - this.fluents = []; -} - -/** - * Delegate method `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.method = function(name){ - var proto = this.proto; - var target = this.target; - this.methods.push(name); - - proto[name] = function(){ - return this[target][name].apply(this[target], arguments); - }; - - return this; -}; - -/** - * Delegator accessor `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.access = function(name){ - return this.getter(name).setter(name); -}; - -/** - * Delegator getter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.getter = function(name){ - var proto = this.proto; - var target = this.target; - this.getters.push(name); - - proto.__defineGetter__(name, function(){ - return this[target][name]; - }); - - return this; -}; - -/** - * Delegator setter `name`. - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.setter = function(name){ - var proto = this.proto; - var target = this.target; - this.setters.push(name); - - proto.__defineSetter__(name, function(val){ - return this[target][name] = val; - }); - - return this; -}; - -/** - * Delegator fluent accessor - * - * @param {String} name - * @return {Delegator} self - * @api public - */ - -Delegator.prototype.fluent = function (name) { - var proto = this.proto; - var target = this.target; - this.fluents.push(name); - - proto[name] = function(val){ - if ('undefined' != typeof val) { - this[target][name] = val; - return this; - } else { - return this[target][name]; - } - }; - - return this; -}; diff --git a/node_modules/npm/node_modules/delegates/package.json b/node_modules/npm/node_modules/delegates/package.json deleted file mode 100644 index 1724038..0000000 --- a/node_modules/npm/node_modules/delegates/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "delegates", - "version": "1.0.0", - "repository": "visionmedia/node-delegates", - "description": "delegate methods and accessors to another property", - "keywords": ["delegate", "delegation"], - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "license": "MIT" -} diff --git a/node_modules/npm/node_modules/delegates/test/index.js b/node_modules/npm/node_modules/delegates/test/index.js deleted file mode 100644 index 7b6e3d4..0000000 --- a/node_modules/npm/node_modules/delegates/test/index.js +++ /dev/null @@ -1,94 +0,0 @@ - -var assert = require('assert'); -var delegate = require('..'); - -describe('.method(name)', function(){ - it('should delegate methods', function(){ - var obj = {}; - - obj.request = { - foo: function(bar){ - assert(this == obj.request); - return bar; - } - }; - - delegate(obj, 'request').method('foo'); - - obj.foo('something').should.equal('something'); - }) -}) - -describe('.getter(name)', function(){ - it('should delegate getters', function(){ - var obj = {}; - - obj.request = { - get type() { - return 'text/html'; - } - } - - delegate(obj, 'request').getter('type'); - - obj.type.should.equal('text/html'); - }) -}) - -describe('.setter(name)', function(){ - it('should delegate setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').setter('type'); - - obj.type = 'hey'; - obj.request.type.should.equal('HEY'); - }) -}) - -describe('.access(name)', function(){ - it('should delegate getters and setters', function(){ - var obj = {}; - - obj.request = { - get type() { - return this._type.toUpperCase(); - }, - - set type(val) { - this._type = val; - } - } - - delegate(obj, 'request').access('type'); - - obj.type = 'hey'; - obj.type.should.equal('HEY'); - }) -}) - -describe('.fluent(name)', function () { - it('should delegate in a fluent fashion', function () { - var obj = { - settings: { - env: 'development' - } - }; - - delegate(obj, 'settings').fluent('env'); - - obj.env().should.equal('development'); - obj.env('production').should.equal(obj); - obj.settings.env.should.equal('production'); - }) -}) diff --git a/node_modules/npm/node_modules/diff/CONTRIBUTING.md b/node_modules/npm/node_modules/diff/CONTRIBUTING.md deleted file mode 100644 index c8c4fe6..0000000 --- a/node_modules/npm/node_modules/diff/CONTRIBUTING.md +++ /dev/null @@ -1,39 +0,0 @@ -# How to Contribute - -## Pull Requests - -We also accept [pull requests][pull-request]! - -Generally we like to see pull requests that - -- Maintain the existing code style -- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) -- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -- Have tests -- Don't decrease the current code coverage (see coverage/lcov-report/index.html) - -## Building - -``` -npm install -npm test -``` - -The `npm test -- dev` implements watching for tests within Node and `karma start` may be used for manual testing in browsers. - -If you notice any problems, please report them to the GitHub issue tracker at -[http://github.com/kpdecker/jsdiff/issues](http://github.com/kpdecker/jsdiff/issues). - -## Releasing - -JsDiff utilizes the [release yeoman generator][generator-release] to perform most release tasks. - -A full release may be completed with the following: - -``` -yo release -npm publish -``` - -[generator-release]: https://github.com/walmartlabs/generator-release -[pull-request]: https://github.com/kpdecker/jsdiff/pull/new/master diff --git a/node_modules/npm/node_modules/diff/LICENSE b/node_modules/npm/node_modules/diff/LICENSE deleted file mode 100644 index 4e7146e..0000000 --- a/node_modules/npm/node_modules/diff/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/node_modules/npm/node_modules/diff/dist/diff.js b/node_modules/npm/node_modules/diff/dist/diff.js deleted file mode 100644 index 7fa3a55..0000000 --- a/node_modules/npm/node_modules/diff/dist/diff.js +++ /dev/null @@ -1,1627 +0,0 @@ -/*! - - diff v5.1.0 - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@license -*/ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.Diff = {})); -}(this, (function (exports) { 'use strict'; - - 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; - - if (options.maxEditLength) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - - 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, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - - - if (callback) { - (function exec() { - setTimeout(function () { - 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) { - // All whitespace symbols except newline group into one token, each newline - in separate token - var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\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) { - "@babel/helpers - typeof"; - - 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) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - 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: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [], - linedelimiters: [] - }; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - - 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; - - 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); - - if (!diff) { - return; - } - - 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 && oldStr.length > 0) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - // however, if the old file is empty, do not output the no-nl line - 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 formatPatch(diff) { - var ret = []; - - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.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]; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; - } - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); - } - 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; - } - - exports.Diff = Diff; - exports.applyPatch = applyPatch; - exports.applyPatches = applyPatches; - exports.canonicalize = canonicalize; - exports.convertChangesToDMP = convertChangesToDMP; - exports.convertChangesToXML = convertChangesToXML; - exports.createPatch = createPatch; - exports.createTwoFilesPatch = createTwoFilesPatch; - exports.diffArrays = diffArrays; - exports.diffChars = diffChars; - exports.diffCss = diffCss; - exports.diffJson = diffJson; - exports.diffLines = diffLines; - exports.diffSentences = diffSentences; - exports.diffTrimmedLines = diffTrimmedLines; - exports.diffWords = diffWords; - exports.diffWordsWithSpace = diffWordsWithSpace; - exports.merge = merge; - exports.parsePatch = parsePatch; - exports.structuredPatch = structuredPatch; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/npm/node_modules/diff/dist/diff.min.js b/node_modules/npm/node_modules/diff/dist/diff.min.js deleted file mode 100644 index 80c20de..0000000 --- a/node_modules/npm/node_modules/diff/dist/diff.min.js +++ /dev/null @@ -1,38 +0,0 @@ -/*! - - diff v5.1.0 - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@license -*/ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).Diff={})}(this,function(e){"use strict";function t(){}t.prototype={diff:function(u,a,e){var n=2=c&&h<=i+1)return d([{value:this.join(a),count:a.length}]);function o(){for(var e,n=-1*p;n<=p;n+=2){var t=void 0,r=v[n-1],i=v[n+1],o=(i?i.newPos:0)-n;r&&(v[n-1]=void 0);var l=r&&r.newPos+1=c&&h<=o+1)return d(function(e,n,t,r,i){for(var o=0,l=n.length,s=0,u=0;oe.length?t:e}),d.value=e.join(f)):d.value=e.join(t.slice(s,s+d.count)),s+=d.count,d.added||(u+=d.count))}var c=n[l-1];1e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=c.length-2&&u.length<=d.context&&(i=/\n$/.test(a),o=/\n$/.test(f),l=0==u.length&&g.length>r.oldLines,!i&&l&&0e.length)return!1;for(var t=0;t"):i.removed&&t.push(""),t.push((n=i.value,n.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),i.added?t.push(""):i.removed&&t.push("")}return t.join("")},e.createPatch=function(e,n,t,r,i,o){return y(e,e,n,t,r,i,o)},e.createTwoFilesPatch=y,e.diffArrays=function(e,n,t){return g.diff(e,n,t)},e.diffChars=function(e,n,t){return r.diff(e,n,t)},e.diffCss=function(e,n,t){return f.diff(e,n,t)},e.diffJson=function(e,n,t){return p.diff(e,n,t)},e.diffLines=L,e.diffSentences=function(e,n,t){return a.diff(e,n,t)},e.diffTrimmedLines=function(e,n,t){var r=i(t,{ignoreWhitespace:!0});return u.diff(e,n,r)},e.diffWords=function(e,n,t){return t=i(t,{ignoreWhitespace:!0}),s.diff(e,n,t)},e.diffWordsWithSpace=function(e,n,t){return s.diff(e,n,t)},e.merge=function(e,n,t){e=b(e,t),n=b(n,t);var r={};(e.index||n.index)&&(r.index=e.index||n.index),(e.newFileName||n.newFileName)&&(F(e)?F(n)?(r.oldFileName=N(r,e.oldFileName,n.oldFileName),r.newFileName=N(r,e.newFileName,n.newFileName),r.oldHeader=N(r,e.oldHeader,n.oldHeader),r.newHeader=N(r,e.newHeader,n.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=n.oldFileName||e.oldFileName,r.newFileName=n.newFileName||e.newFileName,r.oldHeader=n.oldHeader||e.oldHeader,r.newHeader=n.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,l=0,s=0;i'); - } 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; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWOztBQUNBLE9BQUssSUFBSUMsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0YsT0FBTyxDQUFDRyxNQUE1QixFQUFvQ0QsQ0FBQyxFQUFyQyxFQUF5QztBQUN2QyxRQUFJRSxNQUFNLEdBQUdKLE9BQU8sQ0FBQ0UsQ0FBRCxDQUFwQjs7QUFDQSxRQUFJRSxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTLE9BQVQ7QUFDRCxLQUZELE1BRU8sSUFBSUYsTUFBTSxDQUFDRyxPQUFYLEVBQW9CO0FBQ3pCTixNQUFBQSxHQUFHLENBQUNLLElBQUosQ0FBUyxPQUFUO0FBQ0Q7O0FBRURMLElBQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTRSxVQUFVLENBQUNKLE1BQU0sQ0FBQ0ssS0FBUixDQUFuQjs7QUFFQSxRQUFJTCxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTLFFBQVQ7QUFDRCxLQUZELE1BRU8sSUFBSUYsTUFBTSxDQUFDRyxPQUFYLEVBQW9CO0FBQ3pCTixNQUFBQSxHQUFHLENBQUNLLElBQUosQ0FBUyxRQUFUO0FBQ0Q7QUFDRjs7QUFDRCxTQUFPTCxHQUFHLENBQUNTLElBQUosQ0FBUyxFQUFULENBQVA7QUFDRDs7QUFFRCxTQUFTRixVQUFULENBQW9CRyxDQUFwQixFQUF1QjtBQUNyQixNQUFJQyxDQUFDLEdBQUdELENBQVI7QUFDQUMsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE9BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE1BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE1BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLFFBQWhCLENBQUo7QUFFQSxTQUFPRCxDQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb1hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgcmV0LnB1c2goJzxkZWw+Jyk7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goZXNjYXBlSFRNTChjaGFuZ2UudmFsdWUpKTtcblxuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIHJldC5wdXNoKCc8L2lucz4nKTtcbiAgICB9IGVsc2UgaWYgKGNoYW5nZS5yZW1vdmVkKSB7XG4gICAgICByZXQucHVzaCgnPC9kZWw+Jyk7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQuam9pbignJyk7XG59XG5cbmZ1bmN0aW9uIGVzY2FwZUhUTUwocykge1xuICBsZXQgbiA9IHM7XG4gIG4gPSBuLnJlcGxhY2UoLyYvZywgJyZhbXA7Jyk7XG4gIG4gPSBuLnJlcGxhY2UoLzwvZywgJyZsdDsnKTtcbiAgbiA9IG4ucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuICBuID0gbi5yZXBsYWNlKC9cIi9nLCAnJnF1b3Q7Jyk7XG5cbiAgcmV0dXJuIG47XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/lib/diff/array.js b/node_modules/npm/node_modules/diff/lib/diff/array.js deleted file mode 100644 index 19e3680..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/array.js +++ /dev/null @@ -1,45 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffArrays = diffArrays; -exports.arrayDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -var arrayDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.arrayDiff = arrayDiff; - -/*istanbul ignore end*/ -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); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic2xpY2UiLCJqb2luIiwicmVtb3ZlRW1wdHkiLCJkaWZmQXJyYXlzIiwib2xkQXJyIiwibmV3QXJyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxTQUFTLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSixFQUFsQjs7Ozs7O0FBQ1BELFNBQVMsQ0FBQ0UsUUFBVixHQUFxQixVQUFTQyxLQUFULEVBQWdCO0FBQ25DLFNBQU9BLEtBQUssQ0FBQ0MsS0FBTixFQUFQO0FBQ0QsQ0FGRDs7QUFHQUosU0FBUyxDQUFDSyxJQUFWLEdBQWlCTCxTQUFTLENBQUNNLFdBQVYsR0FBd0IsVUFBU0gsS0FBVCxFQUFnQjtBQUN2RCxTQUFPQSxLQUFQO0FBQ0QsQ0FGRDs7QUFJTyxTQUFTSSxVQUFULENBQW9CQyxNQUFwQixFQUE0QkMsTUFBNUIsRUFBb0NDLFFBQXBDLEVBQThDO0FBQUUsU0FBT1YsU0FBUyxDQUFDVyxJQUFWLENBQWVILE1BQWYsRUFBdUJDLE1BQXZCLEVBQStCQyxRQUEvQixDQUFQO0FBQWtEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuZXhwb3J0IGNvbnN0IGFycmF5RGlmZiA9IG5ldyBEaWZmKCk7XG5hcnJheURpZmYudG9rZW5pemUgPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdmFsdWUuc2xpY2UoKTtcbn07XG5hcnJheURpZmYuam9pbiA9IGFycmF5RGlmZi5yZW1vdmVFbXB0eSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmQXJyYXlzKG9sZEFyciwgbmV3QXJyLCBjYWxsYmFjaykgeyByZXR1cm4gYXJyYXlEaWZmLmRpZmYob2xkQXJyLCBuZXdBcnIsIGNhbGxiYWNrKTsgfVxuIl19 diff --git a/node_modules/npm/node_modules/diff/lib/diff/base.js b/node_modules/npm/node_modules/diff/lib/diff/base.js deleted file mode 100644 index 521da8a..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/base.js +++ /dev/null @@ -1,307 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = Diff; - -/*istanbul ignore end*/ -function Diff() {} - -Diff.prototype = { - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - diff: function diff(oldString, newString) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - 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; - - if (options.maxEditLength) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - - 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 = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - - 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, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - - - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - - if (ret) { - return ret; - } - } - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - 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 - }); - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - 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; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - 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(); - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - removeEmpty: function removeEmpty(array) { - var ret = []; - - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - - return ret; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - castInput: function castInput(value) { - return value; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - tokenize: function tokenize(value) { - return value.split(''); - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - 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) - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Jhc2UuanMiXSwibmFtZXMiOlsiRGlmZiIsInByb3RvdHlwZSIsImRpZmYiLCJvbGRTdHJpbmciLCJuZXdTdHJpbmciLCJvcHRpb25zIiwiY2FsbGJhY2siLCJzZWxmIiwiZG9uZSIsInZhbHVlIiwic2V0VGltZW91dCIsInVuZGVmaW5lZCIsImNhc3RJbnB1dCIsInJlbW92ZUVtcHR5IiwidG9rZW5pemUiLCJuZXdMZW4iLCJsZW5ndGgiLCJvbGRMZW4iLCJlZGl0TGVuZ3RoIiwibWF4RWRpdExlbmd0aCIsIk1hdGgiLCJtaW4iLCJiZXN0UGF0aCIsIm5ld1BvcyIsImNvbXBvbmVudHMiLCJvbGRQb3MiLCJleHRyYWN0Q29tbW9uIiwiam9pbiIsImNvdW50IiwiZXhlY0VkaXRMZW5ndGgiLCJkaWFnb25hbFBhdGgiLCJiYXNlUGF0aCIsImFkZFBhdGgiLCJyZW1vdmVQYXRoIiwiY2FuQWRkIiwiY2FuUmVtb3ZlIiwiY2xvbmVQYXRoIiwicHVzaENvbXBvbmVudCIsImJ1aWxkVmFsdWVzIiwidXNlTG9uZ2VzdFRva2VuIiwiZXhlYyIsInJldCIsImFkZGVkIiwicmVtb3ZlZCIsImxhc3QiLCJwdXNoIiwiY29tbW9uQ291bnQiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJjb21wYXJhdG9yIiwiaWdub3JlQ2FzZSIsInRvTG93ZXJDYXNlIiwiYXJyYXkiLCJpIiwic3BsaXQiLCJjaGFycyIsImNvbXBvbmVudFBvcyIsImNvbXBvbmVudExlbiIsImNvbXBvbmVudCIsInNsaWNlIiwibWFwIiwib2xkVmFsdWUiLCJ0bXAiLCJsYXN0Q29tcG9uZW50IiwicG9wIiwicGF0aCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQWUsU0FBU0EsSUFBVCxHQUFnQixDQUFFOztBQUVqQ0EsSUFBSSxDQUFDQyxTQUFMLEdBQWlCO0FBQUE7O0FBQUE7QUFDZkMsRUFBQUEsSUFEZSxnQkFDVkMsU0FEVSxFQUNDQyxTQURELEVBQzBCO0FBQUE7QUFBQTtBQUFBO0FBQWRDLElBQUFBLE9BQWMsdUVBQUosRUFBSTtBQUN2QyxRQUFJQyxRQUFRLEdBQUdELE9BQU8sQ0FBQ0MsUUFBdkI7O0FBQ0EsUUFBSSxPQUFPRCxPQUFQLEtBQW1CLFVBQXZCLEVBQW1DO0FBQ2pDQyxNQUFBQSxRQUFRLEdBQUdELE9BQVg7QUFDQUEsTUFBQUEsT0FBTyxHQUFHLEVBQVY7QUFDRDs7QUFDRCxTQUFLQSxPQUFMLEdBQWVBLE9BQWY7QUFFQSxRQUFJRSxJQUFJLEdBQUcsSUFBWDs7QUFFQSxhQUFTQyxJQUFULENBQWNDLEtBQWQsRUFBcUI7QUFDbkIsVUFBSUgsUUFBSixFQUFjO0FBQ1pJLFFBQUFBLFVBQVUsQ0FBQyxZQUFXO0FBQUVKLFVBQUFBLFFBQVEsQ0FBQ0ssU0FBRCxFQUFZRixLQUFaLENBQVI7QUFBNkIsU0FBM0MsRUFBNkMsQ0FBN0MsQ0FBVjtBQUNBLGVBQU8sSUFBUDtBQUNELE9BSEQsTUFHTztBQUNMLGVBQU9BLEtBQVA7QUFDRDtBQUNGLEtBakJzQyxDQW1CdkM7OztBQUNBTixJQUFBQSxTQUFTLEdBQUcsS0FBS1MsU0FBTCxDQUFlVCxTQUFmLENBQVo7QUFDQUMsSUFBQUEsU0FBUyxHQUFHLEtBQUtRLFNBQUwsQ0FBZVIsU0FBZixDQUFaO0FBRUFELElBQUFBLFNBQVMsR0FBRyxLQUFLVSxXQUFMLENBQWlCLEtBQUtDLFFBQUwsQ0FBY1gsU0FBZCxDQUFqQixDQUFaO0FBQ0FDLElBQUFBLFNBQVMsR0FBRyxLQUFLUyxXQUFMLENBQWlCLEtBQUtDLFFBQUwsQ0FBY1YsU0FBZCxDQUFqQixDQUFaO0FBRUEsUUFBSVcsTUFBTSxHQUFHWCxTQUFTLENBQUNZLE1BQXZCO0FBQUEsUUFBK0JDLE1BQU0sR0FBR2QsU0FBUyxDQUFDYSxNQUFsRDtBQUNBLFFBQUlFLFVBQVUsR0FBRyxDQUFqQjtBQUNBLFFBQUlDLGFBQWEsR0FBR0osTUFBTSxHQUFHRSxNQUE3Qjs7QUFDQSxRQUFHWixPQUFPLENBQUNjLGFBQVgsRUFBMEI7QUFDeEJBLE1BQUFBLGFBQWEsR0FBR0MsSUFBSSxDQUFDQyxHQUFMLENBQVNGLGFBQVQsRUFBd0JkLE9BQU8sQ0FBQ2MsYUFBaEMsQ0FBaEI7QUFDRDs7QUFFRCxRQUFJRyxRQUFRLEdBQUcsQ0FBQztBQUFFQyxNQUFBQSxNQUFNLEVBQUUsQ0FBQyxDQUFYO0FBQWNDLE1BQUFBLFVBQVUsRUFBRTtBQUExQixLQUFELENBQWYsQ0FqQ3VDLENBbUN2Qzs7QUFDQSxRQUFJQyxNQUFNLEdBQUcsS0FBS0MsYUFBTCxDQUFtQkosUUFBUSxDQUFDLENBQUQsQ0FBM0IsRUFBZ0NsQixTQUFoQyxFQUEyQ0QsU0FBM0MsRUFBc0QsQ0FBdEQsQ0FBYjs7QUFDQSxRQUFJbUIsUUFBUSxDQUFDLENBQUQsQ0FBUixDQUFZQyxNQUFaLEdBQXFCLENBQXJCLElBQTBCUixNQUExQixJQUFvQ1UsTUFBTSxHQUFHLENBQVQsSUFBY1IsTUFBdEQsRUFBOEQ7QUFDNUQ7QUFDQSxhQUFPVCxJQUFJLENBQUMsQ0FBQztBQUFDQyxRQUFBQSxLQUFLLEVBQUUsS0FBS2tCLElBQUwsQ0FBVXZCLFNBQVYsQ0FBUjtBQUE4QndCLFFBQUFBLEtBQUssRUFBRXhCLFNBQVMsQ0FBQ1k7QUFBL0MsT0FBRCxDQUFELENBQVg7QUFDRCxLQXhDc0MsQ0EwQ3ZDOzs7QUFDQSxhQUFTYSxjQUFULEdBQTBCO0FBQ3hCLFdBQUssSUFBSUMsWUFBWSxHQUFHLENBQUMsQ0FBRCxHQUFLWixVQUE3QixFQUF5Q1ksWUFBWSxJQUFJWixVQUF6RCxFQUFxRVksWUFBWSxJQUFJLENBQXJGLEVBQXdGO0FBQ3RGLFlBQUlDLFFBQVE7QUFBQTtBQUFBO0FBQVo7QUFBQTs7QUFDQSxZQUFJQyxPQUFPLEdBQUdWLFFBQVEsQ0FBQ1EsWUFBWSxHQUFHLENBQWhCLENBQXRCO0FBQUEsWUFDSUcsVUFBVSxHQUFHWCxRQUFRLENBQUNRLFlBQVksR0FBRyxDQUFoQixDQUR6QjtBQUFBLFlBRUlMLE9BQU0sR0FBRyxDQUFDUSxVQUFVLEdBQUdBLFVBQVUsQ0FBQ1YsTUFBZCxHQUF1QixDQUFsQyxJQUF1Q08sWUFGcEQ7O0FBR0EsWUFBSUUsT0FBSixFQUFhO0FBQ1g7QUFDQVYsVUFBQUEsUUFBUSxDQUFDUSxZQUFZLEdBQUcsQ0FBaEIsQ0FBUixHQUE2Qm5CLFNBQTdCO0FBQ0Q7O0FBRUQsWUFBSXVCLE1BQU0sR0FBR0YsT0FBTyxJQUFJQSxPQUFPLENBQUNULE1BQVIsR0FBaUIsQ0FBakIsR0FBcUJSLE1BQTdDO0FBQUEsWUFDSW9CLFNBQVMsR0FBR0YsVUFBVSxJQUFJLEtBQUtSLE9BQW5CLElBQTZCQSxPQUFNLEdBQUdSLE1BRHREOztBQUVBLFlBQUksQ0FBQ2lCLE1BQUQsSUFBVyxDQUFDQyxTQUFoQixFQUEyQjtBQUN6QjtBQUNBYixVQUFBQSxRQUFRLENBQUNRLFlBQUQsQ0FBUixHQUF5Qm5CLFNBQXpCO0FBQ0E7QUFDRCxTQWhCcUYsQ0FrQnRGO0FBQ0E7QUFDQTs7O0FBQ0EsWUFBSSxDQUFDdUIsTUFBRCxJQUFZQyxTQUFTLElBQUlILE9BQU8sQ0FBQ1QsTUFBUixHQUFpQlUsVUFBVSxDQUFDVixNQUF6RCxFQUFrRTtBQUNoRVEsVUFBQUEsUUFBUSxHQUFHSyxTQUFTLENBQUNILFVBQUQsQ0FBcEI7QUFDQTFCLFVBQUFBLElBQUksQ0FBQzhCLGFBQUwsQ0FBbUJOLFFBQVEsQ0FBQ1AsVUFBNUIsRUFBd0NiLFNBQXhDLEVBQW1ELElBQW5EO0FBQ0QsU0FIRCxNQUdPO0FBQ0xvQixVQUFBQSxRQUFRLEdBQUdDLE9BQVgsQ0FESyxDQUNlOztBQUNwQkQsVUFBQUEsUUFBUSxDQUFDUixNQUFUO0FBQ0FoQixVQUFBQSxJQUFJLENBQUM4QixhQUFMLENBQW1CTixRQUFRLENBQUNQLFVBQTVCLEVBQXdDLElBQXhDLEVBQThDYixTQUE5QztBQUNEOztBQUVEYyxRQUFBQSxPQUFNLEdBQUdsQixJQUFJLENBQUNtQixhQUFMLENBQW1CSyxRQUFuQixFQUE2QjNCLFNBQTdCLEVBQXdDRCxTQUF4QyxFQUFtRDJCLFlBQW5ELENBQVQsQ0E5QnNGLENBZ0N0Rjs7QUFDQSxZQUFJQyxRQUFRLENBQUNSLE1BQVQsR0FBa0IsQ0FBbEIsSUFBdUJSLE1BQXZCLElBQWlDVSxPQUFNLEdBQUcsQ0FBVCxJQUFjUixNQUFuRCxFQUEyRDtBQUN6RCxpQkFBT1QsSUFBSSxDQUFDOEIsV0FBVyxDQUFDL0IsSUFBRCxFQUFPd0IsUUFBUSxDQUFDUCxVQUFoQixFQUE0QnBCLFNBQTVCLEVBQXVDRCxTQUF2QyxFQUFrREksSUFBSSxDQUFDZ0MsZUFBdkQsQ0FBWixDQUFYO0FBQ0QsU0FGRCxNQUVPO0FBQ0w7QUFDQWpCLFVBQUFBLFFBQVEsQ0FBQ1EsWUFBRCxDQUFSLEdBQXlCQyxRQUF6QjtBQUNEO0FBQ0Y7O0FBRURiLE1BQUFBLFVBQVU7QUFDWCxLQXRGc0MsQ0F3RnZDO0FBQ0E7QUFDQTtBQUNBOzs7QUFDQSxRQUFJWixRQUFKLEVBQWM7QUFDWCxnQkFBU2tDLElBQVQsR0FBZ0I7QUFDZjlCLFFBQUFBLFVBQVUsQ0FBQyxZQUFXO0FBQ3BCLGNBQUlRLFVBQVUsR0FBR0MsYUFBakIsRUFBZ0M7QUFDOUIsbUJBQU9iLFFBQVEsRUFBZjtBQUNEOztBQUVELGNBQUksQ0FBQ3VCLGNBQWMsRUFBbkIsRUFBdUI7QUFDckJXLFlBQUFBLElBQUk7QUFDTDtBQUNGLFNBUlMsRUFRUCxDQVJPLENBQVY7QUFTRCxPQVZBLEdBQUQ7QUFXRCxLQVpELE1BWU87QUFDTCxhQUFPdEIsVUFBVSxJQUFJQyxhQUFyQixFQUFvQztBQUNsQyxZQUFJc0IsR0FBRyxHQUFHWixjQUFjLEVBQXhCOztBQUNBLFlBQUlZLEdBQUosRUFBUztBQUNQLGlCQUFPQSxHQUFQO0FBQ0Q7QUFDRjtBQUNGO0FBQ0YsR0FqSGM7O0FBQUE7O0FBQUE7QUFtSGZKLEVBQUFBLGFBbkhlLHlCQW1IRGIsVUFuSEMsRUFtSFdrQixLQW5IWCxFQW1Ia0JDLE9BbkhsQixFQW1IMkI7QUFDeEMsUUFBSUMsSUFBSSxHQUFHcEIsVUFBVSxDQUFDQSxVQUFVLENBQUNSLE1BQVgsR0FBb0IsQ0FBckIsQ0FBckI7O0FBQ0EsUUFBSTRCLElBQUksSUFBSUEsSUFBSSxDQUFDRixLQUFMLEtBQWVBLEtBQXZCLElBQWdDRSxJQUFJLENBQUNELE9BQUwsS0FBaUJBLE9BQXJELEVBQThEO0FBQzVEO0FBQ0E7QUFDQW5CLE1BQUFBLFVBQVUsQ0FBQ0EsVUFBVSxDQUFDUixNQUFYLEdBQW9CLENBQXJCLENBQVYsR0FBb0M7QUFBQ1ksUUFBQUEsS0FBSyxFQUFFZ0IsSUFBSSxDQUFDaEIsS0FBTCxHQUFhLENBQXJCO0FBQXdCYyxRQUFBQSxLQUFLLEVBQUVBLEtBQS9CO0FBQXNDQyxRQUFBQSxPQUFPLEVBQUVBO0FBQS9DLE9BQXBDO0FBQ0QsS0FKRCxNQUlPO0FBQ0xuQixNQUFBQSxVQUFVLENBQUNxQixJQUFYLENBQWdCO0FBQUNqQixRQUFBQSxLQUFLLEVBQUUsQ0FBUjtBQUFXYyxRQUFBQSxLQUFLLEVBQUVBLEtBQWxCO0FBQXlCQyxRQUFBQSxPQUFPLEVBQUVBO0FBQWxDLE9BQWhCO0FBQ0Q7QUFDRixHQTVIYzs7QUFBQTs7QUFBQTtBQTZIZmpCLEVBQUFBLGFBN0hlLHlCQTZIREssUUE3SEMsRUE2SFMzQixTQTdIVCxFQTZIb0JELFNBN0hwQixFQTZIK0IyQixZQTdIL0IsRUE2SDZDO0FBQzFELFFBQUlmLE1BQU0sR0FBR1gsU0FBUyxDQUFDWSxNQUF2QjtBQUFBLFFBQ0lDLE1BQU0sR0FBR2QsU0FBUyxDQUFDYSxNQUR2QjtBQUFBLFFBRUlPLE1BQU0sR0FBR1EsUUFBUSxDQUFDUixNQUZ0QjtBQUFBLFFBR0lFLE1BQU0sR0FBR0YsTUFBTSxHQUFHTyxZQUh0QjtBQUFBLFFBS0lnQixXQUFXLEdBQUcsQ0FMbEI7O0FBTUEsV0FBT3ZCLE1BQU0sR0FBRyxDQUFULEdBQWFSLE1BQWIsSUFBdUJVLE1BQU0sR0FBRyxDQUFULEdBQWFSLE1BQXBDLElBQThDLEtBQUs4QixNQUFMLENBQVkzQyxTQUFTLENBQUNtQixNQUFNLEdBQUcsQ0FBVixDQUFyQixFQUFtQ3BCLFNBQVMsQ0FBQ3NCLE1BQU0sR0FBRyxDQUFWLENBQTVDLENBQXJELEVBQWdIO0FBQzlHRixNQUFBQSxNQUFNO0FBQ05FLE1BQUFBLE1BQU07QUFDTnFCLE1BQUFBLFdBQVc7QUFDWjs7QUFFRCxRQUFJQSxXQUFKLEVBQWlCO0FBQ2ZmLE1BQUFBLFFBQVEsQ0FBQ1AsVUFBVCxDQUFvQnFCLElBQXBCLENBQXlCO0FBQUNqQixRQUFBQSxLQUFLLEVBQUVrQjtBQUFSLE9BQXpCO0FBQ0Q7O0FBRURmLElBQUFBLFFBQVEsQ0FBQ1IsTUFBVCxHQUFrQkEsTUFBbEI7QUFDQSxXQUFPRSxNQUFQO0FBQ0QsR0FoSmM7O0FBQUE7O0FBQUE7QUFrSmZzQixFQUFBQSxNQWxKZSxrQkFrSlJDLElBbEpRLEVBa0pGQyxLQWxKRSxFQWtKSztBQUNsQixRQUFJLEtBQUs1QyxPQUFMLENBQWE2QyxVQUFqQixFQUE2QjtBQUMzQixhQUFPLEtBQUs3QyxPQUFMLENBQWE2QyxVQUFiLENBQXdCRixJQUF4QixFQUE4QkMsS0FBOUIsQ0FBUDtBQUNELEtBRkQsTUFFTztBQUNMLGFBQU9ELElBQUksS0FBS0MsS0FBVCxJQUNELEtBQUs1QyxPQUFMLENBQWE4QyxVQUFiLElBQTJCSCxJQUFJLENBQUNJLFdBQUwsT0FBdUJILEtBQUssQ0FBQ0csV0FBTixFQUR4RDtBQUVEO0FBQ0YsR0F6SmM7O0FBQUE7O0FBQUE7QUEwSmZ2QyxFQUFBQSxXQTFKZSx1QkEwSkh3QyxLQTFKRyxFQTBKSTtBQUNqQixRQUFJWixHQUFHLEdBQUcsRUFBVjs7QUFDQSxTQUFLLElBQUlhLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdELEtBQUssQ0FBQ3JDLE1BQTFCLEVBQWtDc0MsQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxVQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBVCxFQUFjO0FBQ1piLFFBQUFBLEdBQUcsQ0FBQ0ksSUFBSixDQUFTUSxLQUFLLENBQUNDLENBQUQsQ0FBZDtBQUNEO0FBQ0Y7O0FBQ0QsV0FBT2IsR0FBUDtBQUNELEdBbEtjOztBQUFBOztBQUFBO0FBbUtmN0IsRUFBQUEsU0FuS2UscUJBbUtMSCxLQW5LSyxFQW1LRTtBQUNmLFdBQU9BLEtBQVA7QUFDRCxHQXJLYzs7QUFBQTs7QUFBQTtBQXNLZkssRUFBQUEsUUF0S2Usb0JBc0tOTCxLQXRLTSxFQXNLQztBQUNkLFdBQU9BLEtBQUssQ0FBQzhDLEtBQU4sQ0FBWSxFQUFaLENBQVA7QUFDRCxHQXhLYzs7QUFBQTs7QUFBQTtBQXlLZjVCLEVBQUFBLElBektlLGdCQXlLVjZCLEtBektVLEVBeUtIO0FBQ1YsV0FBT0EsS0FBSyxDQUFDN0IsSUFBTixDQUFXLEVBQVgsQ0FBUDtBQUNEO0FBM0tjLENBQWpCOztBQThLQSxTQUFTVyxXQUFULENBQXFCcEMsSUFBckIsRUFBMkJzQixVQUEzQixFQUF1Q3BCLFNBQXZDLEVBQWtERCxTQUFsRCxFQUE2RG9DLGVBQTdELEVBQThFO0FBQzVFLE1BQUlrQixZQUFZLEdBQUcsQ0FBbkI7QUFBQSxNQUNJQyxZQUFZLEdBQUdsQyxVQUFVLENBQUNSLE1BRDlCO0FBQUEsTUFFSU8sTUFBTSxHQUFHLENBRmI7QUFBQSxNQUdJRSxNQUFNLEdBQUcsQ0FIYjs7QUFLQSxTQUFPZ0MsWUFBWSxHQUFHQyxZQUF0QixFQUFvQ0QsWUFBWSxFQUFoRCxFQUFvRDtBQUNsRCxRQUFJRSxTQUFTLEdBQUduQyxVQUFVLENBQUNpQyxZQUFELENBQTFCOztBQUNBLFFBQUksQ0FBQ0UsU0FBUyxDQUFDaEIsT0FBZixFQUF3QjtBQUN0QixVQUFJLENBQUNnQixTQUFTLENBQUNqQixLQUFYLElBQW9CSCxlQUF4QixFQUF5QztBQUN2QyxZQUFJOUIsS0FBSyxHQUFHTCxTQUFTLENBQUN3RCxLQUFWLENBQWdCckMsTUFBaEIsRUFBd0JBLE1BQU0sR0FBR29DLFNBQVMsQ0FBQy9CLEtBQTNDLENBQVo7QUFDQW5CLFFBQUFBLEtBQUssR0FBR0EsS0FBSyxDQUFDb0QsR0FBTixDQUFVLFVBQVNwRCxLQUFULEVBQWdCNkMsQ0FBaEIsRUFBbUI7QUFDbkMsY0FBSVEsUUFBUSxHQUFHM0QsU0FBUyxDQUFDc0IsTUFBTSxHQUFHNkIsQ0FBVixDQUF4QjtBQUNBLGlCQUFPUSxRQUFRLENBQUM5QyxNQUFULEdBQWtCUCxLQUFLLENBQUNPLE1BQXhCLEdBQWlDOEMsUUFBakMsR0FBNENyRCxLQUFuRDtBQUNELFNBSE8sQ0FBUjtBQUtBa0QsUUFBQUEsU0FBUyxDQUFDbEQsS0FBVixHQUFrQlAsSUFBSSxDQUFDeUIsSUFBTCxDQUFVbEIsS0FBVixDQUFsQjtBQUNELE9BUkQsTUFRTztBQUNMa0QsUUFBQUEsU0FBUyxDQUFDbEQsS0FBVixHQUFrQlAsSUFBSSxDQUFDeUIsSUFBTCxDQUFVdkIsU0FBUyxDQUFDd0QsS0FBVixDQUFnQnJDLE1BQWhCLEVBQXdCQSxNQUFNLEdBQUdvQyxTQUFTLENBQUMvQixLQUEzQyxDQUFWLENBQWxCO0FBQ0Q7O0FBQ0RMLE1BQUFBLE1BQU0sSUFBSW9DLFNBQVMsQ0FBQy9CLEtBQXBCLENBWnNCLENBY3RCOztBQUNBLFVBQUksQ0FBQytCLFNBQVMsQ0FBQ2pCLEtBQWYsRUFBc0I7QUFDcEJqQixRQUFBQSxNQUFNLElBQUlrQyxTQUFTLENBQUMvQixLQUFwQjtBQUNEO0FBQ0YsS0FsQkQsTUFrQk87QUFDTCtCLE1BQUFBLFNBQVMsQ0FBQ2xELEtBQVYsR0FBa0JQLElBQUksQ0FBQ3lCLElBQUwsQ0FBVXhCLFNBQVMsQ0FBQ3lELEtBQVYsQ0FBZ0JuQyxNQUFoQixFQUF3QkEsTUFBTSxHQUFHa0MsU0FBUyxDQUFDL0IsS0FBM0MsQ0FBVixDQUFsQjtBQUNBSCxNQUFBQSxNQUFNLElBQUlrQyxTQUFTLENBQUMvQixLQUFwQixDQUZLLENBSUw7QUFDQTtBQUNBOztBQUNBLFVBQUk2QixZQUFZLElBQUlqQyxVQUFVLENBQUNpQyxZQUFZLEdBQUcsQ0FBaEIsQ0FBVixDQUE2QmYsS0FBakQsRUFBd0Q7QUFDdEQsWUFBSXFCLEdBQUcsR0FBR3ZDLFVBQVUsQ0FBQ2lDLFlBQVksR0FBRyxDQUFoQixDQUFwQjtBQUNBakMsUUFBQUEsVUFBVSxDQUFDaUMsWUFBWSxHQUFHLENBQWhCLENBQVYsR0FBK0JqQyxVQUFVLENBQUNpQyxZQUFELENBQXpDO0FBQ0FqQyxRQUFBQSxVQUFVLENBQUNpQyxZQUFELENBQVYsR0FBMkJNLEdBQTNCO0FBQ0Q7QUFDRjtBQUNGLEdBdkMyRSxDQXlDNUU7QUFDQTtBQUNBOzs7QUFDQSxNQUFJQyxhQUFhLEdBQUd4QyxVQUFVLENBQUNrQyxZQUFZLEdBQUcsQ0FBaEIsQ0FBOUI7O0FBQ0EsTUFBSUEsWUFBWSxHQUFHLENBQWYsSUFDRyxPQUFPTSxhQUFhLENBQUN2RCxLQUFyQixLQUErQixRQURsQyxLQUVJdUQsYUFBYSxDQUFDdEIsS0FBZCxJQUF1QnNCLGFBQWEsQ0FBQ3JCLE9BRnpDLEtBR0d6QyxJQUFJLENBQUM2QyxNQUFMLENBQVksRUFBWixFQUFnQmlCLGFBQWEsQ0FBQ3ZELEtBQTlCLENBSFAsRUFHNkM7QUFDM0NlLElBQUFBLFVBQVUsQ0FBQ2tDLFlBQVksR0FBRyxDQUFoQixDQUFWLENBQTZCakQsS0FBN0IsSUFBc0N1RCxhQUFhLENBQUN2RCxLQUFwRDtBQUNBZSxJQUFBQSxVQUFVLENBQUN5QyxHQUFYO0FBQ0Q7O0FBRUQsU0FBT3pDLFVBQVA7QUFDRDs7QUFFRCxTQUFTWSxTQUFULENBQW1COEIsSUFBbkIsRUFBeUI7QUFDdkIsU0FBTztBQUFFM0MsSUFBQUEsTUFBTSxFQUFFMkMsSUFBSSxDQUFDM0MsTUFBZjtBQUF1QkMsSUFBQUEsVUFBVSxFQUFFMEMsSUFBSSxDQUFDMUMsVUFBTCxDQUFnQm9DLEtBQWhCLENBQXNCLENBQXRCO0FBQW5DLEdBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIERpZmYoKSB7fVxuXG5EaWZmLnByb3RvdHlwZSA9IHtcbiAgZGlmZihvbGRTdHJpbmcsIG5ld1N0cmluZywgb3B0aW9ucyA9IHt9KSB7XG4gICAgbGV0IGNhbGxiYWNrID0gb3B0aW9ucy5jYWxsYmFjaztcbiAgICBpZiAodHlwZW9mIG9wdGlvbnMgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgIGNhbGxiYWNrID0gb3B0aW9ucztcbiAgICAgIG9wdGlvbnMgPSB7fTtcbiAgICB9XG4gICAgdGhpcy5vcHRpb25zID0gb3B0aW9ucztcblxuICAgIGxldCBzZWxmID0gdGhpcztcblxuICAgIGZ1bmN0aW9uIGRvbmUodmFsdWUpIHtcbiAgICAgIGlmIChjYWxsYmFjaykge1xuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBjYWxsYmFjayh1bmRlZmluZWQsIHZhbHVlKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIEFsbG93IHN1YmNsYXNzZXMgdG8gbWFzc2FnZSB0aGUgaW5wdXQgcHJpb3IgdG8gcnVubmluZ1xuICAgIG9sZFN0cmluZyA9IHRoaXMuY2FzdElucHV0KG9sZFN0cmluZyk7XG4gICAgbmV3U3RyaW5nID0gdGhpcy5jYXN0SW5wdXQobmV3U3RyaW5nKTtcblxuICAgIG9sZFN0cmluZyA9IHRoaXMucmVtb3ZlRW1wdHkodGhpcy50b2tlbml6ZShvbGRTdHJpbmcpKTtcbiAgICBuZXdTdHJpbmcgPSB0aGlzLnJlbW92ZUVtcHR5KHRoaXMudG9rZW5pemUobmV3U3RyaW5nKSk7XG5cbiAgICBsZXQgbmV3TGVuID0gbmV3U3RyaW5nLmxlbmd0aCwgb2xkTGVuID0gb2xkU3RyaW5nLmxlbmd0aDtcbiAgICBsZXQgZWRpdExlbmd0aCA9IDE7XG4gICAgbGV0IG1heEVkaXRMZW5ndGggPSBuZXdMZW4gKyBvbGRMZW47XG4gICAgaWYob3B0aW9ucy5tYXhFZGl0TGVuZ3RoKSB7XG4gICAgICBtYXhFZGl0TGVuZ3RoID0gTWF0aC5taW4obWF4RWRpdExlbmd0aCwgb3B0aW9ucy5tYXhFZGl0TGVuZ3RoKTtcbiAgICB9XG5cbiAgICBsZXQgYmVzdFBhdGggPSBbeyBuZXdQb3M6IC0xLCBjb21wb25lbnRzOiBbXSB9XTtcblxuICAgIC8vIFNlZWQgZWRpdExlbmd0aCA9IDAsIGkuZS4gdGhlIGNvbnRlbnQgc3RhcnRzIHdpdGggdGhlIHNhbWUgdmFsdWVzXG4gICAgbGV0IG9sZFBvcyA9IHRoaXMuZXh0cmFjdENvbW1vbihiZXN0UGF0aFswXSwgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIDApO1xuICAgIGlmIChiZXN0UGF0aFswXS5uZXdQb3MgKyAxID49IG5ld0xlbiAmJiBvbGRQb3MgKyAxID49IG9sZExlbikge1xuICAgICAgLy8gSWRlbnRpdHkgcGVyIHRoZSBlcXVhbGl0eSBhbmQgdG9rZW5pemVyXG4gICAgICByZXR1cm4gZG9uZShbe3ZhbHVlOiB0aGlzLmpvaW4obmV3U3RyaW5nKSwgY291bnQ6IG5ld1N0cmluZy5sZW5ndGh9XSk7XG4gICAgfVxuXG4gICAgLy8gTWFpbiB3b3JrZXIgbWV0aG9kLiBjaGVja3MgYWxsIHBlcm11dGF0aW9ucyBvZiBhIGdpdmVuIGVkaXQgbGVuZ3RoIGZvciBhY2NlcHRhbmNlLlxuICAgIGZ1bmN0aW9uIGV4ZWNFZGl0TGVuZ3RoKCkge1xuICAgICAgZm9yIChsZXQgZGlhZ29uYWxQYXRoID0gLTEgKiBlZGl0TGVuZ3RoOyBkaWFnb25hbFBhdGggPD0gZWRpdExlbmd0aDsgZGlhZ29uYWxQYXRoICs9IDIpIHtcbiAgICAgICAgbGV0IGJhc2VQYXRoO1xuICAgICAgICBsZXQgYWRkUGF0aCA9IGJlc3RQYXRoW2RpYWdvbmFsUGF0aCAtIDFdLFxuICAgICAgICAgICAgcmVtb3ZlUGF0aCA9IGJlc3RQYXRoW2RpYWdvbmFsUGF0aCArIDFdLFxuICAgICAgICAgICAgb2xkUG9zID0gKHJlbW92ZVBhdGggPyByZW1vdmVQYXRoLm5ld1BvcyA6IDApIC0gZGlhZ29uYWxQYXRoO1xuICAgICAgICBpZiAoYWRkUGF0aCkge1xuICAgICAgICAgIC8vIE5vIG9uZSBlbHNlIGlzIGdvaW5nIHRvIGF0dGVtcHQgdG8gdXNlIHRoaXMgdmFsdWUsIGNsZWFyIGl0XG4gICAgICAgICAgYmVzdFBhdGhbZGlhZ29uYWxQYXRoIC0gMV0gPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgY2FuQWRkID0gYWRkUGF0aCAmJiBhZGRQYXRoLm5ld1BvcyArIDEgPCBuZXdMZW4sXG4gICAgICAgICAgICBjYW5SZW1vdmUgPSByZW1vdmVQYXRoICYmIDAgPD0gb2xkUG9zICYmIG9sZFBvcyA8IG9sZExlbjtcbiAgICAgICAgaWYgKCFjYW5BZGQgJiYgIWNhblJlbW92ZSkge1xuICAgICAgICAgIC8vIElmIHRoaXMgcGF0aCBpcyBhIHRlcm1pbmFsIHRoZW4gcHJ1bmVcbiAgICAgICAgICBiZXN0UGF0aFtkaWFnb25hbFBhdGhdID0gdW5kZWZpbmVkO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2VsZWN0IHRoZSBkaWFnb25hbCB0aGF0IHdlIHdhbnQgdG8gYnJhbmNoIGZyb20uIFdlIHNlbGVjdCB0aGUgcHJpb3JcbiAgICAgICAgLy8gcGF0aCB3aG9zZSBwb3NpdGlvbiBpbiB0aGUgbmV3IHN0cmluZyBpcyB0aGUgZmFydGhlc3QgZnJvbSB0aGUgb3JpZ2luXG4gICAgICAgIC8vIGFuZCBkb2VzIG5vdCBwYXNzIHRoZSBib3VuZHMgb2YgdGhlIGRpZmYgZ3JhcGhcbiAgICAgICAgaWYgKCFjYW5BZGQgfHwgKGNhblJlbW92ZSAmJiBhZGRQYXRoLm5ld1BvcyA8IHJlbW92ZVBhdGgubmV3UG9zKSkge1xuICAgICAgICAgIGJhc2VQYXRoID0gY2xvbmVQYXRoKHJlbW92ZVBhdGgpO1xuICAgICAgICAgIHNlbGYucHVzaENvbXBvbmVudChiYXNlUGF0aC5jb21wb25lbnRzLCB1bmRlZmluZWQsIHRydWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGJhc2VQYXRoID0gYWRkUGF0aDsgLy8gTm8gbmVlZCB0byBjbG9uZSwgd2UndmUgcHVsbGVkIGl0IGZyb20gdGhlIGxpc3RcbiAgICAgICAgICBiYXNlUGF0aC5uZXdQb3MrKztcbiAgICAgICAgICBzZWxmLnB1c2hDb21wb25lbnQoYmFzZVBhdGguY29tcG9uZW50cywgdHJ1ZSwgdW5kZWZpbmVkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG9sZFBvcyA9IHNlbGYuZXh0cmFjdENvbW1vbihiYXNlUGF0aCwgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIGRpYWdvbmFsUGF0aCk7XG5cbiAgICAgICAgLy8gSWYgd2UgaGF2ZSBoaXQgdGhlIGVuZCBvZiBib3RoIHN0cmluZ3MsIHRoZW4gd2UgYXJlIGRvbmVcbiAgICAgICAgaWYgKGJhc2VQYXRoLm5ld1BvcyArIDEgPj0gbmV3TGVuICYmIG9sZFBvcyArIDEgPj0gb2xkTGVuKSB7XG4gICAgICAgICAgcmV0dXJuIGRvbmUoYnVpbGRWYWx1ZXMoc2VsZiwgYmFzZVBhdGguY29tcG9uZW50cywgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIHNlbGYudXNlTG9uZ2VzdFRva2VuKSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gT3RoZXJ3aXNlIHRyYWNrIHRoaXMgcGF0aCBhcyBhIHBvdGVudGlhbCBjYW5kaWRhdGUgYW5kIGNvbnRpbnVlLlxuICAgICAgICAgIGJlc3RQYXRoW2RpYWdvbmFsUGF0aF0gPSBiYXNlUGF0aDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBlZGl0TGVuZ3RoKys7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybXMgdGhlIGxlbmd0aCBvZiBlZGl0IGl0ZXJhdGlvbi4gSXMgYSBiaXQgZnVnbHkgYXMgdGhpcyBoYXMgdG8gc3VwcG9ydCB0aGVcbiAgICAvLyBzeW5jIGFuZCBhc3luYyBtb2RlIHdoaWNoIGlzIG5ldmVyIGZ1bi4gTG9vcHMgb3ZlciBleGVjRWRpdExlbmd0aCB1bnRpbCBhIHZhbHVlXG4gICAgLy8gaXMgcHJvZHVjZWQsIG9yIHVudGlsIHRoZSBlZGl0IGxlbmd0aCBleGNlZWRzIG9wdGlvbnMubWF4RWRpdExlbmd0aCAoaWYgZ2l2ZW4pLFxuICAgIC8vIGluIHdoaWNoIGNhc2UgaXQgd2lsbCByZXR1cm4gdW5kZWZpbmVkLlxuICAgIGlmIChjYWxsYmFjaykge1xuICAgICAgKGZ1bmN0aW9uIGV4ZWMoKSB7XG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgaWYgKGVkaXRMZW5ndGggPiBtYXhFZGl0TGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIWV4ZWNFZGl0TGVuZ3RoKCkpIHtcbiAgICAgICAgICAgIGV4ZWMoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sIDApO1xuICAgICAgfSgpKTtcbiAgICB9IGVsc2Uge1xuICAgICAgd2hpbGUgKGVkaXRMZW5ndGggPD0gbWF4RWRpdExlbmd0aCkge1xuICAgICAgICBsZXQgcmV0ID0gZXhlY0VkaXRMZW5ndGgoKTtcbiAgICAgICAgaWYgKHJldCkge1xuICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sXG5cbiAgcHVzaENvbXBvbmVudChjb21wb25lbnRzLCBhZGRlZCwgcmVtb3ZlZCkge1xuICAgIGxldCBsYXN0ID0gY29tcG9uZW50c1tjb21wb25lbnRzLmxlbmd0aCAtIDFdO1xuICAgIGlmIChsYXN0ICYmIGxhc3QuYWRkZWQgPT09IGFkZGVkICYmIGxhc3QucmVtb3ZlZCA9PT0gcmVtb3ZlZCkge1xuICAgICAgLy8gV2UgbmVlZCB0byBjbG9uZSBoZXJlIGFzIHRoZSBjb21wb25lbnQgY2xvbmUgb3BlcmF0aW9uIGlzIGp1c3RcbiAgICAgIC8vIGFzIHNoYWxsb3cgYXJyYXkgY2xvbmVcbiAgICAgIGNvbXBvbmVudHNbY29tcG9uZW50cy5sZW5ndGggLSAxXSA9IHtjb3VudDogbGFzdC5jb3VudCArIDEsIGFkZGVkOiBhZGRlZCwgcmVtb3ZlZDogcmVtb3ZlZCB9O1xuICAgIH0gZWxzZSB7XG4gICAgICBjb21wb25lbnRzLnB1c2goe2NvdW50OiAxLCBhZGRlZDogYWRkZWQsIHJlbW92ZWQ6IHJlbW92ZWQgfSk7XG4gICAgfVxuICB9LFxuICBleHRyYWN0Q29tbW9uKGJhc2VQYXRoLCBuZXdTdHJpbmcsIG9sZFN0cmluZywgZGlhZ29uYWxQYXRoKSB7XG4gICAgbGV0IG5ld0xlbiA9IG5ld1N0cmluZy5sZW5ndGgsXG4gICAgICAgIG9sZExlbiA9IG9sZFN0cmluZy5sZW5ndGgsXG4gICAgICAgIG5ld1BvcyA9IGJhc2VQYXRoLm5ld1BvcyxcbiAgICAgICAgb2xkUG9zID0gbmV3UG9zIC0gZGlhZ29uYWxQYXRoLFxuXG4gICAgICAgIGNvbW1vbkNvdW50ID0gMDtcbiAgICB3aGlsZSAobmV3UG9zICsgMSA8IG5ld0xlbiAmJiBvbGRQb3MgKyAxIDwgb2xkTGVuICYmIHRoaXMuZXF1YWxzKG5ld1N0cmluZ1tuZXdQb3MgKyAxXSwgb2xkU3RyaW5nW29sZFBvcyArIDFdKSkge1xuICAgICAgbmV3UG9zKys7XG4gICAgICBvbGRQb3MrKztcbiAgICAgIGNvbW1vbkNvdW50Kys7XG4gICAgfVxuXG4gICAgaWYgKGNvbW1vbkNvdW50KSB7XG4gICAgICBiYXNlUGF0aC5jb21wb25lbnRzLnB1c2goe2NvdW50OiBjb21tb25Db3VudH0pO1xuICAgIH1cblxuICAgIGJhc2VQYXRoLm5ld1BvcyA9IG5ld1BvcztcbiAgICByZXR1cm4gb2xkUG9zO1xuICB9LFxuXG4gIGVxdWFscyhsZWZ0LCByaWdodCkge1xuICAgIGlmICh0aGlzLm9wdGlvbnMuY29tcGFyYXRvcikge1xuICAgICAgcmV0dXJuIHRoaXMub3B0aW9ucy5jb21wYXJhdG9yKGxlZnQsIHJpZ2h0KTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGxlZnQgPT09IHJpZ2h0XG4gICAgICAgIHx8ICh0aGlzLm9wdGlvbnMuaWdub3JlQ2FzZSAmJiBsZWZ0LnRvTG93ZXJDYXNlKCkgPT09IHJpZ2h0LnRvTG93ZXJDYXNlKCkpO1xuICAgIH1cbiAgfSxcbiAgcmVtb3ZlRW1wdHkoYXJyYXkpIHtcbiAgICBsZXQgcmV0ID0gW107XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKGFycmF5W2ldKSB7XG4gICAgICAgIHJldC5wdXNoKGFycmF5W2ldKTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJldDtcbiAgfSxcbiAgY2FzdElucHV0KHZhbHVlKSB7XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9LFxuICB0b2tlbml6ZSh2YWx1ZSkge1xuICAgIHJldHVybiB2YWx1ZS5zcGxpdCgnJyk7XG4gIH0sXG4gIGpvaW4oY2hhcnMpIHtcbiAgICByZXR1cm4gY2hhcnMuam9pbignJyk7XG4gIH1cbn07XG5cbmZ1bmN0aW9uIGJ1aWxkVmFsdWVzKGRpZmYsIGNvbXBvbmVudHMsIG5ld1N0cmluZywgb2xkU3RyaW5nLCB1c2VMb25nZXN0VG9rZW4pIHtcbiAgbGV0IGNvbXBvbmVudFBvcyA9IDAsXG4gICAgICBjb21wb25lbnRMZW4gPSBjb21wb25lbnRzLmxlbmd0aCxcbiAgICAgIG5ld1BvcyA9IDAsXG4gICAgICBvbGRQb3MgPSAwO1xuXG4gIGZvciAoOyBjb21wb25lbnRQb3MgPCBjb21wb25lbnRMZW47IGNvbXBvbmVudFBvcysrKSB7XG4gICAgbGV0IGNvbXBvbmVudCA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcbiAgICBpZiAoIWNvbXBvbmVudC5yZW1vdmVkKSB7XG4gICAgICBpZiAoIWNvbXBvbmVudC5hZGRlZCAmJiB1c2VMb25nZXN0VG9rZW4pIHtcbiAgICAgICAgbGV0IHZhbHVlID0gbmV3U3RyaW5nLnNsaWNlKG5ld1BvcywgbmV3UG9zICsgY29tcG9uZW50LmNvdW50KTtcbiAgICAgICAgdmFsdWUgPSB2YWx1ZS5tYXAoZnVuY3Rpb24odmFsdWUsIGkpIHtcbiAgICAgICAgICBsZXQgb2xkVmFsdWUgPSBvbGRTdHJpbmdbb2xkUG9zICsgaV07XG4gICAgICAgICAgcmV0dXJuIG9sZFZhbHVlLmxlbmd0aCA+IHZhbHVlLmxlbmd0aCA/IG9sZFZhbHVlIDogdmFsdWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbXBvbmVudC52YWx1ZSA9IGRpZmYuam9pbih2YWx1ZSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb21wb25lbnQudmFsdWUgPSBkaWZmLmpvaW4obmV3U3RyaW5nLnNsaWNlKG5ld1BvcywgbmV3UG9zICsgY29tcG9uZW50LmNvdW50KSk7XG4gICAgICB9XG4gICAgICBuZXdQb3MgKz0gY29tcG9uZW50LmNvdW50O1xuXG4gICAgICAvLyBDb21tb24gY2FzZVxuICAgICAgaWYgKCFjb21wb25lbnQuYWRkZWQpIHtcbiAgICAgICAgb2xkUG9zICs9IGNvbXBvbmVudC5jb3VudDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgY29tcG9uZW50LnZhbHVlID0gZGlmZi5qb2luKG9sZFN0cmluZy5zbGljZShvbGRQb3MsIG9sZFBvcyArIGNvbXBvbmVudC5jb3VudCkpO1xuICAgICAgb2xkUG9zICs9IGNvbXBvbmVudC5jb3VudDtcblxuICAgICAgLy8gUmV2ZXJzZSBhZGQgYW5kIHJlbW92ZSBzbyByZW1vdmVzIGFyZSBvdXRwdXQgZmlyc3QgdG8gbWF0Y2ggY29tbW9uIGNvbnZlbnRpb25cbiAgICAgIC8vIFRoZSBkaWZmaW5nIGFsZ29yaXRobSBpcyB0aWVkIHRvIGFkZCB0aGVuIHJlbW92ZSBvdXRwdXQgYW5kIHRoaXMgaXMgdGhlIHNpbXBsZXN0XG4gICAgICAvLyByb3V0ZSB0byBnZXQgdGhlIGRlc2lyZWQgb3V0cHV0IHdpdGggbWluaW1hbCBvdmVyaGVhZC5cbiAgICAgIGlmIChjb21wb25lbnRQb3MgJiYgY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXS5hZGRlZCkge1xuICAgICAgICBsZXQgdG1wID0gY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXTtcbiAgICAgICAgY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXSA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcbiAgICAgICAgY29tcG9uZW50c1tjb21wb25lbnRQb3NdID0gdG1wO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8vIFNwZWNpYWwgY2FzZSBoYW5kbGUgZm9yIHdoZW4gb25lIHRlcm1pbmFsIGlzIGlnbm9yZWQgKGkuZS4gd2hpdGVzcGFjZSkuXG4gIC8vIEZvciB0aGlzIGNhc2Ugd2UgbWVyZ2UgdGhlIHRlcm1pbmFsIGludG8gdGhlIHByaW9yIHN0cmluZyBhbmQgZHJvcCB0aGUgY2hhbmdlLlxuICAvLyBUaGlzIGlzIG9ubHkgYXZhaWxhYmxlIGZvciBzdHJpbmcgbW9kZS5cbiAgbGV0IGxhc3RDb21wb25lbnQgPSBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDFdO1xuICBpZiAoY29tcG9uZW50TGVuID4gMVxuICAgICAgJiYgdHlwZW9mIGxhc3RDb21wb25lbnQudmFsdWUgPT09ICdzdHJpbmcnXG4gICAgICAmJiAobGFzdENvbXBvbmVudC5hZGRlZCB8fCBsYXN0Q29tcG9uZW50LnJlbW92ZWQpXG4gICAgICAmJiBkaWZmLmVxdWFscygnJywgbGFzdENvbXBvbmVudC52YWx1ZSkpIHtcbiAgICBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDJdLnZhbHVlICs9IGxhc3RDb21wb25lbnQudmFsdWU7XG4gICAgY29tcG9uZW50cy5wb3AoKTtcbiAgfVxuXG4gIHJldHVybiBjb21wb25lbnRzO1xufVxuXG5mdW5jdGlvbiBjbG9uZVBhdGgocGF0aCkge1xuICByZXR1cm4geyBuZXdQb3M6IHBhdGgubmV3UG9zLCBjb21wb25lbnRzOiBwYXRoLmNvbXBvbmVudHMuc2xpY2UoMCkgfTtcbn1cbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/diff/character.js b/node_modules/npm/node_modules/diff/lib/diff/character.js deleted file mode 100644 index 7ddfa20..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/character.js +++ /dev/null @@ -1,37 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffChars = diffChars; -exports.characterDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -var characterDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.characterDiff = characterDiff; - -/*istanbul ignore end*/ -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2NoYXJhY3Rlci5qcyJdLCJuYW1lcyI6WyJjaGFyYWN0ZXJEaWZmIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxhQUFhLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSixFQUF0Qjs7Ozs7O0FBQ0EsU0FBU0MsU0FBVCxDQUFtQkMsTUFBbkIsRUFBMkJDLE1BQTNCLEVBQW1DQyxPQUFuQyxFQUE0QztBQUFFLFNBQU9MLGFBQWEsQ0FBQ00sSUFBZCxDQUFtQkgsTUFBbkIsRUFBMkJDLE1BQTNCLEVBQW1DQyxPQUFuQyxDQUFQO0FBQXFEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuZXhwb3J0IGNvbnN0IGNoYXJhY3RlckRpZmYgPSBuZXcgRGlmZigpO1xuZXhwb3J0IGZ1bmN0aW9uIGRpZmZDaGFycyhvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykgeyByZXR1cm4gY2hhcmFjdGVyRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKTsgfVxuIl19 diff --git a/node_modules/npm/node_modules/diff/lib/diff/css.js b/node_modules/npm/node_modules/diff/lib/diff/css.js deleted file mode 100644 index e3ad1fc..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/css.js +++ /dev/null @@ -1,41 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffCss = diffCss; -exports.cssDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -var cssDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.cssDiff = cssDiff; - -/*istanbul ignore end*/ -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; - -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Nzcy5qcyJdLCJuYW1lcyI6WyJjc3NEaWZmIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7OztBQUVPLElBQU1BLE9BQU8sR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQSxDQUFKLEVBQWhCOzs7Ozs7QUFDUEQsT0FBTyxDQUFDRSxRQUFSLEdBQW1CLFVBQVNDLEtBQVQsRUFBZ0I7QUFDakMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLENBQVksZUFBWixDQUFQO0FBQ0QsQ0FGRDs7QUFJTyxTQUFTQyxPQUFULENBQWlCQyxNQUFqQixFQUF5QkMsTUFBekIsRUFBaUNDLFFBQWpDLEVBQTJDO0FBQUUsU0FBT1IsT0FBTyxDQUFDUyxJQUFSLENBQWFILE1BQWIsRUFBcUJDLE1BQXJCLEVBQTZCQyxRQUE3QixDQUFQO0FBQWdEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuZXhwb3J0IGNvbnN0IGNzc0RpZmYgPSBuZXcgRGlmZigpO1xuY3NzRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFt7fTo7LF18XFxzKykvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmQ3NzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gY3NzRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/diff/json.js b/node_modules/npm/node_modules/diff/lib/diff/json.js deleted file mode 100644 index 67c2f17..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/json.js +++ /dev/null @@ -1,163 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffJson = diffJson; -exports.canonicalize = canonicalize; -exports.jsonDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_line = require("./line") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _typeof(obj) { "@babel/helpers - typeof"; 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); } - -/*istanbul ignore end*/ -var objectPrototypeToString = Object.prototype.toString; -var jsonDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); // 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: - -/*istanbul ignore start*/ -exports.jsonDiff = jsonDiff; - -/*istanbul ignore end*/ -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = -/*istanbul ignore start*/ -_line -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -lineDiff -/*istanbul ignore end*/ -.tokenize; - -jsonDiff.castInput = function (value) { - /*istanbul ignore start*/ - var _this$options = - /*istanbul ignore end*/ - this.options, - undefinedReplacement = _this$options.undefinedReplacement, - _this$options$stringi = _this$options.stringifyReplacer, - stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - 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 ( - /*istanbul ignore start*/ - _base - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ].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 ( - /*istanbul ignore start*/ - _typeof( - /*istanbul ignore end*/ - 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; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2pzb24uanMiXSwibmFtZXMiOlsib2JqZWN0UHJvdG90eXBlVG9TdHJpbmciLCJPYmplY3QiLCJwcm90b3R5cGUiLCJ0b1N0cmluZyIsImpzb25EaWZmIiwiRGlmZiIsInVzZUxvbmdlc3RUb2tlbiIsInRva2VuaXplIiwibGluZURpZmYiLCJjYXN0SW5wdXQiLCJ2YWx1ZSIsIm9wdGlvbnMiLCJ1bmRlZmluZWRSZXBsYWNlbWVudCIsInN0cmluZ2lmeVJlcGxhY2VyIiwiayIsInYiLCJKU09OIiwic3RyaW5naWZ5IiwiY2Fub25pY2FsaXplIiwiZXF1YWxzIiwibGVmdCIsInJpZ2h0IiwiY2FsbCIsInJlcGxhY2UiLCJkaWZmSnNvbiIsIm9sZE9iaiIsIm5ld09iaiIsImRpZmYiLCJvYmoiLCJzdGFjayIsInJlcGxhY2VtZW50U3RhY2siLCJyZXBsYWNlciIsImtleSIsImkiLCJsZW5ndGgiLCJjYW5vbmljYWxpemVkT2JqIiwicHVzaCIsIkFycmF5IiwicG9wIiwidG9KU09OIiwic29ydGVkS2V5cyIsImhhc093blByb3BlcnR5Iiwic29ydCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7Ozs7Ozs7QUFFQSxJQUFNQSx1QkFBdUIsR0FBR0MsTUFBTSxDQUFDQyxTQUFQLENBQWlCQyxRQUFqRDtBQUdPLElBQU1DLFFBQVEsR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQSxDQUFKLEVBQWpCLEMsQ0FDUDtBQUNBOzs7Ozs7QUFDQUQsUUFBUSxDQUFDRSxlQUFULEdBQTJCLElBQTNCO0FBRUFGLFFBQVEsQ0FBQ0csUUFBVDtBQUFvQkM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLENBQVNELFFBQTdCOztBQUNBSCxRQUFRLENBQUNLLFNBQVQsR0FBcUIsVUFBU0MsS0FBVCxFQUFnQjtBQUFBO0FBQUE7QUFBQTtBQUMrRSxPQUFLQyxPQURwRjtBQUFBLE1BQzVCQyxvQkFENEIsaUJBQzVCQSxvQkFENEI7QUFBQSw0Q0FDTkMsaUJBRE07QUFBQSxNQUNOQSxpQkFETSxzQ0FDYyxVQUFDQyxDQUFELEVBQUlDLENBQUo7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFVLGFBQU9BLENBQVAsS0FBYSxXQUFiLEdBQTJCSCxvQkFBM0IsR0FBa0RHO0FBQTVEO0FBQUEsR0FEZDtBQUduQyxTQUFPLE9BQU9MLEtBQVAsS0FBaUIsUUFBakIsR0FBNEJBLEtBQTVCLEdBQW9DTSxJQUFJLENBQUNDLFNBQUwsQ0FBZUMsWUFBWSxDQUFDUixLQUFELEVBQVEsSUFBUixFQUFjLElBQWQsRUFBb0JHLGlCQUFwQixDQUEzQixFQUFtRUEsaUJBQW5FLEVBQXNGLElBQXRGLENBQTNDO0FBQ0QsQ0FKRDs7QUFLQVQsUUFBUSxDQUFDZSxNQUFULEdBQWtCLFVBQVNDLElBQVQsRUFBZUMsS0FBZixFQUFzQjtBQUN0QyxTQUFPaEI7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsTUFBS0gsU0FBTCxDQUFlaUIsTUFBZixDQUFzQkcsSUFBdEIsQ0FBMkJsQixRQUEzQixFQUFxQ2dCLElBQUksQ0FBQ0csT0FBTCxDQUFhLFlBQWIsRUFBMkIsSUFBM0IsQ0FBckMsRUFBdUVGLEtBQUssQ0FBQ0UsT0FBTixDQUFjLFlBQWQsRUFBNEIsSUFBNUIsQ0FBdkU7QUFBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsUUFBVCxDQUFrQkMsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDZixPQUFsQyxFQUEyQztBQUFFLFNBQU9QLFFBQVEsQ0FBQ3VCLElBQVQsQ0FBY0YsTUFBZCxFQUFzQkMsTUFBdEIsRUFBOEJmLE9BQTlCLENBQVA7QUFBZ0QsQyxDQUVwRztBQUNBOzs7QUFDTyxTQUFTTyxZQUFULENBQXNCVSxHQUF0QixFQUEyQkMsS0FBM0IsRUFBa0NDLGdCQUFsQyxFQUFvREMsUUFBcEQsRUFBOERDLEdBQTlELEVBQW1FO0FBQ3hFSCxFQUFBQSxLQUFLLEdBQUdBLEtBQUssSUFBSSxFQUFqQjtBQUNBQyxFQUFBQSxnQkFBZ0IsR0FBR0EsZ0JBQWdCLElBQUksRUFBdkM7O0FBRUEsTUFBSUMsUUFBSixFQUFjO0FBQ1pILElBQUFBLEdBQUcsR0FBR0csUUFBUSxDQUFDQyxHQUFELEVBQU1KLEdBQU4sQ0FBZDtBQUNEOztBQUVELE1BQUlLLENBQUo7O0FBRUEsT0FBS0EsQ0FBQyxHQUFHLENBQVQsRUFBWUEsQ0FBQyxHQUFHSixLQUFLLENBQUNLLE1BQXRCLEVBQThCRCxDQUFDLElBQUksQ0FBbkMsRUFBc0M7QUFDcEMsUUFBSUosS0FBSyxDQUFDSSxDQUFELENBQUwsS0FBYUwsR0FBakIsRUFBc0I7QUFDcEIsYUFBT0UsZ0JBQWdCLENBQUNHLENBQUQsQ0FBdkI7QUFDRDtBQUNGOztBQUVELE1BQUlFLGdCQUFKOztBQUVBLE1BQUkscUJBQXFCbkMsdUJBQXVCLENBQUNzQixJQUF4QixDQUE2Qk0sR0FBN0IsQ0FBekIsRUFBNEQ7QUFDMURDLElBQUFBLEtBQUssQ0FBQ08sSUFBTixDQUFXUixHQUFYO0FBQ0FPLElBQUFBLGdCQUFnQixHQUFHLElBQUlFLEtBQUosQ0FBVVQsR0FBRyxDQUFDTSxNQUFkLENBQW5CO0FBQ0FKLElBQUFBLGdCQUFnQixDQUFDTSxJQUFqQixDQUFzQkQsZ0JBQXRCOztBQUNBLFNBQUtGLENBQUMsR0FBRyxDQUFULEVBQVlBLENBQUMsR0FBR0wsR0FBRyxDQUFDTSxNQUFwQixFQUE0QkQsQ0FBQyxJQUFJLENBQWpDLEVBQW9DO0FBQ2xDRSxNQUFBQSxnQkFBZ0IsQ0FBQ0YsQ0FBRCxDQUFoQixHQUFzQmYsWUFBWSxDQUFDVSxHQUFHLENBQUNLLENBQUQsQ0FBSixFQUFTSixLQUFULEVBQWdCQyxnQkFBaEIsRUFBa0NDLFFBQWxDLEVBQTRDQyxHQUE1QyxDQUFsQztBQUNEOztBQUNESCxJQUFBQSxLQUFLLENBQUNTLEdBQU47QUFDQVIsSUFBQUEsZ0JBQWdCLENBQUNRLEdBQWpCO0FBQ0EsV0FBT0gsZ0JBQVA7QUFDRDs7QUFFRCxNQUFJUCxHQUFHLElBQUlBLEdBQUcsQ0FBQ1csTUFBZixFQUF1QjtBQUNyQlgsSUFBQUEsR0FBRyxHQUFHQSxHQUFHLENBQUNXLE1BQUosRUFBTjtBQUNEOztBQUVEO0FBQUk7QUFBQTtBQUFBO0FBQU9YLEVBQUFBLEdBQVAsTUFBZSxRQUFmLElBQTJCQSxHQUFHLEtBQUssSUFBdkMsRUFBNkM7QUFDM0NDLElBQUFBLEtBQUssQ0FBQ08sSUFBTixDQUFXUixHQUFYO0FBQ0FPLElBQUFBLGdCQUFnQixHQUFHLEVBQW5CO0FBQ0FMLElBQUFBLGdCQUFnQixDQUFDTSxJQUFqQixDQUFzQkQsZ0JBQXRCOztBQUNBLFFBQUlLLFVBQVUsR0FBRyxFQUFqQjtBQUFBLFFBQ0lSLElBREo7O0FBRUEsU0FBS0EsSUFBTCxJQUFZSixHQUFaLEVBQWlCO0FBQ2Y7QUFDQSxVQUFJQSxHQUFHLENBQUNhLGNBQUosQ0FBbUJULElBQW5CLENBQUosRUFBNkI7QUFDM0JRLFFBQUFBLFVBQVUsQ0FBQ0osSUFBWCxDQUFnQkosSUFBaEI7QUFDRDtBQUNGOztBQUNEUSxJQUFBQSxVQUFVLENBQUNFLElBQVg7O0FBQ0EsU0FBS1QsQ0FBQyxHQUFHLENBQVQsRUFBWUEsQ0FBQyxHQUFHTyxVQUFVLENBQUNOLE1BQTNCLEVBQW1DRCxDQUFDLElBQUksQ0FBeEMsRUFBMkM7QUFDekNELE1BQUFBLElBQUcsR0FBR1EsVUFBVSxDQUFDUCxDQUFELENBQWhCO0FBQ0FFLE1BQUFBLGdCQUFnQixDQUFDSCxJQUFELENBQWhCLEdBQXdCZCxZQUFZLENBQUNVLEdBQUcsQ0FBQ0ksSUFBRCxDQUFKLEVBQVdILEtBQVgsRUFBa0JDLGdCQUFsQixFQUFvQ0MsUUFBcEMsRUFBOENDLElBQTlDLENBQXBDO0FBQ0Q7O0FBQ0RILElBQUFBLEtBQUssQ0FBQ1MsR0FBTjtBQUNBUixJQUFBQSxnQkFBZ0IsQ0FBQ1EsR0FBakI7QUFDRCxHQW5CRCxNQW1CTztBQUNMSCxJQUFBQSxnQkFBZ0IsR0FBR1AsR0FBbkI7QUFDRDs7QUFDRCxTQUFPTyxnQkFBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcbmltcG9ydCB7bGluZURpZmZ9IGZyb20gJy4vbGluZSc7XG5cbmNvbnN0IG9iamVjdFByb3RvdHlwZVRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztcblxuXG5leHBvcnQgY29uc3QganNvbkRpZmYgPSBuZXcgRGlmZigpO1xuLy8gRGlzY3JpbWluYXRlIGJldHdlZW4gdHdvIGxpbmVzIG9mIHByZXR0eS1wcmludGVkLCBzZXJpYWxpemVkIEpTT04gd2hlcmUgb25lIG9mIHRoZW0gaGFzIGFcbi8vIGRhbmdsaW5nIGNvbW1hIGFuZCB0aGUgb3RoZXIgZG9lc24ndC4gVHVybnMgb3V0IGluY2x1ZGluZyB0aGUgZGFuZ2xpbmcgY29tbWEgeWllbGRzIHRoZSBuaWNlc3Qgb3V0cHV0OlxuanNvbkRpZmYudXNlTG9uZ2VzdFRva2VuID0gdHJ1ZTtcblxuanNvbkRpZmYudG9rZW5pemUgPSBsaW5lRGlmZi50b2tlbml6ZTtcbmpzb25EaWZmLmNhc3RJbnB1dCA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIGNvbnN0IHt1bmRlZmluZWRSZXBsYWNlbWVudCwgc3RyaW5naWZ5UmVwbGFjZXIgPSAoaywgdikgPT4gdHlwZW9mIHYgPT09ICd1bmRlZmluZWQnID8gdW5kZWZpbmVkUmVwbGFjZW1lbnQgOiB2fSA9IHRoaXMub3B0aW9ucztcblxuICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyA/IHZhbHVlIDogSlNPTi5zdHJpbmdpZnkoY2Fub25pY2FsaXplKHZhbHVlLCBudWxsLCBudWxsLCBzdHJpbmdpZnlSZXBsYWNlciksIHN0cmluZ2lmeVJlcGxhY2VyLCAnICAnKTtcbn07XG5qc29uRGlmZi5lcXVhbHMgPSBmdW5jdGlvbihsZWZ0LCByaWdodCkge1xuICByZXR1cm4gRGlmZi5wcm90b3R5cGUuZXF1YWxzLmNhbGwoanNvbkRpZmYsIGxlZnQucmVwbGFjZSgvLChbXFxyXFxuXSkvZywgJyQxJyksIHJpZ2h0LnJlcGxhY2UoLywoW1xcclxcbl0pL2csICckMScpKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmSnNvbihvbGRPYmosIG5ld09iaiwgb3B0aW9ucykgeyByZXR1cm4ganNvbkRpZmYuZGlmZihvbGRPYmosIG5ld09iaiwgb3B0aW9ucyk7IH1cblxuLy8gVGhpcyBmdW5jdGlvbiBoYW5kbGVzIHRoZSBwcmVzZW5jZSBvZiBjaXJjdWxhciByZWZlcmVuY2VzIGJ5IGJhaWxpbmcgb3V0IHdoZW4gZW5jb3VudGVyaW5nIGFuXG4vLyBvYmplY3QgdGhhdCBpcyBhbHJlYWR5IG9uIHRoZSBcInN0YWNrXCIgb2YgaXRlbXMgYmVpbmcgcHJvY2Vzc2VkLiBBY2NlcHRzIGFuIG9wdGlvbmFsIHJlcGxhY2VyXG5leHBvcnQgZnVuY3Rpb24gY2Fub25pY2FsaXplKG9iaiwgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpIHtcbiAgc3RhY2sgPSBzdGFjayB8fCBbXTtcbiAgcmVwbGFjZW1lbnRTdGFjayA9IHJlcGxhY2VtZW50U3RhY2sgfHwgW107XG5cbiAgaWYgKHJlcGxhY2VyKSB7XG4gICAgb2JqID0gcmVwbGFjZXIoa2V5LCBvYmopO1xuICB9XG5cbiAgbGV0IGk7XG5cbiAgZm9yIChpID0gMDsgaSA8IHN0YWNrLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgaWYgKHN0YWNrW2ldID09PSBvYmopIHtcbiAgICAgIHJldHVybiByZXBsYWNlbWVudFN0YWNrW2ldO1xuICAgIH1cbiAgfVxuXG4gIGxldCBjYW5vbmljYWxpemVkT2JqO1xuXG4gIGlmICgnW29iamVjdCBBcnJheV0nID09PSBvYmplY3RQcm90b3R5cGVUb1N0cmluZy5jYWxsKG9iaikpIHtcbiAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgY2Fub25pY2FsaXplZE9iaiA9IG5ldyBBcnJheShvYmoubGVuZ3RoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnB1c2goY2Fub25pY2FsaXplZE9iaik7XG4gICAgZm9yIChpID0gMDsgaSA8IG9iai5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgY2Fub25pY2FsaXplZE9ialtpXSA9IGNhbm9uaWNhbGl6ZShvYmpbaV0sIHN0YWNrLCByZXBsYWNlbWVudFN0YWNrLCByZXBsYWNlciwga2V5KTtcbiAgICB9XG4gICAgc3RhY2sucG9wKCk7XG4gICAgcmVwbGFjZW1lbnRTdGFjay5wb3AoKTtcbiAgICByZXR1cm4gY2Fub25pY2FsaXplZE9iajtcbiAgfVxuXG4gIGlmIChvYmogJiYgb2JqLnRvSlNPTikge1xuICAgIG9iaiA9IG9iai50b0pTT04oKTtcbiAgfVxuXG4gIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0JyAmJiBvYmogIT09IG51bGwpIHtcbiAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgY2Fub25pY2FsaXplZE9iaiA9IHt9O1xuICAgIHJlcGxhY2VtZW50U3RhY2sucHVzaChjYW5vbmljYWxpemVkT2JqKTtcbiAgICBsZXQgc29ydGVkS2V5cyA9IFtdLFxuICAgICAgICBrZXk7XG4gICAgZm9yIChrZXkgaW4gb2JqKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgIHNvcnRlZEtleXMucHVzaChrZXkpO1xuICAgICAgfVxuICAgIH1cbiAgICBzb3J0ZWRLZXlzLnNvcnQoKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgc29ydGVkS2V5cy5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAga2V5ID0gc29ydGVkS2V5c1tpXTtcbiAgICAgIGNhbm9uaWNhbGl6ZWRPYmpba2V5XSA9IGNhbm9uaWNhbGl6ZShvYmpba2V5XSwgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpO1xuICAgIH1cbiAgICBzdGFjay5wb3AoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnBvcCgpO1xuICB9IGVsc2Uge1xuICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBvYmo7XG4gIH1cbiAgcmV0dXJuIGNhbm9uaWNhbGl6ZWRPYmo7XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/lib/diff/line.js b/node_modules/npm/node_modules/diff/lib/diff/line.js deleted file mode 100644 index 855fe30..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/line.js +++ /dev/null @@ -1,89 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffLines = diffLines; -exports.diffTrimmedLines = diffTrimmedLines; -exports.lineDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_params = require("../util/params") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -var lineDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.lineDiff = lineDiff; - -/*istanbul ignore end*/ -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 = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2xpbmUuanMiXSwibmFtZXMiOlsibGluZURpZmYiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInJldExpbmVzIiwibGluZXNBbmROZXdsaW5lcyIsInNwbGl0IiwibGVuZ3RoIiwicG9wIiwiaSIsImxpbmUiLCJvcHRpb25zIiwibmV3bGluZUlzVG9rZW4iLCJpZ25vcmVXaGl0ZXNwYWNlIiwidHJpbSIsInB1c2giLCJkaWZmTGluZXMiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiLCJkaWZmVHJpbW1lZExpbmVzIiwiZ2VuZXJhdGVPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxRQUFRLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSixFQUFqQjs7Ozs7O0FBQ1BELFFBQVEsQ0FBQ0UsUUFBVCxHQUFvQixVQUFTQyxLQUFULEVBQWdCO0FBQ2xDLE1BQUlDLFFBQVEsR0FBRyxFQUFmO0FBQUEsTUFDSUMsZ0JBQWdCLEdBQUdGLEtBQUssQ0FBQ0csS0FBTixDQUFZLFdBQVosQ0FEdkIsQ0FEa0MsQ0FJbEM7O0FBQ0EsTUFBSSxDQUFDRCxnQkFBZ0IsQ0FBQ0EsZ0JBQWdCLENBQUNFLE1BQWpCLEdBQTBCLENBQTNCLENBQXJCLEVBQW9EO0FBQ2xERixJQUFBQSxnQkFBZ0IsQ0FBQ0csR0FBakI7QUFDRCxHQVBpQyxDQVNsQzs7O0FBQ0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHSixnQkFBZ0IsQ0FBQ0UsTUFBckMsRUFBNkNFLENBQUMsRUFBOUMsRUFBa0Q7QUFDaEQsUUFBSUMsSUFBSSxHQUFHTCxnQkFBZ0IsQ0FBQ0ksQ0FBRCxDQUEzQjs7QUFFQSxRQUFJQSxDQUFDLEdBQUcsQ0FBSixJQUFTLENBQUMsS0FBS0UsT0FBTCxDQUFhQyxjQUEzQixFQUEyQztBQUN6Q1IsTUFBQUEsUUFBUSxDQUFDQSxRQUFRLENBQUNHLE1BQVQsR0FBa0IsQ0FBbkIsQ0FBUixJQUFpQ0csSUFBakM7QUFDRCxLQUZELE1BRU87QUFDTCxVQUFJLEtBQUtDLE9BQUwsQ0FBYUUsZ0JBQWpCLEVBQW1DO0FBQ2pDSCxRQUFBQSxJQUFJLEdBQUdBLElBQUksQ0FBQ0ksSUFBTCxFQUFQO0FBQ0Q7O0FBQ0RWLE1BQUFBLFFBQVEsQ0FBQ1csSUFBVCxDQUFjTCxJQUFkO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPTixRQUFQO0FBQ0QsQ0F4QkQ7O0FBMEJPLFNBQVNZLFNBQVQsQ0FBbUJDLE1BQW5CLEVBQTJCQyxNQUEzQixFQUFtQ0MsUUFBbkMsRUFBNkM7QUFBRSxTQUFPbkIsUUFBUSxDQUFDb0IsSUFBVCxDQUFjSCxNQUFkLEVBQXNCQyxNQUF0QixFQUE4QkMsUUFBOUIsQ0FBUDtBQUFpRDs7QUFDaEcsU0FBU0UsZ0JBQVQsQ0FBMEJKLE1BQTFCLEVBQWtDQyxNQUFsQyxFQUEwQ0MsUUFBMUMsRUFBb0Q7QUFDekQsTUFBSVIsT0FBTztBQUFHO0FBQUE7QUFBQTs7QUFBQVc7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLEdBQWdCSCxRQUFoQixFQUEwQjtBQUFDTixJQUFBQSxnQkFBZ0IsRUFBRTtBQUFuQixHQUExQixDQUFkO0FBQ0EsU0FBT2IsUUFBUSxDQUFDb0IsSUFBVCxDQUFjSCxNQUFkLEVBQXNCQyxNQUF0QixFQUE4QlAsT0FBOUIsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcbmltcG9ydCB7Z2VuZXJhdGVPcHRpb25zfSBmcm9tICcuLi91dGlsL3BhcmFtcyc7XG5cbmV4cG9ydCBjb25zdCBsaW5lRGlmZiA9IG5ldyBEaWZmKCk7XG5saW5lRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIGxldCByZXRMaW5lcyA9IFtdLFxuICAgICAgbGluZXNBbmROZXdsaW5lcyA9IHZhbHVlLnNwbGl0KC8oXFxufFxcclxcbikvKTtcblxuICAvLyBJZ25vcmUgdGhlIGZpbmFsIGVtcHR5IHRva2VuIHRoYXQgb2NjdXJzIGlmIHRoZSBzdHJpbmcgZW5kcyB3aXRoIGEgbmV3IGxpbmVcbiAgaWYgKCFsaW5lc0FuZE5ld2xpbmVzW2xpbmVzQW5kTmV3bGluZXMubGVuZ3RoIC0gMV0pIHtcbiAgICBsaW5lc0FuZE5ld2xpbmVzLnBvcCgpO1xuICB9XG5cbiAgLy8gTWVyZ2UgdGhlIGNvbnRlbnQgYW5kIGxpbmUgc2VwYXJhdG9ycyBpbnRvIHNpbmdsZSB0b2tlbnNcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaW5lc0FuZE5ld2xpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGxpbmUgPSBsaW5lc0FuZE5ld2xpbmVzW2ldO1xuXG4gICAgaWYgKGkgJSAyICYmICF0aGlzLm9wdGlvbnMubmV3bGluZUlzVG9rZW4pIHtcbiAgICAgIHJldExpbmVzW3JldExpbmVzLmxlbmd0aCAtIDFdICs9IGxpbmU7XG4gICAgfSBlbHNlIHtcbiAgICAgIGlmICh0aGlzLm9wdGlvbnMuaWdub3JlV2hpdGVzcGFjZSkge1xuICAgICAgICBsaW5lID0gbGluZS50cmltKCk7XG4gICAgICB9XG4gICAgICByZXRMaW5lcy5wdXNoKGxpbmUpO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXRMaW5lcztcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmTGluZXMob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBsaW5lRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbmV4cG9ydCBmdW5jdGlvbiBkaWZmVHJpbW1lZExpbmVzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykge1xuICBsZXQgb3B0aW9ucyA9IGdlbmVyYXRlT3B0aW9ucyhjYWxsYmFjaywge2lnbm9yZVdoaXRlc3BhY2U6IHRydWV9KTtcbiAgcmV0dXJuIGxpbmVEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpO1xufVxuIl19 diff --git a/node_modules/npm/node_modules/diff/lib/diff/sentence.js b/node_modules/npm/node_modules/diff/lib/diff/sentence.js deleted file mode 100644 index 95158d6..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/sentence.js +++ /dev/null @@ -1,41 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffSentences = diffSentences; -exports.sentenceDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -var sentenceDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.sentenceDiff = sentenceDiff; - -/*istanbul ignore end*/ -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; - -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSixFQUFyQjs7Ozs7O0FBQ1BELFlBQVksQ0FBQ0UsUUFBYixHQUF3QixVQUFTQyxLQUFULEVBQWdCO0FBQ3RDLFNBQU9BLEtBQUssQ0FBQ0MsS0FBTixDQUFZLHVCQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLGFBQVQsQ0FBdUJDLE1BQXZCLEVBQStCQyxNQUEvQixFQUF1Q0MsUUFBdkMsRUFBaUQ7QUFBRSxTQUFPUixZQUFZLENBQUNTLElBQWIsQ0FBa0JILE1BQWxCLEVBQTBCQyxNQUExQixFQUFrQ0MsUUFBbEMsQ0FBUDtBQUFxRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cblxuZXhwb3J0IGNvbnN0IHNlbnRlbmNlRGlmZiA9IG5ldyBEaWZmKCk7XG5zZW50ZW5jZURpZmYudG9rZW5pemUgPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdmFsdWUuc3BsaXQoLyhcXFMuKz9bLiE/XSkoPz1cXHMrfCQpLyk7XG59O1xuXG5leHBvcnQgZnVuY3Rpb24gZGlmZlNlbnRlbmNlcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIHNlbnRlbmNlRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/diff/word.js b/node_modules/npm/node_modules/diff/lib/diff/word.js deleted file mode 100644 index cef7fe1..0000000 --- a/node_modules/npm/node_modules/diff/lib/diff/word.js +++ /dev/null @@ -1,108 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffWords = diffWords; -exports.diffWordsWithSpace = diffWordsWithSpace; -exports.wordDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_params = require("../util/params") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode -// -// 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 -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); - -/*istanbul ignore start*/ -exports.wordDiff = wordDiff; - -/*istanbul ignore end*/ -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) { - // All whitespace symbols except newline group into one token, each newline - in separate token - var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\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 = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (options, { - ignoreWhitespace: true - }); - return wordDiff.diff(oldStr, newStr, options); -} - -function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3dvcmQuanMiXSwibmFtZXMiOlsiZXh0ZW5kZWRXb3JkQ2hhcnMiLCJyZVdoaXRlc3BhY2UiLCJ3b3JkRGlmZiIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJvcHRpb25zIiwiaWdub3JlQ2FzZSIsInRvTG93ZXJDYXNlIiwiaWdub3JlV2hpdGVzcGFjZSIsInRlc3QiLCJ0b2tlbml6ZSIsInZhbHVlIiwidG9rZW5zIiwic3BsaXQiLCJpIiwibGVuZ3RoIiwic3BsaWNlIiwiZGlmZldvcmRzIiwib2xkU3RyIiwibmV3U3RyIiwiZ2VuZXJhdGVPcHRpb25zIiwiZGlmZiIsImRpZmZXb3Jkc1dpdGhTcGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7Ozs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBTUEsaUJBQWlCLEdBQUcsK0RBQTFCO0FBRUEsSUFBTUMsWUFBWSxHQUFHLElBQXJCO0FBRU8sSUFBTUMsUUFBUSxHQUFHO0FBQUlDO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBLENBQUosRUFBakI7Ozs7OztBQUNQRCxRQUFRLENBQUNFLE1BQVQsR0FBa0IsVUFBU0MsSUFBVCxFQUFlQyxLQUFmLEVBQXNCO0FBQ3RDLE1BQUksS0FBS0MsT0FBTCxDQUFhQyxVQUFqQixFQUE2QjtBQUMzQkgsSUFBQUEsSUFBSSxHQUFHQSxJQUFJLENBQUNJLFdBQUwsRUFBUDtBQUNBSCxJQUFBQSxLQUFLLEdBQUdBLEtBQUssQ0FBQ0csV0FBTixFQUFSO0FBQ0Q7O0FBQ0QsU0FBT0osSUFBSSxLQUFLQyxLQUFULElBQW1CLEtBQUtDLE9BQUwsQ0FBYUcsZ0JBQWIsSUFBaUMsQ0FBQ1QsWUFBWSxDQUFDVSxJQUFiLENBQWtCTixJQUFsQixDQUFsQyxJQUE2RCxDQUFDSixZQUFZLENBQUNVLElBQWIsQ0FBa0JMLEtBQWxCLENBQXhGO0FBQ0QsQ0FORDs7QUFPQUosUUFBUSxDQUFDVSxRQUFULEdBQW9CLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbEM7QUFDQSxNQUFJQyxNQUFNLEdBQUdELEtBQUssQ0FBQ0UsS0FBTixDQUFZLGlDQUFaLENBQWIsQ0FGa0MsQ0FJbEM7O0FBQ0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHRixNQUFNLENBQUNHLE1BQVAsR0FBZ0IsQ0FBcEMsRUFBdUNELENBQUMsRUFBeEMsRUFBNEM7QUFDMUM7QUFDQSxRQUFJLENBQUNGLE1BQU0sQ0FBQ0UsQ0FBQyxHQUFHLENBQUwsQ0FBUCxJQUFrQkYsTUFBTSxDQUFDRSxDQUFDLEdBQUcsQ0FBTCxDQUF4QixJQUNLaEIsaUJBQWlCLENBQUNXLElBQWxCLENBQXVCRyxNQUFNLENBQUNFLENBQUQsQ0FBN0IsQ0FETCxJQUVLaEIsaUJBQWlCLENBQUNXLElBQWxCLENBQXVCRyxNQUFNLENBQUNFLENBQUMsR0FBRyxDQUFMLENBQTdCLENBRlQsRUFFZ0Q7QUFDOUNGLE1BQUFBLE1BQU0sQ0FBQ0UsQ0FBRCxDQUFOLElBQWFGLE1BQU0sQ0FBQ0UsQ0FBQyxHQUFHLENBQUwsQ0FBbkI7QUFDQUYsTUFBQUEsTUFBTSxDQUFDSSxNQUFQLENBQWNGLENBQUMsR0FBRyxDQUFsQixFQUFxQixDQUFyQjtBQUNBQSxNQUFBQSxDQUFDO0FBQ0Y7QUFDRjs7QUFFRCxTQUFPRixNQUFQO0FBQ0QsQ0FqQkQ7O0FBbUJPLFNBQVNLLFNBQVQsQ0FBbUJDLE1BQW5CLEVBQTJCQyxNQUEzQixFQUFtQ2QsT0FBbkMsRUFBNEM7QUFDakRBLEVBQUFBLE9BQU87QUFBRztBQUFBO0FBQUE7O0FBQUFlO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxHQUFnQmYsT0FBaEIsRUFBeUI7QUFBQ0csSUFBQUEsZ0JBQWdCLEVBQUU7QUFBbkIsR0FBekIsQ0FBVjtBQUNBLFNBQU9SLFFBQVEsQ0FBQ3FCLElBQVQsQ0FBY0gsTUFBZCxFQUFzQkMsTUFBdEIsRUFBOEJkLE9BQTlCLENBQVA7QUFDRDs7QUFFTSxTQUFTaUIsa0JBQVQsQ0FBNEJKLE1BQTVCLEVBQW9DQyxNQUFwQyxFQUE0Q2QsT0FBNUMsRUFBcUQ7QUFDMUQsU0FBT0wsUUFBUSxDQUFDcUIsSUFBVCxDQUFjSCxNQUFkLEVBQXNCQyxNQUF0QixFQUE4QmQsT0FBOUIsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcbmltcG9ydCB7Z2VuZXJhdGVPcHRpb25zfSBmcm9tICcuLi91dGlsL3BhcmFtcyc7XG5cbi8vIEJhc2VkIG9uIGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0xhdGluX3NjcmlwdF9pbl9Vbmljb2RlXG4vL1xuLy8gUmFuZ2VzIGFuZCBleGNlcHRpb25zOlxuLy8gTGF0aW4tMSBTdXBwbGVtZW50LCAwMDgw4oCTMDBGRlxuLy8gIC0gVSswMEQ3ICDDlyBNdWx0aXBsaWNhdGlvbiBzaWduXG4vLyAgLSBVKzAwRjcgIMO3IERpdmlzaW9uIHNpZ25cbi8vIExhdGluIEV4dGVuZGVkLUEsIDAxMDDigJMwMTdGXG4vLyBMYXRpbiBFeHRlbmRlZC1CLCAwMTgw4oCTMDI0RlxuLy8gSVBBIEV4dGVuc2lvbnMsIDAyNTDigJMwMkFGXG4vLyBTcGFjaW5nIE1vZGlmaWVyIExldHRlcnMsIDAyQjDigJMwMkZGXG4vLyAgLSBVKzAyQzcgIMuHICYjNzExOyAgQ2Fyb25cbi8vICAtIFUrMDJEOCAgy5ggJiM3Mjg7ICBCcmV2ZVxuLy8gIC0gVSswMkQ5ICDLmSAmIzcyOTsgIERvdCBBYm92ZVxuLy8gIC0gVSswMkRBICDLmiAmIzczMDsgIFJpbmcgQWJvdmVcbi8vICAtIFUrMDJEQiAgy5sgJiM3MzE7ICBPZ29uZWtcbi8vICAtIFUrMDJEQyAgy5wgJiM3MzI7ICBTbWFsbCBUaWxkZVxuLy8gIC0gVSswMkREICDLnSAmIzczMzsgIERvdWJsZSBBY3V0ZSBBY2NlbnRcbi8vIExhdGluIEV4dGVuZGVkIEFkZGl0aW9uYWwsIDFFMDDigJMxRUZGXG5jb25zdCBleHRlbmRlZFdvcmRDaGFycyA9IC9eW2EtekEtWlxcdXtDMH0tXFx1e0ZGfVxcdXtEOH0tXFx1e0Y2fVxcdXtGOH0tXFx1ezJDNn1cXHV7MkM4fS1cXHV7MkQ3fVxcdXsyREV9LVxcdXsyRkZ9XFx1ezFFMDB9LVxcdXsxRUZGfV0rJC91O1xuXG5jb25zdCByZVdoaXRlc3BhY2UgPSAvXFxTLztcblxuZXhwb3J0IGNvbnN0IHdvcmREaWZmID0gbmV3IERpZmYoKTtcbndvcmREaWZmLmVxdWFscyA9IGZ1bmN0aW9uKGxlZnQsIHJpZ2h0KSB7XG4gIGlmICh0aGlzLm9wdGlvbnMuaWdub3JlQ2FzZSkge1xuICAgIGxlZnQgPSBsZWZ0LnRvTG93ZXJDYXNlKCk7XG4gICAgcmlnaHQgPSByaWdodC50b0xvd2VyQ2FzZSgpO1xuICB9XG4gIHJldHVybiBsZWZ0ID09PSByaWdodCB8fCAodGhpcy5vcHRpb25zLmlnbm9yZVdoaXRlc3BhY2UgJiYgIXJlV2hpdGVzcGFjZS50ZXN0KGxlZnQpICYmICFyZVdoaXRlc3BhY2UudGVzdChyaWdodCkpO1xufTtcbndvcmREaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgLy8gQWxsIHdoaXRlc3BhY2Ugc3ltYm9scyBleGNlcHQgbmV3bGluZSBncm91cCBpbnRvIG9uZSB0b2tlbiwgZWFjaCBuZXdsaW5lIC0gaW4gc2VwYXJhdGUgdG9rZW5cbiAgbGV0IHRva2VucyA9IHZhbHVlLnNwbGl0KC8oW15cXFNcXHJcXG5dK3xbKClbXFxde30nXCJcXHJcXG5dfFxcYikvKTtcblxuICAvLyBKb2luIHRoZSBib3VuZGFyeSBzcGxpdHMgdGhhdCB3ZSBkbyBub3QgY29uc2lkZXIgdG8gYmUgYm91bmRhcmllcy4gVGhpcyBpcyBwcmltYXJpbHkgdGhlIGV4dGVuZGVkIExhdGluIGNoYXJhY3RlciBzZXQuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aCAtIDE7IGkrKykge1xuICAgIC8vIElmIHdlIGhhdmUgYW4gZW1wdHkgc3RyaW5nIGluIHRoZSBuZXh0IGZpZWxkIGFuZCB3ZSBoYXZlIG9ubHkgd29yZCBjaGFycyBiZWZvcmUgYW5kIGFmdGVyLCBtZXJnZVxuICAgIGlmICghdG9rZW5zW2kgKyAxXSAmJiB0b2tlbnNbaSArIDJdXG4gICAgICAgICAgJiYgZXh0ZW5kZWRXb3JkQ2hhcnMudGVzdCh0b2tlbnNbaV0pXG4gICAgICAgICAgJiYgZXh0ZW5kZWRXb3JkQ2hhcnMudGVzdCh0b2tlbnNbaSArIDJdKSkge1xuICAgICAgdG9rZW5zW2ldICs9IHRva2Vuc1tpICsgMl07XG4gICAgICB0b2tlbnMuc3BsaWNlKGkgKyAxLCAyKTtcbiAgICAgIGktLTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gdG9rZW5zO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZXb3JkcyhvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICBvcHRpb25zID0gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIHtpZ25vcmVXaGl0ZXNwYWNlOiB0cnVlfSk7XG4gIHJldHVybiB3b3JkRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZXb3Jkc1dpdGhTcGFjZShvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICByZXR1cm4gd29yZERpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/lib/index.es6.js b/node_modules/npm/node_modules/diff/lib/index.es6.js deleted file mode 100644 index c2a0013..0000000 --- a/node_modules/npm/node_modules/diff/lib/index.es6.js +++ /dev/null @@ -1,1561 +0,0 @@ -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; - - if (options.maxEditLength) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - - 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, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - - - if (callback) { - (function exec() { - setTimeout(function () { - 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) { - // All whitespace symbols except newline group into one token, each newline - in separate token - var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\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) { - "@babel/helpers - typeof"; - - 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) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} - -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -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: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [], - linedelimiters: [] - }; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - - 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; - - 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); - - if (!diff) { - return; - } - - 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 && oldStr.length > 0) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - // however, if the old file is empty, do not output the no-nl line - 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 formatPatch(diff) { - var ret = []; - - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.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]; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); -} -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; -} - -export { Diff, applyPatch, applyPatches, canonicalize, convertChangesToDMP, convertChangesToXML, createPatch, createTwoFilesPatch, diffArrays, diffChars, diffCss, diffJson, diffLines, diffSentences, diffTrimmedLines, diffWords, diffWordsWithSpace, merge, parsePatch, structuredPatch }; diff --git a/node_modules/npm/node_modules/diff/lib/index.js b/node_modules/npm/node_modules/diff/lib/index.js deleted file mode 100644 index 920f0fe..0000000 --- a/node_modules/npm/node_modules/diff/lib/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "Diff", { - enumerable: true, - get: function get() { - return _base["default"]; - } -}); -Object.defineProperty(exports, "diffChars", { - enumerable: true, - get: function get() { - return _character.diffChars; - } -}); -Object.defineProperty(exports, "diffWords", { - enumerable: true, - get: function get() { - return _word.diffWords; - } -}); -Object.defineProperty(exports, "diffWordsWithSpace", { - enumerable: true, - get: function get() { - return _word.diffWordsWithSpace; - } -}); -Object.defineProperty(exports, "diffLines", { - enumerable: true, - get: function get() { - return _line.diffLines; - } -}); -Object.defineProperty(exports, "diffTrimmedLines", { - enumerable: true, - get: function get() { - return _line.diffTrimmedLines; - } -}); -Object.defineProperty(exports, "diffSentences", { - enumerable: true, - get: function get() { - return _sentence.diffSentences; - } -}); -Object.defineProperty(exports, "diffCss", { - enumerable: true, - get: function get() { - return _css.diffCss; - } -}); -Object.defineProperty(exports, "diffJson", { - enumerable: true, - get: function get() { - return _json.diffJson; - } -}); -Object.defineProperty(exports, "canonicalize", { - enumerable: true, - get: function get() { - return _json.canonicalize; - } -}); -Object.defineProperty(exports, "diffArrays", { - enumerable: true, - get: function get() { - return _array.diffArrays; - } -}); -Object.defineProperty(exports, "applyPatch", { - enumerable: true, - get: function get() { - return _apply.applyPatch; - } -}); -Object.defineProperty(exports, "applyPatches", { - enumerable: true, - get: function get() { - return _apply.applyPatches; - } -}); -Object.defineProperty(exports, "parsePatch", { - enumerable: true, - get: function get() { - return _parse.parsePatch; - } -}); -Object.defineProperty(exports, "merge", { - enumerable: true, - get: function get() { - return _merge.merge; - } -}); -Object.defineProperty(exports, "structuredPatch", { - enumerable: true, - get: function get() { - return _create.structuredPatch; - } -}); -Object.defineProperty(exports, "createTwoFilesPatch", { - enumerable: true, - get: function get() { - return _create.createTwoFilesPatch; - } -}); -Object.defineProperty(exports, "createPatch", { - enumerable: true, - get: function get() { - return _create.createPatch; - } -}); -Object.defineProperty(exports, "convertChangesToDMP", { - enumerable: true, - get: function get() { - return _dmp.convertChangesToDMP; - } -}); -Object.defineProperty(exports, "convertChangesToXML", { - enumerable: true, - get: function get() { - return _xml.convertChangesToXML; - } -}); - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./diff/base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_character = require("./diff/character") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_word = require("./diff/word") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_line = require("./diff/line") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_sentence = require("./diff/sentence") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_css = require("./diff/css") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_json = require("./diff/json") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_array = require("./diff/array") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_apply = require("./patch/apply") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_parse = require("./patch/parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_merge = require("./patch/merge") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_create = require("./patch/create") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_dmp = require("./convert/dmp") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_xml = require("./convert/xml") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBTZWUgTElDRU5TRSBmaWxlIGZvciB0ZXJtcyBvZiB1c2UgKi9cblxuLypcbiAqIFRleHQgZGlmZiBpbXBsZW1lbnRhdGlvbi5cbiAqXG4gKiBUaGlzIGxpYnJhcnkgc3VwcG9ydHMgdGhlIGZvbGxvd2luZyBBUElTOlxuICogSnNEaWZmLmRpZmZDaGFyczogQ2hhcmFjdGVyIGJ5IGNoYXJhY3RlciBkaWZmXG4gKiBKc0RpZmYuZGlmZldvcmRzOiBXb3JkIChhcyBkZWZpbmVkIGJ5IFxcYiByZWdleCkgZGlmZiB3aGljaCBpZ25vcmVzIHdoaXRlc3BhY2VcbiAqIEpzRGlmZi5kaWZmTGluZXM6IExpbmUgYmFzZWQgZGlmZlxuICpcbiAqIEpzRGlmZi5kaWZmQ3NzOiBEaWZmIHRhcmdldGVkIGF0IENTUyBjb250ZW50XG4gKlxuICogVGhlc2UgbWV0aG9kcyBhcmUgYmFzZWQgb24gdGhlIGltcGxlbWVudGF0aW9uIHByb3Bvc2VkIGluXG4gKiBcIkFuIE8oTkQpIERpZmZlcmVuY2UgQWxnb3JpdGhtIGFuZCBpdHMgVmFyaWF0aW9uc1wiIChNeWVycywgMTk4NikuXG4gKiBodHRwOi8vY2l0ZXNlZXJ4LmlzdC5wc3UuZWR1L3ZpZXdkb2Mvc3VtbWFyeT9kb2k9MTAuMS4xLjQuNjkyN1xuICovXG5pbXBvcnQgRGlmZiBmcm9tICcuL2RpZmYvYmFzZSc7XG5pbXBvcnQge2RpZmZDaGFyc30gZnJvbSAnLi9kaWZmL2NoYXJhY3Rlcic7XG5pbXBvcnQge2RpZmZXb3JkcywgZGlmZldvcmRzV2l0aFNwYWNlfSBmcm9tICcuL2RpZmYvd29yZCc7XG5pbXBvcnQge2RpZmZMaW5lcywgZGlmZlRyaW1tZWRMaW5lc30gZnJvbSAnLi9kaWZmL2xpbmUnO1xuaW1wb3J0IHtkaWZmU2VudGVuY2VzfSBmcm9tICcuL2RpZmYvc2VudGVuY2UnO1xuXG5pbXBvcnQge2RpZmZDc3N9IGZyb20gJy4vZGlmZi9jc3MnO1xuaW1wb3J0IHtkaWZmSnNvbiwgY2Fub25pY2FsaXplfSBmcm9tICcuL2RpZmYvanNvbic7XG5cbmltcG9ydCB7ZGlmZkFycmF5c30gZnJvbSAnLi9kaWZmL2FycmF5JztcblxuaW1wb3J0IHthcHBseVBhdGNoLCBhcHBseVBhdGNoZXN9IGZyb20gJy4vcGF0Y2gvYXBwbHknO1xuaW1wb3J0IHtwYXJzZVBhdGNofSBmcm9tICcuL3BhdGNoL3BhcnNlJztcbmltcG9ydCB7bWVyZ2V9IGZyb20gJy4vcGF0Y2gvbWVyZ2UnO1xuaW1wb3J0IHtzdHJ1Y3R1cmVkUGF0Y2gsIGNyZWF0ZVR3b0ZpbGVzUGF0Y2gsIGNyZWF0ZVBhdGNofSBmcm9tICcuL3BhdGNoL2NyZWF0ZSc7XG5cbmltcG9ydCB7Y29udmVydENoYW5nZXNUb0RNUH0gZnJvbSAnLi9jb252ZXJ0L2RtcCc7XG5pbXBvcnQge2NvbnZlcnRDaGFuZ2VzVG9YTUx9IGZyb20gJy4vY29udmVydC94bWwnO1xuXG5leHBvcnQge1xuICBEaWZmLFxuXG4gIGRpZmZDaGFycyxcbiAgZGlmZldvcmRzLFxuICBkaWZmV29yZHNXaXRoU3BhY2UsXG4gIGRpZmZMaW5lcyxcbiAgZGlmZlRyaW1tZWRMaW5lcyxcbiAgZGlmZlNlbnRlbmNlcyxcblxuICBkaWZmQ3NzLFxuICBkaWZmSnNvbixcblxuICBkaWZmQXJyYXlzLFxuXG4gIHN0cnVjdHVyZWRQYXRjaCxcbiAgY3JlYXRlVHdvRmlsZXNQYXRjaCxcbiAgY3JlYXRlUGF0Y2gsXG4gIGFwcGx5UGF0Y2gsXG4gIGFwcGx5UGF0Y2hlcyxcbiAgcGFyc2VQYXRjaCxcbiAgbWVyZ2UsXG4gIGNvbnZlcnRDaGFuZ2VzVG9ETVAsXG4gIGNvbnZlcnRDaGFuZ2VzVG9YTUwsXG4gIGNhbm9uaWNhbGl6ZVxufTtcbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/index.mjs b/node_modules/npm/node_modules/diff/lib/index.mjs deleted file mode 100644 index c2a0013..0000000 --- a/node_modules/npm/node_modules/diff/lib/index.mjs +++ /dev/null @@ -1,1561 +0,0 @@ -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; - - if (options.maxEditLength) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - - 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, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - - - if (callback) { - (function exec() { - setTimeout(function () { - 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) { - // All whitespace symbols except newline group into one token, each newline - in separate token - var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\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) { - "@babel/helpers - typeof"; - - 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) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} - -function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} - -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: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [], - linedelimiters: [] - }; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - - 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; - - 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); - - if (!diff) { - return; - } - - 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 && oldStr.length > 0) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - // however, if the old file is empty, do not output the no-nl line - 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 formatPatch(diff) { - var ret = []; - - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.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]; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); -} -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; -} - -export { Diff, applyPatch, applyPatches, canonicalize, convertChangesToDMP, convertChangesToXML, createPatch, createTwoFilesPatch, diffArrays, diffChars, diffCss, diffJson, diffLines, diffSentences, diffTrimmedLines, diffWords, diffWordsWithSpace, merge, parsePatch, structuredPatch }; diff --git a/node_modules/npm/node_modules/diff/lib/patch/apply.js b/node_modules/npm/node_modules/diff/lib/patch/apply.js deleted file mode 100644 index 21c76dd..0000000 --- a/node_modules/npm/node_modules/diff/lib/patch/apply.js +++ /dev/null @@ -1,238 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.applyPatch = applyPatch; -exports.applyPatches = applyPatches; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_distanceIterator = _interopRequireDefault(require("../util/distance-iterator")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -/*istanbul ignore end*/ -function applyPatch(source, uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (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) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - 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 = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _distanceIterator - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ])(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; - - 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 = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (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(); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9hcHBseS5qcyJdLCJuYW1lcyI6WyJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwibGVuZ3RoIiwiRXJyb3IiLCJsaW5lcyIsInNwbGl0IiwiZGVsaW1pdGVycyIsIm1hdGNoIiwiaHVua3MiLCJjb21wYXJlTGluZSIsImxpbmVOdW1iZXIiLCJsaW5lIiwib3BlcmF0aW9uIiwicGF0Y2hDb250ZW50IiwiZXJyb3JDb3VudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwib2Zmc2V0IiwicmVtb3ZlRU9GTkwiLCJhZGRFT0ZOTCIsImh1bmtGaXRzIiwiaHVuayIsInRvUG9zIiwiaiIsImNvbnRlbnQiLCJzdWJzdHIiLCJpIiwibWF4TGluZSIsIm9sZExpbmVzIiwibG9jYWxPZmZzZXQiLCJvbGRTdGFydCIsIml0ZXJhdG9yIiwiZGlzdGFuY2VJdGVyYXRvciIsInVuZGVmaW5lZCIsImRpZmZPZmZzZXQiLCJuZXdMaW5lcyIsImRlbGltaXRlciIsImxpbmVkZWxpbWl0ZXJzIiwic3BsaWNlIiwicHJldmlvdXNPcGVyYXRpb24iLCJwb3AiLCJwdXNoIiwiX2siLCJqb2luIiwiYXBwbHlQYXRjaGVzIiwiY3VycmVudEluZGV4IiwicHJvY2Vzc0luZGV4IiwiaW5kZXgiLCJjb21wbGV0ZSIsImxvYWRGaWxlIiwiZXJyIiwiZGF0YSIsInVwZGF0ZWRDb250ZW50IiwicGF0Y2hlZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxTQUFTQSxVQUFULENBQW9CQyxNQUFwQixFQUE0QkMsT0FBNUIsRUFBbUQ7QUFBQTtBQUFBO0FBQUE7QUFBZEMsRUFBQUEsT0FBYyx1RUFBSixFQUFJOztBQUN4RCxNQUFJLE9BQU9ELE9BQVAsS0FBbUIsUUFBdkIsRUFBaUM7QUFDL0JBLElBQUFBLE9BQU87QUFBRztBQUFBO0FBQUE7O0FBQUFFO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxLQUFXRixPQUFYLENBQVY7QUFDRDs7QUFFRCxNQUFJRyxLQUFLLENBQUNDLE9BQU4sQ0FBY0osT0FBZCxDQUFKLEVBQTRCO0FBQzFCLFFBQUlBLE9BQU8sQ0FBQ0ssTUFBUixHQUFpQixDQUFyQixFQUF3QjtBQUN0QixZQUFNLElBQUlDLEtBQUosQ0FBVSw0Q0FBVixDQUFOO0FBQ0Q7O0FBRUROLElBQUFBLE9BQU8sR0FBR0EsT0FBTyxDQUFDLENBQUQsQ0FBakI7QUFDRCxHQVh1RCxDQWF4RDs7O0FBQ0EsTUFBSU8sS0FBSyxHQUFHUixNQUFNLENBQUNTLEtBQVAsQ0FBYSxxQkFBYixDQUFaO0FBQUEsTUFDSUMsVUFBVSxHQUFHVixNQUFNLENBQUNXLEtBQVAsQ0FBYSxzQkFBYixLQUF3QyxFQUR6RDtBQUFBLE1BRUlDLEtBQUssR0FBR1gsT0FBTyxDQUFDVyxLQUZwQjtBQUFBLE1BSUlDLFdBQVcsR0FBR1gsT0FBTyxDQUFDVyxXQUFSLElBQXdCLFVBQUNDLFVBQUQsRUFBYUMsSUFBYixFQUFtQkMsU0FBbkIsRUFBOEJDLFlBQTlCO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBK0NGLE1BQUFBLElBQUksS0FBS0U7QUFBeEQ7QUFBQSxHQUoxQztBQUFBLE1BS0lDLFVBQVUsR0FBRyxDQUxqQjtBQUFBLE1BTUlDLFVBQVUsR0FBR2pCLE9BQU8sQ0FBQ2lCLFVBQVIsSUFBc0IsQ0FOdkM7QUFBQSxNQU9JQyxPQUFPLEdBQUcsQ0FQZDtBQUFBLE1BUUlDLE1BQU0sR0FBRyxDQVJiO0FBQUEsTUFVSUMsV0FWSjtBQUFBLE1BV0lDLFFBWEo7QUFhQTs7Ozs7QUFHQSxXQUFTQyxRQUFULENBQWtCQyxJQUFsQixFQUF3QkMsS0FBeEIsRUFBK0I7QUFDN0IsU0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHRixJQUFJLENBQUNqQixLQUFMLENBQVdGLE1BQS9CLEVBQXVDcUIsQ0FBQyxFQUF4QyxFQUE0QztBQUMxQyxVQUFJWixJQUFJLEdBQUdVLElBQUksQ0FBQ2pCLEtBQUwsQ0FBV21CLENBQVgsQ0FBWDtBQUFBLFVBQ0lYLFNBQVMsR0FBSUQsSUFBSSxDQUFDVCxNQUFMLEdBQWMsQ0FBZCxHQUFrQlMsSUFBSSxDQUFDLENBQUQsQ0FBdEIsR0FBNEIsR0FEN0M7QUFBQSxVQUVJYSxPQUFPLEdBQUliLElBQUksQ0FBQ1QsTUFBTCxHQUFjLENBQWQsR0FBa0JTLElBQUksQ0FBQ2MsTUFBTCxDQUFZLENBQVosQ0FBbEIsR0FBbUNkLElBRmxEOztBQUlBLFVBQUlDLFNBQVMsS0FBSyxHQUFkLElBQXFCQSxTQUFTLEtBQUssR0FBdkMsRUFBNEM7QUFDMUM7QUFDQSxZQUFJLENBQUNILFdBQVcsQ0FBQ2EsS0FBSyxHQUFHLENBQVQsRUFBWWxCLEtBQUssQ0FBQ2tCLEtBQUQsQ0FBakIsRUFBMEJWLFNBQTFCLEVBQXFDWSxPQUFyQyxDQUFoQixFQUErRDtBQUM3RFYsVUFBQUEsVUFBVTs7QUFFVixjQUFJQSxVQUFVLEdBQUdDLFVBQWpCLEVBQTZCO0FBQzNCLG1CQUFPLEtBQVA7QUFDRDtBQUNGOztBQUNETyxRQUFBQSxLQUFLO0FBQ047QUFDRjs7QUFFRCxXQUFPLElBQVA7QUFDRCxHQWxEdUQsQ0FvRHhEOzs7QUFDQSxPQUFLLElBQUlJLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdsQixLQUFLLENBQUNOLE1BQTFCLEVBQWtDd0IsQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJTCxJQUFJLEdBQUdiLEtBQUssQ0FBQ2tCLENBQUQsQ0FBaEI7QUFBQSxRQUNJQyxPQUFPLEdBQUd2QixLQUFLLENBQUNGLE1BQU4sR0FBZW1CLElBQUksQ0FBQ08sUUFEbEM7QUFBQSxRQUVJQyxXQUFXLEdBQUcsQ0FGbEI7QUFBQSxRQUdJUCxLQUFLLEdBQUdMLE1BQU0sR0FBR0ksSUFBSSxDQUFDUyxRQUFkLEdBQXlCLENBSHJDO0FBS0EsUUFBSUMsUUFBUTtBQUFHO0FBQUE7QUFBQTs7QUFBQUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsT0FBaUJWLEtBQWpCLEVBQXdCTixPQUF4QixFQUFpQ1csT0FBakMsQ0FBZjs7QUFFQSxXQUFPRSxXQUFXLEtBQUtJLFNBQXZCLEVBQWtDSixXQUFXLEdBQUdFLFFBQVEsRUFBeEQsRUFBNEQ7QUFDMUQsVUFBSVgsUUFBUSxDQUFDQyxJQUFELEVBQU9DLEtBQUssR0FBR08sV0FBZixDQUFaLEVBQXlDO0FBQ3ZDUixRQUFBQSxJQUFJLENBQUNKLE1BQUwsR0FBY0EsTUFBTSxJQUFJWSxXQUF4QjtBQUNBO0FBQ0Q7QUFDRjs7QUFFRCxRQUFJQSxXQUFXLEtBQUtJLFNBQXBCLEVBQStCO0FBQzdCLGFBQU8sS0FBUDtBQUNELEtBakJvQyxDQW1CckM7QUFDQTs7O0FBQ0FqQixJQUFBQSxPQUFPLEdBQUdLLElBQUksQ0FBQ0osTUFBTCxHQUFjSSxJQUFJLENBQUNTLFFBQW5CLEdBQThCVCxJQUFJLENBQUNPLFFBQTdDO0FBQ0QsR0EzRXVELENBNkV4RDs7O0FBQ0EsTUFBSU0sVUFBVSxHQUFHLENBQWpCOztBQUNBLE9BQUssSUFBSVIsRUFBQyxHQUFHLENBQWIsRUFBZ0JBLEVBQUMsR0FBR2xCLEtBQUssQ0FBQ04sTUFBMUIsRUFBa0N3QixFQUFDLEVBQW5DLEVBQXVDO0FBQ3JDLFFBQUlMLEtBQUksR0FBR2IsS0FBSyxDQUFDa0IsRUFBRCxDQUFoQjtBQUFBLFFBQ0lKLE1BQUssR0FBR0QsS0FBSSxDQUFDUyxRQUFMLEdBQWdCVCxLQUFJLENBQUNKLE1BQXJCLEdBQThCaUIsVUFBOUIsR0FBMkMsQ0FEdkQ7O0FBRUFBLElBQUFBLFVBQVUsSUFBSWIsS0FBSSxDQUFDYyxRQUFMLEdBQWdCZCxLQUFJLENBQUNPLFFBQW5DOztBQUVBLFNBQUssSUFBSUwsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0YsS0FBSSxDQUFDakIsS0FBTCxDQUFXRixNQUEvQixFQUF1Q3FCLENBQUMsRUFBeEMsRUFBNEM7QUFDMUMsVUFBSVosSUFBSSxHQUFHVSxLQUFJLENBQUNqQixLQUFMLENBQVdtQixDQUFYLENBQVg7QUFBQSxVQUNJWCxTQUFTLEdBQUlELElBQUksQ0FBQ1QsTUFBTCxHQUFjLENBQWQsR0FBa0JTLElBQUksQ0FBQyxDQUFELENBQXRCLEdBQTRCLEdBRDdDO0FBQUEsVUFFSWEsT0FBTyxHQUFJYixJQUFJLENBQUNULE1BQUwsR0FBYyxDQUFkLEdBQWtCUyxJQUFJLENBQUNjLE1BQUwsQ0FBWSxDQUFaLENBQWxCLEdBQW1DZCxJQUZsRDtBQUFBLFVBR0l5QixTQUFTLEdBQUdmLEtBQUksQ0FBQ2dCLGNBQUwsQ0FBb0JkLENBQXBCLENBSGhCOztBQUtBLFVBQUlYLFNBQVMsS0FBSyxHQUFsQixFQUF1QjtBQUNyQlUsUUFBQUEsTUFBSztBQUNOLE9BRkQsTUFFTyxJQUFJVixTQUFTLEtBQUssR0FBbEIsRUFBdUI7QUFDNUJSLFFBQUFBLEtBQUssQ0FBQ2tDLE1BQU4sQ0FBYWhCLE1BQWIsRUFBb0IsQ0FBcEI7QUFDQWhCLFFBQUFBLFVBQVUsQ0FBQ2dDLE1BQVgsQ0FBa0JoQixNQUFsQixFQUF5QixDQUF6QjtBQUNGO0FBQ0MsT0FKTSxNQUlBLElBQUlWLFNBQVMsS0FBSyxHQUFsQixFQUF1QjtBQUM1QlIsUUFBQUEsS0FBSyxDQUFDa0MsTUFBTixDQUFhaEIsTUFBYixFQUFvQixDQUFwQixFQUF1QkUsT0FBdkI7QUFDQWxCLFFBQUFBLFVBQVUsQ0FBQ2dDLE1BQVgsQ0FBa0JoQixNQUFsQixFQUF5QixDQUF6QixFQUE0QmMsU0FBNUI7QUFDQWQsUUFBQUEsTUFBSztBQUNOLE9BSk0sTUFJQSxJQUFJVixTQUFTLEtBQUssSUFBbEIsRUFBd0I7QUFDN0IsWUFBSTJCLGlCQUFpQixHQUFHbEIsS0FBSSxDQUFDakIsS0FBTCxDQUFXbUIsQ0FBQyxHQUFHLENBQWYsSUFBb0JGLEtBQUksQ0FBQ2pCLEtBQUwsQ0FBV21CLENBQUMsR0FBRyxDQUFmLEVBQWtCLENBQWxCLENBQXBCLEdBQTJDLElBQW5FOztBQUNBLFlBQUlnQixpQkFBaUIsS0FBSyxHQUExQixFQUErQjtBQUM3QnJCLFVBQUFBLFdBQVcsR0FBRyxJQUFkO0FBQ0QsU0FGRCxNQUVPLElBQUlxQixpQkFBaUIsS0FBSyxHQUExQixFQUErQjtBQUNwQ3BCLFVBQUFBLFFBQVEsR0FBRyxJQUFYO0FBQ0Q7QUFDRjtBQUNGO0FBQ0YsR0E3R3VELENBK0d4RDs7O0FBQ0EsTUFBSUQsV0FBSixFQUFpQjtBQUNmLFdBQU8sQ0FBQ2QsS0FBSyxDQUFDQSxLQUFLLENBQUNGLE1BQU4sR0FBZSxDQUFoQixDQUFiLEVBQWlDO0FBQy9CRSxNQUFBQSxLQUFLLENBQUNvQyxHQUFOO0FBQ0FsQyxNQUFBQSxVQUFVLENBQUNrQyxHQUFYO0FBQ0Q7QUFDRixHQUxELE1BS08sSUFBSXJCLFFBQUosRUFBYztBQUNuQmYsSUFBQUEsS0FBSyxDQUFDcUMsSUFBTixDQUFXLEVBQVg7QUFDQW5DLElBQUFBLFVBQVUsQ0FBQ21DLElBQVgsQ0FBZ0IsSUFBaEI7QUFDRDs7QUFDRCxPQUFLLElBQUlDLEVBQUUsR0FBRyxDQUFkLEVBQWlCQSxFQUFFLEdBQUd0QyxLQUFLLENBQUNGLE1BQU4sR0FBZSxDQUFyQyxFQUF3Q3dDLEVBQUUsRUFBMUMsRUFBOEM7QUFDNUN0QyxJQUFBQSxLQUFLLENBQUNzQyxFQUFELENBQUwsR0FBWXRDLEtBQUssQ0FBQ3NDLEVBQUQsQ0FBTCxHQUFZcEMsVUFBVSxDQUFDb0MsRUFBRCxDQUFsQztBQUNEOztBQUNELFNBQU90QyxLQUFLLENBQUN1QyxJQUFOLENBQVcsRUFBWCxDQUFQO0FBQ0QsQyxDQUVEOzs7QUFDTyxTQUFTQyxZQUFULENBQXNCL0MsT0FBdEIsRUFBK0JDLE9BQS9CLEVBQXdDO0FBQzdDLE1BQUksT0FBT0QsT0FBUCxLQUFtQixRQUF2QixFQUFpQztBQUMvQkEsSUFBQUEsT0FBTztBQUFHO0FBQUE7QUFBQTs7QUFBQUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLEtBQVdGLE9BQVgsQ0FBVjtBQUNEOztBQUVELE1BQUlnRCxZQUFZLEdBQUcsQ0FBbkI7O0FBQ0EsV0FBU0MsWUFBVCxHQUF3QjtBQUN0QixRQUFJQyxLQUFLLEdBQUdsRCxPQUFPLENBQUNnRCxZQUFZLEVBQWIsQ0FBbkI7O0FBQ0EsUUFBSSxDQUFDRSxLQUFMLEVBQVk7QUFDVixhQUFPakQsT0FBTyxDQUFDa0QsUUFBUixFQUFQO0FBQ0Q7O0FBRURsRCxJQUFBQSxPQUFPLENBQUNtRCxRQUFSLENBQWlCRixLQUFqQixFQUF3QixVQUFTRyxHQUFULEVBQWNDLElBQWQsRUFBb0I7QUFDMUMsVUFBSUQsR0FBSixFQUFTO0FBQ1AsZUFBT3BELE9BQU8sQ0FBQ2tELFFBQVIsQ0FBaUJFLEdBQWpCLENBQVA7QUFDRDs7QUFFRCxVQUFJRSxjQUFjLEdBQUd6RCxVQUFVLENBQUN3RCxJQUFELEVBQU9KLEtBQVAsRUFBY2pELE9BQWQsQ0FBL0I7QUFDQUEsTUFBQUEsT0FBTyxDQUFDdUQsT0FBUixDQUFnQk4sS0FBaEIsRUFBdUJLLGNBQXZCLEVBQXVDLFVBQVNGLEdBQVQsRUFBYztBQUNuRCxZQUFJQSxHQUFKLEVBQVM7QUFDUCxpQkFBT3BELE9BQU8sQ0FBQ2tELFFBQVIsQ0FBaUJFLEdBQWpCLENBQVA7QUFDRDs7QUFFREosUUFBQUEsWUFBWTtBQUNiLE9BTkQ7QUFPRCxLQWJEO0FBY0Q7O0FBQ0RBLEVBQUFBLFlBQVk7QUFDYiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7cGFyc2VQYXRjaH0gZnJvbSAnLi9wYXJzZSc7XG5pbXBvcnQgZGlzdGFuY2VJdGVyYXRvciBmcm9tICcuLi91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yJztcblxuZXhwb3J0IGZ1bmN0aW9uIGFwcGx5UGF0Y2goc291cmNlLCB1bmlEaWZmLCBvcHRpb25zID0ge30pIHtcbiAgaWYgKHR5cGVvZiB1bmlEaWZmID09PSAnc3RyaW5nJykge1xuICAgIHVuaURpZmYgPSBwYXJzZVBhdGNoKHVuaURpZmYpO1xuICB9XG5cbiAgaWYgKEFycmF5LmlzQXJyYXkodW5pRGlmZikpIHtcbiAgICBpZiAodW5pRGlmZi5sZW5ndGggPiAxKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ2FwcGx5UGF0Y2ggb25seSB3b3JrcyB3aXRoIGEgc2luZ2xlIGlucHV0LicpO1xuICAgIH1cblxuICAgIHVuaURpZmYgPSB1bmlEaWZmWzBdO1xuICB9XG5cbiAgLy8gQXBwbHkgdGhlIGRpZmYgdG8gdGhlIGlucHV0XG4gIGxldCBsaW5lcyA9IHNvdXJjZS5zcGxpdCgvXFxyXFxufFtcXG5cXHZcXGZcXHJcXHg4NV0vKSxcbiAgICAgIGRlbGltaXRlcnMgPSBzb3VyY2UubWF0Y2goL1xcclxcbnxbXFxuXFx2XFxmXFxyXFx4ODVdL2cpIHx8IFtdLFxuICAgICAgaHVua3MgPSB1bmlEaWZmLmh1bmtzLFxuXG4gICAgICBjb21wYXJlTGluZSA9IG9wdGlvbnMuY29tcGFyZUxpbmUgfHwgKChsaW5lTnVtYmVyLCBsaW5lLCBvcGVyYXRpb24sIHBhdGNoQ29udGVudCkgPT4gbGluZSA9PT0gcGF0Y2hDb250ZW50KSxcbiAgICAgIGVycm9yQ291bnQgPSAwLFxuICAgICAgZnV6ekZhY3RvciA9IG9wdGlvbnMuZnV6ekZhY3RvciB8fCAwLFxuICAgICAgbWluTGluZSA9IDAsXG4gICAgICBvZmZzZXQgPSAwLFxuXG4gICAgICByZW1vdmVFT0ZOTCxcbiAgICAgIGFkZEVPRk5MO1xuXG4gIC8qKlxuICAgKiBDaGVja3MgaWYgdGhlIGh1bmsgZXhhY3RseSBmaXRzIG9uIHRoZSBwcm92aWRlZCBsb2NhdGlvblxuICAgKi9cbiAgZnVuY3Rpb24gaHVua0ZpdHMoaHVuaywgdG9Qb3MpIHtcbiAgICBmb3IgKGxldCBqID0gMDsgaiA8IGh1bmsubGluZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgIGxldCBsaW5lID0gaHVuay5saW5lc1tqXSxcbiAgICAgICAgICBvcGVyYXRpb24gPSAobGluZS5sZW5ndGggPiAwID8gbGluZVswXSA6ICcgJyksXG4gICAgICAgICAgY29udGVudCA9IChsaW5lLmxlbmd0aCA+IDAgPyBsaW5lLnN1YnN0cigxKSA6IGxpbmUpO1xuXG4gICAgICBpZiAob3BlcmF0aW9uID09PSAnICcgfHwgb3BlcmF0aW9uID09PSAnLScpIHtcbiAgICAgICAgLy8gQ29udGV4dCBzYW5pdHkgY2hlY2tcbiAgICAgICAgaWYgKCFjb21wYXJlTGluZSh0b1BvcyArIDEsIGxpbmVzW3RvUG9zXSwgb3BlcmF0aW9uLCBjb250ZW50KSkge1xuICAgICAgICAgIGVycm9yQ291bnQrKztcblxuICAgICAgICAgIGlmIChlcnJvckNvdW50ID4gZnV6ekZhY3Rvcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0b1BvcysrO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiB0cnVlO1xuICB9XG5cbiAgLy8gU2VhcmNoIGJlc3QgZml0IG9mZnNldHMgZm9yIGVhY2ggaHVuayBiYXNlZCBvbiB0aGUgcHJldmlvdXMgb25lc1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGh1bmtzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGh1bmsgPSBodW5rc1tpXSxcbiAgICAgICAgbWF4TGluZSA9IGxpbmVzLmxlbmd0aCAtIGh1bmsub2xkTGluZXMsXG4gICAgICAgIGxvY2FsT2Zmc2V0ID0gMCxcbiAgICAgICAgdG9Qb3MgPSBvZmZzZXQgKyBodW5rLm9sZFN0YXJ0IC0gMTtcblxuICAgIGxldCBpdGVyYXRvciA9IGRpc3RhbmNlSXRlcmF0b3IodG9Qb3MsIG1pbkxpbmUsIG1heExpbmUpO1xuXG4gICAgZm9yICg7IGxvY2FsT2Zmc2V0ICE9PSB1bmRlZmluZWQ7IGxvY2FsT2Zmc2V0ID0gaXRlcmF0b3IoKSkge1xuICAgICAgaWYgKGh1bmtGaXRzKGh1bmssIHRvUG9zICsgbG9jYWxPZmZzZXQpKSB7XG4gICAgICAgIGh1bmsub2Zmc2V0ID0gb2Zmc2V0ICs9IGxvY2FsT2Zmc2V0O1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobG9jYWxPZmZzZXQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIC8vIFNldCBsb3dlciB0ZXh0IGxpbWl0IHRvIGVuZCBvZiB0aGUgY3VycmVudCBodW5rLCBzbyBuZXh0IG9uZXMgZG9uJ3QgdHJ5XG4gICAgLy8gdG8gZml0IG92ZXIgYWxyZWFkeSBwYXRjaGVkIHRleHRcbiAgICBtaW5MaW5lID0gaHVuay5vZmZzZXQgKyBodW5rLm9sZFN0YXJ0ICsgaHVuay5vbGRMaW5lcztcbiAgfVxuXG4gIC8vIEFwcGx5IHBhdGNoIGh1bmtzXG4gIGxldCBkaWZmT2Zmc2V0ID0gMDtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBodW5rcy5sZW5ndGg7IGkrKykge1xuICAgIGxldCBodW5rID0gaHVua3NbaV0sXG4gICAgICAgIHRvUG9zID0gaHVuay5vbGRTdGFydCArIGh1bmsub2Zmc2V0ICsgZGlmZk9mZnNldCAtIDE7XG4gICAgZGlmZk9mZnNldCArPSBodW5rLm5ld0xpbmVzIC0gaHVuay5vbGRMaW5lcztcblxuICAgIGZvciAobGV0IGogPSAwOyBqIDwgaHVuay5saW5lcy5sZW5ndGg7IGorKykge1xuICAgICAgbGV0IGxpbmUgPSBodW5rLmxpbmVzW2pdLFxuICAgICAgICAgIG9wZXJhdGlvbiA9IChsaW5lLmxlbmd0aCA+IDAgPyBsaW5lWzBdIDogJyAnKSxcbiAgICAgICAgICBjb250ZW50ID0gKGxpbmUubGVuZ3RoID4gMCA/IGxpbmUuc3Vic3RyKDEpIDogbGluZSksXG4gICAgICAgICAgZGVsaW1pdGVyID0gaHVuay5saW5lZGVsaW1pdGVyc1tqXTtcblxuICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJyAnKSB7XG4gICAgICAgIHRvUG9zKys7XG4gICAgICB9IGVsc2UgaWYgKG9wZXJhdGlvbiA9PT0gJy0nKSB7XG4gICAgICAgIGxpbmVzLnNwbGljZSh0b1BvcywgMSk7XG4gICAgICAgIGRlbGltaXRlcnMuc3BsaWNlKHRvUG9zLCAxKTtcbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICB9IGVsc2UgaWYgKG9wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgIGxpbmVzLnNwbGljZSh0b1BvcywgMCwgY29udGVudCk7XG4gICAgICAgIGRlbGltaXRlcnMuc3BsaWNlKHRvUG9zLCAwLCBkZWxpbWl0ZXIpO1xuICAgICAgICB0b1BvcysrO1xuICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICdcXFxcJykge1xuICAgICAgICBsZXQgcHJldmlvdXNPcGVyYXRpb24gPSBodW5rLmxpbmVzW2ogLSAxXSA/IGh1bmsubGluZXNbaiAtIDFdWzBdIDogbnVsbDtcbiAgICAgICAgaWYgKHByZXZpb3VzT3BlcmF0aW9uID09PSAnKycpIHtcbiAgICAgICAgICByZW1vdmVFT0ZOTCA9IHRydWU7XG4gICAgICAgIH0gZWxzZSBpZiAocHJldmlvdXNPcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIGFkZEVPRk5MID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8vIEhhbmRsZSBFT0ZOTCBpbnNlcnRpb24vcmVtb3ZhbFxuICBpZiAocmVtb3ZlRU9GTkwpIHtcbiAgICB3aGlsZSAoIWxpbmVzW2xpbmVzLmxlbmd0aCAtIDFdKSB7XG4gICAgICBsaW5lcy5wb3AoKTtcbiAgICAgIGRlbGltaXRlcnMucG9wKCk7XG4gICAgfVxuICB9IGVsc2UgaWYgKGFkZEVPRk5MKSB7XG4gICAgbGluZXMucHVzaCgnJyk7XG4gICAgZGVsaW1pdGVycy5wdXNoKCdcXG4nKTtcbiAgfVxuICBmb3IgKGxldCBfayA9IDA7IF9rIDwgbGluZXMubGVuZ3RoIC0gMTsgX2srKykge1xuICAgIGxpbmVzW19rXSA9IGxpbmVzW19rXSArIGRlbGltaXRlcnNbX2tdO1xuICB9XG4gIHJldHVybiBsaW5lcy5qb2luKCcnKTtcbn1cblxuLy8gV3JhcHBlciB0aGF0IHN1cHBvcnRzIG11bHRpcGxlIGZpbGUgcGF0Y2hlcyB2aWEgY2FsbGJhY2tzLlxuZXhwb3J0IGZ1bmN0aW9uIGFwcGx5UGF0Y2hlcyh1bmlEaWZmLCBvcHRpb25zKSB7XG4gIGlmICh0eXBlb2YgdW5pRGlmZiA9PT0gJ3N0cmluZycpIHtcbiAgICB1bmlEaWZmID0gcGFyc2VQYXRjaCh1bmlEaWZmKTtcbiAgfVxuXG4gIGxldCBjdXJyZW50SW5kZXggPSAwO1xuICBmdW5jdGlvbiBwcm9jZXNzSW5kZXgoKSB7XG4gICAgbGV0IGluZGV4ID0gdW5pRGlmZltjdXJyZW50SW5kZXgrK107XG4gICAgaWYgKCFpbmRleCkge1xuICAgICAgcmV0dXJuIG9wdGlvbnMuY29tcGxldGUoKTtcbiAgICB9XG5cbiAgICBvcHRpb25zLmxvYWRGaWxlKGluZGV4LCBmdW5jdGlvbihlcnIsIGRhdGEpIHtcbiAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgcmV0dXJuIG9wdGlvbnMuY29tcGxldGUoZXJyKTtcbiAgICAgIH1cblxuICAgICAgbGV0IHVwZGF0ZWRDb250ZW50ID0gYXBwbHlQYXRjaChkYXRhLCBpbmRleCwgb3B0aW9ucyk7XG4gICAgICBvcHRpb25zLnBhdGNoZWQoaW5kZXgsIHVwZGF0ZWRDb250ZW50LCBmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKGVycik7XG4gICAgICAgIH1cblxuICAgICAgICBwcm9jZXNzSW5kZXgoKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG4gIHByb2Nlc3NJbmRleCgpO1xufVxuIl19 diff --git a/node_modules/npm/node_modules/diff/lib/patch/create.js b/node_modules/npm/node_modules/diff/lib/patch/create.js deleted file mode 100644 index 1d3b4c3..0000000 --- a/node_modules/npm/node_modules/diff/lib/patch/create.js +++ /dev/null @@ -1,272 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.structuredPatch = structuredPatch; -exports.formatPatch = formatPatch; -exports.createTwoFilesPatch = createTwoFilesPatch; -exports.createPatch = createPatch; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_line = require("../diff/line") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -/*istanbul ignore end*/ -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, options); - - if (!diff) { - return; - } - - 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; - - /*istanbul ignore start*/ - var _loop = function _loop( - /*istanbul ignore end*/ - i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - /*istanbul ignore start*/ - var _curRange; - - /*istanbul ignore end*/ - // 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 - - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_curRange = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - 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) { - /*istanbul ignore start*/ - var _curRange2; - - /*istanbul ignore end*/ - // Overlapping - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_curRange2 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - contextLines(lines))); - } else { - /*istanbul ignore start*/ - var _curRange3; - - /*istanbul ignore end*/ - // end the range and output - var contextSize = Math.min(lines.length, options.context); - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_curRange3 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - 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 && oldStr.length > 0) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - // however, if the old file is empty, do not output the no-nl line - 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++) { - /*istanbul ignore start*/ - _loop( - /*istanbul ignore end*/ - i); - } - - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; -} - -function formatPatch(diff) { - var ret = []; - - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.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]; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; -} - -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options)); -} - -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9jcmVhdGUuanMiXSwibmFtZXMiOlsic3RydWN0dXJlZFBhdGNoIiwib2xkRmlsZU5hbWUiLCJuZXdGaWxlTmFtZSIsIm9sZFN0ciIsIm5ld1N0ciIsIm9sZEhlYWRlciIsIm5ld0hlYWRlciIsIm9wdGlvbnMiLCJjb250ZXh0IiwiZGlmZiIsImRpZmZMaW5lcyIsInB1c2giLCJ2YWx1ZSIsImxpbmVzIiwiY29udGV4dExpbmVzIiwibWFwIiwiZW50cnkiLCJodW5rcyIsIm9sZFJhbmdlU3RhcnQiLCJuZXdSYW5nZVN0YXJ0IiwiY3VyUmFuZ2UiLCJvbGRMaW5lIiwibmV3TGluZSIsImkiLCJjdXJyZW50IiwicmVwbGFjZSIsInNwbGl0IiwiYWRkZWQiLCJyZW1vdmVkIiwicHJldiIsInNsaWNlIiwibGVuZ3RoIiwiY29udGV4dFNpemUiLCJNYXRoIiwibWluIiwiaHVuayIsIm9sZFN0YXJ0Iiwib2xkTGluZXMiLCJuZXdTdGFydCIsIm5ld0xpbmVzIiwib2xkRU9GTmV3bGluZSIsInRlc3QiLCJuZXdFT0ZOZXdsaW5lIiwibm9ObEJlZm9yZUFkZHMiLCJzcGxpY2UiLCJmb3JtYXRQYXRjaCIsInJldCIsImFwcGx5Iiwiam9pbiIsImNyZWF0ZVR3b0ZpbGVzUGF0Y2giLCJjcmVhdGVQYXRjaCIsImZpbGVOYW1lIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7QUFFTyxTQUFTQSxlQUFULENBQXlCQyxXQUF6QixFQUFzQ0MsV0FBdEMsRUFBbURDLE1BQW5ELEVBQTJEQyxNQUEzRCxFQUFtRUMsU0FBbkUsRUFBOEVDLFNBQTlFLEVBQXlGQyxPQUF6RixFQUFrRztBQUN2RyxNQUFJLENBQUNBLE9BQUwsRUFBYztBQUNaQSxJQUFBQSxPQUFPLEdBQUcsRUFBVjtBQUNEOztBQUNELE1BQUksT0FBT0EsT0FBTyxDQUFDQyxPQUFmLEtBQTJCLFdBQS9CLEVBQTRDO0FBQzFDRCxJQUFBQSxPQUFPLENBQUNDLE9BQVIsR0FBa0IsQ0FBbEI7QUFDRDs7QUFFRCxNQUFNQyxJQUFJO0FBQUc7QUFBQTtBQUFBOztBQUFBQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsR0FBVVAsTUFBVixFQUFrQkMsTUFBbEIsRUFBMEJHLE9BQTFCLENBQWI7O0FBQ0EsTUFBRyxDQUFDRSxJQUFKLEVBQVU7QUFDUjtBQUNEOztBQUVEQSxFQUFBQSxJQUFJLENBQUNFLElBQUwsQ0FBVTtBQUFDQyxJQUFBQSxLQUFLLEVBQUUsRUFBUjtBQUFZQyxJQUFBQSxLQUFLLEVBQUU7QUFBbkIsR0FBVixFQWJ1RyxDQWFwRTs7QUFFbkMsV0FBU0MsWUFBVCxDQUFzQkQsS0FBdEIsRUFBNkI7QUFDM0IsV0FBT0EsS0FBSyxDQUFDRSxHQUFOLENBQVUsVUFBU0MsS0FBVCxFQUFnQjtBQUFFLGFBQU8sTUFBTUEsS0FBYjtBQUFxQixLQUFqRCxDQUFQO0FBQ0Q7O0FBRUQsTUFBSUMsS0FBSyxHQUFHLEVBQVo7QUFDQSxNQUFJQyxhQUFhLEdBQUcsQ0FBcEI7QUFBQSxNQUF1QkMsYUFBYSxHQUFHLENBQXZDO0FBQUEsTUFBMENDLFFBQVEsR0FBRyxFQUFyRDtBQUFBLE1BQ0lDLE9BQU8sR0FBRyxDQURkO0FBQUEsTUFDaUJDLE9BQU8sR0FBRyxDQUQzQjs7QUFwQnVHO0FBQUE7QUFBQTtBQXNCOUZDLEVBQUFBLENBdEI4RjtBQXVCckcsUUFBTUMsT0FBTyxHQUFHZixJQUFJLENBQUNjLENBQUQsQ0FBcEI7QUFBQSxRQUNNVixLQUFLLEdBQUdXLE9BQU8sQ0FBQ1gsS0FBUixJQUFpQlcsT0FBTyxDQUFDWixLQUFSLENBQWNhLE9BQWQsQ0FBc0IsS0FBdEIsRUFBNkIsRUFBN0IsRUFBaUNDLEtBQWpDLENBQXVDLElBQXZDLENBRC9CO0FBRUFGLElBQUFBLE9BQU8sQ0FBQ1gsS0FBUixHQUFnQkEsS0FBaEI7O0FBRUEsUUFBSVcsT0FBTyxDQUFDRyxLQUFSLElBQWlCSCxPQUFPLENBQUNJLE9BQTdCLEVBQXNDO0FBQUE7QUFBQTs7QUFBQTtBQUNwQztBQUNBLFVBQUksQ0FBQ1YsYUFBTCxFQUFvQjtBQUNsQixZQUFNVyxJQUFJLEdBQUdwQixJQUFJLENBQUNjLENBQUMsR0FBRyxDQUFMLENBQWpCO0FBQ0FMLFFBQUFBLGFBQWEsR0FBR0csT0FBaEI7QUFDQUYsUUFBQUEsYUFBYSxHQUFHRyxPQUFoQjs7QUFFQSxZQUFJTyxJQUFKLEVBQVU7QUFDUlQsVUFBQUEsUUFBUSxHQUFHYixPQUFPLENBQUNDLE9BQVIsR0FBa0IsQ0FBbEIsR0FBc0JNLFlBQVksQ0FBQ2UsSUFBSSxDQUFDaEIsS0FBTCxDQUFXaUIsS0FBWCxDQUFpQixDQUFDdkIsT0FBTyxDQUFDQyxPQUExQixDQUFELENBQWxDLEdBQXlFLEVBQXBGO0FBQ0FVLFVBQUFBLGFBQWEsSUFBSUUsUUFBUSxDQUFDVyxNQUExQjtBQUNBWixVQUFBQSxhQUFhLElBQUlDLFFBQVEsQ0FBQ1csTUFBMUI7QUFDRDtBQUNGLE9BWm1DLENBY3BDOzs7QUFDQTs7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQVgsTUFBQUEsUUFBUSxFQUFDVCxJQUFUO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBa0JFLE1BQUFBLEtBQUssQ0FBQ0UsR0FBTixDQUFVLFVBQVNDLEtBQVQsRUFBZ0I7QUFDMUMsZUFBTyxDQUFDUSxPQUFPLENBQUNHLEtBQVIsR0FBZ0IsR0FBaEIsR0FBc0IsR0FBdkIsSUFBOEJYLEtBQXJDO0FBQ0QsT0FGaUIsQ0FBbEIsR0Fmb0MsQ0FtQnBDOzs7QUFDQSxVQUFJUSxPQUFPLENBQUNHLEtBQVosRUFBbUI7QUFDakJMLFFBQUFBLE9BQU8sSUFBSVQsS0FBSyxDQUFDa0IsTUFBakI7QUFDRCxPQUZELE1BRU87QUFDTFYsUUFBQUEsT0FBTyxJQUFJUixLQUFLLENBQUNrQixNQUFqQjtBQUNEO0FBQ0YsS0F6QkQsTUF5Qk87QUFDTDtBQUNBLFVBQUliLGFBQUosRUFBbUI7QUFDakI7QUFDQSxZQUFJTCxLQUFLLENBQUNrQixNQUFOLElBQWdCeEIsT0FBTyxDQUFDQyxPQUFSLEdBQWtCLENBQWxDLElBQXVDZSxDQUFDLEdBQUdkLElBQUksQ0FBQ3NCLE1BQUwsR0FBYyxDQUE3RCxFQUFnRTtBQUFBO0FBQUE7O0FBQUE7QUFDOUQ7O0FBQ0E7O0FBQUE7O0FBQUE7QUFBQTtBQUFBO0FBQUFYLFVBQUFBLFFBQVEsRUFBQ1QsSUFBVDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQWtCRyxVQUFBQSxZQUFZLENBQUNELEtBQUQsQ0FBOUI7QUFDRCxTQUhELE1BR087QUFBQTtBQUFBOztBQUFBO0FBQ0w7QUFDQSxjQUFJbUIsV0FBVyxHQUFHQyxJQUFJLENBQUNDLEdBQUwsQ0FBU3JCLEtBQUssQ0FBQ2tCLE1BQWYsRUFBdUJ4QixPQUFPLENBQUNDLE9BQS9CLENBQWxCOztBQUNBOztBQUFBOztBQUFBO0FBQUE7QUFBQTtBQUFBWSxVQUFBQSxRQUFRLEVBQUNULElBQVQ7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFrQkcsVUFBQUEsWUFBWSxDQUFDRCxLQUFLLENBQUNpQixLQUFOLENBQVksQ0FBWixFQUFlRSxXQUFmLENBQUQsQ0FBOUI7O0FBRUEsY0FBSUcsSUFBSSxHQUFHO0FBQ1RDLFlBQUFBLFFBQVEsRUFBRWxCLGFBREQ7QUFFVG1CLFlBQUFBLFFBQVEsRUFBR2hCLE9BQU8sR0FBR0gsYUFBVixHQUEwQmMsV0FGNUI7QUFHVE0sWUFBQUEsUUFBUSxFQUFFbkIsYUFIRDtBQUlUb0IsWUFBQUEsUUFBUSxFQUFHakIsT0FBTyxHQUFHSCxhQUFWLEdBQTBCYSxXQUo1QjtBQUtUbkIsWUFBQUEsS0FBSyxFQUFFTztBQUxFLFdBQVg7O0FBT0EsY0FBSUcsQ0FBQyxJQUFJZCxJQUFJLENBQUNzQixNQUFMLEdBQWMsQ0FBbkIsSUFBd0JsQixLQUFLLENBQUNrQixNQUFOLElBQWdCeEIsT0FBTyxDQUFDQyxPQUFwRCxFQUE2RDtBQUMzRDtBQUNBLGdCQUFJZ0MsYUFBYSxHQUFLLEtBQUQsQ0FBUUMsSUFBUixDQUFhdEMsTUFBYixDQUFyQjtBQUNBLGdCQUFJdUMsYUFBYSxHQUFLLEtBQUQsQ0FBUUQsSUFBUixDQUFhckMsTUFBYixDQUFyQjtBQUNBLGdCQUFJdUMsY0FBYyxHQUFHOUIsS0FBSyxDQUFDa0IsTUFBTixJQUFnQixDQUFoQixJQUFxQlgsUUFBUSxDQUFDVyxNQUFULEdBQWtCSSxJQUFJLENBQUNFLFFBQWpFOztBQUNBLGdCQUFJLENBQUNHLGFBQUQsSUFBa0JHLGNBQWxCLElBQW9DeEMsTUFBTSxDQUFDNEIsTUFBUCxHQUFnQixDQUF4RCxFQUEyRDtBQUN6RDtBQUNBO0FBQ0FYLGNBQUFBLFFBQVEsQ0FBQ3dCLE1BQVQsQ0FBZ0JULElBQUksQ0FBQ0UsUUFBckIsRUFBK0IsQ0FBL0IsRUFBa0MsOEJBQWxDO0FBQ0Q7O0FBQ0QsZ0JBQUssQ0FBQ0csYUFBRCxJQUFrQixDQUFDRyxjQUFwQixJQUF1QyxDQUFDRCxhQUE1QyxFQUEyRDtBQUN6RHRCLGNBQUFBLFFBQVEsQ0FBQ1QsSUFBVCxDQUFjLDhCQUFkO0FBQ0Q7QUFDRjs7QUFDRE0sVUFBQUEsS0FBSyxDQUFDTixJQUFOLENBQVd3QixJQUFYO0FBRUFqQixVQUFBQSxhQUFhLEdBQUcsQ0FBaEI7QUFDQUMsVUFBQUEsYUFBYSxHQUFHLENBQWhCO0FBQ0FDLFVBQUFBLFFBQVEsR0FBRyxFQUFYO0FBQ0Q7QUFDRjs7QUFDREMsTUFBQUEsT0FBTyxJQUFJUixLQUFLLENBQUNrQixNQUFqQjtBQUNBVCxNQUFBQSxPQUFPLElBQUlULEtBQUssQ0FBQ2tCLE1BQWpCO0FBQ0Q7QUE5Rm9HOztBQXNCdkcsT0FBSyxJQUFJUixDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHZCxJQUFJLENBQUNzQixNQUF6QixFQUFpQ1IsQ0FBQyxFQUFsQyxFQUFzQztBQUFBO0FBQUE7QUFBQTtBQUE3QkEsSUFBQUEsQ0FBNkI7QUF5RXJDOztBQUVELFNBQU87QUFDTHRCLElBQUFBLFdBQVcsRUFBRUEsV0FEUjtBQUNxQkMsSUFBQUEsV0FBVyxFQUFFQSxXQURsQztBQUVMRyxJQUFBQSxTQUFTLEVBQUVBLFNBRk47QUFFaUJDLElBQUFBLFNBQVMsRUFBRUEsU0FGNUI7QUFHTFcsSUFBQUEsS0FBSyxFQUFFQTtBQUhGLEdBQVA7QUFLRDs7QUFFTSxTQUFTNEIsV0FBVCxDQUFxQnBDLElBQXJCLEVBQTJCO0FBQ2hDLE1BQU1xQyxHQUFHLEdBQUcsRUFBWjs7QUFDQSxNQUFJckMsSUFBSSxDQUFDUixXQUFMLElBQW9CUSxJQUFJLENBQUNQLFdBQTdCLEVBQTBDO0FBQ3hDNEMsSUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUFTLFlBQVlGLElBQUksQ0FBQ1IsV0FBMUI7QUFDRDs7QUFDRDZDLEVBQUFBLEdBQUcsQ0FBQ25DLElBQUosQ0FBUyxxRUFBVDtBQUNBbUMsRUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUFTLFNBQVNGLElBQUksQ0FBQ1IsV0FBZCxJQUE2QixPQUFPUSxJQUFJLENBQUNKLFNBQVosS0FBMEIsV0FBMUIsR0FBd0MsRUFBeEMsR0FBNkMsT0FBT0ksSUFBSSxDQUFDSixTQUF0RixDQUFUO0FBQ0F5QyxFQUFBQSxHQUFHLENBQUNuQyxJQUFKLENBQVMsU0FBU0YsSUFBSSxDQUFDUCxXQUFkLElBQTZCLE9BQU9PLElBQUksQ0FBQ0gsU0FBWixLQUEwQixXQUExQixHQUF3QyxFQUF4QyxHQUE2QyxPQUFPRyxJQUFJLENBQUNILFNBQXRGLENBQVQ7O0FBRUEsT0FBSyxJQUFJaUIsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR2QsSUFBSSxDQUFDUSxLQUFMLENBQVdjLE1BQS9CLEVBQXVDUixDQUFDLEVBQXhDLEVBQTRDO0FBQzFDLFFBQU1ZLElBQUksR0FBRzFCLElBQUksQ0FBQ1EsS0FBTCxDQUFXTSxDQUFYLENBQWIsQ0FEMEMsQ0FFMUM7QUFDQTtBQUNBOztBQUNBLFFBQUlZLElBQUksQ0FBQ0UsUUFBTCxLQUFrQixDQUF0QixFQUF5QjtBQUN2QkYsTUFBQUEsSUFBSSxDQUFDQyxRQUFMLElBQWlCLENBQWpCO0FBQ0Q7O0FBQ0QsUUFBSUQsSUFBSSxDQUFDSSxRQUFMLEtBQWtCLENBQXRCLEVBQXlCO0FBQ3ZCSixNQUFBQSxJQUFJLENBQUNHLFFBQUwsSUFBaUIsQ0FBakI7QUFDRDs7QUFDRFEsSUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUNFLFNBQVN3QixJQUFJLENBQUNDLFFBQWQsR0FBeUIsR0FBekIsR0FBK0JELElBQUksQ0FBQ0UsUUFBcEMsR0FDRSxJQURGLEdBQ1NGLElBQUksQ0FBQ0csUUFEZCxHQUN5QixHQUR6QixHQUMrQkgsSUFBSSxDQUFDSSxRQURwQyxHQUVFLEtBSEo7QUFLQU8sSUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUFTb0MsS0FBVCxDQUFlRCxHQUFmLEVBQW9CWCxJQUFJLENBQUN0QixLQUF6QjtBQUNEOztBQUVELFNBQU9pQyxHQUFHLENBQUNFLElBQUosQ0FBUyxJQUFULElBQWlCLElBQXhCO0FBQ0Q7O0FBRU0sU0FBU0MsbUJBQVQsQ0FBNkJoRCxXQUE3QixFQUEwQ0MsV0FBMUMsRUFBdURDLE1BQXZELEVBQStEQyxNQUEvRCxFQUF1RUMsU0FBdkUsRUFBa0ZDLFNBQWxGLEVBQTZGQyxPQUE3RixFQUFzRztBQUMzRyxTQUFPc0MsV0FBVyxDQUFDN0MsZUFBZSxDQUFDQyxXQUFELEVBQWNDLFdBQWQsRUFBMkJDLE1BQTNCLEVBQW1DQyxNQUFuQyxFQUEyQ0MsU0FBM0MsRUFBc0RDLFNBQXRELEVBQWlFQyxPQUFqRSxDQUFoQixDQUFsQjtBQUNEOztBQUVNLFNBQVMyQyxXQUFULENBQXFCQyxRQUFyQixFQUErQmhELE1BQS9CLEVBQXVDQyxNQUF2QyxFQUErQ0MsU0FBL0MsRUFBMERDLFNBQTFELEVBQXFFQyxPQUFyRSxFQUE4RTtBQUNuRixTQUFPMEMsbUJBQW1CLENBQUNFLFFBQUQsRUFBV0EsUUFBWCxFQUFxQmhELE1BQXJCLEVBQTZCQyxNQUE3QixFQUFxQ0MsU0FBckMsRUFBZ0RDLFNBQWhELEVBQTJEQyxPQUEzRCxDQUExQjtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtkaWZmTGluZXN9IGZyb20gJy4uL2RpZmYvbGluZSc7XG5cbmV4cG9ydCBmdW5jdGlvbiBzdHJ1Y3R1cmVkUGF0Y2gob2xkRmlsZU5hbWUsIG5ld0ZpbGVOYW1lLCBvbGRTdHIsIG5ld1N0ciwgb2xkSGVhZGVyLCBuZXdIZWFkZXIsIG9wdGlvbnMpIHtcbiAgaWYgKCFvcHRpb25zKSB7XG4gICAgb3B0aW9ucyA9IHt9O1xuICB9XG4gIGlmICh0eXBlb2Ygb3B0aW9ucy5jb250ZXh0ID09PSAndW5kZWZpbmVkJykge1xuICAgIG9wdGlvbnMuY29udGV4dCA9IDQ7XG4gIH1cblxuICBjb25zdCBkaWZmID0gZGlmZkxpbmVzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKTtcbiAgaWYoIWRpZmYpIHtcbiAgICByZXR1cm47XG4gIH1cblxuICBkaWZmLnB1c2goe3ZhbHVlOiAnJywgbGluZXM6IFtdfSk7IC8vIEFwcGVuZCBhbiBlbXB0eSB2YWx1ZSB0byBtYWtlIGNsZWFudXAgZWFzaWVyXG5cbiAgZnVuY3Rpb24gY29udGV4dExpbmVzKGxpbmVzKSB7XG4gICAgcmV0dXJuIGxpbmVzLm1hcChmdW5jdGlvbihlbnRyeSkgeyByZXR1cm4gJyAnICsgZW50cnk7IH0pO1xuICB9XG5cbiAgbGV0IGh1bmtzID0gW107XG4gIGxldCBvbGRSYW5nZVN0YXJ0ID0gMCwgbmV3UmFuZ2VTdGFydCA9IDAsIGN1clJhbmdlID0gW10sXG4gICAgICBvbGRMaW5lID0gMSwgbmV3TGluZSA9IDE7XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgZGlmZi5sZW5ndGg7IGkrKykge1xuICAgIGNvbnN0IGN1cnJlbnQgPSBkaWZmW2ldLFxuICAgICAgICAgIGxpbmVzID0gY3VycmVudC5saW5lcyB8fCBjdXJyZW50LnZhbHVlLnJlcGxhY2UoL1xcbiQvLCAnJykuc3BsaXQoJ1xcbicpO1xuICAgIGN1cnJlbnQubGluZXMgPSBsaW5lcztcblxuICAgIGlmIChjdXJyZW50LmFkZGVkIHx8IGN1cnJlbnQucmVtb3ZlZCkge1xuICAgICAgLy8gSWYgd2UgaGF2ZSBwcmV2aW91cyBjb250ZXh0LCBzdGFydCB3aXRoIHRoYXRcbiAgICAgIGlmICghb2xkUmFuZ2VTdGFydCkge1xuICAgICAgICBjb25zdCBwcmV2ID0gZGlmZltpIC0gMV07XG4gICAgICAgIG9sZFJhbmdlU3RhcnQgPSBvbGRMaW5lO1xuICAgICAgICBuZXdSYW5nZVN0YXJ0ID0gbmV3TGluZTtcblxuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgIGN1clJhbmdlID0gb3B0aW9ucy5jb250ZXh0ID4gMCA/IGNvbnRleHRMaW5lcyhwcmV2LmxpbmVzLnNsaWNlKC1vcHRpb25zLmNvbnRleHQpKSA6IFtdO1xuICAgICAgICAgIG9sZFJhbmdlU3RhcnQgLT0gY3VyUmFuZ2UubGVuZ3RoO1xuICAgICAgICAgIG5ld1JhbmdlU3RhcnQgLT0gY3VyUmFuZ2UubGVuZ3RoO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIE91dHB1dCBvdXIgY2hhbmdlc1xuICAgICAgY3VyUmFuZ2UucHVzaCguLi4gbGluZXMubWFwKGZ1bmN0aW9uKGVudHJ5KSB7XG4gICAgICAgIHJldHVybiAoY3VycmVudC5hZGRlZCA/ICcrJyA6ICctJykgKyBlbnRyeTtcbiAgICAgIH0pKTtcblxuICAgICAgLy8gVHJhY2sgdGhlIHVwZGF0ZWQgZmlsZSBwb3NpdGlvblxuICAgICAgaWYgKGN1cnJlbnQuYWRkZWQpIHtcbiAgICAgICAgbmV3TGluZSArPSBsaW5lcy5sZW5ndGg7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBvbGRMaW5lICs9IGxpbmVzLmxlbmd0aDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgLy8gSWRlbnRpY2FsIGNvbnRleHQgbGluZXMuIFRyYWNrIGxpbmUgY2hhbmdlc1xuICAgICAgaWYgKG9sZFJhbmdlU3RhcnQpIHtcbiAgICAgICAgLy8gQ2xvc2Ugb3V0IGFueSBjaGFuZ2VzIHRoYXQgaGF2ZSBiZWVuIG91dHB1dCAob3Igam9pbiBvdmVybGFwcGluZylcbiAgICAgICAgaWYgKGxpbmVzLmxlbmd0aCA8PSBvcHRpb25zLmNvbnRleHQgKiAyICYmIGkgPCBkaWZmLmxlbmd0aCAtIDIpIHtcbiAgICAgICAgICAvLyBPdmVybGFwcGluZ1xuICAgICAgICAgIGN1clJhbmdlLnB1c2goLi4uIGNvbnRleHRMaW5lcyhsaW5lcykpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIGVuZCB0aGUgcmFuZ2UgYW5kIG91dHB1dFxuICAgICAgICAgIGxldCBjb250ZXh0U2l6ZSA9IE1hdGgubWluKGxpbmVzLmxlbmd0aCwgb3B0aW9ucy5jb250ZXh0KTtcbiAgICAgICAgICBjdXJSYW5nZS5wdXNoKC4uLiBjb250ZXh0TGluZXMobGluZXMuc2xpY2UoMCwgY29udGV4dFNpemUpKSk7XG5cbiAgICAgICAgICBsZXQgaHVuayA9IHtcbiAgICAgICAgICAgIG9sZFN0YXJ0OiBvbGRSYW5nZVN0YXJ0LFxuICAgICAgICAgICAgb2xkTGluZXM6IChvbGRMaW5lIC0gb2xkUmFuZ2VTdGFydCArIGNvbnRleHRTaXplKSxcbiAgICAgICAgICAgIG5ld1N0YXJ0OiBuZXdSYW5nZVN0YXJ0LFxuICAgICAgICAgICAgbmV3TGluZXM6IChuZXdMaW5lIC0gbmV3UmFuZ2VTdGFydCArIGNvbnRleHRTaXplKSxcbiAgICAgICAgICAgIGxpbmVzOiBjdXJSYW5nZVxuICAgICAgICAgIH07XG4gICAgICAgICAgaWYgKGkgPj0gZGlmZi5sZW5ndGggLSAyICYmIGxpbmVzLmxlbmd0aCA8PSBvcHRpb25zLmNvbnRleHQpIHtcbiAgICAgICAgICAgIC8vIEVPRiBpcyBpbnNpZGUgdGhpcyBodW5rXG4gICAgICAgICAgICBsZXQgb2xkRU9GTmV3bGluZSA9ICgoL1xcbiQvKS50ZXN0KG9sZFN0cikpO1xuICAgICAgICAgICAgbGV0IG5ld0VPRk5ld2xpbmUgPSAoKC9cXG4kLykudGVzdChuZXdTdHIpKTtcbiAgICAgICAgICAgIGxldCBub05sQmVmb3JlQWRkcyA9IGxpbmVzLmxlbmd0aCA9PSAwICYmIGN1clJhbmdlLmxlbmd0aCA+IGh1bmsub2xkTGluZXM7XG4gICAgICAgICAgICBpZiAoIW9sZEVPRk5ld2xpbmUgJiYgbm9ObEJlZm9yZUFkZHMgJiYgb2xkU3RyLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgLy8gc3BlY2lhbCBjYXNlOiBvbGQgaGFzIG5vIGVvbCBhbmQgbm8gdHJhaWxpbmcgY29udGV4dDsgbm8tbmwgY2FuIGVuZCB1cCBiZWZvcmUgYWRkc1xuICAgICAgICAgICAgICAvLyBob3dldmVyLCBpZiB0aGUgb2xkIGZpbGUgaXMgZW1wdHksIGRvIG5vdCBvdXRwdXQgdGhlIG5vLW5sIGxpbmVcbiAgICAgICAgICAgICAgY3VyUmFuZ2Uuc3BsaWNlKGh1bmsub2xkTGluZXMsIDAsICdcXFxcIE5vIG5ld2xpbmUgYXQgZW5kIG9mIGZpbGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgoIW9sZEVPRk5ld2xpbmUgJiYgIW5vTmxCZWZvcmVBZGRzKSB8fCAhbmV3RU9GTmV3bGluZSkge1xuICAgICAgICAgICAgICBjdXJSYW5nZS5wdXNoKCdcXFxcIE5vIG5ld2xpbmUgYXQgZW5kIG9mIGZpbGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaHVua3MucHVzaChodW5rKTtcblxuICAgICAgICAgIG9sZFJhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgIG5ld1JhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgIGN1clJhbmdlID0gW107XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIG9sZExpbmUgKz0gbGluZXMubGVuZ3RoO1xuICAgICAgbmV3TGluZSArPSBsaW5lcy5sZW5ndGg7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICBvbGRGaWxlTmFtZTogb2xkRmlsZU5hbWUsIG5ld0ZpbGVOYW1lOiBuZXdGaWxlTmFtZSxcbiAgICBvbGRIZWFkZXI6IG9sZEhlYWRlciwgbmV3SGVhZGVyOiBuZXdIZWFkZXIsXG4gICAgaHVua3M6IGh1bmtzXG4gIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBmb3JtYXRQYXRjaChkaWZmKSB7XG4gIGNvbnN0IHJldCA9IFtdO1xuICBpZiAoZGlmZi5vbGRGaWxlTmFtZSA9PSBkaWZmLm5ld0ZpbGVOYW1lKSB7XG4gICAgcmV0LnB1c2goJ0luZGV4OiAnICsgZGlmZi5vbGRGaWxlTmFtZSk7XG4gIH1cbiAgcmV0LnB1c2goJz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0nKTtcbiAgcmV0LnB1c2goJy0tLSAnICsgZGlmZi5vbGRGaWxlTmFtZSArICh0eXBlb2YgZGlmZi5vbGRIZWFkZXIgPT09ICd1bmRlZmluZWQnID8gJycgOiAnXFx0JyArIGRpZmYub2xkSGVhZGVyKSk7XG4gIHJldC5wdXNoKCcrKysgJyArIGRpZmYubmV3RmlsZU5hbWUgKyAodHlwZW9mIGRpZmYubmV3SGVhZGVyID09PSAndW5kZWZpbmVkJyA/ICcnIDogJ1xcdCcgKyBkaWZmLm5ld0hlYWRlcikpO1xuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgZGlmZi5odW5rcy5sZW5ndGg7IGkrKykge1xuICAgIGNvbnN0IGh1bmsgPSBkaWZmLmh1bmtzW2ldO1xuICAgIC8vIFVuaWZpZWQgRGlmZiBGb3JtYXQgcXVpcms6IElmIHRoZSBjaHVuayBzaXplIGlzIDAsXG4gICAgLy8gdGhlIGZpcnN0IG51bWJlciBpcyBvbmUgbG93ZXIgdGhhbiBvbmUgd291bGQgZXhwZWN0LlxuICAgIC8vIGh0dHBzOi8vd3d3LmFydGltYS5jb20vd2VibG9ncy92aWV3cG9zdC5qc3A/dGhyZWFkPTE2NDI5M1xuICAgIGlmIChodW5rLm9sZExpbmVzID09PSAwKSB7XG4gICAgICBodW5rLm9sZFN0YXJ0IC09IDE7XG4gICAgfVxuICAgIGlmIChodW5rLm5ld0xpbmVzID09PSAwKSB7XG4gICAgICBodW5rLm5ld1N0YXJ0IC09IDE7XG4gICAgfVxuICAgIHJldC5wdXNoKFxuICAgICAgJ0BAIC0nICsgaHVuay5vbGRTdGFydCArICcsJyArIGh1bmsub2xkTGluZXNcbiAgICAgICsgJyArJyArIGh1bmsubmV3U3RhcnQgKyAnLCcgKyBodW5rLm5ld0xpbmVzXG4gICAgICArICcgQEAnXG4gICAgKTtcbiAgICByZXQucHVzaC5hcHBseShyZXQsIGh1bmsubGluZXMpO1xuICB9XG5cbiAgcmV0dXJuIHJldC5qb2luKCdcXG4nKSArICdcXG4nO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVHdvRmlsZXNQYXRjaChvbGRGaWxlTmFtZSwgbmV3RmlsZU5hbWUsIG9sZFN0ciwgbmV3U3RyLCBvbGRIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucykge1xuICByZXR1cm4gZm9ybWF0UGF0Y2goc3RydWN0dXJlZFBhdGNoKG9sZEZpbGVOYW1lLCBuZXdGaWxlTmFtZSwgb2xkU3RyLCBuZXdTdHIsIG9sZEhlYWRlciwgbmV3SGVhZGVyLCBvcHRpb25zKSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVQYXRjaChmaWxlTmFtZSwgb2xkU3RyLCBuZXdTdHIsIG9sZEhlYWRlciwgbmV3SGVhZGVyLCBvcHRpb25zKSB7XG4gIHJldHVybiBjcmVhdGVUd29GaWxlc1BhdGNoKGZpbGVOYW1lLCBmaWxlTmFtZSwgb2xkU3RyLCBuZXdTdHIsIG9sZEhlYWRlciwgbmV3SGVhZGVyLCBvcHRpb25zKTtcbn1cbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/patch/merge.js b/node_modules/npm/node_modules/diff/lib/patch/merge.js deleted file mode 100644 index b46faaa..0000000 --- a/node_modules/npm/node_modules/diff/lib/patch/merge.js +++ /dev/null @@ -1,613 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calcLineCount = calcLineCount; -exports.merge = merge; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_create = require("./create") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_array = require("../util/array") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -/*istanbul ignore end*/ -function calcLineCount(hunk) { - /*istanbul ignore start*/ - var _calcOldNewLineCount = - /*istanbul ignore end*/ - 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 ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (param)[0] - ); - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - - return ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _create - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - structuredPatch) - /*istanbul ignore end*/ - (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] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines; - - /*istanbul ignore end*/ - // Mine inserted - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines2; - - /*istanbul ignore end*/ - // Theirs inserted - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - 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 ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines3; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines3 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - - return; - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines4; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines4 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines4 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges)); - - return; - } - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayEqual) - /*istanbul ignore end*/ - (myChanges, theirChanges)) { - /*istanbul ignore start*/ - var _hunk$lines5; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines5 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines5 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - - return; - } - - conflict(hunk, myChanges, theirChanges); -} - -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - - if (theirChanges.merged) { - /*istanbul ignore start*/ - var _hunk$lines6; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines6 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines6 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - 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 - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9tZXJnZS5qcyJdLCJuYW1lcyI6WyJjYWxjTGluZUNvdW50IiwiaHVuayIsImNhbGNPbGROZXdMaW5lQ291bnQiLCJsaW5lcyIsIm9sZExpbmVzIiwibmV3TGluZXMiLCJ1bmRlZmluZWQiLCJtZXJnZSIsIm1pbmUiLCJ0aGVpcnMiLCJiYXNlIiwibG9hZFBhdGNoIiwicmV0IiwiaW5kZXgiLCJuZXdGaWxlTmFtZSIsImZpbGVOYW1lQ2hhbmdlZCIsIm9sZEZpbGVOYW1lIiwib2xkSGVhZGVyIiwibmV3SGVhZGVyIiwic2VsZWN0RmllbGQiLCJodW5rcyIsIm1pbmVJbmRleCIsInRoZWlyc0luZGV4IiwibWluZU9mZnNldCIsInRoZWlyc09mZnNldCIsImxlbmd0aCIsIm1pbmVDdXJyZW50Iiwib2xkU3RhcnQiLCJJbmZpbml0eSIsInRoZWlyc0N1cnJlbnQiLCJodW5rQmVmb3JlIiwicHVzaCIsImNsb25lSHVuayIsIm1lcmdlZEh1bmsiLCJNYXRoIiwibWluIiwibmV3U3RhcnQiLCJtZXJnZUxpbmVzIiwicGFyYW0iLCJ0ZXN0IiwicGFyc2VQYXRjaCIsIkVycm9yIiwic3RydWN0dXJlZFBhdGNoIiwicGF0Y2giLCJjb25mbGljdCIsImNoZWNrIiwib2Zmc2V0IiwibWluZUxpbmVzIiwidGhlaXJPZmZzZXQiLCJ0aGVpckxpbmVzIiwidGhlaXIiLCJpbnNlcnRMZWFkaW5nIiwidGhlaXJDdXJyZW50IiwibXV0dWFsQ2hhbmdlIiwiY29sbGVjdENoYW5nZSIsInJlbW92YWwiLCJpbnNlcnRUcmFpbGluZyIsIm15Q2hhbmdlcyIsInRoZWlyQ2hhbmdlcyIsImFsbFJlbW92ZXMiLCJhcnJheVN0YXJ0c1dpdGgiLCJza2lwUmVtb3ZlU3VwZXJzZXQiLCJhcnJheUVxdWFsIiwic3dhcCIsImNvbGxlY3RDb250ZXh0IiwibWVyZ2VkIiwiaW5zZXJ0IiwibGluZSIsInN0YXRlIiwib3BlcmF0aW9uIiwibWF0Y2hDaGFuZ2VzIiwiY2hhbmdlcyIsIm1hdGNoSW5kZXgiLCJjb250ZXh0Q2hhbmdlcyIsImNvbmZsaWN0ZWQiLCJjaGFuZ2UiLCJtYXRjaCIsInN1YnN0ciIsInJlZHVjZSIsInByZXYiLCJyZW1vdmVDaGFuZ2VzIiwiZGVsdGEiLCJpIiwiY2hhbmdlQ29udGVudCIsImZvckVhY2giLCJteUNvdW50IiwidGhlaXJDb3VudCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7Ozs7Ozs7Ozs7Ozs7QUFFTyxTQUFTQSxhQUFULENBQXVCQyxJQUF2QixFQUE2QjtBQUFBO0FBQUE7QUFBQTtBQUNMQyxFQUFBQSxtQkFBbUIsQ0FBQ0QsSUFBSSxDQUFDRSxLQUFOLENBRGQ7QUFBQSxNQUMzQkMsUUFEMkIsd0JBQzNCQSxRQUQyQjtBQUFBLE1BQ2pCQyxRQURpQix3QkFDakJBLFFBRGlCOztBQUdsQyxNQUFJRCxRQUFRLEtBQUtFLFNBQWpCLEVBQTRCO0FBQzFCTCxJQUFBQSxJQUFJLENBQUNHLFFBQUwsR0FBZ0JBLFFBQWhCO0FBQ0QsR0FGRCxNQUVPO0FBQ0wsV0FBT0gsSUFBSSxDQUFDRyxRQUFaO0FBQ0Q7O0FBRUQsTUFBSUMsUUFBUSxLQUFLQyxTQUFqQixFQUE0QjtBQUMxQkwsSUFBQUEsSUFBSSxDQUFDSSxRQUFMLEdBQWdCQSxRQUFoQjtBQUNELEdBRkQsTUFFTztBQUNMLFdBQU9KLElBQUksQ0FBQ0ksUUFBWjtBQUNEO0FBQ0Y7O0FBRU0sU0FBU0UsS0FBVCxDQUFlQyxJQUFmLEVBQXFCQyxNQUFyQixFQUE2QkMsSUFBN0IsRUFBbUM7QUFDeENGLEVBQUFBLElBQUksR0FBR0csU0FBUyxDQUFDSCxJQUFELEVBQU9FLElBQVAsQ0FBaEI7QUFDQUQsRUFBQUEsTUFBTSxHQUFHRSxTQUFTLENBQUNGLE1BQUQsRUFBU0MsSUFBVCxDQUFsQjtBQUVBLE1BQUlFLEdBQUcsR0FBRyxFQUFWLENBSndDLENBTXhDO0FBQ0E7QUFDQTs7QUFDQSxNQUFJSixJQUFJLENBQUNLLEtBQUwsSUFBY0osTUFBTSxDQUFDSSxLQUF6QixFQUFnQztBQUM5QkQsSUFBQUEsR0FBRyxDQUFDQyxLQUFKLEdBQVlMLElBQUksQ0FBQ0ssS0FBTCxJQUFjSixNQUFNLENBQUNJLEtBQWpDO0FBQ0Q7O0FBRUQsTUFBSUwsSUFBSSxDQUFDTSxXQUFMLElBQW9CTCxNQUFNLENBQUNLLFdBQS9CLEVBQTRDO0FBQzFDLFFBQUksQ0FBQ0MsZUFBZSxDQUFDUCxJQUFELENBQXBCLEVBQTRCO0FBQzFCO0FBQ0FJLE1BQUFBLEdBQUcsQ0FBQ0ksV0FBSixHQUFrQlAsTUFBTSxDQUFDTyxXQUFQLElBQXNCUixJQUFJLENBQUNRLFdBQTdDO0FBQ0FKLE1BQUFBLEdBQUcsQ0FBQ0UsV0FBSixHQUFrQkwsTUFBTSxDQUFDSyxXQUFQLElBQXNCTixJQUFJLENBQUNNLFdBQTdDO0FBQ0FGLE1BQUFBLEdBQUcsQ0FBQ0ssU0FBSixHQUFnQlIsTUFBTSxDQUFDUSxTQUFQLElBQW9CVCxJQUFJLENBQUNTLFNBQXpDO0FBQ0FMLE1BQUFBLEdBQUcsQ0FBQ00sU0FBSixHQUFnQlQsTUFBTSxDQUFDUyxTQUFQLElBQW9CVixJQUFJLENBQUNVLFNBQXpDO0FBQ0QsS0FORCxNQU1PLElBQUksQ0FBQ0gsZUFBZSxDQUFDTixNQUFELENBQXBCLEVBQThCO0FBQ25DO0FBQ0FHLE1BQUFBLEdBQUcsQ0FBQ0ksV0FBSixHQUFrQlIsSUFBSSxDQUFDUSxXQUF2QjtBQUNBSixNQUFBQSxHQUFHLENBQUNFLFdBQUosR0FBa0JOLElBQUksQ0FBQ00sV0FBdkI7QUFDQUYsTUFBQUEsR0FBRyxDQUFDSyxTQUFKLEdBQWdCVCxJQUFJLENBQUNTLFNBQXJCO0FBQ0FMLE1BQUFBLEdBQUcsQ0FBQ00sU0FBSixHQUFnQlYsSUFBSSxDQUFDVSxTQUFyQjtBQUNELEtBTk0sTUFNQTtBQUNMO0FBQ0FOLE1BQUFBLEdBQUcsQ0FBQ0ksV0FBSixHQUFrQkcsV0FBVyxDQUFDUCxHQUFELEVBQU1KLElBQUksQ0FBQ1EsV0FBWCxFQUF3QlAsTUFBTSxDQUFDTyxXQUEvQixDQUE3QjtBQUNBSixNQUFBQSxHQUFHLENBQUNFLFdBQUosR0FBa0JLLFdBQVcsQ0FBQ1AsR0FBRCxFQUFNSixJQUFJLENBQUNNLFdBQVgsRUFBd0JMLE1BQU0sQ0FBQ0ssV0FBL0IsQ0FBN0I7QUFDQUYsTUFBQUEsR0FBRyxDQUFDSyxTQUFKLEdBQWdCRSxXQUFXLENBQUNQLEdBQUQsRUFBTUosSUFBSSxDQUFDUyxTQUFYLEVBQXNCUixNQUFNLENBQUNRLFNBQTdCLENBQTNCO0FBQ0FMLE1BQUFBLEdBQUcsQ0FBQ00sU0FBSixHQUFnQkMsV0FBVyxDQUFDUCxHQUFELEVBQU1KLElBQUksQ0FBQ1UsU0FBWCxFQUFzQlQsTUFBTSxDQUFDUyxTQUE3QixDQUEzQjtBQUNEO0FBQ0Y7O0FBRUROLEVBQUFBLEdBQUcsQ0FBQ1EsS0FBSixHQUFZLEVBQVo7QUFFQSxNQUFJQyxTQUFTLEdBQUcsQ0FBaEI7QUFBQSxNQUNJQyxXQUFXLEdBQUcsQ0FEbEI7QUFBQSxNQUVJQyxVQUFVLEdBQUcsQ0FGakI7QUFBQSxNQUdJQyxZQUFZLEdBQUcsQ0FIbkI7O0FBS0EsU0FBT0gsU0FBUyxHQUFHYixJQUFJLENBQUNZLEtBQUwsQ0FBV0ssTUFBdkIsSUFBaUNILFdBQVcsR0FBR2IsTUFBTSxDQUFDVyxLQUFQLENBQWFLLE1BQW5FLEVBQTJFO0FBQ3pFLFFBQUlDLFdBQVcsR0FBR2xCLElBQUksQ0FBQ1ksS0FBTCxDQUFXQyxTQUFYLEtBQXlCO0FBQUNNLE1BQUFBLFFBQVEsRUFBRUM7QUFBWCxLQUEzQztBQUFBLFFBQ0lDLGFBQWEsR0FBR3BCLE1BQU0sQ0FBQ1csS0FBUCxDQUFhRSxXQUFiLEtBQTZCO0FBQUNLLE1BQUFBLFFBQVEsRUFBRUM7QUFBWCxLQURqRDs7QUFHQSxRQUFJRSxVQUFVLENBQUNKLFdBQUQsRUFBY0csYUFBZCxDQUFkLEVBQTRDO0FBQzFDO0FBQ0FqQixNQUFBQSxHQUFHLENBQUNRLEtBQUosQ0FBVVcsSUFBVixDQUFlQyxTQUFTLENBQUNOLFdBQUQsRUFBY0gsVUFBZCxDQUF4QjtBQUNBRixNQUFBQSxTQUFTO0FBQ1RHLE1BQUFBLFlBQVksSUFBSUUsV0FBVyxDQUFDckIsUUFBWixHQUF1QnFCLFdBQVcsQ0FBQ3RCLFFBQW5EO0FBQ0QsS0FMRCxNQUtPLElBQUkwQixVQUFVLENBQUNELGFBQUQsRUFBZ0JILFdBQWhCLENBQWQsRUFBNEM7QUFDakQ7QUFDQWQsTUFBQUEsR0FBRyxDQUFDUSxLQUFKLENBQVVXLElBQVYsQ0FBZUMsU0FBUyxDQUFDSCxhQUFELEVBQWdCTCxZQUFoQixDQUF4QjtBQUNBRixNQUFBQSxXQUFXO0FBQ1hDLE1BQUFBLFVBQVUsSUFBSU0sYUFBYSxDQUFDeEIsUUFBZCxHQUF5QndCLGFBQWEsQ0FBQ3pCLFFBQXJEO0FBQ0QsS0FMTSxNQUtBO0FBQ0w7QUFDQSxVQUFJNkIsVUFBVSxHQUFHO0FBQ2ZOLFFBQUFBLFFBQVEsRUFBRU8sSUFBSSxDQUFDQyxHQUFMLENBQVNULFdBQVcsQ0FBQ0MsUUFBckIsRUFBK0JFLGFBQWEsQ0FBQ0YsUUFBN0MsQ0FESztBQUVmdkIsUUFBQUEsUUFBUSxFQUFFLENBRks7QUFHZmdDLFFBQUFBLFFBQVEsRUFBRUYsSUFBSSxDQUFDQyxHQUFMLENBQVNULFdBQVcsQ0FBQ1UsUUFBWixHQUF1QmIsVUFBaEMsRUFBNENNLGFBQWEsQ0FBQ0YsUUFBZCxHQUF5QkgsWUFBckUsQ0FISztBQUlmbkIsUUFBQUEsUUFBUSxFQUFFLENBSks7QUFLZkYsUUFBQUEsS0FBSyxFQUFFO0FBTFEsT0FBakI7QUFPQWtDLE1BQUFBLFVBQVUsQ0FBQ0osVUFBRCxFQUFhUCxXQUFXLENBQUNDLFFBQXpCLEVBQW1DRCxXQUFXLENBQUN2QixLQUEvQyxFQUFzRDBCLGFBQWEsQ0FBQ0YsUUFBcEUsRUFBOEVFLGFBQWEsQ0FBQzFCLEtBQTVGLENBQVY7QUFDQW1CLE1BQUFBLFdBQVc7QUFDWEQsTUFBQUEsU0FBUztBQUVUVCxNQUFBQSxHQUFHLENBQUNRLEtBQUosQ0FBVVcsSUFBVixDQUFlRSxVQUFmO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPckIsR0FBUDtBQUNEOztBQUVELFNBQVNELFNBQVQsQ0FBbUIyQixLQUFuQixFQUEwQjVCLElBQTFCLEVBQWdDO0FBQzlCLE1BQUksT0FBTzRCLEtBQVAsS0FBaUIsUUFBckIsRUFBK0I7QUFDN0IsUUFBSyxNQUFELENBQVNDLElBQVQsQ0FBY0QsS0FBZCxLQUEwQixVQUFELENBQWFDLElBQWIsQ0FBa0JELEtBQWxCLENBQTdCLEVBQXdEO0FBQ3RELGFBQU87QUFBQTtBQUFBO0FBQUE7O0FBQUFFO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxTQUFXRixLQUFYLEVBQWtCLENBQWxCO0FBQVA7QUFDRDs7QUFFRCxRQUFJLENBQUM1QixJQUFMLEVBQVc7QUFDVCxZQUFNLElBQUkrQixLQUFKLENBQVUsa0RBQVYsQ0FBTjtBQUNEOztBQUNELFdBQU87QUFBQTtBQUFBO0FBQUE7O0FBQUFDO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxPQUFnQnBDLFNBQWhCLEVBQTJCQSxTQUEzQixFQUFzQ0ksSUFBdEMsRUFBNEM0QixLQUE1QztBQUFQO0FBQ0Q7O0FBRUQsU0FBT0EsS0FBUDtBQUNEOztBQUVELFNBQVN2QixlQUFULENBQXlCNEIsS0FBekIsRUFBZ0M7QUFDOUIsU0FBT0EsS0FBSyxDQUFDN0IsV0FBTixJQUFxQjZCLEtBQUssQ0FBQzdCLFdBQU4sS0FBc0I2QixLQUFLLENBQUMzQixXQUF4RDtBQUNEOztBQUVELFNBQVNHLFdBQVQsQ0FBcUJOLEtBQXJCLEVBQTRCTCxJQUE1QixFQUFrQ0MsTUFBbEMsRUFBMEM7QUFDeEMsTUFBSUQsSUFBSSxLQUFLQyxNQUFiLEVBQXFCO0FBQ25CLFdBQU9ELElBQVA7QUFDRCxHQUZELE1BRU87QUFDTEssSUFBQUEsS0FBSyxDQUFDK0IsUUFBTixHQUFpQixJQUFqQjtBQUNBLFdBQU87QUFBQ3BDLE1BQUFBLElBQUksRUFBSkEsSUFBRDtBQUFPQyxNQUFBQSxNQUFNLEVBQU5BO0FBQVAsS0FBUDtBQUNEO0FBQ0Y7O0FBRUQsU0FBU3FCLFVBQVQsQ0FBb0JTLElBQXBCLEVBQTBCTSxLQUExQixFQUFpQztBQUMvQixTQUFPTixJQUFJLENBQUNaLFFBQUwsR0FBZ0JrQixLQUFLLENBQUNsQixRQUF0QixJQUNEWSxJQUFJLENBQUNaLFFBQUwsR0FBZ0JZLElBQUksQ0FBQ25DLFFBQXRCLEdBQWtDeUMsS0FBSyxDQUFDbEIsUUFEN0M7QUFFRDs7QUFFRCxTQUFTSyxTQUFULENBQW1CL0IsSUFBbkIsRUFBeUI2QyxNQUF6QixFQUFpQztBQUMvQixTQUFPO0FBQ0xuQixJQUFBQSxRQUFRLEVBQUUxQixJQUFJLENBQUMwQixRQURWO0FBQ29CdkIsSUFBQUEsUUFBUSxFQUFFSCxJQUFJLENBQUNHLFFBRG5DO0FBRUxnQyxJQUFBQSxRQUFRLEVBQUVuQyxJQUFJLENBQUNtQyxRQUFMLEdBQWdCVSxNQUZyQjtBQUU2QnpDLElBQUFBLFFBQVEsRUFBRUosSUFBSSxDQUFDSSxRQUY1QztBQUdMRixJQUFBQSxLQUFLLEVBQUVGLElBQUksQ0FBQ0U7QUFIUCxHQUFQO0FBS0Q7O0FBRUQsU0FBU2tDLFVBQVQsQ0FBb0JwQyxJQUFwQixFQUEwQnNCLFVBQTFCLEVBQXNDd0IsU0FBdEMsRUFBaURDLFdBQWpELEVBQThEQyxVQUE5RCxFQUEwRTtBQUN4RTtBQUNBO0FBQ0EsTUFBSXpDLElBQUksR0FBRztBQUFDc0MsSUFBQUEsTUFBTSxFQUFFdkIsVUFBVDtBQUFxQnBCLElBQUFBLEtBQUssRUFBRTRDLFNBQTVCO0FBQXVDbEMsSUFBQUEsS0FBSyxFQUFFO0FBQTlDLEdBQVg7QUFBQSxNQUNJcUMsS0FBSyxHQUFHO0FBQUNKLElBQUFBLE1BQU0sRUFBRUUsV0FBVDtBQUFzQjdDLElBQUFBLEtBQUssRUFBRThDLFVBQTdCO0FBQXlDcEMsSUFBQUEsS0FBSyxFQUFFO0FBQWhELEdBRFosQ0FId0UsQ0FNeEU7O0FBQ0FzQyxFQUFBQSxhQUFhLENBQUNsRCxJQUFELEVBQU9PLElBQVAsRUFBYTBDLEtBQWIsQ0FBYjtBQUNBQyxFQUFBQSxhQUFhLENBQUNsRCxJQUFELEVBQU9pRCxLQUFQLEVBQWMxQyxJQUFkLENBQWIsQ0FSd0UsQ0FVeEU7O0FBQ0EsU0FBT0EsSUFBSSxDQUFDSyxLQUFMLEdBQWFMLElBQUksQ0FBQ0wsS0FBTCxDQUFXc0IsTUFBeEIsSUFBa0N5QixLQUFLLENBQUNyQyxLQUFOLEdBQWNxQyxLQUFLLENBQUMvQyxLQUFOLENBQVlzQixNQUFuRSxFQUEyRTtBQUN6RSxRQUFJQyxXQUFXLEdBQUdsQixJQUFJLENBQUNMLEtBQUwsQ0FBV0ssSUFBSSxDQUFDSyxLQUFoQixDQUFsQjtBQUFBLFFBQ0l1QyxZQUFZLEdBQUdGLEtBQUssQ0FBQy9DLEtBQU4sQ0FBWStDLEtBQUssQ0FBQ3JDLEtBQWxCLENBRG5COztBQUdBLFFBQUksQ0FBQ2EsV0FBVyxDQUFDLENBQUQsQ0FBWCxLQUFtQixHQUFuQixJQUEwQkEsV0FBVyxDQUFDLENBQUQsQ0FBWCxLQUFtQixHQUE5QyxNQUNJMEIsWUFBWSxDQUFDLENBQUQsQ0FBWixLQUFvQixHQUFwQixJQUEyQkEsWUFBWSxDQUFDLENBQUQsQ0FBWixLQUFvQixHQURuRCxDQUFKLEVBQzZEO0FBQzNEO0FBQ0FDLE1BQUFBLFlBQVksQ0FBQ3BELElBQUQsRUFBT08sSUFBUCxFQUFhMEMsS0FBYixDQUFaO0FBQ0QsS0FKRCxNQUlPLElBQUl4QixXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQW5CLElBQTBCMEIsWUFBWSxDQUFDLENBQUQsQ0FBWixLQUFvQixHQUFsRCxFQUF1RDtBQUFBO0FBQUE7O0FBQUE7QUFDNUQ7O0FBQ0E7O0FBQUE7O0FBQUE7QUFBQTtBQUFBO0FBQUFuRCxNQUFBQSxJQUFJLENBQUNFLEtBQUwsRUFBVzRCLElBQVg7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFvQnVCLE1BQUFBLGFBQWEsQ0FBQzlDLElBQUQsQ0FBakM7QUFDRCxLQUhNLE1BR0EsSUFBSTRDLFlBQVksQ0FBQyxDQUFELENBQVosS0FBb0IsR0FBcEIsSUFBMkIxQixXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQWxELEVBQXVEO0FBQUE7QUFBQTs7QUFBQTtBQUM1RDs7QUFDQTs7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQXpCLE1BQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQW9CdUIsTUFBQUEsYUFBYSxDQUFDSixLQUFELENBQWpDO0FBQ0QsS0FITSxNQUdBLElBQUl4QixXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQW5CLElBQTBCMEIsWUFBWSxDQUFDLENBQUQsQ0FBWixLQUFvQixHQUFsRCxFQUF1RDtBQUM1RDtBQUNBRyxNQUFBQSxPQUFPLENBQUN0RCxJQUFELEVBQU9PLElBQVAsRUFBYTBDLEtBQWIsQ0FBUDtBQUNELEtBSE0sTUFHQSxJQUFJRSxZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBQXBCLElBQTJCMUIsV0FBVyxDQUFDLENBQUQsQ0FBWCxLQUFtQixHQUFsRCxFQUF1RDtBQUM1RDtBQUNBNkIsTUFBQUEsT0FBTyxDQUFDdEQsSUFBRCxFQUFPaUQsS0FBUCxFQUFjMUMsSUFBZCxFQUFvQixJQUFwQixDQUFQO0FBQ0QsS0FITSxNQUdBLElBQUlrQixXQUFXLEtBQUswQixZQUFwQixFQUFrQztBQUN2QztBQUNBbkQsTUFBQUEsSUFBSSxDQUFDRSxLQUFMLENBQVc0QixJQUFYLENBQWdCTCxXQUFoQjtBQUNBbEIsTUFBQUEsSUFBSSxDQUFDSyxLQUFMO0FBQ0FxQyxNQUFBQSxLQUFLLENBQUNyQyxLQUFOO0FBQ0QsS0FMTSxNQUtBO0FBQ0w7QUFDQStCLE1BQUFBLFFBQVEsQ0FBQzNDLElBQUQsRUFBT3FELGFBQWEsQ0FBQzlDLElBQUQsQ0FBcEIsRUFBNEI4QyxhQUFhLENBQUNKLEtBQUQsQ0FBekMsQ0FBUjtBQUNEO0FBQ0YsR0F4Q3VFLENBMEN4RTs7O0FBQ0FNLEVBQUFBLGNBQWMsQ0FBQ3ZELElBQUQsRUFBT08sSUFBUCxDQUFkO0FBQ0FnRCxFQUFBQSxjQUFjLENBQUN2RCxJQUFELEVBQU9pRCxLQUFQLENBQWQ7QUFFQWxELEVBQUFBLGFBQWEsQ0FBQ0MsSUFBRCxDQUFiO0FBQ0Q7O0FBRUQsU0FBU29ELFlBQVQsQ0FBc0JwRCxJQUF0QixFQUE0Qk8sSUFBNUIsRUFBa0MwQyxLQUFsQyxFQUF5QztBQUN2QyxNQUFJTyxTQUFTLEdBQUdILGFBQWEsQ0FBQzlDLElBQUQsQ0FBN0I7QUFBQSxNQUNJa0QsWUFBWSxHQUFHSixhQUFhLENBQUNKLEtBQUQsQ0FEaEM7O0FBR0EsTUFBSVMsVUFBVSxDQUFDRixTQUFELENBQVYsSUFBeUJFLFVBQVUsQ0FBQ0QsWUFBRCxDQUF2QyxFQUF1RDtBQUNyRDtBQUNBO0FBQUk7QUFBQTtBQUFBOztBQUFBRTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsS0FBZ0JILFNBQWhCLEVBQTJCQyxZQUEzQixLQUNHRyxrQkFBa0IsQ0FBQ1gsS0FBRCxFQUFRTyxTQUFSLEVBQW1CQSxTQUFTLENBQUNoQyxNQUFWLEdBQW1CaUMsWUFBWSxDQUFDakMsTUFBbkQsQ0FEekIsRUFDcUY7QUFBQTtBQUFBOztBQUFBOztBQUNuRjs7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQXhCLE1BQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQW9CMEIsTUFBQUEsU0FBcEI7O0FBQ0E7QUFDRCxLQUpELE1BSU87QUFBSTtBQUFBO0FBQUE7O0FBQUFHO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxLQUFnQkYsWUFBaEIsRUFBOEJELFNBQTlCLEtBQ0pJLGtCQUFrQixDQUFDckQsSUFBRCxFQUFPa0QsWUFBUCxFQUFxQkEsWUFBWSxDQUFDakMsTUFBYixHQUFzQmdDLFNBQVMsQ0FBQ2hDLE1BQXJELENBRGxCLEVBQ2dGO0FBQUE7QUFBQTs7QUFBQTs7QUFDckY7O0FBQUE7O0FBQUE7QUFBQTtBQUFBO0FBQUF4QixNQUFBQSxJQUFJLENBQUNFLEtBQUwsRUFBVzRCLElBQVg7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFvQjJCLE1BQUFBLFlBQXBCOztBQUNBO0FBQ0Q7QUFDRixHQVhELE1BV087QUFBSTtBQUFBO0FBQUE7O0FBQUFJO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxHQUFXTCxTQUFYLEVBQXNCQyxZQUF0QixDQUFKLEVBQXlDO0FBQUE7QUFBQTs7QUFBQTs7QUFDOUM7O0FBQUE7O0FBQUE7QUFBQTtBQUFBO0FBQUF6RCxJQUFBQSxJQUFJLENBQUNFLEtBQUwsRUFBVzRCLElBQVg7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFvQjBCLElBQUFBLFNBQXBCOztBQUNBO0FBQ0Q7O0FBRURiLEVBQUFBLFFBQVEsQ0FBQzNDLElBQUQsRUFBT3dELFNBQVAsRUFBa0JDLFlBQWxCLENBQVI7QUFDRDs7QUFFRCxTQUFTSCxPQUFULENBQWlCdEQsSUFBakIsRUFBdUJPLElBQXZCLEVBQTZCMEMsS0FBN0IsRUFBb0NhLElBQXBDLEVBQTBDO0FBQ3hDLE1BQUlOLFNBQVMsR0FBR0gsYUFBYSxDQUFDOUMsSUFBRCxDQUE3QjtBQUFBLE1BQ0lrRCxZQUFZLEdBQUdNLGNBQWMsQ0FBQ2QsS0FBRCxFQUFRTyxTQUFSLENBRGpDOztBQUVBLE1BQUlDLFlBQVksQ0FBQ08sTUFBakIsRUFBeUI7QUFBQTtBQUFBOztBQUFBOztBQUN2Qjs7QUFBQTs7QUFBQTtBQUFBO0FBQUE7QUFBQWhFLElBQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQW9CMkIsSUFBQUEsWUFBWSxDQUFDTyxNQUFqQztBQUNELEdBRkQsTUFFTztBQUNMckIsSUFBQUEsUUFBUSxDQUFDM0MsSUFBRCxFQUFPOEQsSUFBSSxHQUFHTCxZQUFILEdBQWtCRCxTQUE3QixFQUF3Q00sSUFBSSxHQUFHTixTQUFILEdBQWVDLFlBQTNELENBQVI7QUFDRDtBQUNGOztBQUVELFNBQVNkLFFBQVQsQ0FBa0IzQyxJQUFsQixFQUF3Qk8sSUFBeEIsRUFBOEIwQyxLQUE5QixFQUFxQztBQUNuQ2pELEVBQUFBLElBQUksQ0FBQzJDLFFBQUwsR0FBZ0IsSUFBaEI7QUFDQTNDLEVBQUFBLElBQUksQ0FBQ0UsS0FBTCxDQUFXNEIsSUFBWCxDQUFnQjtBQUNkYSxJQUFBQSxRQUFRLEVBQUUsSUFESTtBQUVkcEMsSUFBQUEsSUFBSSxFQUFFQSxJQUZRO0FBR2RDLElBQUFBLE1BQU0sRUFBRXlDO0FBSE0sR0FBaEI7QUFLRDs7QUFFRCxTQUFTQyxhQUFULENBQXVCbEQsSUFBdkIsRUFBNkJpRSxNQUE3QixFQUFxQ2hCLEtBQXJDLEVBQTRDO0FBQzFDLFNBQU9nQixNQUFNLENBQUNwQixNQUFQLEdBQWdCSSxLQUFLLENBQUNKLE1BQXRCLElBQWdDb0IsTUFBTSxDQUFDckQsS0FBUCxHQUFlcUQsTUFBTSxDQUFDL0QsS0FBUCxDQUFhc0IsTUFBbkUsRUFBMkU7QUFDekUsUUFBSTBDLElBQUksR0FBR0QsTUFBTSxDQUFDL0QsS0FBUCxDQUFhK0QsTUFBTSxDQUFDckQsS0FBUCxFQUFiLENBQVg7QUFDQVosSUFBQUEsSUFBSSxDQUFDRSxLQUFMLENBQVc0QixJQUFYLENBQWdCb0MsSUFBaEI7QUFDQUQsSUFBQUEsTUFBTSxDQUFDcEIsTUFBUDtBQUNEO0FBQ0Y7O0FBQ0QsU0FBU1UsY0FBVCxDQUF3QnZELElBQXhCLEVBQThCaUUsTUFBOUIsRUFBc0M7QUFDcEMsU0FBT0EsTUFBTSxDQUFDckQsS0FBUCxHQUFlcUQsTUFBTSxDQUFDL0QsS0FBUCxDQUFhc0IsTUFBbkMsRUFBMkM7QUFDekMsUUFBSTBDLElBQUksR0FBR0QsTUFBTSxDQUFDL0QsS0FBUCxDQUFhK0QsTUFBTSxDQUFDckQsS0FBUCxFQUFiLENBQVg7QUFDQVosSUFBQUEsSUFBSSxDQUFDRSxLQUFMLENBQVc0QixJQUFYLENBQWdCb0MsSUFBaEI7QUFDRDtBQUNGOztBQUVELFNBQVNiLGFBQVQsQ0FBdUJjLEtBQXZCLEVBQThCO0FBQzVCLE1BQUl4RCxHQUFHLEdBQUcsRUFBVjtBQUFBLE1BQ0l5RCxTQUFTLEdBQUdELEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWWlFLEtBQUssQ0FBQ3ZELEtBQWxCLEVBQXlCLENBQXpCLENBRGhCOztBQUVBLFNBQU91RCxLQUFLLENBQUN2RCxLQUFOLEdBQWN1RCxLQUFLLENBQUNqRSxLQUFOLENBQVlzQixNQUFqQyxFQUF5QztBQUN2QyxRQUFJMEMsSUFBSSxHQUFHQyxLQUFLLENBQUNqRSxLQUFOLENBQVlpRSxLQUFLLENBQUN2RCxLQUFsQixDQUFYLENBRHVDLENBR3ZDOztBQUNBLFFBQUl3RCxTQUFTLEtBQUssR0FBZCxJQUFxQkYsSUFBSSxDQUFDLENBQUQsQ0FBSixLQUFZLEdBQXJDLEVBQTBDO0FBQ3hDRSxNQUFBQSxTQUFTLEdBQUcsR0FBWjtBQUNEOztBQUVELFFBQUlBLFNBQVMsS0FBS0YsSUFBSSxDQUFDLENBQUQsQ0FBdEIsRUFBMkI7QUFDekJ2RCxNQUFBQSxHQUFHLENBQUNtQixJQUFKLENBQVNvQyxJQUFUO0FBQ0FDLE1BQUFBLEtBQUssQ0FBQ3ZELEtBQU47QUFDRCxLQUhELE1BR087QUFDTDtBQUNEO0FBQ0Y7O0FBRUQsU0FBT0QsR0FBUDtBQUNEOztBQUNELFNBQVNvRCxjQUFULENBQXdCSSxLQUF4QixFQUErQkUsWUFBL0IsRUFBNkM7QUFDM0MsTUFBSUMsT0FBTyxHQUFHLEVBQWQ7QUFBQSxNQUNJTixNQUFNLEdBQUcsRUFEYjtBQUFBLE1BRUlPLFVBQVUsR0FBRyxDQUZqQjtBQUFBLE1BR0lDLGNBQWMsR0FBRyxLQUhyQjtBQUFBLE1BSUlDLFVBQVUsR0FBRyxLQUpqQjs7QUFLQSxTQUFPRixVQUFVLEdBQUdGLFlBQVksQ0FBQzdDLE1BQTFCLElBQ0UyQyxLQUFLLENBQUN2RCxLQUFOLEdBQWN1RCxLQUFLLENBQUNqRSxLQUFOLENBQVlzQixNQURuQyxFQUMyQztBQUN6QyxRQUFJa0QsTUFBTSxHQUFHUCxLQUFLLENBQUNqRSxLQUFOLENBQVlpRSxLQUFLLENBQUN2RCxLQUFsQixDQUFiO0FBQUEsUUFDSStELEtBQUssR0FBR04sWUFBWSxDQUFDRSxVQUFELENBRHhCLENBRHlDLENBSXpDOztBQUNBLFFBQUlJLEtBQUssQ0FBQyxDQUFELENBQUwsS0FBYSxHQUFqQixFQUFzQjtBQUNwQjtBQUNEOztBQUVESCxJQUFBQSxjQUFjLEdBQUdBLGNBQWMsSUFBSUUsTUFBTSxDQUFDLENBQUQsQ0FBTixLQUFjLEdBQWpEO0FBRUFWLElBQUFBLE1BQU0sQ0FBQ2xDLElBQVAsQ0FBWTZDLEtBQVo7QUFDQUosSUFBQUEsVUFBVSxHQVorQixDQWN6QztBQUNBOztBQUNBLFFBQUlHLE1BQU0sQ0FBQyxDQUFELENBQU4sS0FBYyxHQUFsQixFQUF1QjtBQUNyQkQsTUFBQUEsVUFBVSxHQUFHLElBQWI7O0FBRUEsYUFBT0MsTUFBTSxDQUFDLENBQUQsQ0FBTixLQUFjLEdBQXJCLEVBQTBCO0FBQ3hCSixRQUFBQSxPQUFPLENBQUN4QyxJQUFSLENBQWE0QyxNQUFiO0FBQ0FBLFFBQUFBLE1BQU0sR0FBR1AsS0FBSyxDQUFDakUsS0FBTixDQUFZLEVBQUVpRSxLQUFLLENBQUN2RCxLQUFwQixDQUFUO0FBQ0Q7QUFDRjs7QUFFRCxRQUFJK0QsS0FBSyxDQUFDQyxNQUFOLENBQWEsQ0FBYixNQUFvQkYsTUFBTSxDQUFDRSxNQUFQLENBQWMsQ0FBZCxDQUF4QixFQUEwQztBQUN4Q04sTUFBQUEsT0FBTyxDQUFDeEMsSUFBUixDQUFhNEMsTUFBYjtBQUNBUCxNQUFBQSxLQUFLLENBQUN2RCxLQUFOO0FBQ0QsS0FIRCxNQUdPO0FBQ0w2RCxNQUFBQSxVQUFVLEdBQUcsSUFBYjtBQUNEO0FBQ0Y7O0FBRUQsTUFBSSxDQUFDSixZQUFZLENBQUNFLFVBQUQsQ0FBWixJQUE0QixFQUE3QixFQUFpQyxDQUFqQyxNQUF3QyxHQUF4QyxJQUNHQyxjQURQLEVBQ3VCO0FBQ3JCQyxJQUFBQSxVQUFVLEdBQUcsSUFBYjtBQUNEOztBQUVELE1BQUlBLFVBQUosRUFBZ0I7QUFDZCxXQUFPSCxPQUFQO0FBQ0Q7O0FBRUQsU0FBT0MsVUFBVSxHQUFHRixZQUFZLENBQUM3QyxNQUFqQyxFQUF5QztBQUN2Q3dDLElBQUFBLE1BQU0sQ0FBQ2xDLElBQVAsQ0FBWXVDLFlBQVksQ0FBQ0UsVUFBVSxFQUFYLENBQXhCO0FBQ0Q7O0FBRUQsU0FBTztBQUNMUCxJQUFBQSxNQUFNLEVBQU5BLE1BREs7QUFFTE0sSUFBQUEsT0FBTyxFQUFQQTtBQUZLLEdBQVA7QUFJRDs7QUFFRCxTQUFTWixVQUFULENBQW9CWSxPQUFwQixFQUE2QjtBQUMzQixTQUFPQSxPQUFPLENBQUNPLE1BQVIsQ0FBZSxVQUFTQyxJQUFULEVBQWVKLE1BQWYsRUFBdUI7QUFDM0MsV0FBT0ksSUFBSSxJQUFJSixNQUFNLENBQUMsQ0FBRCxDQUFOLEtBQWMsR0FBN0I7QUFDRCxHQUZNLEVBRUosSUFGSSxDQUFQO0FBR0Q7O0FBQ0QsU0FBU2Qsa0JBQVQsQ0FBNEJPLEtBQTVCLEVBQW1DWSxhQUFuQyxFQUFrREMsS0FBbEQsRUFBeUQ7QUFDdkQsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHRCxLQUFwQixFQUEyQkMsQ0FBQyxFQUE1QixFQUFnQztBQUM5QixRQUFJQyxhQUFhLEdBQUdILGFBQWEsQ0FBQ0EsYUFBYSxDQUFDdkQsTUFBZCxHQUF1QndELEtBQXZCLEdBQStCQyxDQUFoQyxDQUFiLENBQWdETCxNQUFoRCxDQUF1RCxDQUF2RCxDQUFwQjs7QUFDQSxRQUFJVCxLQUFLLENBQUNqRSxLQUFOLENBQVlpRSxLQUFLLENBQUN2RCxLQUFOLEdBQWNxRSxDQUExQixNQUFpQyxNQUFNQyxhQUEzQyxFQUEwRDtBQUN4RCxhQUFPLEtBQVA7QUFDRDtBQUNGOztBQUVEZixFQUFBQSxLQUFLLENBQUN2RCxLQUFOLElBQWVvRSxLQUFmO0FBQ0EsU0FBTyxJQUFQO0FBQ0Q7O0FBRUQsU0FBUy9FLG1CQUFULENBQTZCQyxLQUE3QixFQUFvQztBQUNsQyxNQUFJQyxRQUFRLEdBQUcsQ0FBZjtBQUNBLE1BQUlDLFFBQVEsR0FBRyxDQUFmO0FBRUFGLEVBQUFBLEtBQUssQ0FBQ2lGLE9BQU4sQ0FBYyxVQUFTakIsSUFBVCxFQUFlO0FBQzNCLFFBQUksT0FBT0EsSUFBUCxLQUFnQixRQUFwQixFQUE4QjtBQUM1QixVQUFJa0IsT0FBTyxHQUFHbkYsbUJBQW1CLENBQUNpRSxJQUFJLENBQUMzRCxJQUFOLENBQWpDO0FBQ0EsVUFBSThFLFVBQVUsR0FBR3BGLG1CQUFtQixDQUFDaUUsSUFBSSxDQUFDMUQsTUFBTixDQUFwQzs7QUFFQSxVQUFJTCxRQUFRLEtBQUtFLFNBQWpCLEVBQTRCO0FBQzFCLFlBQUkrRSxPQUFPLENBQUNqRixRQUFSLEtBQXFCa0YsVUFBVSxDQUFDbEYsUUFBcEMsRUFBOEM7QUFDNUNBLFVBQUFBLFFBQVEsSUFBSWlGLE9BQU8sQ0FBQ2pGLFFBQXBCO0FBQ0QsU0FGRCxNQUVPO0FBQ0xBLFVBQUFBLFFBQVEsR0FBR0UsU0FBWDtBQUNEO0FBQ0Y7O0FBRUQsVUFBSUQsUUFBUSxLQUFLQyxTQUFqQixFQUE0QjtBQUMxQixZQUFJK0UsT0FBTyxDQUFDaEYsUUFBUixLQUFxQmlGLFVBQVUsQ0FBQ2pGLFFBQXBDLEVBQThDO0FBQzVDQSxVQUFBQSxRQUFRLElBQUlnRixPQUFPLENBQUNoRixRQUFwQjtBQUNELFNBRkQsTUFFTztBQUNMQSxVQUFBQSxRQUFRLEdBQUdDLFNBQVg7QUFDRDtBQUNGO0FBQ0YsS0FuQkQsTUFtQk87QUFDTCxVQUFJRCxRQUFRLEtBQUtDLFNBQWIsS0FBMkI2RCxJQUFJLENBQUMsQ0FBRCxDQUFKLEtBQVksR0FBWixJQUFtQkEsSUFBSSxDQUFDLENBQUQsQ0FBSixLQUFZLEdBQTFELENBQUosRUFBb0U7QUFDbEU5RCxRQUFBQSxRQUFRO0FBQ1Q7O0FBQ0QsVUFBSUQsUUFBUSxLQUFLRSxTQUFiLEtBQTJCNkQsSUFBSSxDQUFDLENBQUQsQ0FBSixLQUFZLEdBQVosSUFBbUJBLElBQUksQ0FBQyxDQUFELENBQUosS0FBWSxHQUExRCxDQUFKLEVBQW9FO0FBQ2xFL0QsUUFBQUEsUUFBUTtBQUNUO0FBQ0Y7QUFDRixHQTVCRDtBQThCQSxTQUFPO0FBQUNBLElBQUFBLFFBQVEsRUFBUkEsUUFBRDtBQUFXQyxJQUFBQSxRQUFRLEVBQVJBO0FBQVgsR0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtzdHJ1Y3R1cmVkUGF0Y2h9IGZyb20gJy4vY3JlYXRlJztcbmltcG9ydCB7cGFyc2VQYXRjaH0gZnJvbSAnLi9wYXJzZSc7XG5cbmltcG9ydCB7YXJyYXlFcXVhbCwgYXJyYXlTdGFydHNXaXRofSBmcm9tICcuLi91dGlsL2FycmF5JztcblxuZXhwb3J0IGZ1bmN0aW9uIGNhbGNMaW5lQ291bnQoaHVuaykge1xuICBjb25zdCB7b2xkTGluZXMsIG5ld0xpbmVzfSA9IGNhbGNPbGROZXdMaW5lQ291bnQoaHVuay5saW5lcyk7XG5cbiAgaWYgKG9sZExpbmVzICE9PSB1bmRlZmluZWQpIHtcbiAgICBodW5rLm9sZExpbmVzID0gb2xkTGluZXM7XG4gIH0gZWxzZSB7XG4gICAgZGVsZXRlIGh1bmsub2xkTGluZXM7XG4gIH1cblxuICBpZiAobmV3TGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgIGh1bmsubmV3TGluZXMgPSBuZXdMaW5lcztcbiAgfSBlbHNlIHtcbiAgICBkZWxldGUgaHVuay5uZXdMaW5lcztcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gbWVyZ2UobWluZSwgdGhlaXJzLCBiYXNlKSB7XG4gIG1pbmUgPSBsb2FkUGF0Y2gobWluZSwgYmFzZSk7XG4gIHRoZWlycyA9IGxvYWRQYXRjaCh0aGVpcnMsIGJhc2UpO1xuXG4gIGxldCByZXQgPSB7fTtcblxuICAvLyBGb3IgaW5kZXggd2UganVzdCBsZXQgaXQgcGFzcyB0aHJvdWdoIGFzIGl0IGRvZXNuJ3QgaGF2ZSBhbnkgbmVjZXNzYXJ5IG1lYW5pbmcuXG4gIC8vIExlYXZpbmcgc2FuaXR5IGNoZWNrcyBvbiB0aGlzIHRvIHRoZSBBUEkgY29uc3VtZXIgdGhhdCBtYXkga25vdyBtb3JlIGFib3V0IHRoZVxuICAvLyBtZWFuaW5nIGluIHRoZWlyIG93biBjb250ZXh0LlxuICBpZiAobWluZS5pbmRleCB8fCB0aGVpcnMuaW5kZXgpIHtcbiAgICByZXQuaW5kZXggPSBtaW5lLmluZGV4IHx8IHRoZWlycy5pbmRleDtcbiAgfVxuXG4gIGlmIChtaW5lLm5ld0ZpbGVOYW1lIHx8IHRoZWlycy5uZXdGaWxlTmFtZSkge1xuICAgIGlmICghZmlsZU5hbWVDaGFuZ2VkKG1pbmUpKSB7XG4gICAgICAvLyBObyBoZWFkZXIgb3Igbm8gY2hhbmdlIGluIG91cnMsIHVzZSB0aGVpcnMgKGFuZCBvdXJzIGlmIHRoZWlycyBkb2VzIG5vdCBleGlzdClcbiAgICAgIHJldC5vbGRGaWxlTmFtZSA9IHRoZWlycy5vbGRGaWxlTmFtZSB8fCBtaW5lLm9sZEZpbGVOYW1lO1xuICAgICAgcmV0Lm5ld0ZpbGVOYW1lID0gdGhlaXJzLm5ld0ZpbGVOYW1lIHx8IG1pbmUubmV3RmlsZU5hbWU7XG4gICAgICByZXQub2xkSGVhZGVyID0gdGhlaXJzLm9sZEhlYWRlciB8fCBtaW5lLm9sZEhlYWRlcjtcbiAgICAgIHJldC5uZXdIZWFkZXIgPSB0aGVpcnMubmV3SGVhZGVyIHx8IG1pbmUubmV3SGVhZGVyO1xuICAgIH0gZWxzZSBpZiAoIWZpbGVOYW1lQ2hhbmdlZCh0aGVpcnMpKSB7XG4gICAgICAvLyBObyBoZWFkZXIgb3Igbm8gY2hhbmdlIGluIHRoZWlycywgdXNlIG91cnNcbiAgICAgIHJldC5vbGRGaWxlTmFtZSA9IG1pbmUub2xkRmlsZU5hbWU7XG4gICAgICByZXQubmV3RmlsZU5hbWUgPSBtaW5lLm5ld0ZpbGVOYW1lO1xuICAgICAgcmV0Lm9sZEhlYWRlciA9IG1pbmUub2xkSGVhZGVyO1xuICAgICAgcmV0Lm5ld0hlYWRlciA9IG1pbmUubmV3SGVhZGVyO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBCb3RoIGNoYW5nZWQuLi4gZmlndXJlIGl0IG91dFxuICAgICAgcmV0Lm9sZEZpbGVOYW1lID0gc2VsZWN0RmllbGQocmV0LCBtaW5lLm9sZEZpbGVOYW1lLCB0aGVpcnMub2xkRmlsZU5hbWUpO1xuICAgICAgcmV0Lm5ld0ZpbGVOYW1lID0gc2VsZWN0RmllbGQocmV0LCBtaW5lLm5ld0ZpbGVOYW1lLCB0aGVpcnMubmV3RmlsZU5hbWUpO1xuICAgICAgcmV0Lm9sZEhlYWRlciA9IHNlbGVjdEZpZWxkKHJldCwgbWluZS5vbGRIZWFkZXIsIHRoZWlycy5vbGRIZWFkZXIpO1xuICAgICAgcmV0Lm5ld0hlYWRlciA9IHNlbGVjdEZpZWxkKHJldCwgbWluZS5uZXdIZWFkZXIsIHRoZWlycy5uZXdIZWFkZXIpO1xuICAgIH1cbiAgfVxuXG4gIHJldC5odW5rcyA9IFtdO1xuXG4gIGxldCBtaW5lSW5kZXggPSAwLFxuICAgICAgdGhlaXJzSW5kZXggPSAwLFxuICAgICAgbWluZU9mZnNldCA9IDAsXG4gICAgICB0aGVpcnNPZmZzZXQgPSAwO1xuXG4gIHdoaWxlIChtaW5lSW5kZXggPCBtaW5lLmh1bmtzLmxlbmd0aCB8fCB0aGVpcnNJbmRleCA8IHRoZWlycy5odW5rcy5sZW5ndGgpIHtcbiAgICBsZXQgbWluZUN1cnJlbnQgPSBtaW5lLmh1bmtzW21pbmVJbmRleF0gfHwge29sZFN0YXJ0OiBJbmZpbml0eX0sXG4gICAgICAgIHRoZWlyc0N1cnJlbnQgPSB0aGVpcnMuaHVua3NbdGhlaXJzSW5kZXhdIHx8IHtvbGRTdGFydDogSW5maW5pdHl9O1xuXG4gICAgaWYgKGh1bmtCZWZvcmUobWluZUN1cnJlbnQsIHRoZWlyc0N1cnJlbnQpKSB7XG4gICAgICAvLyBUaGlzIHBhdGNoIGRvZXMgbm90IG92ZXJsYXAgd2l0aCBhbnkgb2YgdGhlIG90aGVycywgeWF5LlxuICAgICAgcmV0Lmh1bmtzLnB1c2goY2xvbmVIdW5rKG1pbmVDdXJyZW50LCBtaW5lT2Zmc2V0KSk7XG4gICAgICBtaW5lSW5kZXgrKztcbiAgICAgIHRoZWlyc09mZnNldCArPSBtaW5lQ3VycmVudC5uZXdMaW5lcyAtIG1pbmVDdXJyZW50Lm9sZExpbmVzO1xuICAgIH0gZWxzZSBpZiAoaHVua0JlZm9yZSh0aGVpcnNDdXJyZW50LCBtaW5lQ3VycmVudCkpIHtcbiAgICAgIC8vIFRoaXMgcGF0Y2ggZG9lcyBub3Qgb3ZlcmxhcCB3aXRoIGFueSBvZiB0aGUgb3RoZXJzLCB5YXkuXG4gICAgICByZXQuaHVua3MucHVzaChjbG9uZUh1bmsodGhlaXJzQ3VycmVudCwgdGhlaXJzT2Zmc2V0KSk7XG4gICAgICB0aGVpcnNJbmRleCsrO1xuICAgICAgbWluZU9mZnNldCArPSB0aGVpcnNDdXJyZW50Lm5ld0xpbmVzIC0gdGhlaXJzQ3VycmVudC5vbGRMaW5lcztcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gT3ZlcmxhcCwgbWVyZ2UgYXMgYmVzdCB3ZSBjYW5cbiAgICAgIGxldCBtZXJnZWRIdW5rID0ge1xuICAgICAgICBvbGRTdGFydDogTWF0aC5taW4obWluZUN1cnJlbnQub2xkU3RhcnQsIHRoZWlyc0N1cnJlbnQub2xkU3RhcnQpLFxuICAgICAgICBvbGRMaW5lczogMCxcbiAgICAgICAgbmV3U3RhcnQ6IE1hdGgubWluKG1pbmVDdXJyZW50Lm5ld1N0YXJ0ICsgbWluZU9mZnNldCwgdGhlaXJzQ3VycmVudC5vbGRTdGFydCArIHRoZWlyc09mZnNldCksXG4gICAgICAgIG5ld0xpbmVzOiAwLFxuICAgICAgICBsaW5lczogW11cbiAgICAgIH07XG4gICAgICBtZXJnZUxpbmVzKG1lcmdlZEh1bmssIG1pbmVDdXJyZW50Lm9sZFN0YXJ0LCBtaW5lQ3VycmVudC5saW5lcywgdGhlaXJzQ3VycmVudC5vbGRTdGFydCwgdGhlaXJzQ3VycmVudC5saW5lcyk7XG4gICAgICB0aGVpcnNJbmRleCsrO1xuICAgICAgbWluZUluZGV4Kys7XG5cbiAgICAgIHJldC5odW5rcy5wdXNoKG1lcmdlZEh1bmspO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXQ7XG59XG5cbmZ1bmN0aW9uIGxvYWRQYXRjaChwYXJhbSwgYmFzZSkge1xuICBpZiAodHlwZW9mIHBhcmFtID09PSAnc3RyaW5nJykge1xuICAgIGlmICgoL15AQC9tKS50ZXN0KHBhcmFtKSB8fCAoKC9eSW5kZXg6L20pLnRlc3QocGFyYW0pKSkge1xuICAgICAgcmV0dXJuIHBhcnNlUGF0Y2gocGFyYW0pWzBdO1xuICAgIH1cblxuICAgIGlmICghYmFzZSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdNdXN0IHByb3ZpZGUgYSBiYXNlIHJlZmVyZW5jZSBvciBwYXNzIGluIGEgcGF0Y2gnKTtcbiAgICB9XG4gICAgcmV0dXJuIHN0cnVjdHVyZWRQYXRjaCh1bmRlZmluZWQsIHVuZGVmaW5lZCwgYmFzZSwgcGFyYW0pO1xuICB9XG5cbiAgcmV0dXJuIHBhcmFtO1xufVxuXG5mdW5jdGlvbiBmaWxlTmFtZUNoYW5nZWQocGF0Y2gpIHtcbiAgcmV0dXJuIHBhdGNoLm5ld0ZpbGVOYW1lICYmIHBhdGNoLm5ld0ZpbGVOYW1lICE9PSBwYXRjaC5vbGRGaWxlTmFtZTtcbn1cblxuZnVuY3Rpb24gc2VsZWN0RmllbGQoaW5kZXgsIG1pbmUsIHRoZWlycykge1xuICBpZiAobWluZSA9PT0gdGhlaXJzKSB7XG4gICAgcmV0dXJuIG1pbmU7XG4gIH0gZWxzZSB7XG4gICAgaW5kZXguY29uZmxpY3QgPSB0cnVlO1xuICAgIHJldHVybiB7bWluZSwgdGhlaXJzfTtcbiAgfVxufVxuXG5mdW5jdGlvbiBodW5rQmVmb3JlKHRlc3QsIGNoZWNrKSB7XG4gIHJldHVybiB0ZXN0Lm9sZFN0YXJ0IDwgY2hlY2sub2xkU3RhcnRcbiAgICAmJiAodGVzdC5vbGRTdGFydCArIHRlc3Qub2xkTGluZXMpIDwgY2hlY2sub2xkU3RhcnQ7XG59XG5cbmZ1bmN0aW9uIGNsb25lSHVuayhodW5rLCBvZmZzZXQpIHtcbiAgcmV0dXJuIHtcbiAgICBvbGRTdGFydDogaHVuay5vbGRTdGFydCwgb2xkTGluZXM6IGh1bmsub2xkTGluZXMsXG4gICAgbmV3U3RhcnQ6IGh1bmsubmV3U3RhcnQgKyBvZmZzZXQsIG5ld0xpbmVzOiBodW5rLm5ld0xpbmVzLFxuICAgIGxpbmVzOiBodW5rLmxpbmVzXG4gIH07XG59XG5cbmZ1bmN0aW9uIG1lcmdlTGluZXMoaHVuaywgbWluZU9mZnNldCwgbWluZUxpbmVzLCB0aGVpck9mZnNldCwgdGhlaXJMaW5lcykge1xuICAvLyBUaGlzIHdpbGwgZ2VuZXJhbGx5IHJlc3VsdCBpbiBhIGNvbmZsaWN0ZWQgaHVuaywgYnV0IHRoZXJlIGFyZSBjYXNlcyB3aGVyZSB0aGUgY29udGV4dFxuICAvLyBpcyB0aGUgb25seSBvdmVybGFwIHdoZXJlIHdlIGNhbiBzdWNjZXNzZnVsbHkgbWVyZ2UgdGhlIGNvbnRlbnQgaGVyZS5cbiAgbGV0IG1pbmUgPSB7b2Zmc2V0OiBtaW5lT2Zmc2V0LCBsaW5lczogbWluZUxpbmVzLCBpbmRleDogMH0sXG4gICAgICB0aGVpciA9IHtvZmZzZXQ6IHRoZWlyT2Zmc2V0LCBsaW5lczogdGhlaXJMaW5lcywgaW5kZXg6IDB9O1xuXG4gIC8vIEhhbmRsZSBhbnkgbGVhZGluZyBjb250ZW50XG4gIGluc2VydExlYWRpbmcoaHVuaywgbWluZSwgdGhlaXIpO1xuICBpbnNlcnRMZWFkaW5nKGh1bmssIHRoZWlyLCBtaW5lKTtcblxuICAvLyBOb3cgaW4gdGhlIG92ZXJsYXAgY29udGVudC4gU2NhbiB0aHJvdWdoIGFuZCBzZWxlY3QgdGhlIGJlc3QgY2hhbmdlcyBmcm9tIGVhY2guXG4gIHdoaWxlIChtaW5lLmluZGV4IDwgbWluZS5saW5lcy5sZW5ndGggJiYgdGhlaXIuaW5kZXggPCB0aGVpci5saW5lcy5sZW5ndGgpIHtcbiAgICBsZXQgbWluZUN1cnJlbnQgPSBtaW5lLmxpbmVzW21pbmUuaW5kZXhdLFxuICAgICAgICB0aGVpckN1cnJlbnQgPSB0aGVpci5saW5lc1t0aGVpci5pbmRleF07XG5cbiAgICBpZiAoKG1pbmVDdXJyZW50WzBdID09PSAnLScgfHwgbWluZUN1cnJlbnRbMF0gPT09ICcrJylcbiAgICAgICAgJiYgKHRoZWlyQ3VycmVudFswXSA9PT0gJy0nIHx8IHRoZWlyQ3VycmVudFswXSA9PT0gJysnKSkge1xuICAgICAgLy8gQm90aCBtb2RpZmllZCAuLi5cbiAgICAgIG11dHVhbENoYW5nZShodW5rLCBtaW5lLCB0aGVpcik7XG4gICAgfSBlbHNlIGlmIChtaW5lQ3VycmVudFswXSA9PT0gJysnICYmIHRoZWlyQ3VycmVudFswXSA9PT0gJyAnKSB7XG4gICAgICAvLyBNaW5lIGluc2VydGVkXG4gICAgICBodW5rLmxpbmVzLnB1c2goLi4uIGNvbGxlY3RDaGFuZ2UobWluZSkpO1xuICAgIH0gZWxzZSBpZiAodGhlaXJDdXJyZW50WzBdID09PSAnKycgJiYgbWluZUN1cnJlbnRbMF0gPT09ICcgJykge1xuICAgICAgLy8gVGhlaXJzIGluc2VydGVkXG4gICAgICBodW5rLmxpbmVzLnB1c2goLi4uIGNvbGxlY3RDaGFuZ2UodGhlaXIpKTtcbiAgICB9IGVsc2UgaWYgKG1pbmVDdXJyZW50WzBdID09PSAnLScgJiYgdGhlaXJDdXJyZW50WzBdID09PSAnICcpIHtcbiAgICAgIC8vIE1pbmUgcmVtb3ZlZCBvciBlZGl0ZWRcbiAgICAgIHJlbW92YWwoaHVuaywgbWluZSwgdGhlaXIpO1xuICAgIH0gZWxzZSBpZiAodGhlaXJDdXJyZW50WzBdID09PSAnLScgJiYgbWluZUN1cnJlbnRbMF0gPT09ICcgJykge1xuICAgICAgLy8gVGhlaXIgcmVtb3ZlZCBvciBlZGl0ZWRcbiAgICAgIHJlbW92YWwoaHVuaywgdGhlaXIsIG1pbmUsIHRydWUpO1xuICAgIH0gZWxzZSBpZiAobWluZUN1cnJlbnQgPT09IHRoZWlyQ3VycmVudCkge1xuICAgICAgLy8gQ29udGV4dCBpZGVudGl0eVxuICAgICAgaHVuay5saW5lcy5wdXNoKG1pbmVDdXJyZW50KTtcbiAgICAgIG1pbmUuaW5kZXgrKztcbiAgICAgIHRoZWlyLmluZGV4Kys7XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIENvbnRleHQgbWlzbWF0Y2hcbiAgICAgIGNvbmZsaWN0KGh1bmssIGNvbGxlY3RDaGFuZ2UobWluZSksIGNvbGxlY3RDaGFuZ2UodGhlaXIpKTtcbiAgICB9XG4gIH1cblxuICAvLyBOb3cgcHVzaCBhbnl0aGluZyB0aGF0IG1heSBiZSByZW1haW5pbmdcbiAgaW5zZXJ0VHJhaWxpbmcoaHVuaywgbWluZSk7XG4gIGluc2VydFRyYWlsaW5nKGh1bmssIHRoZWlyKTtcblxuICBjYWxjTGluZUNvdW50KGh1bmspO1xufVxuXG5mdW5jdGlvbiBtdXR1YWxDaGFuZ2UoaHVuaywgbWluZSwgdGhlaXIpIHtcbiAgbGV0IG15Q2hhbmdlcyA9IGNvbGxlY3RDaGFuZ2UobWluZSksXG4gICAgICB0aGVpckNoYW5nZXMgPSBjb2xsZWN0Q2hhbmdlKHRoZWlyKTtcblxuICBpZiAoYWxsUmVtb3ZlcyhteUNoYW5nZXMpICYmIGFsbFJlbW92ZXModGhlaXJDaGFuZ2VzKSkge1xuICAgIC8vIFNwZWNpYWwgY2FzZSBmb3IgcmVtb3ZlIGNoYW5nZXMgdGhhdCBhcmUgc3VwZXJzZXRzIG9mIG9uZSBhbm90aGVyXG4gICAgaWYgKGFycmF5U3RhcnRzV2l0aChteUNoYW5nZXMsIHRoZWlyQ2hhbmdlcylcbiAgICAgICAgJiYgc2tpcFJlbW92ZVN1cGVyc2V0KHRoZWlyLCBteUNoYW5nZXMsIG15Q2hhbmdlcy5sZW5ndGggLSB0aGVpckNoYW5nZXMubGVuZ3RoKSkge1xuICAgICAgaHVuay5saW5lcy5wdXNoKC4uLiBteUNoYW5nZXMpO1xuICAgICAgcmV0dXJuO1xuICAgIH0gZWxzZSBpZiAoYXJyYXlTdGFydHNXaXRoKHRoZWlyQ2hhbmdlcywgbXlDaGFuZ2VzKVxuICAgICAgICAmJiBza2lwUmVtb3ZlU3VwZXJzZXQobWluZSwgdGhlaXJDaGFuZ2VzLCB0aGVpckNoYW5nZXMubGVuZ3RoIC0gbXlDaGFuZ2VzLmxlbmd0aCkpIHtcbiAgICAgIGh1bmsubGluZXMucHVzaCguLi4gdGhlaXJDaGFuZ2VzKTtcbiAgICAgIHJldHVybjtcbiAgICB9XG4gIH0gZWxzZSBpZiAoYXJyYXlFcXVhbChteUNoYW5nZXMsIHRoZWlyQ2hhbmdlcykpIHtcbiAgICBodW5rLmxpbmVzLnB1c2goLi4uIG15Q2hhbmdlcyk7XG4gICAgcmV0dXJuO1xuICB9XG5cbiAgY29uZmxpY3QoaHVuaywgbXlDaGFuZ2VzLCB0aGVpckNoYW5nZXMpO1xufVxuXG5mdW5jdGlvbiByZW1vdmFsKGh1bmssIG1pbmUsIHRoZWlyLCBzd2FwKSB7XG4gIGxldCBteUNoYW5nZXMgPSBjb2xsZWN0Q2hhbmdlKG1pbmUpLFxuICAgICAgdGhlaXJDaGFuZ2VzID0gY29sbGVjdENvbnRleHQodGhlaXIsIG15Q2hhbmdlcyk7XG4gIGlmICh0aGVpckNoYW5nZXMubWVyZ2VkKSB7XG4gICAgaHVuay5saW5lcy5wdXNoKC4uLiB0aGVpckNoYW5nZXMubWVyZ2VkKTtcbiAgfSBlbHNlIHtcbiAgICBjb25mbGljdChodW5rLCBzd2FwID8gdGhlaXJDaGFuZ2VzIDogbXlDaGFuZ2VzLCBzd2FwID8gbXlDaGFuZ2VzIDogdGhlaXJDaGFuZ2VzKTtcbiAgfVxufVxuXG5mdW5jdGlvbiBjb25mbGljdChodW5rLCBtaW5lLCB0aGVpcikge1xuICBodW5rLmNvbmZsaWN0ID0gdHJ1ZTtcbiAgaHVuay5saW5lcy5wdXNoKHtcbiAgICBjb25mbGljdDogdHJ1ZSxcbiAgICBtaW5lOiBtaW5lLFxuICAgIHRoZWlyczogdGhlaXJcbiAgfSk7XG59XG5cbmZ1bmN0aW9uIGluc2VydExlYWRpbmcoaHVuaywgaW5zZXJ0LCB0aGVpcikge1xuICB3aGlsZSAoaW5zZXJ0Lm9mZnNldCA8IHRoZWlyLm9mZnNldCAmJiBpbnNlcnQuaW5kZXggPCBpbnNlcnQubGluZXMubGVuZ3RoKSB7XG4gICAgbGV0IGxpbmUgPSBpbnNlcnQubGluZXNbaW5zZXJ0LmluZGV4KytdO1xuICAgIGh1bmsubGluZXMucHVzaChsaW5lKTtcbiAgICBpbnNlcnQub2Zmc2V0Kys7XG4gIH1cbn1cbmZ1bmN0aW9uIGluc2VydFRyYWlsaW5nKGh1bmssIGluc2VydCkge1xuICB3aGlsZSAoaW5zZXJ0LmluZGV4IDwgaW5zZXJ0LmxpbmVzLmxlbmd0aCkge1xuICAgIGxldCBsaW5lID0gaW5zZXJ0LmxpbmVzW2luc2VydC5pbmRleCsrXTtcbiAgICBodW5rLmxpbmVzLnB1c2gobGluZSk7XG4gIH1cbn1cblxuZnVuY3Rpb24gY29sbGVjdENoYW5nZShzdGF0ZSkge1xuICBsZXQgcmV0ID0gW10sXG4gICAgICBvcGVyYXRpb24gPSBzdGF0ZS5saW5lc1tzdGF0ZS5pbmRleF1bMF07XG4gIHdoaWxlIChzdGF0ZS5pbmRleCA8IHN0YXRlLmxpbmVzLmxlbmd0aCkge1xuICAgIGxldCBsaW5lID0gc3RhdGUubGluZXNbc3RhdGUuaW5kZXhdO1xuXG4gICAgLy8gR3JvdXAgYWRkaXRpb25zIHRoYXQgYXJlIGltbWVkaWF0ZWx5IGFmdGVyIHN1YnRyYWN0aW9ucyBhbmQgdHJlYXQgdGhlbSBhcyBvbmUgXCJhdG9taWNcIiBtb2RpZnkgY2hhbmdlLlxuICAgIGlmIChvcGVyYXRpb24gPT09ICctJyAmJiBsaW5lWzBdID09PSAnKycpIHtcbiAgICAgIG9wZXJhdGlvbiA9ICcrJztcbiAgICB9XG5cbiAgICBpZiAob3BlcmF0aW9uID09PSBsaW5lWzBdKSB7XG4gICAgICByZXQucHVzaChsaW5lKTtcbiAgICAgIHN0YXRlLmluZGV4Kys7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJyZWFrO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiByZXQ7XG59XG5mdW5jdGlvbiBjb2xsZWN0Q29udGV4dChzdGF0ZSwgbWF0Y2hDaGFuZ2VzKSB7XG4gIGxldCBjaGFuZ2VzID0gW10sXG4gICAgICBtZXJnZWQgPSBbXSxcbiAgICAgIG1hdGNoSW5kZXggPSAwLFxuICAgICAgY29udGV4dENoYW5nZXMgPSBmYWxzZSxcbiAgICAgIGNvbmZsaWN0ZWQgPSBmYWxzZTtcbiAgd2hpbGUgKG1hdGNoSW5kZXggPCBtYXRjaENoYW5nZXMubGVuZ3RoXG4gICAgICAgICYmIHN0YXRlLmluZGV4IDwgc3RhdGUubGluZXMubGVuZ3RoKSB7XG4gICAgbGV0IGNoYW5nZSA9IHN0YXRlLmxpbmVzW3N0YXRlLmluZGV4XSxcbiAgICAgICAgbWF0Y2ggPSBtYXRjaENoYW5nZXNbbWF0Y2hJbmRleF07XG5cbiAgICAvLyBPbmNlIHdlJ3ZlIGhpdCBvdXIgYWRkLCB0aGVuIHdlIGFyZSBkb25lXG4gICAgaWYgKG1hdGNoWzBdID09PSAnKycpIHtcbiAgICAgIGJyZWFrO1xuICAgIH1cblxuICAgIGNvbnRleHRDaGFuZ2VzID0gY29udGV4dENoYW5nZXMgfHwgY2hhbmdlWzBdICE9PSAnICc7XG5cbiAgICBtZXJnZWQucHVzaChtYXRjaCk7XG4gICAgbWF0Y2hJbmRleCsrO1xuXG4gICAgLy8gQ29uc3VtZSBhbnkgYWRkaXRpb25zIGluIHRoZSBvdGhlciBibG9jayBhcyBhIGNvbmZsaWN0IHRvIGF0dGVtcHRcbiAgICAvLyB0byBwdWxsIGluIHRoZSByZW1haW5pbmcgY29udGV4dCBhZnRlciB0aGlzXG4gICAgaWYgKGNoYW5nZVswXSA9PT0gJysnKSB7XG4gICAgICBjb25mbGljdGVkID0gdHJ1ZTtcblxuICAgICAgd2hpbGUgKGNoYW5nZVswXSA9PT0gJysnKSB7XG4gICAgICAgIGNoYW5nZXMucHVzaChjaGFuZ2UpO1xuICAgICAgICBjaGFuZ2UgPSBzdGF0ZS5saW5lc1srK3N0YXRlLmluZGV4XTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAobWF0Y2guc3Vic3RyKDEpID09PSBjaGFuZ2Uuc3Vic3RyKDEpKSB7XG4gICAgICBjaGFuZ2VzLnB1c2goY2hhbmdlKTtcbiAgICAgIHN0YXRlLmluZGV4Kys7XG4gICAgfSBlbHNlIHtcbiAgICAgIGNvbmZsaWN0ZWQgPSB0cnVlO1xuICAgIH1cbiAgfVxuXG4gIGlmICgobWF0Y2hDaGFuZ2VzW21hdGNoSW5kZXhdIHx8ICcnKVswXSA9PT0gJysnXG4gICAgICAmJiBjb250ZXh0Q2hhbmdlcykge1xuICAgIGNvbmZsaWN0ZWQgPSB0cnVlO1xuICB9XG5cbiAgaWYgKGNvbmZsaWN0ZWQpIHtcbiAgICByZXR1cm4gY2hhbmdlcztcbiAgfVxuXG4gIHdoaWxlIChtYXRjaEluZGV4IDwgbWF0Y2hDaGFuZ2VzLmxlbmd0aCkge1xuICAgIG1lcmdlZC5wdXNoKG1hdGNoQ2hhbmdlc1ttYXRjaEluZGV4KytdKTtcbiAgfVxuXG4gIHJldHVybiB7XG4gICAgbWVyZ2VkLFxuICAgIGNoYW5nZXNcbiAgfTtcbn1cblxuZnVuY3Rpb24gYWxsUmVtb3ZlcyhjaGFuZ2VzKSB7XG4gIHJldHVybiBjaGFuZ2VzLnJlZHVjZShmdW5jdGlvbihwcmV2LCBjaGFuZ2UpIHtcbiAgICByZXR1cm4gcHJldiAmJiBjaGFuZ2VbMF0gPT09ICctJztcbiAgfSwgdHJ1ZSk7XG59XG5mdW5jdGlvbiBza2lwUmVtb3ZlU3VwZXJzZXQoc3RhdGUsIHJlbW92ZUNoYW5nZXMsIGRlbHRhKSB7XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgZGVsdGE7IGkrKykge1xuICAgIGxldCBjaGFuZ2VDb250ZW50ID0gcmVtb3ZlQ2hhbmdlc1tyZW1vdmVDaGFuZ2VzLmxlbmd0aCAtIGRlbHRhICsgaV0uc3Vic3RyKDEpO1xuICAgIGlmIChzdGF0ZS5saW5lc1tzdGF0ZS5pbmRleCArIGldICE9PSAnICcgKyBjaGFuZ2VDb250ZW50KSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG5cbiAgc3RhdGUuaW5kZXggKz0gZGVsdGE7XG4gIHJldHVybiB0cnVlO1xufVxuXG5mdW5jdGlvbiBjYWxjT2xkTmV3TGluZUNvdW50KGxpbmVzKSB7XG4gIGxldCBvbGRMaW5lcyA9IDA7XG4gIGxldCBuZXdMaW5lcyA9IDA7XG5cbiAgbGluZXMuZm9yRWFjaChmdW5jdGlvbihsaW5lKSB7XG4gICAgaWYgKHR5cGVvZiBsaW5lICE9PSAnc3RyaW5nJykge1xuICAgICAgbGV0IG15Q291bnQgPSBjYWxjT2xkTmV3TGluZUNvdW50KGxpbmUubWluZSk7XG4gICAgICBsZXQgdGhlaXJDb3VudCA9IGNhbGNPbGROZXdMaW5lQ291bnQobGluZS50aGVpcnMpO1xuXG4gICAgICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAobXlDb3VudC5vbGRMaW5lcyA9PT0gdGhlaXJDb3VudC5vbGRMaW5lcykge1xuICAgICAgICAgIG9sZExpbmVzICs9IG15Q291bnQub2xkTGluZXM7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgb2xkTGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKG5ld0xpbmVzICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgaWYgKG15Q291bnQubmV3TGluZXMgPT09IHRoZWlyQ291bnQubmV3TGluZXMpIHtcbiAgICAgICAgICBuZXdMaW5lcyArPSBteUNvdW50Lm5ld0xpbmVzO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5ld0xpbmVzID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGlmIChuZXdMaW5lcyAhPT0gdW5kZWZpbmVkICYmIChsaW5lWzBdID09PSAnKycgfHwgbGluZVswXSA9PT0gJyAnKSkge1xuICAgICAgICBuZXdMaW5lcysrO1xuICAgICAgfVxuICAgICAgaWYgKG9sZExpbmVzICE9PSB1bmRlZmluZWQgJiYgKGxpbmVbMF0gPT09ICctJyB8fCBsaW5lWzBdID09PSAnICcpKSB7XG4gICAgICAgIG9sZExpbmVzKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4ge29sZExpbmVzLCBuZXdMaW5lc307XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/lib/patch/parse.js b/node_modules/npm/node_modules/diff/lib/patch/parse.js deleted file mode 100644 index f150104..0000000 --- a/node_modules/npm/node_modules/diff/lib/patch/parse.js +++ /dev/null @@ -1,167 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parsePatch = parsePatch; - -/*istanbul ignore end*/ -function parsePatch(uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - 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: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [], - linedelimiters: [] - }; // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - - 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; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9wYXJzZS5qcyJdLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJkaWZmc3RyIiwic3BsaXQiLCJkZWxpbWl0ZXJzIiwibWF0Y2giLCJsaXN0IiwiaSIsInBhcnNlSW5kZXgiLCJpbmRleCIsInB1c2giLCJsZW5ndGgiLCJsaW5lIiwidGVzdCIsImhlYWRlciIsImV4ZWMiLCJwYXJzZUZpbGVIZWFkZXIiLCJodW5rcyIsInBhcnNlSHVuayIsInN0cmljdCIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsImZpbGVIZWFkZXIiLCJrZXlQcmVmaXgiLCJkYXRhIiwiZmlsZU5hbWUiLCJyZXBsYWNlIiwic3Vic3RyIiwidHJpbSIsImNodW5rSGVhZGVySW5kZXgiLCJjaHVua0hlYWRlckxpbmUiLCJjaHVua0hlYWRlciIsImh1bmsiLCJvbGRTdGFydCIsIm9sZExpbmVzIiwibmV3U3RhcnQiLCJuZXdMaW5lcyIsImxpbmVzIiwibGluZWRlbGltaXRlcnMiLCJhZGRDb3VudCIsInJlbW92ZUNvdW50IiwiaW5kZXhPZiIsIm9wZXJhdGlvbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsT0FBcEIsRUFBMkM7QUFBQTtBQUFBO0FBQUE7QUFBZEMsRUFBQUEsT0FBYyx1RUFBSixFQUFJO0FBQ2hELE1BQUlDLE9BQU8sR0FBR0YsT0FBTyxDQUFDRyxLQUFSLENBQWMscUJBQWQsQ0FBZDtBQUFBLE1BQ0lDLFVBQVUsR0FBR0osT0FBTyxDQUFDSyxLQUFSLENBQWMsc0JBQWQsS0FBeUMsRUFEMUQ7QUFBQSxNQUVJQyxJQUFJLEdBQUcsRUFGWDtBQUFBLE1BR0lDLENBQUMsR0FBRyxDQUhSOztBQUtBLFdBQVNDLFVBQVQsR0FBc0I7QUFDcEIsUUFBSUMsS0FBSyxHQUFHLEVBQVo7QUFDQUgsSUFBQUEsSUFBSSxDQUFDSSxJQUFMLENBQVVELEtBQVYsRUFGb0IsQ0FJcEI7O0FBQ0EsV0FBT0YsQ0FBQyxHQUFHTCxPQUFPLENBQUNTLE1BQW5CLEVBQTJCO0FBQ3pCLFVBQUlDLElBQUksR0FBR1YsT0FBTyxDQUFDSyxDQUFELENBQWxCLENBRHlCLENBR3pCOztBQUNBLFVBQUssdUJBQUQsQ0FBMEJNLElBQTFCLENBQStCRCxJQUEvQixDQUFKLEVBQTBDO0FBQ3hDO0FBQ0QsT0FOd0IsQ0FRekI7OztBQUNBLFVBQUlFLE1BQU0sR0FBSSwwQ0FBRCxDQUE2Q0MsSUFBN0MsQ0FBa0RILElBQWxELENBQWI7O0FBQ0EsVUFBSUUsTUFBSixFQUFZO0FBQ1ZMLFFBQUFBLEtBQUssQ0FBQ0EsS0FBTixHQUFjSyxNQUFNLENBQUMsQ0FBRCxDQUFwQjtBQUNEOztBQUVEUCxNQUFBQSxDQUFDO0FBQ0YsS0FwQm1CLENBc0JwQjtBQUNBOzs7QUFDQVMsSUFBQUEsZUFBZSxDQUFDUCxLQUFELENBQWY7QUFDQU8sSUFBQUEsZUFBZSxDQUFDUCxLQUFELENBQWYsQ0F6Qm9CLENBMkJwQjs7QUFDQUEsSUFBQUEsS0FBSyxDQUFDUSxLQUFOLEdBQWMsRUFBZDs7QUFFQSxXQUFPVixDQUFDLEdBQUdMLE9BQU8sQ0FBQ1MsTUFBbkIsRUFBMkI7QUFDekIsVUFBSUMsS0FBSSxHQUFHVixPQUFPLENBQUNLLENBQUQsQ0FBbEI7O0FBRUEsVUFBSyxnQ0FBRCxDQUFtQ00sSUFBbkMsQ0FBd0NELEtBQXhDLENBQUosRUFBbUQ7QUFDakQ7QUFDRCxPQUZELE1BRU8sSUFBSyxLQUFELENBQVFDLElBQVIsQ0FBYUQsS0FBYixDQUFKLEVBQXdCO0FBQzdCSCxRQUFBQSxLQUFLLENBQUNRLEtBQU4sQ0FBWVAsSUFBWixDQUFpQlEsU0FBUyxFQUExQjtBQUNELE9BRk0sTUFFQSxJQUFJTixLQUFJLElBQUlYLE9BQU8sQ0FBQ2tCLE1BQXBCLEVBQTRCO0FBQ2pDO0FBQ0EsY0FBTSxJQUFJQyxLQUFKLENBQVUsbUJBQW1CYixDQUFDLEdBQUcsQ0FBdkIsSUFBNEIsR0FBNUIsR0FBa0NjLElBQUksQ0FBQ0MsU0FBTCxDQUFlVixLQUFmLENBQTVDLENBQU47QUFDRCxPQUhNLE1BR0E7QUFDTEwsUUFBQUEsQ0FBQztBQUNGO0FBQ0Y7QUFDRixHQWxEK0MsQ0FvRGhEO0FBQ0E7OztBQUNBLFdBQVNTLGVBQVQsQ0FBeUJQLEtBQXpCLEVBQWdDO0FBQzlCLFFBQU1jLFVBQVUsR0FBSSx1QkFBRCxDQUEwQlIsSUFBMUIsQ0FBK0JiLE9BQU8sQ0FBQ0ssQ0FBRCxDQUF0QyxDQUFuQjs7QUFDQSxRQUFJZ0IsVUFBSixFQUFnQjtBQUNkLFVBQUlDLFNBQVMsR0FBR0QsVUFBVSxDQUFDLENBQUQsQ0FBVixLQUFrQixLQUFsQixHQUEwQixLQUExQixHQUFrQyxLQUFsRDtBQUNBLFVBQU1FLElBQUksR0FBR0YsVUFBVSxDQUFDLENBQUQsQ0FBVixDQUFjcEIsS0FBZCxDQUFvQixJQUFwQixFQUEwQixDQUExQixDQUFiO0FBQ0EsVUFBSXVCLFFBQVEsR0FBR0QsSUFBSSxDQUFDLENBQUQsQ0FBSixDQUFRRSxPQUFSLENBQWdCLE9BQWhCLEVBQXlCLElBQXpCLENBQWY7O0FBQ0EsVUFBSyxRQUFELENBQVdkLElBQVgsQ0FBZ0JhLFFBQWhCLENBQUosRUFBK0I7QUFDN0JBLFFBQUFBLFFBQVEsR0FBR0EsUUFBUSxDQUFDRSxNQUFULENBQWdCLENBQWhCLEVBQW1CRixRQUFRLENBQUNmLE1BQVQsR0FBa0IsQ0FBckMsQ0FBWDtBQUNEOztBQUNERixNQUFBQSxLQUFLLENBQUNlLFNBQVMsR0FBRyxVQUFiLENBQUwsR0FBZ0NFLFFBQWhDO0FBQ0FqQixNQUFBQSxLQUFLLENBQUNlLFNBQVMsR0FBRyxRQUFiLENBQUwsR0FBOEIsQ0FBQ0MsSUFBSSxDQUFDLENBQUQsQ0FBSixJQUFXLEVBQVosRUFBZ0JJLElBQWhCLEVBQTlCO0FBRUF0QixNQUFBQSxDQUFDO0FBQ0Y7QUFDRixHQXBFK0MsQ0FzRWhEO0FBQ0E7OztBQUNBLFdBQVNXLFNBQVQsR0FBcUI7QUFDbkIsUUFBSVksZ0JBQWdCLEdBQUd2QixDQUF2QjtBQUFBLFFBQ0l3QixlQUFlLEdBQUc3QixPQUFPLENBQUNLLENBQUMsRUFBRixDQUQ3QjtBQUFBLFFBRUl5QixXQUFXLEdBQUdELGVBQWUsQ0FBQzVCLEtBQWhCLENBQXNCLDRDQUF0QixDQUZsQjtBQUlBLFFBQUk4QixJQUFJLEdBQUc7QUFDVEMsTUFBQUEsUUFBUSxFQUFFLENBQUNGLFdBQVcsQ0FBQyxDQUFELENBRGI7QUFFVEcsTUFBQUEsUUFBUSxFQUFFLE9BQU9ILFdBQVcsQ0FBQyxDQUFELENBQWxCLEtBQTBCLFdBQTFCLEdBQXdDLENBQXhDLEdBQTRDLENBQUNBLFdBQVcsQ0FBQyxDQUFELENBRnpEO0FBR1RJLE1BQUFBLFFBQVEsRUFBRSxDQUFDSixXQUFXLENBQUMsQ0FBRCxDQUhiO0FBSVRLLE1BQUFBLFFBQVEsRUFBRSxPQUFPTCxXQUFXLENBQUMsQ0FBRCxDQUFsQixLQUEwQixXQUExQixHQUF3QyxDQUF4QyxHQUE0QyxDQUFDQSxXQUFXLENBQUMsQ0FBRCxDQUp6RDtBQUtUTSxNQUFBQSxLQUFLLEVBQUUsRUFMRTtBQU1UQyxNQUFBQSxjQUFjLEVBQUU7QUFOUCxLQUFYLENBTG1CLENBY25CO0FBQ0E7QUFDQTs7QUFDQSxRQUFJTixJQUFJLENBQUNFLFFBQUwsS0FBa0IsQ0FBdEIsRUFBeUI7QUFDdkJGLE1BQUFBLElBQUksQ0FBQ0MsUUFBTCxJQUFpQixDQUFqQjtBQUNEOztBQUNELFFBQUlELElBQUksQ0FBQ0ksUUFBTCxLQUFrQixDQUF0QixFQUF5QjtBQUN2QkosTUFBQUEsSUFBSSxDQUFDRyxRQUFMLElBQWlCLENBQWpCO0FBQ0Q7O0FBRUQsUUFBSUksUUFBUSxHQUFHLENBQWY7QUFBQSxRQUNJQyxXQUFXLEdBQUcsQ0FEbEI7O0FBRUEsV0FBT2xDLENBQUMsR0FBR0wsT0FBTyxDQUFDUyxNQUFuQixFQUEyQkosQ0FBQyxFQUE1QixFQUFnQztBQUM5QjtBQUNBO0FBQ0EsVUFBSUwsT0FBTyxDQUFDSyxDQUFELENBQVAsQ0FBV21DLE9BQVgsQ0FBbUIsTUFBbkIsTUFBK0IsQ0FBL0IsSUFDTW5DLENBQUMsR0FBRyxDQUFKLEdBQVFMLE9BQU8sQ0FBQ1MsTUFEdEIsSUFFS1QsT0FBTyxDQUFDSyxDQUFDLEdBQUcsQ0FBTCxDQUFQLENBQWVtQyxPQUFmLENBQXVCLE1BQXZCLE1BQW1DLENBRnhDLElBR0t4QyxPQUFPLENBQUNLLENBQUMsR0FBRyxDQUFMLENBQVAsQ0FBZW1DLE9BQWYsQ0FBdUIsSUFBdkIsTUFBaUMsQ0FIMUMsRUFHNkM7QUFDekM7QUFDSDs7QUFDRCxVQUFJQyxTQUFTLEdBQUl6QyxPQUFPLENBQUNLLENBQUQsQ0FBUCxDQUFXSSxNQUFYLElBQXFCLENBQXJCLElBQTBCSixDQUFDLElBQUtMLE9BQU8sQ0FBQ1MsTUFBUixHQUFpQixDQUFsRCxHQUF3RCxHQUF4RCxHQUE4RFQsT0FBTyxDQUFDSyxDQUFELENBQVAsQ0FBVyxDQUFYLENBQTlFOztBQUVBLFVBQUlvQyxTQUFTLEtBQUssR0FBZCxJQUFxQkEsU0FBUyxLQUFLLEdBQW5DLElBQTBDQSxTQUFTLEtBQUssR0FBeEQsSUFBK0RBLFNBQVMsS0FBSyxJQUFqRixFQUF1RjtBQUNyRlYsUUFBQUEsSUFBSSxDQUFDSyxLQUFMLENBQVc1QixJQUFYLENBQWdCUixPQUFPLENBQUNLLENBQUQsQ0FBdkI7QUFDQTBCLFFBQUFBLElBQUksQ0FBQ00sY0FBTCxDQUFvQjdCLElBQXBCLENBQXlCTixVQUFVLENBQUNHLENBQUQsQ0FBVixJQUFpQixJQUExQzs7QUFFQSxZQUFJb0MsU0FBUyxLQUFLLEdBQWxCLEVBQXVCO0FBQ3JCSCxVQUFBQSxRQUFRO0FBQ1QsU0FGRCxNQUVPLElBQUlHLFNBQVMsS0FBSyxHQUFsQixFQUF1QjtBQUM1QkYsVUFBQUEsV0FBVztBQUNaLFNBRk0sTUFFQSxJQUFJRSxTQUFTLEtBQUssR0FBbEIsRUFBdUI7QUFDNUJILFVBQUFBLFFBQVE7QUFDUkMsVUFBQUEsV0FBVztBQUNaO0FBQ0YsT0FaRCxNQVlPO0FBQ0w7QUFDRDtBQUNGLEtBcERrQixDQXNEbkI7OztBQUNBLFFBQUksQ0FBQ0QsUUFBRCxJQUFhUCxJQUFJLENBQUNJLFFBQUwsS0FBa0IsQ0FBbkMsRUFBc0M7QUFDcENKLE1BQUFBLElBQUksQ0FBQ0ksUUFBTCxHQUFnQixDQUFoQjtBQUNEOztBQUNELFFBQUksQ0FBQ0ksV0FBRCxJQUFnQlIsSUFBSSxDQUFDRSxRQUFMLEtBQWtCLENBQXRDLEVBQXlDO0FBQ3ZDRixNQUFBQSxJQUFJLENBQUNFLFFBQUwsR0FBZ0IsQ0FBaEI7QUFDRCxLQTVEa0IsQ0E4RG5COzs7QUFDQSxRQUFJbEMsT0FBTyxDQUFDa0IsTUFBWixFQUFvQjtBQUNsQixVQUFJcUIsUUFBUSxLQUFLUCxJQUFJLENBQUNJLFFBQXRCLEVBQWdDO0FBQzlCLGNBQU0sSUFBSWpCLEtBQUosQ0FBVSxzREFBc0RVLGdCQUFnQixHQUFHLENBQXpFLENBQVYsQ0FBTjtBQUNEOztBQUNELFVBQUlXLFdBQVcsS0FBS1IsSUFBSSxDQUFDRSxRQUF6QixFQUFtQztBQUNqQyxjQUFNLElBQUlmLEtBQUosQ0FBVSx3REFBd0RVLGdCQUFnQixHQUFHLENBQTNFLENBQVYsQ0FBTjtBQUNEO0FBQ0Y7O0FBRUQsV0FBT0csSUFBUDtBQUNEOztBQUVELFNBQU8xQixDQUFDLEdBQUdMLE9BQU8sQ0FBQ1MsTUFBbkIsRUFBMkI7QUFDekJILElBQUFBLFVBQVU7QUFDWDs7QUFFRCxTQUFPRixJQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gcGFyc2VQYXRjaCh1bmlEaWZmLCBvcHRpb25zID0ge30pIHtcbiAgbGV0IGRpZmZzdHIgPSB1bmlEaWZmLnNwbGl0KC9cXHJcXG58W1xcblxcdlxcZlxcclxceDg1XS8pLFxuICAgICAgZGVsaW1pdGVycyA9IHVuaURpZmYubWF0Y2goL1xcclxcbnxbXFxuXFx2XFxmXFxyXFx4ODVdL2cpIHx8IFtdLFxuICAgICAgbGlzdCA9IFtdLFxuICAgICAgaSA9IDA7XG5cbiAgZnVuY3Rpb24gcGFyc2VJbmRleCgpIHtcbiAgICBsZXQgaW5kZXggPSB7fTtcbiAgICBsaXN0LnB1c2goaW5kZXgpO1xuXG4gICAgLy8gUGFyc2UgZGlmZiBtZXRhZGF0YVxuICAgIHdoaWxlIChpIDwgZGlmZnN0ci5sZW5ndGgpIHtcbiAgICAgIGxldCBsaW5lID0gZGlmZnN0cltpXTtcblxuICAgICAgLy8gRmlsZSBoZWFkZXIgZm91bmQsIGVuZCBwYXJzaW5nIGRpZmYgbWV0YWRhdGFcbiAgICAgIGlmICgoL14oXFwtXFwtXFwtfFxcK1xcK1xcK3xAQClcXHMvKS50ZXN0KGxpbmUpKSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgICAvLyBEaWZmIGluZGV4XG4gICAgICBsZXQgaGVhZGVyID0gKC9eKD86SW5kZXg6fGRpZmYoPzogLXIgXFx3KykrKVxccysoLis/KVxccyokLykuZXhlYyhsaW5lKTtcbiAgICAgIGlmIChoZWFkZXIpIHtcbiAgICAgICAgaW5kZXguaW5kZXggPSBoZWFkZXJbMV07XG4gICAgICB9XG5cbiAgICAgIGkrKztcbiAgICB9XG5cbiAgICAvLyBQYXJzZSBmaWxlIGhlYWRlcnMgaWYgdGhleSBhcmUgZGVmaW5lZC4gVW5pZmllZCBkaWZmIHJlcXVpcmVzIHRoZW0sIGJ1dFxuICAgIC8vIHRoZXJlJ3Mgbm8gdGVjaG5pY2FsIGlzc3VlcyB0byBoYXZlIGFuIGlzb2xhdGVkIGh1bmsgd2l0aG91dCBmaWxlIGhlYWRlclxuICAgIHBhcnNlRmlsZUhlYWRlcihpbmRleCk7XG4gICAgcGFyc2VGaWxlSGVhZGVyKGluZGV4KTtcblxuICAgIC8vIFBhcnNlIGh1bmtzXG4gICAgaW5kZXguaHVua3MgPSBbXTtcblxuICAgIHdoaWxlIChpIDwgZGlmZnN0ci5sZW5ndGgpIHtcbiAgICAgIGxldCBsaW5lID0gZGlmZnN0cltpXTtcblxuICAgICAgaWYgKCgvXihJbmRleDp8ZGlmZnxcXC1cXC1cXC18XFwrXFwrXFwrKVxccy8pLnRlc3QobGluZSkpIHtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9IGVsc2UgaWYgKCgvXkBALykudGVzdChsaW5lKSkge1xuICAgICAgICBpbmRleC5odW5rcy5wdXNoKHBhcnNlSHVuaygpKTtcbiAgICAgIH0gZWxzZSBpZiAobGluZSAmJiBvcHRpb25zLnN0cmljdCkge1xuICAgICAgICAvLyBJZ25vcmUgdW5leHBlY3RlZCBjb250ZW50IHVubGVzcyBpbiBzdHJpY3QgbW9kZVxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vua25vd24gbGluZSAnICsgKGkgKyAxKSArICcgJyArIEpTT04uc3RyaW5naWZ5KGxpbmUpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGkrKztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICAvLyBQYXJzZXMgdGhlIC0tLSBhbmQgKysrIGhlYWRlcnMsIGlmIG5vbmUgYXJlIGZvdW5kLCBubyBsaW5lc1xuICAvLyBhcmUgY29uc3VtZWQuXG4gIGZ1bmN0aW9uIHBhcnNlRmlsZUhlYWRlcihpbmRleCkge1xuICAgIGNvbnN0IGZpbGVIZWFkZXIgPSAoL14oLS0tfFxcK1xcK1xcKylcXHMrKC4qKSQvKS5leGVjKGRpZmZzdHJbaV0pO1xuICAgIGlmIChmaWxlSGVhZGVyKSB7XG4gICAgICBsZXQga2V5UHJlZml4ID0gZmlsZUhlYWRlclsxXSA9PT0gJy0tLScgPyAnb2xkJyA6ICduZXcnO1xuICAgICAgY29uc3QgZGF0YSA9IGZpbGVIZWFkZXJbMl0uc3BsaXQoJ1xcdCcsIDIpO1xuICAgICAgbGV0IGZpbGVOYW1lID0gZGF0YVswXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnXFxcXCcpO1xuICAgICAgaWYgKCgvXlwiLipcIiQvKS50ZXN0KGZpbGVOYW1lKSkge1xuICAgICAgICBmaWxlTmFtZSA9IGZpbGVOYW1lLnN1YnN0cigxLCBmaWxlTmFtZS5sZW5ndGggLSAyKTtcbiAgICAgIH1cbiAgICAgIGluZGV4W2tleVByZWZpeCArICdGaWxlTmFtZSddID0gZmlsZU5hbWU7XG4gICAgICBpbmRleFtrZXlQcmVmaXggKyAnSGVhZGVyJ10gPSAoZGF0YVsxXSB8fCAnJykudHJpbSgpO1xuXG4gICAgICBpKys7XG4gICAgfVxuICB9XG5cbiAgLy8gUGFyc2VzIGEgaHVua1xuICAvLyBUaGlzIGFzc3VtZXMgdGhhdCB3ZSBhcmUgYXQgdGhlIHN0YXJ0IG9mIGEgaHVuay5cbiAgZnVuY3Rpb24gcGFyc2VIdW5rKCkge1xuICAgIGxldCBjaHVua0hlYWRlckluZGV4ID0gaSxcbiAgICAgICAgY2h1bmtIZWFkZXJMaW5lID0gZGlmZnN0cltpKytdLFxuICAgICAgICBjaHVua0hlYWRlciA9IGNodW5rSGVhZGVyTGluZS5zcGxpdCgvQEAgLShcXGQrKSg/OiwoXFxkKykpPyBcXCsoXFxkKykoPzosKFxcZCspKT8gQEAvKTtcblxuICAgIGxldCBodW5rID0ge1xuICAgICAgb2xkU3RhcnQ6ICtjaHVua0hlYWRlclsxXSxcbiAgICAgIG9sZExpbmVzOiB0eXBlb2YgY2h1bmtIZWFkZXJbMl0gPT09ICd1bmRlZmluZWQnID8gMSA6ICtjaHVua0hlYWRlclsyXSxcbiAgICAgIG5ld1N0YXJ0OiArY2h1bmtIZWFkZXJbM10sXG4gICAgICBuZXdMaW5lczogdHlwZW9mIGNodW5rSGVhZGVyWzRdID09PSAndW5kZWZpbmVkJyA/IDEgOiArY2h1bmtIZWFkZXJbNF0sXG4gICAgICBsaW5lczogW10sXG4gICAgICBsaW5lZGVsaW1pdGVyczogW11cbiAgICB9O1xuXG4gICAgLy8gVW5pZmllZCBEaWZmIEZvcm1hdCBxdWlyazogSWYgdGhlIGNodW5rIHNpemUgaXMgMCxcbiAgICAvLyB0aGUgZmlyc3QgbnVtYmVyIGlzIG9uZSBsb3dlciB0aGFuIG9uZSB3b3VsZCBleHBlY3QuXG4gICAgLy8gaHR0cHM6Ly93d3cuYXJ0aW1hLmNvbS93ZWJsb2dzL3ZpZXdwb3N0LmpzcD90aHJlYWQ9MTY0MjkzXG4gICAgaWYgKGh1bmsub2xkTGluZXMgPT09IDApIHtcbiAgICAgIGh1bmsub2xkU3RhcnQgKz0gMTtcbiAgICB9XG4gICAgaWYgKGh1bmsubmV3TGluZXMgPT09IDApIHtcbiAgICAgIGh1bmsubmV3U3RhcnQgKz0gMTtcbiAgICB9XG5cbiAgICBsZXQgYWRkQ291bnQgPSAwLFxuICAgICAgICByZW1vdmVDb3VudCA9IDA7XG4gICAgZm9yICg7IGkgPCBkaWZmc3RyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAvLyBMaW5lcyBzdGFydGluZyB3aXRoICctLS0nIGNvdWxkIGJlIG1pc3Rha2VuIGZvciB0aGUgXCJyZW1vdmUgbGluZVwiIG9wZXJhdGlvblxuICAgICAgLy8gQnV0IHRoZXkgY291bGQgYmUgdGhlIGhlYWRlciBmb3IgdGhlIG5leHQgZmlsZS4gVGhlcmVmb3JlIHBydW5lIHN1Y2ggY2FzZXMgb3V0LlxuICAgICAgaWYgKGRpZmZzdHJbaV0uaW5kZXhPZignLS0tICcpID09PSAwXG4gICAgICAgICAgICAmJiAoaSArIDIgPCBkaWZmc3RyLmxlbmd0aClcbiAgICAgICAgICAgICYmIGRpZmZzdHJbaSArIDFdLmluZGV4T2YoJysrKyAnKSA9PT0gMFxuICAgICAgICAgICAgJiYgZGlmZnN0cltpICsgMl0uaW5kZXhPZignQEAnKSA9PT0gMCkge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgbGV0IG9wZXJhdGlvbiA9IChkaWZmc3RyW2ldLmxlbmd0aCA9PSAwICYmIGkgIT0gKGRpZmZzdHIubGVuZ3RoIC0gMSkpID8gJyAnIDogZGlmZnN0cltpXVswXTtcblxuICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJysnIHx8IG9wZXJhdGlvbiA9PT0gJy0nIHx8IG9wZXJhdGlvbiA9PT0gJyAnIHx8IG9wZXJhdGlvbiA9PT0gJ1xcXFwnKSB7XG4gICAgICAgIGh1bmsubGluZXMucHVzaChkaWZmc3RyW2ldKTtcbiAgICAgICAgaHVuay5saW5lZGVsaW1pdGVycy5wdXNoKGRlbGltaXRlcnNbaV0gfHwgJ1xcbicpO1xuXG4gICAgICAgIGlmIChvcGVyYXRpb24gPT09ICcrJykge1xuICAgICAgICAgIGFkZENvdW50Kys7XG4gICAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnLScpIHtcbiAgICAgICAgICByZW1vdmVDb3VudCsrO1xuICAgICAgICB9IGVsc2UgaWYgKG9wZXJhdGlvbiA9PT0gJyAnKSB7XG4gICAgICAgICAgYWRkQ291bnQrKztcbiAgICAgICAgICByZW1vdmVDb3VudCsrO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBIYW5kbGUgdGhlIGVtcHR5IGJsb2NrIGNvdW50IGNhc2VcbiAgICBpZiAoIWFkZENvdW50ICYmIGh1bmsubmV3TGluZXMgPT09IDEpIHtcbiAgICAgIGh1bmsubmV3TGluZXMgPSAwO1xuICAgIH1cbiAgICBpZiAoIXJlbW92ZUNvdW50ICYmIGh1bmsub2xkTGluZXMgPT09IDEpIHtcbiAgICAgIGh1bmsub2xkTGluZXMgPSAwO1xuICAgIH1cblxuICAgIC8vIFBlcmZvcm0gb3B0aW9uYWwgc2FuaXR5IGNoZWNraW5nXG4gICAgaWYgKG9wdGlvbnMuc3RyaWN0KSB7XG4gICAgICBpZiAoYWRkQ291bnQgIT09IGh1bmsubmV3TGluZXMpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdBZGRlZCBsaW5lIGNvdW50IGRpZCBub3QgbWF0Y2ggZm9yIGh1bmsgYXQgbGluZSAnICsgKGNodW5rSGVhZGVySW5kZXggKyAxKSk7XG4gICAgICB9XG4gICAgICBpZiAocmVtb3ZlQ291bnQgIT09IGh1bmsub2xkTGluZXMpIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZW1vdmVkIGxpbmUgY291bnQgZGlkIG5vdCBtYXRjaCBmb3IgaHVuayBhdCBsaW5lICcgKyAoY2h1bmtIZWFkZXJJbmRleCArIDEpKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gaHVuaztcbiAgfVxuXG4gIHdoaWxlIChpIDwgZGlmZnN0ci5sZW5ndGgpIHtcbiAgICBwYXJzZUluZGV4KCk7XG4gIH1cblxuICByZXR1cm4gbGlzdDtcbn1cbiJdfQ== diff --git a/node_modules/npm/node_modules/diff/lib/util/array.js b/node_modules/npm/node_modules/diff/lib/util/array.js deleted file mode 100644 index aecf67a..0000000 --- a/node_modules/npm/node_modules/diff/lib/util/array.js +++ /dev/null @@ -1,32 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayEqual = arrayEqual; -exports.arrayStartsWith = arrayStartsWith; - -/*istanbul ignore end*/ -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; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RXF1YWwiLCJhIiwiYiIsImxlbmd0aCIsImFycmF5U3RhcnRzV2l0aCIsImFycmF5Iiwic3RhcnQiLCJpIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsQ0FBcEIsRUFBdUJDLENBQXZCLEVBQTBCO0FBQy9CLE1BQUlELENBQUMsQ0FBQ0UsTUFBRixLQUFhRCxDQUFDLENBQUNDLE1BQW5CLEVBQTJCO0FBQ3pCLFdBQU8sS0FBUDtBQUNEOztBQUVELFNBQU9DLGVBQWUsQ0FBQ0gsQ0FBRCxFQUFJQyxDQUFKLENBQXRCO0FBQ0Q7O0FBRU0sU0FBU0UsZUFBVCxDQUF5QkMsS0FBekIsRUFBZ0NDLEtBQWhDLEVBQXVDO0FBQzVDLE1BQUlBLEtBQUssQ0FBQ0gsTUFBTixHQUFlRSxLQUFLLENBQUNGLE1BQXpCLEVBQWlDO0FBQy9CLFdBQU8sS0FBUDtBQUNEOztBQUVELE9BQUssSUFBSUksQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDSCxNQUExQixFQUFrQ0ksQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBTCxLQUFhRixLQUFLLENBQUNFLENBQUQsQ0FBdEIsRUFBMkI7QUFDekIsYUFBTyxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPLElBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl19 diff --git a/node_modules/npm/node_modules/diff/lib/util/distance-iterator.js b/node_modules/npm/node_modules/diff/lib/util/distance-iterator.js deleted file mode 100644 index 57c06a3..0000000 --- a/node_modules/npm/node_modules/diff/lib/util/distance-iterator.js +++ /dev/null @@ -1,57 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = _default; - -/*istanbul ignore end*/ -// 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 -/*istanbul ignore start*/ -_default -/*istanbul ignore end*/ -(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 - - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNlO0FBQUE7QUFBQTtBQUFBO0FBQUEsQ0FBU0EsS0FBVCxFQUFnQkMsT0FBaEIsRUFBeUJDLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUlDLFdBQVcsR0FBRyxJQUFsQjtBQUFBLE1BQ0lDLGlCQUFpQixHQUFHLEtBRHhCO0FBQUEsTUFFSUMsZ0JBQWdCLEdBQUcsS0FGdkI7QUFBQSxNQUdJQyxXQUFXLEdBQUcsQ0FIbEI7QUFLQSxTQUFPLFNBQVNDLFFBQVQsR0FBb0I7QUFDekIsUUFBSUosV0FBVyxJQUFJLENBQUNFLGdCQUFwQixFQUFzQztBQUNwQyxVQUFJRCxpQkFBSixFQUF1QjtBQUNyQkUsUUFBQUEsV0FBVztBQUNaLE9BRkQsTUFFTztBQUNMSCxRQUFBQSxXQUFXLEdBQUcsS0FBZDtBQUNELE9BTG1DLENBT3BDO0FBQ0E7OztBQUNBLFVBQUlILEtBQUssR0FBR00sV0FBUixJQUF1QkosT0FBM0IsRUFBb0M7QUFDbEMsZUFBT0ksV0FBUDtBQUNEOztBQUVERCxNQUFBQSxnQkFBZ0IsR0FBRyxJQUFuQjtBQUNEOztBQUVELFFBQUksQ0FBQ0QsaUJBQUwsRUFBd0I7QUFDdEIsVUFBSSxDQUFDQyxnQkFBTCxFQUF1QjtBQUNyQkYsUUFBQUEsV0FBVyxHQUFHLElBQWQ7QUFDRCxPQUhxQixDQUt0QjtBQUNBOzs7QUFDQSxVQUFJRixPQUFPLElBQUlELEtBQUssR0FBR00sV0FBdkIsRUFBb0M7QUFDbEMsZUFBTyxDQUFDQSxXQUFXLEVBQW5CO0FBQ0Q7O0FBRURGLE1BQUFBLGlCQUFpQixHQUFHLElBQXBCO0FBQ0EsYUFBT0csUUFBUSxFQUFmO0FBQ0QsS0E5QndCLENBZ0N6QjtBQUNBOztBQUNELEdBbENEO0FBbUNEIiwic291cmNlc0NvbnRlbnQiOlsiLy8gSXRlcmF0b3IgdGhhdCB0cmF2ZXJzZXMgaW4gdGhlIHJhbmdlIG9mIFttaW4sIG1heF0sIHN0ZXBwaW5nXG4vLyBieSBkaXN0YW5jZSBmcm9tIGEgZ2l2ZW4gc3RhcnQgcG9zaXRpb24uIEkuZS4gZm9yIFswLCA0XSwgd2l0aFxuLy8gc3RhcnQgb2YgMiwgdGhpcyB3aWxsIGl0ZXJhdGUgMiwgMywgMSwgNCwgMC5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKHN0YXJ0LCBtaW5MaW5lLCBtYXhMaW5lKSB7XG4gIGxldCB3YW50Rm9yd2FyZCA9IHRydWUsXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IGZhbHNlLFxuICAgICAgZm9yd2FyZEV4aGF1c3RlZCA9IGZhbHNlLFxuICAgICAgbG9jYWxPZmZzZXQgPSAxO1xuXG4gIHJldHVybiBmdW5jdGlvbiBpdGVyYXRvcigpIHtcbiAgICBpZiAod2FudEZvcndhcmQgJiYgIWZvcndhcmRFeGhhdXN0ZWQpIHtcbiAgICAgIGlmIChiYWNrd2FyZEV4aGF1c3RlZCkge1xuICAgICAgICBsb2NhbE9mZnNldCsrO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgd2FudEZvcndhcmQgPSBmYWxzZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZXlvbmQgdGV4dCBsZW5ndGgsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGFmdGVyIG9mZnNldCBsb2NhdGlvbiAob3IgZGVzaXJlZCBsb2NhdGlvbiBvbiBmaXJzdCBpdGVyYXRpb24pXG4gICAgICBpZiAoc3RhcnQgKyBsb2NhbE9mZnNldCA8PSBtYXhMaW5lKSB7XG4gICAgICAgIHJldHVybiBsb2NhbE9mZnNldDtcbiAgICAgIH1cblxuICAgICAgZm9yd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgaWYgKCFiYWNrd2FyZEV4aGF1c3RlZCkge1xuICAgICAgaWYgKCFmb3J3YXJkRXhoYXVzdGVkKSB7XG4gICAgICAgIHdhbnRGb3J3YXJkID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZWZvcmUgdGV4dCBiZWdpbm5pbmcsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGJlZm9yZSBvZmZzZXQgbG9jYXRpb25cbiAgICAgIGlmIChtaW5MaW5lIDw9IHN0YXJ0IC0gbG9jYWxPZmZzZXQpIHtcbiAgICAgICAgcmV0dXJuIC1sb2NhbE9mZnNldCsrO1xuICAgICAgfVxuXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgICByZXR1cm4gaXRlcmF0b3IoKTtcbiAgICB9XG5cbiAgICAvLyBXZSB0cmllZCB0byBmaXQgaHVuayBiZWZvcmUgdGV4dCBiZWdpbm5pbmcgYW5kIGJleW9uZCB0ZXh0IGxlbmd0aCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/lib/util/params.js b/node_modules/npm/node_modules/diff/lib/util/params.js deleted file mode 100644 index e838eb2..0000000 --- a/node_modules/npm/node_modules/diff/lib/util/params.js +++ /dev/null @@ -1,24 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.generateOptions = generateOptions; - -/*istanbul ignore end*/ -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; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsSUFBQUEsUUFBUSxDQUFDQyxRQUFULEdBQW9CRixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJQSxPQUFKLEVBQWE7QUFDbEIsU0FBSyxJQUFJRyxJQUFULElBQWlCSCxPQUFqQixFQUEwQjtBQUN4QjtBQUNBLFVBQUlBLE9BQU8sQ0FBQ0ksY0FBUixDQUF1QkQsSUFBdkIsQ0FBSixFQUFrQztBQUNoQ0YsUUFBQUEsUUFBUSxDQUFDRSxJQUFELENBQVIsR0FBaUJILE9BQU8sQ0FBQ0csSUFBRCxDQUF4QjtBQUNEO0FBQ0Y7QUFDRjs7QUFDRCxTQUFPRixRQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0= diff --git a/node_modules/npm/node_modules/diff/package.json b/node_modules/npm/node_modules/diff/package.json deleted file mode 100644 index a2fc30c..0000000 --- a/node_modules/npm/node_modules/diff/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "diff", - "version": "5.1.0", - "description": "A javascript text diff implementation.", - "keywords": [ - "diff", - "jsdiff", - "compare", - "patch", - "text", - "json", - "css", - "javascript" - ], - "maintainers": [ - "Kevin Decker (http://incaseofstairs.com)" - ], - "bugs": { - "email": "kpdecker@gmail.com", - "url": "http://github.com/kpdecker/jsdiff/issues" - }, - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" - }, - "engines": { - "node": ">=0.3.1" - }, - "main": "./lib/index.js", - "module": "./lib/index.es6.js", - "browser": "./dist/diff.js", - "unpkg": "./dist/diff.js", - "exports": { - ".": { - "import": "./lib/index.mjs", - "require": "./lib/index.js" - }, - "./package.json": "./package.json", - "./": "./" - }, - "scripts": { - "clean": "rm -rf lib/ dist/", - "build:node": "yarn babel --out-dir lib --source-maps=inline src", - "test": "grunt" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/preset-env": "^7.2.3", - "@babel/register": "^7.0.0", - "babel-eslint": "^10.0.1", - "babel-loader": "^8.0.5", - "chai": "^4.2.0", - "colors": "^1.3.3", - "eslint": "^5.12.0", - "grunt": "^1.0.3", - "grunt-babel": "^8.0.0", - "grunt-cli": "^1.3.2", - "grunt-contrib-clean": "^2.0.0", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-uglify": "^5.0.0", - "grunt-contrib-watch": "^1.1.0", - "grunt-eslint": "^23.0.0", - "grunt-exec": "^3.0.0", - "grunt-karma": "^4.0.0", - "grunt-mocha-istanbul": "^5.0.2", - "grunt-mocha-test": "^0.13.3", - "grunt-webpack": "^3.1.3", - "istanbul": "github:kpdecker/istanbul", - "karma": "^5.1.1", - "karma-chrome-launcher": "^3.1.0", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.0.0", - "karma-sauce-launcher": "^4.1.5", - "karma-sourcemap-loader": "^0.3.6", - "karma-webpack": "^4.0.2", - "mocha": "^6.0.0", - "rollup": "^1.0.2", - "rollup-plugin-babel": "^4.2.0", - "semver": "^7.3.2", - "webpack": "^4.28.3", - "webpack-dev-server": "^3.1.14" - }, - "optionalDependencies": {} -} diff --git a/node_modules/npm/node_modules/diff/release-notes.md b/node_modules/npm/node_modules/diff/release-notes.md deleted file mode 100644 index b7bc9c8..0000000 --- a/node_modules/npm/node_modules/diff/release-notes.md +++ /dev/null @@ -1,309 +0,0 @@ -# Release Notes - -## Development - -[Commits](https://github.com/kpdecker/jsdiff/compare/v5.0.0...master) - -## v5.1.0 - -- [#365](https://github.com/kpdecker/jsdiff/issues/365) Allow early termination to limit execution time with degenerate cases - -[Commits](https://github.com/kpdecker/jsdiff/compare/v5.0.0...v5.0.1) - -## v5.0.0 - -- Breaking: UMD export renamed from `JsDiff` to `Diff`. -- Breaking: Newlines separated into separate tokens for word diff. -- Breaking: Unified diffs now match ["quirks"](https://www.artima.com/weblogs/viewpost.jsp?thread=164293) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.1...v5.0.0) - -## v4.0.1 - January 6th, 2019 - -- Fix main reference path - b826104 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.0...v4.0.1) - -## v4.0.0 - January 5th, 2019 - -- [#94](https://github.com/kpdecker/jsdiff/issues/94) - Missing "No newline at end of file" when comparing two texts that do not end in newlines ([@federicotdn](https://api.github.com/users/federicotdn)) -- [#227](https://github.com/kpdecker/jsdiff/issues/227) - Licence -- [#199](https://github.com/kpdecker/jsdiff/issues/199) - Import statement for jsdiff -- [#159](https://github.com/kpdecker/jsdiff/issues/159) - applyPatch affecting wrong line number with with new lines -- [#8](https://github.com/kpdecker/jsdiff/issues/8) - A new state "replace" -- Drop ie9 from karma targets - 79c31bd -- Upgrade deps. Convert from webpack to rollup - 2c1a29c -- Make ()[]"' as word boundaries between each other - f27b899 -- jsdiff: Replaced phantomJS by chrome - ec3114e -- Add yarn.lock to .npmignore - 29466d8 - -Compatibility notes: - -- Bower and Component packages no longer supported - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v4.0.0) - -## v3.5.0 - March 4th, 2018 - -- Omit redundant slice in join method of diffArrays - 1023590 -- Support patches with empty lines - fb0f208 -- Accept a custom JSON replacer function for JSON diffing - 69c7f0a -- Optimize parch header parser - 2aec429 -- Fix typos - e89c832 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0) - -## v3.4.0 - October 7th, 2017 - -- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays` -- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans -- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array? -- comparator for custom equality checks - 30e141e -- count oldLines and newLines when there are conflicts - 53bf384 -- Fix: diffArrays can compare falsey items - 9e24284 -- Docs: Replace grunt with npm test - 00e2f94 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0) - -## v3.3.1 - September 3rd, 2017 - -- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n" -- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189) -- correct spelling mistake - 21fa478 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1) - -## v3.3.0 - July 5th, 2017 - -- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported -- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635 -- Use regex rather than starts/ends with for parsePatch - 6cab62c -- Add browser flag - e64f674 -- refactor: simplified code a bit more - 8f8e0f2 -- refactor: simplified code a bit - b094a6f -- fix: some corrections re ignoreCase option - 3c78fd0 -- ignoreCase option - 3cbfbb5 -- Sanitize filename while parsing patches - 2fe8129 -- Added better installation methods - aced50b -- Simple export of functionality - 8690f31 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0) - -## v3.2.0 - December 26th, 2016 - -- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9)) -- [#154](https://github.com/kpdecker/jsdiff/pull/154) - Add `examples` and `images` to `.npmignore`. ([@wtgtybhertgeghgtwtg](https://api.github.com/users/wtgtybhertgeghgtwtg)) -- [#153](https://github.com/kpdecker/jsdiff/pull/153) - feat(structuredPatch): Pass options to diffLines ([@Kiougar](https://api.github.com/users/Kiougar)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.1.0...v3.2.0) - -## v3.1.0 - November 27th, 2016 - -- [#146](https://github.com/kpdecker/jsdiff/pull/146) - JsDiff.diffArrays to compare arrays ([@wvanderdeijl](https://api.github.com/users/wvanderdeijl)) -- [#144](https://github.com/kpdecker/jsdiff/pull/144) - Split file using all possible line delimiter instead of hard-coded "/n" and join lines back using the original delimiters ([@soulbeing](https://api.github.com/users/soulbeing)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.1...v3.1.0) - -## v3.0.1 - October 9th, 2016 - -- [#139](https://github.com/kpdecker/jsdiff/pull/139) - Make README.md look nicer in npmjs.com ([@takenspc](https://api.github.com/users/takenspc)) -- [#135](https://github.com/kpdecker/jsdiff/issues/135) - parsePatch combines patches from multiple files into a single IUniDiff when there is no "Index" line ([@ramya-rao-a](https://api.github.com/users/ramya-rao-a)) -- [#124](https://github.com/kpdecker/jsdiff/issues/124) - IE7/IE8 failure since 2.0.0 ([@boneskull](https://api.github.com/users/boneskull)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.0...v3.0.1) - -## v3.0.0 - August 23rd, 2016 - -- [#130](https://github.com/kpdecker/jsdiff/pull/130) - Add callback argument to applyPatches `patched` option ([@piranna](https://api.github.com/users/piranna)) -- [#120](https://github.com/kpdecker/jsdiff/pull/120) - Correctly handle file names containing spaces ([@adius](https://api.github.com/users/adius)) -- [#119](https://github.com/kpdecker/jsdiff/pull/119) - Do single reflow ([@wifiextender](https://api.github.com/users/wifiextender)) -- [#117](https://github.com/kpdecker/jsdiff/pull/117) - Make more usable with long strings. ([@abnbgist](https://api.github.com/users/abnbgist)) - -Compatibility notes: - -- applyPatches patch callback now is async and requires the callback be called to continue operation - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.3...v3.0.0) - -## v2.2.3 - May 31st, 2016 - -- [#118](https://github.com/kpdecker/jsdiff/pull/118) - Add a fix for applying 0-length destination patches ([@chaaz](https://api.github.com/users/chaaz)) -- [#115](https://github.com/kpdecker/jsdiff/pull/115) - Fixed grammar in README ([@krizalys](https://api.github.com/users/krizalys)) -- [#113](https://github.com/kpdecker/jsdiff/pull/113) - fix typo ([@vmazare](https://api.github.com/users/vmazare)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.2...v2.2.3) - -## v2.2.2 - March 13th, 2016 - -- [#102](https://github.com/kpdecker/jsdiff/issues/102) - diffJson with dates, returns empty curly braces ([@dr-dimitru](https://api.github.com/users/dr-dimitru)) -- [#97](https://github.com/kpdecker/jsdiff/issues/97) - Whitespaces & diffWords ([@faiwer](https://api.github.com/users/faiwer)) -- [#92](https://github.com/kpdecker/jsdiff/pull/92) - Fixes typo in the readme ([@bg451](https://api.github.com/users/bg451)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.1...v2.2.2) - -## v2.2.1 - November 12th, 2015 - -- [#89](https://github.com/kpdecker/jsdiff/pull/89) - add in display selector to readme ([@FranDias](https://api.github.com/users/FranDias)) -- [#88](https://github.com/kpdecker/jsdiff/pull/88) - Split diffs based on file headers instead of 'Index:' metadata ([@piranna](https://api.github.com/users/piranna)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.1) - -## v2.2.0 - October 29th, 2015 - -- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) -- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) - [Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.0) - -## v2.2.0 - October 29th, 2015 - -- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) -- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) - [Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.3...v2.2.0) - -## v2.1.3 - September 30th, 2015 - -- [#78](https://github.com/kpdecker/jsdiff/pull/78) - fix: error throwing when apply patch to empty string ([@21paradox](https://api.github.com/users/21paradox)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.2...v2.1.3) - -## v2.1.2 - September 23rd, 2015 - -- [#76](https://github.com/kpdecker/jsdiff/issues/76) - diff headers give error ([@piranna](https://api.github.com/users/piranna)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.1...v2.1.2) - -## v2.1.1 - September 9th, 2015 - -- [#73](https://github.com/kpdecker/jsdiff/issues/73) - Is applyPatches() exposed in the API? ([@davidparsson](https://api.github.com/users/davidparsson)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.0...v2.1.1) - -## v2.1.0 - August 27th, 2015 - -- [#72](https://github.com/kpdecker/jsdiff/issues/72) - Consider using options object API for flag permutations ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#70](https://github.com/kpdecker/jsdiff/issues/70) - diffWords treats \n at the end as significant whitespace ([@nesQuick](https://api.github.com/users/nesQuick)) -- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) -- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) -- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna)) -- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422)) -- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb)) -- Move whitespace ignore out of equals method - 542063c -- Include source maps in babel output - 7f7ab21 -- Merge diff/line and diff/patch implementations - 1597705 -- Drop map utility method - 1ddc939 -- Documentation for parsePatch and applyPatches - 27c4b77 - -Compatibility notes: - -- The undocumented ignoreWhitespace flag has been removed from the Diff equality check directly. This implementation may be copied to diff utilities if dependencies existed on this functionality. - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.2...v2.1.0) - -## v2.0.2 - August 8th, 2015 - -- [#67](https://github.com/kpdecker/jsdiff/issues/67) - cannot require from npm module in node ([@commenthol](https://api.github.com/users/commenthol)) -- Convert to chai since we don’t support IE8 - a96bbad - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.1...v2.0.2) - -## v2.0.1 - August 7th, 2015 - -- Add release build at proper step - 57542fd - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.0...v2.0.1) - -## v2.0.0 - August 7th, 2015 - -- [#66](https://github.com/kpdecker/jsdiff/issues/66) - Add karma and sauce tests ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#65](https://github.com/kpdecker/jsdiff/issues/65) - Create component repository for bower ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#64](https://github.com/kpdecker/jsdiff/issues/64) - Automatically call removeEmpty for all tokenizer calls ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#62](https://github.com/kpdecker/jsdiff/pull/62) - Allow access to structured object representation of patch data ([@bittrance](https://api.github.com/users/bittrance)) -- [#61](https://github.com/kpdecker/jsdiff/pull/61) - Use svg instead of png to get better image quality ([@PeterDaveHello](https://api.github.com/users/PeterDaveHello)) -- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman)) - -Compatibility notes: - -- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis. -- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository. - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0) - -## v1.4.0 - May 6th, 2015 - -- [#57](https://github.com/kpdecker/jsdiff/issues/57) - createPatch -> applyPatch failed. ([@mog422](https://api.github.com/users/mog422)) -- [#56](https://github.com/kpdecker/jsdiff/pull/56) - Two files patch ([@rgeissert](https://api.github.com/users/rgeissert)) -- [#14](https://github.com/kpdecker/jsdiff/issues/14) - Flip added and removed order? ([@jakesandlund](https://api.github.com/users/jakesandlund)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.2...v1.4.0) - -## v1.3.2 - March 30th, 2015 - -- [#53](https://github.com/kpdecker/jsdiff/pull/53) - Updated README.MD with Bower installation instructions ([@ofbriggs](https://api.github.com/users/ofbriggs)) -- [#49](https://github.com/kpdecker/jsdiff/issues/49) - Cannot read property 'oldlines' of undefined ([@nwtn](https://api.github.com/users/nwtn)) -- [#44](https://github.com/kpdecker/jsdiff/issues/44) - invalid-meta jsdiff is missing "main" entry in bower.json - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.1...v1.3.2) - -## v1.3.1 - March 13th, 2015 - -- [#52](https://github.com/kpdecker/jsdiff/pull/52) - Fix for #51 Wrong result of JsDiff.diffLines ([@felicienfrancois](https://api.github.com/users/felicienfrancois)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.0...v1.3.1) - -## v1.3.0 - March 2nd, 2015 - -- [#47](https://github.com/kpdecker/jsdiff/pull/47) - Adding Diff Trimmed Lines ([@JamesGould123](https://api.github.com/users/JamesGould123)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.2...v1.3.0) - -## v1.2.2 - January 26th, 2015 - -- [#45](https://github.com/kpdecker/jsdiff/pull/45) - Fix AMD module loading ([@pedrocarrico](https://api.github.com/users/pedrocarrico)) -- [#43](https://github.com/kpdecker/jsdiff/pull/43) - added a bower file ([@nbrustein](https://api.github.com/users/nbrustein)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.1...v1.2.2) - -## v1.2.1 - December 26th, 2014 - -- [#41](https://github.com/kpdecker/jsdiff/pull/41) - change condition of using node export system. ([@ironhee](https://api.github.com/users/ironhee)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.0...v1.2.1) - -## v1.2.0 - November 29th, 2014 - -- [#37](https://github.com/kpdecker/jsdiff/pull/37) - Add support for sentences. ([@vmariano](https://api.github.com/users/vmariano)) -- [#28](https://github.com/kpdecker/jsdiff/pull/28) - Implemented diffJson ([@papandreou](https://api.github.com/users/papandreou)) -- [#27](https://github.com/kpdecker/jsdiff/issues/27) - Slow to execute over diffs with a large number of changes ([@termi](https://api.github.com/users/termi)) -- Allow for optional async diffing - 19385b9 -- Fix diffChars implementation - eaa44ed - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.1.0...v1.2.0) - -## v1.1.0 - November 25th, 2014 - -- [#33](https://github.com/kpdecker/jsdiff/pull/33) - AMD and global exports ([@ovcharik](https://api.github.com/users/ovcharik)) -- [#32](https://github.com/kpdecker/jsdiff/pull/32) - Add support for component ([@vmariano](https://api.github.com/users/vmariano)) -- [#31](https://github.com/kpdecker/jsdiff/pull/31) - Don't rely on Array.prototype.map ([@papandreou](https://api.github.com/users/papandreou)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.8...v1.1.0) - -## v1.0.8 - December 22nd, 2013 - -- [#24](https://github.com/kpdecker/jsdiff/pull/24) - Handle windows newlines on non windows machines. ([@benogle](https://api.github.com/users/benogle)) -- [#23](https://github.com/kpdecker/jsdiff/pull/23) - Prettied up the API formatting a little, and added basic node and web examples ([@airportyh](https://api.github.com/users/airportyh)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.7...v1.0.8) - -## v1.0.7 - September 11th, 2013 - -- [#22](https://github.com/kpdecker/jsdiff/pull/22) - Added variant of WordDiff that doesn't ignore whitespace differences ([@papandreou](https://api.github.com/users/papandreou) - -- Add 0.10 to travis tests - 243a526 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.6...v1.0.7) - -## v1.0.6 - August 30th, 2013 - -- [#19](https://github.com/kpdecker/jsdiff/pull/19) - Explicitly define contents of npm package ([@sindresorhus](https://api.github.com/users/sindresorhus) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.5...v1.0.6) diff --git a/node_modules/npm/node_modules/diff/runtime.js b/node_modules/npm/node_modules/diff/runtime.js deleted file mode 100644 index 82ea7e6..0000000 --- a/node_modules/npm/node_modules/diff/runtime.js +++ /dev/null @@ -1,3 +0,0 @@ -require('@babel/register')({ - ignore: ['lib', 'node_modules'] -}); diff --git a/node_modules/npm/node_modules/eastasianwidth/eastasianwidth.js b/node_modules/npm/node_modules/eastasianwidth/eastasianwidth.js deleted file mode 100644 index 7d0aa0f..0000000 --- a/node_modules/npm/node_modules/eastasianwidth/eastasianwidth.js +++ /dev/null @@ -1,311 +0,0 @@ -var eaw = {}; - -if ('undefined' == typeof module) { - window.eastasianwidth = eaw; -} else { - module.exports = eaw; -} - -eaw.eastAsianWidth = function(character) { - var x = character.charCodeAt(0); - var y = (character.length == 2) ? character.charCodeAt(1) : 0; - var codePoint = x; - if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) { - x &= 0x3FF; - y &= 0x3FF; - codePoint = (x << 10) | y; - codePoint += 0x10000; - } - - if ((0x3000 == codePoint) || - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) { - return 'F'; - } - if ((0x20A9 == codePoint) || - (0xFF61 <= codePoint && codePoint <= 0xFFBE) || - (0xFFC2 <= codePoint && codePoint <= 0xFFC7) || - (0xFFCA <= codePoint && codePoint <= 0xFFCF) || - (0xFFD2 <= codePoint && codePoint <= 0xFFD7) || - (0xFFDA <= codePoint && codePoint <= 0xFFDC) || - (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) { - return 'H'; - } - if ((0x1100 <= codePoint && codePoint <= 0x115F) || - (0x11A3 <= codePoint && codePoint <= 0x11A7) || - (0x11FA <= codePoint && codePoint <= 0x11FF) || - (0x2329 <= codePoint && codePoint <= 0x232A) || - (0x2E80 <= codePoint && codePoint <= 0x2E99) || - (0x2E9B <= codePoint && codePoint <= 0x2EF3) || - (0x2F00 <= codePoint && codePoint <= 0x2FD5) || - (0x2FF0 <= codePoint && codePoint <= 0x2FFB) || - (0x3001 <= codePoint && codePoint <= 0x303E) || - (0x3041 <= codePoint && codePoint <= 0x3096) || - (0x3099 <= codePoint && codePoint <= 0x30FF) || - (0x3105 <= codePoint && codePoint <= 0x312D) || - (0x3131 <= codePoint && codePoint <= 0x318E) || - (0x3190 <= codePoint && codePoint <= 0x31BA) || - (0x31C0 <= codePoint && codePoint <= 0x31E3) || - (0x31F0 <= codePoint && codePoint <= 0x321E) || - (0x3220 <= codePoint && codePoint <= 0x3247) || - (0x3250 <= codePoint && codePoint <= 0x32FE) || - (0x3300 <= codePoint && codePoint <= 0x4DBF) || - (0x4E00 <= codePoint && codePoint <= 0xA48C) || - (0xA490 <= codePoint && codePoint <= 0xA4C6) || - (0xA960 <= codePoint && codePoint <= 0xA97C) || - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - (0xD7B0 <= codePoint && codePoint <= 0xD7C6) || - (0xD7CB <= codePoint && codePoint <= 0xD7FB) || - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - (0xFE30 <= codePoint && codePoint <= 0xFE52) || - (0xFE54 <= codePoint && codePoint <= 0xFE66) || - (0xFE68 <= codePoint && codePoint <= 0xFE6B) || - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - (0x1F200 <= codePoint && codePoint <= 0x1F202) || - (0x1F210 <= codePoint && codePoint <= 0x1F23A) || - (0x1F240 <= codePoint && codePoint <= 0x1F248) || - (0x1F250 <= codePoint && codePoint <= 0x1F251) || - (0x20000 <= codePoint && codePoint <= 0x2F73F) || - (0x2B740 <= codePoint && codePoint <= 0x2FFFD) || - (0x30000 <= codePoint && codePoint <= 0x3FFFD)) { - return 'W'; - } - if ((0x0020 <= codePoint && codePoint <= 0x007E) || - (0x00A2 <= codePoint && codePoint <= 0x00A3) || - (0x00A5 <= codePoint && codePoint <= 0x00A6) || - (0x00AC == codePoint) || - (0x00AF == codePoint) || - (0x27E6 <= codePoint && codePoint <= 0x27ED) || - (0x2985 <= codePoint && codePoint <= 0x2986)) { - return 'Na'; - } - if ((0x00A1 == codePoint) || - (0x00A4 == codePoint) || - (0x00A7 <= codePoint && codePoint <= 0x00A8) || - (0x00AA == codePoint) || - (0x00AD <= codePoint && codePoint <= 0x00AE) || - (0x00B0 <= codePoint && codePoint <= 0x00B4) || - (0x00B6 <= codePoint && codePoint <= 0x00BA) || - (0x00BC <= codePoint && codePoint <= 0x00BF) || - (0x00C6 == codePoint) || - (0x00D0 == codePoint) || - (0x00D7 <= codePoint && codePoint <= 0x00D8) || - (0x00DE <= codePoint && codePoint <= 0x00E1) || - (0x00E6 == codePoint) || - (0x00E8 <= codePoint && codePoint <= 0x00EA) || - (0x00EC <= codePoint && codePoint <= 0x00ED) || - (0x00F0 == codePoint) || - (0x00F2 <= codePoint && codePoint <= 0x00F3) || - (0x00F7 <= codePoint && codePoint <= 0x00FA) || - (0x00FC == codePoint) || - (0x00FE == codePoint) || - (0x0101 == codePoint) || - (0x0111 == codePoint) || - (0x0113 == codePoint) || - (0x011B == codePoint) || - (0x0126 <= codePoint && codePoint <= 0x0127) || - (0x012B == codePoint) || - (0x0131 <= codePoint && codePoint <= 0x0133) || - (0x0138 == codePoint) || - (0x013F <= codePoint && codePoint <= 0x0142) || - (0x0144 == codePoint) || - (0x0148 <= codePoint && codePoint <= 0x014B) || - (0x014D == codePoint) || - (0x0152 <= codePoint && codePoint <= 0x0153) || - (0x0166 <= codePoint && codePoint <= 0x0167) || - (0x016B == codePoint) || - (0x01CE == codePoint) || - (0x01D0 == codePoint) || - (0x01D2 == codePoint) || - (0x01D4 == codePoint) || - (0x01D6 == codePoint) || - (0x01D8 == codePoint) || - (0x01DA == codePoint) || - (0x01DC == codePoint) || - (0x0251 == codePoint) || - (0x0261 == codePoint) || - (0x02C4 == codePoint) || - (0x02C7 == codePoint) || - (0x02C9 <= codePoint && codePoint <= 0x02CB) || - (0x02CD == codePoint) || - (0x02D0 == codePoint) || - (0x02D8 <= codePoint && codePoint <= 0x02DB) || - (0x02DD == codePoint) || - (0x02DF == codePoint) || - (0x0300 <= codePoint && codePoint <= 0x036F) || - (0x0391 <= codePoint && codePoint <= 0x03A1) || - (0x03A3 <= codePoint && codePoint <= 0x03A9) || - (0x03B1 <= codePoint && codePoint <= 0x03C1) || - (0x03C3 <= codePoint && codePoint <= 0x03C9) || - (0x0401 == codePoint) || - (0x0410 <= codePoint && codePoint <= 0x044F) || - (0x0451 == codePoint) || - (0x2010 == codePoint) || - (0x2013 <= codePoint && codePoint <= 0x2016) || - (0x2018 <= codePoint && codePoint <= 0x2019) || - (0x201C <= codePoint && codePoint <= 0x201D) || - (0x2020 <= codePoint && codePoint <= 0x2022) || - (0x2024 <= codePoint && codePoint <= 0x2027) || - (0x2030 == codePoint) || - (0x2032 <= codePoint && codePoint <= 0x2033) || - (0x2035 == codePoint) || - (0x203B == codePoint) || - (0x203E == codePoint) || - (0x2074 == codePoint) || - (0x207F == codePoint) || - (0x2081 <= codePoint && codePoint <= 0x2084) || - (0x20AC == codePoint) || - (0x2103 == codePoint) || - (0x2105 == codePoint) || - (0x2109 == codePoint) || - (0x2113 == codePoint) || - (0x2116 == codePoint) || - (0x2121 <= codePoint && codePoint <= 0x2122) || - (0x2126 == codePoint) || - (0x212B == codePoint) || - (0x2153 <= codePoint && codePoint <= 0x2154) || - (0x215B <= codePoint && codePoint <= 0x215E) || - (0x2160 <= codePoint && codePoint <= 0x216B) || - (0x2170 <= codePoint && codePoint <= 0x2179) || - (0x2189 == codePoint) || - (0x2190 <= codePoint && codePoint <= 0x2199) || - (0x21B8 <= codePoint && codePoint <= 0x21B9) || - (0x21D2 == codePoint) || - (0x21D4 == codePoint) || - (0x21E7 == codePoint) || - (0x2200 == codePoint) || - (0x2202 <= codePoint && codePoint <= 0x2203) || - (0x2207 <= codePoint && codePoint <= 0x2208) || - (0x220B == codePoint) || - (0x220F == codePoint) || - (0x2211 == codePoint) || - (0x2215 == codePoint) || - (0x221A == codePoint) || - (0x221D <= codePoint && codePoint <= 0x2220) || - (0x2223 == codePoint) || - (0x2225 == codePoint) || - (0x2227 <= codePoint && codePoint <= 0x222C) || - (0x222E == codePoint) || - (0x2234 <= codePoint && codePoint <= 0x2237) || - (0x223C <= codePoint && codePoint <= 0x223D) || - (0x2248 == codePoint) || - (0x224C == codePoint) || - (0x2252 == codePoint) || - (0x2260 <= codePoint && codePoint <= 0x2261) || - (0x2264 <= codePoint && codePoint <= 0x2267) || - (0x226A <= codePoint && codePoint <= 0x226B) || - (0x226E <= codePoint && codePoint <= 0x226F) || - (0x2282 <= codePoint && codePoint <= 0x2283) || - (0x2286 <= codePoint && codePoint <= 0x2287) || - (0x2295 == codePoint) || - (0x2299 == codePoint) || - (0x22A5 == codePoint) || - (0x22BF == codePoint) || - (0x2312 == codePoint) || - (0x2460 <= codePoint && codePoint <= 0x24E9) || - (0x24EB <= codePoint && codePoint <= 0x254B) || - (0x2550 <= codePoint && codePoint <= 0x2573) || - (0x2580 <= codePoint && codePoint <= 0x258F) || - (0x2592 <= codePoint && codePoint <= 0x2595) || - (0x25A0 <= codePoint && codePoint <= 0x25A1) || - (0x25A3 <= codePoint && codePoint <= 0x25A9) || - (0x25B2 <= codePoint && codePoint <= 0x25B3) || - (0x25B6 <= codePoint && codePoint <= 0x25B7) || - (0x25BC <= codePoint && codePoint <= 0x25BD) || - (0x25C0 <= codePoint && codePoint <= 0x25C1) || - (0x25C6 <= codePoint && codePoint <= 0x25C8) || - (0x25CB == codePoint) || - (0x25CE <= codePoint && codePoint <= 0x25D1) || - (0x25E2 <= codePoint && codePoint <= 0x25E5) || - (0x25EF == codePoint) || - (0x2605 <= codePoint && codePoint <= 0x2606) || - (0x2609 == codePoint) || - (0x260E <= codePoint && codePoint <= 0x260F) || - (0x2614 <= codePoint && codePoint <= 0x2615) || - (0x261C == codePoint) || - (0x261E == codePoint) || - (0x2640 == codePoint) || - (0x2642 == codePoint) || - (0x2660 <= codePoint && codePoint <= 0x2661) || - (0x2663 <= codePoint && codePoint <= 0x2665) || - (0x2667 <= codePoint && codePoint <= 0x266A) || - (0x266C <= codePoint && codePoint <= 0x266D) || - (0x266F == codePoint) || - (0x269E <= codePoint && codePoint <= 0x269F) || - (0x26BE <= codePoint && codePoint <= 0x26BF) || - (0x26C4 <= codePoint && codePoint <= 0x26CD) || - (0x26CF <= codePoint && codePoint <= 0x26E1) || - (0x26E3 == codePoint) || - (0x26E8 <= codePoint && codePoint <= 0x26FF) || - (0x273D == codePoint) || - (0x2757 == codePoint) || - (0x2776 <= codePoint && codePoint <= 0x277F) || - (0x2B55 <= codePoint && codePoint <= 0x2B59) || - (0x3248 <= codePoint && codePoint <= 0x324F) || - (0xE000 <= codePoint && codePoint <= 0xF8FF) || - (0xFE00 <= codePoint && codePoint <= 0xFE0F) || - (0xFFFD == codePoint) || - (0x1F100 <= codePoint && codePoint <= 0x1F10A) || - (0x1F110 <= codePoint && codePoint <= 0x1F12D) || - (0x1F130 <= codePoint && codePoint <= 0x1F169) || - (0x1F170 <= codePoint && codePoint <= 0x1F19A) || - (0xE0100 <= codePoint && codePoint <= 0xE01EF) || - (0xF0000 <= codePoint && codePoint <= 0xFFFFD) || - (0x100000 <= codePoint && codePoint <= 0x10FFFD)) { - return 'A'; - } - - return 'N'; -}; - -eaw.characterLength = function(character) { - var code = this.eastAsianWidth(character); - if (code == 'F' || code == 'W' || code == 'A') { - return 2; - } else { - return 1; - } -}; - -// Split a string considering surrogate-pairs. -function stringToArray(string) { - return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; -} - -eaw.length = function(string) { - var characters = stringToArray(string); - var len = 0; - for (var i = 0; i < characters.length; i++) { - len = len + this.characterLength(characters[i]); - } - return len; -}; - -eaw.slice = function(text, start, end) { - textLen = eaw.length(text) - start = start ? start : 0; - end = end ? end : 1; - if (start < 0) { - start = textLen + start; - } - if (end < 0) { - end = textLen + end; - } - var result = ''; - var eawLen = 0; - var chars = stringToArray(text); - for (var i = 0; i < chars.length; i++) { - var char = chars[i]; - var charLen = eaw.length(char); - if (eawLen >= start - (charLen == 2 ? 1 : 0)) { - if (eawLen + charLen <= end) { - result += char; - } else { - break; - } - } - eawLen += charLen; - } - return result; -}; diff --git a/node_modules/npm/node_modules/eastasianwidth/package.json b/node_modules/npm/node_modules/eastasianwidth/package.json deleted file mode 100644 index cb7ac6a..0000000 --- a/node_modules/npm/node_modules/eastasianwidth/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "eastasianwidth", - "version": "0.2.0", - "description": "Get East Asian Width from a character.", - "main": "eastasianwidth.js", - "files": [ - "eastasianwidth.js" - ], - "scripts": { - "test": "mocha" - }, - "repository": "git://github.com/komagata/eastasianwidth.git", - "author": "Masaki Komagata", - "license": "MIT", - "devDependencies": { - "mocha": "~1.9.0" - } -} diff --git a/node_modules/npm/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/npm/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7..0000000 --- a/node_modules/npm/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/emoji-regex/es2015/index.js b/node_modules/npm/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index b4cf3dc..0000000 --- a/node_modules/npm/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/npm/node_modules/emoji-regex/es2015/text.js b/node_modules/npm/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 780309d..0000000 --- a/node_modules/npm/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0065}\u{E006E}\u{E0067}|\u{E0073}\u{E0063}\u{E0074}|\u{E0077}\u{E006C}\u{E0073})\u{E007F}|\u{1F468}(?:\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}\u{1F3FB}|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708])\uFE0F|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|[\u{1F3FB}-\u{1F3FF}])|(?:\u{1F9D1}\u{1F3FB}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F469})\u{1F3FB}|\u{1F9D1}(?:\u{1F3FF}\u200D\u{1F91D}\u200D\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u200D\u{1F91D}\u200D\u{1F9D1})|(?:\u{1F9D1}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}\u{1F3FC}]|\u{1F469}(?:\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FB}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|(?:\u{1F9D1}\u{1F3FD}\u200D\u{1F91D}\u200D\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D\u{1F469})[\u{1F3FB}-\u{1F3FD}]|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}]\uFE0F|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}](?:[\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\u{1F3F4}\u200D\u2620)\uFE0F|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F415}\u200D\u{1F9BA}|\u{1F469}\u200D\u{1F466}|\u{1F469}\u200D\u{1F467}|\u{1F1FD}\u{1F1F0}|\u{1F1F4}\u{1F1F2}|\u{1F1F6}\u{1F1E6}|[#\*0-9]\uFE0F\u20E3|\u{1F1E7}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EF}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1F9}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1ED}\u{1F1EF}-\u{1F1F4}\u{1F1F7}\u{1F1F9}\u{1F1FB}\u{1F1FC}\u{1F1FF}]|\u{1F1EA}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1ED}\u{1F1F7}-\u{1F1FA}]|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F7}[\u{1F1EA}\u{1F1F4}\u{1F1F8}\u{1F1FA}\u{1F1FC}]|\u{1F469}[\u{1F3FB}-\u{1F3FF}]|\u{1F1F2}[\u{1F1E6}\u{1F1E8}-\u{1F1ED}\u{1F1F0}-\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|\u{1F1F0}[\u{1F1EA}\u{1F1EC}-\u{1F1EE}\u{1F1F2}\u{1F1F3}\u{1F1F5}\u{1F1F7}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1ED}[\u{1F1F0}\u{1F1F2}\u{1F1F3}\u{1F1F7}\u{1F1F9}\u{1F1FA}]|\u{1F1E9}[\u{1F1EA}\u{1F1EC}\u{1F1EF}\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1FF}]|\u{1F1FE}[\u{1F1EA}\u{1F1F9}]|\u{1F1EC}[\u{1F1E6}\u{1F1E7}\u{1F1E9}-\u{1F1EE}\u{1F1F1}-\u{1F1F3}\u{1F1F5}-\u{1F1FA}\u{1F1FC}\u{1F1FE}]|\u{1F1F8}[\u{1F1E6}-\u{1F1EA}\u{1F1EC}-\u{1F1F4}\u{1F1F7}-\u{1F1F9}\u{1F1FB}\u{1F1FD}-\u{1F1FF}]|\u{1F1EB}[\u{1F1EE}-\u{1F1F0}\u{1F1F2}\u{1F1F4}\u{1F1F7}]|\u{1F1F5}[\u{1F1E6}\u{1F1EA}-\u{1F1ED}\u{1F1F0}-\u{1F1F3}\u{1F1F7}-\u{1F1F9}\u{1F1FC}\u{1F1FE}]|\u{1F1FB}[\u{1F1E6}\u{1F1E8}\u{1F1EA}\u{1F1EC}\u{1F1EE}\u{1F1F3}\u{1F1FA}]|\u{1F1F3}[\u{1F1E6}\u{1F1E8}\u{1F1EA}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F4}\u{1F1F5}\u{1F1F7}\u{1F1FA}\u{1F1FF}]|\u{1F1E8}[\u{1F1E6}\u{1F1E8}\u{1F1E9}\u{1F1EB}-\u{1F1EE}\u{1F1F0}-\u{1F1F5}\u{1F1F7}\u{1F1FA}-\u{1F1FF}]|\u{1F1F1}[\u{1F1E6}-\u{1F1E8}\u{1F1EE}\u{1F1F0}\u{1F1F7}-\u{1F1FB}\u{1F1FE}]|\u{1F1FF}[\u{1F1E6}\u{1F1F2}\u{1F1FC}]|\u{1F1FC}[\u{1F1EB}\u{1F1F8}]|\u{1F1FA}[\u{1F1E6}\u{1F1EC}\u{1F1F2}\u{1F1F3}\u{1F1F8}\u{1F1FE}\u{1F1FF}]|\u{1F1EE}[\u{1F1E8}-\u{1F1EA}\u{1F1F1}-\u{1F1F4}\u{1F1F6}-\u{1F1F9}]|\u{1F1EF}[\u{1F1EA}\u{1F1F2}\u{1F1F4}\u{1F1F5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270A-\u270D\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F470}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F4AA}\u{1F574}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F936}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}-\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FA}\u{1F7E0}-\u{1F7EB}\u{1F90D}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F971}\u{1F973}-\u{1F976}\u{1F97A}-\u{1F9A2}\u{1F9A5}-\u{1F9AA}\u{1F9AE}-\u{1F9CA}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA73}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA82}\u{1FA90}-\u{1FA95}]\uFE0F?|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/npm/node_modules/emoji-regex/index.js b/node_modules/npm/node_modules/emoji-regex/index.js deleted file mode 100644 index d993a3a..0000000 --- a/node_modules/npm/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/npm/node_modules/emoji-regex/package.json b/node_modules/npm/node_modules/emoji-regex/package.json deleted file mode 100644 index 6d32352..0000000 --- a/node_modules/npm/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "emoji-regex", - "version": "8.0.0", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "text.js", - "es2015/index.js", - "es2015/text.js" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.3.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", - "@babel/preset-env": "^7.3.4", - "mocha": "^6.0.2", - "regexgen": "^1.3.0", - "unicode-12.0.0": "^0.7.9" - } -} diff --git a/node_modules/npm/node_modules/emoji-regex/text.js b/node_modules/npm/node_modules/emoji-regex/text.js deleted file mode 100644 index 0a55ce2..0000000 --- a/node_modules/npm/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/npm/node_modules/encoding/LICENSE b/node_modules/npm/node_modules/encoding/LICENSE deleted file mode 100644 index 33f5a9a..0000000 --- a/node_modules/npm/node_modules/encoding/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (c) 2012-2014 Andris Reinman - -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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/encoding/lib/encoding.js b/node_modules/npm/node_modules/encoding/lib/encoding.js deleted file mode 100644 index 865c24b..0000000 --- a/node_modules/npm/node_modules/encoding/lib/encoding.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -var iconvLite = require('iconv-lite'); - -// Expose to the world -module.exports.convert = convert; - -/** - * Convert encoding of an UTF-8 string or a buffer - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convert(str, to, from) { - from = checkEncoding(from || 'UTF-8'); - to = checkEncoding(to || 'UTF-8'); - str = str || ''; - - var result; - - if (from !== 'UTF-8' && typeof str === 'string') { - str = Buffer.from(str, 'binary'); - } - - if (from === to) { - if (typeof str === 'string') { - result = Buffer.from(str); - } else { - result = str; - } - } else { - try { - result = convertIconvLite(str, to, from); - } catch (E) { - console.error(E); - result = str; - } - } - - if (typeof result === 'string') { - result = Buffer.from(result, 'utf-8'); - } - - return result; -} - -/** - * Convert encoding of astring with iconv-lite - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convertIconvLite(str, to, from) { - if (to === 'UTF-8') { - return iconvLite.decode(str, from); - } else if (from === 'UTF-8') { - return iconvLite.encode(str, to); - } else { - return iconvLite.encode(iconvLite.decode(str, from), to); - } -} - -/** - * Converts charset name if needed - * - * @param {String} name Character set - * @return {String} Character set name - */ -function checkEncoding(name) { - return (name || '') - .toString() - .trim() - .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1') - .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1') - .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1') - .replace(/^ks_c_5601\-1987$/i, 'CP949') - .replace(/^us[\-_]?ascii$/i, 'ASCII') - .toUpperCase(); -} diff --git a/node_modules/npm/node_modules/encoding/package.json b/node_modules/npm/node_modules/encoding/package.json deleted file mode 100644 index 773a943..0000000 --- a/node_modules/npm/node_modules/encoding/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "encoding", - "version": "0.1.13", - "description": "Convert encodings, uses iconv-lite", - "main": "lib/encoding.js", - "scripts": { - "test": "nodeunit test" - }, - "repository": "https://github.com/andris9/encoding.git", - "author": "Andris Reinman", - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.2" - }, - "devDependencies": { - "nodeunit": "0.11.3" - } -} diff --git a/node_modules/npm/node_modules/encoding/test/test.js b/node_modules/npm/node_modules/encoding/test/test.js deleted file mode 100644 index 3a7dfee..0000000 --- a/node_modules/npm/node_modules/encoding/test/test.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var encoding = require('../lib/encoding'); - -exports['General tests'] = { - 'From UTF-8 to Latin_1': function (test) { - var input = 'ÕÄÖÜ', - expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]); - test.deepEqual(encoding.convert(input, 'latin1'), expected); - test.done(); - }, - - 'From Latin_1 to UTF-8': function (test) { - var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc]), - expected = 'ÕÄÖÜ'; - test.deepEqual(encoding.convert(input, 'utf-8', 'latin1').toString(), expected); - test.done(); - }, - - 'From UTF-8 to UTF-8': function (test) { - var input = 'ÕÄÖÜ', - expected = Buffer.from('ÕÄÖÜ'); - test.deepEqual(encoding.convert(input, 'utf-8', 'utf-8'), expected); - test.done(); - }, - - 'From Latin_13 to Latin_15': function (test) { - var input = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xd0]), - expected = Buffer.from([0xd5, 0xc4, 0xd6, 0xdc, 0xa6]); - test.deepEqual(encoding.convert(input, 'latin_15', 'latin13'), expected); - test.done(); - } - - /* - // ISO-2022-JP is not supported by iconv-lite - "From ISO-2022-JP to UTF-8 with Iconv": function (test) { - var input = Buffer.from( - "GyRCM1g5OzU7PVEwdzgmPSQ4IUYkMnFKczlwGyhC", - "base64" - ), - expected = Buffer.from( - "5a2m5qCh5oqA6KGT5ZOh56CU5L+u5qSc6KiO5Lya5aCx5ZGK", - "base64" - ); - test.deepEqual(encoding.convert(input, "utf-8", "ISO-2022-JP"), expected); - test.done(); - }, - */ -}; diff --git a/node_modules/npm/node_modules/env-paths/index.js b/node_modules/npm/node_modules/env-paths/index.js deleted file mode 100644 index 7e7b50b..0000000 --- a/node_modules/npm/node_modules/env-paths/index.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; -const path = require('path'); -const os = require('os'); - -const homedir = os.homedir(); -const tmpdir = os.tmpdir(); -const {env} = process; - -const macos = name => { - const library = path.join(homedir, 'Library'); - - return { - data: path.join(library, 'Application Support', name), - config: path.join(library, 'Preferences', name), - cache: path.join(library, 'Caches', name), - log: path.join(library, 'Logs', name), - temp: path.join(tmpdir, name) - }; -}; - -const windows = name => { - const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming'); - const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); - - return { - // Data/config/cache/log are invented by me as Windows isn't opinionated about this - data: path.join(localAppData, name, 'Data'), - config: path.join(appData, name, 'Config'), - cache: path.join(localAppData, name, 'Cache'), - log: path.join(localAppData, name, 'Log'), - temp: path.join(tmpdir, name) - }; -}; - -// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html -const linux = name => { - const username = path.basename(homedir); - - return { - data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), - config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), - cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), - // https://wiki.debian.org/XDGBaseDirectorySpecification#state - log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), - temp: path.join(tmpdir, username, name) - }; -}; - -const envPaths = (name, options) => { - if (typeof name !== 'string') { - throw new TypeError(`Expected string, got ${typeof name}`); - } - - options = Object.assign({suffix: 'nodejs'}, options); - - if (options.suffix) { - // Add suffix to prevent possible conflict with native apps - name += `-${options.suffix}`; - } - - if (process.platform === 'darwin') { - return macos(name); - } - - if (process.platform === 'win32') { - return windows(name); - } - - return linux(name); -}; - -module.exports = envPaths; -// TODO: Remove this for the next major release -module.exports.default = envPaths; diff --git a/node_modules/npm/node_modules/env-paths/license b/node_modules/npm/node_modules/env-paths/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/env-paths/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/env-paths/package.json b/node_modules/npm/node_modules/env-paths/package.json deleted file mode 100644 index fae4ebc..0000000 --- a/node_modules/npm/node_modules/env-paths/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "env-paths", - "version": "2.2.1", - "description": "Get paths for storing things like data, config, cache, etc", - "license": "MIT", - "repository": "sindresorhus/env-paths", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=6" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "common", - "user", - "paths", - "env", - "environment", - "directory", - "dir", - "appdir", - "path", - "data", - "config", - "cache", - "logs", - "temp", - "linux", - "unix" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - } -} diff --git a/node_modules/npm/node_modules/err-code/bower.json b/node_modules/npm/node_modules/err-code/bower.json deleted file mode 100644 index a39cb70..0000000 --- a/node_modules/npm/node_modules/err-code/bower.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "err-code", - "version": "1.1.1", - "description": "Create new error instances with a code and additional properties", - "main": "index.umd.js", - "homepage": "https://github.com/IndigoUnited/js-err-code", - "authors": [ - "IndigoUnited (http://indigounited.com)" - ], - "moduleType": [ - "amd", - "globals", - "node" - ], - "keywords": [ - "error", - "err", - "code", - "properties", - "property" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests" - ] -} diff --git a/node_modules/npm/node_modules/err-code/index.js b/node_modules/npm/node_modules/err-code/index.js deleted file mode 100644 index 9ff3e9c..0000000 --- a/node_modules/npm/node_modules/err-code/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -function assign(obj, props) { - for (const key in props) { - Object.defineProperty(obj, key, { - value: props[key], - enumerable: true, - configurable: true, - }); - } - - return obj; -} - -function createError(err, code, props) { - if (!err || typeof err === 'string') { - throw new TypeError('Please pass an Error to err-code'); - } - - if (!props) { - props = {}; - } - - if (typeof code === 'object') { - props = code; - code = undefined; - } - - if (code != null) { - props.code = code; - } - - try { - return assign(err, props); - } catch (_) { - props.message = err.message; - props.stack = err.stack; - - const ErrClass = function () {}; - - ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); - - return assign(new ErrClass(), props); - } -} - -module.exports = createError; diff --git a/node_modules/npm/node_modules/err-code/index.umd.js b/node_modules/npm/node_modules/err-code/index.umd.js deleted file mode 100644 index 4100726..0000000 --- a/node_modules/npm/node_modules/err-code/index.umd.js +++ /dev/null @@ -1,51 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.errCode = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i index.umd.js" - }, - "bugs": { - "url": "https://github.com/IndigoUnited/js-err-code/issues/" - }, - "repository": { - "type": "git", - "url": "git://github.com/IndigoUnited/js-err-code.git" - }, - "keywords": [ - "error", - "err", - "code", - "properties", - "property" - ], - "author": "IndigoUnited (http://indigounited.com)", - "license": "MIT", - "devDependencies": { - "@satazor/eslint-config": "^3.0.0", - "browserify": "^16.5.1", - "eslint": "^7.2.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1" - } -} diff --git a/node_modules/npm/node_modules/err-code/test/test.js b/node_modules/npm/node_modules/err-code/test/test.js deleted file mode 100644 index 22ba0a8..0000000 --- a/node_modules/npm/node_modules/err-code/test/test.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -const errcode = require('../index'); -const expect = require('expect.js'); - -describe('errcode', () => { - describe('string as first argument', () => { - it('should throw an error', () => { - expect(() => { errcode('my message'); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - }); - - describe('error as first argument', () => { - it('should accept an error and do nothing', () => { - const myErr = new Error('my message'); - const err = errcode(myErr); - - expect(err).to.be(myErr); - expect(err.hasOwnProperty(err.code)).to.be(false); - }); - - it('should accept an error and add a code', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, 'ESOME'); - - expect(err).to.be(myErr); - expect(err.code).to.be('ESOME'); - }); - - it('should accept an error object and add code & properties', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, 'ESOME', { foo: 'bar', bar: 'foo' }); - - expect(err).to.be.an(Error); - expect(err.code).to.be('ESOME'); - expect(err.foo).to.be('bar'); - expect(err.bar).to.be('foo'); - }); - - it('should create an error object without code but with properties', () => { - const myErr = new Error('my message'); - const err = errcode(myErr, { foo: 'bar', bar: 'foo' }); - - expect(err).to.be.an(Error); - expect(err.code).to.be(undefined); - expect(err.foo).to.be('bar'); - expect(err.bar).to.be('foo'); - }); - - it('should set a non-writable field', () => { - const myErr = new Error('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should add a code to frozen object', () => { - const myErr = new Error('my message'); - const err = errcode(Object.freeze(myErr), 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should to set a field that throws at assignment time', () => { - const myErr = new Error('my message'); - - Object.defineProperty(myErr, 'code', { - enumerable: true, - set() { - throw new Error('Nope!'); - }, - get() { - return 'derp'; - }, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.an(Error); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should retain error type', () => { - const myErr = new TypeError('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.a(TypeError); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - }); - - it('should add a code to a class that extends Error', () => { - class CustomError extends Error { - set code(val) { - throw new Error('Nope!'); - } - } - - const myErr = new CustomError('my message'); - - Object.defineProperty(myErr, 'code', { - value: 'derp', - writable: false, - configurable: false, - }); - const err = errcode(myErr, 'ERR_WAT'); - - expect(err).to.be.a(CustomError); - expect(err.stack).to.equal(myErr.stack); - expect(err.code).to.be('ERR_WAT'); - - // original prototype chain should be intact - expect(() => { - const otherErr = new CustomError('my message'); - - otherErr.code = 'derp'; - }).to.throwError(); - }); - - it('should support errors that are not Errors', () => { - const err = errcode({ - message: 'Oh noes!', - }, 'ERR_WAT'); - - expect(err.message).to.be('Oh noes!'); - expect(err.code).to.be('ERR_WAT'); - }); - }); - - describe('falsy first arguments', () => { - it('should not allow passing null as the first argument', () => { - expect(() => { errcode(null); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - - it('should not allow passing undefined as the first argument', () => { - expect(() => { errcode(undefined); }).to.throwError((err) => { - expect(err).to.be.a(TypeError); - }); - }); - }); -}); diff --git a/node_modules/npm/node_modules/event-target-shim/LICENSE b/node_modules/npm/node_modules/event-target-shim/LICENSE deleted file mode 100644 index c39e694..0000000 --- a/node_modules/npm/node_modules/event-target-shim/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Toru Nagashima - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.js b/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.js deleted file mode 100644 index 53ce220..0000000 --- a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.js +++ /dev/null @@ -1,871 +0,0 @@ -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -/** - * @typedef {object} PrivateData - * @property {EventTarget} eventTarget The event target. - * @property {{type:string}} event The original event object. - * @property {number} eventPhase The current event phase. - * @property {EventTarget|null} currentTarget The current event target. - * @property {boolean} canceled The flag to prevent default. - * @property {boolean} stopped The flag to stop propagation. - * @property {boolean} immediateStopped The flag to stop propagation immediately. - * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. - * @property {number} timeStamp The unix time. - * @private - */ - -/** - * Private data for event wrappers. - * @type {WeakMap} - * @private - */ -const privateData = new WeakMap(); - -/** - * Cache for wrapper classes. - * @type {WeakMap} - * @private - */ -const wrappers = new WeakMap(); - -/** - * Get private data. - * @param {Event} event The event object to get private data. - * @returns {PrivateData} The private data of the event. - * @private - */ -function pd(event) { - const retv = privateData.get(event); - console.assert( - retv != null, - "'this' is expected an Event object, but got", - event - ); - return retv -} - -/** - * https://dom.spec.whatwg.org/#set-the-canceled-flag - * @param data {PrivateData} private data. - */ -function setCancelFlag(data) { - if (data.passiveListener != null) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error( - "Unable to preventDefault inside passive event listener invocation.", - data.passiveListener - ); - } - return - } - if (!data.event.cancelable) { - return - } - - data.canceled = true; - if (typeof data.event.preventDefault === "function") { - data.event.preventDefault(); - } -} - -/** - * @see https://dom.spec.whatwg.org/#interface-event - * @private - */ -/** - * The event wrapper. - * @constructor - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Event|{type:string}} event The original event to wrap. - */ -function Event(eventTarget, event) { - privateData.set(this, { - eventTarget, - event, - eventPhase: 2, - currentTarget: eventTarget, - canceled: false, - stopped: false, - immediateStopped: false, - passiveListener: null, - timeStamp: event.timeStamp || Date.now(), - }); - - // https://heycam.github.io/webidl/#Unforgeable - Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); - - // Define accessors - const keys = Object.keys(event); - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in this)) { - Object.defineProperty(this, key, defineRedirectDescriptor(key)); - } - } -} - -// Should be enumerable, but class methods are not enumerable. -Event.prototype = { - /** - * The type of this event. - * @type {string} - */ - get type() { - return pd(this).event.type - }, - - /** - * The target of this event. - * @type {EventTarget} - */ - get target() { - return pd(this).eventTarget - }, - - /** - * The target of this event. - * @type {EventTarget} - */ - get currentTarget() { - return pd(this).currentTarget - }, - - /** - * @returns {EventTarget[]} The composed path of this event. - */ - composedPath() { - const currentTarget = pd(this).currentTarget; - if (currentTarget == null) { - return [] - } - return [currentTarget] - }, - - /** - * Constant of NONE. - * @type {number} - */ - get NONE() { - return 0 - }, - - /** - * Constant of CAPTURING_PHASE. - * @type {number} - */ - get CAPTURING_PHASE() { - return 1 - }, - - /** - * Constant of AT_TARGET. - * @type {number} - */ - get AT_TARGET() { - return 2 - }, - - /** - * Constant of BUBBLING_PHASE. - * @type {number} - */ - get BUBBLING_PHASE() { - return 3 - }, - - /** - * The target of this event. - * @type {number} - */ - get eventPhase() { - return pd(this).eventPhase - }, - - /** - * Stop event bubbling. - * @returns {void} - */ - stopPropagation() { - const data = pd(this); - - data.stopped = true; - if (typeof data.event.stopPropagation === "function") { - data.event.stopPropagation(); - } - }, - - /** - * Stop event bubbling. - * @returns {void} - */ - stopImmediatePropagation() { - const data = pd(this); - - data.stopped = true; - data.immediateStopped = true; - if (typeof data.event.stopImmediatePropagation === "function") { - data.event.stopImmediatePropagation(); - } - }, - - /** - * The flag to be bubbling. - * @type {boolean} - */ - get bubbles() { - return Boolean(pd(this).event.bubbles) - }, - - /** - * The flag to be cancelable. - * @type {boolean} - */ - get cancelable() { - return Boolean(pd(this).event.cancelable) - }, - - /** - * Cancel this event. - * @returns {void} - */ - preventDefault() { - setCancelFlag(pd(this)); - }, - - /** - * The flag to indicate cancellation state. - * @type {boolean} - */ - get defaultPrevented() { - return pd(this).canceled - }, - - /** - * The flag to be composed. - * @type {boolean} - */ - get composed() { - return Boolean(pd(this).event.composed) - }, - - /** - * The unix time of this event. - * @type {number} - */ - get timeStamp() { - return pd(this).timeStamp - }, - - /** - * The target of this event. - * @type {EventTarget} - * @deprecated - */ - get srcElement() { - return pd(this).eventTarget - }, - - /** - * The flag to stop event bubbling. - * @type {boolean} - * @deprecated - */ - get cancelBubble() { - return pd(this).stopped - }, - set cancelBubble(value) { - if (!value) { - return - } - const data = pd(this); - - data.stopped = true; - if (typeof data.event.cancelBubble === "boolean") { - data.event.cancelBubble = true; - } - }, - - /** - * The flag to indicate cancellation state. - * @type {boolean} - * @deprecated - */ - get returnValue() { - return !pd(this).canceled - }, - set returnValue(value) { - if (!value) { - setCancelFlag(pd(this)); - } - }, - - /** - * Initialize this event object. But do nothing under event dispatching. - * @param {string} type The event type. - * @param {boolean} [bubbles=false] The flag to be possible to bubble up. - * @param {boolean} [cancelable=false] The flag to be possible to cancel. - * @deprecated - */ - initEvent() { - // Do nothing. - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(Event.prototype, "constructor", { - value: Event, - configurable: true, - writable: true, -}); - -// Ensure `event instanceof window.Event` is `true`. -if (typeof window !== "undefined" && typeof window.Event !== "undefined") { - Object.setPrototypeOf(Event.prototype, window.Event.prototype); - - // Make association for wrappers. - wrappers.set(window.Event.prototype, Event); -} - -/** - * Get the property descriptor to redirect a given property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to redirect the property. - * @private - */ -function defineRedirectDescriptor(key) { - return { - get() { - return pd(this).event[key] - }, - set(value) { - pd(this).event[key] = value; - }, - configurable: true, - enumerable: true, - } -} - -/** - * Get the property descriptor to call a given method property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to call the method property. - * @private - */ -function defineCallDescriptor(key) { - return { - value() { - const event = pd(this).event; - return event[key].apply(event, arguments) - }, - configurable: true, - enumerable: true, - } -} - -/** - * Define new wrapper class. - * @param {Function} BaseEvent The base wrapper class. - * @param {Object} proto The prototype of the original event. - * @returns {Function} The defined wrapper class. - * @private - */ -function defineWrapper(BaseEvent, proto) { - const keys = Object.keys(proto); - if (keys.length === 0) { - return BaseEvent - } - - /** CustomEvent */ - function CustomEvent(eventTarget, event) { - BaseEvent.call(this, eventTarget, event); - } - - CustomEvent.prototype = Object.create(BaseEvent.prototype, { - constructor: { value: CustomEvent, configurable: true, writable: true }, - }); - - // Define accessors. - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in BaseEvent.prototype)) { - const descriptor = Object.getOwnPropertyDescriptor(proto, key); - const isFunc = typeof descriptor.value === "function"; - Object.defineProperty( - CustomEvent.prototype, - key, - isFunc - ? defineCallDescriptor(key) - : defineRedirectDescriptor(key) - ); - } - } - - return CustomEvent -} - -/** - * Get the wrapper class of a given prototype. - * @param {Object} proto The prototype of the original event to get its wrapper. - * @returns {Function} The wrapper class. - * @private - */ -function getWrapper(proto) { - if (proto == null || proto === Object.prototype) { - return Event - } - - let wrapper = wrappers.get(proto); - if (wrapper == null) { - wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); - wrappers.set(proto, wrapper); - } - return wrapper -} - -/** - * Wrap a given event to management a dispatching. - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Object} event The event to wrap. - * @returns {Event} The wrapper instance. - * @private - */ -function wrapEvent(eventTarget, event) { - const Wrapper = getWrapper(Object.getPrototypeOf(event)); - return new Wrapper(eventTarget, event) -} - -/** - * Get the immediateStopped flag of a given event. - * @param {Event} event The event to get. - * @returns {boolean} The flag to stop propagation immediately. - * @private - */ -function isStopped(event) { - return pd(event).immediateStopped -} - -/** - * Set the current event phase of a given event. - * @param {Event} event The event to set current target. - * @param {number} eventPhase New event phase. - * @returns {void} - * @private - */ -function setEventPhase(event, eventPhase) { - pd(event).eventPhase = eventPhase; -} - -/** - * Set the current target of a given event. - * @param {Event} event The event to set current target. - * @param {EventTarget|null} currentTarget New current target. - * @returns {void} - * @private - */ -function setCurrentTarget(event, currentTarget) { - pd(event).currentTarget = currentTarget; -} - -/** - * Set a passive listener of a given event. - * @param {Event} event The event to set current target. - * @param {Function|null} passiveListener New passive listener. - * @returns {void} - * @private - */ -function setPassiveListener(event, passiveListener) { - pd(event).passiveListener = passiveListener; -} - -/** - * @typedef {object} ListenerNode - * @property {Function} listener - * @property {1|2|3} listenerType - * @property {boolean} passive - * @property {boolean} once - * @property {ListenerNode|null} next - * @private - */ - -/** - * @type {WeakMap>} - * @private - */ -const listenersMap = new WeakMap(); - -// Listener types -const CAPTURE = 1; -const BUBBLE = 2; -const ATTRIBUTE = 3; - -/** - * Check whether a given value is an object or not. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is an object. - */ -function isObject(x) { - return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax -} - -/** - * Get listeners. - * @param {EventTarget} eventTarget The event target to get. - * @returns {Map} The listeners. - * @private - */ -function getListeners(eventTarget) { - const listeners = listenersMap.get(eventTarget); - if (listeners == null) { - throw new TypeError( - "'this' is expected an EventTarget object, but got another value." - ) - } - return listeners -} - -/** - * Get the property descriptor for the event attribute of a given event. - * @param {string} eventName The event name to get property descriptor. - * @returns {PropertyDescriptor} The property descriptor. - * @private - */ -function defineEventAttributeDescriptor(eventName) { - return { - get() { - const listeners = getListeners(this); - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - return node.listener - } - node = node.next; - } - return null - }, - - set(listener) { - if (typeof listener !== "function" && !isObject(listener)) { - listener = null; // eslint-disable-line no-param-reassign - } - const listeners = getListeners(this); - - // Traverse to the tail while removing old value. - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - // Remove old value. - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - node = node.next; - } - - // Add new value. - if (listener !== null) { - const newNode = { - listener, - listenerType: ATTRIBUTE, - passive: false, - once: false, - next: null, - }; - if (prev === null) { - listeners.set(eventName, newNode); - } else { - prev.next = newNode; - } - } - }, - configurable: true, - enumerable: true, - } -} - -/** - * Define an event attribute (e.g. `eventTarget.onclick`). - * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. - * @param {string} eventName The event name to define. - * @returns {void} - */ -function defineEventAttribute(eventTargetPrototype, eventName) { - Object.defineProperty( - eventTargetPrototype, - `on${eventName}`, - defineEventAttributeDescriptor(eventName) - ); -} - -/** - * Define a custom EventTarget with event attributes. - * @param {string[]} eventNames Event names for event attributes. - * @returns {EventTarget} The custom EventTarget. - * @private - */ -function defineCustomEventTarget(eventNames) { - /** CustomEventTarget */ - function CustomEventTarget() { - EventTarget.call(this); - } - - CustomEventTarget.prototype = Object.create(EventTarget.prototype, { - constructor: { - value: CustomEventTarget, - configurable: true, - writable: true, - }, - }); - - for (let i = 0; i < eventNames.length; ++i) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); - } - - return CustomEventTarget -} - -/** - * EventTarget. - * - * - This is constructor if no arguments. - * - This is a function which returns a CustomEventTarget constructor if there are arguments. - * - * For example: - * - * class A extends EventTarget {} - * class B extends EventTarget("message") {} - * class C extends EventTarget("message", "error") {} - * class D extends EventTarget(["message", "error"]) {} - */ -function EventTarget() { - /*eslint-disable consistent-return */ - if (this instanceof EventTarget) { - listenersMap.set(this, new Map()); - return - } - if (arguments.length === 1 && Array.isArray(arguments[0])) { - return defineCustomEventTarget(arguments[0]) - } - if (arguments.length > 0) { - const types = new Array(arguments.length); - for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; - } - return defineCustomEventTarget(types) - } - throw new TypeError("Cannot call a class as a function") - /*eslint-enable consistent-return */ -} - -// Should be enumerable, but class methods are not enumerable. -EventTarget.prototype = { - /** - * Add a given listener to this event target. - * @param {string} eventName The event name to add. - * @param {Function} listener The listener to add. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - addEventListener(eventName, listener, options) { - if (listener == null) { - return - } - if (typeof listener !== "function" && !isObject(listener)) { - throw new TypeError("'listener' should be a function or an object.") - } - - const listeners = getListeners(this); - const optionsIsObj = isObject(options); - const capture = optionsIsObj - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - const newNode = { - listener, - listenerType, - passive: optionsIsObj && Boolean(options.passive), - once: optionsIsObj && Boolean(options.once), - next: null, - }; - - // Set it as the first node if the first node is null. - let node = listeners.get(eventName); - if (node === undefined) { - listeners.set(eventName, newNode); - return - } - - // Traverse to the tail while checking duplication.. - let prev = null; - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - // Should ignore duplication. - return - } - prev = node; - node = node.next; - } - - // Add it. - prev.next = newNode; - }, - - /** - * Remove a given listener from this event target. - * @param {string} eventName The event name to remove. - * @param {Function} listener The listener to remove. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - removeEventListener(eventName, listener, options) { - if (listener == null) { - return - } - - const listeners = getListeners(this); - const capture = isObject(options) - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - return - } - - prev = node; - node = node.next; - } - }, - - /** - * Dispatch a given event. - * @param {Event|{type:string}} event The event to dispatch. - * @returns {boolean} `false` if canceled. - */ - dispatchEvent(event) { - if (event == null || typeof event.type !== "string") { - throw new TypeError('"event.type" should be a string.') - } - - // If listeners aren't registered, terminate. - const listeners = getListeners(this); - const eventName = event.type; - let node = listeners.get(eventName); - if (node == null) { - return true - } - - // Since we cannot rewrite several properties, so wrap object. - const wrappedEvent = wrapEvent(this, event); - - // This doesn't process capturing phase and bubbling phase. - // This isn't participating in a tree. - let prev = null; - while (node != null) { - // Remove this listener if it's once - if (node.once) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - // Call this listener - setPassiveListener( - wrappedEvent, - node.passive ? node.listener : null - ); - if (typeof node.listener === "function") { - try { - node.listener.call(this, wrappedEvent); - } catch (err) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error(err); - } - } - } else if ( - node.listenerType !== ATTRIBUTE && - typeof node.listener.handleEvent === "function" - ) { - node.listener.handleEvent(wrappedEvent); - } - - // Break if `event.stopImmediatePropagation` was called. - if (isStopped(wrappedEvent)) { - break - } - - node = node.next; - } - setPassiveListener(wrappedEvent, null); - setEventPhase(wrappedEvent, 0); - setCurrentTarget(wrappedEvent, null); - - return !wrappedEvent.defaultPrevented - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(EventTarget.prototype, "constructor", { - value: EventTarget, - configurable: true, - writable: true, -}); - -// Ensure `eventTarget instanceof window.EventTarget` is `true`. -if ( - typeof window !== "undefined" && - typeof window.EventTarget !== "undefined" -) { - Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); -} - -exports.defineEventAttribute = defineEventAttribute; -exports.EventTarget = EventTarget; -exports.default = EventTarget; - -module.exports = EventTarget -module.exports.EventTarget = module.exports["default"] = EventTarget -module.exports.defineEventAttribute = defineEventAttribute -//# sourceMappingURL=event-target-shim.js.map diff --git a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.mjs b/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.mjs deleted file mode 100644 index 114f3a1..0000000 --- a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.mjs +++ /dev/null @@ -1,862 +0,0 @@ -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */ -/** - * @typedef {object} PrivateData - * @property {EventTarget} eventTarget The event target. - * @property {{type:string}} event The original event object. - * @property {number} eventPhase The current event phase. - * @property {EventTarget|null} currentTarget The current event target. - * @property {boolean} canceled The flag to prevent default. - * @property {boolean} stopped The flag to stop propagation. - * @property {boolean} immediateStopped The flag to stop propagation immediately. - * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. - * @property {number} timeStamp The unix time. - * @private - */ - -/** - * Private data for event wrappers. - * @type {WeakMap} - * @private - */ -const privateData = new WeakMap(); - -/** - * Cache for wrapper classes. - * @type {WeakMap} - * @private - */ -const wrappers = new WeakMap(); - -/** - * Get private data. - * @param {Event} event The event object to get private data. - * @returns {PrivateData} The private data of the event. - * @private - */ -function pd(event) { - const retv = privateData.get(event); - console.assert( - retv != null, - "'this' is expected an Event object, but got", - event - ); - return retv -} - -/** - * https://dom.spec.whatwg.org/#set-the-canceled-flag - * @param data {PrivateData} private data. - */ -function setCancelFlag(data) { - if (data.passiveListener != null) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error( - "Unable to preventDefault inside passive event listener invocation.", - data.passiveListener - ); - } - return - } - if (!data.event.cancelable) { - return - } - - data.canceled = true; - if (typeof data.event.preventDefault === "function") { - data.event.preventDefault(); - } -} - -/** - * @see https://dom.spec.whatwg.org/#interface-event - * @private - */ -/** - * The event wrapper. - * @constructor - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Event|{type:string}} event The original event to wrap. - */ -function Event(eventTarget, event) { - privateData.set(this, { - eventTarget, - event, - eventPhase: 2, - currentTarget: eventTarget, - canceled: false, - stopped: false, - immediateStopped: false, - passiveListener: null, - timeStamp: event.timeStamp || Date.now(), - }); - - // https://heycam.github.io/webidl/#Unforgeable - Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); - - // Define accessors - const keys = Object.keys(event); - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in this)) { - Object.defineProperty(this, key, defineRedirectDescriptor(key)); - } - } -} - -// Should be enumerable, but class methods are not enumerable. -Event.prototype = { - /** - * The type of this event. - * @type {string} - */ - get type() { - return pd(this).event.type - }, - - /** - * The target of this event. - * @type {EventTarget} - */ - get target() { - return pd(this).eventTarget - }, - - /** - * The target of this event. - * @type {EventTarget} - */ - get currentTarget() { - return pd(this).currentTarget - }, - - /** - * @returns {EventTarget[]} The composed path of this event. - */ - composedPath() { - const currentTarget = pd(this).currentTarget; - if (currentTarget == null) { - return [] - } - return [currentTarget] - }, - - /** - * Constant of NONE. - * @type {number} - */ - get NONE() { - return 0 - }, - - /** - * Constant of CAPTURING_PHASE. - * @type {number} - */ - get CAPTURING_PHASE() { - return 1 - }, - - /** - * Constant of AT_TARGET. - * @type {number} - */ - get AT_TARGET() { - return 2 - }, - - /** - * Constant of BUBBLING_PHASE. - * @type {number} - */ - get BUBBLING_PHASE() { - return 3 - }, - - /** - * The target of this event. - * @type {number} - */ - get eventPhase() { - return pd(this).eventPhase - }, - - /** - * Stop event bubbling. - * @returns {void} - */ - stopPropagation() { - const data = pd(this); - - data.stopped = true; - if (typeof data.event.stopPropagation === "function") { - data.event.stopPropagation(); - } - }, - - /** - * Stop event bubbling. - * @returns {void} - */ - stopImmediatePropagation() { - const data = pd(this); - - data.stopped = true; - data.immediateStopped = true; - if (typeof data.event.stopImmediatePropagation === "function") { - data.event.stopImmediatePropagation(); - } - }, - - /** - * The flag to be bubbling. - * @type {boolean} - */ - get bubbles() { - return Boolean(pd(this).event.bubbles) - }, - - /** - * The flag to be cancelable. - * @type {boolean} - */ - get cancelable() { - return Boolean(pd(this).event.cancelable) - }, - - /** - * Cancel this event. - * @returns {void} - */ - preventDefault() { - setCancelFlag(pd(this)); - }, - - /** - * The flag to indicate cancellation state. - * @type {boolean} - */ - get defaultPrevented() { - return pd(this).canceled - }, - - /** - * The flag to be composed. - * @type {boolean} - */ - get composed() { - return Boolean(pd(this).event.composed) - }, - - /** - * The unix time of this event. - * @type {number} - */ - get timeStamp() { - return pd(this).timeStamp - }, - - /** - * The target of this event. - * @type {EventTarget} - * @deprecated - */ - get srcElement() { - return pd(this).eventTarget - }, - - /** - * The flag to stop event bubbling. - * @type {boolean} - * @deprecated - */ - get cancelBubble() { - return pd(this).stopped - }, - set cancelBubble(value) { - if (!value) { - return - } - const data = pd(this); - - data.stopped = true; - if (typeof data.event.cancelBubble === "boolean") { - data.event.cancelBubble = true; - } - }, - - /** - * The flag to indicate cancellation state. - * @type {boolean} - * @deprecated - */ - get returnValue() { - return !pd(this).canceled - }, - set returnValue(value) { - if (!value) { - setCancelFlag(pd(this)); - } - }, - - /** - * Initialize this event object. But do nothing under event dispatching. - * @param {string} type The event type. - * @param {boolean} [bubbles=false] The flag to be possible to bubble up. - * @param {boolean} [cancelable=false] The flag to be possible to cancel. - * @deprecated - */ - initEvent() { - // Do nothing. - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(Event.prototype, "constructor", { - value: Event, - configurable: true, - writable: true, -}); - -// Ensure `event instanceof window.Event` is `true`. -if (typeof window !== "undefined" && typeof window.Event !== "undefined") { - Object.setPrototypeOf(Event.prototype, window.Event.prototype); - - // Make association for wrappers. - wrappers.set(window.Event.prototype, Event); -} - -/** - * Get the property descriptor to redirect a given property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to redirect the property. - * @private - */ -function defineRedirectDescriptor(key) { - return { - get() { - return pd(this).event[key] - }, - set(value) { - pd(this).event[key] = value; - }, - configurable: true, - enumerable: true, - } -} - -/** - * Get the property descriptor to call a given method property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to call the method property. - * @private - */ -function defineCallDescriptor(key) { - return { - value() { - const event = pd(this).event; - return event[key].apply(event, arguments) - }, - configurable: true, - enumerable: true, - } -} - -/** - * Define new wrapper class. - * @param {Function} BaseEvent The base wrapper class. - * @param {Object} proto The prototype of the original event. - * @returns {Function} The defined wrapper class. - * @private - */ -function defineWrapper(BaseEvent, proto) { - const keys = Object.keys(proto); - if (keys.length === 0) { - return BaseEvent - } - - /** CustomEvent */ - function CustomEvent(eventTarget, event) { - BaseEvent.call(this, eventTarget, event); - } - - CustomEvent.prototype = Object.create(BaseEvent.prototype, { - constructor: { value: CustomEvent, configurable: true, writable: true }, - }); - - // Define accessors. - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in BaseEvent.prototype)) { - const descriptor = Object.getOwnPropertyDescriptor(proto, key); - const isFunc = typeof descriptor.value === "function"; - Object.defineProperty( - CustomEvent.prototype, - key, - isFunc - ? defineCallDescriptor(key) - : defineRedirectDescriptor(key) - ); - } - } - - return CustomEvent -} - -/** - * Get the wrapper class of a given prototype. - * @param {Object} proto The prototype of the original event to get its wrapper. - * @returns {Function} The wrapper class. - * @private - */ -function getWrapper(proto) { - if (proto == null || proto === Object.prototype) { - return Event - } - - let wrapper = wrappers.get(proto); - if (wrapper == null) { - wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); - wrappers.set(proto, wrapper); - } - return wrapper -} - -/** - * Wrap a given event to management a dispatching. - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Object} event The event to wrap. - * @returns {Event} The wrapper instance. - * @private - */ -function wrapEvent(eventTarget, event) { - const Wrapper = getWrapper(Object.getPrototypeOf(event)); - return new Wrapper(eventTarget, event) -} - -/** - * Get the immediateStopped flag of a given event. - * @param {Event} event The event to get. - * @returns {boolean} The flag to stop propagation immediately. - * @private - */ -function isStopped(event) { - return pd(event).immediateStopped -} - -/** - * Set the current event phase of a given event. - * @param {Event} event The event to set current target. - * @param {number} eventPhase New event phase. - * @returns {void} - * @private - */ -function setEventPhase(event, eventPhase) { - pd(event).eventPhase = eventPhase; -} - -/** - * Set the current target of a given event. - * @param {Event} event The event to set current target. - * @param {EventTarget|null} currentTarget New current target. - * @returns {void} - * @private - */ -function setCurrentTarget(event, currentTarget) { - pd(event).currentTarget = currentTarget; -} - -/** - * Set a passive listener of a given event. - * @param {Event} event The event to set current target. - * @param {Function|null} passiveListener New passive listener. - * @returns {void} - * @private - */ -function setPassiveListener(event, passiveListener) { - pd(event).passiveListener = passiveListener; -} - -/** - * @typedef {object} ListenerNode - * @property {Function} listener - * @property {1|2|3} listenerType - * @property {boolean} passive - * @property {boolean} once - * @property {ListenerNode|null} next - * @private - */ - -/** - * @type {WeakMap>} - * @private - */ -const listenersMap = new WeakMap(); - -// Listener types -const CAPTURE = 1; -const BUBBLE = 2; -const ATTRIBUTE = 3; - -/** - * Check whether a given value is an object or not. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is an object. - */ -function isObject(x) { - return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax -} - -/** - * Get listeners. - * @param {EventTarget} eventTarget The event target to get. - * @returns {Map} The listeners. - * @private - */ -function getListeners(eventTarget) { - const listeners = listenersMap.get(eventTarget); - if (listeners == null) { - throw new TypeError( - "'this' is expected an EventTarget object, but got another value." - ) - } - return listeners -} - -/** - * Get the property descriptor for the event attribute of a given event. - * @param {string} eventName The event name to get property descriptor. - * @returns {PropertyDescriptor} The property descriptor. - * @private - */ -function defineEventAttributeDescriptor(eventName) { - return { - get() { - const listeners = getListeners(this); - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - return node.listener - } - node = node.next; - } - return null - }, - - set(listener) { - if (typeof listener !== "function" && !isObject(listener)) { - listener = null; // eslint-disable-line no-param-reassign - } - const listeners = getListeners(this); - - // Traverse to the tail while removing old value. - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - // Remove old value. - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - node = node.next; - } - - // Add new value. - if (listener !== null) { - const newNode = { - listener, - listenerType: ATTRIBUTE, - passive: false, - once: false, - next: null, - }; - if (prev === null) { - listeners.set(eventName, newNode); - } else { - prev.next = newNode; - } - } - }, - configurable: true, - enumerable: true, - } -} - -/** - * Define an event attribute (e.g. `eventTarget.onclick`). - * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. - * @param {string} eventName The event name to define. - * @returns {void} - */ -function defineEventAttribute(eventTargetPrototype, eventName) { - Object.defineProperty( - eventTargetPrototype, - `on${eventName}`, - defineEventAttributeDescriptor(eventName) - ); -} - -/** - * Define a custom EventTarget with event attributes. - * @param {string[]} eventNames Event names for event attributes. - * @returns {EventTarget} The custom EventTarget. - * @private - */ -function defineCustomEventTarget(eventNames) { - /** CustomEventTarget */ - function CustomEventTarget() { - EventTarget.call(this); - } - - CustomEventTarget.prototype = Object.create(EventTarget.prototype, { - constructor: { - value: CustomEventTarget, - configurable: true, - writable: true, - }, - }); - - for (let i = 0; i < eventNames.length; ++i) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); - } - - return CustomEventTarget -} - -/** - * EventTarget. - * - * - This is constructor if no arguments. - * - This is a function which returns a CustomEventTarget constructor if there are arguments. - * - * For example: - * - * class A extends EventTarget {} - * class B extends EventTarget("message") {} - * class C extends EventTarget("message", "error") {} - * class D extends EventTarget(["message", "error"]) {} - */ -function EventTarget() { - /*eslint-disable consistent-return */ - if (this instanceof EventTarget) { - listenersMap.set(this, new Map()); - return - } - if (arguments.length === 1 && Array.isArray(arguments[0])) { - return defineCustomEventTarget(arguments[0]) - } - if (arguments.length > 0) { - const types = new Array(arguments.length); - for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; - } - return defineCustomEventTarget(types) - } - throw new TypeError("Cannot call a class as a function") - /*eslint-enable consistent-return */ -} - -// Should be enumerable, but class methods are not enumerable. -EventTarget.prototype = { - /** - * Add a given listener to this event target. - * @param {string} eventName The event name to add. - * @param {Function} listener The listener to add. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - addEventListener(eventName, listener, options) { - if (listener == null) { - return - } - if (typeof listener !== "function" && !isObject(listener)) { - throw new TypeError("'listener' should be a function or an object.") - } - - const listeners = getListeners(this); - const optionsIsObj = isObject(options); - const capture = optionsIsObj - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - const newNode = { - listener, - listenerType, - passive: optionsIsObj && Boolean(options.passive), - once: optionsIsObj && Boolean(options.once), - next: null, - }; - - // Set it as the first node if the first node is null. - let node = listeners.get(eventName); - if (node === undefined) { - listeners.set(eventName, newNode); - return - } - - // Traverse to the tail while checking duplication.. - let prev = null; - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - // Should ignore duplication. - return - } - prev = node; - node = node.next; - } - - // Add it. - prev.next = newNode; - }, - - /** - * Remove a given listener from this event target. - * @param {string} eventName The event name to remove. - * @param {Function} listener The listener to remove. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - removeEventListener(eventName, listener, options) { - if (listener == null) { - return - } - - const listeners = getListeners(this); - const capture = isObject(options) - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - return - } - - prev = node; - node = node.next; - } - }, - - /** - * Dispatch a given event. - * @param {Event|{type:string}} event The event to dispatch. - * @returns {boolean} `false` if canceled. - */ - dispatchEvent(event) { - if (event == null || typeof event.type !== "string") { - throw new TypeError('"event.type" should be a string.') - } - - // If listeners aren't registered, terminate. - const listeners = getListeners(this); - const eventName = event.type; - let node = listeners.get(eventName); - if (node == null) { - return true - } - - // Since we cannot rewrite several properties, so wrap object. - const wrappedEvent = wrapEvent(this, event); - - // This doesn't process capturing phase and bubbling phase. - // This isn't participating in a tree. - let prev = null; - while (node != null) { - // Remove this listener if it's once - if (node.once) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - // Call this listener - setPassiveListener( - wrappedEvent, - node.passive ? node.listener : null - ); - if (typeof node.listener === "function") { - try { - node.listener.call(this, wrappedEvent); - } catch (err) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error(err); - } - } - } else if ( - node.listenerType !== ATTRIBUTE && - typeof node.listener.handleEvent === "function" - ) { - node.listener.handleEvent(wrappedEvent); - } - - // Break if `event.stopImmediatePropagation` was called. - if (isStopped(wrappedEvent)) { - break - } - - node = node.next; - } - setPassiveListener(wrappedEvent, null); - setEventPhase(wrappedEvent, 0); - setCurrentTarget(wrappedEvent, null); - - return !wrappedEvent.defaultPrevented - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(EventTarget.prototype, "constructor", { - value: EventTarget, - configurable: true, - writable: true, -}); - -// Ensure `eventTarget instanceof window.EventTarget` is `true`. -if ( - typeof window !== "undefined" && - typeof window.EventTarget !== "undefined" -) { - Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); -} - -export default EventTarget; -export { defineEventAttribute, EventTarget }; -//# sourceMappingURL=event-target-shim.mjs.map diff --git a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.umd.js b/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.umd.js deleted file mode 100644 index e7cf5d4..0000000 --- a/node_modules/npm/node_modules/event-target-shim/dist/event-target-shim.umd.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.EventTargetShim={}))})(this,function(a){"use strict";function b(a){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},b(a)}function c(a){var b=u.get(a);return console.assert(null!=b,"'this' is expected an Event object, but got",a),b}function d(a){return null==a.passiveListener?void(!a.event.cancelable||(a.canceled=!0,"function"==typeof a.event.preventDefault&&a.event.preventDefault())):void("undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",a.passiveListener))}function e(a,b){u.set(this,{eventTarget:a,event:b,eventPhase:2,currentTarget:a,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:b.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});for(var c,d=Object.keys(b),e=0;e=6" - }, - "scripts": { - "preversion": "npm test", - "version": "npm run build && git add dist/*", - "postversion": "git push && git push --tags", - "clean": "rimraf .nyc_output coverage", - "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "lint": "eslint src test scripts --ext .js,.mjs", - "build": "rollup -c scripts/rollup.config.js", - "pretest": "npm run lint", - "test": "run-s test:*", - "test:mocha": "nyc --require ./scripts/babel-register mocha test/*.mjs", - "test:karma": "karma start scripts/karma.conf.js --single-run", - "watch": "run-p watch:*", - "watch:mocha": "mocha test/*.mjs --require ./scripts/babel-register --watch --watch-extensions js,mjs --growl", - "watch:karma": "karma start scripts/karma.conf.js --watch", - "codecov": "codecov" - }, - "devDependencies": { - "@babel/core": "^7.2.2", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/preset-env": "^7.2.3", - "@babel/register": "^7.0.0", - "@mysticatea/eslint-plugin": "^8.0.1", - "@mysticatea/spy": "^0.1.2", - "assert": "^1.4.1", - "codecov": "^3.1.0", - "eslint": "^5.12.1", - "karma": "^3.1.4", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.2", - "karma-firefox-launcher": "^1.0.0", - "karma-growl-reporter": "^1.0.0", - "karma-ie-launcher": "^1.0.0", - "karma-mocha": "^1.3.0", - "karma-rollup-preprocessor": "^7.0.0-rc.2", - "mocha": "^5.2.0", - "npm-run-all": "^4.1.5", - "nyc": "^13.1.0", - "opener": "^1.5.1", - "rimraf": "^2.6.3", - "rollup": "^1.1.1", - "rollup-plugin-babel": "^4.3.2", - "rollup-plugin-babel-minify": "^7.0.0", - "rollup-plugin-commonjs": "^9.2.0", - "rollup-plugin-json": "^3.1.0", - "rollup-plugin-node-resolve": "^4.0.0", - "rollup-watch": "^4.3.1", - "type-tester": "^1.0.0", - "typescript": "^3.2.4" - }, - "repository": { - "type": "git", - "url": "https://github.com/mysticatea/event-target-shim.git" - }, - "keywords": [ - "w3c", - "whatwg", - "eventtarget", - "event", - "events", - "shim" - ], - "author": "Toru Nagashima", - "license": "MIT", - "bugs": { - "url": "https://github.com/mysticatea/event-target-shim/issues" - }, - "homepage": "https://github.com/mysticatea/event-target-shim" -} diff --git a/node_modules/npm/node_modules/events/.airtap.yml b/node_modules/npm/node_modules/events/.airtap.yml deleted file mode 100644 index c7a8a87..0000000 --- a/node_modules/npm/node_modules/events/.airtap.yml +++ /dev/null @@ -1,15 +0,0 @@ -sauce_connect: true -loopback: airtap.local -browsers: - - name: chrome - version: latest - - name: firefox - version: latest - - name: safari - version: 9..latest - - name: iphone - version: latest - - name: ie - version: 9..latest - - name: microsoftedge - version: 13..latest diff --git a/node_modules/npm/node_modules/events/History.md b/node_modules/npm/node_modules/events/History.md deleted file mode 100644 index f48bf21..0000000 --- a/node_modules/npm/node_modules/events/History.md +++ /dev/null @@ -1,118 +0,0 @@ -# 3.3.0 - - - Support EventTarget emitters in `events.once` from Node.js 12.11.0. - - Now you can use the `events.once` function with objects that implement the EventTarget interface. This interface is used widely in - the DOM and other web APIs. - - ```js - var events = require('events'); - var assert = require('assert'); - - async function connect() { - var ws = new WebSocket('wss://example.com'); - await events.once(ws, 'open'); - assert(ws.readyState === WebSocket.OPEN); - } - - async function onClick() { - await events.once(document.body, 'click'); - alert('you clicked the page!'); - } - ``` - -# 3.2.0 - - - Add `events.once` from Node.js 11.13.0. - - To use this function, Promises must be supported in the environment. Use a polyfill like `es6-promise` if you support older browsers. - -# 3.1.0 (2020-01-08) - -`events` now matches the Node.js 11.12.0 API. - - - pass through return value in wrapped `emitter.once()` listeners - - Now, this works: - ```js - emitter.once('myevent', function () { return 1; }); - var listener = emitter.rawListeners('myevent')[0] - assert(listener() === 1); - ``` - Previously, `listener()` would return undefined regardless of the implementation. - - Ported from https://github.com/nodejs/node/commit/acc506c2d2771dab8d7bba6d3452bc5180dff7cf - - - Reduce code duplication in listener type check ([#67](https://github.com/Gozala/events/pull/67) by [@friederbluemle](https://github.com/friederbluemle)). - - Improve `emitter.once()` performance in some engines - -# 3.0.0 (2018-05-25) - -**This version drops support for IE8.** `events` no longer includes polyfills -for ES5 features. If you need to support older environments, use an ES5 shim -like [es5-shim](https://npmjs.com/package/es5-shim). Both the shim and sham -versions of es5-shim are necessary. - - - Update to events code from Node.js 10.x - - (semver major) Adds `off()` method - - Port more tests from Node.js - - Switch browser tests to airtap, making things more reliable - -# 2.1.0 (2018-05-25) - - - add Emitter#rawListeners from Node.js v9.4 - -# 2.0.0 (2018-02-02) - - - Update to events code from node.js 8.x - - Adds `prependListener()` and `prependOnceListener()` - - Adds `eventNames()` method - - (semver major) Unwrap `once()` listeners in `listeners()` - - copy tests from node.js - -Note that this version doubles the gzipped size, jumping from 1.1KB to 2.1KB, -due to new methods and runtime performance improvements. Be aware of that when -upgrading. - -# 1.1.1 (2016-06-22) - - - add more context to errors if they are not instanceof Error - -# 1.1.0 (2015-09-29) - - - add Emitter#listerCount (to match node v4 api) - -# 1.0.2 (2014-08-28) - - - remove un-reachable code - - update devDeps - -## 1.0.1 / 2014-05-11 - - - check for console.trace before using it - -## 1.0.0 / 2013-12-10 - - - Update to latest events code from node.js 0.10 - - copy tests from node.js - -## 0.4.0 / 2011-07-03 ## - - - Switching to graphquire@0.8.0 - -## 0.3.0 / 2011-07-03 ## - - - Switching to URL based module require. - -## 0.2.0 / 2011-06-10 ## - - - Simplified package structure. - - Graphquire for dependency management. - -## 0.1.1 / 2011-05-16 ## - - - Unhandled errors are logged via console.error - -## 0.1.0 / 2011-04-22 ## - - - Initial release diff --git a/node_modules/npm/node_modules/events/LICENSE b/node_modules/npm/node_modules/events/LICENSE deleted file mode 100644 index 52ed3b0..0000000 --- a/node_modules/npm/node_modules/events/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -MIT - -Copyright Joyent, Inc. and other Node contributors. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/events/events.js b/node_modules/npm/node_modules/events/events.js deleted file mode 100644 index 34b69a0..0000000 --- a/node_modules/npm/node_modules/events/events.js +++ /dev/null @@ -1,497 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -var R = typeof Reflect === 'object' ? Reflect : null -var ReflectApply = R && typeof R.apply === 'function' - ? R.apply - : function ReflectApply(target, receiver, args) { - return Function.prototype.apply.call(target, receiver, args); - } - -var ReflectOwnKeys -if (R && typeof R.ownKeys === 'function') { - ReflectOwnKeys = R.ownKeys -} else if (Object.getOwnPropertySymbols) { - ReflectOwnKeys = function ReflectOwnKeys(target) { - return Object.getOwnPropertyNames(target) - .concat(Object.getOwnPropertySymbols(target)); - }; -} else { - ReflectOwnKeys = function ReflectOwnKeys(target) { - return Object.getOwnPropertyNames(target); - }; -} - -function ProcessEmitWarning(warning) { - if (console && console.warn) console.warn(warning); -} - -var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { - return value !== value; -} - -function EventEmitter() { - EventEmitter.init.call(this); -} -module.exports = EventEmitter; -module.exports.once = once; - -// Backwards-compat with node 0.10.x -EventEmitter.EventEmitter = EventEmitter; - -EventEmitter.prototype._events = undefined; -EventEmitter.prototype._eventsCount = 0; -EventEmitter.prototype._maxListeners = undefined; - -// By default EventEmitters will print a warning if more than 10 listeners are -// added to it. This is a useful default which helps finding memory leaks. -var defaultMaxListeners = 10; - -function checkListener(listener) { - if (typeof listener !== 'function') { - throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); - } -} - -Object.defineProperty(EventEmitter, 'defaultMaxListeners', { - enumerable: true, - get: function() { - return defaultMaxListeners; - }, - set: function(arg) { - if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { - throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); - } - defaultMaxListeners = arg; - } -}); - -EventEmitter.init = function() { - - if (this._events === undefined || - this._events === Object.getPrototypeOf(this)._events) { - this._events = Object.create(null); - this._eventsCount = 0; - } - - this._maxListeners = this._maxListeners || undefined; -}; - -// Obviously not all Emitters should be limited to 10. This function allows -// that to be increased. Set to zero for unlimited. -EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { - if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { - throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); - } - this._maxListeners = n; - return this; -}; - -function _getMaxListeners(that) { - if (that._maxListeners === undefined) - return EventEmitter.defaultMaxListeners; - return that._maxListeners; -} - -EventEmitter.prototype.getMaxListeners = function getMaxListeners() { - return _getMaxListeners(this); -}; - -EventEmitter.prototype.emit = function emit(type) { - var args = []; - for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); - var doError = (type === 'error'); - - var events = this._events; - if (events !== undefined) - doError = (doError && events.error === undefined); - else if (!doError) - return false; - - // If there is no 'error' event listener then throw. - if (doError) { - var er; - if (args.length > 0) - er = args[0]; - if (er instanceof Error) { - // Note: The comments on the `throw` lines are intentional, they show - // up in Node's output if this results in an unhandled exception. - throw er; // Unhandled 'error' event - } - // At least give some kind of context to the user - var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); - err.context = er; - throw err; // Unhandled 'error' event - } - - var handler = events[type]; - - if (handler === undefined) - return false; - - if (typeof handler === 'function') { - ReflectApply(handler, this, args); - } else { - var len = handler.length; - var listeners = arrayClone(handler, len); - for (var i = 0; i < len; ++i) - ReflectApply(listeners[i], this, args); - } - - return true; -}; - -function _addListener(target, type, listener, prepend) { - var m; - var events; - var existing; - - checkListener(listener); - - events = target._events; - if (events === undefined) { - events = target._events = Object.create(null); - target._eventsCount = 0; - } else { - // To avoid recursion in the case that type === "newListener"! Before - // adding it to the listeners, first emit "newListener". - if (events.newListener !== undefined) { - target.emit('newListener', type, - listener.listener ? listener.listener : listener); - - // Re-assign `events` because a newListener handler could have caused the - // this._events to be assigned to a new object - events = target._events; - } - existing = events[type]; - } - - if (existing === undefined) { - // Optimize the case of one listener. Don't need the extra array object. - existing = events[type] = listener; - ++target._eventsCount; - } else { - if (typeof existing === 'function') { - // Adding the second element, need to change to array. - existing = events[type] = - prepend ? [listener, existing] : [existing, listener]; - // If we've already got an array, just append. - } else if (prepend) { - existing.unshift(listener); - } else { - existing.push(listener); - } - - // Check for listener leak - m = _getMaxListeners(target); - if (m > 0 && existing.length > m && !existing.warned) { - existing.warned = true; - // No error code for this since it is a Warning - // eslint-disable-next-line no-restricted-syntax - var w = new Error('Possible EventEmitter memory leak detected. ' + - existing.length + ' ' + String(type) + ' listeners ' + - 'added. Use emitter.setMaxListeners() to ' + - 'increase limit'); - w.name = 'MaxListenersExceededWarning'; - w.emitter = target; - w.type = type; - w.count = existing.length; - ProcessEmitWarning(w); - } - } - - return target; -} - -EventEmitter.prototype.addListener = function addListener(type, listener) { - return _addListener(this, type, listener, false); -}; - -EventEmitter.prototype.on = EventEmitter.prototype.addListener; - -EventEmitter.prototype.prependListener = - function prependListener(type, listener) { - return _addListener(this, type, listener, true); - }; - -function onceWrapper() { - if (!this.fired) { - this.target.removeListener(this.type, this.wrapFn); - this.fired = true; - if (arguments.length === 0) - return this.listener.call(this.target); - return this.listener.apply(this.target, arguments); - } -} - -function _onceWrap(target, type, listener) { - var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; - var wrapped = onceWrapper.bind(state); - wrapped.listener = listener; - state.wrapFn = wrapped; - return wrapped; -} - -EventEmitter.prototype.once = function once(type, listener) { - checkListener(listener); - this.on(type, _onceWrap(this, type, listener)); - return this; -}; - -EventEmitter.prototype.prependOnceListener = - function prependOnceListener(type, listener) { - checkListener(listener); - this.prependListener(type, _onceWrap(this, type, listener)); - return this; - }; - -// Emits a 'removeListener' event if and only if the listener was removed. -EventEmitter.prototype.removeListener = - function removeListener(type, listener) { - var list, events, position, i, originalListener; - - checkListener(listener); - - events = this._events; - if (events === undefined) - return this; - - list = events[type]; - if (list === undefined) - return this; - - if (list === listener || list.listener === listener) { - if (--this._eventsCount === 0) - this._events = Object.create(null); - else { - delete events[type]; - if (events.removeListener) - this.emit('removeListener', type, list.listener || listener); - } - } else if (typeof list !== 'function') { - position = -1; - - for (i = list.length - 1; i >= 0; i--) { - if (list[i] === listener || list[i].listener === listener) { - originalListener = list[i].listener; - position = i; - break; - } - } - - if (position < 0) - return this; - - if (position === 0) - list.shift(); - else { - spliceOne(list, position); - } - - if (list.length === 1) - events[type] = list[0]; - - if (events.removeListener !== undefined) - this.emit('removeListener', type, originalListener || listener); - } - - return this; - }; - -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; - -EventEmitter.prototype.removeAllListeners = - function removeAllListeners(type) { - var listeners, events, i; - - events = this._events; - if (events === undefined) - return this; - - // not listening for removeListener, no need to emit - if (events.removeListener === undefined) { - if (arguments.length === 0) { - this._events = Object.create(null); - this._eventsCount = 0; - } else if (events[type] !== undefined) { - if (--this._eventsCount === 0) - this._events = Object.create(null); - else - delete events[type]; - } - return this; - } - - // emit removeListener for all listeners on all events - if (arguments.length === 0) { - var keys = Object.keys(events); - var key; - for (i = 0; i < keys.length; ++i) { - key = keys[i]; - if (key === 'removeListener') continue; - this.removeAllListeners(key); - } - this.removeAllListeners('removeListener'); - this._events = Object.create(null); - this._eventsCount = 0; - return this; - } - - listeners = events[type]; - - if (typeof listeners === 'function') { - this.removeListener(type, listeners); - } else if (listeners !== undefined) { - // LIFO order - for (i = listeners.length - 1; i >= 0; i--) { - this.removeListener(type, listeners[i]); - } - } - - return this; - }; - -function _listeners(target, type, unwrap) { - var events = target._events; - - if (events === undefined) - return []; - - var evlistener = events[type]; - if (evlistener === undefined) - return []; - - if (typeof evlistener === 'function') - return unwrap ? [evlistener.listener || evlistener] : [evlistener]; - - return unwrap ? - unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); -} - -EventEmitter.prototype.listeners = function listeners(type) { - return _listeners(this, type, true); -}; - -EventEmitter.prototype.rawListeners = function rawListeners(type) { - return _listeners(this, type, false); -}; - -EventEmitter.listenerCount = function(emitter, type) { - if (typeof emitter.listenerCount === 'function') { - return emitter.listenerCount(type); - } else { - return listenerCount.call(emitter, type); - } -}; - -EventEmitter.prototype.listenerCount = listenerCount; -function listenerCount(type) { - var events = this._events; - - if (events !== undefined) { - var evlistener = events[type]; - - if (typeof evlistener === 'function') { - return 1; - } else if (evlistener !== undefined) { - return evlistener.length; - } - } - - return 0; -} - -EventEmitter.prototype.eventNames = function eventNames() { - return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; -}; - -function arrayClone(arr, n) { - var copy = new Array(n); - for (var i = 0; i < n; ++i) - copy[i] = arr[i]; - return copy; -} - -function spliceOne(list, index) { - for (; index + 1 < list.length; index++) - list[index] = list[index + 1]; - list.pop(); -} - -function unwrapListeners(arr) { - var ret = new Array(arr.length); - for (var i = 0; i < ret.length; ++i) { - ret[i] = arr[i].listener || arr[i]; - } - return ret; -} - -function once(emitter, name) { - return new Promise(function (resolve, reject) { - function errorListener(err) { - emitter.removeListener(name, resolver); - reject(err); - } - - function resolver() { - if (typeof emitter.removeListener === 'function') { - emitter.removeListener('error', errorListener); - } - resolve([].slice.call(arguments)); - }; - - eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); - if (name !== 'error') { - addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); - } - }); -} - -function addErrorHandlerIfEventEmitter(emitter, handler, flags) { - if (typeof emitter.on === 'function') { - eventTargetAgnosticAddListener(emitter, 'error', handler, flags); - } -} - -function eventTargetAgnosticAddListener(emitter, name, listener, flags) { - if (typeof emitter.on === 'function') { - if (flags.once) { - emitter.once(name, listener); - } else { - emitter.on(name, listener); - } - } else if (typeof emitter.addEventListener === 'function') { - // EventTarget does not have `error` event semantics like Node - // EventEmitters, we do not listen for `error` events here. - emitter.addEventListener(name, function wrapListener(arg) { - // IE does not have builtin `{ once: true }` support so we - // have to do it manually. - if (flags.once) { - emitter.removeEventListener(name, wrapListener); - } - listener(arg); - }); - } else { - throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); - } -} diff --git a/node_modules/npm/node_modules/events/package.json b/node_modules/npm/node_modules/events/package.json deleted file mode 100644 index b9580d8..0000000 --- a/node_modules/npm/node_modules/events/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "events", - "version": "3.3.0", - "description": "Node's event emitter for all engines.", - "keywords": [ - "events", - "eventEmitter", - "eventDispatcher", - "listeners" - ], - "author": "Irakli Gozalishvili (http://jeditoolkit.com)", - "repository": { - "type": "git", - "url": "git://github.com/Gozala/events.git", - "web": "https://github.com/Gozala/events" - }, - "bugs": { - "url": "http://github.com/Gozala/events/issues/" - }, - "main": "./events.js", - "engines": { - "node": ">=0.8.x" - }, - "devDependencies": { - "airtap": "^1.0.0", - "functions-have-names": "^1.2.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "isarray": "^2.0.5", - "tape": "^5.0.0" - }, - "scripts": { - "test": "node tests/index.js", - "test:browsers": "airtap -- tests/index.js" - }, - "license": "MIT" -} diff --git a/node_modules/npm/node_modules/events/security.md b/node_modules/npm/node_modules/events/security.md deleted file mode 100644 index a14ace6..0000000 --- a/node_modules/npm/node_modules/events/security.md +++ /dev/null @@ -1,10 +0,0 @@ -# Security Policy - -## Supported Versions -Only the latest major version is supported at any given time. - -## Reporting a Vulnerability - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. diff --git a/node_modules/npm/node_modules/events/tests/add-listeners.js b/node_modules/npm/node_modules/events/tests/add-listeners.js deleted file mode 100644 index 9b57827..0000000 --- a/node_modules/npm/node_modules/events/tests/add-listeners.js +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var EventEmitter = require('../'); - -{ - var ee = new EventEmitter(); - var events_new_listener_emitted = []; - var listeners_new_listener_emitted = []; - - // Sanity check - assert.strictEqual(ee.addListener, ee.on); - - ee.on('newListener', function(event, listener) { - // Don't track newListener listeners. - if (event === 'newListener') - return; - - events_new_listener_emitted.push(event); - listeners_new_listener_emitted.push(listener); - }); - - var hello = common.mustCall(function(a, b) { - assert.strictEqual('a', a); - assert.strictEqual('b', b); - }); - - ee.once('newListener', function(name, listener) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(listener, hello); - - var listeners = this.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - }); - - ee.on('hello', hello); - ee.once('foo', assert.fail); - - assert.ok(Array.isArray(events_new_listener_emitted)); - assert.strictEqual(events_new_listener_emitted.length, 2); - assert.strictEqual(events_new_listener_emitted[0], 'hello'); - assert.strictEqual(events_new_listener_emitted[1], 'foo'); - - assert.ok(Array.isArray(listeners_new_listener_emitted)); - assert.strictEqual(listeners_new_listener_emitted.length, 2); - assert.strictEqual(listeners_new_listener_emitted[0], hello); - assert.strictEqual(listeners_new_listener_emitted[1], assert.fail); - - ee.emit('hello', 'a', 'b'); -} - -// just make sure that this doesn't throw: -{ - var f = new EventEmitter(); - - f.setMaxListeners(0); -} - -{ - var listen1 = function() {}; - var listen2 = function() {}; - var ee = new EventEmitter(); - - ee.once('newListener', function() { - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - ee.once('newListener', function() { - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - }); - ee.on('hello', listen2); - }); - ee.on('hello', listen1); - // The order of listeners on an event is not always the order in which the - // listeners were added. - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listen2); - assert.strictEqual(listeners[1], listen1); -} - -// Verify that the listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.on('foo', null); -}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); diff --git a/node_modules/npm/node_modules/events/tests/check-listener-leaks.js b/node_modules/npm/node_modules/events/tests/check-listener-leaks.js deleted file mode 100644 index 7fce48f..0000000 --- a/node_modules/npm/node_modules/events/tests/check-listener-leaks.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var events = require('../'); - -// Redirect warning output to tape. -var consoleWarn = console.warn; -console.warn = common.test.comment; - -common.test.on('end', function () { - console.warn = consoleWarn; -}); - -// default -{ - var e = new events.EventEmitter(); - - for (var i = 0; i < 10; i++) { - e.on('default', common.mustNotCall()); - } - assert.ok(!e._events['default'].hasOwnProperty('warned')); - e.on('default', common.mustNotCall()); - assert.ok(e._events['default'].warned); - - // specific - e.setMaxListeners(5); - for (var i = 0; i < 5; i++) { - e.on('specific', common.mustNotCall()); - } - assert.ok(!e._events['specific'].hasOwnProperty('warned')); - e.on('specific', common.mustNotCall()); - assert.ok(e._events['specific'].warned); - - // only one - e.setMaxListeners(1); - e.on('only one', common.mustNotCall()); - assert.ok(!e._events['only one'].hasOwnProperty('warned')); - e.on('only one', common.mustNotCall()); - assert.ok(e._events['only one'].hasOwnProperty('warned')); - - // unlimited - e.setMaxListeners(0); - for (var i = 0; i < 1000; i++) { - e.on('unlimited', common.mustNotCall()); - } - assert.ok(!e._events['unlimited'].hasOwnProperty('warned')); -} - -// process-wide -{ - events.EventEmitter.defaultMaxListeners = 42; - var e = new events.EventEmitter(); - - for (var i = 0; i < 42; ++i) { - e.on('fortytwo', common.mustNotCall()); - } - assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); - e.on('fortytwo', common.mustNotCall()); - assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); - delete e._events['fortytwo'].warned; - - events.EventEmitter.defaultMaxListeners = 44; - e.on('fortytwo', common.mustNotCall()); - assert.ok(!e._events['fortytwo'].hasOwnProperty('warned')); - e.on('fortytwo', common.mustNotCall()); - assert.ok(e._events['fortytwo'].hasOwnProperty('warned')); -} - -// but _maxListeners still has precedence over defaultMaxListeners -{ - events.EventEmitter.defaultMaxListeners = 42; - var e = new events.EventEmitter(); - e.setMaxListeners(1); - e.on('uno', common.mustNotCall()); - assert.ok(!e._events['uno'].hasOwnProperty('warned')); - e.on('uno', common.mustNotCall()); - assert.ok(e._events['uno'].hasOwnProperty('warned')); - - // chainable - assert.strictEqual(e, e.setMaxListeners(1)); -} diff --git a/node_modules/npm/node_modules/events/tests/common.js b/node_modules/npm/node_modules/events/tests/common.js deleted file mode 100644 index 49569b0..0000000 --- a/node_modules/npm/node_modules/events/tests/common.js +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var test = require('tape'); -var assert = require('assert'); - -var noop = function() {}; - -var mustCallChecks = []; - -function runCallChecks(exitCode) { - if (exitCode !== 0) return; - - var failed = filter(mustCallChecks, function(context) { - if ('minimum' in context) { - context.messageSegment = 'at least ' + context.minimum; - return context.actual < context.minimum; - } else { - context.messageSegment = 'exactly ' + context.exact; - return context.actual !== context.exact; - } - }); - - for (var i = 0; i < failed.length; i++) { - var context = failed[i]; - console.log('Mismatched %s function calls. Expected %s, actual %d.', - context.name, - context.messageSegment, - context.actual); - // IE8 has no .stack - if (context.stack) console.log(context.stack.split('\n').slice(2).join('\n')); - } - - assert.strictEqual(failed.length, 0); -} - -exports.mustCall = function(fn, exact) { - return _mustCallInner(fn, exact, 'exact'); -}; - -function _mustCallInner(fn, criteria, field) { - if (typeof criteria == 'undefined') criteria = 1; - - if (typeof fn === 'number') { - criteria = fn; - fn = noop; - } else if (fn === undefined) { - fn = noop; - } - - if (typeof criteria !== 'number') - throw new TypeError('Invalid ' + field + ' value: ' + criteria); - - var context = { - actual: 0, - stack: (new Error()).stack, - name: fn.name || '' - }; - - context[field] = criteria; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) test.onFinish(function() { runCallChecks(0); }); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -} - -exports.mustNotCall = function(msg) { - return function mustNotCall() { - assert.fail(msg || 'function should not have been called'); - }; -}; - -function filter(arr, fn) { - if (arr.filter) return arr.filter(fn); - var filtered = []; - for (var i = 0; i < arr.length; i++) { - if (fn(arr[i], i, arr)) filtered.push(arr[i]); - } - return filtered -} diff --git a/node_modules/npm/node_modules/events/tests/errors.js b/node_modules/npm/node_modules/events/tests/errors.js deleted file mode 100644 index a23df43..0000000 --- a/node_modules/npm/node_modules/events/tests/errors.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -var assert = require('assert'); -var EventEmitter = require('../'); - -var EE = new EventEmitter(); - -assert.throws(function () { - EE.emit('error', 'Accepts a string'); -}, 'Error: Unhandled error. (Accepts a string)'); - -assert.throws(function () { - EE.emit('error', { message: 'Error!' }); -}, 'Unhandled error. ([object Object])'); diff --git a/node_modules/npm/node_modules/events/tests/events-list.js b/node_modules/npm/node_modules/events/tests/events-list.js deleted file mode 100644 index 08aa621..0000000 --- a/node_modules/npm/node_modules/events/tests/events-list.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var EventEmitter = require('../'); -var assert = require('assert'); - -var EE = new EventEmitter(); -var m = function() {}; -EE.on('foo', function() {}); -assert.equal(1, EE.eventNames().length); -assert.equal('foo', EE.eventNames()[0]); -EE.on('bar', m); -assert.equal(2, EE.eventNames().length); -assert.equal('foo', EE.eventNames()[0]); -assert.equal('bar', EE.eventNames()[1]); -EE.removeListener('bar', m); -assert.equal(1, EE.eventNames().length); -assert.equal('foo', EE.eventNames()[0]); - -if (typeof Symbol !== 'undefined') { - var s = Symbol('s'); - EE.on(s, m); - assert.equal(2, EE.eventNames().length); - assert.equal('foo', EE.eventNames()[0]); - assert.equal(s, EE.eventNames()[1]); - EE.removeListener(s, m); - assert.equal(1, EE.eventNames().length); - assert.equal('foo', EE.eventNames()[0]); -} diff --git a/node_modules/npm/node_modules/events/tests/events-once.js b/node_modules/npm/node_modules/events/tests/events-once.js deleted file mode 100644 index dae8649..0000000 --- a/node_modules/npm/node_modules/events/tests/events-once.js +++ /dev/null @@ -1,234 +0,0 @@ -'use strict'; - -var common = require('./common'); -var EventEmitter = require('../').EventEmitter; -var once = require('../').once; -var has = require('has'); -var assert = require('assert'); - -function Event(type) { - this.type = type; -} - -function EventTargetMock() { - this.events = {}; - - this.addEventListener = common.mustCall(this.addEventListener); - this.removeEventListener = common.mustCall(this.removeEventListener); -} - -EventTargetMock.prototype.addEventListener = function addEventListener(name, listener, options) { - if (!(name in this.events)) { - this.events[name] = { listeners: [], options: options || {} } - } - this.events[name].listeners.push(listener); -}; - -EventTargetMock.prototype.removeEventListener = function removeEventListener(name, callback) { - if (!(name in this.events)) { - return; - } - var event = this.events[name]; - var stack = event.listeners; - - for (var i = 0, l = stack.length; i < l; i++) { - if (stack[i] === callback) { - stack.splice(i, 1); - if (stack.length === 0) { - delete this.events[name]; - } - return; - } - } -}; - -EventTargetMock.prototype.dispatchEvent = function dispatchEvent(arg) { - if (!(arg.type in this.events)) { - return true; - } - - var event = this.events[arg.type]; - var stack = event.listeners.slice(); - - for (var i = 0, l = stack.length; i < l; i++) { - stack[i].call(null, arg); - if (event.options.once) { - this.removeEventListener(arg.type, stack[i]); - } - } - return !arg.defaultPrevented; -}; - -function onceAnEvent() { - var ee = new EventEmitter(); - - process.nextTick(function () { - ee.emit('myevent', 42); - }); - - return once(ee, 'myevent').then(function (args) { - var value = args[0] - assert.strictEqual(value, 42); - assert.strictEqual(ee.listenerCount('error'), 0); - assert.strictEqual(ee.listenerCount('myevent'), 0); - }); -} - -function onceAnEventWithTwoArgs() { - var ee = new EventEmitter(); - - process.nextTick(function () { - ee.emit('myevent', 42, 24); - }); - - return once(ee, 'myevent').then(function (value) { - assert.strictEqual(value.length, 2); - assert.strictEqual(value[0], 42); - assert.strictEqual(value[1], 24); - }); -} - -function catchesErrors() { - var ee = new EventEmitter(); - - var expected = new Error('kaboom'); - var err; - process.nextTick(function () { - ee.emit('error', expected); - }); - - return once(ee, 'myevent').then(function () { - throw new Error('should reject') - }, function (err) { - assert.strictEqual(err, expected); - assert.strictEqual(ee.listenerCount('error'), 0); - assert.strictEqual(ee.listenerCount('myevent'), 0); - }); -} - -function stopListeningAfterCatchingError() { - var ee = new EventEmitter(); - - var expected = new Error('kaboom'); - var err; - process.nextTick(function () { - ee.emit('error', expected); - ee.emit('myevent', 42, 24); - }); - - // process.on('multipleResolves', common.mustNotCall()); - - return once(ee, 'myevent').then(common.mustNotCall, function (err) { - // process.removeAllListeners('multipleResolves'); - assert.strictEqual(err, expected); - assert.strictEqual(ee.listenerCount('error'), 0); - assert.strictEqual(ee.listenerCount('myevent'), 0); - }); -} - -function onceError() { - var ee = new EventEmitter(); - - var expected = new Error('kaboom'); - process.nextTick(function () { - ee.emit('error', expected); - }); - - var promise = once(ee, 'error'); - assert.strictEqual(ee.listenerCount('error'), 1); - return promise.then(function (args) { - var err = args[0] - assert.strictEqual(err, expected); - assert.strictEqual(ee.listenerCount('error'), 0); - assert.strictEqual(ee.listenerCount('myevent'), 0); - }); -} - -function onceWithEventTarget() { - var et = new EventTargetMock(); - var event = new Event('myevent'); - process.nextTick(function () { - et.dispatchEvent(event); - }); - return once(et, 'myevent').then(function (args) { - var value = args[0]; - assert.strictEqual(value, event); - assert.strictEqual(has(et.events, 'myevent'), false); - }); -} - -function onceWithEventTargetError() { - var et = new EventTargetMock(); - var error = new Event('error'); - process.nextTick(function () { - et.dispatchEvent(error); - }); - return once(et, 'error').then(function (args) { - var err = args[0]; - assert.strictEqual(err, error); - assert.strictEqual(has(et.events, 'error'), false); - }); -} - -function prioritizesEventEmitter() { - var ee = new EventEmitter(); - ee.addEventListener = assert.fail; - ee.removeAllListeners = assert.fail; - process.nextTick(function () { - ee.emit('foo'); - }); - return once(ee, 'foo'); -} - -var allTests = [ - onceAnEvent(), - onceAnEventWithTwoArgs(), - catchesErrors(), - stopListeningAfterCatchingError(), - onceError(), - onceWithEventTarget(), - onceWithEventTargetError(), - prioritizesEventEmitter() -]; - -var hasBrowserEventTarget = false; -try { - hasBrowserEventTarget = typeof (new window.EventTarget().addEventListener) === 'function' && - new window.Event('xyz').type === 'xyz'; -} catch (err) {} - -if (hasBrowserEventTarget) { - var onceWithBrowserEventTarget = function onceWithBrowserEventTarget() { - var et = new window.EventTarget(); - var event = new window.Event('myevent'); - process.nextTick(function () { - et.dispatchEvent(event); - }); - return once(et, 'myevent').then(function (args) { - var value = args[0]; - assert.strictEqual(value, event); - assert.strictEqual(has(et.events, 'myevent'), false); - }); - } - - var onceWithBrowserEventTargetError = function onceWithBrowserEventTargetError() { - var et = new window.EventTarget(); - var error = new window.Event('error'); - process.nextTick(function () { - et.dispatchEvent(error); - }); - return once(et, 'error').then(function (args) { - var err = args[0]; - assert.strictEqual(err, error); - assert.strictEqual(has(et.events, 'error'), false); - }); - } - - common.test.comment('Testing with browser built-in EventTarget'); - allTests.push([ - onceWithBrowserEventTarget(), - onceWithBrowserEventTargetError() - ]); -} - -module.exports = Promise.all(allTests); diff --git a/node_modules/npm/node_modules/events/tests/index.js b/node_modules/npm/node_modules/events/tests/index.js deleted file mode 100644 index 2d739e6..0000000 --- a/node_modules/npm/node_modules/events/tests/index.js +++ /dev/null @@ -1,64 +0,0 @@ -var test = require('tape'); -var functionsHaveNames = require('functions-have-names'); -var hasSymbols = require('has-symbols'); - -require('./legacy-compat'); -var common = require('./common'); - -// we do this to easily wrap each file in a mocha test -// and also have browserify be able to statically analyze this file -var orig_require = require; -var require = function(file) { - test(file, function(t) { - // Store the tape object so tests can access it. - t.on('end', function () { delete common.test; }); - common.test = t; - - try { - var exp = orig_require(file); - if (exp && exp.then) { - exp.then(function () { t.end(); }, t.fail); - return; - } - } catch (err) { - t.fail(err); - } - t.end(); - }); -}; - -require('./add-listeners.js'); -require('./check-listener-leaks.js'); -require('./errors.js'); -require('./events-list.js'); -if (typeof Promise === 'function') { - require('./events-once.js'); -} else { - // Promise support is not available. - test('./events-once.js', { skip: true }, function () {}); -} -require('./listener-count.js'); -require('./listeners-side-effects.js'); -require('./listeners.js'); -require('./max-listeners.js'); -if (functionsHaveNames()) { - require('./method-names.js'); -} else { - // Function.name is not supported in IE - test('./method-names.js', { skip: true }, function () {}); -} -require('./modify-in-emit.js'); -require('./num-args.js'); -require('./once.js'); -require('./prepend.js'); -require('./set-max-listeners-side-effects.js'); -require('./special-event-names.js'); -require('./subclass.js'); -if (hasSymbols()) { - require('./symbols.js'); -} else { - // Symbol is not available. - test('./symbols.js', { skip: true }, function () {}); -} -require('./remove-all-listeners.js'); -require('./remove-listeners.js'); diff --git a/node_modules/npm/node_modules/events/tests/legacy-compat.js b/node_modules/npm/node_modules/events/tests/legacy-compat.js deleted file mode 100644 index a402be6..0000000 --- a/node_modules/npm/node_modules/events/tests/legacy-compat.js +++ /dev/null @@ -1,16 +0,0 @@ -// sigh... life is hard -if (!global.console) { - console = {} -} - -var fns = ['log', 'error', 'trace']; -for (var i=0 ; ifoo should not be emitted'); -} - -e.once('foo', remove); -e.removeListener('foo', remove); -e.emit('foo'); - -e.once('e', common.mustCall(function() { - e.emit('e'); -})); - -e.once('e', common.mustCall()); - -e.emit('e'); - -// Verify that the listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.once('foo', null); -}, /^TypeError: The "listener" argument must be of type Function. Received type object$/); - -{ - // once() has different code paths based on the number of arguments being - // emitted. Verify that all of the cases are covered. - var maxArgs = 4; - - for (var i = 0; i <= maxArgs; ++i) { - var ee = new EventEmitter(); - var args = ['foo']; - - for (var j = 0; j < i; ++j) - args.push(j); - - ee.once('foo', common.mustCall(function() { - var params = Array.prototype.slice.call(arguments); - var restArgs = args.slice(1); - assert.ok(Array.isArray(params)); - assert.strictEqual(params.length, restArgs.length); - for (var index = 0; index < params.length; index++) { - var param = params[index]; - assert.strictEqual(param, restArgs[index]); - } - })); - - EventEmitter.prototype.emit.apply(ee, args); - } -} diff --git a/node_modules/npm/node_modules/events/tests/prepend.js b/node_modules/npm/node_modules/events/tests/prepend.js deleted file mode 100644 index 79afde0..0000000 --- a/node_modules/npm/node_modules/events/tests/prepend.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -var common = require('./common'); -var EventEmitter = require('../'); -var assert = require('assert'); - -var myEE = new EventEmitter(); -var m = 0; -// This one comes last. -myEE.on('foo', common.mustCall(function () { - assert.strictEqual(m, 2); -})); - -// This one comes second. -myEE.prependListener('foo', common.mustCall(function () { - assert.strictEqual(m++, 1); -})); - -// This one comes first. -myEE.prependOnceListener('foo', - common.mustCall(function () { - assert.strictEqual(m++, 0); - })); - -myEE.emit('foo'); - -// Verify that the listener must be a function -assert.throws(function () { - var ee = new EventEmitter(); - ee.prependOnceListener('foo', null); -}, 'TypeError: The "listener" argument must be of type Function. Received type object'); diff --git a/node_modules/npm/node_modules/events/tests/remove-all-listeners.js b/node_modules/npm/node_modules/events/tests/remove-all-listeners.js deleted file mode 100644 index 622941c..0000000 --- a/node_modules/npm/node_modules/events/tests/remove-all-listeners.js +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var events = require('../'); -var test = require('tape'); - -function expect(expected) { - var actual = []; - test.onFinish(function() { - var sortedActual = actual.sort(); - var sortedExpected = expected.sort(); - assert.strictEqual(sortedActual.length, sortedExpected.length); - for (var index = 0; index < sortedActual.length; index++) { - var value = sortedActual[index]; - assert.strictEqual(value, sortedExpected[index]); - } - }); - function listener(name) { - actual.push(name); - } - return common.mustCall(listener, expected.length); -} - -{ - var ee = new events.EventEmitter(); - var noop = common.mustNotCall(); - ee.on('foo', noop); - ee.on('bar', noop); - ee.on('baz', noop); - ee.on('baz', noop); - var fooListeners = ee.listeners('foo'); - var barListeners = ee.listeners('bar'); - var bazListeners = ee.listeners('baz'); - ee.on('removeListener', expect(['bar', 'baz', 'baz'])); - ee.removeAllListeners('bar'); - ee.removeAllListeners('baz'); - - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], noop); - - listeners = ee.listeners('bar'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - listeners = ee.listeners('baz'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - // After calling removeAllListeners(), - // the old listeners array should stay unchanged. - assert.strictEqual(fooListeners.length, 1); - assert.strictEqual(fooListeners[0], noop); - assert.strictEqual(barListeners.length, 1); - assert.strictEqual(barListeners[0], noop); - assert.strictEqual(bazListeners.length, 2); - assert.strictEqual(bazListeners[0], noop); - assert.strictEqual(bazListeners[1], noop); - // After calling removeAllListeners(), - // new listeners arrays is different from the old. - assert.notStrictEqual(ee.listeners('bar'), barListeners); - assert.notStrictEqual(ee.listeners('baz'), bazListeners); -} - -{ - var ee = new events.EventEmitter(); - ee.on('foo', common.mustNotCall()); - ee.on('bar', common.mustNotCall()); - // Expect LIFO order - ee.on('removeListener', expect(['foo', 'bar', 'removeListener'])); - ee.on('removeListener', expect(['foo', 'bar'])); - ee.removeAllListeners(); - - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - listeners = ee.listeners('bar'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new events.EventEmitter(); - ee.on('removeListener', common.mustNotCall()); - // Check for regression where removeAllListeners() throws when - // there exists a 'removeListener' listener, but there exists - // no listeners for the provided event type. - assert.doesNotThrow(function () { ee.removeAllListeners(ee, 'foo') }); -} - -{ - var ee = new events.EventEmitter(); - var expectLength = 2; - ee.on('removeListener', function() { - assert.strictEqual(expectLength--, this.listeners('baz').length); - }); - ee.on('baz', common.mustNotCall()); - ee.on('baz', common.mustNotCall()); - ee.on('baz', common.mustNotCall()); - assert.strictEqual(ee.listeners('baz').length, expectLength + 1); - ee.removeAllListeners('baz'); - assert.strictEqual(ee.listeners('baz').length, 0); -} - -{ - var ee = new events.EventEmitter(); - assert.strictEqual(ee, ee.removeAllListeners()); -} - -{ - var ee = new events.EventEmitter(); - ee._events = undefined; - assert.strictEqual(ee, ee.removeAllListeners()); -} diff --git a/node_modules/npm/node_modules/events/tests/remove-listeners.js b/node_modules/npm/node_modules/events/tests/remove-listeners.js deleted file mode 100644 index 18e4d16..0000000 --- a/node_modules/npm/node_modules/events/tests/remove-listeners.js +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var assert = require('assert'); -var EventEmitter = require('../'); - -var listener1 = function listener1() {}; -var listener2 = function listener2() {}; - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - })); - ee.removeListener('hello', listener1); - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('removeListener', common.mustNotCall()); - ee.removeListener('hello', listener2); - - var listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener1); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('hello', listener2); - - var listeners; - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - })); - ee.removeListener('hello', listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - - function remove1() { - assert.fail('remove1 should not have been called'); - } - - function remove2() { - assert.fail('remove2 should not have been called'); - } - - ee.on('removeListener', common.mustCall(function(name, cb) { - if (cb !== remove1) return; - this.removeListener('quux', remove2); - this.emit('quux'); - }, 2)); - ee.on('quux', remove1); - ee.on('quux', remove2); - ee.removeListener('quux', remove1); -} - -{ - var ee = new EventEmitter(); - ee.on('hello', listener1); - ee.on('hello', listener2); - - var listeners; - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 1); - assert.strictEqual(listeners[0], listener2); - ee.once('removeListener', common.mustCall(function(name, cb) { - assert.strictEqual(name, 'hello'); - assert.strictEqual(cb, listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener2); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); - })); - ee.removeListener('hello', listener1); - listeners = ee.listeners('hello'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 0); -} - -{ - var ee = new EventEmitter(); - var listener3 = common.mustCall(function() { - ee.removeListener('hello', listener4); - }, 2); - var listener4 = common.mustCall(); - - ee.on('hello', listener3); - ee.on('hello', listener4); - - // listener4 will still be called although it is removed by listener 3. - ee.emit('hello'); - // This is so because the interal listener array at time of emit - // was [listener3,listener4] - - // Interal listener array [listener3] - ee.emit('hello'); -} - -{ - var ee = new EventEmitter(); - - ee.once('hello', listener1); - ee.on('removeListener', common.mustCall(function(eventName, listener) { - assert.strictEqual(eventName, 'hello'); - assert.strictEqual(listener, listener1); - })); - ee.emit('hello'); -} - -{ - var ee = new EventEmitter(); - - assert.strictEqual(ee, ee.removeListener('foo', function() {})); -} - -// Verify that the removed listener must be a function -assert.throws(function() { - var ee = new EventEmitter(); - - ee.removeListener('foo', null); -}, /^TypeError: The "listener" argument must be of type Function\. Received type object$/); - -{ - var ee = new EventEmitter(); - var listener = function() {}; - ee._events = undefined; - var e = ee.removeListener('foo', listener); - assert.strictEqual(e, ee); -} - -{ - var ee = new EventEmitter(); - - ee.on('foo', listener1); - ee.on('foo', listener2); - var listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listener1); - assert.strictEqual(listeners[1], listener2); - - ee.removeListener('foo', listener1); - assert.strictEqual(ee._events.foo, listener2); - - ee.on('foo', listener1); - listeners = ee.listeners('foo'); - assert.ok(Array.isArray(listeners)); - assert.strictEqual(listeners.length, 2); - assert.strictEqual(listeners[0], listener2); - assert.strictEqual(listeners[1], listener1); - - ee.removeListener('foo', listener1); - assert.strictEqual(ee._events.foo, listener2); -} diff --git a/node_modules/npm/node_modules/events/tests/set-max-listeners-side-effects.js b/node_modules/npm/node_modules/events/tests/set-max-listeners-side-effects.js deleted file mode 100644 index 13dbb67..0000000 --- a/node_modules/npm/node_modules/events/tests/set-max-listeners-side-effects.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -require('./common'); -var assert = require('assert'); -var events = require('../'); - -var e = new events.EventEmitter(); - -if (Object.create) assert.ok(!(e._events instanceof Object)); -assert.strictEqual(Object.keys(e._events).length, 0); -e.setMaxListeners(5); -assert.strictEqual(Object.keys(e._events).length, 0); diff --git a/node_modules/npm/node_modules/events/tests/special-event-names.js b/node_modules/npm/node_modules/events/tests/special-event-names.js deleted file mode 100644 index a2f0b74..0000000 --- a/node_modules/npm/node_modules/events/tests/special-event-names.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -var common = require('./common'); -var EventEmitter = require('../'); -var assert = require('assert'); - -var ee = new EventEmitter(); -var handler = function() {}; - -assert.strictEqual(ee.eventNames().length, 0); - -assert.strictEqual(ee._events.hasOwnProperty, undefined); -assert.strictEqual(ee._events.toString, undefined); - -ee.on('__defineGetter__', handler); -ee.on('toString', handler); -ee.on('__proto__', handler); - -assert.strictEqual(ee.eventNames()[0], '__defineGetter__'); -assert.strictEqual(ee.eventNames()[1], 'toString'); - -assert.strictEqual(ee.listeners('__defineGetter__').length, 1); -assert.strictEqual(ee.listeners('__defineGetter__')[0], handler); -assert.strictEqual(ee.listeners('toString').length, 1); -assert.strictEqual(ee.listeners('toString')[0], handler); - -// Only run __proto__ tests if that property can actually be set -if ({ __proto__: 'ok' }.__proto__ === 'ok') { - assert.strictEqual(ee.eventNames().length, 3); - assert.strictEqual(ee.eventNames()[2], '__proto__'); - assert.strictEqual(ee.listeners('__proto__').length, 1); - assert.strictEqual(ee.listeners('__proto__')[0], handler); - - ee.on('__proto__', common.mustCall(function(val) { - assert.strictEqual(val, 1); - })); - ee.emit('__proto__', 1); - - process.on('__proto__', common.mustCall(function(val) { - assert.strictEqual(val, 1); - })); - process.emit('__proto__', 1); -} else { - console.log('# skipped __proto__') -} diff --git a/node_modules/npm/node_modules/events/tests/subclass.js b/node_modules/npm/node_modules/events/tests/subclass.js deleted file mode 100644 index bd033ff..0000000 --- a/node_modules/npm/node_modules/events/tests/subclass.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('./common'); -var test = require('tape'); -var assert = require('assert'); -var EventEmitter = require('../').EventEmitter; -var util = require('util'); - -util.inherits(MyEE, EventEmitter); - -function MyEE(cb) { - this.once(1, cb); - this.emit(1); - this.removeAllListeners(); - EventEmitter.call(this); -} - -var myee = new MyEE(common.mustCall()); - - -util.inherits(ErrorEE, EventEmitter); -function ErrorEE() { - this.emit('error', new Error('blerg')); -} - -assert.throws(function() { - new ErrorEE(); -}, /blerg/); - -test.onFinish(function() { - assert.ok(!(myee._events instanceof Object)); - assert.strictEqual(Object.keys(myee._events).length, 0); -}); - - -function MyEE2() { - EventEmitter.call(this); -} - -MyEE2.prototype = new EventEmitter(); - -var ee1 = new MyEE2(); -var ee2 = new MyEE2(); - -ee1.on('x', function() {}); - -assert.strictEqual(ee2.listenerCount('x'), 0); diff --git a/node_modules/npm/node_modules/events/tests/symbols.js b/node_modules/npm/node_modules/events/tests/symbols.js deleted file mode 100644 index 0721f0e..0000000 --- a/node_modules/npm/node_modules/events/tests/symbols.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var common = require('./common'); -var EventEmitter = require('../'); -var assert = require('assert'); - -var ee = new EventEmitter(); -var foo = Symbol('foo'); -var listener = common.mustCall(); - -ee.on(foo, listener); -assert.strictEqual(ee.listeners(foo).length, 1); -assert.strictEqual(ee.listeners(foo)[0], listener); - -ee.emit(foo); - -ee.removeAllListeners(); -assert.strictEqual(ee.listeners(foo).length, 0); - -ee.on(foo, listener); -assert.strictEqual(ee.listeners(foo).length, 1); -assert.strictEqual(ee.listeners(foo)[0], listener); - -ee.removeListener(foo, listener); -assert.strictEqual(ee.listeners(foo).length, 0); diff --git a/node_modules/npm/node_modules/exponential-backoff/LICENSE b/node_modules/npm/node_modules/exponential-backoff/LICENSE deleted file mode 100644 index 7a4a3ea..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/backoff.js b/node_modules/npm/node_modules/exponential-backoff/dist/backoff.js deleted file mode 100644 index a0aa0dc..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/backoff.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (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()); - }); -}; -var __generator = (this && this.__generator) || function (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 }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var options_1 = require("./options"); -var delay_factory_1 = require("./delay/delay.factory"); -function backOff(request, options) { - if (options === void 0) { options = {}; } - return __awaiter(this, void 0, void 0, function () { - var sanitizedOptions, backOff; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - sanitizedOptions = options_1.getSanitizedOptions(options); - backOff = new BackOff(request, sanitizedOptions); - return [4 /*yield*/, backOff.execute()]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); -} -exports.backOff = backOff; -var BackOff = /** @class */ (function () { - function BackOff(request, options) { - this.request = request; - this.options = options; - this.attemptNumber = 0; - } - BackOff.prototype.execute = function () { - return __awaiter(this, void 0, void 0, function () { - var e_1, shouldRetry; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!!this.attemptLimitReached) return [3 /*break*/, 7]; - _a.label = 1; - case 1: - _a.trys.push([1, 4, , 6]); - return [4 /*yield*/, this.applyDelay()]; - case 2: - _a.sent(); - return [4 /*yield*/, this.request()]; - case 3: return [2 /*return*/, _a.sent()]; - case 4: - e_1 = _a.sent(); - this.attemptNumber++; - return [4 /*yield*/, this.options.retry(e_1, this.attemptNumber)]; - case 5: - shouldRetry = _a.sent(); - if (!shouldRetry || this.attemptLimitReached) { - throw e_1; - } - return [3 /*break*/, 6]; - case 6: return [3 /*break*/, 0]; - case 7: throw new Error("Something went wrong."); - } - }); - }); - }; - Object.defineProperty(BackOff.prototype, "attemptLimitReached", { - get: function () { - return this.attemptNumber >= this.options.numOfAttempts; - }, - enumerable: true, - configurable: true - }); - BackOff.prototype.applyDelay = function () { - return __awaiter(this, void 0, void 0, function () { - var delay; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - delay = delay_factory_1.DelayFactory(this.options, this.attemptNumber); - return [4 /*yield*/, delay.apply()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return BackOff; -}()); -//# sourceMappingURL=backoff.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/delay/always/always.delay.js b/node_modules/npm/node_modules/exponential-backoff/dist/delay/always/always.delay.js deleted file mode 100644 index 40e3407..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/delay/always/always.delay.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - 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 (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var delay_base_1 = require("../delay.base"); -var AlwaysDelay = /** @class */ (function (_super) { - __extends(AlwaysDelay, _super); - function AlwaysDelay() { - return _super !== null && _super.apply(this, arguments) || this; - } - return AlwaysDelay; -}(delay_base_1.Delay)); -exports.AlwaysDelay = AlwaysDelay; -//# sourceMappingURL=always.delay.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.base.js b/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.base.js deleted file mode 100644 index b146c2f..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.base.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var jitter_factory_1 = require("../jitter/jitter.factory"); -var Delay = /** @class */ (function () { - function Delay(options) { - this.options = options; - this.attempt = 0; - } - Delay.prototype.apply = function () { - var _this = this; - return new Promise(function (resolve) { return setTimeout(resolve, _this.jitteredDelay); }); - }; - Delay.prototype.setAttemptNumber = function (attempt) { - this.attempt = attempt; - }; - Object.defineProperty(Delay.prototype, "jitteredDelay", { - get: function () { - var jitter = jitter_factory_1.JitterFactory(this.options); - return jitter(this.delay); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Delay.prototype, "delay", { - get: function () { - var constant = this.options.startingDelay; - var base = this.options.timeMultiple; - var power = this.numOfDelayedAttempts; - var delay = constant * Math.pow(base, power); - return Math.min(delay, this.options.maxDelay); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(Delay.prototype, "numOfDelayedAttempts", { - get: function () { - return this.attempt; - }, - enumerable: true, - configurable: true - }); - return Delay; -}()); -exports.Delay = Delay; -//# sourceMappingURL=delay.base.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.factory.js b/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.factory.js deleted file mode 100644 index 33008db..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.factory.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var skip_first_delay_1 = require("./skip-first/skip-first.delay"); -var always_delay_1 = require("./always/always.delay"); -function DelayFactory(options, attempt) { - var delay = initDelayClass(options); - delay.setAttemptNumber(attempt); - return delay; -} -exports.DelayFactory = DelayFactory; -function initDelayClass(options) { - if (!options.delayFirstAttempt) { - return new skip_first_delay_1.SkipFirstDelay(options); - } - return new always_delay_1.AlwaysDelay(options); -} -//# sourceMappingURL=delay.factory.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.interface.js b/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.interface.js deleted file mode 100644 index 6fe2a5a..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/delay/delay.interface.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=delay.interface.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js b/node_modules/npm/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js deleted file mode 100644 index 73f8841..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/delay/skip-first/skip-first.delay.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - 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 (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (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()); - }); -}; -var __generator = (this && this.__generator) || function (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 }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var delay_base_1 = require("../delay.base"); -var SkipFirstDelay = /** @class */ (function (_super) { - __extends(SkipFirstDelay, _super); - function SkipFirstDelay() { - return _super !== null && _super.apply(this, arguments) || this; - } - SkipFirstDelay.prototype.apply = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.isFirstAttempt ? true : _super.prototype.apply.call(this)]; - }); - }); - }; - Object.defineProperty(SkipFirstDelay.prototype, "isFirstAttempt", { - get: function () { - return this.attempt === 0; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SkipFirstDelay.prototype, "numOfDelayedAttempts", { - get: function () { - return this.attempt - 1; - }, - enumerable: true, - configurable: true - }); - return SkipFirstDelay; -}(delay_base_1.Delay)); -exports.SkipFirstDelay = SkipFirstDelay; -//# sourceMappingURL=skip-first.delay.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js b/node_modules/npm/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js deleted file mode 100644 index 16cee36..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/full/full.jitter.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function fullJitter(delay) { - var jitteredDelay = Math.random() * delay; - return Math.round(jitteredDelay); -} -exports.fullJitter = fullJitter; -//# sourceMappingURL=full.jitter.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/jitter.factory.js b/node_modules/npm/node_modules/exponential-backoff/dist/jitter/jitter.factory.js deleted file mode 100644 index 8aafe45..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/jitter.factory.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var full_jitter_1 = require("./full/full.jitter"); -var no_jitter_1 = require("./no/no.jitter"); -function JitterFactory(options) { - switch (options.jitter) { - case "full": - return full_jitter_1.fullJitter; - case "none": - default: - return no_jitter_1.noJitter; - } -} -exports.JitterFactory = JitterFactory; -//# sourceMappingURL=jitter.factory.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js b/node_modules/npm/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js deleted file mode 100644 index 15a40bb..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/jitter/no/no.jitter.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function noJitter(delay) { - return delay; -} -exports.noJitter = noJitter; -//# sourceMappingURL=no.jitter.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/dist/options.js b/node_modules/npm/node_modules/exponential-backoff/dist/options.js deleted file mode 100644 index 1d2ca17..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/dist/options.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(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); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var defaultOptions = { - delayFirstAttempt: false, - jitter: "none", - maxDelay: Infinity, - numOfAttempts: 10, - retry: function () { return true; }, - startingDelay: 100, - timeMultiple: 2 -}; -function getSanitizedOptions(options) { - var sanitized = __assign(__assign({}, defaultOptions), options); - if (sanitized.numOfAttempts < 1) { - sanitized.numOfAttempts = 1; - } - return sanitized; -} -exports.getSanitizedOptions = getSanitizedOptions; -//# sourceMappingURL=options.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/exponential-backoff/package.json b/node_modules/npm/node_modules/exponential-backoff/package.json deleted file mode 100644 index 23232a0..0000000 --- a/node_modules/npm/node_modules/exponential-backoff/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "exponential-backoff", - "version": "3.1.1", - "description": "A utility that allows retrying a function with an exponential delay between attempts.", - "files": [ - "dist/" - ], - "main": "dist/backoff.js", - "types": "dist/backoff.d.ts", - "scripts": { - "build": "tsc", - "test": "jest", - "test:watch": "jest --watch" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "*.{ts,json,md}": [ - "prettier --write", - "git add" - ] - }, - "jest": { - "transform": { - "^.+\\.ts$": "ts-jest" - }, - "testRegex": "\\.spec\\.ts$", - "moduleFileExtensions": [ - "ts", - "js" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/coveo/exponential-backoff.git" - }, - "keywords": [ - "exponential", - "backoff", - "retry" - ], - "author": "Sami Sayegh", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/coveo/exponential-backoff/issues" - }, - "homepage": "https://github.com/coveo/exponential-backoff#readme", - "devDependencies": { - "@types/jest": "^24.0.18", - "@types/node": "^10.14.21", - "husky": "^3.0.9", - "jest": "^24.9.0", - "lint-staged": "^9.4.2", - "prettier": "^1.18.2", - "ts-jest": "^24.1.0", - "typescript": "^3.6.4" - } -} diff --git a/node_modules/npm/node_modules/fastest-levenshtein/LICENSE.md b/node_modules/npm/node_modules/fastest-levenshtein/LICENSE.md deleted file mode 100644 index 0e62da3..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Kasper Unn Weihe - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/npm/node_modules/fastest-levenshtein/bench.js b/node_modules/npm/node_modules/fastest-levenshtein/bench.js deleted file mode 100644 index 1fd420b..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/bench.js +++ /dev/null @@ -1,96 +0,0 @@ -"use strict"; -exports.__esModule = true; -/* eslint-disable @typescript-eslint/no-var-requires */ -/* eslint-disable no-console */ -var Benchmark = require("benchmark"); -var mod_js_1 = require("./mod.js"); -var fast_levenshtein_1 = require("fast-levenshtein"); -var fs = require("fs"); -var jslevenshtein = require("js-levenshtein"); -var leven = require("leven"); -var levenshteinEditDistance = require("levenshtein-edit-distance"); -var suite = new Benchmark.Suite(); -var randomstring = function (length) { - var result = ""; - var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - var charactersLength = characters.length; - for (var i = 0; i < length; i++) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - } - return result; -}; -var randomstringArr = function (stringSize, arraySize) { - var i = 0; - var arr = []; - for (i = 0; i < arraySize; i++) { - arr.push(randomstring(stringSize)); - } - return arr; -}; -var arrSize = 1000; -if (!fs.existsSync("data.json")) { - var data_1 = [ - randomstringArr(4, arrSize), - randomstringArr(8, arrSize), - randomstringArr(16, arrSize), - randomstringArr(32, arrSize), - randomstringArr(64, arrSize), - randomstringArr(128, arrSize), - randomstringArr(256, arrSize), - randomstringArr(512, arrSize), - randomstringArr(1024, arrSize), - ]; - fs.writeFileSync("data.json", JSON.stringify(data_1)); -} -var data = JSON.parse(fs.readFileSync("data.json", "utf8")); -var _loop_1 = function (i) { - var datapick = data[i]; - if (process.argv[2] !== "no") { - suite - .add("".concat(i, " - js-levenshtein"), function () { - for (var j = 0; j < arrSize - 1; j += 2) { - jslevenshtein(datapick[j], datapick[j + 1]); - } - }) - .add("".concat(i, " - leven"), function () { - for (var j = 0; j < arrSize - 1; j += 2) { - leven(datapick[j], datapick[j + 1]); - } - }) - .add("".concat(i, " - fast-levenshtein"), function () { - for (var j = 0; j < arrSize - 1; j += 2) { - (0, fast_levenshtein_1.get)(datapick[j], datapick[j + 1]); - } - }) - .add("".concat(i, " - levenshtein-edit-distance"), function () { - for (var j = 0; j < arrSize - 1; j += 2) { - levenshteinEditDistance(datapick[j], datapick[j + 1]); - } - }); - } - suite.add("".concat(i, " - fastest-levenshtein"), function () { - for (var j = 0; j < arrSize - 1; j += 2) { - (0, mod_js_1.distance)(datapick[j], datapick[j + 1]); - } - }); -}; -// BENCHMARKS -for (var i = 0; i < 9; i++) { - _loop_1(i); -} -var results = new Map(); -suite - .on("cycle", function (event) { - console.log(String(event.target)); - if (results.has(event.target.name[0])) { - results.get(event.target.name[0]).push(event.target.hz); - } - else { - results.set(event.target.name[0], [event.target.hz]); - } -}) - .on("complete", function () { - console.log(results); -}) - // run async - .run({ async: true }); diff --git a/node_modules/npm/node_modules/fastest-levenshtein/esm/mod.js b/node_modules/npm/node_modules/fastest-levenshtein/esm/mod.js deleted file mode 100644 index 719f2b8..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/esm/mod.js +++ /dev/null @@ -1,138 +0,0 @@ -const peq = new Uint32Array(0x10000); -const myers_32 = (a, b) => { - const n = a.length; - const m = b.length; - const lst = 1 << (n - 1); - let pv = -1; - let mv = 0; - let sc = n; - let i = n; - while (i--) { - peq[a.charCodeAt(i)] |= 1 << i; - } - for (i = 0; i < m; i++) { - let eq = peq[b.charCodeAt(i)]; - const xv = eq | mv; - eq |= ((eq & pv) + pv) ^ pv; - mv |= ~(eq | pv); - pv &= eq; - if (mv & lst) { - sc++; - } - if (pv & lst) { - sc--; - } - mv = (mv << 1) | 1; - pv = (pv << 1) | ~(xv | mv); - mv &= xv; - } - i = n; - while (i--) { - peq[a.charCodeAt(i)] = 0; - } - return sc; -}; -const myers_x = (b, a) => { - const n = a.length; - const m = b.length; - const mhc = []; - const phc = []; - const hsize = Math.ceil(n / 32); - const vsize = Math.ceil(m / 32); - for (let i = 0; i < hsize; i++) { - phc[i] = -1; - mhc[i] = 0; - } - let j = 0; - for (; j < vsize - 1; j++) { - let mv = 0; - let pv = -1; - const start = j * 32; - const vlen = Math.min(32, m) + start; - for (let k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] |= 1 << k; - } - for (let i = 0; i < n; i++) { - const eq = peq[a.charCodeAt(i)]; - const pb = (phc[(i / 32) | 0] >>> i) & 1; - const mb = (mhc[(i / 32) | 0] >>> i) & 1; - const xv = eq | mv; - const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb; - let ph = mv | ~(xh | pv); - let mh = pv & xh; - if ((ph >>> 31) ^ pb) { - phc[(i / 32) | 0] ^= 1 << i; - } - if ((mh >>> 31) ^ mb) { - mhc[(i / 32) | 0] ^= 1 << i; - } - ph = (ph << 1) | pb; - mh = (mh << 1) | mb; - pv = mh | ~(xv | ph); - mv = ph & xv; - } - for (let k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] = 0; - } - } - let mv = 0; - let pv = -1; - const start = j * 32; - const vlen = Math.min(32, m - start) + start; - for (let k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] |= 1 << k; - } - let score = m; - for (let i = 0; i < n; i++) { - const eq = peq[a.charCodeAt(i)]; - const pb = (phc[(i / 32) | 0] >>> i) & 1; - const mb = (mhc[(i / 32) | 0] >>> i) & 1; - const xv = eq | mv; - const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb; - let ph = mv | ~(xh | pv); - let mh = pv & xh; - score += (ph >>> (m - 1)) & 1; - score -= (mh >>> (m - 1)) & 1; - if ((ph >>> 31) ^ pb) { - phc[(i / 32) | 0] ^= 1 << i; - } - if ((mh >>> 31) ^ mb) { - mhc[(i / 32) | 0] ^= 1 << i; - } - ph = (ph << 1) | pb; - mh = (mh << 1) | mb; - pv = mh | ~(xv | ph); - mv = ph & xv; - } - for (let k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] = 0; - } - return score; -}; -const distance = (a, b) => { - if (a.length < b.length) { - const tmp = b; - b = a; - a = tmp; - } - if (b.length === 0) { - return a.length; - } - if (a.length <= 32) { - return myers_32(a, b); - } - return myers_x(a, b); -}; -const closest = (str, arr) => { - let min_distance = Infinity; - let min_index = 0; - for (let i = 0; i < arr.length; i++) { - const dist = distance(str, arr[i]); - if (dist < min_distance) { - min_distance = dist; - min_index = i; - } - } - return arr[min_index]; -}; -export { closest, distance }; diff --git a/node_modules/npm/node_modules/fastest-levenshtein/mod.js b/node_modules/npm/node_modules/fastest-levenshtein/mod.js deleted file mode 100644 index 6bc2745..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/mod.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -exports.__esModule = true; -exports.distance = exports.closest = void 0; -var peq = new Uint32Array(0x10000); -var myers_32 = function (a, b) { - var n = a.length; - var m = b.length; - var lst = 1 << (n - 1); - var pv = -1; - var mv = 0; - var sc = n; - var i = n; - while (i--) { - peq[a.charCodeAt(i)] |= 1 << i; - } - for (i = 0; i < m; i++) { - var eq = peq[b.charCodeAt(i)]; - var xv = eq | mv; - eq |= ((eq & pv) + pv) ^ pv; - mv |= ~(eq | pv); - pv &= eq; - if (mv & lst) { - sc++; - } - if (pv & lst) { - sc--; - } - mv = (mv << 1) | 1; - pv = (pv << 1) | ~(xv | mv); - mv &= xv; - } - i = n; - while (i--) { - peq[a.charCodeAt(i)] = 0; - } - return sc; -}; -var myers_x = function (b, a) { - var n = a.length; - var m = b.length; - var mhc = []; - var phc = []; - var hsize = Math.ceil(n / 32); - var vsize = Math.ceil(m / 32); - for (var i = 0; i < hsize; i++) { - phc[i] = -1; - mhc[i] = 0; - } - var j = 0; - for (; j < vsize - 1; j++) { - var mv_1 = 0; - var pv_1 = -1; - var start_1 = j * 32; - var vlen_1 = Math.min(32, m) + start_1; - for (var k = start_1; k < vlen_1; k++) { - peq[b.charCodeAt(k)] |= 1 << k; - } - for (var i = 0; i < n; i++) { - var eq = peq[a.charCodeAt(i)]; - var pb = (phc[(i / 32) | 0] >>> i) & 1; - var mb = (mhc[(i / 32) | 0] >>> i) & 1; - var xv = eq | mv_1; - var xh = ((((eq | mb) & pv_1) + pv_1) ^ pv_1) | eq | mb; - var ph = mv_1 | ~(xh | pv_1); - var mh = pv_1 & xh; - if ((ph >>> 31) ^ pb) { - phc[(i / 32) | 0] ^= 1 << i; - } - if ((mh >>> 31) ^ mb) { - mhc[(i / 32) | 0] ^= 1 << i; - } - ph = (ph << 1) | pb; - mh = (mh << 1) | mb; - pv_1 = mh | ~(xv | ph); - mv_1 = ph & xv; - } - for (var k = start_1; k < vlen_1; k++) { - peq[b.charCodeAt(k)] = 0; - } - } - var mv = 0; - var pv = -1; - var start = j * 32; - var vlen = Math.min(32, m - start) + start; - for (var k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] |= 1 << k; - } - var score = m; - for (var i = 0; i < n; i++) { - var eq = peq[a.charCodeAt(i)]; - var pb = (phc[(i / 32) | 0] >>> i) & 1; - var mb = (mhc[(i / 32) | 0] >>> i) & 1; - var xv = eq | mv; - var xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb; - var ph = mv | ~(xh | pv); - var mh = pv & xh; - score += (ph >>> (m - 1)) & 1; - score -= (mh >>> (m - 1)) & 1; - if ((ph >>> 31) ^ pb) { - phc[(i / 32) | 0] ^= 1 << i; - } - if ((mh >>> 31) ^ mb) { - mhc[(i / 32) | 0] ^= 1 << i; - } - ph = (ph << 1) | pb; - mh = (mh << 1) | mb; - pv = mh | ~(xv | ph); - mv = ph & xv; - } - for (var k = start; k < vlen; k++) { - peq[b.charCodeAt(k)] = 0; - } - return score; -}; -var distance = function (a, b) { - if (a.length < b.length) { - var tmp = b; - b = a; - a = tmp; - } - if (b.length === 0) { - return a.length; - } - if (a.length <= 32) { - return myers_32(a, b); - } - return myers_x(a, b); -}; -exports.distance = distance; -var closest = function (str, arr) { - var min_distance = Infinity; - var min_index = 0; - for (var i = 0; i < arr.length; i++) { - var dist = distance(str, arr[i]); - if (dist < min_distance) { - min_distance = dist; - min_index = i; - } - } - return arr[min_index]; -}; -exports.closest = closest; diff --git a/node_modules/npm/node_modules/fastest-levenshtein/package.json b/node_modules/npm/node_modules/fastest-levenshtein/package.json deleted file mode 100644 index c395b85..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "fastest-levenshtein", - "version": "1.0.16", - "description": "Fastest Levenshtein distance implementation in JS.", - "main": "mod.js", - "types": "mod.d.ts", - "module": "./esm/mod.js", - "repository": { - "type": "git", - "url": "git+https://github.com/ka-weihe/fastest-levenshtein.git" - }, - "keywords": [ - "levenshtein", - "distance", - "fast", - "fastest", - "edit", - "string", - "similarity", - "algorithm", - "match", - "comparison", - "fuzzy", - "search", - "string", - "matching", - "similar", - "node", - "difference" - ], - "author": "Kasper U. Weihe", - "license": "MIT", - "bugs": { - "url": "https://github.com/ka-weihe/fastest-levenshtein/issues" - }, - "homepage": "https://github.com/ka-weihe/fastest-levenshtein#README", - "scripts": { - "build": "tsc mod.ts --declaration", - "build:esm": "tsc --declaration -p tsconfig.esm.json", - "prepare": "npm run build && npm run build:esm", - "bench": "npm run build && tsc bench.ts && node bench.js", - "test": "npm run build && tsc test.ts && jest test.js", - "test:coverage": "npm run build && jest --coverage", - "test:coveralls": "npm run build && jest --coverage --coverageReporters=text-lcov | coveralls" - }, - "devDependencies": { - "@types/benchmark": "^1.0.33", - "@types/jest": "^26.0.15", - "@typescript-eslint/eslint-plugin": "^4.7.0", - "@typescript-eslint/parser": "^4.7.0", - "benchmark": "^2.1.4", - "coveralls": "^3.1.0", - "eslint": "^7.13.0", - "eslint-config-node": "^4.1.0", - "eslint-config-prettier": "^6.15.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.1.4", - "fast-levenshtein": "^2.0.6", - "jest": "^26.6.3", - "js-levenshtein": "^1.1.6", - "leven": "^3.1.0", - "levenshtein-edit-distance": "^2.0.5", - "natural": "^2.1.5", - "prettier": "^2.1.2", - "talisman": "^1.1.3", - "typescript": "^4.0.5" - }, - "engines": { - "node": ">= 4.9.1" - } -} diff --git a/node_modules/npm/node_modules/fastest-levenshtein/test.js b/node_modules/npm/node_modules/fastest-levenshtein/test.js deleted file mode 100644 index 4750633..0000000 --- a/node_modules/npm/node_modules/fastest-levenshtein/test.js +++ /dev/null @@ -1,55 +0,0 @@ -var _a = require("./mod.js"), closest = _a.closest, distance = _a.distance; -var levenshtein = function (a, b) { - if (a.length === 0) { - return b.length; - } - if (b.length === 0) { - return a.length; - } - if (a.length > b.length) { - var tmp = a; - a = b; - b = tmp; - } - var row = []; - for (var i = 0; i <= a.length; i++) { - row[i] = i; - } - for (var i = 1; i <= b.length; i++) { - var prev = i; - for (var j = 1; j <= a.length; j++) { - var val = 0; - if (b.charAt(i - 1) === a.charAt(j - 1)) { - val = row[j - 1]; - } - else { - val = Math.min(row[j - 1] + 1, prev + 1, row[j] + 1); - } - row[j - 1] = prev; - prev = val; - } - row[a.length] = prev; - } - return row[a.length]; -}; -var makeid = function (length) { - var result = ""; - var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - var charactersLength = characters.length; - for (var i = 0; i < length; i++) { - result += characters.charAt(Math.floor(Math.random() * charactersLength)); - } - return result; -}; -for (var i = 0; i < 10000; i++) { - var rnd_num1 = (Math.random() * 1000) | 0; - var rnd_num2 = (Math.random() * 1000) | 0; - var rnd_string1 = makeid(rnd_num1); - var rnd_string2 = makeid(rnd_num2); - var actual = distance(rnd_string1, rnd_string2); - var expected = levenshtein(rnd_string1, rnd_string2); - console.log(i); - if (actual !== expected) { - console.log("fail"); - } -} diff --git a/node_modules/npm/node_modules/foreground-child/LICENSE b/node_modules/npm/node_modules/foreground-child/LICENSE deleted file mode 100644 index 2d80720..0000000 --- a/node_modules/npm/node_modules/foreground-child/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/foreground-child/dist/cjs/all-signals.js b/node_modules/npm/node_modules/foreground-child/dist/cjs/all-signals.js deleted file mode 100644 index 1692af0..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/cjs/all-signals.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.allSignals = void 0; -const node_constants_1 = __importDefault(require("node:constants")); -exports.allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(node_constants_1.default).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/dist/cjs/index.js b/node_modules/npm/node_modules/foreground-child/dist/cjs/index.js deleted file mode 100644 index d522c98..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/cjs/index.js +++ /dev/null @@ -1,154 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.foregroundChild = exports.normalizeFgArgs = void 0; -const child_process_1 = require("child_process"); -const cross_spawn_1 = __importDefault(require("cross-spawn")); -const signal_exit_1 = require("signal-exit"); -const all_signals_js_1 = require("./all-signals.js"); -const watchdog_js_1 = require("./watchdog.js"); -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? cross_spawn_1.default : child_process_1.spawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -exports.normalizeFgArgs = normalizeFgArgs; -function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = (0, exports.normalizeFgArgs)(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const unproxySignals = proxySignals(child); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = (0, signal_exit_1.onExit)(childHangup); - const dog = (0, watchdog_js_1.watchdog)(child); - let done = false; - child.on('close', async (code, signal) => { - dog.kill('SIGKILL'); - /* c8 ignore start */ - if (done) { - return; - } - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal); - const res = isPromise(result) ? await result : result; - removeOnExit(); - unproxySignals(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -exports.foregroundChild = foregroundChild; -/** - * Starts forwarding signals to `child` through `parent`. - */ -const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of all_signals_js_1.allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - return () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; -}; -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/dist/cjs/package.json b/node_modules/npm/node_modules/foreground-child/dist/cjs/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/npm/node_modules/foreground-child/dist/cjs/watchdog.js b/node_modules/npm/node_modules/foreground-child/dist/cjs/watchdog.js deleted file mode 100644 index 5f553ac..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/cjs/watchdog.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -Object.defineProperty(exports, "__esModule", { value: true }); -exports.watchdog = void 0; -const child_process_1 = require("child_process"); -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -const watchdog = (child) => { - let dogExited = false; - const dog = (0, child_process_1.spawn)(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGTERM'); - }); - return dog; -}; -exports.watchdog = watchdog; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/dist/mjs/all-signals.js b/node_modules/npm/node_modules/foreground-child/dist/mjs/all-signals.js deleted file mode 100644 index 7e8d54d..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/mjs/all-signals.js +++ /dev/null @@ -1,52 +0,0 @@ -import constants from 'node:constants'; -export const allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(constants).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/dist/mjs/index.js b/node_modules/npm/node_modules/foreground-child/dist/mjs/index.js deleted file mode 100644 index 405b395..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/mjs/index.js +++ /dev/null @@ -1,146 +0,0 @@ -import { spawn as nodeSpawn, } from 'child_process'; -import crossSpawn from 'cross-spawn'; -import { onExit } from 'signal-exit'; -import { allSignals } from './all-signals.js'; -import { watchdog } from './watchdog.js'; -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -export const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -export function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const unproxySignals = proxySignals(child); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = onExit(childHangup); - const dog = watchdog(child); - let done = false; - child.on('close', async (code, signal) => { - dog.kill('SIGKILL'); - /* c8 ignore start */ - if (done) { - return; - } - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal); - const res = isPromise(result) ? await result : result; - removeOnExit(); - unproxySignals(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -/** - * Starts forwarding signals to `child` through `parent`. - */ -const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - return () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; -}; -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/dist/mjs/package.json b/node_modules/npm/node_modules/foreground-child/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/npm/node_modules/foreground-child/dist/mjs/watchdog.js b/node_modules/npm/node_modules/foreground-child/dist/mjs/watchdog.js deleted file mode 100644 index 3b897a6..0000000 --- a/node_modules/npm/node_modules/foreground-child/dist/mjs/watchdog.js +++ /dev/null @@ -1,39 +0,0 @@ -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -import { spawn } from 'child_process'; -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -export const watchdog = (child) => { - let dogExited = false; - const dog = spawn(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGTERM'); - }); - return dog; -}; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/foreground-child/package.json b/node_modules/npm/node_modules/foreground-child/package.json deleted file mode 100644 index dfda328..0000000 --- a/node_modules/npm/node_modules/foreground-child/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "foreground-child", - "version": "3.1.1", - "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "types": "./dist/mjs/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=14" - }, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "coverage": false, - "jobs": 1, - "node-arg": [ - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/foreground-child.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "devDependencies": { - "@types/cross-spawn": "^6.0.2", - "@types/node": "^18.15.11", - "@types/tap": "^15.0.8", - "c8": "^7.13.0", - "prettier": "^2.8.6", - "tap": "^16.3.4", - "ts-node": "^10.9.1", - "typedoc": "^0.24.2", - "typescript": "^5.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/node_modules/npm/node_modules/fs-minipass/LICENSE b/node_modules/npm/node_modules/fs-minipass/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/fs-minipass/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/fs-minipass/lib/index.js b/node_modules/npm/node_modules/fs-minipass/lib/index.js deleted file mode 100644 index 3b84ff6..0000000 --- a/node_modules/npm/node_modules/fs-minipass/lib/index.js +++ /dev/null @@ -1,443 +0,0 @@ -'use strict' -const { Minipass } = require('minipass') -const EE = require('events').EventEmitter -const fs = require('fs') - -const writev = fs.writev - -const _autoClose = Symbol('_autoClose') -const _close = Symbol('_close') -const _ended = Symbol('_ended') -const _fd = Symbol('_fd') -const _finished = Symbol('_finished') -const _flags = Symbol('_flags') -const _flush = Symbol('_flush') -const _handleChunk = Symbol('_handleChunk') -const _makeBuf = Symbol('_makeBuf') -const _mode = Symbol('_mode') -const _needDrain = Symbol('_needDrain') -const _onerror = Symbol('_onerror') -const _onopen = Symbol('_onopen') -const _onread = Symbol('_onread') -const _onwrite = Symbol('_onwrite') -const _open = Symbol('_open') -const _path = Symbol('_path') -const _pos = Symbol('_pos') -const _queue = Symbol('_queue') -const _read = Symbol('_read') -const _readSize = Symbol('_readSize') -const _reading = Symbol('_reading') -const _remain = Symbol('_remain') -const _size = Symbol('_size') -const _write = Symbol('_write') -const _writing = Symbol('_writing') -const _defaultFlag = Symbol('_defaultFlag') -const _errored = Symbol('_errored') - -class ReadStream extends Minipass { - constructor (path, opt) { - opt = opt || {} - super(opt) - - this.readable = true - this.writable = false - - if (typeof path !== 'string') { - throw new TypeError('path must be a string') - } - - this[_errored] = false - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_path] = path - this[_readSize] = opt.readSize || 16 * 1024 * 1024 - this[_reading] = false - this[_size] = typeof opt.size === 'number' ? opt.size : Infinity - this[_remain] = this[_size] - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - if (typeof this[_fd] === 'number') { - this[_read]() - } else { - this[_open]() - } - } - - get fd () { - return this[_fd] - } - - get path () { - return this[_path] - } - - write () { - throw new TypeError('this is a readable stream') - } - - end () { - throw new TypeError('this is a readable stream') - } - - [_open] () { - fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (er) { - this[_onerror](er) - } else { - this[_fd] = fd - this.emit('open', fd) - this[_read]() - } - } - - [_makeBuf] () { - return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain])) - } - - [_read] () { - if (!this[_reading]) { - this[_reading] = true - const buf = this[_makeBuf]() - /* istanbul ignore if */ - if (buf.length === 0) { - return process.nextTick(() => this[_onread](null, 0, buf)) - } - fs.read(this[_fd], buf, 0, buf.length, null, (er, br, b) => - this[_onread](er, br, b)) - } - } - - [_onread] (er, br, buf) { - this[_reading] = false - if (er) { - this[_onerror](er) - } else if (this[_handleChunk](br, buf)) { - this[_read]() - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } - - [_onerror] (er) { - this[_reading] = true - this[_close]() - this.emit('error', er) - } - - [_handleChunk] (br, buf) { - let ret = false - // no effect if infinite - this[_remain] -= br - if (br > 0) { - ret = super.write(br < buf.length ? buf.slice(0, br) : buf) - } - - if (br === 0 || this[_remain] <= 0) { - ret = false - this[_close]() - super.end() - } - - return ret - } - - emit (ev, data) { - switch (ev) { - case 'prefinish': - case 'finish': - break - - case 'drain': - if (typeof this[_fd] === 'number') { - this[_read]() - } - break - - case 'error': - if (this[_errored]) { - return - } - this[_errored] = true - return super.emit(ev, data) - - default: - return super.emit(ev, data) - } - } -} - -class ReadStreamSync extends ReadStream { - [_open] () { - let threw = true - try { - this[_onopen](null, fs.openSync(this[_path], 'r')) - threw = false - } finally { - if (threw) { - this[_close]() - } - } - } - - [_read] () { - let threw = true - try { - if (!this[_reading]) { - this[_reading] = true - do { - const buf = this[_makeBuf]() - /* istanbul ignore next */ - const br = buf.length === 0 ? 0 - : fs.readSync(this[_fd], buf, 0, buf.length, null) - if (!this[_handleChunk](br, buf)) { - break - } - } while (true) - this[_reading] = false - } - threw = false - } finally { - if (threw) { - this[_close]() - } - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } -} - -class WriteStream extends EE { - constructor (path, opt) { - opt = opt || {} - super(opt) - this.readable = false - this.writable = true - this[_errored] = false - this[_writing] = false - this[_ended] = false - this[_needDrain] = false - this[_queue] = [] - this[_path] = path - this[_fd] = typeof opt.fd === 'number' ? opt.fd : null - this[_mode] = opt.mode === undefined ? 0o666 : opt.mode - this[_pos] = typeof opt.start === 'number' ? opt.start : null - this[_autoClose] = typeof opt.autoClose === 'boolean' ? - opt.autoClose : true - - // truncating makes no sense when writing into the middle - const defaultFlag = this[_pos] !== null ? 'r+' : 'w' - this[_defaultFlag] = opt.flags === undefined - this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags - - if (this[_fd] === null) { - this[_open]() - } - } - - emit (ev, data) { - if (ev === 'error') { - if (this[_errored]) { - return - } - this[_errored] = true - } - return super.emit(ev, data) - } - - get fd () { - return this[_fd] - } - - get path () { - return this[_path] - } - - [_onerror] (er) { - this[_close]() - this[_writing] = true - this.emit('error', er) - } - - [_open] () { - fs.open(this[_path], this[_flags], this[_mode], - (er, fd) => this[_onopen](er, fd)) - } - - [_onopen] (er, fd) { - if (this[_defaultFlag] && - this[_flags] === 'r+' && - er && er.code === 'ENOENT') { - this[_flags] = 'w' - this[_open]() - } else if (er) { - this[_onerror](er) - } else { - this[_fd] = fd - this.emit('open', fd) - if (!this[_writing]) { - this[_flush]() - } - } - } - - end (buf, enc) { - if (buf) { - this.write(buf, enc) - } - - this[_ended] = true - - // synthetic after-write logic, where drain/finish live - if (!this[_writing] && !this[_queue].length && - typeof this[_fd] === 'number') { - this[_onwrite](null, 0) - } - return this - } - - write (buf, enc) { - if (typeof buf === 'string') { - buf = Buffer.from(buf, enc) - } - - if (this[_ended]) { - this.emit('error', new Error('write() after end()')) - return false - } - - if (this[_fd] === null || this[_writing] || this[_queue].length) { - this[_queue].push(buf) - this[_needDrain] = true - return false - } - - this[_writing] = true - this[_write](buf) - return true - } - - [_write] (buf) { - fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) => - this[_onwrite](er, bw)) - } - - [_onwrite] (er, bw) { - if (er) { - this[_onerror](er) - } else { - if (this[_pos] !== null) { - this[_pos] += bw - } - if (this[_queue].length) { - this[_flush]() - } else { - this[_writing] = false - - if (this[_ended] && !this[_finished]) { - this[_finished] = true - this[_close]() - this.emit('finish') - } else if (this[_needDrain]) { - this[_needDrain] = false - this.emit('drain') - } - } - } - } - - [_flush] () { - if (this[_queue].length === 0) { - if (this[_ended]) { - this[_onwrite](null, 0) - } - } else if (this[_queue].length === 1) { - this[_write](this[_queue].pop()) - } else { - const iovec = this[_queue] - this[_queue] = [] - writev(this[_fd], iovec, this[_pos], - (er, bw) => this[_onwrite](er, bw)) - } - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.close(fd, er => er ? this.emit('error', er) : this.emit('close')) - } - } -} - -class WriteStreamSync extends WriteStream { - [_open] () { - let fd - // only wrap in a try{} block if we know we'll retry, to avoid - // the rethrow obscuring the error's source frame in most cases. - if (this[_defaultFlag] && this[_flags] === 'r+') { - try { - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - } catch (er) { - if (er.code === 'ENOENT') { - this[_flags] = 'w' - return this[_open]() - } else { - throw er - } - } - } else { - fd = fs.openSync(this[_path], this[_flags], this[_mode]) - } - - this[_onopen](null, fd) - } - - [_close] () { - if (this[_autoClose] && typeof this[_fd] === 'number') { - const fd = this[_fd] - this[_fd] = null - fs.closeSync(fd) - this.emit('close') - } - } - - [_write] (buf) { - // throw the original, but try to close if it fails - let threw = true - try { - this[_onwrite](null, - fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos])) - threw = false - } finally { - if (threw) { - try { - this[_close]() - } catch { - // ok error - } - } - } - } -} - -exports.ReadStream = ReadStream -exports.ReadStreamSync = ReadStreamSync - -exports.WriteStream = WriteStream -exports.WriteStreamSync = WriteStreamSync diff --git a/node_modules/npm/node_modules/fs-minipass/package.json b/node_modules/npm/node_modules/fs-minipass/package.json deleted file mode 100644 index e501e64..0000000 --- a/node_modules/npm/node_modules/fs-minipass/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "fs-minipass", - "version": "3.0.3", - "main": "lib/index.js", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint" - }, - "keywords": [], - "author": "GitHub Inc.", - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/fs-minipass.git" - }, - "bugs": { - "url": "https://github.com/npm/fs-minipass/issues" - }, - "homepage": "https://github.com/npm/fs-minipass#readme", - "description": "fs read and write streams based on minipass", - "dependencies": { - "minipass": "^7.0.3" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.1", - "@npmcli/template-oss": "4.18.0", - "mutate-fs": "^2.1.1", - "tap": "^16.3.2" - }, - "files": [ - "bin/", - "lib/" - ], - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": "true" - } -} diff --git a/node_modules/npm/node_modules/function-bind/LICENSE b/node_modules/npm/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d23..0000000 --- a/node_modules/npm/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/node_modules/npm/node_modules/function-bind/implementation.js b/node_modules/npm/node_modules/function-bind/implementation.js deleted file mode 100644 index fd4384c..0000000 --- a/node_modules/npm/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/npm/node_modules/function-bind/index.js b/node_modules/npm/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b96..0000000 --- a/node_modules/npm/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/npm/node_modules/function-bind/package.json b/node_modules/npm/node_modules/function-bind/package.json deleted file mode 100644 index 6185963..0000000 --- a/node_modules/npm/node_modules/function-bind/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "function-bind", - "version": "1.1.2", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "author": "Raynos ", - "repository": { - "type": "git", - "url": "https://github.com/Raynos/function-bind.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1" - }, - "license": "MIT", - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepack": "npmignore --auto --commentLines=autogenerated", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint --ext=js,mjs .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/npm/node_modules/function-bind/test/index.js b/node_modules/npm/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce..0000000 --- a/node_modules/npm/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/npm/node_modules/gauge/LICENSE.md b/node_modules/npm/node_modules/gauge/LICENSE.md deleted file mode 100644 index 5fc208f..0000000 --- a/node_modules/npm/node_modules/gauge/LICENSE.md +++ /dev/null @@ -1,20 +0,0 @@ - - -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/gauge/lib/base-theme.js b/node_modules/npm/node_modules/gauge/lib/base-theme.js deleted file mode 100644 index 00bf568..0000000 --- a/node_modules/npm/node_modules/gauge/lib/base-theme.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' -var spin = require('./spin.js') -var progressBar = require('./progress-bar.js') - -module.exports = { - activityIndicator: function (values, theme, width) { - if (values.spun == null) { - return - } - return spin(theme, values.spun) - }, - progressbar: function (values, theme, width) { - if (values.completed == null) { - return - } - return progressBar(theme, width, values.completed) - }, -} diff --git a/node_modules/npm/node_modules/gauge/lib/error.js b/node_modules/npm/node_modules/gauge/lib/error.js deleted file mode 100644 index d9914ba..0000000 --- a/node_modules/npm/node_modules/gauge/lib/error.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict' -var util = require('util') - -var User = exports.User = function User (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, User) - err.code = 'EGAUGE' - return err -} - -exports.MissingTemplateValue = function MissingTemplateValue (item, values) { - var err = new User(util.format('Missing template value "%s"', item.type)) - Error.captureStackTrace(err, MissingTemplateValue) - err.template = item - err.values = values - return err -} - -exports.Internal = function Internal (msg) { - var err = new Error(msg) - Error.captureStackTrace(err, Internal) - err.code = 'EGAUGEINTERNAL' - return err -} diff --git a/node_modules/npm/node_modules/gauge/lib/has-color.js b/node_modules/npm/node_modules/gauge/lib/has-color.js deleted file mode 100644 index 16cba0e..0000000 --- a/node_modules/npm/node_modules/gauge/lib/has-color.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -var colorSupport = require('color-support') - -module.exports = colorSupport().hasBasic diff --git a/node_modules/npm/node_modules/gauge/lib/index.js b/node_modules/npm/node_modules/gauge/lib/index.js deleted file mode 100644 index be94f53..0000000 --- a/node_modules/npm/node_modules/gauge/lib/index.js +++ /dev/null @@ -1,289 +0,0 @@ -'use strict' -var Plumbing = require('./plumbing.js') -var hasUnicode = require('has-unicode') -var hasColor = require('./has-color.js') -var onExit = require('signal-exit').onExit -var defaultThemes = require('./themes') -var setInterval = require('./set-interval.js') -var process = require('./process.js') -var setImmediate = require('./set-immediate') - -module.exports = Gauge - -function callWith (obj, method) { - return function () { - return method.call(obj) - } -} - -function Gauge (arg1, arg2) { - var options, writeTo - if (arg1 && arg1.write) { - writeTo = arg1 - options = arg2 || {} - } else if (arg2 && arg2.write) { - writeTo = arg2 - options = arg1 || {} - } else { - writeTo = process.stderr - options = arg1 || arg2 || {} - } - - this._status = { - spun: 0, - section: '', - subsection: '', - } - this._paused = false // are we paused for back pressure? - this._disabled = true // are all progress bar updates disabled? - this._showing = false // do we WANT the progress bar on screen - this._onScreen = false // IS the progress bar on screen - this._needsRedraw = false // should we print something at next tick? - this._hideCursor = options.hideCursor == null ? true : options.hideCursor - this._fixedFramerate = options.fixedFramerate == null - ? !(/^v0\.8\./.test(process.version)) - : options.fixedFramerate - this._lastUpdateAt = null - this._updateInterval = options.updateInterval == null ? 50 : options.updateInterval - - this._themes = options.themes || defaultThemes - this._theme = options.theme - var theme = this._computeTheme(options.theme) - var template = options.template || [ - { type: 'progressbar', length: 20 }, - { type: 'activityIndicator', kerning: 1, length: 1 }, - { type: 'section', kerning: 1, default: '' }, - { type: 'subsection', kerning: 1, default: '' }, - ] - this.setWriteTo(writeTo, options.tty) - var PlumbingClass = options.Plumbing || Plumbing - this._gauge = new PlumbingClass(theme, template, this.getWidth()) - - this._$$doRedraw = callWith(this, this._doRedraw) - this._$$handleSizeChange = callWith(this, this._handleSizeChange) - - this._cleanupOnExit = options.cleanupOnExit == null || options.cleanupOnExit - this._removeOnExit = null - - if (options.enabled || (options.enabled == null && this._tty && this._tty.isTTY)) { - this.enable() - } else { - this.disable() - } -} -Gauge.prototype = {} - -Gauge.prototype.isEnabled = function () { - return !this._disabled -} - -Gauge.prototype.setTemplate = function (template) { - this._gauge.setTemplate(template) - if (this._showing) { - this._requestRedraw() - } -} - -Gauge.prototype._computeTheme = function (theme) { - if (!theme) { - theme = {} - } - if (typeof theme === 'string') { - theme = this._themes.getTheme(theme) - } else if ( - Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null - ) { - var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode - var useColor = theme.hasColor == null ? hasColor : theme.hasColor - theme = this._themes.getDefault({ - hasUnicode: useUnicode, - hasColor: useColor, - platform: theme.platform, - }) - } - return theme -} - -Gauge.prototype.setThemeset = function (themes) { - this._themes = themes - this.setTheme(this._theme) -} - -Gauge.prototype.setTheme = function (theme) { - this._gauge.setTheme(this._computeTheme(theme)) - if (this._showing) { - this._requestRedraw() - } - this._theme = theme -} - -Gauge.prototype._requestRedraw = function () { - this._needsRedraw = true - if (!this._fixedFramerate) { - this._doRedraw() - } -} - -Gauge.prototype.getWidth = function () { - return ((this._tty && this._tty.columns) || 80) - 1 -} - -Gauge.prototype.setWriteTo = function (writeTo, tty) { - var enabled = !this._disabled - if (enabled) { - this.disable() - } - this._writeTo = writeTo - this._tty = tty || - (writeTo === process.stderr && process.stdout.isTTY && process.stdout) || - (writeTo.isTTY && writeTo) || - this._tty - if (this._gauge) { - this._gauge.setWidth(this.getWidth()) - } - if (enabled) { - this.enable() - } -} - -Gauge.prototype.enable = function () { - if (!this._disabled) { - return - } - this._disabled = false - if (this._tty) { - this._enableEvents() - } - if (this._showing) { - this.show() - } -} - -Gauge.prototype.disable = function () { - if (this._disabled) { - return - } - if (this._showing) { - this._lastUpdateAt = null - this._showing = false - this._doRedraw() - this._showing = true - } - this._disabled = true - if (this._tty) { - this._disableEvents() - } -} - -Gauge.prototype._enableEvents = function () { - if (this._cleanupOnExit) { - this._removeOnExit = onExit(callWith(this, this.disable)) - } - this._tty.on('resize', this._$$handleSizeChange) - if (this._fixedFramerate) { - this.redrawTracker = setInterval(this._$$doRedraw, this._updateInterval) - if (this.redrawTracker.unref) { - this.redrawTracker.unref() - } - } -} - -Gauge.prototype._disableEvents = function () { - this._tty.removeListener('resize', this._$$handleSizeChange) - if (this._fixedFramerate) { - clearInterval(this.redrawTracker) - } - if (this._removeOnExit) { - this._removeOnExit() - } -} - -Gauge.prototype.hide = function (cb) { - if (this._disabled) { - return cb && process.nextTick(cb) - } - if (!this._showing) { - return cb && process.nextTick(cb) - } - this._showing = false - this._doRedraw() - cb && setImmediate(cb) -} - -Gauge.prototype.show = function (section, completed) { - this._showing = true - if (typeof section === 'string') { - this._status.section = section - } else if (typeof section === 'object') { - var sectionKeys = Object.keys(section) - for (var ii = 0; ii < sectionKeys.length; ++ii) { - var key = sectionKeys[ii] - this._status[key] = section[key] - } - } - if (completed != null) { - this._status.completed = completed - } - if (this._disabled) { - return - } - this._requestRedraw() -} - -Gauge.prototype.pulse = function (subsection) { - this._status.subsection = subsection || '' - this._status.spun++ - if (this._disabled) { - return - } - if (!this._showing) { - return - } - this._requestRedraw() -} - -Gauge.prototype._handleSizeChange = function () { - this._gauge.setWidth(this._tty.columns - 1) - this._requestRedraw() -} - -Gauge.prototype._doRedraw = function () { - if (this._disabled || this._paused) { - return - } - if (!this._fixedFramerate) { - var now = Date.now() - if (this._lastUpdateAt && now - this._lastUpdateAt < this._updateInterval) { - return - } - this._lastUpdateAt = now - } - if (!this._showing && this._onScreen) { - this._onScreen = false - var result = this._gauge.hide() - if (this._hideCursor) { - result += this._gauge.showCursor() - } - return this._writeTo.write(result) - } - if (!this._showing && !this._onScreen) { - return - } - if (this._showing && !this._onScreen) { - this._onScreen = true - this._needsRedraw = true - if (this._hideCursor) { - this._writeTo.write(this._gauge.hideCursor()) - } - } - if (!this._needsRedraw) { - return - } - if (!this._writeTo.write(this._gauge.show(this._status))) { - this._paused = true - this._writeTo.on('drain', callWith(this, function () { - this._paused = false - this._doRedraw() - })) - } -} diff --git a/node_modules/npm/node_modules/gauge/lib/plumbing.js b/node_modules/npm/node_modules/gauge/lib/plumbing.js deleted file mode 100644 index c4dc3e0..0000000 --- a/node_modules/npm/node_modules/gauge/lib/plumbing.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict' -var consoleControl = require('console-control-strings') -var renderTemplate = require('./render-template.js') -var validate = require('aproba') - -var Plumbing = module.exports = function (theme, template, width) { - if (!width) { - width = 80 - } - validate('OAN', [theme, template, width]) - this.showing = false - this.theme = theme - this.width = width - this.template = template -} -Plumbing.prototype = {} - -Plumbing.prototype.setTheme = function (theme) { - validate('O', [theme]) - this.theme = theme -} - -Plumbing.prototype.setTemplate = function (template) { - validate('A', [template]) - this.template = template -} - -Plumbing.prototype.setWidth = function (width) { - validate('N', [width]) - this.width = width -} - -Plumbing.prototype.hide = function () { - return consoleControl.gotoSOL() + consoleControl.eraseLine() -} - -Plumbing.prototype.hideCursor = consoleControl.hideCursor - -Plumbing.prototype.showCursor = consoleControl.showCursor - -Plumbing.prototype.show = function (status) { - var values = Object.create(this.theme) - for (var key in status) { - values[key] = status[key] - } - - return renderTemplate(this.width, this.template, values).trim() + - consoleControl.color('reset') + - consoleControl.eraseLine() + consoleControl.gotoSOL() -} diff --git a/node_modules/npm/node_modules/gauge/lib/process.js b/node_modules/npm/node_modules/gauge/lib/process.js deleted file mode 100644 index 05e8569..0000000 --- a/node_modules/npm/node_modules/gauge/lib/process.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = process diff --git a/node_modules/npm/node_modules/gauge/lib/progress-bar.js b/node_modules/npm/node_modules/gauge/lib/progress-bar.js deleted file mode 100644 index 184ff25..0000000 --- a/node_modules/npm/node_modules/gauge/lib/progress-bar.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' -var validate = require('aproba') -var renderTemplate = require('./render-template.js') -var wideTruncate = require('./wide-truncate') -var stringWidth = require('string-width') - -module.exports = function (theme, width, completed) { - validate('ONN', [theme, width, completed]) - if (completed < 0) { - completed = 0 - } - if (completed > 1) { - completed = 1 - } - if (width <= 0) { - return '' - } - var sofar = Math.round(width * completed) - var rest = width - sofar - var template = [ - { type: 'complete', value: repeat(theme.complete, sofar), length: sofar }, - { type: 'remaining', value: repeat(theme.remaining, rest), length: rest }, - ] - return renderTemplate(width, template, theme) -} - -// lodash's way of repeating -function repeat (string, width) { - var result = '' - var n = width - do { - if (n % 2) { - result += string - } - n = Math.floor(n / 2) - /* eslint no-self-assign: 0 */ - string += string - } while (n && stringWidth(result) < width) - - return wideTruncate(result, width) -} diff --git a/node_modules/npm/node_modules/gauge/lib/render-template.js b/node_modules/npm/node_modules/gauge/lib/render-template.js deleted file mode 100644 index d1b52c0..0000000 --- a/node_modules/npm/node_modules/gauge/lib/render-template.js +++ /dev/null @@ -1,222 +0,0 @@ -'use strict' -var align = require('wide-align') -var validate = require('aproba') -var wideTruncate = require('./wide-truncate') -var error = require('./error') -var TemplateItem = require('./template-item') - -function renderValueWithValues (values) { - return function (item) { - return renderValue(item, values) - } -} - -var renderTemplate = module.exports = function (width, template, values) { - var items = prepareItems(width, template, values) - var rendered = items.map(renderValueWithValues(values)).join('') - return align.left(wideTruncate(rendered, width), width) -} - -function preType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'pre' + cappedTypeName -} - -function postType (item) { - var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1) - return 'post' + cappedTypeName -} - -function hasPreOrPost (item, values) { - if (!item.type) { - return - } - return values[preType(item)] || values[postType(item)] -} - -function generatePreAndPost (baseItem, parentValues) { - var item = Object.assign({}, baseItem) - var values = Object.create(parentValues) - var template = [] - var pre = preType(item) - var post = postType(item) - if (values[pre]) { - template.push({ value: values[pre] }) - values[pre] = null - } - item.minLength = null - item.length = null - item.maxLength = null - template.push(item) - values[item.type] = values[item.type] - if (values[post]) { - template.push({ value: values[post] }) - values[post] = null - } - return function ($1, $2, length) { - return renderTemplate(length, template, values) - } -} - -function prepareItems (width, template, values) { - function cloneAndObjectify (item, index, arr) { - var cloned = new TemplateItem(item, width) - var type = cloned.type - if (cloned.value == null) { - if (!(type in values)) { - if (cloned.default == null) { - throw new error.MissingTemplateValue(cloned, values) - } else { - cloned.value = cloned.default - } - } else { - cloned.value = values[type] - } - } - if (cloned.value == null || cloned.value === '') { - return null - } - cloned.index = index - cloned.first = index === 0 - cloned.last = index === arr.length - 1 - if (hasPreOrPost(cloned, values)) { - cloned.value = generatePreAndPost(cloned, values) - } - return cloned - } - - var output = template.map(cloneAndObjectify).filter(function (item) { - return item != null - }) - - var remainingSpace = width - var variableCount = output.length - - function consumeSpace (length) { - if (length > remainingSpace) { - length = remainingSpace - } - remainingSpace -= length - } - - function finishSizing (item, length) { - if (item.finished) { - throw new error.Internal('Tried to finish template item that was already finished') - } - if (length === Infinity) { - throw new error.Internal('Length of template item cannot be infinity') - } - if (length != null) { - item.length = length - } - item.minLength = null - item.maxLength = null - --variableCount - item.finished = true - if (item.length == null) { - item.length = item.getBaseLength() - } - if (item.length == null) { - throw new error.Internal('Finished template items must have a length') - } - consumeSpace(item.getLength()) - } - - output.forEach(function (item) { - if (!item.kerning) { - return - } - var prevPadRight = item.first ? 0 : output[item.index - 1].padRight - if (!item.first && prevPadRight < item.kerning) { - item.padLeft = item.kerning - prevPadRight - } - if (!item.last) { - item.padRight = item.kerning - } - }) - - // Finish any that have a fixed (literal or intuited) length - output.forEach(function (item) { - if (item.getBaseLength() == null) { - return - } - finishSizing(item) - }) - - var resized = 0 - var resizing - var hunkSize - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - if (!item.maxLength) { - return - } - if (item.getMaxLength() < hunkSize) { - finishSizing(item, item.maxLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) { - throw new error.Internal('Resize loop iterated too many times while determining maxLength') - } - - resized = 0 - do { - resizing = false - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - if (!item.minLength) { - return - } - if (item.getMinLength() >= hunkSize) { - finishSizing(item, item.minLength) - resizing = true - } - }) - } while (resizing && resized++ < output.length) - if (resizing) { - throw new error.Internal('Resize loop iterated too many times while determining minLength') - } - - hunkSize = Math.round(remainingSpace / variableCount) - output.forEach(function (item) { - if (item.finished) { - return - } - finishSizing(item, hunkSize) - }) - - return output -} - -function renderFunction (item, values, length) { - validate('OON', arguments) - if (item.type) { - return item.value(values, values[item.type + 'Theme'] || {}, length) - } else { - return item.value(values, {}, length) - } -} - -function renderValue (item, values) { - var length = item.getBaseLength() - var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value - if (value == null || value === '') { - return '' - } - var alignWith = align[item.align] || align.left - var leftPadding = item.padLeft ? align.left('', item.padLeft) : '' - var rightPadding = item.padRight ? align.right('', item.padRight) : '' - var truncated = wideTruncate(String(value), length) - var aligned = alignWith(truncated, length) - return leftPadding + aligned + rightPadding -} diff --git a/node_modules/npm/node_modules/gauge/lib/set-immediate.js b/node_modules/npm/node_modules/gauge/lib/set-immediate.js deleted file mode 100644 index 6650a48..0000000 --- a/node_modules/npm/node_modules/gauge/lib/set-immediate.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' -var process = require('./process') -try { - module.exports = setImmediate -} catch (ex) { - module.exports = process.nextTick -} diff --git a/node_modules/npm/node_modules/gauge/lib/set-interval.js b/node_modules/npm/node_modules/gauge/lib/set-interval.js deleted file mode 100644 index 5761987..0000000 --- a/node_modules/npm/node_modules/gauge/lib/set-interval.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict' -// this exists so we can replace it during testing -module.exports = setInterval diff --git a/node_modules/npm/node_modules/gauge/lib/spin.js b/node_modules/npm/node_modules/gauge/lib/spin.js deleted file mode 100644 index 34142ee..0000000 --- a/node_modules/npm/node_modules/gauge/lib/spin.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict' - -module.exports = function spin (spinstr, spun) { - return spinstr[spun % spinstr.length] -} diff --git a/node_modules/npm/node_modules/gauge/lib/template-item.js b/node_modules/npm/node_modules/gauge/lib/template-item.js deleted file mode 100644 index e307e9b..0000000 --- a/node_modules/npm/node_modules/gauge/lib/template-item.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict' -var stringWidth = require('string-width') - -module.exports = TemplateItem - -function isPercent (num) { - if (typeof num !== 'string') { - return false - } - return num.slice(-1) === '%' -} - -function percent (num) { - return Number(num.slice(0, -1)) / 100 -} - -function TemplateItem (values, outputLength) { - this.overallOutputLength = outputLength - this.finished = false - this.type = null - this.value = null - this.length = null - this.maxLength = null - this.minLength = null - this.kerning = null - this.align = 'left' - this.padLeft = 0 - this.padRight = 0 - this.index = null - this.first = null - this.last = null - if (typeof values === 'string') { - this.value = values - } else { - for (var prop in values) { - this[prop] = values[prop] - } - } - // Realize percents - if (isPercent(this.length)) { - this.length = Math.round(this.overallOutputLength * percent(this.length)) - } - if (isPercent(this.minLength)) { - this.minLength = Math.round(this.overallOutputLength * percent(this.minLength)) - } - if (isPercent(this.maxLength)) { - this.maxLength = Math.round(this.overallOutputLength * percent(this.maxLength)) - } - return this -} - -TemplateItem.prototype = {} - -TemplateItem.prototype.getBaseLength = function () { - var length = this.length - if ( - length == null && - typeof this.value === 'string' && - this.maxLength == null && - this.minLength == null - ) { - length = stringWidth(this.value) - } - return length -} - -TemplateItem.prototype.getLength = function () { - var length = this.getBaseLength() - if (length == null) { - return null - } - return length + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMaxLength = function () { - if (this.maxLength == null) { - return null - } - return this.maxLength + this.padLeft + this.padRight -} - -TemplateItem.prototype.getMinLength = function () { - if (this.minLength == null) { - return null - } - return this.minLength + this.padLeft + this.padRight -} diff --git a/node_modules/npm/node_modules/gauge/lib/theme-set.js b/node_modules/npm/node_modules/gauge/lib/theme-set.js deleted file mode 100644 index 643d7db..0000000 --- a/node_modules/npm/node_modules/gauge/lib/theme-set.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -module.exports = function () { - return ThemeSetProto.newThemeSet() -} - -var ThemeSetProto = {} - -ThemeSetProto.baseTheme = require('./base-theme.js') - -ThemeSetProto.newTheme = function (parent, theme) { - if (!theme) { - theme = parent - parent = this.baseTheme - } - return Object.assign({}, parent, theme) -} - -ThemeSetProto.getThemeNames = function () { - return Object.keys(this.themes) -} - -ThemeSetProto.addTheme = function (name, parent, theme) { - this.themes[name] = this.newTheme(parent, theme) -} - -ThemeSetProto.addToAllThemes = function (theme) { - var themes = this.themes - Object.keys(themes).forEach(function (name) { - Object.assign(themes[name], theme) - }) - Object.assign(this.baseTheme, theme) -} - -ThemeSetProto.getTheme = function (name) { - if (!this.themes[name]) { - throw this.newMissingThemeError(name) - } - return this.themes[name] -} - -ThemeSetProto.setDefault = function (opts, name) { - if (name == null) { - name = opts - opts = {} - } - var platform = opts.platform == null ? 'fallback' : opts.platform - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!this.defaults[platform]) { - this.defaults[platform] = { true: {}, false: {} } - } - this.defaults[platform][hasUnicode][hasColor] = name -} - -ThemeSetProto.getDefault = function (opts) { - if (!opts) { - opts = {} - } - var platformName = opts.platform || process.platform - var platform = this.defaults[platformName] || this.defaults.fallback - var hasUnicode = !!opts.hasUnicode - var hasColor = !!opts.hasColor - if (!platform) { - throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - } - if (!platform[hasUnicode][hasColor]) { - if (hasUnicode && hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (hasUnicode && hasColor && platform[!hasUnicode][!hasColor]) { - hasUnicode = false - hasColor = false - } else if (hasUnicode && !hasColor && platform[!hasUnicode][hasColor]) { - hasUnicode = false - } else if (!hasUnicode && hasColor && platform[hasUnicode][!hasColor]) { - hasColor = false - } else if (platform === this.defaults.fallback) { - throw this.newMissingDefaultThemeError(platformName, hasUnicode, hasColor) - } - } - if (platform[hasUnicode][hasColor]) { - return this.getTheme(platform[hasUnicode][hasColor]) - } else { - return this.getDefault(Object.assign({}, opts, { platform: 'fallback' })) - } -} - -ThemeSetProto.newMissingThemeError = function newMissingThemeError (name) { - var err = new Error('Could not find a gauge theme named "' + name + '"') - Error.captureStackTrace.call(err, newMissingThemeError) - err.theme = name - err.code = 'EMISSINGTHEME' - return err -} - -ThemeSetProto.newMissingDefaultThemeError = - function newMissingDefaultThemeError (platformName, hasUnicode, hasColor) { - var err = new Error( - 'Could not find a gauge theme for your platform/unicode/color use combo:\n' + - ' platform = ' + platformName + '\n' + - ' hasUnicode = ' + hasUnicode + '\n' + - ' hasColor = ' + hasColor) - Error.captureStackTrace.call(err, newMissingDefaultThemeError) - err.platform = platformName - err.hasUnicode = hasUnicode - err.hasColor = hasColor - err.code = 'EMISSINGTHEME' - return err - } - -ThemeSetProto.newThemeSet = function () { - var themeset = function (opts) { - return themeset.getDefault(opts) - } - return Object.assign(themeset, ThemeSetProto, { - themes: Object.assign({}, this.themes), - baseTheme: Object.assign({}, this.baseTheme), - defaults: JSON.parse(JSON.stringify(this.defaults || {})), - }) -} diff --git a/node_modules/npm/node_modules/gauge/lib/themes.js b/node_modules/npm/node_modules/gauge/lib/themes.js deleted file mode 100644 index d2e62bb..0000000 --- a/node_modules/npm/node_modules/gauge/lib/themes.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' -var color = require('console-control-strings').color -var ThemeSet = require('./theme-set.js') - -var themes = module.exports = new ThemeSet() - -themes.addTheme('ASCII', { - preProgressbar: '[', - postProgressbar: ']', - progressbarTheme: { - complete: '#', - remaining: '.', - }, - activityIndicatorTheme: '-\\|/', - preSubsection: '>', -}) - -themes.addTheme('colorASCII', themes.getTheme('ASCII'), { - progressbarTheme: { - preComplete: color('bgBrightWhite', 'brightWhite'), - complete: '#', - postComplete: color('reset'), - preRemaining: color('bgBrightBlack', 'brightBlack'), - remaining: '.', - postRemaining: color('reset'), - }, -}) - -themes.addTheme('brailleSpinner', { - preProgressbar: '(', - postProgressbar: ')', - progressbarTheme: { - complete: '#', - remaining: '⠂', - }, - activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏', - preSubsection: '>', -}) - -themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), { - progressbarTheme: { - preComplete: color('bgBrightWhite', 'brightWhite'), - complete: '#', - postComplete: color('reset'), - preRemaining: color('bgBrightBlack', 'brightBlack'), - remaining: '⠂', - postRemaining: color('reset'), - }, -}) - -themes.setDefault({}, 'ASCII') -themes.setDefault({ hasColor: true }, 'colorASCII') -themes.setDefault({ platform: 'darwin', hasUnicode: true }, 'brailleSpinner') -themes.setDefault({ platform: 'darwin', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') -themes.setDefault({ platform: 'linux', hasUnicode: true }, 'brailleSpinner') -themes.setDefault({ platform: 'linux', hasUnicode: true, hasColor: true }, 'colorBrailleSpinner') diff --git a/node_modules/npm/node_modules/gauge/lib/wide-truncate.js b/node_modules/npm/node_modules/gauge/lib/wide-truncate.js deleted file mode 100644 index 5284a69..0000000 --- a/node_modules/npm/node_modules/gauge/lib/wide-truncate.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict' -var stringWidth = require('string-width') -var stripAnsi = require('strip-ansi') - -module.exports = wideTruncate - -function wideTruncate (str, target) { - if (stringWidth(str) === 0) { - return str - } - if (target <= 0) { - return '' - } - if (stringWidth(str) <= target) { - return str - } - - // We compute the number of bytes of ansi sequences here and add - // that to our initial truncation to ensure that we don't slice one - // that we want to keep in half. - var noAnsi = stripAnsi(str) - var ansiSize = str.length + noAnsi.length - var truncated = str.slice(0, target + ansiSize) - - // we have to shrink the result to account for our ansi sequence buffer - // (if an ansi sequence was truncated) and double width characters. - while (stringWidth(truncated) > target) { - truncated = truncated.slice(0, -1) - } - return truncated -} diff --git a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/index.js b/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/index.js deleted file mode 100644 index 616ff83..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; diff --git a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/license b/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/package.json b/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/package.json deleted file mode 100644 index 017f531..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "ansi-regex", - "version": "5.0.1", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/index.js b/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/index.js deleted file mode 100644 index 9a593df..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); - -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/license b/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/package.json b/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/package.json deleted file mode 100644 index 1a41108..0000000 --- a/node_modules/npm/node_modules/gauge/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "strip-ansi", - "version": "6.0.1", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - } -} diff --git a/node_modules/npm/node_modules/gauge/package.json b/node_modules/npm/node_modules/gauge/package.json deleted file mode 100644 index 449d9dd..0000000 --- a/node_modules/npm/node_modules/gauge/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "gauge", - "version": "5.0.1", - "description": "A terminal based horizontal gauge", - "main": "lib", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/gauge.git" - }, - "keywords": [ - "progressbar", - "progress", - "gauge" - ], - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/gauge/issues" - }, - "homepage": "https://github.com/npm/gauge", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^4.0.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.14.1", - "readable-stream": "^4.0.0", - "tap": "^16.0.1" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "tap": { - "branches": 79, - "statements": 89, - "functions": 92, - "lines": 90, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.14.1", - "publish": "true" - } -} diff --git a/node_modules/npm/node_modules/glob/LICENSE b/node_modules/npm/node_modules/glob/LICENSE deleted file mode 100644 index ec7df93..0000000 --- a/node_modules/npm/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/glob/README.md b/node_modules/npm/node_modules/glob/README.md deleted file mode 100644 index 9f6e80f..0000000 --- a/node_modules/npm/node_modules/glob/README.md +++ /dev/null @@ -1,1214 +0,0 @@ -# Glob - -Match files using the patterns the shell uses. - -The most correct and second fastest glob implementation in -JavaScript. (See **Comparison to Other JavaScript Glob -Implementations** at the bottom of this readme.) - -![a fun cartoon logo made of glob characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -**Note** the npm package name is _not_ `node-glob` that's a -different thing that was abandoned years ago. Just `glob`. - -```js -// load using import -import { glob, globSync, globStream, globStreamSync, Glob } from 'glob' -// or using commonjs, that's fine, too -const { - glob, - globSync, - globStream, - globStreamSync, - Glob, -} = require('glob') - -// the main glob() and globSync() resolve/return array of filenames - -// all js files, but don't look in node_modules -const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' }) - -// pass in a signal to cancel the glob walk -const stopAfter100ms = await glob('**/*.css', { - signal: AbortSignal.timeout(100), -}) - -// multiple patterns supported as well -const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}']) - -// but of course you can do that with the glob pattern also -// the sync function is the same, just returns a string[] instead -// of Promise -const imagesAlt = globSync('{css,public}/*.{png,jpeg}') - -// you can also stream them, this is a Minipass stream -const filesStream = globStream(['**/*.dat', 'logs/**/*.log']) - -// construct a Glob object if you wanna do it that way, which -// allows for much faster walks if you have to look in the same -// folder multiple times. -const g = new Glob('**/foo', {}) -// glob objects are async iterators, can also do globIterate() or -// g.iterate(), same deal -for await (const file of g) { - console.log('found a foo file:', file) -} -// pass a glob as the glob options to reuse its settings and caches -const g2 = new Glob('**/bar', g) -// sync iteration works as well -for (const file of g2) { - console.log('found a bar file:', file) -} - -// you can also pass withFileTypes: true to get Path objects -// these are like a Dirent, but with some more added powers -// check out http://npm.im/path-scurry for more info on their API -const g3 = new Glob('**/baz/**', { withFileTypes: true }) -g3.stream().on('data', path => { - console.log( - 'got a path object', - path.fullpath(), - path.isDirectory(), - path.readdirSync().map(e => e.name) - ) -}) - -// if you use stat:true and withFileTypes, you can sort results -// by things like modified time, filter by permission mode, etc. -// All Stats fields will be available in that case. Slightly -// slower, though. -// For example: -const results = await glob('**', { stat: true, withFileTypes: true }) - -const timeSortedFiles = results - .sort((a, b) => a.mtimeMs - b.mtimeMs) - .map(path => path.fullpath()) - -const groupReadableFiles = results - .filter(path => path.mode & 0o040) - .map(path => path.fullpath()) - -// custom ignores can be done like this, for example by saying -// you'll ignore all markdown files, and all folders named 'docs' -const customIgnoreResults = await glob('**', { - ignore: { - ignored: p => /\.md$/.test(p.name), - childrenIgnored: p => p.isNamed('docs'), - }, -}) - -// another fun use case, only return files with the same name as -// their parent folder, plus either `.ts` or `.js` -const folderNamedModules = await glob('**/*.{ts,js}', { - ignore: { - ignored: p => { - const pp = p.parent - return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js')) - }, - }, -}) - -// find all files edited in the last hour, to do this, we ignore -// all of them that are more than an hour old -const newFiles = await glob('**', { - // need stat so we have mtime - stat: true, - // only want the files, not the dirs - nodir: true, - ignore: { - ignored: p => { - return new Date() - p.mtime > 60 * 60 * 1000 - }, - // could add similar childrenIgnored here as well, but - // directory mtime is inconsistent across platforms, so - // probably better not to, unless you know the system - // tracks this reliably. - }, -}) -``` - -**Note** Glob patterns should always use `/` as a path separator, -even on Windows systems, as `\` is used to escape glob -characters. If you wish to use `\` as a path separator _instead -of_ using it as an escape character on Windows platforms, you may -set `windowsPathsNoEscape:true` in the options. In this mode, -special glob characters cannot be escaped, making it impossible -to match a literal `*` `?` and so on in filenames. - -## Command Line Interface - -``` -$ glob -h - -Usage: - glob [options] [ [ ...]] - -Expand the positional glob expression arguments into any matching file system -paths found. - - -c --cmd= - Run the command provided, passing the glob expression - matches as arguments. - - -A --all By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell - expands an argument whose filename is a glob - expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', - then on Windows powershell or cmd.exe, 'glob app/*.ts' - will expand to 'app/[id].ts', as expected. However, in - posix shells such as bash or zsh, the shell will first - expand 'app/*.ts' to a list of filenames. Then glob - will look for a file matching 'app/[id].ts' (ie, - 'app/i.ts' or 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob to - treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - - -a --absolute Expand to absolute paths - -d --dot-relative Prepend './' on relative matches - -m --mark Append a / on any directories matched - -x --posix Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\foo\bar', it - will expand to '//?/C:/foo/bar'. - - -f --follow Follow symlinked directories when expanding '**' - -R --realpath Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - - -s --stat Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match. - - -b --match-base Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - - --dot Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - - --nobrace Do not expand {...} patterns - --nocase Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on all - others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - - --nodir Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - - --noext Do not expand extglob patterns, such as '+(a|b)' - --noglobstar Do not expand '**' against multiple path portions. Ie, - treat it as a normal '*' instead. - - --windows-path-no-escape - Use '\' as a path separator *only*, and *never* as an - escape character. If set, all '\' characters are - replaced with '/' in the pattern. - - -D --max-depth= Maximum depth to traverse from the current working - directory - - -C --cwd= Current working directory to execute/match in - -r --root= A string path resolved against the 'cwd', which is used - as the starting point for absolute patterns that start - with '/' (but not drive letters or UNC paths on - Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root - directory on the filesystem, and any non-absolute - patterns will still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - - --platform= Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior! - - -i --ignore= - Glob patterns to ignore Can be set multiple times - -v --debug Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files. - - -h --help Show this usage information -``` - -## `glob(pattern: string | string[], options?: GlobOptions) => Promise` - -Perform an asynchronous glob search for the pattern(s) specified. -Returns -[Path](https://isaacs.github.io/path-scurry/classes/PathBase) -objects if the `withFileTypes` option is set to `true`. See below -for full options field desciptions. - -## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]` - -Synchronous form of `glob()`. - -Alias: `glob.sync()` - -## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator` - -Return an async iterator for walking glob pattern matches. - -Alias: `glob.iterate()` - -## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator` - -Return a sync iterator for walking glob pattern matches. - -Alias: `glob.iterate.sync()`, `glob.sync.iterate()` - -## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass` - -Return a stream that emits all the strings or `Path` objects and -then emits `end` when completed. - -Alias: `glob.stream()` - -## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass` - -Syncronous form of `globStream()`. Will read all the matches as -fast as you consume them, even all in a single tick if you -consume them immediately, but will still respond to backpressure -if they're not consumed immediately. - -Alias: `glob.stream.sync()`, `glob.sync.stream()` - -## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean` - -Returns `true` if the provided pattern contains any "magic" glob -characters, given the options provided. - -Brace expansion is not considered "magic" unless the -`magicalBraces` option is set, as brace expansion just turns one -string into an array of strings. So a pattern like `'x{a,b}y'` -would return `false`, because `'xay'` and `'xby'` both do not -contain any magic glob characters, and it's treated the same as -if you had called it on `['xay', 'xby']`. When -`magicalBraces:true` is in the options, brace expansion _is_ -treated as a pattern having magic. - -## `escape(pattern: string, options?: GlobOptions) => string` - -Escape all magic characters in a glob pattern, so that it will -only ever match literal strings - -If the `windowsPathsNoEscape` option is used, then characters are -escaped by wrapping in `[]`, because a magic character wrapped in -a character class can only be satisfied by that exact character. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## `unescape(pattern: string, options?: GlobOptions) => string` - -Un-escape a glob string that may contain some escaped characters. - -If the `windowsPathsNoEscape` option is used, then square-brace -escapes are removed, but not backslash escapes. For example, it -will turn the string `'[*]'` into `*`, but it will not turn -`'\\*'` into `'*'`, because `\` is a path separator in -`windowsPathsNoEscape` mode. - -When `windowsPathsNoEscape` is not set, then both brace escapes -and backslash escapes are removed. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## Class `Glob` - -An object that can perform glob pattern traversals. - -### `const g = new Glob(pattern: string | string[], options: GlobOptions)` - -Options object is required. - -See full options descriptions below. - -Note that a previous `Glob` object can be passed as the -`GlobOptions` to another `Glob` instantiation to re-use settings -and caches with a new pattern. - -Traversal functions can be called multiple times to run the walk -again. - -### `g.stream()` - -Stream results asynchronously, - -### `g.streamSync()` - -Stream results synchronously. - -### `g.iterate()` - -Default async iteration function. Returns an AsyncGenerator that -iterates over the results. - -### `g.iterateSync()` - -Default sync iteration function. Returns a Generator that -iterates over the results. - -### `g.walk()` - -Returns a Promise that resolves to the results array. - -### `g.walkSync()` - -Returns a results array. - -### Properties - -All options are stored as properties on the `Glob` object. - -- `opts` The options provided to the constructor. -- `patterns` An array of parsed immutable `Pattern` objects. - -## Options - -Exported as `GlobOptions` TypeScript interface. A `GlobOptions` -object may be provided to any of the exported methods, and must -be provided to the `Glob` constructor. - -All options are optional, boolean, and false by default, unless -otherwise noted. - -All resolved options are added to the Glob object as properties. - -If you are running many `glob` operations, you can pass a Glob -object as the `options` argument to a subsequent operation to -share the previously loaded cache. - -- `cwd` String path or `file://` string or URL object. The - current working directory in which to search. Defaults to - `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and - UNC Paths", below. - - This option may be eiher a string path or a `file://` URL - object or string. - -- `root` A string path resolved against the `cwd` option, which - is used as the starting point for absolute patterns that start - with `/`, (but not drive letters or UNC paths on Windows). - - Note that this _doesn't_ necessarily limit the walk to the - `root` directory, and doesn't affect the cwd starting point for - non-absolute patterns. A pattern containing `..` will still be - able to traverse out of the root directory, if it is not an - actual root directory on the filesystem, and any non-absolute - patterns will be matched in the `cwd`. For example, the - pattern `/../*` with `{root:'/some/path'}` will return all - files in `/some`, not all files in `/some/path`. The pattern - `*` with `{root:'/some/path'}` will return all the entries in - the cwd, not the entries in `/some/path`. - - To start absolute and non-absolute patterns in the same - path, you can use `{root:''}`. However, be aware that on - Windows systems, a pattern like `x:/*` or `//host/share/*` will - _always_ start in the `x:/` or `//host/share` directory, - regardless of the `root` setting. - -- `windowsPathsNoEscape` Use `\\` as a path separator _only_, and - _never_ as an escape character. If set, all `\\` characters are - replaced with `/` in the pattern. - - Note that this makes it **impossible** to match against paths - containing literal glob pattern characters, but allows matching - with patterns constructed using `path.join()` and - `path.resolve()` on Windows platforms, mimicking the (buggy!) - behavior of Glob v7 and before on Windows. Please use with - caution, and be mindful of [the caveat below about Windows - paths](#windows). (For legacy reasons, this is also set if - `allowWindowsEscape` is set to the exact value `false`.) - -- `dot` Include `.dot` files in normal matches and `globstar` - matches. Note that an explicit dot in a portion of the pattern - will always match dot files. - -- `magicalBraces` Treat brace expansion like `{a,b}` as a "magic" - pattern. Has no effect if {@link nobrace} is set. - - Only has effect on the {@link hasMagic} function, no effect on - glob pattern matching itself. - -- `dotRelative` Prepend all relative path strings with `./` (or - `.\` on Windows). - - Without this option, returned relative paths are "bare", so - instead of returning `'./foo/bar'`, they are returned as - `'foo/bar'`. - - Relative patterns starting with `'../'` are not prepended with - `./`, even if this option is set. - -- `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. - -- `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. - -- `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) - -- `noext` Do not match "extglob" patterns such as `+(a|b)`. - -- `nocase` Perform a case-insensitive match. This defaults to - `true` on macOS and Windows systems, and `false` on all others. - - **Note** `nocase` should only be explicitly set when it is - known that the filesystem's case sensitivity differs from the - platform default. If set `true` on case-sensitive file - systems, or `false` on case-insensitive file systems, then the - walk may return more or less results than expected. - -- `maxDepth` Specify a number to limit the depth of the directory - traversal to this many levels below the `cwd`. - -- `matchBase` Perform a basename-only match if the pattern does - not contain any slash characters. That is, `*.js` would be - treated as equivalent to `**/*.js`, matching all js files in - all directories. - -- `nodir` Do not match directories, only files. (Note: to match - _only_ directories, put a `/` at the end of the pattern.) - -- `stat` Call `lstat()` on all entries, whether required or not - to determine whether it's a valid match. When used with - `withFileTypes`, this means that matches will include data such - as modified time, permissions, and so on. Note that this will - incur a performance cost due to the added system calls. - -- `ignore` string or string[], or an object with `ignore` and - `ignoreChildren` methods. - - If a string or string[] is provided, then this is treated as a - glob pattern or array of glob patterns to exclude from matches. - To ignore all children within a directory, as well as the entry - itself, append `'/**'` to the ignore pattern. - - **Note** `ignore` patterns are _always_ in `dot:true` mode, - regardless of any other settings. - - If an object is provided that has `ignored(path)` and/or - `childrenIgnored(path)` methods, then these methods will be - called to determine whether any Path is a match or if its - children should be traversed, respectively. - -- `follow` Follow symlinked directories when expanding `**` - patterns. This can result in a lot of duplicate references in - the presence of cyclic links, and make performance quite bad. - - By default, a `**` in a pattern will follow 1 symbolic link if - it is not the first item in the pattern, or none if it is the - first item in the pattern, following the same behavior as Bash. - -- `realpath` Set to true to call `fs.realpath` on all of the - results. In the case of an entry that cannot be resolved, the - entry is omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - -- `absolute` Set to true to always receive absolute paths for - matched files. Set to `false` to always receive relative paths - for matched files. - - By default, when this option is not set, absolute paths are - returned for patterns that are absolute, and otherwise paths - are returned that are relative to the `cwd` setting. - - This does _not_ make an extra system call to get the realpath, - it only does string path resolution. - - `absolute` may not be used along with `withFileTypes`. - -- `posix` Set to true to use `/` as the path separator in - returned results. On posix systems, this has no effect. On - Windows systems, this will return `/` delimited path results, - and absolute paths will be returned in their full resolved UNC - path form, eg insted of `'C:\\foo\\bar'`, it will return - `//?/C:/foo/bar`. - -- `platform` Defaults to value of `process.platform` if - available, or `'linux'` if not. Setting `platform:'win32'` on - non-Windows systems may cause strange behavior. - -- `withFileTypes` Return [PathScurry](http://npm.im/path-scurry) - `Path` objects instead of strings. These are similar to a - NodeJS `Dirent` object, but with additional methods and - properties. - - `withFileTypes` may not be used along with `absolute`. - -- `signal` An AbortSignal which will cancel the Glob walk when - triggered. - -- `fs` An override object to pass in custom filesystem methods. - See [PathScurry docs](http://npm.im/path-scurry) for what can - be overridden. - -- `scurry` A [PathScurry](http://npm.im/path-scurry) object used - to traverse the file system. If the `nocase` option is set - explicitly, then any provided `scurry` object must match this - setting. - -## Glob Primer - -Much more information about glob pattern expansion can be found -by running `man bash` and searching for `Pattern Matching`. - -"Globs" are the patterns you type when you do stuff like `ls -*.js` on the command line, or put `build/*` in a `.gitignore` -file. - -Before parsing the path part patterns, braced sections are -expanded into a set. Braced sections start with `{` and end with -`}`, with 2 or more comma-delimited sections within. Braced -sections may contain slash characters, so `a{/b/c,bcd}` would -expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in -a path portion. With the exception of `**`, none of these match -path separators (ie, `/` on all platforms, and `\` on Windows). - -- `*` Matches 0 or more characters in a single path portion. - When alone in a path portion, it must match at least 1 - character. If `dot:true` is not specified, then `*` will not - match against a `.` character at the start of a path portion. -- `?` Matches 1 character. If `dot:true` is not specified, then - `?` will not match against a `.` character at the start of a - path portion. -- `[...]` Matches a range of characters, similar to a RegExp - range. If the first character of the range is `!` or `^` then - it matches any character not in the range. If the first - character is `]`, then it will be considered the same as `\]`, - rather than the end of the character class. -- `!(pattern|pattern|pattern)` Matches anything that does not - match any of the patterns provided. May _not_ contain `/` - characters. Similar to `*`, if alone in a path portion, then - the path portion must have at least one character. -- `?(pattern|pattern|pattern)` Matches zero or one occurrence of - the patterns provided. May _not_ contain `/` characters. -- `+(pattern|pattern|pattern)` Matches one or more occurrences of - the patterns provided. May _not_ contain `/` characters. -- `*(a|b|c)` Matches zero or more occurrences of the patterns - provided. May _not_ contain `/` characters. -- `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided. May _not_ contain `/` characters. -- `**` If a "globstar" is alone in a path portion, then it - matches zero or more directories and subdirectories searching - for matches. It does not crawl symlinked directories, unless - `{follow:true}` is passed in the options object. A pattern - like `a/b/**` will only match `a/b` if it is a directory. - Follows 1 symbolic link if not the first item in the pattern, - or 0 if it is the first item, unless `follow:true` is set, in - which case it follows all symbolic links. - -`[:class:]` patterns are supported by this implementation, but -`[=c=]` and `[.symbol.]` style class patterns are not. - -### Dots - -If a file or directory path portion has a `.` as the first -character, then it will not match any glob pattern unless that -pattern's corresponding path part also has a `.` as its first -character. - -For example, the pattern `a/.*/c` would match the file at -`a/.b/c`. However the pattern `a/*/c` would not, because `*` does -not start with a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has -no slashes in it, then it will seek for any file anywhere in the -tree with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. -This differs from the shell, where the pattern itself is -returned. For example: - -```sh -$ echo a*s*d*f -a*s*d*f -``` - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a -worthwhile goal, some discrepancies exist between node-glob and -other implementations, and are intentional. - -The double-star character `**` is supported by default, unless -the `noglobstar` flag is set. This is supported in the manner of -bsdglob and bash 5, where `**` only has special significance if -it is the only thing in a path part. That is, `a/**/b` will match -`a/x/y/b`, but `a/**b` will not. - -Note that symlinked directories are not traversed as part of a -`**`, though their contents may match against subsequent portions -of the pattern. This prevents infinite loops and duplicates and -the like. You can force glob to traverse symlinks with `**` by -setting `{follow:true}` in the options. - -There is no equivalent of the `nonull` option. A pattern that -does not find any matches simply resolves to nothing. (An empty -array, immediately ended stream, etc.) - -If brace expansion is not disabled, then it is performed before -any other interpretation of the glob pattern. Thus, a pattern -like `+(a|{b),c)}`, which would not be valid in bash or zsh, is -expanded **first** into the set of `+(a|b)` and `+(a|c)`, and -those patterns are checked for validity. Since those two are -valid, matching proceeds. - -The character class patterns `[:class:]` (posix standard named -classes) style class patterns are supported and unicode-aware, -but `[=c=]` (locale-specific character collation weight), and -`[.symbol.]` (collating symbol), are not. - -### Repeated Slashes - -Unlike Bash and zsh, repeated `/` are always coalesced into a -single path separator. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if -it started with a `#` character, or a "negated" pattern if it -started with a `!` character. - -These options were deprecated in version 5, and removed in -version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only -`/` characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will -always be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto -the root setting using `path.join`. On windows, this will by -default result in `/foo/*` matching `C:\foo\bar.txt`. - -To automatically coerce all `\` characters to `/` in pattern -strings, **thus making it impossible to escape literal glob -characters**, you may set the `windowsPathsNoEscape` option to -`true`. - -### Windows, CWDs, Drive Letters, and UNC Paths - -On posix systems, when a pattern starts with `/`, any `cwd` -option is ignored, and the traversal starts at `/`, plus any -non-magic path portions specified in the pattern. - -On Windows systems, the behavior is similar, but the concept of -an "absolute path" is somewhat more involved. - -#### UNC Paths - -A UNC path may be used as the start of a pattern on Windows -platforms. For example, a pattern like: `//?/x:/*` will return -all file entries in the root of the `x:` drive. A pattern like -`//ComputerName/Share/*` will return all files in the associated -share. - -UNC path roots are always compared case insensitively. - -#### Drive Letters - -A pattern starting with a drive letter, like `c:/*`, will search -in that drive, regardless of any `cwd` option provided. - -If the pattern starts with `/`, and is not a UNC path, and there -is an explicit `cwd` option set with a drive letter, then the -drive letter in the `cwd` is used as the root of the directory -traversal. - -For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return -`['c:/tmp']` as the result. - -If an explicit `cwd` option is not provided, and the pattern -starts with `/`, then the traversal will run on the root of the -drive provided as the `cwd` option. (That is, it is the result of -`path.resolve('/')`.) - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race -conditions, since it relies on directory walking. - -As a result, it is possible that a file that exists when glob -looks for it may have been deleted or modified by the time it -returns the result. - -By design, this implementation caches all readdir calls that it -makes, in order to cut down on system overhead. However, this -also makes it even more susceptible to races, especially if the -cache object is reused between glob calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast -majority of operations, this is never a problem. - -### See Also: - -- `man sh` -- `man bash` [Pattern - Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) -- `man 3 fnmatch` -- `man 5 gitignore` -- [minimatch documentation](https://github.com/isaacs/minimatch) - -## Glob Logo - -Glob's logo was created by [Tanya -Brassie](http://tanyabrassie.com/). Logo files can be found -[here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons -Attribution-ShareAlike 4.0 International -License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a -test. - -Patches that fail tests or reduce performance will be rejected. - -```sh -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# run the benchmarks -npm run bench - -# to profile javascript -npm run prof -``` - -## Comparison to Other JavaScript Glob Implementations - -**tl;dr** - -- If you want glob matching that is as faithful as possible to - Bash pattern expansion semantics, and as fast as possible - within that constraint, _use this module_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the absolutely fastest glob - matcher out there, _use [fast-glob](http://npm.im/fast-glob)_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the convenience of - automatically respecting `.gitignore` files, _use - [globby](http://npm.im/globby)_. - -There are some other glob matcher libraries on npm, but these -three are (in my opinion, as of 2023) the best. - ---- - -**full explanation** - -Every library reflects a set of opinions and priorities in the -trade-offs it makes. Other than this library, I can personally -recommend both [globby](http://npm.im/globby) and -[fast-glob](http://npm.im/fast-glob), though they differ in their -benefits and drawbacks. - -Both have very nice APIs and are reasonably fast. - -`fast-glob` is, as far as I am aware, the fastest glob -implementation in JavaScript today. However, there are many -cases where the choices that `fast-glob` makes in pursuit of -speed mean that its results differ from the results returned by -Bash and other sh-like shells, which may be surprising. - -In my testing, `fast-glob` is around 10-20% faster than this -module when walking over 200k files nested 4 directories -deep[1](#fn-webscale). However, there are some inconsistencies -with Bash matching behavior that this module does not suffer -from: - -- `**` only matches files, not directories -- `..` path portions are not handled unless they appear at the - start of the pattern -- `./!()` will not match any files that _start_ with - ``, even if they do not match ``. For - example, `!(9).txt` will not match `9999.txt`. -- Some brace patterns in the middle of a pattern will result in - failing to find certain matches. -- Extglob patterns are allowed to contain `/` characters. - -Globby exhibits all of the same pattern semantics as fast-glob, -(as it is a wrapper around fast-glob) and is slightly slower than -node-glob (by about 10-20% in the benchmark test set, or in other -words, anywhere from 20-50% slower than fast-glob). However, it -adds some API conveniences that may be worth the costs. - -- Support for `.gitignore` and other ignore files. -- Support for negated globs (ie, patterns starting with `!` - rather than using a separate `ignore` option). - -The priority of this module is "correctness" in the sense of -performing a glob pattern expansion as faithfully as possible to -the behavior of Bash and other sh-like shells, with as much speed -as possible. - -Note that prior versions of `node-glob` are _not_ on this list. -Former versions of this module are far too slow for any cases -where performance matters at all, and were designed with APIs -that are extremely dated by current JavaScript standards. - ---- - -[1]: In the cases where this module -returns results and `fast-glob` doesn't, it's even faster, of -course. - -![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif) - -### Benchmark Results - -First number is time, smaller is better. - -Second number is the count of results returned. - -``` ---- pattern: '**' --- -~~ sync ~~ -node fast-glob sync 0m0.598s 200364 -node globby sync 0m0.765s 200364 -node current globSync mjs 0m0.683s 222656 -node current glob syncStream 0m0.649s 222656 -~~ async ~~ -node fast-glob async 0m0.350s 200364 -node globby async 0m0.509s 200364 -node current glob async mjs 0m0.463s 222656 -node current glob stream 0m0.411s 222656 - ---- pattern: '**/..' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.769s 200364 -node current globSync mjs 0m0.564s 2242 -node current glob syncStream 0m0.583s 2242 -~~ async ~~ -node fast-glob async 0m0.283s 0 -node globby async 0m0.512s 200364 -node current glob async mjs 0m0.299s 2242 -node current glob stream 0m0.312s 2242 - ---- pattern: './**/0/**/0/**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.490s 10 -node globby sync 0m0.517s 10 -node current globSync mjs 0m0.540s 10 -node current glob syncStream 0m0.550s 10 -~~ async ~~ -node fast-glob async 0m0.290s 10 -node globby async 0m0.296s 10 -node current glob async mjs 0m0.278s 10 -node current glob stream 0m0.302s 10 - ---- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.500s 160 -node globby sync 0m0.528s 160 -node current globSync mjs 0m0.556s 160 -node current glob syncStream 0m0.573s 160 -~~ async ~~ -node fast-glob async 0m0.283s 160 -node globby async 0m0.301s 160 -node current glob async mjs 0m0.306s 160 -node current glob stream 0m0.322s 160 - ---- pattern: './**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.502s 5230 -node globby sync 0m0.527s 5230 -node current globSync mjs 0m0.544s 5230 -node current glob syncStream 0m0.557s 5230 -~~ async ~~ -node fast-glob async 0m0.285s 5230 -node globby async 0m0.305s 5230 -node current glob async mjs 0m0.304s 5230 -node current glob stream 0m0.310s 5230 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.580s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.685s 200023 -node current glob syncStream 0m0.649s 200023 -~~ async ~~ -node fast-glob async 0m0.349s 200023 -node globby async 0m0.509s 200023 -node current glob async mjs 0m0.427s 200023 -node current glob stream 0m0.388s 200023 - ---- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.716s 200023 -node current glob syncStream 0m0.684s 200023 -~~ async ~~ -node fast-glob async 0m0.351s 200023 -node globby async 0m0.518s 200023 -node current glob async mjs 0m0.462s 200023 -node current glob stream 0m0.468s 200023 - ---- pattern: '**/5555/0000/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.496s 1000 -node globby sync 0m0.519s 1000 -node current globSync mjs 0m0.539s 1000 -node current glob syncStream 0m0.567s 1000 -~~ async ~~ -node fast-glob async 0m0.285s 1000 -node globby async 0m0.299s 1000 -node current glob async mjs 0m0.305s 1000 -node current glob stream 0m0.301s 1000 - ---- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.484s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.577s 4880 -node current glob syncStream 0m0.586s 4880 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.298s 0 -node current glob async mjs 0m0.327s 4880 -node current glob stream 0m0.324s 4880 - ---- pattern: '**/????/????/????/????/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.547s 100000 -node globby sync 0m0.673s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.618s 100000 -~~ async ~~ -node fast-glob async 0m0.315s 100000 -node globby async 0m0.414s 100000 -node current glob async mjs 0m0.366s 100000 -node current glob stream 0m0.345s 100000 - ---- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 100000 -node globby sync 0m0.670s 100000 -node current globSync mjs 0m0.717s 200023 -node current glob syncStream 0m0.687s 200023 -~~ async ~~ -node fast-glob async 0m0.343s 100000 -node globby async 0m0.418s 100000 -node current glob async mjs 0m0.519s 200023 -node current glob stream 0m0.451s 200023 - ---- pattern: '**/!(0|9).txt' --- -~~ sync ~~ -node fast-glob sync 0m0.573s 160023 -node globby sync 0m0.731s 160023 -node current globSync mjs 0m0.680s 180023 -node current glob syncStream 0m0.659s 180023 -~~ async ~~ -node fast-glob async 0m0.345s 160023 -node globby async 0m0.476s 160023 -node current glob async mjs 0m0.427s 180023 -node current glob stream 0m0.388s 180023 - ---- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.483s 0 -node globby sync 0m0.512s 0 -node current globSync mjs 0m0.811s 200023 -node current glob syncStream 0m0.773s 200023 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.299s 0 -node current glob async mjs 0m0.617s 200023 -node current glob stream 0m0.568s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.485s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.759s 200023 -node current glob syncStream 0m0.740s 200023 -~~ async ~~ -node fast-glob async 0m0.281s 0 -node globby async 0m0.297s 0 -node current glob async mjs 0m0.544s 200023 -node current glob stream 0m0.464s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.513s 0 -node current globSync mjs 0m0.734s 200023 -node current glob syncStream 0m0.696s 200023 -~~ async ~~ -node fast-glob async 0m0.286s 0 -node globby async 0m0.296s 0 -node current glob async mjs 0m0.506s 200023 -node current glob stream 0m0.483s 200023 - ---- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.060s 0 -node globby sync 0m0.074s 0 -node current globSync mjs 0m0.067s 0 -node current glob syncStream 0m0.066s 0 -~~ async ~~ -node fast-glob async 0m0.060s 0 -node globby async 0m0.075s 0 -node current glob async mjs 0m0.066s 0 -node current glob stream 0m0.067s 0 - ---- pattern: './**/?/**/?/**/?/**/?/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.568s 100000 -node globby sync 0m0.651s 100000 -node current globSync mjs 0m0.619s 100000 -node current glob syncStream 0m0.617s 100000 -~~ async ~~ -node fast-glob async 0m0.332s 100000 -node globby async 0m0.409s 100000 -node current glob async mjs 0m0.372s 100000 -node current glob stream 0m0.351s 100000 - ---- pattern: '**/*/**/*/**/*/**/*/**' --- -~~ sync ~~ -node fast-glob sync 0m0.603s 200113 -node globby sync 0m0.798s 200113 -node current globSync mjs 0m0.730s 222137 -node current glob syncStream 0m0.693s 222137 -~~ async ~~ -node fast-glob async 0m0.356s 200113 -node globby async 0m0.525s 200113 -node current glob async mjs 0m0.508s 222137 -node current glob stream 0m0.455s 222137 - ---- pattern: './**/*/**/*/**/*/**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.622s 200000 -node globby sync 0m0.792s 200000 -node current globSync mjs 0m0.722s 200000 -node current glob syncStream 0m0.695s 200000 -~~ async ~~ -node fast-glob async 0m0.369s 200000 -node globby async 0m0.527s 200000 -node current glob async mjs 0m0.502s 200000 -node current glob stream 0m0.481s 200000 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.684s 200023 -node current glob syncStream 0m0.658s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.516s 200023 -node current glob async mjs 0m0.432s 200023 -node current glob stream 0m0.384s 200023 - ---- pattern: './**/**/**/**/**/**/**/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.682s 200023 -node current glob syncStream 0m0.652s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.523s 200023 -node current glob async mjs 0m0.436s 200023 -node current glob stream 0m0.380s 200023 - ---- pattern: '**/*/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.592s 200023 -node globby sync 0m0.776s 200023 -node current globSync mjs 0m0.691s 200023 -node current glob syncStream 0m0.659s 200023 -~~ async ~~ -node fast-glob async 0m0.357s 200023 -node globby async 0m0.513s 200023 -node current glob async mjs 0m0.471s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.585s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.694s 200023 -node current glob syncStream 0m0.664s 200023 -~~ async ~~ -node fast-glob async 0m0.350s 200023 -node globby async 0m0.514s 200023 -node current glob async mjs 0m0.472s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/[0-9]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.544s 100000 -node globby sync 0m0.636s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.621s 100000 -~~ async ~~ -node fast-glob async 0m0.322s 100000 -node globby async 0m0.404s 100000 -node current glob async mjs 0m0.360s 100000 -node current glob stream 0m0.352s 100000 -``` diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts deleted file mode 100644 index a8b3da7..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -/// -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts.map deleted file mode 100644 index 5216438..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/glob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IAEnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,EAAE,CAAC,EAAE,QAAQ,CAAA;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,4BAA4B,GAAG,WAAW,GAAG;IACvD,aAAa,EAAE,IAAI,CAAA;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,KAAK,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI,IAAI,SAAS,4BAA4B,GAChE,IAAI,GACJ,IAAI,SAAS,6BAA6B,GAC1C,MAAM,GACN,IAAI,SAAS,6BAA6B,GAC1C,MAAM,GACN,MAAM,GAAG,IAAI,CAAA;AACjB,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;AAE1C,MAAM,MAAM,SAAS,CAAC,IAAI,IAAI,IAAI,SAAS,4BAA4B,GACnE,IAAI,GACJ,IAAI,SAAS,6BAA6B,GAC1C,KAAK,GACL,IAAI,SAAS,6BAA6B,GAC1C,KAAK,GACL,OAAO,CAAA;AAEX;;GAEG;AACH,qBAAa,IAAI,CAAC,IAAI,SAAS,WAAW,CAAE,YAAW,WAAW;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAE9B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA4HlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAmBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/glob.js b/node_modules/npm/node_modules/glob/dist/commonjs/glob.js deleted file mode 100644 index 5e37335..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/glob.js +++ /dev/null @@ -1,243 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Glob = void 0; -const minimatch_1 = require("minimatch"); -const path_scurry_1 = require("path-scurry"); -const url_1 = require("url"); -const pattern_js_1 = require("./pattern.js"); -const walker_js_1 = require("./walker.js"); -// if no process global, just call it linux. -// so we default to case-sensitive, / separators -const defaultPlatform = typeof process === 'object' && - process && - typeof process.platform === 'string' - ? process.platform - : 'linux'; -/** - * An object that can perform glob pattern traversals. - */ -class Glob { - absolute; - cwd; - root; - dot; - dotRelative; - follow; - ignore; - magicalBraces; - mark; - matchBase; - maxDepth; - nobrace; - nocase; - nodir; - noext; - noglobstar; - pattern; - platform; - realpath; - scurry; - stat; - signal; - windowsPathsNoEscape; - withFileTypes; - /** - * The options provided to the constructor. - */ - opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern, opts) { - /* c8 ignore start */ - if (!opts) - throw new TypeError('glob options required'); - /* c8 ignore stop */ - this.withFileTypes = !!opts.withFileTypes; - this.signal = opts.signal; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.dotRelative = !!opts.dotRelative; - this.nodir = !!opts.nodir; - this.mark = !!opts.mark; - if (!opts.cwd) { - this.cwd = ''; - } - else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { - opts.cwd = (0, url_1.fileURLToPath)(opts.cwd); - } - this.cwd = opts.cwd || ''; - this.root = opts.root; - this.magicalBraces = !!opts.magicalBraces; - this.nobrace = !!opts.nobrace; - this.noext = !!opts.noext; - this.realpath = !!opts.realpath; - this.absolute = opts.absolute; - this.noglobstar = !!opts.noglobstar; - this.matchBase = !!opts.matchBase; - this.maxDepth = - typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; - this.stat = !!opts.stat; - this.ignore = opts.ignore; - if (this.withFileTypes && this.absolute !== undefined) { - throw new Error('cannot set absolute and withFileTypes:true'); - } - if (typeof pattern === 'string') { - pattern = [pattern]; - } - this.windowsPathsNoEscape = - !!opts.windowsPathsNoEscape || - opts.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - pattern = pattern.map(p => p.replace(/\\/g, '/')); - } - if (this.matchBase) { - if (opts.noglobstar) { - throw new TypeError('base matching requires globstar'); - } - pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); - } - this.pattern = pattern; - this.platform = opts.platform || defaultPlatform; - this.opts = { ...opts, platform: this.platform }; - if (opts.scurry) { - this.scurry = opts.scurry; - if (opts.nocase !== undefined && - opts.nocase !== opts.scurry.nocase) { - throw new Error('nocase option contradicts provided scurry option'); - } - } - else { - const Scurry = opts.platform === 'win32' - ? path_scurry_1.PathScurryWin32 - : opts.platform === 'darwin' - ? path_scurry_1.PathScurryDarwin - : opts.platform - ? path_scurry_1.PathScurryPosix - : path_scurry_1.PathScurry; - this.scurry = new Scurry(this.cwd, { - nocase: opts.nocase, - fs: opts.fs, - }); - } - this.nocase = this.scurry.nocase; - // If you do nocase:true on a case-sensitive file system, then - // we need to use regexps instead of strings for non-magic - // path portions, because statting `aBc` won't return results - // for the file `AbC` for example. - const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; - const mmo = { - // default nocase based on platform - ...opts, - dot: this.dot, - matchBase: this.matchBase, - nobrace: this.nobrace, - nocase: this.nocase, - nocaseMagicOnly, - nocomment: true, - noext: this.noext, - nonegate: true, - optimizationLevel: 2, - platform: this.platform, - windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, - }; - const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo)); - const [matchSet, globParts] = mms.reduce((set, m) => { - set[0].push(...m.set); - set[1].push(...m.globParts); - return set; - }, [[], []]); - this.patterns = matchSet.map((set, i) => { - const g = globParts[i]; - /* c8 ignore start */ - if (!g) - throw new Error('invalid pattern object'); - /* c8 ignore stop */ - return new pattern_js_1.Pattern(set, g, 0, this.platform); - }); - } - async walk() { - // Walkers always return array of Path objects, so we just have to - // coerce them into the right shape. It will have already called - // realpath() if the option was set to do so, so we know that's cached. - // start out knowing the cwd, at least - return [ - ...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).walk()), - ]; - } - walkSync() { - return [ - ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).walkSync(), - ]; - } - stream() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).stream(); - } - streamSync() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).streamSync(); - } - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync() { - return this.streamSync()[Symbol.iterator](); - } - [Symbol.iterator]() { - return this.iterateSync(); - } - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate() { - return this.stream()[Symbol.asyncIterator](); - } - [Symbol.asyncIterator]() { - return this.iterate(); - } -} -exports.Glob = Glob; -//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/glob.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/glob.js.map deleted file mode 100644 index 98601fe..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD,6CAOoB;AACpB,6BAAmC;AAEnC,6CAAsC;AACtC,2CAAoD;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAgTb;;GAEG;AACH,MAAa,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oBAAoB,CAAS;IAC7B,aAAa,CAAiB;IAE9B;;OAEG;IACH,IAAI,CAAM;IAEV;;OAEG;IACH,QAAQ,CAAW;IAEnB;;;;;;;;;;;OAWG;IACH,YAAY,OAA0B,EAAE,IAAU;QAChD,qBAAqB;QACrB,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,CAAC,CAAA;QACvD,oBAAoB;QACpB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,aAAgC,CAAA;QAC5D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAA;QACvB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;SACd;aAAM,IAAI,IAAI,CAAC,GAAG,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACpE,IAAI,CAAC,GAAG,GAAG,IAAA,mBAAa,EAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACnC;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAA;QACzC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAA;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACzB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAE7B,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,QAAQ;YACX,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC9D,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAEzB,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;SAC9D;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;SACpB;QAED,IAAI,CAAC,oBAAoB;YACvB,CAAC,CAAC,IAAI,CAAC,oBAAoB;gBAC1B,IAAoB,CAAC,kBAAkB,KAAK,KAAK,CAAA;QAEpD,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC7B,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;SAClD;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAA;aACvD;YACD,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;SAChE;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,eAAe,CAAA;QAChD,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;QAChD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YACzB,IACE,IAAI,CAAC,MAAM,KAAK,SAAS;gBACzB,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,EAClC;gBACA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;aACpE;SACF;aAAM;YACL,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,KAAK,OAAO;gBACvB,CAAC,CAAC,6BAAe;gBACjB,CAAC,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBAC5B,CAAC,CAAC,8BAAgB;oBAClB,CAAC,CAAC,IAAI,CAAC,QAAQ;wBACf,CAAC,CAAC,6BAAe;wBACjB,CAAC,CAAC,wBAAU,CAAA;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;gBACjC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,EAAE,EAAE,IAAI,CAAC,EAAE;aACZ,CAAC,CAAA;SACH;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAEhC,8DAA8D;QAC9D,0DAA0D;QAC1D,6DAA6D;QAC7D,kCAAkC;QAClC,MAAM,eAAe,GACnB,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAA;QAEzD,MAAM,GAAG,GAAqB;YAC5B,mCAAmC;YACnC,GAAG,IAAI;YACP,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,eAAe;YACf,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,iBAAiB,EAAE,CAAC;YACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;SACzB,CAAA;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,qBAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QACxD,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,CACtC,CAAC,GAA0B,EAAE,CAAC,EAAE,EAAE;YAChC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;YACrB,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAA;YAC3B,OAAO,GAAG,CAAA;QACZ,CAAC,EACD,CAAC,EAAE,EAAE,EAAE,CAAC,CACT,CAAA;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;YACtC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;YACtB,qBAAqB;YACrB,IAAI,CAAC,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;YACjD,oBAAoB;YACpB,OAAO,IAAI,oBAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;IACJ,CAAC;IAMD,KAAK,CAAC,IAAI;QACR,kEAAkE;QAClE,iEAAiE;QACjE,uEAAuE;QACvE,sCAAsC;QACtC,OAAO;YACL,GAAG,CAAC,MAAM,IAAI,sBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBACvD,GAAG,IAAI,CAAC,IAAI;gBACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;oBACzC,CAAC,CAAC,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC,IAAI,EAAE,CAAC;SACX,CAAA;IACH,CAAC;IAMD,QAAQ;QACN,OAAO;YACL,GAAG,IAAI,sBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBAChD,GAAG,IAAI,CAAC,IAAI;gBACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;oBACzC,CAAC,CAAC,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC,QAAQ,EAAE;SACd,CAAA;IACH,CAAC;IAMD,MAAM;QACJ,OAAO,IAAI,sBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,MAAM,EAAE,CAAA;IACb,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,sBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AAzQD,oBAyQC","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { fileURLToPath } from 'url'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result = Opts extends GlobOptionsWithFileTypesTrue\n ? Path\n : Opts extends GlobOptionsWithFileTypesFalse\n ? string\n : Opts extends GlobOptionsWithFileTypesUnset\n ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes = Opts extends GlobOptionsWithFileTypesTrue\n ? true\n : Opts extends GlobOptionsWithFileTypesFalse\n ? false\n : Opts extends GlobOptionsWithFileTypesUnset\n ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as GlobOptions).allowWindowsEscape === false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32'\n ? PathScurryWin32\n : opts.platform === 'darwin'\n ? PathScurryDarwin\n : opts.platform\n ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []]\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts deleted file mode 100644 index 8aec3bd..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts.map deleted file mode 100644 index b24dd4e..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js b/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js deleted file mode 100644 index 0918bd5..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasMagic = void 0; -const minimatch_1 = require("minimatch"); -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -const hasMagic = (pattern, options = {}) => { - if (!Array.isArray(pattern)) { - pattern = [pattern]; - } - for (const p of pattern) { - if (new minimatch_1.Minimatch(p, options).hasMagic()) - return true; - } - return false; -}; -exports.hasMagic = hasMagic; -//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js.map deleted file mode 100644 index 5e71e3a..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts deleted file mode 100644 index e9d74f3..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts.map deleted file mode 100644 index be78317..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAsDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js b/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js deleted file mode 100644 index 6cffb49..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; -// give it a pattern, and it'll be able to tell you if -// a given path should be ignored. -// Ignoring a path ignores its children if the pattern ends in /** -// Ignores are always parsed in dot:true mode -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Ignore = void 0; -const minimatch_1 = require("minimatch"); -const pattern_js_1 = require("./pattern.js"); -const defaultPlatform = typeof process === 'object' && - process && - typeof process.platform === 'string' - ? process.platform - : 'linux'; -/** - * Class used to process ignored patterns - */ -class Ignore { - relative; - relativeChildren; - absolute; - absoluteChildren; - constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { - this.relative = []; - this.absolute = []; - this.relativeChildren = []; - this.absoluteChildren = []; - const mmopts = { - dot: true, - nobrace, - nocase, - noext, - noglobstar, - optimizationLevel: 2, - platform, - nocomment: true, - nonegate: true, - }; - // this is a little weird, but it gives us a clean set of optimized - // minimatch matchers, without getting tripped up if one of them - // ends in /** inside a brace section, and it's only inefficient at - // the start of the walk, not along it. - // It'd be nice if the Pattern class just had a .test() method, but - // handling globstars is a bit of a pita, and that code already lives - // in minimatch anyway. - // Another way would be if maybe Minimatch could take its set/globParts - // as an option, and then we could at least just use Pattern to test - // for absolute-ness. - // Yet another way, Minimatch could take an array of glob strings, and - // a cwd option, and do the right thing. - for (const ign of ignored) { - const mm = new minimatch_1.Minimatch(ign, mmopts); - for (let i = 0; i < mm.set.length; i++) { - const parsed = mm.set[i]; - const globParts = mm.globParts[i]; - /* c8 ignore start */ - if (!parsed || !globParts) { - throw new Error('invalid pattern object'); - } - /* c8 ignore stop */ - const p = new pattern_js_1.Pattern(parsed, globParts, 0, platform); - const m = new minimatch_1.Minimatch(p.globString(), mmopts); - const children = globParts[globParts.length - 1] === '**'; - const absolute = p.isAbsolute(); - if (absolute) - this.absolute.push(m); - else - this.relative.push(m); - if (children) { - if (absolute) - this.absoluteChildren.push(m); - else - this.relativeChildren.push(m); - } - } - } - } - ignored(p) { - const fullpath = p.fullpath(); - const fullpaths = `${fullpath}/`; - const relative = p.relative() || '.'; - const relatives = `${relative}/`; - for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) - return true; - } - for (const m of this.absolute) { - if (m.match(fullpath) || m.match(fullpaths)) - return true; - } - return false; - } - childrenIgnored(p) { - const fullpath = p.fullpath() + '/'; - const relative = (p.relative() || '.') + '/'; - for (const m of this.relativeChildren) { - if (m.match(relative)) - return true; - } - for (const m of this.absoluteChildren) { - if (m.match(fullpath)) - return true; - } - return false; - } -} -exports.Ignore = Ignore; -//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js.map deleted file mode 100644 index 3533cfc..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAqC;AAErC,6CAAsC;AAQtC,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEb;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,MAAM,MAAM,GAAG;YACb,GAAG,EAAE,IAAI;YACT,OAAO;YACP,MAAM;YACN,KAAK;YACL,UAAU;YACV,iBAAiB,EAAE,CAAC;YACpB,QAAQ;YACR,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf,CAAA;QAED,mEAAmE;QACnE,gEAAgE;QAChE,mEAAmE;QACnE,uCAAuC;QACvC,mEAAmE;QACnE,qEAAqE;QACrE,uBAAuB;QACvB,uEAAuE;QACvE,oEAAoE;QACpE,qBAAqB;QACrB,sEAAsE;QACtE,wCAAwC;QACxC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;YACzB,MAAM,EAAE,GAAG,IAAI,qBAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACxB,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;gBACjC,qBAAqB;gBACrB,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE;oBACzB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;iBAC1C;gBACD,oBAAoB;gBACpB,MAAM,CAAC,GAAG,IAAI,oBAAO,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;gBACrD,MAAM,CAAC,GAAG,IAAI,qBAAS,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAA;gBAC/C,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;gBACzD,MAAM,QAAQ,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;gBAC/B,IAAI,QAAQ;oBAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;oBAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBAC1B,IAAI,QAAQ,EAAE;oBACZ,IAAI,QAAQ;wBAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;wBACtC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACnC;aACF;SACF;IACH,CAAC;IAED,OAAO,CAAC,CAAO;QACb,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAA;QACpC,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC7B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;SACzD;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC7B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;SACzD;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AA7FD,wBA6FC","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts deleted file mode 100644 index 048e584..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -export type { Path, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, WalkOptions, FSOption, } from 'path-scurry'; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts.map deleted file mode 100644 index 3e263fb..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAQlD;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAQlD;;GAEG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,MAAM,EAAE,CAAA;AACX,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,IAAI,EAAE,CAAA;AACT,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,MAAM,EAAE,CAAA;AACX,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,IAAI,EAAE,GAAG,MAAM,EAAE,CAAA;AAQpB;;;;;GAKG;AACH,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AACpB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;AAClB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AACpB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;AAQ7B;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAChC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC9B,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAChC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAQ9D;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACnC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EACV,IAAI,EACJ,4BAA4B,EAC5B,6BAA6B,EAC7B,WAAW,EACX,QAAQ,GACT,MAAM,aAAa,CAAA;AAIpB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/index.js b/node_modules/npm/node_modules/glob/dist/commonjs/index.js deleted file mode 100644 index 71c31c0..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.glob = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = void 0; -const minimatch_1 = require("minimatch"); -const glob_js_1 = require("./glob.js"); -const has_magic_js_1 = require("./has-magic.js"); -function globStreamSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).streamSync(); -} -exports.globStreamSync = globStreamSync; -function globStream(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).stream(); -} -exports.globStream = globStream; -function globSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walkSync(); -} -exports.globSync = globSync; -async function glob_(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walk(); -} -function globIterateSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterateSync(); -} -exports.globIterateSync = globIterateSync; -function globIterate(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterate(); -} -exports.globIterate = globIterate; -// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc -exports.streamSync = globStreamSync; -exports.stream = Object.assign(globStream, { sync: globStreamSync }); -exports.iterateSync = globIterateSync; -exports.iterate = Object.assign(globIterate, { - sync: globIterateSync, -}); -exports.sync = Object.assign(globSync, { - stream: globStreamSync, - iterate: globIterateSync, -}); -/* c8 ignore start */ -var minimatch_2 = require("minimatch"); -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } }); -Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } }); -var glob_js_2 = require("./glob.js"); -Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } }); -var has_magic_js_2 = require("./has-magic.js"); -Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } }); -/* c8 ignore stop */ -exports.glob = Object.assign(glob_, { - glob: glob_, - globSync, - sync: exports.sync, - globStream, - stream: exports.stream, - globStreamSync, - streamSync: exports.streamSync, - globIterate, - iterate: exports.iterate, - globIterateSync, - iterateSync: exports.iterateSync, - Glob: glob_js_1.Glob, - hasMagic: has_magic_js_1.hasMagic, - escape: minimatch_1.escape, - unescape: minimatch_1.unescape, -}); -exports.glob.glob = exports.glob; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/index.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/index.js.map deleted file mode 100644 index e8c568a..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAuBzC,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AALD,wCAKC;AAsBD,SAAgB,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AALD,gCAKC;AAqBD,SAAgB,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AALD,4BAKC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;AAC1C,CAAC;AAqBD,SAAgB,eAAe,CAC7B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAA;AACjD,CAAC;AALD,0CAKC;AAqBD,SAAgB,WAAW,CACzB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;AAC7C,CAAC;AALD,kCAKC;AAED,iEAAiE;AACpD,QAAA,UAAU,GAAG,cAAc,CAAA;AAC3B,QAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAA;AAC5D,QAAA,WAAW,GAAG,eAAe,CAAA;AAC7B,QAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA;AACW,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;CACzB,CAAC,CAAA;AAEF,qBAAqB;AACrB,uCAA4C;AAAnC,mGAAA,MAAM,OAAA;AAAE,qGAAA,QAAQ,OAAA;AACzB,qCAAgC;AAAvB,+FAAA,IAAI,OAAA;AAOb,+CAAyC;AAAhC,wGAAA,QAAQ,OAAA;AAWjB,oBAAoB;AAEP,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI,EAAJ,YAAI;IACJ,UAAU;IACV,MAAM,EAAN,cAAM;IACN,cAAc;IACd,UAAU,EAAV,kBAAU;IACV,WAAW;IACX,OAAO,EAAP,eAAO;IACP,eAAe;IACf,WAAW,EAAX,mBAAW;IACX,IAAI,EAAJ,cAAI;IACJ,QAAQ,EAAR,uBAAQ;IACR,MAAM,EAAN,kBAAM;IACN,QAAQ,EAAR,oBAAQ;CACT,CAAC,CAAA;AACF,YAAI,CAAC,IAAI,GAAG,YAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\n/* c8 ignore start */\nexport { escape, unescape } from 'minimatch'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\nexport type {\n Path,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n WalkOptions,\n FSOption,\n} from 'path-scurry'\n\n/* c8 ignore stop */\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/package.json b/node_modules/npm/node_modules/glob/dist/commonjs/package.json deleted file mode 100644 index 0292b99..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts deleted file mode 100644 index 109cc4e..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/// -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts.map deleted file mode 100644 index 1430a77..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js b/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js deleted file mode 100644 index 1813712..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; -// this is just a very light wrapper around 2 arrays with an offset index -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Pattern = void 0; -const minimatch_1 = require("minimatch"); -const isPatternList = (pl) => pl.length >= 1; -const isGlobList = (gl) => gl.length >= 1; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -class Pattern { - #patternList; - #globList; - #index; - length; - #platform; - #rest; - #globString; - #isDrive; - #isUNC; - #isAbsolute; - #followGlobstar = true; - constructor(patternList, globList, index, platform) { - if (!isPatternList(patternList)) { - throw new TypeError('empty pattern list'); - } - if (!isGlobList(globList)) { - throw new TypeError('empty glob list'); - } - if (globList.length !== patternList.length) { - throw new TypeError('mismatched pattern list and glob list lengths'); - } - this.length = patternList.length; - if (index < 0 || index >= this.length) { - throw new TypeError('index out of range'); - } - this.#patternList = patternList; - this.#globList = globList; - this.#index = index; - this.#platform = platform; - // normalize root entries of absolute patterns on initial creation. - if (this.#index === 0) { - // c: => ['c:/'] - // C:/ => ['C:/'] - // C:/x => ['C:/', 'x'] - // //host/share => ['//host/share/'] - // //host/share/ => ['//host/share/'] - // //host/share/x => ['//host/share/', 'x'] - // /etc => ['/', 'etc'] - // / => ['/'] - if (this.isUNC()) { - // '' / '' / 'host' / 'share' - const [p0, p1, p2, p3, ...prest] = this.#patternList; - const [g0, g1, g2, g3, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = [p0, p1, p2, p3, ''].join('/'); - const g = [g0, g1, g2, g3, ''].join('/'); - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - else if (this.isDrive() || this.isAbsolute()) { - const [p1, ...prest] = this.#patternList; - const [g1, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = p1 + '/'; - const g = g1 + '/'; - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - } - } - /** - * The first entry in the parsed list of patterns - */ - pattern() { - return this.#patternList[this.#index]; - } - /** - * true of if pattern() returns a string - */ - isString() { - return typeof this.#patternList[this.#index] === 'string'; - } - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar() { - return this.#patternList[this.#index] === minimatch_1.GLOBSTAR; - } - /** - * true if pattern() returns a regexp - */ - isRegExp() { - return this.#patternList[this.#index] instanceof RegExp; - } - /** - * The /-joined set of glob parts that make up this pattern - */ - globString() { - return (this.#globString = - this.#globString || - (this.#index === 0 - ? this.isAbsolute() - ? this.#globList[0] + this.#globList.slice(1).join('/') - : this.#globList.join('/') - : this.#globList.slice(this.#index).join('/'))); - } - /** - * true if there are more pattern parts after this one - */ - hasMore() { - return this.length > this.#index + 1; - } - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest() { - if (this.#rest !== undefined) - return this.#rest; - if (!this.hasMore()) - return (this.#rest = null); - this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); - this.#rest.#isAbsolute = this.#isAbsolute; - this.#rest.#isUNC = this.#isUNC; - this.#rest.#isDrive = this.#isDrive; - return this.#rest; - } - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC() { - const pl = this.#patternList; - return this.#isUNC !== undefined - ? this.#isUNC - : (this.#isUNC = - this.#platform === 'win32' && - this.#index === 0 && - pl[0] === '' && - pl[1] === '' && - typeof pl[2] === 'string' && - !!pl[2] && - typeof pl[3] === 'string' && - !!pl[3]); - } - // pattern like C:/... - // split = ['C:', ...] - // XXX: would be nice to handle patterns like `c:*` to test the cwd - // in c: for *, but I don't know of a way to even figure out what that - // cwd is without actually chdir'ing into it? - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive() { - const pl = this.#patternList; - return this.#isDrive !== undefined - ? this.#isDrive - : (this.#isDrive = - this.#platform === 'win32' && - this.#index === 0 && - this.length > 1 && - typeof pl[0] === 'string' && - /^[a-z]:$/i.test(pl[0])); - } - // pattern = '/' or '/...' or '/x/...' - // split = ['', ''] or ['', ...] or ['', 'x', ...] - // Drive and UNC both considered absolute on windows - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute() { - const pl = this.#patternList; - return this.#isAbsolute !== undefined - ? this.#isAbsolute - : (this.#isAbsolute = - (pl[0] === '' && pl.length > 1) || - this.isDrive() || - this.isUNC()); - } - /** - * consume the root of the pattern, and return it - */ - root() { - const p = this.#patternList[0]; - return typeof p === 'string' && this.isAbsolute() && this.#index === 0 - ? p - : ''; - } - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar() { - return !(this.#index === 0 || - !this.isGlobstar() || - !this.#followGlobstar); - } - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar() { - if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) - return false; - this.#followGlobstar = false; - return true; - } -} -exports.Pattern = Pattern; -//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js.map deleted file mode 100644 index d14f76b..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAAA,yEAAyE;;;AAEzE,yCAAoC;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAa,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YACzB,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;SACvC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;SACrE;QACD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;QAChC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;YACrC,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QAEzB,mEAAmE;QACnE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,gBAAgB;YAChB,iBAAiB;YACjB,uBAAuB;YACvB,oCAAoC;YACpC,qCAAqC;YACrC,2CAA2C;YAC3C,uBAAuB;YACvB,aAAa;YACb,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,6BAA6B;gBAC7B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY,CAAA;gBACpD,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAA;gBACjD,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;oBACnB,YAAY;oBACZ,KAAK,CAAC,KAAK,EAAE,CAAA;oBACb,KAAK,CAAC,KAAK,EAAE,CAAA;iBACd;gBACD,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACxC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACxC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBACjC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;aACvC;iBAAM,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC9C,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY,CAAA;gBACxC,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAA;gBACrC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;oBACnB,YAAY;oBACZ,KAAK,CAAC,KAAK,EAAE,CAAA;oBACb,KAAK,CAAC,KAAK,EAAE,CAAA;iBACd;gBACD,MAAM,CAAC,GAAI,EAAa,GAAG,GAAG,CAAA;gBAC9B,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA;gBAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBACjC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;aACvC;SACF;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAc,CAAA;IACpD,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAA;IAC3D,CAAC;IACD;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,oBAAQ,CAAA;IACpD,CAAC;IACD;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,MAAM,CAAA;IACzD,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,WAAW;YACtB,IAAI,CAAC,WAAW;gBAChB,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;oBAChB,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE;wBACjB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;wBACvD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;oBAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACrD,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACtC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,KAAK,CAAA;QAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CACtB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,MAAM,GAAG,CAAC,EACf,IAAI,CAAC,SAAS,CACf,CAAA;QACD,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QACzC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAC/B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS;YAC9B,CAAC,CAAC,IAAI,CAAC,MAAM;YACb,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;gBACV,IAAI,CAAC,SAAS,KAAK,OAAO;oBAC1B,IAAI,CAAC,MAAM,KAAK,CAAC;oBACjB,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;oBACZ,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;oBACZ,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACP,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAChB,CAAC;IAED,sBAAsB;IACtB,sBAAsB;IACtB,mEAAmE;IACnE,sEAAsE;IACtE,6CAA6C;IAC7C;;OAEG;IACH,OAAO;QACL,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS;YAChC,CAAC,CAAC,IAAI,CAAC,QAAQ;YACf,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;gBACZ,IAAI,CAAC,SAAS,KAAK,OAAO;oBAC1B,IAAI,CAAC,MAAM,KAAK,CAAC;oBACjB,IAAI,CAAC,MAAM,GAAG,CAAC;oBACf,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAChC,CAAC;IAED,sCAAsC;IACtC,kDAAkD;IAClD,oDAAoD;IACpD;;OAEG;IACH,UAAU;QACR,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS;YACnC,CAAC,CAAC,IAAI,CAAC,WAAW;YAClB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;gBACf,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;oBAC/B,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QAC9B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YACpE,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAnOD,0BAmOC","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[]\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0\n ? this.isAbsolute()\n ? this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined\n ? this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined\n ? this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined\n ? this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ? p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts deleted file mode 100644 index ccedfbf..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts.map deleted file mode 100644 index 33a39b2..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAmGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/processor.js b/node_modules/npm/node_modules/glob/dist/commonjs/processor.js deleted file mode 100644 index 7d30a3b..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/processor.js +++ /dev/null @@ -1,302 +0,0 @@ -"use strict"; -// synchronous utility for filtering entries and calculating subwalks -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0; -const minimatch_1 = require("minimatch"); -/** - * A cache of which patterns have been processed for a given Path - */ -class HasWalkedCache { - store; - constructor(store = new Map()) { - this.store = store; - } - copy() { - return new HasWalkedCache(new Map(this.store)); - } - hasWalked(target, pattern) { - return this.store.get(target.fullpath())?.has(pattern.globString()); - } - storeWalked(target, pattern) { - const fullpath = target.fullpath(); - const cached = this.store.get(fullpath); - if (cached) - cached.add(pattern.globString()); - else - this.store.set(fullpath, new Set([pattern.globString()])); - } -} -exports.HasWalkedCache = HasWalkedCache; -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -class MatchRecord { - store = new Map(); - add(target, absolute, ifDir) { - const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); - const current = this.store.get(target); - this.store.set(target, current === undefined ? n : n & current); - } - // match, absolute, ifdir - entries() { - return [...this.store.entries()].map(([path, n]) => [ - path, - !!(n & 2), - !!(n & 1), - ]); - } -} -exports.MatchRecord = MatchRecord; -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -class SubWalks { - store = new Map(); - add(target, pattern) { - if (!target.canReaddir()) { - return; - } - const subs = this.store.get(target); - if (subs) { - if (!subs.find(p => p.globString() === pattern.globString())) { - subs.push(pattern); - } - } - else - this.store.set(target, [pattern]); - } - get(target) { - const subs = this.store.get(target); - /* c8 ignore start */ - if (!subs) { - throw new Error('attempting to walk unknown path'); - } - /* c8 ignore stop */ - return subs; - } - entries() { - return this.keys().map(k => [k, this.store.get(k)]); - } - keys() { - return [...this.store.keys()].filter(t => t.canReaddir()); - } -} -exports.SubWalks = SubWalks; -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -class Processor { - hasWalkedCache; - matches = new MatchRecord(); - subwalks = new SubWalks(); - patterns; - follow; - dot; - opts; - constructor(opts, hasWalkedCache) { - this.opts = opts; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.hasWalkedCache = hasWalkedCache - ? hasWalkedCache.copy() - : new HasWalkedCache(); - } - processPatterns(target, patterns) { - this.patterns = patterns; - const processingSet = patterns.map(p => [target, p]); - // map of paths to the magic-starting subwalks they need to walk - // first item in patterns is the filter - for (let [t, pattern] of processingSet) { - this.hasWalkedCache.storeWalked(t, pattern); - const root = pattern.root(); - const absolute = pattern.isAbsolute() && this.opts.absolute !== false; - // start absolute patterns at root - if (root) { - t = t.resolve(root === '/' && this.opts.root !== undefined - ? this.opts.root - : root); - const rest = pattern.rest(); - if (!rest) { - this.matches.add(t, true, false); - continue; - } - else { - pattern = rest; - } - } - if (t.isENOENT()) - continue; - let p; - let rest; - let changed = false; - while (typeof (p = pattern.pattern()) === 'string' && - (rest = pattern.rest())) { - const c = t.resolve(p); - t = c; - pattern = rest; - changed = true; - } - p = pattern.pattern(); - rest = pattern.rest(); - if (changed) { - if (this.hasWalkedCache.hasWalked(t, pattern)) - continue; - this.hasWalkedCache.storeWalked(t, pattern); - } - // now we have either a final string for a known entry, - // more strings for an unknown entry, - // or a pattern starting with magic, mounted on t. - if (typeof p === 'string') { - // must not be final entry, otherwise we would have - // concatenated it earlier. - const ifDir = p === '..' || p === '' || p === '.'; - this.matches.add(t.resolve(p), absolute, ifDir); - continue; - } - else if (p === minimatch_1.GLOBSTAR) { - // if no rest, match and subwalk pattern - // if rest, process rest and subwalk pattern - // if it's a symlink, but we didn't get here by way of a - // globstar match (meaning it's the first time THIS globstar - // has traversed a symlink), then we follow it. Otherwise, stop. - if (!t.isSymbolicLink() || - this.follow || - pattern.checkFollowGlobstar()) { - this.subwalks.add(t, pattern); - } - const rp = rest?.pattern(); - const rrest = rest?.rest(); - if (!rest || ((rp === '' || rp === '.') && !rrest)) { - // only HAS to be a dir if it ends in **/ or **/. - // but ending in ** will match files as well. - this.matches.add(t, absolute, rp === '' || rp === '.'); - } - else { - if (rp === '..') { - // this would mean you're matching **/.. at the fs root, - // and no thanks, I'm not gonna test that specific case. - /* c8 ignore start */ - const tp = t.parent || t; - /* c8 ignore stop */ - if (!rrest) - this.matches.add(tp, absolute, true); - else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { - this.subwalks.add(tp, rrest); - } - } - } - } - else if (p instanceof RegExp) { - this.subwalks.add(t, pattern); - } - } - return this; - } - subwalkTargets() { - return this.subwalks.keys(); - } - child() { - return new Processor(this.opts, this.hasWalkedCache); - } - // return a new Processor containing the subwalks for each - // child entry, and a set of matches, and - // a hasWalkedCache that's a copy of this one - // then we're going to call - filterEntries(parent, entries) { - const patterns = this.subwalks.get(parent); - // put matches and entry walks into the results processor - const results = this.child(); - for (const e of entries) { - for (const pattern of patterns) { - const absolute = pattern.isAbsolute(); - const p = pattern.pattern(); - const rest = pattern.rest(); - if (p === minimatch_1.GLOBSTAR) { - results.testGlobstar(e, pattern, rest, absolute); - } - else if (p instanceof RegExp) { - results.testRegExp(e, p, rest, absolute); - } - else { - results.testString(e, p, rest, absolute); - } - } - } - return results; - } - testGlobstar(e, pattern, rest, absolute) { - if (this.dot || !e.name.startsWith('.')) { - if (!pattern.hasMore()) { - this.matches.add(e, absolute, false); - } - if (e.canReaddir()) { - // if we're in follow mode or it's not a symlink, just keep - // testing the same pattern. If there's more after the globstar, - // then this symlink consumes the globstar. If not, then we can - // follow at most ONE symlink along the way, so we mark it, which - // also checks to ensure that it wasn't already marked. - if (this.follow || !e.isSymbolicLink()) { - this.subwalks.add(e, pattern); - } - else if (e.isSymbolicLink()) { - if (rest && pattern.checkFollowGlobstar()) { - this.subwalks.add(e, rest); - } - else if (pattern.markFollowGlobstar()) { - this.subwalks.add(e, pattern); - } - } - } - } - // if the NEXT thing matches this entry, then also add - // the rest. - if (rest) { - const rp = rest.pattern(); - if (typeof rp === 'string' && - // dots and empty were handled already - rp !== '..' && - rp !== '' && - rp !== '.') { - this.testString(e, rp, rest.rest(), absolute); - } - else if (rp === '..') { - /* c8 ignore start */ - const ep = e.parent || e; - /* c8 ignore stop */ - this.subwalks.add(ep, rest); - } - else if (rp instanceof RegExp) { - this.testRegExp(e, rp, rest.rest(), absolute); - } - } - } - testRegExp(e, p, rest, absolute) { - if (!p.test(e.name)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } - testString(e, p, rest, absolute) { - // should never happen? - if (!e.isNamed(p)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } -} -exports.Processor = Processor; -//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/processor.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/processor.js.map deleted file mode 100644 index 51b2143..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":";AAAA,qEAAqE;;;AAErE,yCAA8C;AAK9C;;GAEG;AACH,MAAa,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,SAAS,CAAC,MAAY,EAAE,OAAgB;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,WAAW,CAAC,MAAY,EAAE,OAAgB;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;;YACvC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC;CACF;AAjBD,wCAiBC;AAED;;;;GAIG;AACH,MAAa,WAAW;IACtB,KAAK,GAAsB,IAAI,GAAG,EAAE,CAAA;IACpC,GAAG,CAAC,MAAY,EAAE,QAAiB,EAAE,KAAc;QACjD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAA;IACjE,CAAC;IACD,yBAAyB;IACzB,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;YAClD,IAAI;YACJ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACT,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACV,CAAC,CAAA;IACJ,CAAC;CACF;AAfD,kCAeC;AAED;;;GAGG;AACH,MAAa,QAAQ;IACnB,KAAK,GAAyB,IAAI,GAAG,EAAE,CAAA;IACvC,GAAG,CAAC,MAAY,EAAE,OAAgB;QAChC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;YACxB,OAAM;SACP;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE;gBAC5D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACnB;SACF;;YAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAC1C,CAAC;IACD,GAAG,CAAC,MAAY;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnC,qBAAqB;QACrB,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;SACnD;QACD,oBAAoB;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAc,CAAC,CAAC,CAAA;IAClE,CAAC;IACD,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAC3D,CAAC;CACF;AA5BD,4BA4BC;AAED;;;;;GAKG;AACH,MAAa,SAAS;IACpB,cAAc,CAAgB;IAC9B,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;IAC3B,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA;IACzB,QAAQ,CAAY;IACpB,MAAM,CAAS;IACf,GAAG,CAAS;IACZ,IAAI,CAAgB;IAEpB,YAAY,IAAoB,EAAE,cAA+B;QAC/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc;YAClC,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE;YACvB,CAAC,CAAC,IAAI,cAAc,EAAE,CAAA;IAC1B,CAAC;IAED,eAAe,CAAC,MAAY,EAAE,QAAmB;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,MAAM,aAAa,GAAsB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QAEvE,gEAAgE;QAChE,uCAAuC;QAEvC,KAAK,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,aAAa,EAAE;YACtC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;YAE3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAA;YAErE,kCAAkC;YAClC,IAAI,IAAI,EAAE;gBACR,CAAC,GAAG,CAAC,CAAC,OAAO,CACX,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS;oBAC1C,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;oBAChB,CAAC,CAAC,IAAI,CACT,CAAA;gBACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;gBAC3B,IAAI,CAAC,IAAI,EAAE;oBACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;oBAChC,SAAQ;iBACT;qBAAM;oBACL,OAAO,GAAG,IAAI,CAAA;iBACf;aACF;YAED,IAAI,CAAC,CAAC,QAAQ,EAAE;gBAAE,SAAQ;YAE1B,IAAI,CAAY,CAAA;YAChB,IAAI,IAAoB,CAAA;YACxB,IAAI,OAAO,GAAG,KAAK,CAAA;YACnB,OACE,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,QAAQ;gBAC3C,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,EACvB;gBACA,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;gBACtB,CAAC,GAAG,CAAC,CAAA;gBACL,OAAO,GAAG,IAAI,CAAA;gBACd,OAAO,GAAG,IAAI,CAAA;aACf;YACD,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;YACrB,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YACrB,IAAI,OAAO,EAAE;gBACX,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC;oBAAE,SAAQ;gBACvD,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;aAC5C;YAED,uDAAuD;YACvD,qCAAqC;YACrC,kDAAkD;YAClD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBACzB,mDAAmD;gBACnD,2BAA2B;gBAC3B,MAAM,KAAK,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,CAAA;gBACjD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;gBAC/C,SAAQ;aACT;iBAAM,IAAI,CAAC,KAAK,oBAAQ,EAAE;gBACzB,wCAAwC;gBACxC,4CAA4C;gBAC5C,wDAAwD;gBACxD,4DAA4D;gBAC5D,gEAAgE;gBAChE,IACE,CAAC,CAAC,CAAC,cAAc,EAAE;oBACnB,IAAI,CAAC,MAAM;oBACX,OAAO,CAAC,mBAAmB,EAAE,EAC7B;oBACA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBAC9B;gBACD,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAA;gBAC1B,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAA;gBAC1B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBAClD,iDAAiD;oBACjD,6CAA6C;oBAC7C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAA;iBACvD;qBAAM;oBACL,IAAI,EAAE,KAAK,IAAI,EAAE;wBACf,wDAAwD;wBACxD,wDAAwD;wBACxD,qBAAqB;wBACrB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAA;wBACxB,oBAAoB;wBACpB,IAAI,CAAC,KAAK;4BAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;6BAC3C,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE;4BAClD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;yBAC7B;qBACF;iBACF;aACF;iBAAM,IAAI,CAAC,YAAY,MAAM,EAAE;gBAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;aAC9B;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC7B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;IACtD,CAAC;IAED,0DAA0D;IAC1D,yCAAyC;IACzC,6CAA6C;IAC7C,2BAA2B;IAC3B,aAAa,CAAC,MAAY,EAAE,OAAe;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1C,yDAAyD;QACzD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;QAC5B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;YACvB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAA;gBACrC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;gBAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;gBAC3B,IAAI,CAAC,KAAK,oBAAQ,EAAE;oBAClB,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACjD;qBAAM,IAAI,CAAC,YAAY,MAAM,EAAE;oBAC9B,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACzC;qBAAM;oBACL,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACzC;aACF;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,YAAY,CACV,CAAO,EACP,OAAgB,EAChB,IAAoB,EACpB,QAAiB;QAEjB,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACvC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;gBACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;aACrC;YACD,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;gBAClB,2DAA2D;gBAC3D,gEAAgE;gBAChE,+DAA+D;gBAC/D,iEAAiE;gBACjE,uDAAuD;gBACvD,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE;oBACtC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBAC9B;qBAAM,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;oBAC7B,IAAI,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,EAAE;wBACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;qBAC3B;yBAAM,IAAI,OAAO,CAAC,kBAAkB,EAAE,EAAE;wBACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;qBAC9B;iBACF;aACF;SACF;QACD,sDAAsD;QACtD,YAAY;QACZ,IAAI,IAAI,EAAE;YACR,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;YACzB,IACE,OAAO,EAAE,KAAK,QAAQ;gBACtB,sCAAsC;gBACtC,EAAE,KAAK,IAAI;gBACX,EAAE,KAAK,EAAE;gBACT,EAAE,KAAK,GAAG,EACV;gBACA,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;aAC9C;iBAAM,IAAI,EAAE,KAAK,IAAI,EAAE;gBACtB,qBAAqB;gBACrB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAA;gBACxB,oBAAoB;gBACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;aAC5B;iBAAM,IAAI,EAAE,YAAY,MAAM,EAAE;gBAC/B,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;aAC9C;SACF;IACH,CAAC;IAED,UAAU,CACR,CAAO,EACP,CAAW,EACX,IAAoB,EACpB,QAAiB;QAEjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF;AA/ND,8BA+NC","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts b/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts deleted file mode 100644 index 5c1a041..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/// -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>; - walkSync(): Matches; -} -export declare class GlobStream extends GlobUtil { - results: O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts.map b/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts.map deleted file mode 100644 index 7c8df20..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG;IAC9C,aAAa,EAAE,IAAI,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC/C,aAAa,EAAE,KAAK,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC/C,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,gBAAgB,GACrE,IAAI,GACJ,CAAC,SAAS,iBAAiB,GAC3B,MAAM,GACN,CAAC,SAAS,iBAAiB,GAC3B,MAAM,GACN,IAAI,GAAG,MAAM,CAAA;AAEjB,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,gBAAgB,GACtE,GAAG,CAAC,IAAI,CAAC,GACT,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;AAEtB,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,IAC9C,CAAC,SAAS,gBAAgB,GACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;AAY5C;;GAEG;AACH,8BAAsB,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;;IACtE,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAkB;IACjC,MAAM,EAAE,OAAO,CAAQ;IACvB,OAAO,EAAE,OAAO,CAAQ;IAIxB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;gBAEJ,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IA8BpD,KAAK;IAGL,MAAM;IAUN,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG;IAahB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAYpE,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS;IAUrE,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS;IAYzD,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IACtC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAE1C,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO;IAsBhC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAK3D,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG;IAOvD,OAAO,CACL,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IA2Cf,OAAO,CACL,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,EAAE,EACf,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IAsBf,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG;IAO3D,WAAW,CACT,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IAqCf,WAAW,CACT,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,EAAE,EACf,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;CAoBhB;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,GAAG,CAAC,IAAI,CAAC,GACT,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;gBAEV,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAKpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAKvB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAiBjC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC;CAWvB;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/walker.js b/node_modules/npm/node_modules/glob/dist/commonjs/walker.js deleted file mode 100644 index 9651ce1..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/walker.js +++ /dev/null @@ -1,358 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -const minipass_1 = require("minipass"); -const ignore_js_1 = require("./ignore.js"); -const processor_js_1 = require("./processor.js"); -const makeIgnore = (ignore, opts) => typeof ignore === 'string' - ? new ignore_js_1.Ignore([ignore], opts) - : Array.isArray(ignore) - ? new ignore_js_1.Ignore(ignore, opts) - : ignore; -/** - * basic walking utilities that all the glob walker types use - */ -class GlobUtil { - path; - patterns; - opts; - seen = new Set(); - paused = false; - aborted = false; - #onResume = []; - #ignore; - #sep; - signal; - maxDepth; - constructor(patterns, path, opts) { - this.patterns = patterns; - this.path = path; - this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; - if (opts.ignore) { - this.#ignore = makeIgnore(opts.ignore, opts); - } - // ignore, always set with maxDepth, but it's optional on the - // GlobOptions type - /* c8 ignore start */ - this.maxDepth = opts.maxDepth || Infinity; - /* c8 ignore stop */ - if (opts.signal) { - this.signal = opts.signal; - this.signal.addEventListener('abort', () => { - this.#onResume.length = 0; - }); - } - } - #ignored(path) { - return this.seen.has(path) || !!this.#ignore?.ignored?.(path); - } - #childrenIgnored(path) { - return !!this.#ignore?.childrenIgnored?.(path); - } - // backpressure mechanism - pause() { - this.paused = true; - } - resume() { - /* c8 ignore start */ - if (this.signal?.aborted) - return; - /* c8 ignore stop */ - this.paused = false; - let fn = undefined; - while (!this.paused && (fn = this.#onResume.shift())) { - fn(); - } - } - onResume(fn) { - if (this.signal?.aborted) - return; - /* c8 ignore start */ - if (!this.paused) { - fn(); - } - else { - /* c8 ignore stop */ - this.#onResume.push(fn); - } - } - // do the requisite realpath/stat checking, and return the path - // to add or undefined to filter it out. - async matchCheck(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || (await e.realpath()); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir); - } - matchCheckTest(e, ifDir) { - return e && - (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && - (!ifDir || e.canReaddir()) && - (!this.opts.nodir || !e.isDirectory()) && - !this.#ignored(e) - ? e - : undefined; - } - matchCheckSync(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || e.realpathSync(); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir); - } - matchFinish(e, absolute) { - if (this.#ignored(e)) - return; - const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; - this.seen.add(e); - const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; - // ok, we have what we need! - if (this.opts.withFileTypes) { - this.matchEmit(e); - } - else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); - } - else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); - const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) - ? '.' + this.#sep - : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); - } - } - async match(e, absolute, ifDir) { - const p = await this.matchCheck(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - matchSync(e, absolute, ifDir) { - const p = this.matchCheckSync(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - walkCB(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb); - } - walkCB2(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const childrenCached = t.readdirCached(); - if (t.calledReaddir()) - this.walkCB3(t, childrenCached, processor, next); - else { - t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); - } - } - next(); - } - walkCB3(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2(target, patterns, processor.child(), next); - } - next(); - } - walkCBSync(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb); - } - walkCB2Sync(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const children = t.readdirSync(); - this.walkCB3Sync(t, children, processor, next); - } - next(); - } - walkCB3Sync(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2Sync(target, patterns, processor.child(), next); - } - next(); - } -} -exports.GlobUtil = GlobUtil; -class GlobWalker extends GlobUtil { - matches; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.matches = new Set(); - } - matchEmit(e) { - this.matches.add(e); - } - async walk() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - await this.path.lstat(); - } - await new Promise((res, rej) => { - this.walkCB(this.path, this.patterns, () => { - if (this.signal?.aborted) { - rej(this.signal.reason); - } - else { - res(this.matches); - } - }); - }); - return this.matches; - } - walkSync() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - // nothing for the callback to do, because this never pauses - this.walkCBSync(this.path, this.patterns, () => { - if (this.signal?.aborted) - throw this.signal.reason; - }); - return this.matches; - } -} -exports.GlobWalker = GlobWalker; -class GlobStream extends GlobUtil { - results; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.results = new minipass_1.Minipass({ - signal: this.signal, - objectMode: true, - }); - this.results.on('drain', () => this.resume()); - this.results.on('resume', () => this.resume()); - } - matchEmit(e) { - this.results.write(e); - if (!this.results.flowing) - this.pause(); - } - stream() { - const target = this.path; - if (target.isUnknown()) { - target.lstat().then(() => { - this.walkCB(target, this.patterns, () => this.results.end()); - }); - } - else { - this.walkCB(target, this.patterns, () => this.results.end()); - } - return this.results; - } - streamSync() { - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - this.walkCBSync(this.path, this.patterns, () => this.results.end()); - return this.results; - } -} -exports.GlobStream = GlobStream; -//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/commonjs/walker.js.map b/node_modules/npm/node_modules/glob/dist/commonjs/walker.js.map deleted file mode 100644 index ad1cd5f..0000000 --- a/node_modules/npm/node_modules/glob/dist/commonjs/walker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,uCAAmC;AAEnC,2CAAgD;AAQhD,iDAA0C;AAiE1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ;IACxB,CAAC,CAAC,IAAI,kBAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAC5B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,IAAI,kBAAM,CAAC,MAAM,EAAE,IAAI,CAAC;QAC1B,CAAC,CAAC,MAAM,CAAA;AAEZ;;GAEG;AACH,MAAsB,QAAQ;IAC5B,IAAI,CAAM;IACV,QAAQ,CAAW;IACnB,IAAI,CAAG;IACP,IAAI,GAAc,IAAI,GAAG,EAAQ,CAAA;IACjC,MAAM,GAAY,KAAK,CAAA;IACvB,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAkB,EAAE,CAAA;IAC7B,OAAO,CAAa;IACpB,IAAI,CAAY;IAChB,MAAM,CAAc;IACpB,QAAQ,CAAQ;IAGhB,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAA;QACjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;SAC7C;QACD,6DAA6D;QAC7D,mBAAmB;QACnB,qBAAqB;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAA;QACzC,oBAAoB;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YACzB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACzC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAA;YAC3B,CAAC,CAAC,CAAA;SACH;IACH,CAAC;IAED,QAAQ,CAAC,IAAU;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;IAC/D,CAAC;IACD,gBAAgB,CAAC,IAAU;QACzB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;IAED,yBAAyB;IACzB,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;IACpB,CAAC;IACD,MAAM;QACJ,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,OAAM;QAChC,oBAAoB;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,EAAE,GAA4B,SAAS,CAAA;QAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE;YACpD,EAAE,EAAE,CAAA;SACL;IACH,CAAC;IACD,QAAQ,CAAC,EAAa;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,OAAM;QAChC,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,EAAE,EAAE,CAAA;SACL;aAAM;YACL,oBAAoB;YACpB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SACxB;IACH,CAAC;IAED,+DAA+D;IAC/D,wCAAwC;IACxC,KAAK,CAAC,UAAU,CAAC,CAAO,EAAE,KAAc;QACtC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAA;QAC9C,IAAI,GAAqB,CAAA;QACzB,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;YAChD,IAAI,CAAC,GAAG;gBAAE,OAAO,SAAS,CAAA;YAC1B,CAAC,GAAG,GAAG,CAAA;SACR;QACD,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACnE,CAAC;IAED,cAAc,CAAC,CAAmB,EAAE,KAAc;QAChD,OAAO,CAAC;YACN,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC;YAC1D,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YAC1B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACtC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,SAAS,CAAA;IACf,CAAC;IAED,cAAc,CAAC,CAAO,EAAE,KAAc;QACpC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAA;QAC9C,IAAI,GAAqB,CAAA;QACzB,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,YAAY,EAAE,CAAA;YAC5C,IAAI,CAAC,GAAG;gBAAE,OAAO,SAAS,CAAA;YAC1B,CAAC,GAAG,GAAG,CAAA;SACR;QACD,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACjE,CAAC;IAKD,WAAW,CAAC,CAAO,EAAE,QAAiB;QACpC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAAE,OAAM;QAC5B,MAAM,GAAG,GACP,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA;QAClE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;QAC/D,4BAA4B;QAC5B,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;SAClB;aAAM,IAAI,GAAG,EAAE;YACd,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;YAC9D,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;SAC3B;aAAM;YACL,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;YAC9D,MAAM,GAAG,GACP,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACxD,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI;gBACjB,CAAC,CAAC,EAAE,CAAA;YACR,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAA;SACrD;IACH,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,CAAO,EAAE,QAAiB,EAAE,KAAc;QACpD,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,IAAI,CAAC;YAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;IAED,SAAS,CAAC,CAAO,EAAE,QAAiB,EAAE,KAAc;QAClD,MAAM,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACvC,IAAI,CAAC;YAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,MAAY,EAAE,QAAmB,EAAE,EAAa;QACrD,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,oBAAoB;QACpB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,wBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9D,CAAC;IAED,OAAO,CACL,MAAY,EACZ,QAAmB,EACnB,SAAoB,EACpB,EAAa;QAEb,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,EAAE,CAAA;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;YAClE,OAAM;SACP;QACD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3C,qEAAqE;QACrE,4DAA4D;QAC5D,yDAAyD;QACzD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;SAClD;QAED,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC5D,SAAQ;aACT;YACD,KAAK,EAAE,CAAA;YACP,MAAM,cAAc,GAAG,CAAC,CAAC,aAAa,EAAE,CAAA;YACxC,IAAI,CAAC,CAAC,aAAa,EAAE;gBACnB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;iBAC7C;gBACH,CAAC,CAAC,SAAS,CACT,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EACzD,IAAI,CACL,CAAA;aACF;SACF;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,OAAO,CACL,MAAY,EACZ,OAAe,EACf,SAAoB,EACpB,EAAa;QAEb,SAAS,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAEpD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;SAClD;QACD,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7D,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;SACxD;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,UAAU,CAAC,MAAY,EAAE,QAAmB,EAAE,EAAa;QACzD,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,oBAAoB;QACpB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,wBAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAClE,CAAC;IAED,WAAW,CACT,MAAY,EACZ,QAAmB,EACnB,SAAoB,EACpB,EAAa;QAEb,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,EAAE,CAAA;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CACjB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,CAClD,CAAA;YACD,OAAM;SACP;QACD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3C,qEAAqE;QACrE,4DAA4D;QAC5D,yDAAyD;QACzD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACnC;QAED,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC5D,SAAQ;aACT;YACD,KAAK,EAAE,CAAA;YACP,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;YAChC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;SAC/C;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,WAAW,CACT,MAAY,EACZ,OAAe,EACf,SAAoB,EACpB,EAAa;QAEb,SAAS,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAEpD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7D,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;SAC5D;QAED,IAAI,EAAE,CAAA;IACR,CAAC;CACF;AAlSD,4BAkSC;AAED,MAAa,UAEX,SAAQ,QAAW;IACnB,OAAO,CAMe;IAEtB,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IACxC,CAAC;IAGD,SAAS,CAAC,CAAgB;QACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAClD,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;SACxB;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;gBACzC,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE;oBACxB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;iBACxB;qBAAM;oBACL,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAClB;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAClD,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,4DAA4D;QAC5D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;gBAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QACpD,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAjDD,gCAiDC;AAED,MAAa,UAEX,SAAQ,QAAW;IACnB,OAAO,CAMmC;IAE1C,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,mBAAQ,CAAC;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI;SACjB,CAAmB,CAAA;QACpB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAC7C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAChD,CAAC;IAGD,SAAS,CAAC,CAAgB;QACxB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,IAAI,CAAC,KAAK,EAAE,CAAA;IACzC,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;QACxB,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE;YACtB,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;YAC9D,CAAC,CAAC,CAAA;SACH;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AA9CD,gCA8CC","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result = O extends GWOFileTypesTrue\n ? Path\n : O extends GWOFileTypesFalse\n ? string\n : O extends GWOFileTypesUnset\n ? string\n : Path | string\n\nexport type Matches = O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\nexport type MatchStream =\n O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts\n): IgnoreLike =>\n typeof ignore === 'string'\n ? new Ignore([ignore], opts)\n : Array.isArray(ignore)\n ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n if (opts.ignore) {\n this.#ignore = makeIgnore(opts.ignore, opts)\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n !this.#ignored(e)\n ? e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep)\n ? '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb)\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n matches: O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.matches = new Set() as Matches\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.matches.add(e)\n }\n\n async walk(): Promise> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Matches {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n results: O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass({\n signal: this.signal,\n objectMode: true,\n }) as MatchStream\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts b/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts deleted file mode 100644 index 77298e4..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=bin.d.mts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts.map b/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts.map deleted file mode 100644 index ec64bdd..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/bin.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.d.mts","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/bin.mjs b/node_modules/npm/node_modules/glob/dist/esm/bin.mjs deleted file mode 100755 index 9d57d4a..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/bin.mjs +++ /dev/null @@ -1,275 +0,0 @@ -#!/usr/bin/env node -import { foregroundChild } from 'foreground-child'; -import { existsSync } from 'fs'; -import { readFile } from 'fs/promises'; -import { jack } from 'jackspeak'; -import { join } from 'path'; -import { fileURLToPath } from 'url'; -import { globStream } from './index.js'; -/* c8 ignore start */ -const { version } = JSON.parse(await readFile(fileURLToPath(new URL('../../package.json', import.meta.url)), 'utf8').catch(() => readFile(fileURLToPath(new URL('../../package.json', import.meta.url)), 'utf8'))); -/* c8 ignore stop */ -const j = jack({ - usage: 'glob [options] [ [ ...]]', -}) - .description(` - Glob v${version} - - Expand the positional glob expression arguments into any matching file - system paths found. - `) - .opt({ - cmd: { - short: 'c', - hint: 'command', - description: `Run the command provided, passing the glob expression - matches as arguments.`, - }, -}) - .opt({ - default: { - short: 'p', - hint: 'pattern', - description: `If no positional arguments are provided, glob will use - this pattern`, - }, -}) - .flag({ - all: { - short: 'A', - description: `By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell expands - an argument whose filename is a glob expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', then - on Windows powershell or cmd.exe, 'glob app/*.ts' will - expand to 'app/[id].ts', as expected. However, in posix - shells such as bash or zsh, the shell will first expand - 'app/*.ts' to a list of filenames. Then glob will look - for a file matching 'app/[id].ts' (ie, 'app/i.ts' or - 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob - to treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - `, - }, - absolute: { - short: 'a', - description: 'Expand to absolute paths', - }, - 'dot-relative': { - short: 'd', - description: `Prepend './' on relative matches`, - }, - mark: { - short: 'm', - description: `Append a / on any directories matched`, - }, - posix: { - short: 'x', - description: `Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\\foo\\bar', - it will expand to '//?/C:/foo/bar'. - `, - }, - follow: { - short: 'f', - description: `Follow symlinked directories when expanding '**'`, - }, - realpath: { - short: 'R', - description: `Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls.`, - }, - stat: { - short: 's', - description: `Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match.`, - }, - 'match-base': { - short: 'b', - description: `Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - `, - }, - dot: { - description: `Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - `, - }, - nobrace: { - description: 'Do not expand {...} patterns', - }, - nocase: { - description: `Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on - all others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - `, - }, - nodir: { - description: `Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - `, - }, - noext: { - description: `Do not expand extglob patterns, such as '+(a|b)'`, - }, - noglobstar: { - description: `Do not expand '**' against multiple path portions. - Ie, treat it as a normal '*' instead.`, - }, - 'windows-path-no-escape': { - description: `Use '\\' as a path separator *only*, and *never* as an - escape character. If set, all '\\' characters are - replaced with '/' in the pattern.`, - }, -}) - .num({ - 'max-depth': { - short: 'D', - description: `Maximum depth to traverse from the current - working directory`, - }, -}) - .opt({ - cwd: { - short: 'C', - description: 'Current working directory to execute/match in', - default: process.cwd(), - }, - root: { - short: 'r', - description: `A string path resolved against the 'cwd', which is - used as the starting point for absolute patterns that - start with '/' (but not drive letters or UNC paths - on Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root directory - on the filesystem, and any non-absolute patterns will - still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - `, - }, - platform: { - description: `Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior!`, - validate: v => new Set([ - 'aix', - 'android', - 'darwin', - 'freebsd', - 'haiku', - 'linux', - 'openbsd', - 'sunos', - 'win32', - 'cygwin', - 'netbsd', - ]).has(v), - }, -}) - .optList({ - ignore: { - short: 'i', - description: `Glob patterns to ignore`, - }, -}) - .flag({ - debug: { - short: 'v', - description: `Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files.`, - }, -}) - .flag({ - help: { - short: 'h', - description: 'Show this usage information', - }, -}); -try { - const { positionals, values } = j.parse(); - if (values.help) { - console.log(j.usage()); - process.exit(0); - } - if (positionals.length === 0 && !values.default) - throw 'No patterns provided'; - if (positionals.length === 0 && values.default) - positionals.push(values.default); - const patterns = values.all - ? positionals - : positionals.filter(p => !existsSync(p)); - const matches = values.all - ? [] - : positionals.filter(p => existsSync(p)).map(p => join(p)); - const stream = globStream(patterns, { - absolute: values.absolute, - cwd: values.cwd, - dot: values.dot, - dotRelative: values['dot-relative'], - follow: values.follow, - ignore: values.ignore, - mark: values.mark, - matchBase: values['match-base'], - maxDepth: values['max-depth'], - nobrace: values.nobrace, - nocase: values.nocase, - nodir: values.nodir, - noext: values.noext, - noglobstar: values.noglobstar, - platform: values.platform, - realpath: values.realpath, - root: values.root, - stat: values.stat, - debug: values.debug, - posix: values.posix, - }); - const cmd = values.cmd; - if (!cmd) { - matches.forEach(m => console.log(m)); - stream.on('data', f => console.log(f)); - } - else { - stream.on('data', f => matches.push(f)); - stream.on('end', () => foregroundChild(cmd, matches, { shell: true })); - } -} -catch (e) { - console.error(j.usage()); - console.error(e instanceof Error ? e.message : String(e)); - process.exit(1); -} -//# sourceMappingURL=bin.mjs.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/bin.mjs.map b/node_modules/npm/node_modules/glob/dist/esm/bin.mjs.map deleted file mode 100644 index bcf08f7..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/bin.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,qBAAqB;AACrB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAC5B,MAAM,QAAQ,CACZ,aAAa,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAC7D,MAAM,CACP,CAAC,KAAK,CAAC,GAAG,EAAE,CACX,QAAQ,CACN,aAAa,CAAC,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAC7D,MAAM,CACP,CACF,CACqB,CAAA;AACxB,oBAAoB;AAEpB,MAAM,CAAC,GAAG,IAAI,CAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,OAAO;;;;GAIhB,CACA;KACA,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;0CACuB;KACrC;CACF,CAAC;KACD,GAAG,CAAC;IACH,OAAO,EAAE;QACP,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;iCACc;KAC5B;CACF,CAAC;KACD,IAAI,CAAC;IACJ,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;OAqBZ;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,0BAA0B;KACxC;IACD,cAAc,EAAE;QACd,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,kCAAkC;KAChD;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,uCAAuC;KACrD;IACD,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;OAKZ;KACF;IAED,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,kDAAkD;KAChE;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;+DAG4C;KAC1D;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;wDACqC;KACnD;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;OAIZ;KACF;IAED,GAAG,EAAE;QACH,WAAW,EAAE;;OAEZ;KACF;IACD,OAAO,EAAE;QACP,WAAW,EAAE,8BAA8B;KAC5C;IACD,MAAM,EAAE;QACN,WAAW,EAAE;;;;;;;;;OASZ;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE;;;;OAIZ;KACF;IACD,KAAK,EAAE;QACL,WAAW,EAAE,kDAAkD;KAChE;IACD,UAAU,EAAE;QACV,WAAW,EAAE;0DACuC;KACrD;IACD,wBAAwB,EAAE;QACxB,WAAW,EAAE;;sDAEmC;KACjD;CACF,CAAC;KACD,GAAG,CAAC;IACH,WAAW,EAAE;QACX,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;sCACmB;KACjC;CACF,CAAC;KACD,GAAG,CAAC;IACH,GAAG,EAAE;QACH,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,+CAA+C;QAC5D,OAAO,EAAE,OAAO,CAAC,GAAG,EAAE;KACvB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;;;;;;;;;;;;;;;;;;;OAmBZ;KACF;IACD,QAAQ,EAAE;QACR,WAAW,EAAE;;uEAEoD;QACjE,QAAQ,EAAE,CAAC,CAAC,EAAE,CACZ,IAAI,GAAG,CAAC;YACN,KAAK;YACL,SAAS;YACT,QAAQ;YACR,SAAS;YACT,OAAO;YACP,OAAO;YACP,SAAS;YACT,OAAO;YACP,OAAO;YACP,QAAQ;YACR,QAAQ;SACT,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KACZ;CACF,CAAC;KACD,OAAO,CAAC;IACP,MAAM,EAAE;QACN,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,yBAAyB;KACvC;CACF,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE;QACL,KAAK,EAAE,GAAG;QACV,WAAW,EAAE;yEACsD;KACpE;CACF,CAAC;KACD,IAAI,CAAC;IACJ,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG;QACV,WAAW,EAAE,6BAA6B;KAC3C;CACF,CAAC,CAAA;AAEJ,IAAI;IACF,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAA;IACzC,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;QACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;IACD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO;QAC7C,MAAM,sBAAsB,CAAA;IAC9B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO;QAC5C,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG;QACzB,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3C,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG;QACxB,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAG,UAAU,CAAC,QAAQ,EAAE;QAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC;QACnC,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;QAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,QAAQ,EAAE,MAAM,CAAC,QAAuC;QACxD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;KACvC;SAAM;QACL,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;KACvE;CACF;AAAC,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;CAChB","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { readFile } from 'fs/promises'\nimport { jack } from 'jackspeak'\nimport { join } from 'path'\nimport { fileURLToPath } from 'url'\nimport { globStream } from './index.js'\n\n/* c8 ignore start */\nconst { version } = JSON.parse(\n await readFile(\n fileURLToPath(new URL('../../package.json', import.meta.url)),\n 'utf8'\n ).catch(() =>\n readFile(\n fileURLToPath(new URL('../../package.json', import.meta.url)),\n 'utf8'\n )\n )\n) as { version: string }\n/* c8 ignore stop */\n\nconst j = jack({\n usage: 'glob [options] [ [ ...]]',\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .opt({\n default: {\n short: 'p',\n hint: 'pattern',\n description: `If no positional arguments are provided, glob will use\n this pattern`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validate: v =>\n new Set([\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ]).has(v),\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n })\n .flag({\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0 && !values.default)\n throw 'No patterns provided'\n if (positionals.length === 0 && values.default)\n positionals.push(values.default)\n const patterns = values.all\n ? positionals\n : positionals.filter(p => !existsSync(p))\n const matches = values.all\n ? []\n : positionals.filter(p => existsSync(p)).map(p => join(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts b/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts deleted file mode 100644 index 55674de..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -/// -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts.map deleted file mode 100644 index 5216438..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/glob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAWlE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IAEnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,EAAE,CAAC,EAAE,QAAQ,CAAA;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,4BAA4B,GAAG,WAAW,GAAG;IACvD,aAAa,EAAE,IAAI,CAAA;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,KAAK,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,IAAI,IAAI,IAAI,SAAS,4BAA4B,GAChE,IAAI,GACJ,IAAI,SAAS,6BAA6B,GAC1C,MAAM,GACN,IAAI,SAAS,6BAA6B,GAC1C,MAAM,GACN,MAAM,GAAG,IAAI,CAAA;AACjB,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;AAE1C,MAAM,MAAM,SAAS,CAAC,IAAI,IAAI,IAAI,SAAS,4BAA4B,GACnE,IAAI,GACJ,IAAI,SAAS,6BAA6B,GAC1C,KAAK,GACL,IAAI,SAAS,6BAA6B,GAC1C,KAAK,GACL,OAAO,CAAA;AAEX;;GAEG;AACH,qBAAa,IAAI,CAAC,IAAI,SAAS,WAAW,CAAE,YAAW,WAAW;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAE9B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA4HlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAmBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAezB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAa9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAalD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/glob.js b/node_modules/npm/node_modules/glob/dist/esm/glob.js deleted file mode 100644 index 2a2b15d..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/glob.js +++ /dev/null @@ -1,239 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry'; -import { fileURLToPath } from 'url'; -import { Pattern } from './pattern.js'; -import { GlobStream, GlobWalker } from './walker.js'; -// if no process global, just call it linux. -// so we default to case-sensitive, / separators -const defaultPlatform = typeof process === 'object' && - process && - typeof process.platform === 'string' - ? process.platform - : 'linux'; -/** - * An object that can perform glob pattern traversals. - */ -export class Glob { - absolute; - cwd; - root; - dot; - dotRelative; - follow; - ignore; - magicalBraces; - mark; - matchBase; - maxDepth; - nobrace; - nocase; - nodir; - noext; - noglobstar; - pattern; - platform; - realpath; - scurry; - stat; - signal; - windowsPathsNoEscape; - withFileTypes; - /** - * The options provided to the constructor. - */ - opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern, opts) { - /* c8 ignore start */ - if (!opts) - throw new TypeError('glob options required'); - /* c8 ignore stop */ - this.withFileTypes = !!opts.withFileTypes; - this.signal = opts.signal; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.dotRelative = !!opts.dotRelative; - this.nodir = !!opts.nodir; - this.mark = !!opts.mark; - if (!opts.cwd) { - this.cwd = ''; - } - else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { - opts.cwd = fileURLToPath(opts.cwd); - } - this.cwd = opts.cwd || ''; - this.root = opts.root; - this.magicalBraces = !!opts.magicalBraces; - this.nobrace = !!opts.nobrace; - this.noext = !!opts.noext; - this.realpath = !!opts.realpath; - this.absolute = opts.absolute; - this.noglobstar = !!opts.noglobstar; - this.matchBase = !!opts.matchBase; - this.maxDepth = - typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; - this.stat = !!opts.stat; - this.ignore = opts.ignore; - if (this.withFileTypes && this.absolute !== undefined) { - throw new Error('cannot set absolute and withFileTypes:true'); - } - if (typeof pattern === 'string') { - pattern = [pattern]; - } - this.windowsPathsNoEscape = - !!opts.windowsPathsNoEscape || - opts.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - pattern = pattern.map(p => p.replace(/\\/g, '/')); - } - if (this.matchBase) { - if (opts.noglobstar) { - throw new TypeError('base matching requires globstar'); - } - pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); - } - this.pattern = pattern; - this.platform = opts.platform || defaultPlatform; - this.opts = { ...opts, platform: this.platform }; - if (opts.scurry) { - this.scurry = opts.scurry; - if (opts.nocase !== undefined && - opts.nocase !== opts.scurry.nocase) { - throw new Error('nocase option contradicts provided scurry option'); - } - } - else { - const Scurry = opts.platform === 'win32' - ? PathScurryWin32 - : opts.platform === 'darwin' - ? PathScurryDarwin - : opts.platform - ? PathScurryPosix - : PathScurry; - this.scurry = new Scurry(this.cwd, { - nocase: opts.nocase, - fs: opts.fs, - }); - } - this.nocase = this.scurry.nocase; - // If you do nocase:true on a case-sensitive file system, then - // we need to use regexps instead of strings for non-magic - // path portions, because statting `aBc` won't return results - // for the file `AbC` for example. - const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; - const mmo = { - // default nocase based on platform - ...opts, - dot: this.dot, - matchBase: this.matchBase, - nobrace: this.nobrace, - nocase: this.nocase, - nocaseMagicOnly, - nocomment: true, - noext: this.noext, - nonegate: true, - optimizationLevel: 2, - platform: this.platform, - windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, - }; - const mms = this.pattern.map(p => new Minimatch(p, mmo)); - const [matchSet, globParts] = mms.reduce((set, m) => { - set[0].push(...m.set); - set[1].push(...m.globParts); - return set; - }, [[], []]); - this.patterns = matchSet.map((set, i) => { - const g = globParts[i]; - /* c8 ignore start */ - if (!g) - throw new Error('invalid pattern object'); - /* c8 ignore stop */ - return new Pattern(set, g, 0, this.platform); - }); - } - async walk() { - // Walkers always return array of Path objects, so we just have to - // coerce them into the right shape. It will have already called - // realpath() if the option was set to do so, so we know that's cached. - // start out knowing the cwd, at least - return [ - ...(await new GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).walk()), - ]; - } - walkSync() { - return [ - ...new GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).walkSync(), - ]; - } - stream() { - return new GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).stream(); - } - streamSync() { - return new GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity - ? this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - }).streamSync(); - } - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync() { - return this.streamSync()[Symbol.iterator](); - } - [Symbol.iterator]() { - return this.iterateSync(); - } - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate() { - return this.stream()[Symbol.asyncIterator](); - } - [Symbol.asyncIterator]() { - return this.iterate(); - } -} -//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/glob.js.map b/node_modules/npm/node_modules/glob/dist/esm/glob.js.map deleted file mode 100644 index d08e810..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAgTb;;GAEG;AACH,MAAM,OAAO,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oBAAoB,CAAS;IAC7B,aAAa,CAAiB;IAE9B;;OAEG;IACH,IAAI,CAAM;IAEV;;OAEG;IACH,QAAQ,CAAW;IAEnB;;;;;;;;;;;OAWG;IACH,YAAY,OAA0B,EAAE,IAAU;QAChD,qBAAqB;QACrB,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,CAAC,CAAA;QACvD,oBAAoB;QACpB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,aAAgC,CAAA;QAC5D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;QACrB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAA;QACvB,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YACb,IAAI,CAAC,GAAG,GAAG,EAAE,CAAA;SACd;aAAM,IAAI,IAAI,CAAC,GAAG,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YACpE,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACnC;QACD,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACrB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,aAAa,CAAA;QACzC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAA;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACzB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAA;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QAE7B,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,QAAQ;YACX,OAAO,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC9D,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAEzB,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAA;SAC9D;QAED,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;SACpB;QAED,IAAI,CAAC,oBAAoB;YACvB,CAAC,CAAC,IAAI,CAAC,oBAAoB;gBAC1B,IAAoB,CAAC,kBAAkB,KAAK,KAAK,CAAA;QAEpD,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC7B,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;SAClD;QAED,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAA;aACvD;YACD,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;SAChE;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAEtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,eAAe,CAAA;QAChD,IAAI,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAA;QAChD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YACzB,IACE,IAAI,CAAC,MAAM,KAAK,SAAS;gBACzB,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,EAClC;gBACA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;aACpE;SACF;aAAM;YACL,MAAM,MAAM,GACV,IAAI,CAAC,QAAQ,KAAK,OAAO;gBACvB,CAAC,CAAC,eAAe;gBACjB,CAAC,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBAC5B,CAAC,CAAC,gBAAgB;oBAClB,CAAC,CAAC,IAAI,CAAC,QAAQ;wBACf,CAAC,CAAC,eAAe;wBACjB,CAAC,CAAC,UAAU,CAAA;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;gBACjC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,EAAE,EAAE,IAAI,CAAC,EAAE;aACZ,CAAC,CAAA;SACH;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAEhC,8DAA8D;QAC9D,0DAA0D;QAC1D,6DAA6D;QAC7D,kCAAkC;QAClC,MAAM,eAAe,GACnB,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAA;QAEzD,MAAM,GAAG,GAAqB;YAC5B,mCAAmC;YACnC,GAAG,IAAI;YACP,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,eAAe;YACf,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,iBAAiB,EAAE,CAAC;YACpB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;YAC/C,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;SACzB,CAAA;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QACxD,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,GAAG,CAAC,MAAM,CACtC,CAAC,GAA0B,EAAE,CAAC,EAAE,EAAE;YAChC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;YACrB,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAA;YAC3B,OAAO,GAAG,CAAA;QACZ,CAAC,EACD,CAAC,EAAE,EAAE,EAAE,CAAC,CACT,CAAA;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;YACtC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;YACtB,qBAAqB;YACrB,IAAI,CAAC,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;YACjD,oBAAoB;YACpB,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9C,CAAC,CAAC,CAAA;IACJ,CAAC;IAMD,KAAK,CAAC,IAAI;QACR,kEAAkE;QAClE,iEAAiE;QACjE,uEAAuE;QACvE,sCAAsC;QACtC,OAAO;YACL,GAAG,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBACvD,GAAG,IAAI,CAAC,IAAI;gBACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;oBACzC,CAAC,CAAC,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC,IAAI,EAAE,CAAC;SACX,CAAA;IACH,CAAC;IAMD,QAAQ;QACN,OAAO;YACL,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBAChD,GAAG,IAAI,CAAC,IAAI;gBACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;oBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;oBACzC,CAAC,CAAC,QAAQ;gBACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC,QAAQ,EAAE;SACd,CAAA;IACH,CAAC;IAMD,MAAM;QACJ,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,MAAM,EAAE,CAAA;IACb,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YACpD,GAAG,IAAI,CAAC,IAAI;YACZ,QAAQ,EACN,IAAI,CAAC,QAAQ,KAAK,QAAQ;gBACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE;gBACzC,CAAC,CAAC,QAAQ;YACd,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { fileURLToPath } from 'url'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result = Opts extends GlobOptionsWithFileTypesTrue\n ? Path\n : Opts extends GlobOptionsWithFileTypesFalse\n ? string\n : Opts extends GlobOptionsWithFileTypesUnset\n ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes = Opts extends GlobOptionsWithFileTypesTrue\n ? true\n : Opts extends GlobOptionsWithFileTypesFalse\n ? false\n : Opts extends GlobOptionsWithFileTypesUnset\n ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as GlobOptions).allowWindowsEscape === false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32'\n ? PathScurryWin32\n : opts.platform === 'darwin'\n ? PathScurryDarwin\n : opts.platform\n ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []]\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity\n ? this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts b/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts deleted file mode 100644 index 8aec3bd..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts.map deleted file mode 100644 index b24dd4e..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/has-magic.js b/node_modules/npm/node_modules/glob/dist/esm/has-magic.js deleted file mode 100644 index ba2321a..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/has-magic.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Minimatch } from 'minimatch'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export const hasMagic = (pattern, options = {}) => { - if (!Array.isArray(pattern)) { - pattern = [pattern]; - } - for (const p of pattern) { - if (new Minimatch(p, options).hasMagic()) - return true; - } - return false; -}; -//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/has-magic.js.map b/node_modules/npm/node_modules/glob/dist/esm/has-magic.js.map deleted file mode 100644 index 27fd78d..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;KACpB;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;QACvB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;KACtD;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {}\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts b/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts deleted file mode 100644 index e9d74f3..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts.map deleted file mode 100644 index be78317..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;CACvC;AASD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;gBAG3B,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAsDnB,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/ignore.js b/node_modules/npm/node_modules/glob/dist/esm/ignore.js deleted file mode 100644 index e8cbaf9..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/ignore.js +++ /dev/null @@ -1,104 +0,0 @@ -// give it a pattern, and it'll be able to tell you if -// a given path should be ignored. -// Ignoring a path ignores its children if the pattern ends in /** -// Ignores are always parsed in dot:true mode -import { Minimatch } from 'minimatch'; -import { Pattern } from './pattern.js'; -const defaultPlatform = typeof process === 'object' && - process && - typeof process.platform === 'string' - ? process.platform - : 'linux'; -/** - * Class used to process ignored patterns - */ -export class Ignore { - relative; - relativeChildren; - absolute; - absoluteChildren; - constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { - this.relative = []; - this.absolute = []; - this.relativeChildren = []; - this.absoluteChildren = []; - const mmopts = { - dot: true, - nobrace, - nocase, - noext, - noglobstar, - optimizationLevel: 2, - platform, - nocomment: true, - nonegate: true, - }; - // this is a little weird, but it gives us a clean set of optimized - // minimatch matchers, without getting tripped up if one of them - // ends in /** inside a brace section, and it's only inefficient at - // the start of the walk, not along it. - // It'd be nice if the Pattern class just had a .test() method, but - // handling globstars is a bit of a pita, and that code already lives - // in minimatch anyway. - // Another way would be if maybe Minimatch could take its set/globParts - // as an option, and then we could at least just use Pattern to test - // for absolute-ness. - // Yet another way, Minimatch could take an array of glob strings, and - // a cwd option, and do the right thing. - for (const ign of ignored) { - const mm = new Minimatch(ign, mmopts); - for (let i = 0; i < mm.set.length; i++) { - const parsed = mm.set[i]; - const globParts = mm.globParts[i]; - /* c8 ignore start */ - if (!parsed || !globParts) { - throw new Error('invalid pattern object'); - } - /* c8 ignore stop */ - const p = new Pattern(parsed, globParts, 0, platform); - const m = new Minimatch(p.globString(), mmopts); - const children = globParts[globParts.length - 1] === '**'; - const absolute = p.isAbsolute(); - if (absolute) - this.absolute.push(m); - else - this.relative.push(m); - if (children) { - if (absolute) - this.absoluteChildren.push(m); - else - this.relativeChildren.push(m); - } - } - } - } - ignored(p) { - const fullpath = p.fullpath(); - const fullpaths = `${fullpath}/`; - const relative = p.relative() || '.'; - const relatives = `${relative}/`; - for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) - return true; - } - for (const m of this.absolute) { - if (m.match(fullpath) || m.match(fullpaths)) - return true; - } - return false; - } - childrenIgnored(p) { - const fullpath = p.fullpath() + '/'; - const relative = (p.relative() || '.') + '/'; - for (const m of this.relativeChildren) { - if (m.match(relative)) - return true; - } - for (const m of this.absoluteChildren) { - if (m.match(fullpath)) - return true; - } - return false; - } -} -//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/ignore.js.map b/node_modules/npm/node_modules/glob/dist/esm/ignore.js.map deleted file mode 100644 index 736e446..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAQtC,MAAM,eAAe,GACnB,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ;IAClC,CAAC,CAAC,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEb;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAE7B,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,MAAM,MAAM,GAAG;YACb,GAAG,EAAE,IAAI;YACT,OAAO;YACP,MAAM;YACN,KAAK;YACL,UAAU;YACV,iBAAiB,EAAE,CAAC;YACpB,QAAQ;YACR,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf,CAAA;QAED,mEAAmE;QACnE,gEAAgE;QAChE,mEAAmE;QACnE,uCAAuC;QACvC,mEAAmE;QACnE,qEAAqE;QACrE,uBAAuB;QACvB,uEAAuE;QACvE,oEAAoE;QACpE,qBAAqB;QACrB,sEAAsE;QACtE,wCAAwC;QACxC,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;YACzB,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;gBACxB,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;gBACjC,qBAAqB;gBACrB,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE;oBACzB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;iBAC1C;gBACD,oBAAoB;gBACpB,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;gBACrD,MAAM,CAAC,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,MAAM,CAAC,CAAA;gBAC/C,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;gBACzD,MAAM,QAAQ,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;gBAC/B,IAAI,QAAQ;oBAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;oBAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBAC1B,IAAI,QAAQ,EAAE;oBACZ,IAAI,QAAQ;wBAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;wBACtC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iBACnC;aACF;SACF;IACH,CAAC;IAED,OAAO,CAAC,CAAO;QACb,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAA;QACpC,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC7B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;SACzD;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC7B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;SACzD;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACrC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;SACnC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n}\n\nconst defaultPlatform: NodeJS.Platform =\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ? process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n const mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n for (const ign of ignored) {\n const mm = new Minimatch(ign, mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, platform)\n const m = new Minimatch(p.globString(), mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/index.d.ts b/node_modules/npm/node_modules/glob/dist/esm/index.d.ts deleted file mode 100644 index 048e584..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/index.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -export type { Path, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, WalkOptions, FSOption, } from 'path-scurry'; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick | undefined) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/index.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/index.d.ts.map deleted file mode 100644 index 3e263fb..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAQlD;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAQlD;;GAEG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,MAAM,EAAE,CAAA;AACX,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,IAAI,EAAE,CAAA;AACT,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,MAAM,EAAE,CAAA;AACX,wBAAgB,QAAQ,CACtB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,IAAI,EAAE,GAAG,MAAM,EAAE,CAAA;AAQpB;;;;;GAKG;AACH,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AACpB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;AAClB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;AACpB,iBAAe,KAAK,CAClB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;AAQ7B;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAChC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAC9B,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAChC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAQ9D;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACnC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAGF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EACV,IAAI,EACJ,4BAA4B,EAC5B,6BAA6B,EAC7B,WAAW,EACX,QAAQ,GACT,MAAM,aAAa,CAAA;AAIpB,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/index.js b/node_modules/npm/node_modules/glob/dist/esm/index.js deleted file mode 100644 index 7b27011..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/index.js +++ /dev/null @@ -1,56 +0,0 @@ -import { escape, unescape } from 'minimatch'; -import { Glob } from './glob.js'; -import { hasMagic } from './has-magic.js'; -export function globStreamSync(pattern, options = {}) { - return new Glob(pattern, options).streamSync(); -} -export function globStream(pattern, options = {}) { - return new Glob(pattern, options).stream(); -} -export function globSync(pattern, options = {}) { - return new Glob(pattern, options).walkSync(); -} -async function glob_(pattern, options = {}) { - return new Glob(pattern, options).walk(); -} -export function globIterateSync(pattern, options = {}) { - return new Glob(pattern, options).iterateSync(); -} -export function globIterate(pattern, options = {}) { - return new Glob(pattern, options).iterate(); -} -// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc -export const streamSync = globStreamSync; -export const stream = Object.assign(globStream, { sync: globStreamSync }); -export const iterateSync = globIterateSync; -export const iterate = Object.assign(globIterate, { - sync: globIterateSync, -}); -export const sync = Object.assign(globSync, { - stream: globStreamSync, - iterate: globIterateSync, -}); -/* c8 ignore start */ -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export { hasMagic } from './has-magic.js'; -/* c8 ignore stop */ -export const glob = Object.assign(glob_, { - glob: glob_, - globSync, - sync, - globStream, - stream, - globStreamSync, - streamSync, - globIterate, - iterate, - globIterateSync, - iterateSync, - Glob, - hasMagic, - escape, - unescape, -}); -glob.glob = glob; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/index.js.map b/node_modules/npm/node_modules/glob/dist/esm/index.js.map deleted file mode 100644 index d857e6b..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAuBzC,MAAM,UAAU,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,MAAM,UAAU,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AAqBD,MAAM,UAAU,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;AAC1C,CAAC;AAqBD,MAAM,UAAU,eAAe,CAC7B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAA;AACjD,CAAC;AAqBD,MAAM,UAAU,WAAW,CACzB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,CAAA;AAC7C,CAAC;AAED,iEAAiE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAA;AACxC,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAA;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;CACzB,CAAC,CAAA;AAEF,qBAAqB;AACrB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAOhC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAWzC,oBAAoB;AAEpB,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,UAAU;IACV,WAAW;IACX,OAAO;IACP,eAAe;IACf,WAAW;IACX,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {}\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\n/* c8 ignore start */\nexport { escape, unescape } from 'minimatch'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\nexport type {\n Path,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n WalkOptions,\n FSOption,\n} from 'path-scurry'\n\n/* c8 ignore stop */\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/package.json b/node_modules/npm/node_modules/glob/dist/esm/package.json deleted file mode 100644 index 7c34deb..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts b/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts deleted file mode 100644 index da675f9..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/// -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts.map deleted file mode 100644 index 1430a77..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IAOd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/pattern.js b/node_modules/npm/node_modules/glob/dist/esm/pattern.js deleted file mode 100644 index 60aa415..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/pattern.js +++ /dev/null @@ -1,215 +0,0 @@ -// this is just a very light wrapper around 2 arrays with an offset index -import { GLOBSTAR } from 'minimatch'; -const isPatternList = (pl) => pl.length >= 1; -const isGlobList = (gl) => gl.length >= 1; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export class Pattern { - #patternList; - #globList; - #index; - length; - #platform; - #rest; - #globString; - #isDrive; - #isUNC; - #isAbsolute; - #followGlobstar = true; - constructor(patternList, globList, index, platform) { - if (!isPatternList(patternList)) { - throw new TypeError('empty pattern list'); - } - if (!isGlobList(globList)) { - throw new TypeError('empty glob list'); - } - if (globList.length !== patternList.length) { - throw new TypeError('mismatched pattern list and glob list lengths'); - } - this.length = patternList.length; - if (index < 0 || index >= this.length) { - throw new TypeError('index out of range'); - } - this.#patternList = patternList; - this.#globList = globList; - this.#index = index; - this.#platform = platform; - // normalize root entries of absolute patterns on initial creation. - if (this.#index === 0) { - // c: => ['c:/'] - // C:/ => ['C:/'] - // C:/x => ['C:/', 'x'] - // //host/share => ['//host/share/'] - // //host/share/ => ['//host/share/'] - // //host/share/x => ['//host/share/', 'x'] - // /etc => ['/', 'etc'] - // / => ['/'] - if (this.isUNC()) { - // '' / '' / 'host' / 'share' - const [p0, p1, p2, p3, ...prest] = this.#patternList; - const [g0, g1, g2, g3, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = [p0, p1, p2, p3, ''].join('/'); - const g = [g0, g1, g2, g3, ''].join('/'); - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - else if (this.isDrive() || this.isAbsolute()) { - const [p1, ...prest] = this.#patternList; - const [g1, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = p1 + '/'; - const g = g1 + '/'; - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - } - } - /** - * The first entry in the parsed list of patterns - */ - pattern() { - return this.#patternList[this.#index]; - } - /** - * true of if pattern() returns a string - */ - isString() { - return typeof this.#patternList[this.#index] === 'string'; - } - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar() { - return this.#patternList[this.#index] === GLOBSTAR; - } - /** - * true if pattern() returns a regexp - */ - isRegExp() { - return this.#patternList[this.#index] instanceof RegExp; - } - /** - * The /-joined set of glob parts that make up this pattern - */ - globString() { - return (this.#globString = - this.#globString || - (this.#index === 0 - ? this.isAbsolute() - ? this.#globList[0] + this.#globList.slice(1).join('/') - : this.#globList.join('/') - : this.#globList.slice(this.#index).join('/'))); - } - /** - * true if there are more pattern parts after this one - */ - hasMore() { - return this.length > this.#index + 1; - } - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest() { - if (this.#rest !== undefined) - return this.#rest; - if (!this.hasMore()) - return (this.#rest = null); - this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); - this.#rest.#isAbsolute = this.#isAbsolute; - this.#rest.#isUNC = this.#isUNC; - this.#rest.#isDrive = this.#isDrive; - return this.#rest; - } - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC() { - const pl = this.#patternList; - return this.#isUNC !== undefined - ? this.#isUNC - : (this.#isUNC = - this.#platform === 'win32' && - this.#index === 0 && - pl[0] === '' && - pl[1] === '' && - typeof pl[2] === 'string' && - !!pl[2] && - typeof pl[3] === 'string' && - !!pl[3]); - } - // pattern like C:/... - // split = ['C:', ...] - // XXX: would be nice to handle patterns like `c:*` to test the cwd - // in c: for *, but I don't know of a way to even figure out what that - // cwd is without actually chdir'ing into it? - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive() { - const pl = this.#patternList; - return this.#isDrive !== undefined - ? this.#isDrive - : (this.#isDrive = - this.#platform === 'win32' && - this.#index === 0 && - this.length > 1 && - typeof pl[0] === 'string' && - /^[a-z]:$/i.test(pl[0])); - } - // pattern = '/' or '/...' or '/x/...' - // split = ['', ''] or ['', ...] or ['', 'x', ...] - // Drive and UNC both considered absolute on windows - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute() { - const pl = this.#patternList; - return this.#isAbsolute !== undefined - ? this.#isAbsolute - : (this.#isAbsolute = - (pl[0] === '' && pl.length > 1) || - this.isDrive() || - this.isUNC()); - } - /** - * consume the root of the pattern, and return it - */ - root() { - const p = this.#patternList[0]; - return typeof p === 'string' && this.isAbsolute() && this.#index === 0 - ? p - : ''; - } - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar() { - return !(this.#index === 0 || - !this.isGlobstar() || - !this.#followGlobstar); - } - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar() { - if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) - return false; - this.#followGlobstar = false; - return true; - } -} -//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/pattern.js.map b/node_modules/npm/node_modules/glob/dist/esm/pattern.js.map deleted file mode 100644 index 267a339..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,OAAO,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE;YAC/B,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;YACzB,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;SACvC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,SAAS,CAAC,+CAA+C,CAAC,CAAA;SACrE;QACD,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;QAChC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;YACrC,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;SAC1C;QACD,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAA;QAEzB,mEAAmE;QACnE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YACrB,gBAAgB;YAChB,iBAAiB;YACjB,uBAAuB;YACvB,oCAAoC;YACpC,qCAAqC;YACrC,2CAA2C;YAC3C,uBAAuB;YACvB,aAAa;YACb,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,6BAA6B;gBAC7B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY,CAAA;gBACpD,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAA;gBACjD,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;oBACnB,YAAY;oBACZ,KAAK,CAAC,KAAK,EAAE,CAAA;oBACb,KAAK,CAAC,KAAK,EAAE,CAAA;iBACd;gBACD,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACxC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACxC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBACjC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;aACvC;iBAAM,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC9C,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,YAAY,CAAA;gBACxC,MAAM,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAA;gBACrC,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE;oBACnB,YAAY;oBACZ,KAAK,CAAC,KAAK,EAAE,CAAA;oBACb,KAAK,CAAC,KAAK,EAAE,CAAA;iBACd;gBACD,MAAM,CAAC,GAAI,EAAa,GAAG,GAAG,CAAA;gBAC9B,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,CAAA;gBAClB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBACjC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAA;gBAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;aACvC;SACF;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAc,CAAA;IACpD,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAA;IAC3D,CAAC;IACD;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAA;IACpD,CAAC;IACD;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,MAAM,CAAA;IACzD,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,WAAW;YACtB,IAAI,CAAC,WAAW;gBAChB,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC;oBAChB,CAAC,CAAC,IAAI,CAAC,UAAU,EAAE;wBACjB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;wBACvD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;oBAC5B,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACrD,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;IACtC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC,KAAK,CAAA;QAC/C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAAE,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CACtB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,MAAM,GAAG,CAAC,EACf,IAAI,CAAC,SAAS,CACf,CAAA;QACD,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;QACzC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAC/B,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS;YAC9B,CAAC,CAAC,IAAI,CAAC,MAAM;YACb,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;gBACV,IAAI,CAAC,SAAS,KAAK,OAAO;oBAC1B,IAAI,CAAC,MAAM,KAAK,CAAC;oBACjB,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;oBACZ,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;oBACZ,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACP,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAChB,CAAC;IAED,sBAAsB;IACtB,sBAAsB;IACtB,mEAAmE;IACnE,sEAAsE;IACtE,6CAA6C;IAC7C;;OAEG;IACH,OAAO;QACL,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS;YAChC,CAAC,CAAC,IAAI,CAAC,QAAQ;YACf,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ;gBACZ,IAAI,CAAC,SAAS,KAAK,OAAO;oBAC1B,IAAI,CAAC,MAAM,KAAK,CAAC;oBACjB,IAAI,CAAC,MAAM,GAAG,CAAC;oBACf,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,QAAQ;oBACzB,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAChC,CAAC;IAED,sCAAsC;IACtC,kDAAkD;IAClD,oDAAoD;IACpD;;OAEG;IACH,UAAU;QACR,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAA;QAC5B,OAAO,IAAI,CAAC,WAAW,KAAK,SAAS;YACnC,CAAC,CAAC,IAAI,CAAC,WAAW;YAClB,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;gBACf,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;oBAC/B,IAAI,CAAC,OAAO,EAAE;oBACd,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA;IACrB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QAC9B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YACpE,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[]\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0\n ? this.isAbsolute()\n ? this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined\n ? this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined\n ? this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined\n ? this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ? p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts b/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts deleted file mode 100644 index ccedfbf..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts.map deleted file mode 100644 index 33a39b2..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IASjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAmGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/processor.js b/node_modules/npm/node_modules/glob/dist/esm/processor.js deleted file mode 100644 index b5b2de2..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/processor.js +++ /dev/null @@ -1,295 +0,0 @@ -// synchronous utility for filtering entries and calculating subwalks -import { GLOBSTAR } from 'minimatch'; -/** - * A cache of which patterns have been processed for a given Path - */ -export class HasWalkedCache { - store; - constructor(store = new Map()) { - this.store = store; - } - copy() { - return new HasWalkedCache(new Map(this.store)); - } - hasWalked(target, pattern) { - return this.store.get(target.fullpath())?.has(pattern.globString()); - } - storeWalked(target, pattern) { - const fullpath = target.fullpath(); - const cached = this.store.get(fullpath); - if (cached) - cached.add(pattern.globString()); - else - this.store.set(fullpath, new Set([pattern.globString()])); - } -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export class MatchRecord { - store = new Map(); - add(target, absolute, ifDir) { - const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); - const current = this.store.get(target); - this.store.set(target, current === undefined ? n : n & current); - } - // match, absolute, ifdir - entries() { - return [...this.store.entries()].map(([path, n]) => [ - path, - !!(n & 2), - !!(n & 1), - ]); - } -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export class SubWalks { - store = new Map(); - add(target, pattern) { - if (!target.canReaddir()) { - return; - } - const subs = this.store.get(target); - if (subs) { - if (!subs.find(p => p.globString() === pattern.globString())) { - subs.push(pattern); - } - } - else - this.store.set(target, [pattern]); - } - get(target) { - const subs = this.store.get(target); - /* c8 ignore start */ - if (!subs) { - throw new Error('attempting to walk unknown path'); - } - /* c8 ignore stop */ - return subs; - } - entries() { - return this.keys().map(k => [k, this.store.get(k)]); - } - keys() { - return [...this.store.keys()].filter(t => t.canReaddir()); - } -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export class Processor { - hasWalkedCache; - matches = new MatchRecord(); - subwalks = new SubWalks(); - patterns; - follow; - dot; - opts; - constructor(opts, hasWalkedCache) { - this.opts = opts; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.hasWalkedCache = hasWalkedCache - ? hasWalkedCache.copy() - : new HasWalkedCache(); - } - processPatterns(target, patterns) { - this.patterns = patterns; - const processingSet = patterns.map(p => [target, p]); - // map of paths to the magic-starting subwalks they need to walk - // first item in patterns is the filter - for (let [t, pattern] of processingSet) { - this.hasWalkedCache.storeWalked(t, pattern); - const root = pattern.root(); - const absolute = pattern.isAbsolute() && this.opts.absolute !== false; - // start absolute patterns at root - if (root) { - t = t.resolve(root === '/' && this.opts.root !== undefined - ? this.opts.root - : root); - const rest = pattern.rest(); - if (!rest) { - this.matches.add(t, true, false); - continue; - } - else { - pattern = rest; - } - } - if (t.isENOENT()) - continue; - let p; - let rest; - let changed = false; - while (typeof (p = pattern.pattern()) === 'string' && - (rest = pattern.rest())) { - const c = t.resolve(p); - t = c; - pattern = rest; - changed = true; - } - p = pattern.pattern(); - rest = pattern.rest(); - if (changed) { - if (this.hasWalkedCache.hasWalked(t, pattern)) - continue; - this.hasWalkedCache.storeWalked(t, pattern); - } - // now we have either a final string for a known entry, - // more strings for an unknown entry, - // or a pattern starting with magic, mounted on t. - if (typeof p === 'string') { - // must not be final entry, otherwise we would have - // concatenated it earlier. - const ifDir = p === '..' || p === '' || p === '.'; - this.matches.add(t.resolve(p), absolute, ifDir); - continue; - } - else if (p === GLOBSTAR) { - // if no rest, match and subwalk pattern - // if rest, process rest and subwalk pattern - // if it's a symlink, but we didn't get here by way of a - // globstar match (meaning it's the first time THIS globstar - // has traversed a symlink), then we follow it. Otherwise, stop. - if (!t.isSymbolicLink() || - this.follow || - pattern.checkFollowGlobstar()) { - this.subwalks.add(t, pattern); - } - const rp = rest?.pattern(); - const rrest = rest?.rest(); - if (!rest || ((rp === '' || rp === '.') && !rrest)) { - // only HAS to be a dir if it ends in **/ or **/. - // but ending in ** will match files as well. - this.matches.add(t, absolute, rp === '' || rp === '.'); - } - else { - if (rp === '..') { - // this would mean you're matching **/.. at the fs root, - // and no thanks, I'm not gonna test that specific case. - /* c8 ignore start */ - const tp = t.parent || t; - /* c8 ignore stop */ - if (!rrest) - this.matches.add(tp, absolute, true); - else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { - this.subwalks.add(tp, rrest); - } - } - } - } - else if (p instanceof RegExp) { - this.subwalks.add(t, pattern); - } - } - return this; - } - subwalkTargets() { - return this.subwalks.keys(); - } - child() { - return new Processor(this.opts, this.hasWalkedCache); - } - // return a new Processor containing the subwalks for each - // child entry, and a set of matches, and - // a hasWalkedCache that's a copy of this one - // then we're going to call - filterEntries(parent, entries) { - const patterns = this.subwalks.get(parent); - // put matches and entry walks into the results processor - const results = this.child(); - for (const e of entries) { - for (const pattern of patterns) { - const absolute = pattern.isAbsolute(); - const p = pattern.pattern(); - const rest = pattern.rest(); - if (p === GLOBSTAR) { - results.testGlobstar(e, pattern, rest, absolute); - } - else if (p instanceof RegExp) { - results.testRegExp(e, p, rest, absolute); - } - else { - results.testString(e, p, rest, absolute); - } - } - } - return results; - } - testGlobstar(e, pattern, rest, absolute) { - if (this.dot || !e.name.startsWith('.')) { - if (!pattern.hasMore()) { - this.matches.add(e, absolute, false); - } - if (e.canReaddir()) { - // if we're in follow mode or it's not a symlink, just keep - // testing the same pattern. If there's more after the globstar, - // then this symlink consumes the globstar. If not, then we can - // follow at most ONE symlink along the way, so we mark it, which - // also checks to ensure that it wasn't already marked. - if (this.follow || !e.isSymbolicLink()) { - this.subwalks.add(e, pattern); - } - else if (e.isSymbolicLink()) { - if (rest && pattern.checkFollowGlobstar()) { - this.subwalks.add(e, rest); - } - else if (pattern.markFollowGlobstar()) { - this.subwalks.add(e, pattern); - } - } - } - } - // if the NEXT thing matches this entry, then also add - // the rest. - if (rest) { - const rp = rest.pattern(); - if (typeof rp === 'string' && - // dots and empty were handled already - rp !== '..' && - rp !== '' && - rp !== '.') { - this.testString(e, rp, rest.rest(), absolute); - } - else if (rp === '..') { - /* c8 ignore start */ - const ep = e.parent || e; - /* c8 ignore stop */ - this.subwalks.add(ep, rest); - } - else if (rp instanceof RegExp) { - this.testRegExp(e, rp, rest.rest(), absolute); - } - } - } - testRegExp(e, p, rest, absolute) { - if (!p.test(e.name)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } - testString(e, p, rest, absolute) { - // should never happen? - if (!e.isNamed(p)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } -} -//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/processor.js.map b/node_modules/npm/node_modules/glob/dist/esm/processor.js.map deleted file mode 100644 index 9e4673a..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAA;AAK9C;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,SAAS,CAAC,MAAY,EAAE,OAAgB;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,WAAW,CAAC,MAAY,EAAE,OAAgB;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;;YACvC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAA;IAChE,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,WAAW;IACtB,KAAK,GAAsB,IAAI,GAAG,EAAE,CAAA;IACpC,GAAG,CAAC,MAAY,EAAE,QAAiB,EAAE,KAAc;QACjD,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAA;IACjE,CAAC;IACD,yBAAyB;IACzB,OAAO;QACL,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;YAClD,IAAI;YACJ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;YACT,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;SACV,CAAC,CAAA;IACJ,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,QAAQ;IACnB,KAAK,GAAyB,IAAI,GAAG,EAAE,CAAA;IACvC,GAAG,CAAC,MAAY,EAAE,OAAgB;QAChC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;YACxB,OAAM;SACP;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE;gBAC5D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACnB;SACF;;YAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAC1C,CAAC;IACD,GAAG,CAAC,MAAY;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnC,qBAAqB;QACrB,IAAI,CAAC,IAAI,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAA;SACnD;QACD,oBAAoB;QACpB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAc,CAAC,CAAC,CAAA;IAClE,CAAC;IACD,IAAI;QACF,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAA;IAC3D,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,SAAS;IACpB,cAAc,CAAgB;IAC9B,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;IAC3B,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA;IACzB,QAAQ,CAAY;IACpB,MAAM,CAAS;IACf,GAAG,CAAS;IACZ,IAAI,CAAgB;IAEpB,YAAY,IAAoB,EAAE,cAA+B;QAC/D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAA;QACrB,IAAI,CAAC,cAAc,GAAG,cAAc;YAClC,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE;YACvB,CAAC,CAAC,IAAI,cAAc,EAAE,CAAA;IAC1B,CAAC;IAED,eAAe,CAAC,MAAY,EAAE,QAAmB;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,MAAM,aAAa,GAAsB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QAEvE,gEAAgE;QAChE,uCAAuC;QAEvC,KAAK,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,aAAa,EAAE;YACtC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;YAE3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAA;YAErE,kCAAkC;YAClC,IAAI,IAAI,EAAE;gBACR,CAAC,GAAG,CAAC,CAAC,OAAO,CACX,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS;oBAC1C,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;oBAChB,CAAC,CAAC,IAAI,CACT,CAAA;gBACD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;gBAC3B,IAAI,CAAC,IAAI,EAAE;oBACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;oBAChC,SAAQ;iBACT;qBAAM;oBACL,OAAO,GAAG,IAAI,CAAA;iBACf;aACF;YAED,IAAI,CAAC,CAAC,QAAQ,EAAE;gBAAE,SAAQ;YAE1B,IAAI,CAAY,CAAA;YAChB,IAAI,IAAoB,CAAA;YACxB,IAAI,OAAO,GAAG,KAAK,CAAA;YACnB,OACE,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,KAAK,QAAQ;gBAC3C,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,EACvB;gBACA,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;gBACtB,CAAC,GAAG,CAAC,CAAA;gBACL,OAAO,GAAG,IAAI,CAAA;gBACd,OAAO,GAAG,IAAI,CAAA;aACf;YACD,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;YACrB,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;YACrB,IAAI,OAAO,EAAE;gBACX,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC;oBAAE,SAAQ;gBACvD,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;aAC5C;YAED,uDAAuD;YACvD,qCAAqC;YACrC,kDAAkD;YAClD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBACzB,mDAAmD;gBACnD,2BAA2B;gBAC3B,MAAM,KAAK,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,CAAA;gBACjD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;gBAC/C,SAAQ;aACT;iBAAM,IAAI,CAAC,KAAK,QAAQ,EAAE;gBACzB,wCAAwC;gBACxC,4CAA4C;gBAC5C,wDAAwD;gBACxD,4DAA4D;gBAC5D,gEAAgE;gBAChE,IACE,CAAC,CAAC,CAAC,cAAc,EAAE;oBACnB,IAAI,CAAC,MAAM;oBACX,OAAO,CAAC,mBAAmB,EAAE,EAC7B;oBACA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBAC9B;gBACD,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAA;gBAC1B,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAA;gBAC1B,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;oBAClD,iDAAiD;oBACjD,6CAA6C;oBAC7C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,GAAG,CAAC,CAAA;iBACvD;qBAAM;oBACL,IAAI,EAAE,KAAK,IAAI,EAAE;wBACf,wDAAwD;wBACxD,wDAAwD;wBACxD,qBAAqB;wBACrB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAA;wBACxB,oBAAoB;wBACpB,IAAI,CAAC,KAAK;4BAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAA;6BAC3C,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE;4BAClD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAA;yBAC7B;qBACF;iBACF;aACF;iBAAM,IAAI,CAAC,YAAY,MAAM,EAAE;gBAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;aAC9B;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC7B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;IACtD,CAAC;IAED,0DAA0D;IAC1D,yCAAyC;IACzC,6CAA6C;IAC7C,2BAA2B;IAC3B,aAAa,CAAC,MAAY,EAAE,OAAe;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QAC1C,yDAAyD;QACzD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,CAAA;QAC5B,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE;YACvB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAA;gBACrC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAA;gBAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAA;gBAC3B,IAAI,CAAC,KAAK,QAAQ,EAAE;oBAClB,OAAO,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACjD;qBAAM,IAAI,CAAC,YAAY,MAAM,EAAE;oBAC9B,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACzC;qBAAM;oBACL,OAAO,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;iBACzC;aACF;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,YAAY,CACV,CAAO,EACP,OAAgB,EAChB,IAAoB,EACpB,QAAiB;QAEjB,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACvC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;gBACtB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;aACrC;YACD,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;gBAClB,2DAA2D;gBAC3D,gEAAgE;gBAChE,+DAA+D;gBAC/D,iEAAiE;gBACjE,uDAAuD;gBACvD,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE;oBACtC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;iBAC9B;qBAAM,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;oBAC7B,IAAI,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,EAAE;wBACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;qBAC3B;yBAAM,IAAI,OAAO,CAAC,kBAAkB,EAAE,EAAE;wBACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAA;qBAC9B;iBACF;aACF;SACF;QACD,sDAAsD;QACtD,YAAY;QACZ,IAAI,IAAI,EAAE;YACR,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;YACzB,IACE,OAAO,EAAE,KAAK,QAAQ;gBACtB,sCAAsC;gBACtC,EAAE,KAAK,IAAI;gBACX,EAAE,KAAK,EAAE;gBACT,EAAE,KAAK,GAAG,EACV;gBACA,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;aAC9C;iBAAM,IAAI,EAAE,KAAK,IAAI,EAAE;gBACtB,qBAAqB;gBACrB,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAA;gBACxB,oBAAoB;gBACpB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;aAC5B;iBAAM,IAAI,EAAE,YAAY,MAAM,EAAE;gBAC/B,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;aAC9C;SACF;IACH,CAAC;IAED,UAAU,CACR,CAAO,EACP,CAAW,EACX,IAAoB,EACpB,QAAiB;QAEjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACrC;aAAM;YACL,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;SAC3B;IACH,CAAC;CACF","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache = hasWalkedCache\n ? hasWalkedCache.copy()\n : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined\n ? this.opts.root\n : root\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts b/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts deleted file mode 100644 index dfbaf9b..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/// -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>; - walkSync(): Matches; -} -export declare class GlobStream extends GlobUtil { - results: O extends GWOFileTypesTrue ? Minipass : O extends GWOFileTypesFalse ? Minipass : O extends GWOFileTypesUnset ? Minipass : Minipass; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts.map b/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts.map deleted file mode 100644 index 7c8df20..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,GAAG;IAC9C,aAAa,EAAE,IAAI,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC/C,aAAa,EAAE,KAAK,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,cAAc,GAAG;IAC/C,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,gBAAgB,GACrE,IAAI,GACJ,CAAC,SAAS,iBAAiB,GAC3B,MAAM,GACN,CAAC,SAAS,iBAAiB,GAC3B,MAAM,GACN,IAAI,GAAG,MAAM,CAAA;AAEjB,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,cAAc,IAAI,CAAC,SAAS,gBAAgB,GACtE,GAAG,CAAC,IAAI,CAAC,GACT,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;AAEtB,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,cAAc,IAC9C,CAAC,SAAS,gBAAgB,GACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;AAY5C;;GAEG;AACH,8BAAsB,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;;IACtE,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAkB;IACjC,MAAM,EAAE,OAAO,CAAQ;IACvB,OAAO,EAAE,OAAO,CAAQ;IAIxB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;gBAEJ,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IA8BpD,KAAK;IAGL,MAAM;IAUN,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG;IAahB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAYpE,cAAc,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS;IAUrE,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS;IAYzD,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IACtC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAE1C,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO;IAsBhC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAKtE,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAK3D,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG;IAOvD,OAAO,CACL,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IA2Cf,OAAO,CACL,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,EAAE,EACf,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IAsBf,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG;IAO3D,WAAW,CACT,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,OAAO,EAAE,EACnB,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;IAqCf,WAAW,CACT,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,EAAE,EACf,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,GAAG;CAoBhB;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,GAAG,CAAC,IAAI,CAAC,GACT,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,CAAC,SAAS,iBAAiB,GAC3B,GAAG,CAAC,MAAM,CAAC,GACX,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,CAAA;gBAEV,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAKpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAKvB,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAiBjC,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC;CAWvB;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,CAAC,SAAS,gBAAgB,GAC/B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,GACpB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,CAAC,SAAS,iBAAiB,GAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,QAAQ,CAAC,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAA;gBAE9B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAM7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/walker.js b/node_modules/npm/node_modules/glob/dist/esm/walker.js deleted file mode 100644 index 6f3358b..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/walker.js +++ /dev/null @@ -1,352 +0,0 @@ -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Ignore } from './ignore.js'; -import { Processor } from './processor.js'; -const makeIgnore = (ignore, opts) => typeof ignore === 'string' - ? new Ignore([ignore], opts) - : Array.isArray(ignore) - ? new Ignore(ignore, opts) - : ignore; -/** - * basic walking utilities that all the glob walker types use - */ -export class GlobUtil { - path; - patterns; - opts; - seen = new Set(); - paused = false; - aborted = false; - #onResume = []; - #ignore; - #sep; - signal; - maxDepth; - constructor(patterns, path, opts) { - this.patterns = patterns; - this.path = path; - this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; - if (opts.ignore) { - this.#ignore = makeIgnore(opts.ignore, opts); - } - // ignore, always set with maxDepth, but it's optional on the - // GlobOptions type - /* c8 ignore start */ - this.maxDepth = opts.maxDepth || Infinity; - /* c8 ignore stop */ - if (opts.signal) { - this.signal = opts.signal; - this.signal.addEventListener('abort', () => { - this.#onResume.length = 0; - }); - } - } - #ignored(path) { - return this.seen.has(path) || !!this.#ignore?.ignored?.(path); - } - #childrenIgnored(path) { - return !!this.#ignore?.childrenIgnored?.(path); - } - // backpressure mechanism - pause() { - this.paused = true; - } - resume() { - /* c8 ignore start */ - if (this.signal?.aborted) - return; - /* c8 ignore stop */ - this.paused = false; - let fn = undefined; - while (!this.paused && (fn = this.#onResume.shift())) { - fn(); - } - } - onResume(fn) { - if (this.signal?.aborted) - return; - /* c8 ignore start */ - if (!this.paused) { - fn(); - } - else { - /* c8 ignore stop */ - this.#onResume.push(fn); - } - } - // do the requisite realpath/stat checking, and return the path - // to add or undefined to filter it out. - async matchCheck(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || (await e.realpath()); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir); - } - matchCheckTest(e, ifDir) { - return e && - (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && - (!ifDir || e.canReaddir()) && - (!this.opts.nodir || !e.isDirectory()) && - !this.#ignored(e) - ? e - : undefined; - } - matchCheckSync(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || e.realpathSync(); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir); - } - matchFinish(e, absolute) { - if (this.#ignored(e)) - return; - const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; - this.seen.add(e); - const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; - // ok, we have what we need! - if (this.opts.withFileTypes) { - this.matchEmit(e); - } - else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); - } - else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); - const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) - ? '.' + this.#sep - : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); - } - } - async match(e, absolute, ifDir) { - const p = await this.matchCheck(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - matchSync(e, absolute, ifDir) { - const p = this.matchCheckSync(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - walkCB(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2(target, patterns, new Processor(this.opts), cb); - } - walkCB2(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const childrenCached = t.readdirCached(); - if (t.calledReaddir()) - this.walkCB3(t, childrenCached, processor, next); - else { - t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); - } - } - next(); - } - walkCB3(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2(target, patterns, processor.child(), next); - } - next(); - } - walkCBSync(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2Sync(target, patterns, new Processor(this.opts), cb); - } - walkCB2Sync(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const children = t.readdirSync(); - this.walkCB3Sync(t, children, processor, next); - } - next(); - } - walkCB3Sync(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2Sync(target, patterns, processor.child(), next); - } - next(); - } -} -export class GlobWalker extends GlobUtil { - matches; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.matches = new Set(); - } - matchEmit(e) { - this.matches.add(e); - } - async walk() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - await this.path.lstat(); - } - await new Promise((res, rej) => { - this.walkCB(this.path, this.patterns, () => { - if (this.signal?.aborted) { - rej(this.signal.reason); - } - else { - res(this.matches); - } - }); - }); - return this.matches; - } - walkSync() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - // nothing for the callback to do, because this never pauses - this.walkCBSync(this.path, this.patterns, () => { - if (this.signal?.aborted) - throw this.signal.reason; - }); - return this.matches; - } -} -export class GlobStream extends GlobUtil { - results; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.results = new Minipass({ - signal: this.signal, - objectMode: true, - }); - this.results.on('drain', () => this.resume()); - this.results.on('resume', () => this.resume()); - } - matchEmit(e) { - this.results.write(e); - if (!this.results.flowing) - this.pause(); - } - stream() { - const target = this.path; - if (target.isUnknown()) { - target.lstat().then(() => { - this.walkCB(target, this.patterns, () => this.results.end()); - }); - } - else { - this.walkCB(target, this.patterns, () => this.results.end()); - } - return this.results; - } - streamSync() { - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - this.walkCBSync(this.path, this.patterns, () => this.results.end()); - return this.results; - } -} -//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/dist/esm/walker.js.map b/node_modules/npm/node_modules/glob/dist/esm/walker.js.map deleted file mode 100644 index 8756bfc..0000000 --- a/node_modules/npm/node_modules/glob/dist/esm/walker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAiE1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ;IACxB,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAC5B,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;QAC1B,CAAC,CAAC,MAAM,CAAA;AAEZ;;GAEG;AACH,MAAM,OAAgB,QAAQ;IAC5B,IAAI,CAAM;IACV,QAAQ,CAAW;IACnB,IAAI,CAAG;IACP,IAAI,GAAc,IAAI,GAAG,EAAQ,CAAA;IACjC,MAAM,GAAY,KAAK,CAAA;IACvB,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAkB,EAAE,CAAA;IAC7B,OAAO,CAAa;IACpB,IAAI,CAAY;IAChB,MAAM,CAAc;IACpB,QAAQ,CAAQ;IAGhB,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAA;QACjE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;SAC7C;QACD,6DAA6D;QAC7D,mBAAmB;QACnB,qBAAqB;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAA;QACzC,oBAAoB;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YACzB,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACzC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAA;YAC3B,CAAC,CAAC,CAAA;SACH;IACH,CAAC;IAED,QAAQ,CAAC,IAAU;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAA;IAC/D,CAAC;IACD,gBAAgB,CAAC,IAAU;QACzB,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;IAED,yBAAyB;IACzB,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;IACpB,CAAC;IACD,MAAM;QACJ,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,OAAM;QAChC,oBAAoB;QACpB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,EAAE,GAA4B,SAAS,CAAA;QAC3C,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE;YACpD,EAAE,EAAE,CAAA;SACL;IACH,CAAC;IACD,QAAQ,CAAC,EAAa;QACpB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,OAAM;QAChC,qBAAqB;QACrB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,EAAE,EAAE,CAAA;SACL;aAAM;YACL,oBAAoB;YACpB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;SACxB;IACH,CAAC;IAED,+DAA+D;IAC/D,wCAAwC;IACxC,KAAK,CAAC,UAAU,CAAC,CAAO,EAAE,KAAc;QACtC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAA;QAC9C,IAAI,GAAqB,CAAA;QACzB,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;YAChD,IAAI,CAAC,GAAG;gBAAE,OAAO,SAAS,CAAA;YAC1B,CAAC,GAAG,GAAG,CAAA;SACR;QACD,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACnE,CAAC;IAED,cAAc,CAAC,CAAmB,EAAE,KAAc;QAChD,OAAO,CAAC;YACN,CAAC,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC;YAC1D,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YAC1B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YACtC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;YACH,CAAC,CAAC,SAAS,CAAA;IACf,CAAC;IAED,cAAc,CAAC,CAAO,EAAE,KAAc;QACpC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAA;QAC9C,IAAI,GAAqB,CAAA;QACzB,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACtB,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,YAAY,EAAE,CAAA;YAC5C,IAAI,CAAC,GAAG;gBAAE,OAAO,SAAS,CAAA;YAC1B,CAAC,GAAG,GAAG,CAAA;SACR;QACD,MAAM,QAAQ,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;QAChD,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACjE,CAAC;IAKD,WAAW,CAAC,CAAO,EAAE,QAAiB;QACpC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAAE,OAAM;QAC5B,MAAM,GAAG,GACP,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAA;QAClE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAChB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;QAC/D,4BAA4B;QAC5B,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;SAClB;aAAM,IAAI,GAAG,EAAE;YACd,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;YAC9D,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;SAC3B;aAAM;YACL,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;YAC9D,MAAM,GAAG,GACP,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACxD,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI;gBACjB,CAAC,CAAC,EAAE,CAAA;YACR,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAA;SACrD;IACH,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,CAAO,EAAE,QAAiB,EAAE,KAAc;QACpD,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,IAAI,CAAC;YAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;IAED,SAAS,CAAC,CAAO,EAAE,QAAiB,EAAE,KAAc;QAClD,MAAM,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACvC,IAAI,CAAC;YAAE,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,MAAY,EAAE,QAAmB,EAAE,EAAa;QACrD,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,oBAAoB;QACpB,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9D,CAAC;IAED,OAAO,CACL,MAAY,EACZ,QAAmB,EACnB,SAAoB,EACpB,EAAa;QAEb,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,EAAE,CAAA;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;YAClE,OAAM;SACP;QACD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3C,qEAAqE;QACrE,4DAA4D;QAC5D,yDAAyD;QACzD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;SAClD;QAED,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC5D,SAAQ;aACT;YACD,KAAK,EAAE,CAAA;YACP,MAAM,cAAc,GAAG,CAAC,CAAC,aAAa,EAAE,CAAA;YACxC,IAAI,CAAC,CAAC,aAAa,EAAE;gBACnB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;iBAC7C;gBACH,CAAC,CAAC,SAAS,CACT,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,EACzD,IAAI,CACL,CAAA;aACF;SACF;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,OAAO,CACL,MAAY,EACZ,OAAe,EACf,SAAoB,EACpB,EAAa;QAEb,SAAS,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAEpD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,CAAA;SAClD;QACD,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7D,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;SACxD;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,UAAU,CAAC,MAAY,EAAE,QAAmB,EAAE,EAAa;QACzD,qBAAqB;QACrB,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,oBAAoB;QACpB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;IAClE,CAAC;IAED,WAAW,CACT,MAAY,EACZ,QAAmB,EACnB,SAAoB,EACpB,EAAa;QAEb,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,EAAE,CAAA;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,EAAE,EAAE,CAAA;QAC9B,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CACjB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,CAClD,CAAA;YACD,OAAM;SACP;QACD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAE3C,qEAAqE;QACrE,4DAA4D;QAC5D,yDAAyD;QACzD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACnC;QAED,KAAK,MAAM,CAAC,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;YAC1C,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE;gBAC5D,SAAQ;aACT;YACD,KAAK,EAAE,CAAA;YACP,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,EAAE,CAAA;YAChC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;SAC/C;QAED,IAAI,EAAE,CAAA;IACR,CAAC;IAED,WAAW,CACT,MAAY,EACZ,OAAe,EACf,SAAoB,EACpB,EAAa;QAEb,SAAS,GAAG,SAAS,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAEpD,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,EAAE,KAAK,KAAK,CAAC;gBAAE,EAAE,EAAE,CAAA;QACzB,CAAC,CAAA;QAED,KAAK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAAE,SAAQ;YAC9B,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;SACnC;QACD,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC7D,KAAK,EAAE,CAAA;YACP,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAA;SAC5D;QAED,IAAI,EAAE,CAAA;IACR,CAAC;CACF;AAED,MAAM,OAAO,UAEX,SAAQ,QAAW;IACnB,OAAO,CAMe;IAEtB,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAgB,CAAA;IACxC,CAAC;IAGD,SAAS,CAAC,CAAgB;QACxB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,IAAI;QACR,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAClD,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;SACxB;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;gBACzC,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE;oBACxB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;iBACxB;qBAAM;oBACL,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;iBAClB;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;YAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QAClD,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,4DAA4D;QAC5D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;YAC7C,IAAI,IAAI,CAAC,MAAM,EAAE,OAAO;gBAAE,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA;QACpD,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAED,MAAM,OAAO,UAEX,SAAQ,QAAW;IACnB,OAAO,CAMmC;IAE1C,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,QAAQ,CAAC;YAC1B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI;SACjB,CAAmB,CAAA;QACpB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAC7C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAChD,CAAC;IAGD,SAAS,CAAC,CAAgB;QACxB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,IAAI,CAAC,KAAK,EAAE,CAAA;IACzC,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAA;QACxB,IAAI,MAAM,CAAC,SAAS,EAAE,EAAE;YACtB,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBACvB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;YAC9D,CAAC,CAAC,CAAA;SACH;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;SAC7D;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;SACtB;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result = O extends GWOFileTypesTrue\n ? Path\n : O extends GWOFileTypesFalse\n ? string\n : O extends GWOFileTypesUnset\n ? string\n : Path | string\n\nexport type Matches = O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\nexport type MatchStream =\n O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts\n): IgnoreLike =>\n typeof ignore === 'string'\n ? new Ignore([ignore], opts)\n : Array.isArray(ignore)\n ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n if (opts.ignore) {\n this.#ignore = makeIgnore(opts.ignore, opts)\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? await e.lstat() : e, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n !this.#ignored(e)\n ? e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n return this.matchCheckTest(needStat ? e.lstatSync() : e, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep)\n ? '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb)\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n matches: O extends GWOFileTypesTrue\n ? Set\n : O extends GWOFileTypesFalse\n ? Set\n : O extends GWOFileTypesUnset\n ? Set\n : Set\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.matches = new Set() as Matches\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.matches.add(e)\n }\n\n async walk(): Promise> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Matches {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts\n> extends GlobUtil {\n results: O extends GWOFileTypesTrue\n ? Minipass\n : O extends GWOFileTypesFalse\n ? Minipass\n : O extends GWOFileTypesUnset\n ? Minipass\n : Minipass\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass({\n signal: this.signal,\n objectMode: true,\n }) as MatchStream\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void\n matchEmit(e: Path | string): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/glob/package.json b/node_modules/npm/node_modules/glob/package.json deleted file mode 100644 index ae0dfae..0000000 --- a/node_modules/npm/node_modules/glob/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (https://blog.izs.me/)", - "name": "glob", - "description": "the most correct and second fastest glob implementation in JavaScript", - "version": "10.3.10", - "type": "module", - "tshy": { - "main": true, - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "bin": "./dist/esm/bin.mjs", - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "files": [ - "dist" - ], - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts", - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts", - "prebench": "npm run prepare", - "bench": "bash benchmark.sh", - "preprof": "npm run prepare", - "prof": "bash prof.sh", - "benchclean": "node benchclean.cjs" - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "devDependencies": { - "@types/node": "^20.3.2", - "memfs": "^3.4.13", - "mkdirp": "^3.0.1", - "prettier": "^2.8.3", - "rimraf": "^5.0.1", - "sync-content": "^1.0.2", - "tap": "^18.1.4", - "tshy": "^1.2.2", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" - }, - "tap": { - "before": "test/00-setup.ts" - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - } -} diff --git a/node_modules/npm/node_modules/graceful-fs/LICENSE b/node_modules/npm/node_modules/graceful-fs/LICENSE deleted file mode 100644 index e906a25..0000000 --- a/node_modules/npm/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/graceful-fs/clone.js b/node_modules/npm/node_modules/graceful-fs/clone.js deleted file mode 100644 index dff3cc8..0000000 --- a/node_modules/npm/node_modules/graceful-fs/clone.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict' - -module.exports = clone - -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} - -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj - - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) - - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - - return copy -} diff --git a/node_modules/npm/node_modules/graceful-fs/graceful-fs.js b/node_modules/npm/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 8d5b89e..0000000 --- a/node_modules/npm/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,448 +0,0 @@ -var fs = require('fs') -var polyfills = require('./polyfills.js') -var legacy = require('./legacy-streams.js') -var clone = require('./clone.js') - -var util = require('util') - -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol - -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} - -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() - } - - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) - - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - require('assert').equal(fs[gracefulQueue].length, 0) - }) - } -} - -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} - -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; -} - -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$writeFile(path, data, options, cb) - - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$appendFile(path, data, options, cb) - - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } - - return go$readdir(path, options, cb) - - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } - - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } - - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) - - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() - - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } - - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } - - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } - - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null - - return go$open(path, flags, mode, cb) - - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } - - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} - -// keep track of the timeout between retry() calls -var retryTimer - -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} - -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - - if (fs[gracefulQueue].length === 0) - return - - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) - } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } -} diff --git a/node_modules/npm/node_modules/graceful-fs/legacy-streams.js b/node_modules/npm/node_modules/graceful-fs/legacy-streams.js deleted file mode 100644 index d617b50..0000000 --- a/node_modules/npm/node_modules/graceful-fs/legacy-streams.js +++ /dev/null @@ -1,118 +0,0 @@ -var Stream = require('stream').Stream - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; - } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } -} diff --git a/node_modules/npm/node_modules/graceful-fs/package.json b/node_modules/npm/node_modules/graceful-fs/package.json deleted file mode 100644 index 87babf0..0000000 --- a/node_modules/npm/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.11", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/node-graceful-fs" - }, - "main": "graceful-fs.js", - "directories": { - "test": "test" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "test": "nyc --silent node test.js | tap -c -", - "posttest": "nyc report" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "ISC", - "devDependencies": { - "import-fresh": "^2.0.0", - "mkdirp": "^0.5.0", - "rimraf": "^2.2.8", - "tap": "^16.3.4" - }, - "files": [ - "fs.js", - "graceful-fs.js", - "legacy-streams.js", - "polyfills.js", - "clone.js" - ], - "tap": { - "reporter": "classic" - } -} diff --git a/node_modules/npm/node_modules/graceful-fs/polyfills.js b/node_modules/npm/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index 453f1a9..0000000 --- a/node_modules/npm/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,355 +0,0 @@ -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) - - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } - - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } - - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } - - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } - } - - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true - - if (er.code === "ENOSYS") - return true - - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - - return false - } -} diff --git a/node_modules/npm/node_modules/has-unicode/LICENSE b/node_modules/npm/node_modules/has-unicode/LICENSE deleted file mode 100644 index d42e25e..0000000 --- a/node_modules/npm/node_modules/has-unicode/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2014, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/npm/node_modules/has-unicode/index.js b/node_modules/npm/node_modules/has-unicode/index.js deleted file mode 100644 index 9b0fe44..0000000 --- a/node_modules/npm/node_modules/has-unicode/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict" -var os = require("os") - -var hasUnicode = module.exports = function () { - // Recent Win32 platforms (>XP) CAN support unicode in the console but - // don't have to, and in non-english locales often use traditional local - // code pages. There's no way, short of windows system calls or execing - // the chcp command line program to figure this out. As such, we default - // this to false and encourage your users to override it via config if - // appropriate. - if (os.type() == "Windows_NT") { return false } - - var isUTF8 = /UTF-?8$/i - var ctype = process.env.LC_ALL || process.env.LC_CTYPE || process.env.LANG - return isUTF8.test(ctype) -} diff --git a/node_modules/npm/node_modules/has-unicode/package.json b/node_modules/npm/node_modules/has-unicode/package.json deleted file mode 100644 index ebe9d76..0000000 --- a/node_modules/npm/node_modules/has-unicode/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "has-unicode", - "version": "2.0.1", - "description": "Try to guess if your terminal supports unicode", - "main": "index.js", - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/iarna/has-unicode" - }, - "keywords": [ - "unicode", - "terminal" - ], - "files": [ - "index.js" - ], - "author": "Rebecca Turner ", - "license": "ISC", - "bugs": { - "url": "https://github.com/iarna/has-unicode/issues" - }, - "homepage": "https://github.com/iarna/has-unicode", - "devDependencies": { - "require-inject": "^1.3.0", - "tap": "^2.3.1" - } -} diff --git a/node_modules/npm/node_modules/hasown/LICENSE b/node_modules/npm/node_modules/hasown/LICENSE deleted file mode 100644 index 0314929..0000000 --- a/node_modules/npm/node_modules/hasown/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/hasown/index.js b/node_modules/npm/node_modules/hasown/index.js deleted file mode 100644 index 3b91618..0000000 --- a/node_modules/npm/node_modules/hasown/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = require('function-bind'); - -/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ -module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/npm/node_modules/hasown/package.json b/node_modules/npm/node_modules/hasown/package.json deleted file mode 100644 index 9545006..0000000 --- a/node_modules/npm/node_modules/hasown/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "hasown", - "version": "2.0.0", - "description": "A robust, ES3 compatible, \"has own property\" predicate.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map", - "emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly", - "pretest": "npm run lint", - "tsc": "tsc -p .", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/hasOwn.git" - }, - "keywords": [ - "has", - "hasOwnProperty", - "hasOwn", - "has-own", - "own", - "has", - "property", - "in", - "javascript", - "ecmascript" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/hasOwn/issues" - }, - "homepage": "https://github.com/inspect-js/hasOwn#readme", - "dependencies": { - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/function-bind": "^1.1.9", - "@types/mock-property": "^1.0.1", - "@types/tape": "^5.6.3", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "mock-property": "^1.0.2", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1", - "typescript": "^5.3.0-dev.20231019" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test", - "!*.d.ts", - "!*.d.ts.map" - ] - } -} diff --git a/node_modules/npm/node_modules/hasown/tsconfig.json b/node_modules/npm/node_modules/hasown/tsconfig.json deleted file mode 100644 index fdab34f..0000000 --- a/node_modules/npm/node_modules/hasown/tsconfig.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ - "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - - /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - "declarationMap": true, /* Create sourcemaps for d.ts files. */ - "noEmit": true, /* Disable emitting files from a compilation. */ - - /* Interop Constraints */ - "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - - /* Completeness */ - //"skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "exclude": [ - "coverage" - ] -} diff --git a/node_modules/npm/node_modules/hosted-git-info/LICENSE b/node_modules/npm/node_modules/hosted-git-info/LICENSE deleted file mode 100644 index 4505576..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015, Rebecca Turner - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/hosted-git-info/lib/from-url.js b/node_modules/npm/node_modules/hosted-git-info/lib/from-url.js deleted file mode 100644 index efc1247..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/lib/from-url.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -const parseUrl = require('./parse-url') - -// look for github shorthand inputs, such as npm/cli -const isGitHubShorthand = (arg) => { - // it cannot contain whitespace before the first # - // it cannot start with a / because that's probably an absolute file path - // but it must include a slash since repos are username/repository - // it cannot start with a . because that's probably a relative file path - // it cannot start with an @ because that's a scoped package if it passes the other tests - // it cannot contain a : before a # because that tells us that there's a protocol - // a second / may not exist before a # - const firstHash = arg.indexOf('#') - const firstSlash = arg.indexOf('/') - const secondSlash = arg.indexOf('/', firstSlash + 1) - const firstColon = arg.indexOf(':') - const firstSpace = /\s/.exec(arg) - const firstAt = arg.indexOf('@') - - const spaceOnlyAfterHash = !firstSpace || (firstHash > -1 && firstSpace.index > firstHash) - const atOnlyAfterHash = firstAt === -1 || (firstHash > -1 && firstAt > firstHash) - const colonOnlyAfterHash = firstColon === -1 || (firstHash > -1 && firstColon > firstHash) - const secondSlashOnlyAfterHash = secondSlash === -1 || (firstHash > -1 && secondSlash > firstHash) - const hasSlash = firstSlash > 0 - // if a # is found, what we really want to know is that the character - // immediately before # is not a / - const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== '/' : !arg.endsWith('/') - const doesNotStartWithDot = !arg.startsWith('.') - - return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && - doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && - secondSlashOnlyAfterHash -} - -module.exports = (giturl, opts, { gitHosts, protocols }) => { - if (!giturl) { - return - } - - const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl - const parsed = parseUrl(correctedUrl, protocols) - if (!parsed) { - return - } - - const gitHostShortcut = gitHosts.byShortcut[parsed.protocol] - const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith('www.') - ? parsed.hostname.slice(4) - : parsed.hostname] - const gitHostName = gitHostShortcut || gitHostDomain - if (!gitHostName) { - return - } - - const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain] - let auth = null - if (protocols[parsed.protocol]?.auth && (parsed.username || parsed.password)) { - auth = `${parsed.username}${parsed.password ? ':' + parsed.password : ''}` - } - - let committish = null - let user = null - let project = null - let defaultRepresentation = null - - try { - if (gitHostShortcut) { - let pathname = parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname - const firstAt = pathname.indexOf('@') - // we ignore auth for shortcuts, so just trim it out - if (firstAt > -1) { - pathname = pathname.slice(firstAt + 1) - } - - const lastSlash = pathname.lastIndexOf('/') - if (lastSlash > -1) { - user = decodeURIComponent(pathname.slice(0, lastSlash)) - // we want nulls only, never empty strings - if (!user) { - user = null - } - project = decodeURIComponent(pathname.slice(lastSlash + 1)) - } else { - project = decodeURIComponent(pathname) - } - - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (parsed.hash) { - committish = decodeURIComponent(parsed.hash.slice(1)) - } - - defaultRepresentation = 'shortcut' - } else { - if (!gitHostInfo.protocols.includes(parsed.protocol)) { - return - } - - const segments = gitHostInfo.extract(parsed) - if (!segments) { - return - } - - user = segments.user && decodeURIComponent(segments.user) - project = decodeURIComponent(segments.project) - committish = decodeURIComponent(segments.committish) - defaultRepresentation = protocols[parsed.protocol]?.name || parsed.protocol.slice(0, -1) - } - } catch (err) { - /* istanbul ignore else */ - if (err instanceof URIError) { - return - } else { - throw err - } - } - - return [gitHostName, user, auth, project, committish, defaultRepresentation, opts] -} diff --git a/node_modules/npm/node_modules/hosted-git-info/lib/hosts.js b/node_modules/npm/node_modules/hosted-git-info/lib/hosts.js deleted file mode 100644 index 6dac685..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/lib/hosts.js +++ /dev/null @@ -1,227 +0,0 @@ -/* eslint-disable max-len */ - -'use strict' - -const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : '' -const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : '' -const formatHashFragment = (f) => f.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-') - -const defaults = { - sshtemplate: ({ domain, user, project, committish }) => - `git@${domain}:${user}/${project}.git${maybeJoin('#', committish)}`, - sshurltemplate: ({ domain, user, project, committish }) => - `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - edittemplate: ({ domain, user, project, committish, editpath, path }) => - `https://${domain}/${user}/${project}${maybeJoin('/', editpath, '/', maybeEncode(committish || 'HEAD'), '/', path)}`, - browsetemplate: ({ domain, user, project, committish, treepath }) => - `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}`, - browsetreetemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => - `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'HEAD')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, - browseblobtemplate: ({ domain, user, project, committish, blobpath, path, fragment, hashformat }) => - `https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish || 'HEAD')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`, - docstemplate: ({ domain, user, project, treepath, committish }) => - `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`, - httpstemplate: ({ auth, domain, user, project, committish }) => - `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - filetemplate: ({ domain, user, project, committish, path }) => - `https://${domain}/${user}/${project}/raw/${maybeEncode(committish || 'HEAD')}/${path}`, - shortcuttemplate: ({ type, user, project, committish }) => - `${type}:${user}/${project}${maybeJoin('#', committish)}`, - pathtemplate: ({ user, project, committish }) => - `${user}/${project}${maybeJoin('#', committish)}`, - bugstemplate: ({ domain, user, project }) => - `https://${domain}/${user}/${project}/issues`, - hashformat: formatHashFragment, -} - -const hosts = {} -hosts.github = { - // First two are insecure and generally shouldn't be used any more, but - // they are still supported. - protocols: ['git:', 'http:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'github.com', - treepath: 'tree', - blobpath: 'blob', - editpath: 'edit', - filetemplate: ({ auth, user, project, committish, path }) => - `https://${maybeJoin(auth, '@')}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish || 'HEAD')}/${path}`, - gittemplate: ({ auth, domain, user, project, committish }) => - `git://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => - `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish || 'HEAD')}`, - extract: (url) => { - let [, user, project, type, committish] = url.pathname.split('/', 5) - if (type && type !== 'tree') { - return - } - - if (!type) { - committish = url.hash.slice(1) - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish } - }, -} - -hosts.bitbucket = { - protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'bitbucket.org', - treepath: 'src', - blobpath: 'src', - editpath: '?mode=edit', - edittemplate: ({ domain, user, project, committish, treepath, path, editpath }) => - `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish || 'HEAD'), '/', path, editpath)}`, - tarballtemplate: ({ domain, user, project, committish }) => - `https://${domain}/${user}/${project}/get/${maybeEncode(committish || 'HEAD')}.tar.gz`, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - if (['get'].includes(aux)) { - return - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -} - -hosts.gitlab = { - protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'gitlab.com', - treepath: 'tree', - blobpath: 'tree', - editpath: '-/edit', - httpstemplate: ({ auth, domain, user, project, committish }) => - `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => - `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish || 'HEAD')}`, - extract: (url) => { - const path = url.pathname.slice(1) - if (path.includes('/-/') || path.includes('/archive.tar.gz')) { - return - } - - const segments = path.split('/') - let project = segments.pop() - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - const user = segments.join('/') - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -} - -hosts.gist = { - protocols: ['git:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'], - domain: 'gist.github.com', - editpath: 'edit', - sshtemplate: ({ domain, project, committish }) => - `git@${domain}:${project}.git${maybeJoin('#', committish)}`, - sshurltemplate: ({ domain, project, committish }) => - `git+ssh://git@${domain}/${project}.git${maybeJoin('#', committish)}`, - edittemplate: ({ domain, user, project, committish, editpath }) => - `https://${domain}/${user}/${project}${maybeJoin('/', maybeEncode(committish))}/${editpath}`, - browsetemplate: ({ domain, project, committish }) => - `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, - browsetreetemplate: ({ domain, project, committish, path, hashformat }) => - `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`, - browseblobtemplate: ({ domain, project, committish, path, hashformat }) => - `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`, - docstemplate: ({ domain, project, committish }) => - `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`, - httpstemplate: ({ domain, project, committish }) => - `git+https://${domain}/${project}.git${maybeJoin('#', committish)}`, - filetemplate: ({ user, project, committish, path }) => - `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin('/', maybeEncode(committish))}/${path}`, - shortcuttemplate: ({ type, project, committish }) => - `${type}:${project}${maybeJoin('#', committish)}`, - pathtemplate: ({ project, committish }) => - `${project}${maybeJoin('#', committish)}`, - bugstemplate: ({ domain, project }) => - `https://${domain}/${project}`, - gittemplate: ({ domain, project, committish }) => - `git://${domain}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ project, committish }) => - `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish || 'HEAD')}`, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - if (aux === 'raw') { - return - } - - if (!project) { - if (!user) { - return - } - - project = user - user = null - } - - if (project.endsWith('.git')) { - project = project.slice(0, -4) - } - - return { user, project, committish: url.hash.slice(1) } - }, - hashformat: function (fragment) { - return fragment && 'file-' + formatHashFragment(fragment) - }, -} - -hosts.sourcehut = { - protocols: ['git+ssh:', 'https:'], - domain: 'git.sr.ht', - treepath: 'tree', - blobpath: 'tree', - filetemplate: ({ domain, user, project, committish, path }) => - `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'HEAD'}/${path}`, - httpstemplate: ({ domain, user, project, committish }) => - `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`, - tarballtemplate: ({ domain, user, project, committish }) => - `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'HEAD'}.tar.gz`, - bugstemplate: ({ user, project }) => null, - extract: (url) => { - let [, user, project, aux] = url.pathname.split('/', 4) - - // tarball url - if (['archive'].includes(aux)) { - return - } - - if (project && project.endsWith('.git')) { - project = project.slice(0, -4) - } - - if (!user || !project) { - return - } - - return { user, project, committish: url.hash.slice(1) } - }, -} - -for (const [name, host] of Object.entries(hosts)) { - hosts[name] = Object.assign({}, defaults, host) -} - -module.exports = hosts diff --git a/node_modules/npm/node_modules/hosted-git-info/lib/index.js b/node_modules/npm/node_modules/hosted-git-info/lib/index.js deleted file mode 100644 index 0c9d0b0..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/lib/index.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict' - -const { LRUCache } = require('lru-cache') -const hosts = require('./hosts.js') -const fromUrl = require('./from-url.js') -const parseUrl = require('./parse-url.js') - -const cache = new LRUCache({ max: 1000 }) - -class GitHost { - constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) { - Object.assign(this, GitHost.#gitHosts[type], { - type, - user, - auth, - project, - committish, - default: defaultRepresentation, - opts, - }) - } - - static #gitHosts = { byShortcut: {}, byDomain: {} } - static #protocols = { - 'git+ssh:': { name: 'sshurl' }, - 'ssh:': { name: 'sshurl' }, - 'git+https:': { name: 'https', auth: true }, - 'git:': { auth: true }, - 'http:': { auth: true }, - 'https:': { auth: true }, - 'git+http:': { auth: true }, - } - - static addHost (name, host) { - GitHost.#gitHosts[name] = host - GitHost.#gitHosts.byDomain[host.domain] = name - GitHost.#gitHosts.byShortcut[`${name}:`] = name - GitHost.#protocols[`${name}:`] = { name } - } - - static fromUrl (giturl, opts) { - if (typeof giturl !== 'string') { - return - } - - const key = giturl + JSON.stringify(opts || {}) - - if (!cache.has(key)) { - const hostArgs = fromUrl(giturl, opts, { - gitHosts: GitHost.#gitHosts, - protocols: GitHost.#protocols, - }) - cache.set(key, hostArgs ? new GitHost(...hostArgs) : undefined) - } - - return cache.get(key) - } - - static parseUrl (url) { - return parseUrl(url) - } - - #fill (template, opts) { - if (typeof template !== 'function') { - return null - } - - const options = { ...this, ...this.opts, ...opts } - - // the path should always be set so we don't end up with 'undefined' in urls - if (!options.path) { - options.path = '' - } - - // template functions will insert the leading slash themselves - if (options.path.startsWith('/')) { - options.path = options.path.slice(1) - } - - if (options.noCommittish) { - options.committish = null - } - - const result = template(options) - return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result - } - - hash () { - return this.committish ? `#${this.committish}` : '' - } - - ssh (opts) { - return this.#fill(this.sshtemplate, opts) - } - - sshurl (opts) { - return this.#fill(this.sshurltemplate, opts) - } - - browse (path, ...args) { - // not a string, treat path as opts - if (typeof path !== 'string') { - return this.#fill(this.browsetemplate, path) - } - - if (typeof args[0] !== 'string') { - return this.#fill(this.browsetreetemplate, { ...args[0], path }) - } - - return this.#fill(this.browsetreetemplate, { ...args[1], fragment: args[0], path }) - } - - // If the path is known to be a file, then browseFile should be used. For some hosts - // the url is the same as browse, but for others like GitHub a file can use both `/tree/` - // and `/blob/` in the path. When using a default committish of `HEAD` then the `/tree/` - // path will redirect to a specific commit. Using the `/blob/` path avoids this and - // does not redirect to a different commit. - browseFile (path, ...args) { - if (typeof args[0] !== 'string') { - return this.#fill(this.browseblobtemplate, { ...args[0], path }) - } - - return this.#fill(this.browseblobtemplate, { ...args[1], fragment: args[0], path }) - } - - docs (opts) { - return this.#fill(this.docstemplate, opts) - } - - bugs (opts) { - return this.#fill(this.bugstemplate, opts) - } - - https (opts) { - return this.#fill(this.httpstemplate, opts) - } - - git (opts) { - return this.#fill(this.gittemplate, opts) - } - - shortcut (opts) { - return this.#fill(this.shortcuttemplate, opts) - } - - path (opts) { - return this.#fill(this.pathtemplate, opts) - } - - tarball (opts) { - return this.#fill(this.tarballtemplate, { ...opts, noCommittish: false }) - } - - file (path, opts) { - return this.#fill(this.filetemplate, { ...opts, path }) - } - - edit (path, opts) { - return this.#fill(this.edittemplate, { ...opts, path }) - } - - getDefaultRepresentation () { - return this.default - } - - toString (opts) { - if (this.default && typeof this[this.default] === 'function') { - return this[this.default](opts) - } - - return this.sshurl(opts) - } -} - -for (const [name, host] of Object.entries(hosts)) { - GitHost.addHost(name, host) -} - -module.exports = GitHost diff --git a/node_modules/npm/node_modules/hosted-git-info/lib/parse-url.js b/node_modules/npm/node_modules/hosted-git-info/lib/parse-url.js deleted file mode 100644 index 7d5489c..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/lib/parse-url.js +++ /dev/null @@ -1,78 +0,0 @@ -const url = require('url') - -const lastIndexOfBefore = (str, char, beforeChar) => { - const startPosition = str.indexOf(beforeChar) - return str.lastIndexOf(char, startPosition > -1 ? startPosition : Infinity) -} - -const safeUrl = (u) => { - try { - return new url.URL(u) - } catch { - // this fn should never throw - } -} - -// accepts input like git:github.com:user/repo and inserts the // after the first : -const correctProtocol = (arg, protocols) => { - const firstColon = arg.indexOf(':') - const proto = arg.slice(0, firstColon + 1) - if (Object.prototype.hasOwnProperty.call(protocols, proto)) { - return arg - } - - const firstAt = arg.indexOf('@') - if (firstAt > -1) { - if (firstAt > firstColon) { - return `git+ssh://${arg}` - } else { - return arg - } - } - - const doubleSlash = arg.indexOf('//') - if (doubleSlash === firstColon + 1) { - return arg - } - - return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}` -} - -// attempt to correct an scp style url so that it will parse with `new URL()` -const correctUrl = (giturl) => { - // ignore @ that come after the first hash since the denotes the start - // of a committish which can contain @ characters - const firstAt = lastIndexOfBefore(giturl, '@', '#') - // ignore colons that come after the hash since that could include colons such as: - // git@github.com:user/package-2#semver:^1.0.0 - const lastColonBeforeHash = lastIndexOfBefore(giturl, ':', '#') - - if (lastColonBeforeHash > firstAt) { - // the last : comes after the first @ (or there is no @) - // like it would in: - // proto://hostname.com:user/repo - // username@hostname.com:user/repo - // :password@hostname.com:user/repo - // username:password@hostname.com:user/repo - // proto://username@hostname.com:user/repo - // proto://:password@hostname.com:user/repo - // proto://username:password@hostname.com:user/repo - // then we replace the last : with a / to create a valid path - giturl = giturl.slice(0, lastColonBeforeHash) + '/' + giturl.slice(lastColonBeforeHash + 1) - } - - if (lastIndexOfBefore(giturl, ':', '#') === -1 && giturl.indexOf('//') === -1) { - // we have no : at all - // as it would be in: - // username@hostname.com/user/repo - // then we prepend a protocol - giturl = `git+ssh://${giturl}` - } - - return giturl -} - -module.exports = (giturl, protocols) => { - const withProtocol = protocols ? correctProtocol(giturl, protocols) : giturl - return safeUrl(withProtocol) || safeUrl(correctUrl(withProtocol)) -} diff --git a/node_modules/npm/node_modules/hosted-git-info/package.json b/node_modules/npm/node_modules/hosted-git-info/package.json deleted file mode 100644 index c2e31fa..0000000 --- a/node_modules/npm/node_modules/hosted-git-info/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "hosted-git-info", - "version": "7.0.1", - "description": "Provides metadata and conversions from repository urls for GitHub, Bitbucket and GitLab", - "main": "./lib/index.js", - "repository": { - "type": "git", - "url": "https://github.com/npm/hosted-git-info.git" - }, - "keywords": [ - "git", - "github", - "bitbucket", - "gitlab" - ], - "author": "GitHub Inc.", - "license": "ISC", - "bugs": { - "url": "https://github.com/npm/hosted-git-info/issues" - }, - "homepage": "https://github.com/npm/hosted-git-info", - "scripts": { - "posttest": "npm run lint", - "snap": "tap", - "test": "tap", - "test:coverage": "tap --coverage-report=html", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "template-oss-apply": "template-oss-apply --force" - }, - "dependencies": { - "lru-cache": "^10.0.1" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "tap": "^16.0.1" - }, - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "tap": { - "color": 1, - "coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": "true", - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ] - } -} diff --git a/node_modules/npm/node_modules/http-cache-semantics/LICENSE b/node_modules/npm/node_modules/http-cache-semantics/LICENSE deleted file mode 100644 index 493d2ea..0000000 --- a/node_modules/npm/node_modules/http-cache-semantics/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2016-2018 Kornel Lesiński - -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. - -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. diff --git a/node_modules/npm/node_modules/http-cache-semantics/index.js b/node_modules/npm/node_modules/http-cache-semantics/index.js deleted file mode 100644 index 31fba48..0000000 --- a/node_modules/npm/node_modules/http-cache-semantics/index.js +++ /dev/null @@ -1,674 +0,0 @@ -'use strict'; -// rfc7231 6.1 -const statusCodeCacheableByDefault = new Set([ - 200, - 203, - 204, - 206, - 300, - 301, - 308, - 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(/,/); - for (const part of parts) { - const [k, v] = part.split(/=/, 2); - cc[k.trim()] = v === undefined ? true : v.trim().replace(/^"|"$/g, ''); - } - - 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, - }; - } -}; diff --git a/node_modules/npm/node_modules/http-cache-semantics/package.json b/node_modules/npm/node_modules/http-cache-semantics/package.json deleted file mode 100644 index defbb04..0000000 --- a/node_modules/npm/node_modules/http-cache-semantics/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "http-cache-semantics", - "version": "4.1.1", - "description": "Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies", - "repository": "https://github.com/kornelski/http-cache-semantics.git", - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "files": [ - "index.js" - ], - "author": "Kornel Lesiński (https://kornel.ski/)", - "license": "BSD-2-Clause", - "devDependencies": { - "mocha": "^10.0" - } -} diff --git a/node_modules/npm/node_modules/http-proxy-agent/LICENSE b/node_modules/npm/node_modules/http-proxy-agent/LICENSE deleted file mode 100644 index aad1405..0000000 --- a/node_modules/npm/node_modules/http-proxy-agent/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -License -------- - -(The MIT License) - -Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/http-proxy-agent/dist/index.js b/node_modules/npm/node_modules/http-proxy-agent/dist/index.js deleted file mode 100644 index 4a7daf6..0000000 --- a/node_modules/npm/node_modules/http-proxy-agent/dist/index.js +++ /dev/null @@ -1,147 +0,0 @@ -"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.HttpProxyAgent = void 0; -const net = __importStar(require("net")); -const tls = __importStar(require("tls")); -const debug_1 = __importDefault(require("debug")); -const events_1 = require("events"); -const agent_base_1 = require("agent-base"); -const debug = (0, debug_1.default)('http-proxy-agent'); -/** - * The `HttpProxyAgent` implements an HTTP Agent subclass that connects - * to the specified "HTTP proxy server" in order to proxy HTTP requests. - */ -class HttpProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.proxy = typeof proxy === 'string' ? new URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - addRequest(req, opts) { - req._header = null; - this.setRequestProps(req, opts); - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - super.addRequest(req, opts); - } - setRequestProps(req, opts) { - const { proxy } = this; - const protocol = opts.secureEndpoint ? 'https:' : 'http:'; - const hostname = req.getHeader('host') || 'localhost'; - const base = `${protocol}//${hostname}`; - const url = new URL(req.path, base); - if (opts.port !== 80) { - url.port = String(opts.port); - } - // Change the `http.ClientRequest` instance's "path" field - // to the absolute path of the URL that will be requested. - req.path = String(url); - // Inject the `Proxy-Authorization` header if necessary. - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - const value = headers[name]; - if (value) { - req.setHeader(name, value); - } - } - } - async connect(req, opts) { - req._header = null; - if (!req.path.includes('://')) { - this.setRequestProps(req, opts); - } - // At this point, the http ClientRequest's internal `_header` field - // might have already been set. If this is the case then we'll need - // to re-generate the string since we just changed the `req.path`. - let first; - let endOfHeaders; - debug('Regenerating stored HTTP header string for request'); - req._implicitHeader(); - if (req.outputData && req.outputData.length > 0) { - debug('Patching connection write() output buffer with updated header'); - first = req.outputData[0].data; - endOfHeaders = first.indexOf('\r\n\r\n') + 4; - req.outputData[0].data = - req._header + first.substring(endOfHeaders); - debug('Output buffer: %o', req.outputData[0].data); - } - // Create a socket connection to the proxy server. - let socket; - if (this.proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(this.connectOpts); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - // Wait for the socket's `connect` event, so that this `callback()` - // function throws instead of the `http` request machinery. This is - // important for i.e. `PacProxyAgent` which determines a failed proxy - // connection via the `callback()` function throwing. - await (0, events_1.once)(socket, 'connect'); - return socket; - } -} -HttpProxyAgent.protocols = ['http', 'https']; -exports.HttpProxyAgent = HttpProxyAgent; -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/http-proxy-agent/package.json b/node_modules/npm/node_modules/http-proxy-agent/package.json deleted file mode 100644 index 08c650c..0000000 --- a/node_modules/npm/node_modules/http-proxy-agent/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "http-proxy-agent", - "version": "7.0.0", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTP", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "https://github.com/TooTallNate/proxy-agents.git", - "directory": "packages/http-proxy-agent" - }, - "keywords": [ - "http", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "devDependencies": { - "@types/debug": "^4.1.7", - "@types/jest": "^29.5.1", - "@types/node": "^14.18.45", - "async-listen": "^3.0.0", - "jest": "^29.5.0", - "ts-jest": "^29.1.0", - "typescript": "^5.0.4", - "proxy": "2.1.1", - "tsconfig": "0.0.0" - }, - "engines": { - "node": ">= 14" - }, - "scripts": { - "build": "tsc", - "test": "jest --env node --verbose --bail", - "lint": "eslint . --ext .ts", - "pack": "node ../../scripts/pack.mjs" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/https-proxy-agent/dist/index.js b/node_modules/npm/node_modules/https-proxy-agent/dist/index.js deleted file mode 100644 index 978af03..0000000 --- a/node_modules/npm/node_modules/https-proxy-agent/dist/index.js +++ /dev/null @@ -1,174 +0,0 @@ -"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.HttpsProxyAgent = void 0; -const net = __importStar(require("net")); -const tls = __importStar(require("tls")); -const assert_1 = __importDefault(require("assert")); -const debug_1 = __importDefault(require("debug")); -const agent_base_1 = require("agent-base"); -const parse_proxy_response_1 = require("./parse-proxy-response"); -const debug = (0, debug_1.default)('https-proxy-agent'); -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - */ -class HttpsProxyAgent extends agent_base_1.Agent { - constructor(proxy, opts) { - super(opts); - this.options = { path: undefined }; - this.proxy = typeof proxy === 'string' ? new URL(proxy) : proxy; - this.proxyHeaders = opts?.headers ?? {}; - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port - ? parseInt(this.proxy.port, 10) - : this.proxy.protocol === 'https:' - ? 443 - : 80; - this.connectOpts = { - // Attempt to negotiate http/1.1 for proxy servers that support http/2 - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - */ - async connect(req, opts) { - const { proxy } = this; - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - // Create a socket connection to the proxy server. - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - const servername = this.connectOpts.servername || this.connectOpts.host; - socket = tls.connect({ - ...this.connectOpts, - servername: servername && net.isIP(servername) ? undefined : servername - }); - } - else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - const headers = typeof this.proxyHeaders === 'function' - ? this.proxyHeaders() - : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - headers.Host = `${host}:${opts.port}`; - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive - ? 'Keep-Alive' - : 'close'; - } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket); - socket.write(`${payload}\r\n`); - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - this.emit('proxyConnect', connect, req); - if (connect.statusCode === 200) { - req.once('socket', resume); - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls.connect({ - ...omit(opts, 'host', 'path', 'port'), - socket, - servername: net.isIP(servername) ? undefined : servername, - }); - } - return socket; - } - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - const fakeSocket = new net.Socket({ writable: false }); - fakeSocket.readable = true; - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('Replaying proxy buffer for failed request'); - (0, assert_1.default)(s.listenerCount('data') > 0); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - return fakeSocket; - } -} -HttpsProxyAgent.protocols = ['http', 'https']; -exports.HttpsProxyAgent = HttpsProxyAgent; -function resume(socket) { - socket.resume(); -} -function omit(obj, ...keys) { - const ret = {}; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } - } - return ret; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/node_modules/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js deleted file mode 100644 index d3f506f..0000000 --- a/node_modules/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseProxyResponse = void 0; -const debug_1 = __importDefault(require("debug")); -const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response'); -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - function read() { - const b = socket.read(); - if (b) - ondata(b); - else - socket.once('readable', read); - } - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('readable', read); - } - function onend() { - cleanup(); - debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); - } - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - const headerParts = buffered - .slice(0, endOfHeaders) - .toString('ascii') - .split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) - continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } - else if (Array.isArray(current)) { - current.push(value); - } - else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); - resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, - }); - } - socket.on('error', onerror); - socket.on('end', onend); - read(); - }); -} -exports.parseProxyResponse = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/https-proxy-agent/package.json b/node_modules/npm/node_modules/https-proxy-agent/package.json deleted file mode 100644 index 07c04f8..0000000 --- a/node_modules/npm/node_modules/https-proxy-agent/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "https-proxy-agent", - "version": "7.0.2", - "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "https://github.com/TooTallNate/proxy-agents.git", - "directory": "packages/https-proxy-agent" - }, - "keywords": [ - "https", - "proxy", - "endpoint", - "agent" - ], - "author": "Nathan Rajlich (http://n8.io/)", - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "devDependencies": { - "@types/async-retry": "^1.4.5", - "@types/debug": "4", - "@types/jest": "^29.5.1", - "@types/node": "^14.18.45", - "async-listen": "^3.0.0", - "async-retry": "^1.3.3", - "jest": "^29.5.0", - "ts-jest": "^29.1.0", - "typescript": "^5.0.4", - "proxy": "2.1.1", - "tsconfig": "0.0.0" - }, - "engines": { - "node": ">= 14" - }, - "scripts": { - "build": "tsc", - "test": "jest --env node --verbose --bail test/test.ts", - "test-e2e": "jest --env node --verbose --bail test/e2e.test.ts", - "lint": "eslint --ext .ts", - "pack": "node ../../scripts/pack.mjs" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/iconv-lite/LICENSE b/node_modules/npm/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d83..0000000 --- a/node_modules/npm/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index fa83917..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,597 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } - } - return hasValues; -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 | (uCode & 0x3FF); - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); - - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } - - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 0d17e58..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [ - // 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', -}; diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/index.js b/node_modules/npm/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index d95c244..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf32"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/internal.js b/node_modules/npm/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index dc1074f..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,198 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} - -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ff..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index 066f904..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,179 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆЪĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index b742e36..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,56 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc","ḿ"], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/npm/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/utf16.js b/node_modules/npm/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 97d0669..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,197 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.end(); -} - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/utf32.js b/node_modules/npm/node_modules/iconv-lite/encodings/utf32.js deleted file mode 100644 index 2fa900a..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/utf32.js +++ /dev/null @@ -1,319 +0,0 @@ -'use strict'; - -var Buffer = require('safer-buffer').Buffer; - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec; - -function Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} - -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; - -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; - -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; - -// -- Encoding - -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} - -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - - continue; - } - } - - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; - } - } - - if (offset < dst.length) - dst = dst.slice(0, offset); - - return dst; -}; - -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; - - var buf = Buffer.alloc(4); - - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); - - this.highSurrogate = 0; - - return buf; -}; - -// -- Decoding - -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} - -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; - - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); - } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); - } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; - - return offset; -}; - -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; - -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} - -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; - -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; - -// -- Decoding - -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -}; - -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.end(); -}; - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} diff --git a/node_modules/npm/node_modules/iconv-lite/encodings/utf7.js b/node_modules/npm/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index eacae34..0000000 --- a/node_modules/npm/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/node_modules/npm/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/npm/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872..0000000 --- a/node_modules/npm/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/node_modules/npm/node_modules/iconv-lite/lib/index.js b/node_modules/npm/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 657701c..0000000 --- a/node_modules/npm/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(stream_module); - - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = require("stream"); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; -} - -if ("Ā" != "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/node_modules/npm/node_modules/iconv-lite/lib/streams.js b/node_modules/npm/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index a150648..0000000 --- a/node_modules/npm/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -var Buffer = require("safer-buffer").Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; diff --git a/node_modules/npm/node_modules/iconv-lite/package.json b/node_modules/npm/node_modules/iconv-lite/package.json deleted file mode 100644 index d351115..0000000 --- a/node_modules/npm/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.6.3", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin ", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "coverage": "c8 _mocha --grep .", - "test": "mocha --reporter spec --grep ." - }, - "browser": { - "stream": false - }, - "devDependencies": { - "async": "^3.2.0", - "c8": "^7.2.0", - "errto": "^0.2.1", - "iconv": "^2.3.5", - "mocha": "^3.5.3", - "request": "^2.88.2", - "semver": "^6.3.0", - "unorm": "^1.6.0" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } -} diff --git a/node_modules/npm/node_modules/ieee754/LICENSE b/node_modules/npm/node_modules/ieee754/LICENSE deleted file mode 100644 index 5aac82c..0000000 --- a/node_modules/npm/node_modules/ieee754/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2008 Fair Oaks Labs, Inc. - -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. diff --git a/node_modules/npm/node_modules/ieee754/index.js b/node_modules/npm/node_modules/ieee754/index.js deleted file mode 100644 index 81d26c3..0000000 --- a/node_modules/npm/node_modules/ieee754/index.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} diff --git a/node_modules/npm/node_modules/ieee754/package.json b/node_modules/npm/node_modules/ieee754/package.json deleted file mode 100644 index 7b23851..0000000 --- a/node_modules/npm/node_modules/ieee754/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ieee754", - "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", - "version": "1.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "contributors": [ - "Romain Beauxis " - ], - "devDependencies": { - "airtap": "^3.0.0", - "standard": "*", - "tape": "^5.0.1" - }, - "keywords": [ - "IEEE 754", - "buffer", - "convert", - "floating point", - "ieee754" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/ieee754.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/npm/node_modules/ignore-walk/LICENSE b/node_modules/npm/node_modules/ignore-walk/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/ignore-walk/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/ignore-walk/lib/index.js b/node_modules/npm/node_modules/ignore-walk/lib/index.js deleted file mode 100644 index ad3aecc..0000000 --- a/node_modules/npm/node_modules/ignore-walk/lib/index.js +++ /dev/null @@ -1,310 +0,0 @@ -'use strict' - -const fs = require('fs') -const path = require('path') -const EE = require('events').EventEmitter -const Minimatch = require('minimatch').Minimatch - -class Walker extends EE { - constructor (opts) { - opts = opts || {} - super(opts) - // set to true if this.path is a symlink, whether follow is true or not - this.isSymbolicLink = opts.isSymbolicLink - this.path = opts.path || process.cwd() - this.basename = path.basename(this.path) - this.ignoreFiles = opts.ignoreFiles || ['.ignore'] - this.ignoreRules = {} - this.parent = opts.parent || null - this.includeEmpty = !!opts.includeEmpty - this.root = this.parent ? this.parent.root : this.path - this.follow = !!opts.follow - this.result = this.parent ? this.parent.result : new Set() - this.entries = null - this.sawError = false - this.exact = opts.exact - } - - sort (a, b) { - return a.localeCompare(b, 'en') - } - - emit (ev, data) { - let ret = false - if (!(this.sawError && ev === 'error')) { - if (ev === 'error') { - this.sawError = true - } else if (ev === 'done' && !this.parent) { - data = Array.from(data) - .map(e => /^@/.test(e) ? `./${e}` : e).sort(this.sort) - this.result = data - } - - if (ev === 'error' && this.parent) { - ret = this.parent.emit('error', data) - } else { - ret = super.emit(ev, data) - } - } - return ret - } - - start () { - fs.readdir(this.path, (er, entries) => - er ? this.emit('error', er) : this.onReaddir(entries)) - return this - } - - isIgnoreFile (e) { - return e !== '.' && - e !== '..' && - this.ignoreFiles.indexOf(e) !== -1 - } - - onReaddir (entries) { - this.entries = entries - if (entries.length === 0) { - if (this.includeEmpty) { - this.result.add(this.path.slice(this.root.length + 1)) - } - this.emit('done', this.result) - } else { - const hasIg = this.entries.some(e => - this.isIgnoreFile(e)) - - if (hasIg) { - this.addIgnoreFiles() - } else { - this.filterEntries() - } - } - } - - addIgnoreFiles () { - const newIg = this.entries - .filter(e => this.isIgnoreFile(e)) - - let igCount = newIg.length - const then = _ => { - if (--igCount === 0) { - this.filterEntries() - } - } - - newIg.forEach(e => this.addIgnoreFile(e, then)) - } - - addIgnoreFile (file, then) { - const ig = path.resolve(this.path, file) - fs.readFile(ig, 'utf8', (er, data) => - er ? this.emit('error', er) : this.onReadIgnoreFile(file, data, then)) - } - - onReadIgnoreFile (file, data, then) { - const mmopt = { - matchBase: true, - dot: true, - flipNegate: true, - nocase: true, - } - const rules = data.split(/\r?\n/) - .filter(line => !/^#|^$/.test(line.trim())) - .map(rule => { - return new Minimatch(rule.trim(), mmopt) - }) - - this.ignoreRules[file] = rules - - then() - } - - filterEntries () { - // at this point we either have ignore rules, or just inheriting - // this exclusion is at the point where we know the list of - // entries in the dir, but don't know what they are. since - // some of them *might* be directories, we have to run the - // match in dir-mode as well, so that we'll pick up partials - // of files that will be included later. Anything included - // at this point will be checked again later once we know - // what it is. - const filtered = this.entries.map(entry => { - // at this point, we don't know if it's a dir or not. - const passFile = this.filterEntry(entry) - const passDir = this.filterEntry(entry, true) - return (passFile || passDir) ? [entry, passFile, passDir] : false - }).filter(e => e) - - // now we stat them all - // if it's a dir, and passes as a dir, then recurse - // if it's not a dir, but passes as a file, add to set - let entryCount = filtered.length - if (entryCount === 0) { - this.emit('done', this.result) - } else { - const then = _ => { - if (--entryCount === 0) { - this.emit('done', this.result) - } - } - filtered.forEach(filt => { - const entry = filt[0] - const file = filt[1] - const dir = filt[2] - this.stat({ entry, file, dir }, then) - }) - } - } - - onstat ({ st, entry, file, dir, isSymbolicLink }, then) { - const abs = this.path + '/' + entry - if (!st.isDirectory()) { - if (file) { - this.result.add(abs.slice(this.root.length + 1)) - } - then() - } else { - // is a directory - if (dir) { - this.walker(entry, { isSymbolicLink, exact: file || this.filterEntry(entry + '/') }, then) - } else { - then() - } - } - } - - stat ({ entry, file, dir }, then) { - const abs = this.path + '/' + entry - fs.lstat(abs, (lstatErr, lstatResult) => { - if (lstatErr) { - this.emit('error', lstatErr) - } else { - const isSymbolicLink = lstatResult.isSymbolicLink() - if (this.follow && isSymbolicLink) { - fs.stat(abs, (statErr, statResult) => { - if (statErr) { - this.emit('error', statErr) - } else { - this.onstat({ st: statResult, entry, file, dir, isSymbolicLink }, then) - } - }) - } else { - this.onstat({ st: lstatResult, entry, file, dir, isSymbolicLink }, then) - } - } - }) - } - - walkerOpt (entry, opts) { - return { - path: this.path + '/' + entry, - parent: this, - ignoreFiles: this.ignoreFiles, - follow: this.follow, - includeEmpty: this.includeEmpty, - ...opts, - } - } - - walker (entry, opts, then) { - new Walker(this.walkerOpt(entry, opts)).on('done', then).start() - } - - filterEntry (entry, partial, entryBasename) { - let included = true - - // this = /a/b/c - // entry = d - // parent /a/b sees c/d - if (this.parent && this.parent.filterEntry) { - const parentEntry = this.basename + '/' + entry - const parentBasename = entryBasename || entry - included = this.parent.filterEntry(parentEntry, partial, parentBasename) - if (!included && !this.exact) { - return false - } - } - - this.ignoreFiles.forEach(f => { - if (this.ignoreRules[f]) { - this.ignoreRules[f].forEach(rule => { - // negation means inclusion - // so if it's negated, and already included, no need to check - // likewise if it's neither negated nor included - if (rule.negate !== included) { - const isRelativeRule = entryBasename && rule.globParts.some(part => - part.length <= (part.slice(-1)[0] ? 1 : 2) - ) - - // first, match against /foo/bar - // then, against foo/bar - // then, in the case of partials, match with a / - // then, if also the rule is relative, match against basename - const match = rule.match('/' + entry) || - rule.match(entry) || - !!partial && ( - rule.match('/' + entry + '/') || - rule.match(entry + '/') || - rule.negate && ( - rule.match('/' + entry, true) || - rule.match(entry, true)) || - isRelativeRule && ( - rule.match('/' + entryBasename + '/') || - rule.match(entryBasename + '/') || - rule.negate && ( - rule.match('/' + entryBasename, true) || - rule.match(entryBasename, true)))) - - if (match) { - included = rule.negate - } - } - }) - } - }) - - return included - } -} - -class WalkerSync extends Walker { - start () { - this.onReaddir(fs.readdirSync(this.path)) - return this - } - - addIgnoreFile (file, then) { - const ig = path.resolve(this.path, file) - this.onReadIgnoreFile(file, fs.readFileSync(ig, 'utf8'), then) - } - - stat ({ entry, file, dir }, then) { - const abs = this.path + '/' + entry - let st = fs.lstatSync(abs) - const isSymbolicLink = st.isSymbolicLink() - if (this.follow && isSymbolicLink) { - st = fs.statSync(abs) - } - - // console.error('STAT SYNC', {st, entry, file, dir, isSymbolicLink, then}) - this.onstat({ st, entry, file, dir, isSymbolicLink }, then) - } - - walker (entry, opts, then) { - new WalkerSync(this.walkerOpt(entry, opts)).start() - then() - } -} - -const walk = (opts, callback) => { - const p = new Promise((resolve, reject) => { - new Walker(opts).on('done', resolve).on('error', reject).start() - }) - return callback ? p.then(res => callback(null, res), callback) : p -} - -const walkSync = opts => new WalkerSync(opts).start().result - -module.exports = walk -walk.sync = walkSync -walk.Walker = Walker -walk.WalkerSync = WalkerSync diff --git a/node_modules/npm/node_modules/ignore-walk/package.json b/node_modules/npm/node_modules/ignore-walk/package.json deleted file mode 100644 index cebd479..0000000 --- a/node_modules/npm/node_modules/ignore-walk/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "ignore-walk", - "version": "6.0.4", - "description": "Nested/recursive `.gitignore`/`.npmignore` parsing and filtering.", - "main": "lib/index.js", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.19.0", - "mutate-fs": "^2.1.1", - "tap": "^16.0.1" - }, - "scripts": { - "test": "tap", - "posttest": "npm run lint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "test:windows-coverage": "npm pkg set tap.statements=99 --json && npm pkg set tap.branches=98 --json && npm pkg set tap.lines=99 --json", - "snap": "tap" - }, - "keywords": [ - "ignorefile", - "ignore", - "file", - ".gitignore", - ".npmignore", - "glob" - ], - "author": "GitHub Inc.", - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/ignore-walk.git" - }, - "files": [ - "bin/", - "lib/" - ], - "dependencies": { - "minimatch": "^9.0.0" - }, - "tap": { - "test-env": "LC_ALL=sk", - "before": "test/00-setup.js", - "after": "test/zz-cleanup.js", - "timeout": 600, - "jobs": 1, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.19.0", - "content": "scripts/template-oss", - "publish": "true" - } -} diff --git a/node_modules/npm/node_modules/imurmurhash/imurmurhash.js b/node_modules/npm/node_modules/imurmurhash/imurmurhash.js deleted file mode 100644 index e63146a..0000000 --- a/node_modules/npm/node_modules/imurmurhash/imurmurhash.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -(function(){ - var cache; - - // Call this function without `new` to use the cached object (good for - // single-threaded environments), or with `new` to create a new object. - // - // @param {string} key A UTF-16 or ASCII string - // @param {number} seed An optional positive integer - // @return {object} A MurmurHash3 object for incremental hashing - function MurmurHash3(key, seed) { - var m = this instanceof MurmurHash3 ? this : cache; - m.reset(seed) - if (typeof key === 'string' && key.length > 0) { - m.hash(key); - } - - if (m !== this) { - return m; - } - }; - - // Incrementally add a string to this hash - // - // @param {string} key A UTF-16 or ASCII string - // @return {object} this - MurmurHash3.prototype.hash = function(key) { - var h1, k1, i, top, len; - - len = key.length; - this.len += len; - - k1 = this.k1; - i = 0; - switch (this.rem) { - case 0: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) : 0; - case 1: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 8 : 0; - case 2: k1 ^= len > i ? (key.charCodeAt(i++) & 0xffff) << 16 : 0; - case 3: - k1 ^= len > i ? (key.charCodeAt(i) & 0xff) << 24 : 0; - k1 ^= len > i ? (key.charCodeAt(i++) & 0xff00) >> 8 : 0; - } - - this.rem = (len + this.rem) & 3; // & 3 is same as % 4 - len -= this.rem; - if (len > 0) { - h1 = this.h1; - while (1) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - - h1 ^= k1; - h1 = (h1 << 13) | (h1 >>> 19); - h1 = (h1 * 5 + 0xe6546b64) & 0xffffffff; - - if (i >= len) { - break; - } - - k1 = ((key.charCodeAt(i++) & 0xffff)) ^ - ((key.charCodeAt(i++) & 0xffff) << 8) ^ - ((key.charCodeAt(i++) & 0xffff) << 16); - top = key.charCodeAt(i++); - k1 ^= ((top & 0xff) << 24) ^ - ((top & 0xff00) >> 8); - } - - k1 = 0; - switch (this.rem) { - case 3: k1 ^= (key.charCodeAt(i + 2) & 0xffff) << 16; - case 2: k1 ^= (key.charCodeAt(i + 1) & 0xffff) << 8; - case 1: k1 ^= (key.charCodeAt(i) & 0xffff); - } - - this.h1 = h1; - } - - this.k1 = k1; - return this; - }; - - // Get the result of this hash - // - // @return {number} The 32-bit hash - MurmurHash3.prototype.result = function() { - var k1, h1; - - k1 = this.k1; - h1 = this.h1; - - if (k1 > 0) { - k1 = (k1 * 0x2d51 + (k1 & 0xffff) * 0xcc9e0000) & 0xffffffff; - k1 = (k1 << 15) | (k1 >>> 17); - k1 = (k1 * 0x3593 + (k1 & 0xffff) * 0x1b870000) & 0xffffffff; - h1 ^= k1; - } - - h1 ^= this.len; - - h1 ^= h1 >>> 16; - h1 = (h1 * 0xca6b + (h1 & 0xffff) * 0x85eb0000) & 0xffffffff; - h1 ^= h1 >>> 13; - h1 = (h1 * 0xae35 + (h1 & 0xffff) * 0xc2b20000) & 0xffffffff; - h1 ^= h1 >>> 16; - - return h1 >>> 0; - }; - - // Reset the hash object for reuse - // - // @param {number} seed An optional positive integer - MurmurHash3.prototype.reset = function(seed) { - this.h1 = typeof seed === 'number' ? seed : 0; - this.rem = this.k1 = this.len = 0; - return this; - }; - - // A cached object to use. This can be safely used if you're in a single- - // threaded environment, otherwise you need to create new hashes to use. - cache = new MurmurHash3(); - - if (typeof(module) != 'undefined') { - module.exports = MurmurHash3; - } else { - this.MurmurHash3 = MurmurHash3; - } -}()); diff --git a/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js b/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js deleted file mode 100644 index dc0ee88..0000000 --- a/node_modules/npm/node_modules/imurmurhash/imurmurhash.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @preserve - * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) - * - * @author Jens Taylor - * @see http://github.com/homebrewing/brauhaus-diff - * @author Gary Court - * @see http://github.com/garycourt/murmurhash-js - * @author Austin Appleby - * @see http://sites.google.com/site/murmurhash/ - */ -!function(){function t(h,r){var s=this instanceof t?this:e;return s.reset(r),"string"==typeof h&&h.length>0&&s.hash(h),s!==this?s:void 0}var e;t.prototype.hash=function(t){var e,h,r,s,i;switch(i=t.length,this.len+=i,h=this.k1,r=0,this.rem){case 0:h^=i>r?65535&t.charCodeAt(r++):0;case 1:h^=i>r?(65535&t.charCodeAt(r++))<<8:0;case 2:h^=i>r?(65535&t.charCodeAt(r++))<<16:0;case 3:h^=i>r?(255&t.charCodeAt(r))<<24:0,h^=i>r?(65280&t.charCodeAt(r++))>>8:0}if(this.rem=3&i+this.rem,i-=this.rem,i>0){for(e=this.h1;;){if(h=4294967295&11601*h+3432906752*(65535&h),h=h<<15|h>>>17,h=4294967295&13715*h+461832192*(65535&h),e^=h,e=e<<13|e>>>19,e=4294967295&5*e+3864292196,r>=i)break;h=65535&t.charCodeAt(r++)^(65535&t.charCodeAt(r++))<<8^(65535&t.charCodeAt(r++))<<16,s=t.charCodeAt(r++),h^=(255&s)<<24^(65280&s)>>8}switch(h=0,this.rem){case 3:h^=(65535&t.charCodeAt(r+2))<<16;case 2:h^=(65535&t.charCodeAt(r+1))<<8;case 1:h^=65535&t.charCodeAt(r)}this.h1=e}return this.k1=h,this},t.prototype.result=function(){var t,e;return t=this.k1,e=this.h1,t>0&&(t=4294967295&11601*t+3432906752*(65535&t),t=t<<15|t>>>17,t=4294967295&13715*t+461832192*(65535&t),e^=t),e^=this.len,e^=e>>>16,e=4294967295&51819*e+2246770688*(65535&e),e^=e>>>13,e=4294967295&44597*e+3266445312*(65535&e),e^=e>>>16,e>>>0},t.prototype.reset=function(t){return this.h1="number"==typeof t?t:0,this.rem=this.k1=this.len=0,this},e=new t,"undefined"!=typeof module?module.exports=t:this.MurmurHash3=t}(); \ No newline at end of file diff --git a/node_modules/npm/node_modules/imurmurhash/package.json b/node_modules/npm/node_modules/imurmurhash/package.json deleted file mode 100644 index 8a93edb..0000000 --- a/node_modules/npm/node_modules/imurmurhash/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "imurmurhash", - "version": "0.1.4", - "description": "An incremental implementation of MurmurHash3", - "homepage": "https://github.com/jensyt/imurmurhash-js", - "main": "imurmurhash.js", - "files": [ - "imurmurhash.js", - "imurmurhash.min.js", - "package.json", - "README.md" - ], - "repository": { - "type": "git", - "url": "https://github.com/jensyt/imurmurhash-js" - }, - "bugs": { - "url": "https://github.com/jensyt/imurmurhash-js/issues" - }, - "keywords": [ - "murmur", - "murmurhash", - "murmurhash3", - "hash", - "incremental" - ], - "author": { - "name": "Jens Taylor", - "email": "jensyt@gmail.com", - "url": "https://github.com/homebrewing" - }, - "license": "MIT", - "dependencies": { - }, - "devDependencies": { - }, - "engines": { - "node": ">=0.8.19" - } -} diff --git a/node_modules/npm/node_modules/indent-string/index.js b/node_modules/npm/node_modules/indent-string/index.js deleted file mode 100644 index e1ab804..0000000 --- a/node_modules/npm/node_modules/indent-string/index.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -module.exports = (string, count = 1, options) => { - options = { - indent: ' ', - includeEmptyLines: false, - ...options - }; - - if (typeof string !== 'string') { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - - if (typeof count !== 'number') { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - - if (typeof options.indent !== 'string') { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - - if (count === 0) { - return string; - } - - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - - return string.replace(regex, options.indent.repeat(count)); -}; diff --git a/node_modules/npm/node_modules/indent-string/license b/node_modules/npm/node_modules/indent-string/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/indent-string/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/indent-string/package.json b/node_modules/npm/node_modules/indent-string/package.json deleted file mode 100644 index 497bb83..0000000 --- a/node_modules/npm/node_modules/indent-string/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "indent-string", - "version": "4.0.0", - "description": "Indent each line in a string", - "license": "MIT", - "repository": "sindresorhus/indent-string", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "indent", - "string", - "pad", - "align", - "line", - "text", - "each", - "every" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/npm/node_modules/ini/LICENSE b/node_modules/npm/node_modules/ini/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/ini/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/ini/lib/ini.js b/node_modules/npm/node_modules/ini/lib/ini.js deleted file mode 100644 index 724d69d..0000000 --- a/node_modules/npm/node_modules/ini/lib/ini.js +++ /dev/null @@ -1,278 +0,0 @@ -const { hasOwnProperty } = Object.prototype - -const encode = (obj, opt = {}) => { - if (typeof opt === 'string') { - opt = { section: opt } - } - opt.align = opt.align === true - opt.newline = opt.newline === true - opt.sort = opt.sort === true - opt.whitespace = opt.whitespace === true || opt.align === true - // The `typeof` check is required because accessing the `process` directly fails on browsers. - /* istanbul ignore next */ - opt.platform = opt.platform || (typeof process !== 'undefined' && process.platform) - opt.bracketedArray = opt.bracketedArray !== false - - /* istanbul ignore next */ - const eol = opt.platform === 'win32' ? '\r\n' : '\n' - const separator = opt.whitespace ? ' = ' : '=' - const children = [] - - const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj) - - let padToChars = 0 - // If aligning on the separator, then padToChars is determined as follows: - // 1. Get the keys - // 2. Exclude keys pointing to objects unless the value is null or an array - // 3. Add `[]` to array keys - // 4. Ensure non empty set of keys - // 5. Reduce the set to the longest `safe` key - // 6. Get the `safe` length - if (opt.align) { - padToChars = safe( - ( - keys - .filter(k => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== 'object') - .map(k => Array.isArray(obj[k]) ? `${k}[]` : k) - ) - .concat(['']) - .reduce((a, b) => safe(a).length >= safe(b).length ? a : b) - ).length - } - - let out = '' - const arraySuffix = opt.bracketedArray ? '[]' : '' - - for (const k of keys) { - const val = obj[k] - if (val && Array.isArray(val)) { - for (const item of val) { - out += safe(`${k}${arraySuffix}`).padEnd(padToChars, ' ') + separator + safe(item) + eol - } - } else if (val && typeof val === 'object') { - children.push(k) - } else { - out += safe(k).padEnd(padToChars, ' ') + separator + safe(val) + eol - } - } - - if (opt.section && out.length) { - out = '[' + safe(opt.section) + ']' + (opt.newline ? eol + eol : eol) + out - } - - for (const k of children) { - const nk = splitSections(k, '.').join('\\.') - const section = (opt.section ? opt.section + '.' : '') + nk - const child = encode(obj[k], { - ...opt, - section, - }) - if (out.length && child.length) { - out += eol - } - - out += child - } - - return out -} - -function splitSections (str, separator) { - var lastMatchIndex = 0 - var lastSeparatorIndex = 0 - var nextIndex = 0 - var sections = [] - - do { - nextIndex = str.indexOf(separator, lastMatchIndex) - - if (nextIndex !== -1) { - lastMatchIndex = nextIndex + separator.length - - if (nextIndex > 0 && str[nextIndex - 1] === '\\') { - continue - } - - sections.push(str.slice(lastSeparatorIndex, nextIndex)) - lastSeparatorIndex = nextIndex + separator.length - } - } while (nextIndex !== -1) - - sections.push(str.slice(lastSeparatorIndex)) - - return sections -} - -const decode = (str, opt = {}) => { - opt.bracketedArray = opt.bracketedArray !== false - const out = Object.create(null) - let p = out - let section = null - // section |key = value - const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i - const lines = str.split(/[\r\n]+/g) - const duplicates = {} - - for (const line of lines) { - if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) { - continue - } - const match = line.match(re) - if (!match) { - continue - } - if (match[1] !== undefined) { - section = unsafe(match[1]) - if (section === '__proto__') { - // not allowed - // keep parsing the section, but don't attach it. - p = Object.create(null) - continue - } - p = out[section] = out[section] || Object.create(null) - continue - } - const keyRaw = unsafe(match[2]) - let isArray - if (opt.bracketedArray) { - isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]' - } else { - duplicates[keyRaw] = (duplicates?.[keyRaw] || 0) + 1 - isArray = duplicates[keyRaw] > 1 - } - const key = isArray ? keyRaw.slice(0, -2) : keyRaw - if (key === '__proto__') { - continue - } - const valueRaw = match[3] ? unsafe(match[4]) : true - const value = valueRaw === 'true' || - valueRaw === 'false' || - valueRaw === 'null' ? JSON.parse(valueRaw) - : valueRaw - - // Convert keys with '[]' suffix to an array - if (isArray) { - if (!hasOwnProperty.call(p, key)) { - p[key] = [] - } else if (!Array.isArray(p[key])) { - p[key] = [p[key]] - } - } - - // safeguard against resetting a previously defined - // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) { - p[key].push(value) - } else { - p[key] = value - } - } - - // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} - // use a filter to return the keys that have to be deleted. - const remove = [] - for (const k of Object.keys(out)) { - if (!hasOwnProperty.call(out, k) || - typeof out[k] !== 'object' || - Array.isArray(out[k])) { - continue - } - - // see if the parent section is also an object. - // if so, add it to that, and mark this one for deletion - const parts = splitSections(k, '.') - p = out - const l = parts.pop() - const nl = l.replace(/\\\./g, '.') - for (const part of parts) { - if (part === '__proto__') { - continue - } - if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object') { - p[part] = Object.create(null) - } - p = p[part] - } - if (p === out && nl === l) { - continue - } - - p[nl] = out[k] - remove.push(k) - } - for (const del of remove) { - delete out[del] - } - - return out -} - -const isQuoted = val => { - return (val.startsWith('"') && val.endsWith('"')) || - (val.startsWith("'") && val.endsWith("'")) -} - -const safe = val => { - if ( - typeof val !== 'string' || - val.match(/[=\r\n]/) || - val.match(/^\[/) || - (val.length > 1 && isQuoted(val)) || - val !== val.trim() - ) { - return JSON.stringify(val) - } - return val.split(';').join('\\;').split('#').join('\\#') -} - -const unsafe = (val, doUnesc) => { - val = (val || '').trim() - if (isQuoted(val)) { - // remove the single quotes before calling JSON.parse - if (val.charAt(0) === "'") { - val = val.slice(1, -1) - } - try { - val = JSON.parse(val) - } catch { - // ignore errors - } - } else { - // walk the val to find the first not-escaped ; character - let esc = false - let unesc = '' - for (let i = 0, l = val.length; i < l; i++) { - const c = val.charAt(i) - if (esc) { - if ('\\;#'.indexOf(c) !== -1) { - unesc += c - } else { - unesc += '\\' + c - } - - esc = false - } else if (';#'.indexOf(c) !== -1) { - break - } else if (c === '\\') { - esc = true - } else { - unesc += c - } - } - if (esc) { - unesc += '\\' - } - - return unesc.trim() - } - return val -} - -module.exports = { - parse: decode, - decode, - stringify: encode, - encode, - safe, - unsafe, -} diff --git a/node_modules/npm/node_modules/ini/package.json b/node_modules/npm/node_modules/ini/package.json deleted file mode 100644 index c1a50e9..0000000 --- a/node_modules/npm/node_modules/ini/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "author": "GitHub Inc.", - "name": "ini", - "description": "An ini encoder/decoder for node", - "version": "4.1.1", - "repository": { - "type": "git", - "url": "https://github.com/npm/ini.git" - }, - "main": "lib/ini.js", - "scripts": { - "eslint": "eslint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "test": "tap", - "snap": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.15.1", - "tap": "^16.0.1" - }, - "license": "ISC", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.15.1", - "publish": "true" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/init-package-json/LICENSE.md b/node_modules/npm/node_modules/init-package-json/LICENSE.md deleted file mode 100644 index 845be76..0000000 --- a/node_modules/npm/node_modules/init-package-json/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -ISC License - -Copyright npm, Inc. - -Permission to use, copy, modify, and/or distribute this -software for any purpose with or without fee is hereby -granted, provided that the above copyright notice and this -permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO -EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/init-package-json/lib/default-input.js b/node_modules/npm/node_modules/init-package-json/lib/default-input.js deleted file mode 100644 index 490e83c..0000000 --- a/node_modules/npm/node_modules/init-package-json/lib/default-input.js +++ /dev/null @@ -1,262 +0,0 @@ -/* globals config, dirname, package, basename, yes, prompt */ - -const fs = require('fs/promises') -const path = require('path') -const validateLicense = require('validate-npm-package-license') -const validateName = require('validate-npm-package-name') -const npa = require('npm-package-arg') -const semver = require('semver') - -// more popular packages should go here, maybe? -const isTestPkg = (p) => !!p.match(/^(expresso|mocha|tap|coffee-script|coco|streamline)$/) - -const invalid = (msg) => Object.assign(new Error(msg), { notValid: true }) - -const readDeps = (test, excluded) => async () => { - const dirs = await fs.readdir('node_modules').catch(() => null) - - if (!dirs) { - return - } - - const deps = {} - for (const dir of dirs) { - if (dir.match(/^\./) || test !== isTestPkg(dir) || excluded[dir]) { - continue - } - - const dp = path.join(dirname, 'node_modules', dir, 'package.json') - const p = await fs.readFile(dp, 'utf8').then((d) => JSON.parse(d)).catch(() => null) - - if (!p || !p.version || p?._requiredBy?.some((r) => r === '#USER')) { - continue - } - - deps[dir] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version - } - - return deps -} - -const getConfig = (key) => { - // dots take precedence over dashes - const def = config?.defaults?.[`init.${key}`] - const val = config.get(`init.${key}`) - return (val !== def && val) ? val : config.get(`init-${key.replace(/\./g, '-')}`) -} - -const getName = () => { - const rawName = package.name || basename - let name = rawName - .replace(/^node-|[.-]js$/g, '') - .replace(/\s+/g, ' ') - .replace(/ /g, '-') - .toLowerCase() - - let spec - try { - spec = npa(name) - } catch { - spec = {} - } - - let scope = config.get('scope') - - if (scope) { - if (scope.charAt(0) !== '@') { - scope = '@' + scope - } - if (spec.scope) { - name = scope + '/' + spec.name.split('/')[1] - } else { - name = scope + '/' + name - } - } - - return name -} - -const name = getName() -exports.name = yes ? name : prompt('package name', name, (data) => { - const its = validateName(data) - if (its.validForNewPackages) { - return data - } - const errors = (its.errors || []).concat(its.warnings || []) - return invalid(`Sorry, ${errors.join(' and ')}.`) -}) - -const version = package.version || getConfig('version') || '1.0.0' -exports.version = yes ? version : prompt('version', version, (v) => { - if (semver.valid(v)) { - return v - } - return invalid(`Invalid version: "${v}"`) -}) - -if (!package.description) { - exports.description = yes ? '' : prompt('description') -} - -if (!package.main) { - exports.main = async () => { - const files = await fs.readdir(dirname) - .then(list => list.filter((f) => f.match(/\.js$/))) - .catch(() => []) - - let index - if (files.includes('index.js')) { - index = 'index.js' - } else if (files.includes('main.js')) { - index = 'main.js' - } else if (files.includes(basename + '.js')) { - index = basename + '.js' - } else { - index = files[0] || 'index.js' - } - - return yes ? index : prompt('entry point', index) - } -} - -if (!package.bin) { - exports.bin = async () => { - try { - const d = await fs.readdir(path.resolve(dirname, 'bin')) - // just take the first js file we find there, or nada - let r = d.find(f => f.match(/\.js$/)) - if (r) { - r = `bin/${r}` - } - return r - } catch { - // no bins - } - } -} - -exports.directories = async () => { - const dirs = await fs.readdir(dirname) - - const res = dirs.reduce((acc, d) => { - if (/^examples?$/.test(d)) { - acc.example = d - } else if (/^tests?$/.test(d)) { - acc.test = d - } else if (/^docs?$/.test(d)) { - acc.doc = d - } else if (d === 'man') { - acc.man = d - } else if (d === 'lib') { - acc.lib = d - } - - return acc - }, {}) - - return Object.keys(res).length === 0 ? undefined : res -} - -if (!package.dependencies) { - exports.dependencies = readDeps(false, package.devDependencies || {}) -} - -if (!package.devDependencies) { - exports.devDependencies = readDeps(true, package.dependencies || {}) -} - -// MUST have a test script! -if (!package.scripts) { - const scripts = package.scripts || {} - const notest = 'echo "Error: no test specified" && exit 1' - exports.scripts = async () => { - const d = await fs.readdir(path.join(dirname, 'node_modules')).catch(() => []) - - // check to see what framework is in use, if any - let command - if (!scripts.test || scripts.test === notest) { - const commands = { - tap: 'tap test/*.js', - expresso: 'expresso test', - mocha: 'mocha', - } - for (const [k, v] of Object.entries(commands)) { - if (d.includes(k)) { - command = v - } - } - } - - const promptArgs = ['test command', (t) => t || notest] - if (command) { - promptArgs.splice(1, 0, command) - } - scripts.test = yes ? command || notest : prompt(...promptArgs) - - return scripts - } -} - -if (!package.repository) { - exports.repository = async () => { - const gconf = await fs.readFile('.git/config', 'utf8').catch(() => '') - const lines = gconf.split(/\r?\n/) - - let url - const i = lines.indexOf('[remote "origin"]') - - if (i !== -1) { - url = gconf[i + 1] - if (!url.match(/^\s*url =/)) { - url = gconf[i + 2] - } - if (!url.match(/^\s*url =/)) { - url = null - } else { - url = url.replace(/^\s*url = /, '') - } - } - - if (url && url.match(/^git@github.com:/)) { - url = url.replace(/^git@github.com:/, 'https://github.com/') - } - - return yes ? url || '' : prompt('git repository', url || undefined) - } -} - -if (!package.keywords) { - exports.keywords = yes ? '' : prompt('keywords', (data) => { - if (!data) { - return - } - if (Array.isArray(data)) { - data = data.join(' ') - } - if (typeof data !== 'string') { - return data - } - return data.split(/[\s,]+/) - }) -} - -if (!package.author) { - const authorName = getConfig('author.name') - exports.author = authorName - ? { - name: authorName, - email: getConfig('author.email'), - url: getConfig('author.url'), - } - : yes ? '' : prompt('author') -} - -const license = package.license || getConfig('license') || 'ISC' -exports.license = yes ? license : prompt('license', license, (data) => { - const its = validateLicense(data) - if (its.validForNewPackages) { - return data - } - const errors = (its.errors || []).concat(its.warnings || []) - return invalid(`Sorry, ${errors.join(' and ')}.`) -}) diff --git a/node_modules/npm/node_modules/init-package-json/lib/init-package-json.js b/node_modules/npm/node_modules/init-package-json/lib/init-package-json.js deleted file mode 100644 index 077ebd9..0000000 --- a/node_modules/npm/node_modules/init-package-json/lib/init-package-json.js +++ /dev/null @@ -1,145 +0,0 @@ - -const promzard = require('promzard') -const path = require('path') -const fs = require('fs/promises') -const semver = require('semver') -const read = require('read') -const util = require('util') -const rpj = require('read-package-json') - -const def = require.resolve('./default-input.js') - -// to validate the data object at the end as a worthwhile package -// and assign default values for things. -const _extraSet = rpj.extraSet -const _rpj = util.promisify(rpj) -const _rpjExtras = util.promisify(rpj.extras) -const readPkgJson = async (file, pkg) => { - // only do a few of these. no need for mans or contributors if they're in the files - rpj.extraSet = _extraSet.filter(f => f.name !== 'authors' && f.name !== 'mans') - const p = pkg ? _rpjExtras(file, pkg) : _rpj(file) - return p.catch(() => ({})).finally(() => rpj.extraSet = _extraSet) -} - -const isYes = (c) => !!(c.get('yes') || c.get('y') || c.get('force') || c.get('f')) - -const getConfig = (c = {}) => { - // accept either a plain-jane object, or a config object with a "get" method. - if (typeof c.get !== 'function') { - const data = c - return { - get: (k) => data[k], - toJSON: () => data, - } - } - return c -} - -const stringifyPerson = (p) => { - if (typeof p === 'string') { - return p - } - const { name = '', url, web, email, mail } = p - const u = url || web - const e = email || mail - return `${name}${e ? ` <${e}>` : ''}${u ? ` (${u})` : ''}` -} - -async function init (dir, input = def, c = {}) { - const config = getConfig(c) - const yes = isYes(config) - const packageFile = path.resolve(dir, 'package.json') - - const pkg = await readPkgJson(packageFile) - - if (!semver.valid(pkg.version)) { - delete pkg.version - } - - // make sure that the input is valid. if not, use the default - const pzData = await promzard(path.resolve(input), { - yes, - config, - filename: packageFile, - dirname: path.dirname(packageFile), - basename: path.basename(path.dirname(packageFile)), - package: pkg, - }, { backupFile: def }) - - for (const [k, v] of Object.entries(pzData)) { - if (v != null) { - pkg[k] = v - } - } - - const pkgExtras = await readPkgJson(packageFile, pkg) - - // turn the objects into somewhat more humane strings. - if (pkgExtras.author) { - pkgExtras.author = stringifyPerson(pkgExtras.author) - } - - for (const set of ['maintainers', 'contributors']) { - if (Array.isArray(pkgExtras[set])) { - pkgExtras[set] = pkgExtras[set].map(stringifyPerson) - } - } - - // no need for the readme now. - delete pkgExtras.readme - delete pkgExtras.readmeFilename - - // really don't want to have this lying around in the file - delete pkgExtras._id - - // ditto - delete pkgExtras.gitHead - - // if the repo is empty, remove it. - if (!pkgExtras.repository) { - delete pkgExtras.repository - } - - // readJson filters out empty descriptions, but init-package-json - // traditionally leaves them alone - if (!pkgExtras.description) { - pkgExtras.description = pzData.description - } - - // optionalDependencies don't need to be repeated in two places - if (pkgExtras.dependencies) { - if (pkgExtras.optionalDependencies) { - for (const name of Object.keys(pkgExtras.optionalDependencies)) { - delete pkgExtras.dependencies[name] - } - } - if (Object.keys(pkgExtras.dependencies).length === 0) { - delete pkgExtras.dependencies - } - } - - const stringified = JSON.stringify(pkgExtras, null, 2) + '\n' - const msg = util.format('%s:\n\n%s\n', packageFile, stringified) - const write = () => fs.writeFile(packageFile, stringified, 'utf8') - - if (yes) { - await write() - if (!config.get('silent')) { - console.log(`Wrote to ${msg}`) - } - return pkgExtras - } - - console.log(`About to write to ${msg}`) - const ok = await read({ prompt: 'Is this OK? ', default: 'yes' }) - if (!ok || !ok.toLowerCase().startsWith('y')) { - console.log('Aborted.') - return - } - - await write() - return pkgExtras -} - -module.exports = init -module.exports.yes = isYes diff --git a/node_modules/npm/node_modules/init-package-json/package.json b/node_modules/npm/node_modules/init-package-json/package.json deleted file mode 100644 index a164169..0000000 --- a/node_modules/npm/node_modules/init-package-json/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "init-package-json", - "version": "6.0.0", - "main": "lib/init-package-json.js", - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.js\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/init-package-json.git" - }, - "author": "GitHub Inc.", - "license": "ISC", - "description": "A node module to get your node module started", - "dependencies": { - "npm-package-arg": "^11.0.0", - "promzard": "^1.0.0", - "read": "^2.0.0", - "read-package-json": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "^5.0.0" - }, - "devDependencies": { - "@npmcli/config": "^7.0.0", - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "tap": "^16.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "tap": { - "statements": 95, - "branches": 78, - "lines": 94, - "jobs": 1, - "test-ignore": "fixtures/", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "keywords": [ - "init", - "package.json", - "package", - "helper", - "wizard", - "wizerd", - "prompt", - "start" - ], - "files": [ - "bin/", - "lib/" - ], - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.18.0", - "publish": true, - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ] - } -} diff --git a/node_modules/npm/node_modules/ip-regex/index.js b/node_modules/npm/node_modules/ip-regex/index.js deleted file mode 100644 index 1fe723c..0000000 --- a/node_modules/npm/node_modules/ip-regex/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const word = '[a-fA-F\\d:]'; - -const boundry = options => options && options.includeBoundaries - ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` - : ''; - -const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; - -const v6segment = '[a-fA-F\\d]{1,4}'; - -const v6 = ` -(?: -(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 -)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); - -// Pre-compile only the exact regexes because adding a global flag make regexes stateful -const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`); -const v4exact = new RegExp(`^${v4}$`); -const v6exact = new RegExp(`^${v6}$`); - -const ipRegex = options => options && options.exact - ? v46Exact - : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g'); - -ipRegex.v4 = options => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'); -ipRegex.v6 = options => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'); - -export default ipRegex; diff --git a/node_modules/npm/node_modules/ip-regex/license b/node_modules/npm/node_modules/ip-regex/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/npm/node_modules/ip-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/ip-regex/package.json b/node_modules/npm/node_modules/ip-regex/package.json deleted file mode 100644 index 1f82fd5..0000000 --- a/node_modules/npm/node_modules/ip-regex/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "ip-regex", - "version": "5.0.0", - "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", - "license": "MIT", - "repository": "sindresorhus/ip-regex", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ip", - "ipv6", - "ipv4", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "text", - "pattern", - "internet", - "protocol", - "address", - "validate" - ], - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.19.1", - "xo": "^0.47.0" - } -} diff --git a/node_modules/npm/node_modules/ip/lib/ip.js b/node_modules/npm/node_modules/ip/lib/ip.js deleted file mode 100644 index 4b2adb5..0000000 --- a/node_modules/npm/node_modules/ip/lib/ip.js +++ /dev/null @@ -1,422 +0,0 @@ -const ip = exports; -const { Buffer } = require('buffer'); -const os = require('os'); - -ip.toBuffer = function (ip, buff, offset) { - offset = ~~offset; - - let result; - - if (this.isV4Format(ip)) { - result = buff || Buffer.alloc(offset + 4); - ip.split(/\./g).map((byte) => { - result[offset++] = parseInt(byte, 10) & 0xff; - }); - } else if (this.isV6Format(ip)) { - const sections = ip.split(':', 8); - - let i; - for (i = 0; i < sections.length; i++) { - const isv4 = this.isV4Format(sections[i]); - let v4Buffer; - - if (isv4) { - v4Buffer = this.toBuffer(sections[i]); - sections[i] = v4Buffer.slice(0, 2).toString('hex'); - } - - if (v4Buffer && ++i < 8) { - sections.splice(i, 0, v4Buffer.slice(2, 4).toString('hex')); - } - } - - if (sections[0] === '') { - while (sections.length < 8) sections.unshift('0'); - } else if (sections[sections.length - 1] === '') { - while (sections.length < 8) sections.push('0'); - } else if (sections.length < 8) { - for (i = 0; i < sections.length && sections[i] !== ''; i++); - const argv = [i, 1]; - for (i = 9 - sections.length; i > 0; i--) { - argv.push('0'); - } - sections.splice(...argv); - } - - result = buff || Buffer.alloc(offset + 16); - for (i = 0; i < sections.length; i++) { - const word = parseInt(sections[i], 16); - result[offset++] = (word >> 8) & 0xff; - result[offset++] = word & 0xff; - } - } - - if (!result) { - throw Error(`Invalid ip address: ${ip}`); - } - - return result; -}; - -ip.toString = function (buff, offset, length) { - offset = ~~offset; - length = length || (buff.length - offset); - - let result = []; - if (length === 4) { - // IPv4 - for (let i = 0; i < length; i++) { - result.push(buff[offset + i]); - } - result = result.join('.'); - } else if (length === 16) { - // IPv6 - for (let i = 0; i < length; i += 2) { - result.push(buff.readUInt16BE(offset + i).toString(16)); - } - result = result.join(':'); - result = result.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3'); - result = result.replace(/:{3,4}/, '::'); - } - - return result; -}; - -const ipv4Regex = /^(\d{1,3}\.){3,3}\d{1,3}$/; -const ipv6Regex = /^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i; - -ip.isV4Format = function (ip) { - return ipv4Regex.test(ip); -}; - -ip.isV6Format = function (ip) { - return ipv6Regex.test(ip); -}; - -function _normalizeFamily(family) { - if (family === 4) { - return 'ipv4'; - } - if (family === 6) { - return 'ipv6'; - } - return family ? family.toLowerCase() : 'ipv4'; -} - -ip.fromPrefixLen = function (prefixlen, family) { - if (prefixlen > 32) { - family = 'ipv6'; - } else { - family = _normalizeFamily(family); - } - - let len = 4; - if (family === 'ipv6') { - len = 16; - } - const buff = Buffer.alloc(len); - - for (let i = 0, n = buff.length; i < n; ++i) { - let bits = 8; - if (prefixlen < 8) { - bits = prefixlen; - } - prefixlen -= bits; - - buff[i] = ~(0xff >> bits) & 0xff; - } - - return ip.toString(buff); -}; - -ip.mask = function (addr, mask) { - addr = ip.toBuffer(addr); - mask = ip.toBuffer(mask); - - const result = Buffer.alloc(Math.max(addr.length, mask.length)); - - // Same protocol - do bitwise and - let i; - if (addr.length === mask.length) { - for (i = 0; i < addr.length; i++) { - result[i] = addr[i] & mask[i]; - } - } else if (mask.length === 4) { - // IPv6 address and IPv4 mask - // (Mask low bits) - for (i = 0; i < mask.length; i++) { - result[i] = addr[addr.length - 4 + i] & mask[i]; - } - } else { - // IPv6 mask and IPv4 addr - for (i = 0; i < result.length - 6; i++) { - result[i] = 0; - } - - // ::ffff:ipv4 - result[10] = 0xff; - result[11] = 0xff; - for (i = 0; i < addr.length; i++) { - result[i + 12] = addr[i] & mask[i + 12]; - } - i += 12; - } - for (; i < result.length; i++) { - result[i] = 0; - } - - return ip.toString(result); -}; - -ip.cidr = function (cidrString) { - const cidrParts = cidrString.split('/'); - - const addr = cidrParts[0]; - if (cidrParts.length !== 2) { - throw new Error(`invalid CIDR subnet: ${addr}`); - } - - const mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); - - return ip.mask(addr, mask); -}; - -ip.subnet = function (addr, mask) { - const networkAddress = ip.toLong(ip.mask(addr, mask)); - - // Calculate the mask's length. - const maskBuffer = ip.toBuffer(mask); - let maskLength = 0; - - for (let i = 0; i < maskBuffer.length; i++) { - if (maskBuffer[i] === 0xff) { - maskLength += 8; - } else { - let octet = maskBuffer[i] & 0xff; - while (octet) { - octet = (octet << 1) & 0xff; - maskLength++; - } - } - } - - const numberOfAddresses = 2 ** (32 - maskLength); - - return { - networkAddress: ip.fromLong(networkAddress), - firstAddress: numberOfAddresses <= 2 - ? ip.fromLong(networkAddress) - : ip.fromLong(networkAddress + 1), - lastAddress: numberOfAddresses <= 2 - ? ip.fromLong(networkAddress + numberOfAddresses - 1) - : ip.fromLong(networkAddress + numberOfAddresses - 2), - broadcastAddress: ip.fromLong(networkAddress + numberOfAddresses - 1), - subnetMask: mask, - subnetMaskLength: maskLength, - numHosts: numberOfAddresses <= 2 - ? numberOfAddresses : numberOfAddresses - 2, - length: numberOfAddresses, - contains(other) { - return networkAddress === ip.toLong(ip.mask(other, mask)); - }, - }; -}; - -ip.cidrSubnet = function (cidrString) { - const cidrParts = cidrString.split('/'); - - const addr = cidrParts[0]; - if (cidrParts.length !== 2) { - throw new Error(`invalid CIDR subnet: ${addr}`); - } - - const mask = ip.fromPrefixLen(parseInt(cidrParts[1], 10)); - - return ip.subnet(addr, mask); -}; - -ip.not = function (addr) { - const buff = ip.toBuffer(addr); - for (let i = 0; i < buff.length; i++) { - buff[i] = 0xff ^ buff[i]; - } - return ip.toString(buff); -}; - -ip.or = function (a, b) { - a = ip.toBuffer(a); - b = ip.toBuffer(b); - - // same protocol - if (a.length === b.length) { - for (let i = 0; i < a.length; ++i) { - a[i] |= b[i]; - } - return ip.toString(a); - - // mixed protocols - } - let buff = a; - let other = b; - if (b.length > a.length) { - buff = b; - other = a; - } - - const offset = buff.length - other.length; - for (let i = offset; i < buff.length; ++i) { - buff[i] |= other[i - offset]; - } - - return ip.toString(buff); -}; - -ip.isEqual = function (a, b) { - a = ip.toBuffer(a); - b = ip.toBuffer(b); - - // Same protocol - if (a.length === b.length) { - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) return false; - } - return true; - } - - // Swap - if (b.length === 4) { - const t = b; - b = a; - a = t; - } - - // a - IPv4, b - IPv6 - for (let i = 0; i < 10; i++) { - if (b[i] !== 0) return false; - } - - const word = b.readUInt16BE(10); - if (word !== 0 && word !== 0xffff) return false; - - for (let i = 0; i < 4; i++) { - if (a[i] !== b[i + 12]) return false; - } - - return true; -}; - -ip.isPrivate = function (addr) { - return /^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i - .test(addr) - || /^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) - || /^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i - .test(addr) - || /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) - || /^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) - || /^f[cd][0-9a-f]{2}:/i.test(addr) - || /^fe80:/i.test(addr) - || /^::1$/.test(addr) - || /^::$/.test(addr); -}; - -ip.isPublic = function (addr) { - return !ip.isPrivate(addr); -}; - -ip.isLoopback = function (addr) { - return /^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/ - .test(addr) - || /^fe80::1$/.test(addr) - || /^::1$/.test(addr) - || /^::$/.test(addr); -}; - -ip.loopback = function (family) { - // - // Default to `ipv4` - // - family = _normalizeFamily(family); - - if (family !== 'ipv4' && family !== 'ipv6') { - throw new Error('family must be ipv4 or ipv6'); - } - - return family === 'ipv4' ? '127.0.0.1' : 'fe80::1'; -}; - -// -// ### function address (name, family) -// #### @name {string|'public'|'private'} **Optional** Name or security -// of the network interface. -// #### @family {ipv4|ipv6} **Optional** IP family of the address (defaults -// to ipv4). -// -// Returns the address for the network interface on the current system with -// the specified `name`: -// * String: First `family` address of the interface. -// If not found see `undefined`. -// * 'public': the first public ip address of family. -// * 'private': the first private ip address of family. -// * undefined: First address with `ipv4` or loopback address `127.0.0.1`. -// -ip.address = function (name, family) { - const interfaces = os.networkInterfaces(); - - // - // Default to `ipv4` - // - family = _normalizeFamily(family); - - // - // If a specific network interface has been named, - // return the address. - // - if (name && name !== 'private' && name !== 'public') { - const res = interfaces[name].filter((details) => { - const itemFamily = _normalizeFamily(details.family); - return itemFamily === family; - }); - if (res.length === 0) { - return undefined; - } - return res[0].address; - } - - const all = Object.keys(interfaces).map((nic) => { - // - // Note: name will only be `public` or `private` - // when this is called. - // - const addresses = interfaces[nic].filter((details) => { - details.family = _normalizeFamily(details.family); - if (details.family !== family || ip.isLoopback(details.address)) { - return false; - } if (!name) { - return true; - } - - return name === 'public' ? ip.isPrivate(details.address) - : ip.isPublic(details.address); - }); - - return addresses.length ? addresses[0].address : undefined; - }).filter(Boolean); - - return !all.length ? ip.loopback(family) : all[0]; -}; - -ip.toLong = function (ip) { - let ipl = 0; - ip.split('.').forEach((octet) => { - ipl <<= 8; - ipl += parseInt(octet); - }); - return (ipl >>> 0); -}; - -ip.fromLong = function (ipl) { - return (`${ipl >>> 24}.${ - ipl >> 16 & 255}.${ - ipl >> 8 & 255}.${ - ipl & 255}`); -}; diff --git a/node_modules/npm/node_modules/ip/package.json b/node_modules/npm/node_modules/ip/package.json deleted file mode 100644 index f0d95e9..0000000 --- a/node_modules/npm/node_modules/ip/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "ip", - "version": "2.0.0", - "author": "Fedor Indutny ", - "homepage": "https://github.com/indutny/node-ip", - "repository": { - "type": "git", - "url": "http://github.com/indutny/node-ip.git" - }, - "files": [ - "lib", - "README.md" - ], - "main": "lib/ip", - "devDependencies": { - "eslint": "^8.15.0", - "mocha": "^10.0.0" - }, - "scripts": { - "lint": "eslint lib/*.js test/*.js", - "test": "npm run lint && mocha --reporter spec test/*-test.js", - "fix": "npm run lint -- --fix" - }, - "license": "MIT" -} diff --git a/node_modules/npm/node_modules/is-cidr/LICENSE b/node_modules/npm/node_modules/is-cidr/LICENSE deleted file mode 100644 index 9669c20..0000000 --- a/node_modules/npm/node_modules/is-cidr/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) silverwind -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. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/npm/node_modules/is-cidr/index.js b/node_modules/npm/node_modules/is-cidr/index.js deleted file mode 100644 index ed7f152..0000000 --- a/node_modules/npm/node_modules/is-cidr/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import {v4 as v4Re, v6 as v6Re} from "cidr-regex"; - -const re4 = v4Re({exact: true}); -const re6 = v6Re({exact: true}); - -const isCidr = str => re4.test(str) ? 4 : (re6.test(str) ? 6 : 0); -export const v4 = isCidr.v4 = str => re4.test(str); -export const v6 = isCidr.v6 = str => re6.test(str); -export default isCidr; diff --git a/node_modules/npm/node_modules/is-cidr/package.json b/node_modules/npm/node_modules/is-cidr/package.json deleted file mode 100644 index d6971b3..0000000 --- a/node_modules/npm/node_modules/is-cidr/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "is-cidr", - "version": "5.0.3", - "description": "Check if a string is an IP address in CIDR notation", - "author": "silverwind ", - "contributors": [ - "Felipe Apostol (http://flipjs.io/)" - ], - "repository": "silverwind/is-cidr", - "license": "BSD-2-Clause", - "type": "module", - "exports": "./index.js", - "sideEffects": false, - "engines": { - "node": ">=14" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "dependencies": { - "cidr-regex": "4.0.3" - }, - "devDependencies": { - "eslint": "8.37.0", - "eslint-config-silverwind": "65.1.3", - "tsd": "0.28.1", - "updates": "13.2.9", - "versions": "10.4.2", - "vitest": "0.29.8" - } -} diff --git a/node_modules/npm/node_modules/is-core-module/LICENSE b/node_modules/npm/node_modules/is-core-module/LICENSE deleted file mode 100644 index 2e50287..0000000 --- a/node_modules/npm/node_modules/is-core-module/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Dave Justice - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/npm/node_modules/is-core-module/core.json b/node_modules/npm/node_modules/is-core-module/core.json deleted file mode 100644 index 3cda693..0000000 --- a/node_modules/npm/node_modules/is-core-module/core.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "assert": true, - "node:assert": [">= 14.18 && < 15", ">= 16"], - "assert/strict": ">= 15", - "node:assert/strict": ">= 16", - "async_hooks": ">= 8", - "node:async_hooks": [">= 14.18 && < 15", ">= 16"], - "buffer_ieee754": ">= 0.5 && < 0.9.7", - "buffer": true, - "node:buffer": [">= 14.18 && < 15", ">= 16"], - "child_process": true, - "node:child_process": [">= 14.18 && < 15", ">= 16"], - "cluster": ">= 0.5", - "node:cluster": [">= 14.18 && < 15", ">= 16"], - "console": true, - "node:console": [">= 14.18 && < 15", ">= 16"], - "constants": true, - "node:constants": [">= 14.18 && < 15", ">= 16"], - "crypto": true, - "node:crypto": [">= 14.18 && < 15", ">= 16"], - "_debug_agent": ">= 1 && < 8", - "_debugger": "< 8", - "dgram": true, - "node:dgram": [">= 14.18 && < 15", ">= 16"], - "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"], - "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"], - "dns": true, - "node:dns": [">= 14.18 && < 15", ">= 16"], - "dns/promises": ">= 15", - "node:dns/promises": ">= 16", - "domain": ">= 0.7.12", - "node:domain": [">= 14.18 && < 15", ">= 16"], - "events": true, - "node:events": [">= 14.18 && < 15", ">= 16"], - "freelist": "< 6", - "fs": true, - "node:fs": [">= 14.18 && < 15", ">= 16"], - "fs/promises": [">= 10 && < 10.1", ">= 14"], - "node:fs/promises": [">= 14.18 && < 15", ">= 16"], - "_http_agent": ">= 0.11.1", - "node:_http_agent": [">= 14.18 && < 15", ">= 16"], - "_http_client": ">= 0.11.1", - "node:_http_client": [">= 14.18 && < 15", ">= 16"], - "_http_common": ">= 0.11.1", - "node:_http_common": [">= 14.18 && < 15", ">= 16"], - "_http_incoming": ">= 0.11.1", - "node:_http_incoming": [">= 14.18 && < 15", ">= 16"], - "_http_outgoing": ">= 0.11.1", - "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"], - "_http_server": ">= 0.11.1", - "node:_http_server": [">= 14.18 && < 15", ">= 16"], - "http": true, - "node:http": [">= 14.18 && < 15", ">= 16"], - "http2": ">= 8.8", - "node:http2": [">= 14.18 && < 15", ">= 16"], - "https": true, - "node:https": [">= 14.18 && < 15", ">= 16"], - "inspector": ">= 8", - "node:inspector": [">= 14.18 && < 15", ">= 16"], - "inspector/promises": [">= 19"], - "node:inspector/promises": [">= 19"], - "_linklist": "< 8", - "module": true, - "node:module": [">= 14.18 && < 15", ">= 16"], - "net": true, - "node:net": [">= 14.18 && < 15", ">= 16"], - "node-inspect/lib/_inspect": ">= 7.6 && < 12", - "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12", - "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12", - "os": true, - "node:os": [">= 14.18 && < 15", ">= 16"], - "path": true, - "node:path": [">= 14.18 && < 15", ">= 16"], - "path/posix": ">= 15.3", - "node:path/posix": ">= 16", - "path/win32": ">= 15.3", - "node:path/win32": ">= 16", - "perf_hooks": ">= 8.5", - "node:perf_hooks": [">= 14.18 && < 15", ">= 16"], - "process": ">= 1", - "node:process": [">= 14.18 && < 15", ">= 16"], - "punycode": ">= 0.5", - "node:punycode": [">= 14.18 && < 15", ">= 16"], - "querystring": true, - "node:querystring": [">= 14.18 && < 15", ">= 16"], - "readline": true, - "node:readline": [">= 14.18 && < 15", ">= 16"], - "readline/promises": ">= 17", - "node:readline/promises": ">= 17", - "repl": true, - "node:repl": [">= 14.18 && < 15", ">= 16"], - "smalloc": ">= 0.11.5 && < 3", - "_stream_duplex": ">= 0.9.4", - "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"], - "_stream_transform": ">= 0.9.4", - "node:_stream_transform": [">= 14.18 && < 15", ">= 16"], - "_stream_wrap": ">= 1.4.1", - "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"], - "_stream_passthrough": ">= 0.9.4", - "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"], - "_stream_readable": ">= 0.9.4", - "node:_stream_readable": [">= 14.18 && < 15", ">= 16"], - "_stream_writable": ">= 0.9.4", - "node:_stream_writable": [">= 14.18 && < 15", ">= 16"], - "stream": true, - "node:stream": [">= 14.18 && < 15", ">= 16"], - "stream/consumers": ">= 16.7", - "node:stream/consumers": ">= 16.7", - "stream/promises": ">= 15", - "node:stream/promises": ">= 16", - "stream/web": ">= 16.5", - "node:stream/web": ">= 16.5", - "string_decoder": true, - "node:string_decoder": [">= 14.18 && < 15", ">= 16"], - "sys": [">= 0.4 && < 0.7", ">= 0.8"], - "node:sys": [">= 14.18 && < 15", ">= 16"], - "test/reporters": ">= 19.9 && < 20.2", - "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"], - "node:test": [">= 16.17 && < 17", ">= 18"], - "timers": true, - "node:timers": [">= 14.18 && < 15", ">= 16"], - "timers/promises": ">= 15", - "node:timers/promises": ">= 16", - "_tls_common": ">= 0.11.13", - "node:_tls_common": [">= 14.18 && < 15", ">= 16"], - "_tls_legacy": ">= 0.11.3 && < 10", - "_tls_wrap": ">= 0.11.3", - "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"], - "tls": true, - "node:tls": [">= 14.18 && < 15", ">= 16"], - "trace_events": ">= 10", - "node:trace_events": [">= 14.18 && < 15", ">= 16"], - "tty": true, - "node:tty": [">= 14.18 && < 15", ">= 16"], - "url": true, - "node:url": [">= 14.18 && < 15", ">= 16"], - "util": true, - "node:util": [">= 14.18 && < 15", ">= 16"], - "util/types": ">= 15.3", - "node:util/types": ">= 16", - "v8/tools/arguments": ">= 10 && < 12", - "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"], - "v8": ">= 1", - "node:v8": [">= 14.18 && < 15", ">= 16"], - "vm": true, - "node:vm": [">= 14.18 && < 15", ">= 16"], - "wasi": [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"], - "node:wasi": [">= 18.17 && < 19", ">= 20"], - "worker_threads": ">= 11.7", - "node:worker_threads": [">= 14.18 && < 15", ">= 16"], - "zlib": ">= 0.5", - "node:zlib": [">= 14.18 && < 15", ">= 16"] -} diff --git a/node_modules/npm/node_modules/is-core-module/index.js b/node_modules/npm/node_modules/is-core-module/index.js deleted file mode 100644 index 423e20c..0000000 --- a/node_modules/npm/node_modules/is-core-module/index.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -var hasOwn = require('hasown'); - -function specifierIncluded(current, specifier) { - var nodeParts = current.split('.'); - var parts = specifier.split(' '); - var op = parts.length > 1 ? parts[0] : '='; - var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); - - for (var i = 0; i < 3; ++i) { - var cur = parseInt(nodeParts[i] || 0, 10); - var ver = parseInt(versionParts[i] || 0, 10); - if (cur === ver) { - continue; // eslint-disable-line no-restricted-syntax, no-continue - } - if (op === '<') { - return cur < ver; - } - if (op === '>=') { - return cur >= ver; - } - return false; - } - return op === '>='; -} - -function matchesRange(current, range) { - var specifiers = range.split(/ ?&& ?/); - if (specifiers.length === 0) { - return false; - } - for (var i = 0; i < specifiers.length; ++i) { - if (!specifierIncluded(current, specifiers[i])) { - return false; - } - } - return true; -} - -function versionIncluded(nodeVersion, specifierValue) { - if (typeof specifierValue === 'boolean') { - return specifierValue; - } - - var current = typeof nodeVersion === 'undefined' - ? process.versions && process.versions.node - : nodeVersion; - - if (typeof current !== 'string') { - throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); - } - - if (specifierValue && typeof specifierValue === 'object') { - for (var i = 0; i < specifierValue.length; ++i) { - if (matchesRange(current, specifierValue[i])) { - return true; - } - } - return false; - } - return matchesRange(current, specifierValue); -} - -var data = require('./core.json'); - -module.exports = function isCore(x, nodeVersion) { - return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); -}; diff --git a/node_modules/npm/node_modules/is-core-module/package.json b/node_modules/npm/node_modules/is-core-module/package.json deleted file mode 100644 index 1bac585..0000000 --- a/node_modules/npm/node_modules/is-core-module/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "is-core-module", - "version": "2.13.1", - "description": "Is this specifier a node.js core module?", - "main": "index.js", - "sideEffects": false, - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "lint": "eslint .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/is-core-module.git" - }, - "keywords": [ - "core", - "modules", - "module", - "npm", - "node", - "dependencies" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/is-core-module/issues" - }, - "homepage": "https://github.com/inspect-js/is-core-module", - "dependencies": { - "hasown": "^2.0.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "mock-property": "^1.0.2", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "semver": "^6.3.1", - "tape": "^5.7.1" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github" - ] - } -} diff --git a/node_modules/npm/node_modules/is-core-module/test/index.js b/node_modules/npm/node_modules/is-core-module/test/index.js deleted file mode 100644 index 912808b..0000000 --- a/node_modules/npm/node_modules/is-core-module/test/index.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - -var test = require('tape'); -var keys = require('object-keys'); -var semver = require('semver'); -var mockProperty = require('mock-property'); - -var isCore = require('../'); -var data = require('../core.json'); - -var supportsNodePrefix = semver.satisfies(process.versions.node, '^14.18 || >= 16', { includePrerelease: true }); - -test('core modules', function (t) { - t.test('isCore()', function (st) { - st.ok(isCore('fs')); - st.ok(isCore('net')); - st.ok(isCore('http')); - - st.ok(!isCore('seq')); - st.ok(!isCore('../')); - - st.ok(!isCore('toString')); - - st.end(); - }); - - t.test('core list', function (st) { - var cores = keys(data); - st.plan(cores.length); - - for (var i = 0; i < cores.length; ++i) { - var mod = cores[i]; - var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func - if (isCore(mod)) { - st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw'); - } else { - st['throws'](requireFunc, mod + ' not supported; requiring throws'); - } - } - - st.end(); - }); - - t.test('core via repl module', { skip: !data.repl }, function (st) { - var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle - if (!libs) { - st.skip('repl._builtinLibs does not exist'); - } else { - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - st.ok(data[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - if (mod.slice(0, 5) !== 'node:') { - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); - } - } - } - } - st.end(); - }); - - t.test('core via builtinModules list', { skip: !data.module }, function (st) { - var libs = require('module').builtinModules; - if (!libs) { - st.skip('module.builtinModules does not exist'); - } else { - var excludeList = [ - '_debug_agent', - 'v8/tools/tickprocessor-driver', - 'v8/tools/SourceMap', - 'v8/tools/tickprocessor', - 'v8/tools/profile' - ]; - // see https://github.com/nodejs/node/issues/42785 - if (semver.satisfies(process.version, '>= 18')) { - libs = libs.concat('node:test'); - } - for (var i = 0; i < libs.length; ++i) { - var mod = libs[i]; - if (excludeList.indexOf(mod) === -1) { - st.ok(data[mod], mod + ' is a core module'); - st.doesNotThrow( - function () { require(mod); }, // eslint-disable-line no-loop-func - 'requiring ' + mod + ' does not throw' - ); - if (mod.slice(0, 5) !== 'node:') { - if (supportsNodePrefix) { - st.doesNotThrow( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' does not throw' - ); - } else { - st['throws']( - function () { require('node:' + mod); }, // eslint-disable-line no-loop-func - 'requiring node:' + mod + ' throws' - ); - } - } - } - } - } - st.end(); - }); - - t.test('Object.prototype pollution', function (st) { - var nonKey = 'not a core module'; - st.teardown(mockProperty(Object.prototype, 'fs', { value: false })); - st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' })); - st.teardown(mockProperty(Object.prototype, 'http', { value: data.http })); - st.teardown(mockProperty(Object.prototype, nonKey, { value: true })); - - st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies'); - st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies'); - st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data'); - st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype lies'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/npm/node_modules/is-fullwidth-code-point/index.js b/node_modules/npm/node_modules/is-fullwidth-code-point/index.js deleted file mode 100644 index 671f97f..0000000 --- a/node_modules/npm/node_modules/is-fullwidth-code-point/index.js +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable yoda */ -'use strict'; - -const isFullwidthCodePoint = codePoint => { - if (Number.isNaN(codePoint)) { - return false; - } - - // Code points are derived from: - // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt - if ( - codePoint >= 0x1100 && ( - codePoint <= 0x115F || // Hangul Jamo - codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET - codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET - // CJK Radicals Supplement .. Enclosed CJK Letters and Months - (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || - // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A - (0x3250 <= codePoint && codePoint <= 0x4DBF) || - // CJK Unified Ideographs .. Yi Radicals - (0x4E00 <= codePoint && codePoint <= 0xA4C6) || - // Hangul Jamo Extended-A - (0xA960 <= codePoint && codePoint <= 0xA97C) || - // Hangul Syllables - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - // CJK Compatibility Ideographs - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - // Vertical Forms - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - // CJK Compatibility Forms .. Small Form Variants - (0xFE30 <= codePoint && codePoint <= 0xFE6B) || - // Halfwidth and Fullwidth Forms - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || - // Kana Supplement - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - // Enclosed Ideographic Supplement - (0x1F200 <= codePoint && codePoint <= 0x1F251) || - // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane - (0x20000 <= codePoint && codePoint <= 0x3FFFD) - ) - ) { - return true; - } - - return false; -}; - -module.exports = isFullwidthCodePoint; -module.exports.default = isFullwidthCodePoint; diff --git a/node_modules/npm/node_modules/is-fullwidth-code-point/license b/node_modules/npm/node_modules/is-fullwidth-code-point/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/npm/node_modules/is-fullwidth-code-point/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/is-fullwidth-code-point/package.json b/node_modules/npm/node_modules/is-fullwidth-code-point/package.json deleted file mode 100644 index 2137e88..0000000 --- a/node_modules/npm/node_modules/is-fullwidth-code-point/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "is-fullwidth-code-point", - "version": "3.0.0", - "description": "Check if the character represented by a given Unicode code point is fullwidth", - "license": "MIT", - "repository": "sindresorhus/is-fullwidth-code-point", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd-check" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "fullwidth", - "full-width", - "full", - "width", - "unicode", - "character", - "string", - "codepoint", - "code", - "point", - "is", - "detect", - "check" - ], - "devDependencies": { - "ava": "^1.3.1", - "tsd-check": "^0.5.0", - "xo": "^0.24.0" - } -} diff --git a/node_modules/npm/node_modules/is-lambda/LICENSE b/node_modules/npm/node_modules/is-lambda/LICENSE deleted file mode 100644 index 4a59c94..0000000 --- a/node_modules/npm/node_modules/is-lambda/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2017 Thomas Watson Steen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/is-lambda/index.js b/node_modules/npm/node_modules/is-lambda/index.js deleted file mode 100644 index b245ab1..0000000 --- a/node_modules/npm/node_modules/is-lambda/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict' - -module.exports = !!( - (process.env.LAMBDA_TASK_ROOT && process.env.AWS_EXECUTION_ENV) || - false -) diff --git a/node_modules/npm/node_modules/is-lambda/package.json b/node_modules/npm/node_modules/is-lambda/package.json deleted file mode 100644 index d855089..0000000 --- a/node_modules/npm/node_modules/is-lambda/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "is-lambda", - "version": "1.0.1", - "description": "Detect if your code is running on an AWS Lambda server", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "clear-require": "^1.0.1", - "standard": "^10.0.2" - }, - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/watson/is-lambda.git" - }, - "keywords": [ - "aws", - "hosting", - "hosted", - "lambda", - "detect" - ], - "author": "Thomas Watson Steen (https://twitter.com/wa7son)", - "license": "MIT", - "bugs": { - "url": "https://github.com/watson/is-lambda/issues" - }, - "homepage": "https://github.com/watson/is-lambda", - "coordinates": [ - 37.3859955, - -122.0838831 - ] -} diff --git a/node_modules/npm/node_modules/is-lambda/test.js b/node_modules/npm/node_modules/is-lambda/test.js deleted file mode 100644 index e8e7325..0000000 --- a/node_modules/npm/node_modules/is-lambda/test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -var assert = require('assert') -var clearRequire = require('clear-require') - -process.env.AWS_EXECUTION_ENV = 'AWS_Lambda_nodejs6.10' -process.env.LAMBDA_TASK_ROOT = '/var/task' - -var isCI = require('./') -assert(isCI) - -delete process.env.AWS_EXECUTION_ENV - -clearRequire('./') -isCI = require('./') -assert(!isCI) diff --git a/node_modules/npm/node_modules/isexe/LICENSE b/node_modules/npm/node_modules/isexe/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/isexe/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/isexe/index.js b/node_modules/npm/node_modules/isexe/index.js deleted file mode 100644 index 553fb32..0000000 --- a/node_modules/npm/node_modules/isexe/index.js +++ /dev/null @@ -1,57 +0,0 @@ -var fs = require('fs') -var core -if (process.platform === 'win32' || global.TESTING_WINDOWS) { - core = require('./windows.js') -} else { - core = require('./mode.js') -} - -module.exports = isexe -isexe.sync = sync - -function isexe (path, options, cb) { - if (typeof options === 'function') { - cb = options - options = {} - } - - if (!cb) { - if (typeof Promise !== 'function') { - throw new TypeError('callback not provided') - } - - return new Promise(function (resolve, reject) { - isexe(path, options || {}, function (er, is) { - if (er) { - reject(er) - } else { - resolve(is) - } - }) - }) - } - - core(path, options || {}, function (er, is) { - // ignore EACCES because that just means we aren't allowed to run it - if (er) { - if (er.code === 'EACCES' || options && options.ignoreErrors) { - er = null - is = false - } - } - cb(er, is) - }) -} - -function sync (path, options) { - // my kingdom for a filtered catch - try { - return core.sync(path, options || {}) - } catch (er) { - if (options && options.ignoreErrors || er.code === 'EACCES') { - return false - } else { - throw er - } - } -} diff --git a/node_modules/npm/node_modules/isexe/mode.js b/node_modules/npm/node_modules/isexe/mode.js deleted file mode 100644 index 1995ea4..0000000 --- a/node_modules/npm/node_modules/isexe/mode.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), options) -} - -function checkStat (stat, options) { - return stat.isFile() && checkMode(stat, options) -} - -function checkMode (stat, options) { - var mod = stat.mode - var uid = stat.uid - var gid = stat.gid - - var myUid = options.uid !== undefined ? - options.uid : process.getuid && process.getuid() - var myGid = options.gid !== undefined ? - options.gid : process.getgid && process.getgid() - - var u = parseInt('100', 8) - var g = parseInt('010', 8) - var o = parseInt('001', 8) - var ug = u | g - - var ret = (mod & o) || - (mod & g) && gid === myGid || - (mod & u) && uid === myUid || - (mod & ug) && myUid === 0 - - return ret -} diff --git a/node_modules/npm/node_modules/isexe/package.json b/node_modules/npm/node_modules/isexe/package.json deleted file mode 100644 index e452689..0000000 --- a/node_modules/npm/node_modules/isexe/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "isexe", - "version": "2.0.0", - "description": "Minimal module to check if a file is executable.", - "main": "index.js", - "directories": { - "test": "test" - }, - "devDependencies": { - "mkdirp": "^0.5.1", - "rimraf": "^2.5.0", - "tap": "^10.3.0" - }, - "scripts": { - "test": "tap test/*.js --100", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/isexe.git" - }, - "keywords": [], - "bugs": { - "url": "https://github.com/isaacs/isexe/issues" - }, - "homepage": "https://github.com/isaacs/isexe#readme" -} diff --git a/node_modules/npm/node_modules/isexe/test/basic.js b/node_modules/npm/node_modules/isexe/test/basic.js deleted file mode 100644 index d926df6..0000000 --- a/node_modules/npm/node_modules/isexe/test/basic.js +++ /dev/null @@ -1,221 +0,0 @@ -var t = require('tap') -var fs = require('fs') -var path = require('path') -var fixture = path.resolve(__dirname, 'fixtures') -var meow = fixture + '/meow.cat' -var mine = fixture + '/mine.cat' -var ours = fixture + '/ours.cat' -var fail = fixture + '/fail.false' -var noent = fixture + '/enoent.exe' -var mkdirp = require('mkdirp') -var rimraf = require('rimraf') - -var isWindows = process.platform === 'win32' -var hasAccess = typeof fs.access === 'function' -var winSkip = isWindows && 'windows' -var accessSkip = !hasAccess && 'no fs.access function' -var hasPromise = typeof Promise === 'function' -var promiseSkip = !hasPromise && 'no global Promise' - -function reset () { - delete require.cache[require.resolve('../')] - return require('../') -} - -t.test('setup fixtures', function (t) { - rimraf.sync(fixture) - mkdirp.sync(fixture) - fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n') - fs.chmodSync(meow, parseInt('0755', 8)) - fs.writeFileSync(fail, '#!/usr/bin/env false\n') - fs.chmodSync(fail, parseInt('0644', 8)) - fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n') - fs.chmodSync(mine, parseInt('0744', 8)) - fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n') - fs.chmodSync(ours, parseInt('0754', 8)) - t.end() -}) - -t.test('promise', { skip: promiseSkip }, function (t) { - var isexe = reset() - t.test('meow async', function (t) { - isexe(meow).then(function (is) { - t.ok(is) - t.end() - }) - }) - t.test('fail async', function (t) { - isexe(fail).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.test('noent async', function (t) { - isexe(noent).catch(function (er) { - t.ok(er) - t.end() - }) - }) - t.test('noent ignore async', function (t) { - isexe(noent, { ignoreErrors: true }).then(function (is) { - t.notOk(is) - t.end() - }) - }) - t.end() -}) - -t.test('no promise', function (t) { - global.Promise = null - var isexe = reset() - t.throws('try to meow a promise', function () { - isexe(meow) - }) - t.end() -}) - -t.test('access', { skip: accessSkip || winSkip }, function (t) { - runTest(t) -}) - -t.test('mode', { skip: winSkip }, function (t) { - delete fs.access - delete fs.accessSync - var isexe = reset() - t.ok(isexe.sync(ours, { uid: 0, gid: 0 })) - t.ok(isexe.sync(mine, { uid: 0, gid: 0 })) - runTest(t) -}) - -t.test('windows', function (t) { - global.TESTING_WINDOWS = true - var pathExt = '.EXE;.CAT;.CMD;.COM' - t.test('pathExt option', function (t) { - runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' }) - }) - t.test('pathExt env', function (t) { - process.env.PATHEXT = pathExt - runTest(t) - }) - t.test('no pathExt', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: '', skipFail: true }) - }) - t.test('pathext with empty entry', function (t) { - // with a pathExt of '', any filename is fine. - // so the "fail" one would still pass. - runTest(t, { pathExt: ';' + pathExt, skipFail: true }) - }) - t.end() -}) - -t.test('cleanup', function (t) { - rimraf.sync(fixture) - t.end() -}) - -function runTest (t, options) { - var isexe = reset() - - var optionsIgnore = Object.create(options || {}) - optionsIgnore.ignoreErrors = true - - if (!options || !options.skipFail) { - t.notOk(isexe.sync(fail, options)) - } - t.notOk(isexe.sync(noent, optionsIgnore)) - if (!options) { - t.ok(isexe.sync(meow)) - } else { - t.ok(isexe.sync(meow, options)) - } - - t.ok(isexe.sync(mine, options)) - t.ok(isexe.sync(ours, options)) - t.throws(function () { - isexe.sync(noent, options) - }) - - t.test('meow async', function (t) { - if (!options) { - isexe(meow, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } else { - isexe(meow, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - } - }) - - t.test('mine async', function (t) { - isexe(mine, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - t.test('ours async', function (t) { - isexe(ours, options, function (er, is) { - if (er) { - throw er - } - t.ok(is) - t.end() - }) - }) - - if (!options || !options.skipFail) { - t.test('fail async', function (t) { - isexe(fail, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - } - - t.test('noent async', function (t) { - isexe(noent, options, function (er, is) { - t.ok(er) - t.notOk(is) - t.end() - }) - }) - - t.test('noent ignore async', function (t) { - isexe(noent, optionsIgnore, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.test('directory is not executable', function (t) { - isexe(__dirname, options, function (er, is) { - if (er) { - throw er - } - t.notOk(is) - t.end() - }) - }) - - t.end() -} diff --git a/node_modules/npm/node_modules/isexe/windows.js b/node_modules/npm/node_modules/isexe/windows.js deleted file mode 100644 index 3499673..0000000 --- a/node_modules/npm/node_modules/isexe/windows.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = isexe -isexe.sync = sync - -var fs = require('fs') - -function checkPathExt (path, options) { - var pathext = options.pathExt !== undefined ? - options.pathExt : process.env.PATHEXT - - if (!pathext) { - return true - } - - pathext = pathext.split(';') - if (pathext.indexOf('') !== -1) { - return true - } - for (var i = 0; i < pathext.length; i++) { - var p = pathext[i].toLowerCase() - if (p && path.substr(-p.length).toLowerCase() === p) { - return true - } - } - return false -} - -function checkStat (stat, path, options) { - if (!stat.isSymbolicLink() && !stat.isFile()) { - return false - } - return checkPathExt(path, options) -} - -function isexe (path, options, cb) { - fs.stat(path, function (er, stat) { - cb(er, er ? false : checkStat(stat, path, options)) - }) -} - -function sync (path, options) { - return checkStat(fs.statSync(path), path, options) -} diff --git a/node_modules/npm/node_modules/jackspeak/LICENSE.md b/node_modules/npm/node_modules/jackspeak/LICENSE.md deleted file mode 100644 index c5402b9..0000000 --- a/node_modules/npm/node_modules/jackspeak/LICENSE.md +++ /dev/null @@ -1,55 +0,0 @@ -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -***As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim.*** diff --git a/node_modules/npm/node_modules/jackspeak/dist/commonjs/index.js b/node_modules/npm/node_modules/jackspeak/dist/commonjs/index.js deleted file mode 100644 index 956d6a2..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/commonjs/index.js +++ /dev/null @@ -1,850 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jack = exports.Jack = exports.isConfigOption = exports.isConfigType = void 0; -const node_util_1 = require("node:util"); -const parse_args_js_1 = require("./parse-args.js"); -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -const cliui_1 = __importDefault(require("@isaacs/cliui")); -const node_path_1 = require("node:path"); -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' - ? value - : typeof value === 'boolean' - ? value - ? '1' - : '0' - : typeof value === 'number' - ? String(value) - : Array.isArray(value) - ? value - .map((v) => toEnvVal(v)) - .join(delim) - : /* c8 ignore start */ - undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple - ? env - ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : [] - : type === 'string' - ? env - : type === 'boolean' - ? env === '1' - : +env.trim()); -const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -exports.isConfigType = isConfigType; -const undefOrType = (v, t) => v === undefined || typeof v === t; -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' - ? 'string' - : typeof v === 'boolean' - ? 'boolean' - : typeof v === 'number' - ? 'number' - : Array.isArray(v) - ? joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' - ? types[0] - : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - (0, exports.isConfigType)(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -exports.isConfigOption = isConfigOption; -function num(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - /* c8 ignore start */ - if (!config) { - throw new Error('config must be an object: ' + longOption); - } - /* c8 ignore start */ - if ((0, exports.isConfigOption)(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if ((0, exports.isConfigOption)(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined - ? undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: conf.multiple, - default: conf.default, - }; - } - const clo = c[longOption]; - if (typeof config.short === 'string') { - clo.short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - #usageMarkdown; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - throw Object.assign(er, source ? { source } : {}); - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - // already validated, just for TS's benefit - /* c8 ignore start */ - if (!my) { - throw new Error('unexpected field in config set: ' + field); - } - /* c8 ignore stop */ - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = (0, parse_args_js_1.parseArgs)({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional) { - p.positionals.push(...args.slice(token.index + 1)); - return p; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`); - } - } - } - } - if (my.multiple) { - const pv = p.values; - const tn = pv[token.name] ?? []; - pv[token.name] = tn; - tn.push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field]?.validate; - if (valid && !valid(value)) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`); - } - } - this.#writeEnv(p); - return p; - } - /** - * do not set fields as 'no-foo' if 'foo' exists and both are bools - * just set foo. - */ - #noNoFields(f, val, s = f) { - if (!f.startsWith('no-') || typeof val !== 'boolean') - return; - const yes = f.substring('no-'.length); - // recurse so we get the core config key we care about. - this.#noNoFields(yes, val, s); - if (this.#configSet[yes]?.type === 'boolean') { - throw new Error(`do not set '${s}', instead set '${yes}' as desired.`); - } - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object'); - } - for (const field in o) { - this.#noNoFields(field, o[field]); - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`); - } - if (!isValidValue(o[field], config.type, !!config.multiple)) { - throw Object.assign(new Error(`Invalid value ${valueType(o[field])} for ${field}, expected ${valueType(config)}`), { - field, - value: o[field], - }); - } - if (config.validate && !config.validate(o[field])) { - throw new Error(`Invalid config value for ${field}: ${o[field]}`); - } - } - } - #writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level, { pre = false } = {}) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level, pre }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = (0, cliui_1.default)({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = (0, node_path_1.basename)(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - const { rows, maxWidth } = this.#usageRows(start); - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 3) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown() { - if (this.#usageMarkdown) - return this.#usageMarkdown; - const out = []; - let headingLevel = 1; - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - out.push(`# ${normalizeOneLine(first.text)}`); - } - out.push('Usage:'); - if (this.#options.usage) { - out.push(normalizeMarkdown(this.#options.usage, true)); - } - else { - const cmd = (0, node_path_1.basename)(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - out.push(normalizeMarkdown(usage, true)); - } - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); - start++; - } - const { rows } = this.#usageRows(start); - // heading level in markdown is number of # ahead of text - for (const row of rows) { - if (row.left) { - out.push('#'.repeat(headingLevel + 1) + - ' ' + - normalizeOneLine(row.left, true)); - if (row.text) - out.push(normalizeMarkdown(row.text)); - } - else if (isHeading(row)) { - const { level } = row; - headingLevel = level; - out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); - } - else { - out.push(normalizeMarkdown(row.text, !!row.pre)); - } - } - return (this.#usageMarkdown = out.join('\n\n') + '\n'); - } - #usageRows(start) { - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const dmDelim = mult && (desc.includes('\n') ? '\n\n' : '\n'); - const text = normalize(desc + dmDelim + mult); - const hint = value.hint || - (value.type === 'number' - ? 'n' - : value.type === 'string' - ? field.name - : undefined); - const short = !value.short - ? '' - : value.type === 'boolean' - ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' - ? `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - return { rows, maxWidth }; - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description - ? { description: normalize(def.description) } - : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [node_util_1.inspect.custom](_, options) { - return `Jack ${(0, node_util_1.inspect)(this.toJSON(), options)}`; - } -} -exports.Jack = Jack; -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => pre - ? // prepend a ZWSP to each line so cliui doesn't strip it. - s - .split('\n') - .map(l => `\u200b${l}`) - .join('\n') - : s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - // remove any spaces at the start of a line - .replace(/\n[ \t]+/g, '\n') - .trim(); -// normalize for markdown printing, remove leading spaces on lines -const normalizeMarkdown = (s, pre = false) => { - const n = normalize(s, pre).replace(/\\/g, '\\\\'); - return pre - ? `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` - : n.replace(/\n +/g, '\n').trim(); -}; -const normalizeOneLine = (s, pre = false) => { - const n = normalize(s, pre) - .replace(/[\s\u200b]+/g, ' ') - .trim(); - return pre ? `\`${n}\`` : n; -}; -/** - * Main entry point. Create and return a {@link Jack} object. - */ -const jack = (options = {}) => new Jack(options); -exports.jack = jack; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/dist/commonjs/package.json b/node_modules/npm/node_modules/jackspeak/dist/commonjs/package.json deleted file mode 100644 index 0292b99..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/commonjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/dist/commonjs/parse-args.js b/node_modules/npm/node_modules/jackspeak/dist/commonjs/parse-args.js deleted file mode 100644 index ab628be..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/commonjs/parse-args.js +++ /dev/null @@ -1,50 +0,0 @@ -"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.parseArgs = void 0; -const util = __importStar(require("util")); -const pv = typeof process === 'object' && - !!process && - typeof process.version === 'string' - ? process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -/* c8 ignore start */ -const [major = 0, minor = 0] = pvs; -/* c8 ignore stop */ -let { parseArgs: pa } = util; -/* c8 ignore start */ -if (!pa || - major < 16 || - (major === 18 && minor < 11) || - (major === 16 && minor < 19)) { - /* c8 ignore stop */ - pa = require('@pkgjs/parseargs').parseArgs; -} -exports.parseArgs = pa; -//# sourceMappingURL=parse-args-cjs.cjs.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/dist/esm/index.js b/node_modules/npm/node_modules/jackspeak/dist/esm/index.js deleted file mode 100644 index 9914049..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/esm/index.js +++ /dev/null @@ -1,840 +0,0 @@ -import { inspect } from 'node:util'; -import { parseArgs } from './parse-args.js'; -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -import cliui from '@isaacs/cliui'; -import { basename } from 'node:path'; -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' - ? value - : typeof value === 'boolean' - ? value - ? '1' - : '0' - : typeof value === 'number' - ? String(value) - : Array.isArray(value) - ? value - .map((v) => toEnvVal(v)) - .join(delim) - : /* c8 ignore start */ - undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple - ? env - ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : [] - : type === 'string' - ? env - : type === 'boolean' - ? env === '1' - : +env.trim()); -export const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -const undefOrType = (v, t) => v === undefined || typeof v === t; -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' - ? 'string' - : typeof v === 'boolean' - ? 'boolean' - : typeof v === 'number' - ? 'number' - : Array.isArray(v) - ? joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' - ? types[0] - : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -export const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - isConfigType(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -function num(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - return { - ...rest, - default: def, - validate, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val - ? val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - /* c8 ignore start */ - if (!config) { - throw new Error('config must be an object: ' + longOption); - } - /* c8 ignore start */ - if (isConfigOption(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if (isConfigOption(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined - ? undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: conf.multiple, - default: conf.default, - }; - } - const clo = c[longOption]; - if (typeof config.short === 'string') { - clo.short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -export class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - #usageMarkdown; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - throw Object.assign(er, source ? { source } : {}); - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - // already validated, just for TS's benefit - /* c8 ignore start */ - if (!my) { - throw new Error('unexpected field in config set: ' + field); - } - /* c8 ignore stop */ - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = parseArgs({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional) { - p.positionals.push(...args.slice(token.index + 1)); - return p; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`); - } - } - } - } - if (my.multiple) { - const pv = p.values; - const tn = pv[token.name] ?? []; - pv[token.name] = tn; - tn.push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field]?.validate; - if (valid && !valid(value)) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`); - } - } - this.#writeEnv(p); - return p; - } - /** - * do not set fields as 'no-foo' if 'foo' exists and both are bools - * just set foo. - */ - #noNoFields(f, val, s = f) { - if (!f.startsWith('no-') || typeof val !== 'boolean') - return; - const yes = f.substring('no-'.length); - // recurse so we get the core config key we care about. - this.#noNoFields(yes, val, s); - if (this.#configSet[yes]?.type === 'boolean') { - throw new Error(`do not set '${s}', instead set '${yes}' as desired.`); - } - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object'); - } - for (const field in o) { - this.#noNoFields(field, o[field]); - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`); - } - if (!isValidValue(o[field], config.type, !!config.multiple)) { - throw Object.assign(new Error(`Invalid value ${valueType(o[field])} for ${field}, expected ${valueType(config)}`), { - field, - value: o[field], - }); - } - if (config.validate && !config.validate(o[field])) { - throw new Error(`Invalid config value for ${field}: ${o[field]}`); - } - } - } - #writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level, { pre = false } = {}) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level, pre }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = cliui({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = basename(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - const { rows, maxWidth } = this.#usageRows(start); - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 3) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown() { - if (this.#usageMarkdown) - return this.#usageMarkdown; - const out = []; - let headingLevel = 1; - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - out.push(`# ${normalizeOneLine(first.text)}`); - } - out.push('Usage:'); - if (this.#options.usage) { - out.push(normalizeMarkdown(this.#options.usage, true)); - } - else { - const cmd = basename(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - out.push(normalizeMarkdown(usage, true)); - } - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); - start++; - } - const { rows } = this.#usageRows(start); - // heading level in markdown is number of # ahead of text - for (const row of rows) { - if (row.left) { - out.push('#'.repeat(headingLevel + 1) + - ' ' + - normalizeOneLine(row.left, true)); - if (row.text) - out.push(normalizeMarkdown(row.text)); - } - else if (isHeading(row)) { - const { level } = row; - headingLevel = level; - out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); - } - else { - out.push(normalizeMarkdown(row.text, !!row.pre)); - } - } - return (this.#usageMarkdown = out.join('\n\n') + '\n'); - } - #usageRows(start) { - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const dmDelim = mult && (desc.includes('\n') ? '\n\n' : '\n'); - const text = normalize(desc + dmDelim + mult); - const hint = value.hint || - (value.type === 'number' - ? 'n' - : value.type === 'string' - ? field.name - : undefined); - const short = !value.short - ? '' - : value.type === 'boolean' - ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' - ? `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - return { rows, maxWidth }; - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description - ? { description: normalize(def.description) } - : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [inspect.custom](_, options) { - return `Jack ${inspect(this.toJSON(), options)}`; - } -} -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => pre - ? // prepend a ZWSP to each line so cliui doesn't strip it. - s - .split('\n') - .map(l => `\u200b${l}`) - .join('\n') - : s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - // remove any spaces at the start of a line - .replace(/\n[ \t]+/g, '\n') - .trim(); -// normalize for markdown printing, remove leading spaces on lines -const normalizeMarkdown = (s, pre = false) => { - const n = normalize(s, pre).replace(/\\/g, '\\\\'); - return pre - ? `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` - : n.replace(/\n +/g, '\n').trim(); -}; -const normalizeOneLine = (s, pre = false) => { - const n = normalize(s, pre) - .replace(/[\s\u200b]+/g, ' ') - .trim(); - return pre ? `\`${n}\`` : n; -}; -/** - * Main entry point. Create and return a {@link Jack} object. - */ -export const jack = (options = {}) => new Jack(options); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/dist/esm/package.json b/node_modules/npm/node_modules/jackspeak/dist/esm/package.json deleted file mode 100644 index 7c34deb..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module"} \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/dist/esm/parse-args.js b/node_modules/npm/node_modules/jackspeak/dist/esm/parse-args.js deleted file mode 100644 index 6dbb4d8..0000000 --- a/node_modules/npm/node_modules/jackspeak/dist/esm/parse-args.js +++ /dev/null @@ -1,26 +0,0 @@ -import * as util from 'util'; -const pv = typeof process === 'object' && - !!process && - typeof process.version === 'string' - ? process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -/* c8 ignore start */ -const [major = 0, minor = 0] = pvs; -/* c8 ignore stop */ -let { parseArgs: pa, } = util; -/* c8 ignore start */ -if (!pa || - major < 16 || - (major === 18 && minor < 11) || - (major === 16 && minor < 19)) { - /* c8 ignore stop */ - // Ignore because we will clobber it for commonjs - //@ts-ignore - pa = (await import('@pkgjs/parseargs')).parseArgs; -} -export const parseArgs = pa; -//# sourceMappingURL=parse-args.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/jackspeak/package.json b/node_modules/npm/node_modules/jackspeak/package.json deleted file mode 100644 index e5e4752..0000000 --- a/node_modules/npm/node_modules/jackspeak/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "jackspeak", - "version": "2.3.6", - "description": "A very strict and proper argument parser.", - "tshy": { - "main": true, - "exports": { - "./package.json": "./package.json", - ".": "./src/index.js" - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "scripts": { - "build-examples": "for i in examples/*.js ; do node $i -h > ${i/.js/.txt}; done", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" - }, - "license": "BlueOak-1.0.0", - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "devDependencies": { - "@types/node": "^20.7.0", - "@types/pkgjs__parseargs": "^0.10.1", - "prettier": "^2.8.6", - "tap": "^18.1.4", - "tshy": "^1.2.2", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" - }, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/jackspeak.git" - }, - "keywords": [ - "argument", - "parser", - "args", - "option", - "flag", - "cli", - "command", - "line", - "parse", - "parsing" - ], - "author": "Isaac Z. Schlueter ", - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } -} diff --git a/node_modules/npm/node_modules/json-parse-even-better-errors/LICENSE.md b/node_modules/npm/node_modules/json-parse-even-better-errors/LICENSE.md deleted file mode 100644 index 6991b7c..0000000 --- a/node_modules/npm/node_modules/json-parse-even-better-errors/LICENSE.md +++ /dev/null @@ -1,25 +0,0 @@ -Copyright 2017 Kat Marchán -Copyright npm, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - ---- - -This library is a fork of 'better-json-errors' by Kat Marchán, extended and -distributed under the terms of the MIT license above. diff --git a/node_modules/npm/node_modules/json-parse-even-better-errors/lib/index.js b/node_modules/npm/node_modules/json-parse-even-better-errors/lib/index.js deleted file mode 100644 index c21dd64..0000000 --- a/node_modules/npm/node_modules/json-parse-even-better-errors/lib/index.js +++ /dev/null @@ -1,135 +0,0 @@ -'use strict' - -const INDENT = Symbol.for('indent') -const NEWLINE = Symbol.for('newline') - -const DEFAULT_NEWLINE = '\n' -const DEFAULT_INDENT = ' ' -const BOM = /^\uFEFF/ - -// only respect indentation if we got a line break, otherwise squash it -// things other than objects and arrays aren't indented, so ignore those -// Important: in both of these regexps, the $1 capture group is the newline -// or undefined, and the $2 capture group is the indent, or undefined. -const FORMAT = /^\s*[{[]((?:\r?\n)+)([\s\t]*)/ -const EMPTY = /^(?:\{\}|\[\])((?:\r?\n)+)?$/ - -// Node 20 puts single quotes around the token and a comma after it -const UNEXPECTED_TOKEN = /^Unexpected token '?(.)'?(,)? /i - -const hexify = (char) => { - const h = char.charCodeAt(0).toString(16).toUpperCase() - return `0x${h.length % 2 ? '0' : ''}${h}` -} - -// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) -// because the buffer-to-string conversion in `fs.readFileSync()` -// translates it to FEFF, the UTF-16 BOM. -const stripBOM = (txt) => String(txt).replace(BOM, '') - -const makeParsedError = (msg, parsing, position = 0) => ({ - message: `${msg} while parsing ${parsing}`, - position, -}) - -const parseError = (e, txt, context = 20) => { - let msg = e.message - - if (!txt) { - return makeParsedError(msg, 'empty string') - } - - const badTokenMatch = msg.match(UNEXPECTED_TOKEN) - const badIndexMatch = msg.match(/ position\s+(\d+)/i) - - if (badTokenMatch) { - msg = msg.replace( - UNEXPECTED_TOKEN, - `Unexpected token ${JSON.stringify(badTokenMatch[1])} (${hexify(badTokenMatch[1])})$2 ` - ) - } - - let errIdx - if (badIndexMatch) { - errIdx = +badIndexMatch[1] - } else if (msg.match(/^Unexpected end of JSON.*/i)) { - errIdx = txt.length - 1 - } - - if (errIdx == null) { - return makeParsedError(msg, `'${txt.slice(0, context * 2)}'`) - } - - const start = errIdx <= context ? 0 : errIdx - context - const end = errIdx + context >= txt.length ? txt.length : errIdx + context - const slice = `${start ? '...' : ''}${txt.slice(start, end)}${end === txt.length ? '' : '...'}` - - return makeParsedError( - msg, - `${txt === slice ? '' : 'near '}${JSON.stringify(slice)}`, - errIdx - ) -} - -class JSONParseError extends SyntaxError { - constructor (er, txt, context, caller) { - const metadata = parseError(er, txt, context) - super(metadata.message) - Object.assign(this, metadata) - this.code = 'EJSONPARSE' - this.systemError = er - Error.captureStackTrace(this, caller || this.constructor) - } - - get name () { - return this.constructor.name - } - - set name (n) {} - - get [Symbol.toStringTag] () { - return this.constructor.name - } -} - -const parseJson = (txt, reviver) => { - const result = JSON.parse(txt, reviver) - if (result && typeof result === 'object') { - // get the indentation so that we can save it back nicely - // if the file starts with {" then we have an indent of '', ie, none - // otherwise, pick the indentation of the next line after the first \n If the - // pattern doesn't match, then it means no indentation. JSON.stringify ignores - // symbols, so this is reasonably safe. if the string is '{}' or '[]', then - // use the default 2-space indent. - const match = txt.match(EMPTY) || txt.match(FORMAT) || [null, '', ''] - result[NEWLINE] = match[1] ?? DEFAULT_NEWLINE - result[INDENT] = match[2] ?? DEFAULT_INDENT - } - return result -} - -const parseJsonError = (raw, reviver, context) => { - const txt = stripBOM(raw) - try { - return parseJson(txt, reviver) - } catch (e) { - if (typeof raw !== 'string' && !Buffer.isBuffer(raw)) { - const msg = Array.isArray(raw) && raw.length === 0 ? 'an empty array' : String(raw) - throw Object.assign( - new TypeError(`Cannot parse ${msg}`), - { code: 'EJSONPARSE', systemError: e } - ) - } - throw new JSONParseError(e, txt, context, parseJsonError) - } -} - -module.exports = parseJsonError -parseJsonError.JSONParseError = JSONParseError -parseJsonError.noExceptions = (raw, reviver) => { - try { - return parseJson(stripBOM(raw), reviver) - } catch { - // no exceptions - } -} diff --git a/node_modules/npm/node_modules/json-parse-even-better-errors/package.json b/node_modules/npm/node_modules/json-parse-even-better-errors/package.json deleted file mode 100644 index 5d0a1d9..0000000 --- a/node_modules/npm/node_modules/json-parse-even-better-errors/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "json-parse-even-better-errors", - "version": "3.0.1", - "description": "JSON.parse with context information on error", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "test": "tap", - "snap": "tap", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/json-parse-even-better-errors.git" - }, - "keywords": [ - "JSON", - "parser" - ], - "author": "GitHub Inc.", - "license": "MIT", - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.20.0", - "tap": "^16.3.0" - }, - "tap": { - "check-coverage": true, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.20.0", - "publish": true - } -} diff --git a/node_modules/npm/node_modules/json-stringify-nice/LICENSE b/node_modules/npm/node_modules/json-stringify-nice/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/npm/node_modules/json-stringify-nice/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/json-stringify-nice/index.js b/node_modules/npm/node_modules/json-stringify-nice/index.js deleted file mode 100644 index 36557bb..0000000 --- a/node_modules/npm/node_modules/json-stringify-nice/index.js +++ /dev/null @@ -1,38 +0,0 @@ -const isObj = val => !!val && !Array.isArray(val) && typeof val === 'object' - -const compare = (ak, bk, prefKeys) => - prefKeys.includes(ak) && !prefKeys.includes(bk) ? -1 - : prefKeys.includes(bk) && !prefKeys.includes(ak) ? 1 - : prefKeys.includes(ak) && prefKeys.includes(bk) - ? prefKeys.indexOf(ak) - prefKeys.indexOf(bk) - : ak.localeCompare(bk, 'en') - -const sort = (replacer, seen) => (key, val) => { - const prefKeys = Array.isArray(replacer) ? replacer : [] - - if (typeof replacer === 'function') - val = replacer(key, val) - - if (!isObj(val)) - return val - - if (seen.has(val)) - return seen.get(val) - - const ret = Object.entries(val).sort( - ([ak, av], [bk, bv]) => - isObj(av) === isObj(bv) ? compare(ak, bk, prefKeys) - : isObj(av) ? 1 - : -1 - ).reduce((set, [k, v]) => { - set[k] = v - return set - }, {}) - - seen.set(val, ret) - return ret -} - -module.exports = (obj, replacer, space = 2) => - JSON.stringify(obj, sort(replacer, new Map()), space) - + (space ? '\n' : '') diff --git a/node_modules/npm/node_modules/json-stringify-nice/package.json b/node_modules/npm/node_modules/json-stringify-nice/package.json deleted file mode 100644 index c966329..0000000 --- a/node_modules/npm/node_modules/json-stringify-nice/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "json-stringify-nice", - "version": "1.1.4", - "description": "Stringify an object sorting scalars before objects, and defaulting to 2-space indent", - "author": "Isaac Z. Schlueter (https://izs.me)", - "license": "ISC", - "scripts": { - "test": "tap", - "posttest": "npm run lint", - "snap": "tap", - "postsnap": "npm run lintfix", - "eslint": "eslint", - "lint": "npm run eslint -- index.js test/**/*.js", - "lintfix": "npm run lint -- --fix", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags" - }, - "tap": { - "test-env": [ - "LC_ALL=sk" - ], - "check-coverage": true - }, - "devDependencies": { - "eslint": "^7.25.0", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.1.0", - "eslint-plugin-standard": "^5.0.0", - "tap": "^15.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "repository": "https://github.com/isaacs/json-stringify-nice", - "files": [ - "index.js" - ] -} diff --git a/node_modules/npm/node_modules/jsonparse/LICENSE b/node_modules/npm/node_modules/jsonparse/LICENSE deleted file mode 100644 index 6dc24be..0000000 --- a/node_modules/npm/node_modules/jsonparse/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License - -Copyright (c) 2012 Tim Caswell - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/npm/node_modules/jsonparse/bench.js b/node_modules/npm/node_modules/jsonparse/bench.js deleted file mode 100644 index b36d92f..0000000 --- a/node_modules/npm/node_modules/jsonparse/bench.js +++ /dev/null @@ -1,26 +0,0 @@ -var fs = require('fs'), - Parser = require('./jsonparse'); - - -var json = fs.readFileSync("samplejson/basic.json"); - - -while (true) { - var start = Date.now(); - for (var i = 0; i < 1000; i++) { - JSON.parse(json); - } - var first = Date.now() - start; - - start = Date.now(); - var p = new Parser(); - for (var i = 0; i < 1000; i++) { - p.write(json); - } - var second = Date.now() - start; - - - console.log("JSON.parse took %s", first); - console.log("streaming parser took %s", second); - console.log("streaming is %s times slower", second / first); -} diff --git a/node_modules/npm/node_modules/jsonparse/examples/twitterfeed.js b/node_modules/npm/node_modules/jsonparse/examples/twitterfeed.js deleted file mode 100644 index 10210d4..0000000 --- a/node_modules/npm/node_modules/jsonparse/examples/twitterfeed.js +++ /dev/null @@ -1,30 +0,0 @@ -var Parser = require('../jsonparse'); -var Http = require('http'); -require('./colors'); -var p = new Parser(); -var cred = require('./credentials'); -var client = Http.createClient(80, "stream.twitter.com"); -var request = client.request("GET", "/1/statuses/sample.json", { - "Host": "stream.twitter.com", - "Authorization": (new Buffer(cred.username + ":" + cred.password)).toString("base64") -}); -request.on('response', function (response) { - console.log(response.statusCode); - console.dir(response.headers); - response.on('data', function (chunk) { - p.write(chunk); - }); - response.on('end', function () { - console.log("END"); - }); -}); -request.end(); -var text = "", name = ""; -p.onValue = function (value) { - if (this.stack.length === 1 && this.key === 'text') { text = value; } - if (this.stack.length === 2 && this.key === 'name' && this.stack[1].key === 'user') { name = value; } - if (this.stack.length === 0) { - console.log(text.blue + " - " + name.yellow); - text = name = ""; - } -}; diff --git a/node_modules/npm/node_modules/jsonparse/jsonparse.js b/node_modules/npm/node_modules/jsonparse/jsonparse.js deleted file mode 100644 index 3991060..0000000 --- a/node_modules/npm/node_modules/jsonparse/jsonparse.js +++ /dev/null @@ -1,413 +0,0 @@ -/*global Buffer*/ -// Named constants with unique integer values -var C = {}; -// Tokens -var LEFT_BRACE = C.LEFT_BRACE = 0x1; -var RIGHT_BRACE = C.RIGHT_BRACE = 0x2; -var LEFT_BRACKET = C.LEFT_BRACKET = 0x3; -var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4; -var COLON = C.COLON = 0x5; -var COMMA = C.COMMA = 0x6; -var TRUE = C.TRUE = 0x7; -var FALSE = C.FALSE = 0x8; -var NULL = C.NULL = 0x9; -var STRING = C.STRING = 0xa; -var NUMBER = C.NUMBER = 0xb; -// Tokenizer States -var START = C.START = 0x11; -var STOP = C.STOP = 0x12; -var TRUE1 = C.TRUE1 = 0x21; -var TRUE2 = C.TRUE2 = 0x22; -var TRUE3 = C.TRUE3 = 0x23; -var FALSE1 = C.FALSE1 = 0x31; -var FALSE2 = C.FALSE2 = 0x32; -var FALSE3 = C.FALSE3 = 0x33; -var FALSE4 = C.FALSE4 = 0x34; -var NULL1 = C.NULL1 = 0x41; -var NULL2 = C.NULL2 = 0x42; -var NULL3 = C.NULL3 = 0x43; -var NUMBER1 = C.NUMBER1 = 0x51; -var NUMBER3 = C.NUMBER3 = 0x53; -var STRING1 = C.STRING1 = 0x61; -var STRING2 = C.STRING2 = 0x62; -var STRING3 = C.STRING3 = 0x63; -var STRING4 = C.STRING4 = 0x64; -var STRING5 = C.STRING5 = 0x65; -var STRING6 = C.STRING6 = 0x66; -// Parser States -var VALUE = C.VALUE = 0x71; -var KEY = C.KEY = 0x72; -// Parser Modes -var OBJECT = C.OBJECT = 0x81; -var ARRAY = C.ARRAY = 0x82; -// Character constants -var BACK_SLASH = "\\".charCodeAt(0); -var FORWARD_SLASH = "\/".charCodeAt(0); -var BACKSPACE = "\b".charCodeAt(0); -var FORM_FEED = "\f".charCodeAt(0); -var NEWLINE = "\n".charCodeAt(0); -var CARRIAGE_RETURN = "\r".charCodeAt(0); -var TAB = "\t".charCodeAt(0); - -var STRING_BUFFER_SIZE = 64 * 1024; - -function Parser() { - this.tState = START; - this.value = undefined; - - this.string = undefined; // string data - this.stringBuffer = Buffer.alloc ? Buffer.alloc(STRING_BUFFER_SIZE) : new Buffer(STRING_BUFFER_SIZE); - this.stringBufferOffset = 0; - this.unicode = undefined; // unicode escapes - this.highSurrogate = undefined; - - this.key = undefined; - this.mode = undefined; - this.stack = []; - this.state = VALUE; - this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary - this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read - this.temp_buffs = { "2": new Buffer(2), "3": new Buffer(3), "4": new Buffer(4) }; // for rebuilding chars split before boundary is reached - - // Stream offset - this.offset = -1; -} - -// Slow code to string converter (only used when throwing syntax errors) -Parser.toknam = function (code) { - var keys = Object.keys(C); - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - if (C[key] === code) { return key; } - } - return code && ("0x" + code.toString(16)); -}; - -var proto = Parser.prototype; -proto.onError = function (err) { throw err; }; -proto.charError = function (buffer, i) { - this.tState = STOP; - this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + Parser.toknam(this.tState))); -}; -proto.appendStringChar = function (char) { - if (this.stringBufferOffset >= STRING_BUFFER_SIZE) { - this.string += this.stringBuffer.toString('utf8'); - this.stringBufferOffset = 0; - } - - this.stringBuffer[this.stringBufferOffset++] = char; -}; -proto.appendStringBuf = function (buf, start, end) { - var size = buf.length; - if (typeof start === 'number') { - if (typeof end === 'number') { - if (end < 0) { - // adding a negative end decreeses the size - size = buf.length - start + end; - } else { - size = end - start; - } - } else { - size = buf.length - start; - } - } - - if (size < 0) { - size = 0; - } - - if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) { - this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset); - this.stringBufferOffset = 0; - } - - buf.copy(this.stringBuffer, this.stringBufferOffset, start, end); - this.stringBufferOffset += size; -}; -proto.write = function (buffer) { - if (typeof buffer === "string") buffer = new Buffer(buffer); - var n; - for (var i = 0, l = buffer.length; i < l; i++) { - if (this.tState === START){ - n = buffer[i]; - this.offset++; - if(n === 0x7b){ this.onToken(LEFT_BRACE, "{"); // { - }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, "}"); // } - }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, "["); // [ - }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, "]"); // ] - }else if(n === 0x3a){ this.onToken(COLON, ":"); // : - }else if(n === 0x2c){ this.onToken(COMMA, ","); // , - }else if(n === 0x74){ this.tState = TRUE1; // t - }else if(n === 0x66){ this.tState = FALSE1; // f - }else if(n === 0x6e){ this.tState = NULL1; // n - }else if(n === 0x22){ // " - this.string = ""; - this.stringBufferOffset = 0; - this.tState = STRING1; - }else if(n === 0x2d){ this.string = "-"; this.tState = NUMBER1; // - - }else{ - if (n >= 0x30 && n < 0x40) { // 1-9 - this.string = String.fromCharCode(n); this.tState = NUMBER3; - } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) { - // whitespace - } else { - return this.charError(buffer, i); - } - } - }else if (this.tState === STRING1){ // After open quote - n = buffer[i]; // get current byte from buffer - // check for carry over of a multi byte char split between data chunks - // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration - if (this.bytes_remaining > 0) { - for (var j = 0; j < this.bytes_remaining; j++) { - this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j]; - } - - this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]); - this.bytes_in_sequence = this.bytes_remaining = 0; - i = i + j - 1; - } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time - if (n <= 193 || n > 244) { - return this.onError(new Error("Invalid UTF-8 character at position " + i + " in state " + Parser.toknam(this.tState))); - } - if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2; - if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3; - if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4; - if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split - for (var k = 0; k <= (buffer.length - 1 - i); k++) { - this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk - } - this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length; - i = buffer.length - 1; - } else { - this.appendStringBuf(buffer, i, i + this.bytes_in_sequence); - i = i + this.bytes_in_sequence - 1; - } - } else if (n === 0x22) { - this.tState = START; - this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset); - this.stringBufferOffset = 0; - this.onToken(STRING, this.string); - this.offset += Buffer.byteLength(this.string, 'utf8') + 1; - this.string = undefined; - } - else if (n === 0x5c) { - this.tState = STRING2; - } - else if (n >= 0x20) { this.appendStringChar(n); } - else { - return this.charError(buffer, i); - } - }else if (this.tState === STRING2){ // After backslash - n = buffer[i]; - if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1; - }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1; - }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1; - }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1; - }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1; - }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1; - }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1; - }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1; - }else if(n === 0x75){ this.unicode = ""; this.tState = STRING3; - }else{ - return this.charError(buffer, i); - } - }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes - n = buffer[i]; - // 0-9 A-F a-f - if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) { - this.unicode += String.fromCharCode(n); - if (this.tState++ === STRING6) { - var intVal = parseInt(this.unicode, 16); - this.unicode = undefined; - if (this.highSurrogate !== undefined && intVal >= 0xDC00 && intVal < (0xDFFF + 1)) { //<56320,57343> - lowSurrogate - this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal))); - this.highSurrogate = undefined; - } else if (this.highSurrogate === undefined && intVal >= 0xD800 && intVal < (0xDBFF + 1)) { //<55296,56319> - highSurrogate - this.highSurrogate = intVal; - } else { - if (this.highSurrogate !== undefined) { - this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))); - this.highSurrogate = undefined; - } - this.appendStringBuf(new Buffer(String.fromCharCode(intVal))); - } - this.tState = STRING1; - } - } else { - return this.charError(buffer, i); - } - } else if (this.tState === NUMBER1 || this.tState === NUMBER3) { - n = buffer[i]; - - switch (n) { - case 0x30: // 0 - case 0x31: // 1 - case 0x32: // 2 - case 0x33: // 3 - case 0x34: // 4 - case 0x35: // 5 - case 0x36: // 6 - case 0x37: // 7 - case 0x38: // 8 - case 0x39: // 9 - case 0x2e: // . - case 0x65: // e - case 0x45: // E - case 0x2b: // + - case 0x2d: // - - this.string += String.fromCharCode(n); - this.tState = NUMBER3; - break; - default: - this.tState = START; - var result = Number(this.string); - - if (isNaN(result)){ - return this.charError(buffer, i); - } - - if ((this.string.match(/[0-9]+/) == this.string) && (result.toString() != this.string)) { - // Long string of digits which is an ID string and not valid and/or safe JavaScript integer Number - this.onToken(STRING, this.string); - } else { - this.onToken(NUMBER, result); - } - - this.offset += this.string.length - 1; - this.string = undefined; - i--; - break; - } - }else if (this.tState === TRUE1){ // r - if (buffer[i] === 0x72) { this.tState = TRUE2; } - else { return this.charError(buffer, i); } - }else if (this.tState === TRUE2){ // u - if (buffer[i] === 0x75) { this.tState = TRUE3; } - else { return this.charError(buffer, i); } - }else if (this.tState === TRUE3){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); this.offset+= 3; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE1){ // a - if (buffer[i] === 0x61) { this.tState = FALSE2; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE2){ // l - if (buffer[i] === 0x6c) { this.tState = FALSE3; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE3){ // s - if (buffer[i] === 0x73) { this.tState = FALSE4; } - else { return this.charError(buffer, i); } - }else if (this.tState === FALSE4){ // e - if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); this.offset+= 4; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL1){ // u - if (buffer[i] === 0x75) { this.tState = NULL2; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL2){ // l - if (buffer[i] === 0x6c) { this.tState = NULL3; } - else { return this.charError(buffer, i); } - }else if (this.tState === NULL3){ // l - if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); this.offset += 3; } - else { return this.charError(buffer, i); } - } - } -}; -proto.onToken = function (token, value) { - // Override this to get events -}; - -proto.parseError = function (token, value) { - this.tState = STOP; - this.onError(new Error("Unexpected " + Parser.toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + Parser.toknam(this.state))); -}; -proto.push = function () { - this.stack.push({value: this.value, key: this.key, mode: this.mode}); -}; -proto.pop = function () { - var value = this.value; - var parent = this.stack.pop(); - this.value = parent.value; - this.key = parent.key; - this.mode = parent.mode; - this.emit(value); - if (!this.mode) { this.state = VALUE; } -}; -proto.emit = function (value) { - if (this.mode) { this.state = COMMA; } - this.onValue(value); -}; -proto.onValue = function (value) { - // Override me -}; -proto.onToken = function (token, value) { - if(this.state === VALUE){ - if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){ - if (this.value) { - this.value[this.key] = value; - } - this.emit(value); - }else if(token === LEFT_BRACE){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = {}; - } else { - this.value = {}; - } - this.key = undefined; - this.state = KEY; - this.mode = OBJECT; - }else if(token === LEFT_BRACKET){ - this.push(); - if (this.value) { - this.value = this.value[this.key] = []; - } else { - this.value = []; - } - this.key = 0; - this.mode = ARRAY; - this.state = VALUE; - }else if(token === RIGHT_BRACE){ - if (this.mode === OBJECT) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else if(token === RIGHT_BRACKET){ - if (this.mode === ARRAY) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else{ - return this.parseError(token, value); - } - }else if(this.state === KEY){ - if (token === STRING) { - this.key = value; - this.state = COLON; - } else if (token === RIGHT_BRACE) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else if(this.state === COLON){ - if (token === COLON) { this.state = VALUE; } - else { return this.parseError(token, value); } - }else if(this.state === COMMA){ - if (token === COMMA) { - if (this.mode === ARRAY) { this.key++; this.state = VALUE; } - else if (this.mode === OBJECT) { this.state = KEY; } - - } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) { - this.pop(); - } else { - return this.parseError(token, value); - } - }else{ - return this.parseError(token, value); - } -}; - -Parser.C = C; - -module.exports = Parser; diff --git a/node_modules/npm/node_modules/jsonparse/package.json b/node_modules/npm/node_modules/jsonparse/package.json deleted file mode 100644 index a2312ee..0000000 --- a/node_modules/npm/node_modules/jsonparse/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "jsonparse", - "description": "This is a pure-js JSON streaming parser for node.js", - "tags": ["json", "stream"], - "version": "1.3.1", - "author": "Tim Caswell ", - "repository": { - "type": "git", - "url": "http://github.com/creationix/jsonparse.git" - }, - "devDependencies": { - "tape": "~0.1.1", - "tap": "~0.3.3" - }, - "scripts": { - "test": "tap test/*.js" - }, - "bugs": "http://github.com/creationix/jsonparse/issues", - "engines": ["node >= 0.2.0"], - "license": "MIT", - "main": "jsonparse.js" -} diff --git a/node_modules/npm/node_modules/jsonparse/samplejson/basic.json b/node_modules/npm/node_modules/jsonparse/samplejson/basic.json deleted file mode 100644 index 950dff9..0000000 --- a/node_modules/npm/node_modules/jsonparse/samplejson/basic.json +++ /dev/null @@ -1,167 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5e+1, "y": 0.5, "z": 0.8e-0, "w": 0.5e5, "u": 2E10, "foo": 2E+1, "bar": 2E-0, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ] - } -] diff --git a/node_modules/npm/node_modules/jsonparse/samplejson/basic2.json b/node_modules/npm/node_modules/jsonparse/samplejson/basic2.json deleted file mode 100644 index 3a6919b..0000000 --- a/node_modules/npm/node_modules/jsonparse/samplejson/basic2.json +++ /dev/null @@ -1,180 +0,0 @@ -[ - { - }, - { - "image": [ - {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5, "y": 0.5, "width": 47, "height": 47} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} - ], - "solid": { - "1": [2,4], - "2": [1], - "3": [2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} - ], - "solid": { - "1": [2], - "2": [3], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [7], - "9": [6,8] - }, - "corners": {"1": false,"3": true,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [9], - "9": [6,8] - }, - "corners": {"1": true,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [6,2], - "4": [], - "5": [2,8,1,3,7,9,4,6], - "6": [9], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": false,"9": true} - }, - { - "image": [ - {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [4,2], - "2": [], - "3": [2,6], - "4": [7], - "5": [2,8,1,3,7,9,4,6], - "6": [], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": true,"3": true,"7": true,"9": false} - }, - { - "image": [ - {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} - ], - "jumpable": 3 - }, - { - "image": [ - {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} - ], - "jumpable": 3, - "solid": { - "1": [2,4], - "2": [], - "3": [2,6], - "4": [1], - "5": [2,8,1,3,7,9,4,6], - "6": [3], - "7": [4,8], - "8": [], - "9": [6,8] - }, - "corners": {"1": false,"3": false,"7": true,"9": true} - }, - { - "image": [ - {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, - {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, - {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, - {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, - {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#80f", "stroke": "#88f", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - }, - { - "image": [ - {"shape": "circle", "fill": "#4f4", "stroke": "#8f8", "cx": 24, "cy": 24, "r": 18} - ], - "item": true - } -] diff --git a/node_modules/npm/node_modules/jsonparse/test/big-token.js b/node_modules/npm/node_modules/jsonparse/test/big-token.js deleted file mode 100644 index 3604631..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/big-token.js +++ /dev/null @@ -1,24 +0,0 @@ -var stream = require('stream'); -var JsonParse = require('../jsonparse'); -var test = require('tape'); - -test('can handle large tokens without running out of memory', function (t) { - var parser = new JsonParse(); - var chunkSize = 1024; - var chunks = 1024 * 200; // 200mb - var quote = Buffer.from ? Buffer.from('"') : new Buffer('"'); - t.plan(1); - - parser.onToken = function (type, value) { - t.equal(value.length, chunkSize * chunks, 'token should be size of input json'); - t.end(); - }; - - parser.write(quote); - for (var i = 0; i < chunks; ++i) { - var buf = Buffer.alloc ? Buffer.alloc(chunkSize) : new Buffer(chunkSize); - buf.fill('a'); - parser.write(buf); - } - parser.write(quote); -}); diff --git a/node_modules/npm/node_modules/jsonparse/test/boundary.js b/node_modules/npm/node_modules/jsonparse/test/boundary.js deleted file mode 100644 index 6671f5f..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/boundary.js +++ /dev/null @@ -1,110 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('2 byte utf8 \'De\' character: д', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'д'); - }; - - var de_buffer = new Buffer([0xd0, 0xb4]); - - p.write('"'); - p.write(de_buffer); - p.write('"'); - -}); - -test('3 byte utf8 \'Han\' character: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer = new Buffer([0xe6, 0x88, 0x91]); - p.write('"'); - p.write(han_buffer); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E): 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer = new Buffer([0xf0, 0xa0, 0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer); - p.write('"'); -}); - -test('3 byte utf8 \'Han\' character chunked inbetween 2nd and 3rd byte: 我', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '我'); - }; - - var han_buffer_first = new Buffer([0xe6, 0x88]); - var han_buffer_second = new Buffer([0x91]); - p.write('"'); - p.write(han_buffer_first); - p.write(han_buffer_second); - p.write('"'); -}); - -test('4 byte utf8 character (unicode scalar U+2070E) chunked inbetween 2nd and 3rd byte: 𠜎', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '𠜎'); - }; - - var Ux2070E_buffer_first = new Buffer([0xf0, 0xa0]); - var Ux2070E_buffer_second = new Buffer([0x9c, 0x8e]); - p.write('"'); - p.write(Ux2070E_buffer_first); - p.write(Ux2070E_buffer_second); - p.write('"'); -}); - -test('1-4 byte utf8 character string chunked inbetween random bytes: Aж文𠜱B', function (t) { - t.plan(1); - -var p = new Parser(); - p.onValue = function (value) { - t.equal(value, 'Aж文𠜱B'); - }; - - var eclectic_buffer = new Buffer([0x41, // A - 0xd0, 0xb6, // ж - 0xe6, 0x96, 0x87, // 文 - 0xf0, 0xa0, 0x9c, 0xb1, // 𠜱 - 0x42]); // B - - var rand_chunk = Math.floor(Math.random() * (eclectic_buffer.length)); - var first_buffer = eclectic_buffer.slice(0, rand_chunk); - var second_buffer = eclectic_buffer.slice(rand_chunk); - - //console.log('eclectic_buffer: ' + eclectic_buffer) - //console.log('sliced from 0 to ' + rand_chunk); - //console.log(first_buffer); - //console.log('then sliced from ' + rand_chunk + ' to the end'); - //console.log(second_buffer); - - console.log('chunked after offset ' + rand_chunk); - p.write('"'); - p.write(first_buffer); - p.write(second_buffer); - p.write('"'); - -}); \ No newline at end of file diff --git a/node_modules/npm/node_modules/jsonparse/test/offset.js b/node_modules/npm/node_modules/jsonparse/test/offset.js deleted file mode 100644 index 9a552ab..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/offset.js +++ /dev/null @@ -1,67 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -var input = '{\n "string": "value",\n "number": 3,\n "object"'; -var input2 = ': {\n "key": "vд"\n },\n "array": [\n -1,\n 12\n ]\n '; -var input3 = '"null": null, "true": true, "false": false, "frac": 3.14 }'; - -var offsets = [ - [ 0, Parser.C.LEFT_BRACE ], - [ 4, Parser.C.STRING ], - [ 12, Parser.C.COLON ], - [ 14, Parser.C.STRING ], - [ 21, Parser.C.COMMA ], - [ 25, Parser.C.STRING ], - [ 33, Parser.C.COLON ], - [ 35, Parser.C.NUMBER ], - [ 36, Parser.C.COMMA ], - [ 40, Parser.C.STRING ], - [ 48, Parser.C.COLON ], - [ 50, Parser.C.LEFT_BRACE ], - [ 54, Parser.C.STRING ], - [ 59, Parser.C.COLON ], - [ 61, Parser.C.STRING ], - [ 69, Parser.C.RIGHT_BRACE ], - [ 70, Parser.C.COMMA ], - [ 74, Parser.C.STRING ], - [ 81, Parser.C.COLON ], - [ 83, Parser.C.LEFT_BRACKET ], - [ 87, Parser.C.NUMBER ], - [ 89, Parser.C.COMMA ], - [ 93, Parser.C.NUMBER ], - [ 98, Parser.C.RIGHT_BRACKET ], - [ 102, Parser.C.STRING ], - [ 108, Parser.C.COLON ], - [ 110, Parser.C.NULL ], - [ 114, Parser.C.COMMA ], - [ 116, Parser.C.STRING ], - [ 122, Parser.C.COLON ], - [ 124, Parser.C.TRUE ], - [ 128, Parser.C.COMMA ], - [ 130, Parser.C.STRING ], - [ 137, Parser.C.COLON ], - [ 139, Parser.C.FALSE ], - [ 144, Parser.C.COMMA ], - [ 146, Parser.C.STRING ], - [ 152, Parser.C.COLON ], - [ 154, Parser.C.NUMBER ], - [ 159, Parser.C.RIGHT_BRACE ] -]; - -test('offset', function(t) { - t.plan(offsets.length * 2 + 1); - - var p = new Parser(); - var i = 0; - p.onToken = function (token) { - t.equal(p.offset, offsets[i][0]); - t.equal(token, offsets[i][1]); - i++; - }; - - p.write(input); - p.write(input2); - p.write(input3); - - t.equal(i, offsets.length); -}); diff --git a/node_modules/npm/node_modules/jsonparse/test/primitives.js b/node_modules/npm/node_modules/jsonparse/test/primitives.js deleted file mode 100644 index 33cae16..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/primitives.js +++ /dev/null @@ -1,57 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -var expected = [ - [ [], '' ], - [ [], 'Hello' ], - [ [], 'This"is' ], - [ [], '\r\n\f\t\\/"' ], - [ [], 'Λάμβδα' ], - [ [], '\\' ], - [ [], '/' ], - [ [], '"' ], - [ [ 0 ], 0 ], - [ [ 1 ], 1 ], - [ [ 2 ], -1 ], - [ [], [ 0, 1, -1 ] ], - [ [ 0 ], 1 ], - [ [ 1 ], 1.1 ], - [ [ 2 ], -1.1 ], - [ [ 3 ], -1 ], - [ [], [ 1, 1.1, -1.1, -1 ] ], - [ [ 0 ], -1 ], - [ [], [ -1 ] ], - [ [ 0 ], -0.1 ], - [ [], [ -0.1 ] ], - [ [ 0 ], 6.02e+23 ], - [ [], [ 6.02e+23 ] ], - [ [ 0 ], '7161093205057351174' ], - [ [], [ '7161093205057351174'] ] -]; - -test('primitives', function (t) { - t.plan(25); - - var p = new Parser(); - p.onValue = function (value) { - var keys = this.stack - .slice(1) - .map(function (item) { return item.key }) - .concat(this.key !== undefined ? this.key : []) - ; - t.deepEqual( - [ keys, value ], - expected.shift() - ); - }; - - p.write('"""Hello""This\\"is""\\r\\n\\f\\t\\\\\\/\\""'); - p.write('"\\u039b\\u03ac\\u03bc\\u03b2\\u03b4\\u03b1"'); - p.write('"\\\\"'); - p.write('"\\/"'); - p.write('"\\""'); - p.write('[0,1,-1]'); - p.write('[1.0,1.1,-1.1,-1.0][-1][-0.1]'); - p.write('[6.02e23]'); - p.write('[7161093205057351174]'); -}); diff --git a/node_modules/npm/node_modules/jsonparse/test/surrogate.js b/node_modules/npm/node_modules/jsonparse/test/surrogate.js deleted file mode 100644 index c048f37..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/surrogate.js +++ /dev/null @@ -1,26 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('parse surrogate pair', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '😋'); - }; - - p.write('"\\uD83D\\uDE0B"'); -}); - -test('parse chunked surrogate pair', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '😋'); - }; - - p.write('"\\uD83D'); - p.write('\\uDE0B"'); -}); - diff --git a/node_modules/npm/node_modules/jsonparse/test/unvalid.js b/node_modules/npm/node_modules/jsonparse/test/unvalid.js deleted file mode 100644 index 7715cc0..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/unvalid.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('unvalid', function (t) { - var count = 0; - - var p = new Parser(); - p.onError = function (value) { - count++; - t.equal(1, count); - t.end(); - }; - - p.write('{"test": eer['); -}); diff --git a/node_modules/npm/node_modules/jsonparse/test/utf8.js b/node_modules/npm/node_modules/jsonparse/test/utf8.js deleted file mode 100644 index 6cb842f..0000000 --- a/node_modules/npm/node_modules/jsonparse/test/utf8.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape'); -var Parser = require('../'); - -test('3 bytes of utf8', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '├──'); - }; - - p.write('"├──"'); -}); - -test('utf8 snowman', function (t) { - t.plan(1); - - var p = new Parser(); - p.onValue = function (value) { - t.equal(value, '☃'); - }; - - p.write('"☃"'); -}); - -test('utf8 with regular ascii', function (t) { - t.plan(4); - - var p = new Parser(); - var expected = [ "snow: ☃!", "xyz", "¡que!" ]; - expected.push(expected.slice()); - - p.onValue = function (value) { - t.deepEqual(value, expected.shift()); - }; - - p.write('["snow: ☃!","xyz","¡que!"]'); -}); diff --git a/node_modules/npm/node_modules/just-diff-apply/LICENSE b/node_modules/npm/node_modules/just-diff-apply/LICENSE deleted file mode 100644 index 5d2c6e5..0000000 --- a/node_modules/npm/node_modules/just-diff-apply/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 angus croll - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/just-diff-apply/index.cjs b/node_modules/npm/node_modules/just-diff-apply/index.cjs deleted file mode 100644 index c5d2c32..0000000 --- a/node_modules/npm/node_modules/just-diff-apply/index.cjs +++ /dev/null @@ -1,161 +0,0 @@ -module.exports = { - diffApply: diffApply, - jsonPatchPathConverter: jsonPatchPathConverter, -}; - -/* - const obj1 = {a: 3, b: 5}; - diffApply(obj1, - [ - { "op": "remove", "path": ['b'] }, - { "op": "replace", "path": ['a'], "value": 4 }, - { "op": "add", "path": ['c'], "value": 5 } - ] - ); - obj1; // {a: 4, c: 5} - - // using converter to apply jsPatch standard paths - // see http://jsonpatch.com - import {diff, jsonPatchPathConverter} from 'just-diff' - const obj2 = {a: 3, b: 5}; - diffApply(obj2, [ - { "op": "remove", "path": '/b' }, - { "op": "replace", "path": '/a', "value": 4 } - { "op": "add", "path": '/c', "value": 5 } - ], jsonPatchPathConverter); - obj2; // {a: 4, c: 5} - - // arrays - const obj3 = {a: 4, b: [1, 2, 3]}; - diffApply(obj3, [ - { "op": "replace", "path": ['a'], "value": 3 } - { "op": "replace", "path": ['b', 2], "value": 4 } - { "op": "add", "path": ['b', 3], "value": 9 } - ]); - obj3; // {a: 3, b: [1, 2, 4, 9]} - - // nested paths - const obj4 = {a: 4, b: {c: 3}}; - diffApply(obj4, [ - { "op": "replace", "path": ['a'], "value": 5 } - { "op": "remove", "path": ['b', 'c']} - { "op": "add", "path": ['b', 'd'], "value": 4 } - ]); - obj4; // {a: 5, b: {d: 4}} -*/ - -var REMOVE = 'remove'; -var REPLACE = 'replace'; -var ADD = 'add'; -var MOVE = 'move'; - -function diffApply(obj, diff, pathConverter) { - if (!obj || typeof obj != 'object') { - throw new Error('base object must be an object or an array'); - } - - if (!Array.isArray(diff)) { - throw new Error('diff must be an array'); - } - - var diffLength = diff.length; - for (var i = 0; i < diffLength; i++) { - var thisDiff = diff[i]; - var subObject = obj; - var thisOp = thisDiff.op; - - var thisPath = transformPath(pathConverter, thisDiff.path); - var thisFromPath = thisDiff.from && transformPath(pathConverter, thisDiff.from); - var toPath, toPathCopy, lastToProp, subToObject, valueToMove; - - if (thisFromPath) { - // MOVE only, "fromPath" is effectively path and "path" is toPath - toPath = thisPath; - thisPath = thisFromPath; - - toPathCopy = toPath.slice(); - lastToProp = toPathCopy.pop(); - prototypeCheck(lastToProp); - if (lastToProp == null) { - return false; - } - - var thisToProp; - while (((thisToProp = toPathCopy.shift())) != null) { - prototypeCheck(thisToProp); - if (!(thisToProp in subToObject)) { - subToObject[thisToProp] = {}; - } - subToObject = subToObject[thisToProp]; - } - } - - var pathCopy = thisPath.slice(); - var lastProp = pathCopy.pop(); - prototypeCheck(lastProp); - if (lastProp == null) { - return false; - } - - var thisProp; - while (((thisProp = pathCopy.shift())) != null) { - prototypeCheck(thisProp); - if (!(thisProp in subObject)) { - subObject[thisProp] = {}; - } - subObject = subObject[thisProp]; - } - if (thisOp === REMOVE || thisOp === REPLACE || thisOp === MOVE) { - var path = thisOp === MOVE ? thisDiff.from : thisDiff.path; - if (!subObject.hasOwnProperty(lastProp)) { - throw new Error(['expected to find property', path, 'in object', obj].join(' ')); - } - } - if (thisOp === REMOVE || thisOp === MOVE) { - if (thisOp === MOVE) { - valueToMove = subObject[lastProp]; - } - Array.isArray(subObject) ? subObject.splice(lastProp, 1) : delete subObject[lastProp]; - } - if (thisOp === REPLACE || thisOp === ADD) { - subObject[lastProp] = thisDiff.value; - } - - if (thisOp === MOVE) { - subObject[lastToProp] = valueToMove; - } - } - return subObject; -} - -function transformPath(pathConverter, thisPath) { - if(pathConverter) { - thisPath = pathConverter(thisPath); - if(!Array.isArray(thisPath)) { - throw new Error([ - 'pathConverter must return an array, returned:', - thisPath, - ].join(' ')); - } - } else { - if(!Array.isArray(thisPath)) { - throw new Error([ - 'diff path', - thisPath, - 'must be an array, consider supplying a path converter'] - .join(' ')); - } - } - return thisPath; -} - -function jsonPatchPathConverter(stringPath) { - return stringPath.split('/').slice(1); -} - -function prototypeCheck(prop) { - // coercion is intentional to catch prop values like `['__proto__']` - if (prop == '__proto__' || prop == 'constructor' || prop == 'prototype') { - throw new Error('setting of prototype values not supported'); - } -} diff --git a/node_modules/npm/node_modules/just-diff-apply/index.mjs b/node_modules/npm/node_modules/just-diff-apply/index.mjs deleted file mode 100644 index adc5f46..0000000 --- a/node_modules/npm/node_modules/just-diff-apply/index.mjs +++ /dev/null @@ -1,158 +0,0 @@ -/* - const obj1 = {a: 3, b: 5}; - diffApply(obj1, - [ - { "op": "remove", "path": ['b'] }, - { "op": "replace", "path": ['a'], "value": 4 }, - { "op": "add", "path": ['c'], "value": 5 } - ] - ); - obj1; // {a: 4, c: 5} - - // using converter to apply jsPatch standard paths - // see http://jsonpatch.com - import {diff, jsonPatchPathConverter} from 'just-diff' - const obj2 = {a: 3, b: 5}; - diffApply(obj2, [ - { "op": "remove", "path": '/b' }, - { "op": "replace", "path": '/a', "value": 4 } - { "op": "add", "path": '/c', "value": 5 } - ], jsonPatchPathConverter); - obj2; // {a: 4, c: 5} - - // arrays - const obj3 = {a: 4, b: [1, 2, 3]}; - diffApply(obj3, [ - { "op": "replace", "path": ['a'], "value": 3 } - { "op": "replace", "path": ['b', 2], "value": 4 } - { "op": "add", "path": ['b', 3], "value": 9 } - ]); - obj3; // {a: 3, b: [1, 2, 4, 9]} - - // nested paths - const obj4 = {a: 4, b: {c: 3}}; - diffApply(obj4, [ - { "op": "replace", "path": ['a'], "value": 5 } - { "op": "remove", "path": ['b', 'c']} - { "op": "add", "path": ['b', 'd'], "value": 4 } - ]); - obj4; // {a: 5, b: {d: 4}} -*/ - -var REMOVE = 'remove'; -var REPLACE = 'replace'; -var ADD = 'add'; -var MOVE = 'move'; - -function diffApply(obj, diff, pathConverter) { - if (!obj || typeof obj != 'object') { - throw new Error('base object must be an object or an array'); - } - - if (!Array.isArray(diff)) { - throw new Error('diff must be an array'); - } - - var diffLength = diff.length; - for (var i = 0; i < diffLength; i++) { - var thisDiff = diff[i]; - var subObject = obj; - var thisOp = thisDiff.op; - - var thisPath = transformPath(pathConverter, thisDiff.path); - var thisFromPath = thisDiff.from && transformPath(pathConverter, thisDiff.from); - var toPath, toPathCopy, lastToProp, subToObject, valueToMove; - - if (thisFromPath) { - // MOVE only, "fromPath" is effectively path and "path" is toPath - toPath = thisPath; - thisPath = thisFromPath; - - toPathCopy = toPath.slice(); - lastToProp = toPathCopy.pop(); - prototypeCheck(lastToProp); - if (lastToProp == null) { - return false; - } - - var thisToProp; - while (((thisToProp = toPathCopy.shift())) != null) { - prototypeCheck(thisToProp); - if (!(thisToProp in subToObject)) { - subToObject[thisToProp] = {}; - } - subToObject = subToObject[thisToProp]; - } - } - - var pathCopy = thisPath.slice(); - var lastProp = pathCopy.pop(); - prototypeCheck(lastProp); - if (lastProp == null) { - return false; - } - - var thisProp; - while (((thisProp = pathCopy.shift())) != null) { - prototypeCheck(thisProp); - if (!(thisProp in subObject)) { - subObject[thisProp] = {}; - } - subObject = subObject[thisProp]; - } - if (thisOp === REMOVE || thisOp === REPLACE || thisOp === MOVE) { - var path = thisOp === MOVE ? thisDiff.from : thisDiff.path; - if (!subObject.hasOwnProperty(lastProp)) { - throw new Error(['expected to find property', path, 'in object', obj].join(' ')); - } - } - if (thisOp === REMOVE || thisOp === MOVE) { - if (thisOp === MOVE) { - valueToMove = subObject[lastProp]; - } - Array.isArray(subObject) ? subObject.splice(lastProp, 1) : delete subObject[lastProp]; - } - if (thisOp === REPLACE || thisOp === ADD) { - subObject[lastProp] = thisDiff.value; - } - - if (thisOp === MOVE) { - subObject[lastToProp] = valueToMove; - } - } - return subObject; -} - -function transformPath(pathConverter, thisPath) { - if(pathConverter) { - thisPath = pathConverter(thisPath); - if(!Array.isArray(thisPath)) { - throw new Error([ - 'pathConverter must return an array, returned:', - thisPath, - ].join(' ')); - } - } else { - if(!Array.isArray(thisPath)) { - throw new Error([ - 'diff path', - thisPath, - 'must be an array, consider supplying a path converter'] - .join(' ')); - } - } - return thisPath; -} - -function jsonPatchPathConverter(stringPath) { - return stringPath.split('/').slice(1); -} - -function prototypeCheck(prop) { - // coercion is intentional to catch prop values like `['__proto__']` - if (prop == '__proto__' || prop == 'constructor' || prop == 'prototype') { - throw new Error('setting of prototype values not supported'); - } -} - -export {diffApply, jsonPatchPathConverter}; diff --git a/node_modules/npm/node_modules/just-diff-apply/package.json b/node_modules/npm/node_modules/just-diff-apply/package.json deleted file mode 100644 index be2879a..0000000 --- a/node_modules/npm/node_modules/just-diff-apply/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "just-diff-apply", - "version": "5.5.0", - "description": "Apply a diff to an object. Optionally supports jsonPatch protocol", - "type": "module", - "exports": { - ".": { - "types": "./index.d.ts", - "require": "./index.cjs", - "import": "./index.mjs" - }, - "./package.json": "./package.json" - }, - "main": "index.cjs", - "types": "index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "rollup -c" - }, - "repository": "https://github.com/angus-c/just", - "keywords": [ - "object", - "diff", - "apply", - "jsonPatch", - "no-dependencies", - "just" - ], - "author": "Angus Croll", - "license": "MIT", - "bugs": { - "url": "https://github.com/angus-c/just/issues" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/just-diff-apply/rollup.config.js b/node_modules/npm/node_modules/just-diff-apply/rollup.config.js deleted file mode 100644 index fb9d24a..0000000 --- a/node_modules/npm/node_modules/just-diff-apply/rollup.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const createRollupConfig = require('../../config/createRollupConfig'); - -module.exports = createRollupConfig(__dirname); diff --git a/node_modules/npm/node_modules/just-diff/LICENSE b/node_modules/npm/node_modules/just-diff/LICENSE deleted file mode 100644 index 5d2c6e5..0000000 --- a/node_modules/npm/node_modules/just-diff/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 angus croll - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/npm/node_modules/just-diff/index.cjs b/node_modules/npm/node_modules/just-diff/index.cjs deleted file mode 100644 index b74099d..0000000 --- a/node_modules/npm/node_modules/just-diff/index.cjs +++ /dev/null @@ -1,230 +0,0 @@ -module.exports = { - diff: diff, - jsonPatchPathConverter: jsonPatchPathConverter, -}; - -/* - const obj1 = {a: 4, b: 5}; - const obj2 = {a: 3, b: 5}; - const obj3 = {a: 4, c: 5}; - - diff(obj1, obj2); - [ - { "op": "replace", "path": ['a'], "value": 3 } - ] - - diff(obj2, obj3); - [ - { "op": "remove", "path": ['b'] }, - { "op": "replace", "path": ['a'], "value": 4 } - { "op": "add", "path": ['c'], "value": 5 } - ] - - // using converter to generate jsPatch standard paths - // see http://jsonpatch.com - import {diff, jsonPatchPathConverter} from 'just-diff' - diff(obj1, obj2, jsonPatchPathConverter); - [ - { "op": "replace", "path": '/a', "value": 3 } - ] - - diff(obj2, obj3, jsonPatchPathConverter); - [ - { "op": "remove", "path": '/b' }, - { "op": "replace", "path": '/a', "value": 4 } - { "op": "add", "path": '/c', "value": 5 } - ] - - // arrays - const obj4 = {a: 4, b: [1, 2, 3]}; - const obj5 = {a: 3, b: [1, 2, 4]}; - const obj6 = {a: 3, b: [1, 2, 4, 5]}; - - diff(obj4, obj5); - [ - { "op": "replace", "path": ['a'], "value": 3 } - { "op": "replace", "path": ['b', 2], "value": 4 } - ] - - diff(obj5, obj6); - [ - { "op": "add", "path": ['b', 3], "value": 5 } - ] - - // nested paths - const obj7 = {a: 4, b: {c: 3}}; - const obj8 = {a: 4, b: {c: 4}}; - const obj9 = {a: 5, b: {d: 4}}; - - diff(obj7, obj8); - [ - { "op": "replace", "path": ['b', 'c'], "value": 4 } - ] - - diff(obj8, obj9); - [ - { "op": "replace", "path": ['a'], "value": 5 } - { "op": "remove", "path": ['b', 'c']} - { "op": "add", "path": ['b', 'd'], "value": 4 } - ] -*/ - -function diff(obj1, obj2, pathConverter) { - if (!obj1 || typeof obj1 != 'object' || !obj2 || typeof obj2 != 'object') { - throw new Error('both arguments must be objects or arrays'); - } - - pathConverter || - (pathConverter = function(arr) { - return arr; - }); - - function getDiff({obj1, obj2, basePath, basePathForRemoves, diffs}) { - var obj1Keys = Object.keys(obj1); - var obj1KeysLength = obj1Keys.length; - var obj2Keys = Object.keys(obj2); - var obj2KeysLength = obj2Keys.length; - var path; - - var lengthDelta = obj1.length - obj2.length; - - if (trimFromRight(obj1, obj2)) { - for (var i = 0; i < obj1KeysLength; i++) { - var key = Array.isArray(obj1) ? Number(obj1Keys[i]) : obj1Keys[i]; - if (!(key in obj2)) { - path = basePathForRemoves.concat(key); - diffs.remove.push({ - op: 'remove', - path: pathConverter(path), - }); - } - } - - for (var i = 0; i < obj2KeysLength; i++) { - var key = Array.isArray(obj2) ? Number(obj2Keys[i]) : obj2Keys[i]; - pushReplaces({ - key, - obj1, - obj2, - path: basePath.concat(key), - pathForRemoves: basePath.concat(key), - diffs, - }); - } - } else { - // trim from left, objects are both arrays - for (var i = 0; i < lengthDelta; i++) { - path = basePathForRemoves.concat(i); - diffs.remove.push({ - op: 'remove', - path: pathConverter(path), - }); - } - - // now make a copy of obj1 with excess elements left trimmed and see if there any replaces - var obj1Trimmed = obj1.slice(lengthDelta);; - for (var i = 0; i < obj2KeysLength; i++) { - pushReplaces({ - key: i, - obj1: obj1Trimmed, - obj2, - path: basePath.concat(i), - // since list of removes are reversed before presenting result, - // we need to ignore existing parent removes when doing nested removes - pathForRemoves: basePath.concat(i + lengthDelta), - diffs, - }); - } - } - } - - var diffs = {remove: [], replace: [], add: []}; - getDiff({ - obj1, - obj2, - basePath: [], - basePathForRemoves: [], - diffs, - }); - - // reverse removes since we want to maintain indexes - return diffs.remove - .reverse() - .concat(diffs.replace) - .concat(diffs.add); - - function pushReplaces({key, obj1, obj2, path, pathForRemoves, diffs}) { - var obj1AtKey = obj1[key]; - var obj2AtKey = obj2[key]; - - if(!(key in obj1) && (key in obj2)) { - var obj2Value = obj2AtKey; - diffs.add.push({ - op: 'add', - path: pathConverter(path), - value: obj2Value, - }); - } else if(obj1AtKey !== obj2AtKey) { - if(Object(obj1AtKey) !== obj1AtKey || - Object(obj2AtKey) !== obj2AtKey || differentTypes(obj1AtKey, obj2AtKey) - ) { - pushReplace(path, diffs, obj2AtKey); - } else { - if(!Object.keys(obj1AtKey).length && - !Object.keys(obj2AtKey).length && - String(obj1AtKey) != String(obj2AtKey)) { - pushReplace(path, diffs, obj2AtKey); - } else { - getDiff({ - obj1: obj1[key], - obj2: obj2[key], - basePath: path, - basePathForRemoves: pathForRemoves, - diffs}); - } - } - } - } - - function pushReplace(path, diffs, newValue) { - diffs.replace.push({ - op: 'replace', - path: pathConverter(path), - value: newValue, - }); - } -} - -function jsonPatchPathConverter(arrayPath) { - return [''].concat(arrayPath).join('/'); -} - -function differentTypes(a, b) { - return Object.prototype.toString.call(a) != Object.prototype.toString.call(b); -} - -function trimFromRight(obj1, obj2) { - var lengthDelta = obj1.length - obj2.length; - if (Array.isArray(obj1) && Array.isArray(obj2) && lengthDelta > 0) { - var leftMatches = 0; - var rightMatches = 0; - for (var i = 0; i < obj2.length; i++) { - if (String(obj1[i]) === String(obj2[i])) { - leftMatches++; - } else { - break; - } - } - for (var j = obj2.length; j > 0; j--) { - if (String(obj1[j + lengthDelta]) === String(obj2[j])) { - rightMatches++; - } else { - break; - } - } - - // bias to trim right becase it requires less index shifting - return leftMatches >= rightMatches; - } - return true; -} diff --git a/node_modules/npm/node_modules/just-diff/index.mjs b/node_modules/npm/node_modules/just-diff/index.mjs deleted file mode 100644 index 4a84787..0000000 --- a/node_modules/npm/node_modules/just-diff/index.mjs +++ /dev/null @@ -1,227 +0,0 @@ -/* - const obj1 = {a: 4, b: 5}; - const obj2 = {a: 3, b: 5}; - const obj3 = {a: 4, c: 5}; - - diff(obj1, obj2); - [ - { "op": "replace", "path": ['a'], "value": 3 } - ] - - diff(obj2, obj3); - [ - { "op": "remove", "path": ['b'] }, - { "op": "replace", "path": ['a'], "value": 4 } - { "op": "add", "path": ['c'], "value": 5 } - ] - - // using converter to generate jsPatch standard paths - // see http://jsonpatch.com - import {diff, jsonPatchPathConverter} from 'just-diff' - diff(obj1, obj2, jsonPatchPathConverter); - [ - { "op": "replace", "path": '/a', "value": 3 } - ] - - diff(obj2, obj3, jsonPatchPathConverter); - [ - { "op": "remove", "path": '/b' }, - { "op": "replace", "path": '/a', "value": 4 } - { "op": "add", "path": '/c', "value": 5 } - ] - - // arrays - const obj4 = {a: 4, b: [1, 2, 3]}; - const obj5 = {a: 3, b: [1, 2, 4]}; - const obj6 = {a: 3, b: [1, 2, 4, 5]}; - - diff(obj4, obj5); - [ - { "op": "replace", "path": ['a'], "value": 3 } - { "op": "replace", "path": ['b', 2], "value": 4 } - ] - - diff(obj5, obj6); - [ - { "op": "add", "path": ['b', 3], "value": 5 } - ] - - // nested paths - const obj7 = {a: 4, b: {c: 3}}; - const obj8 = {a: 4, b: {c: 4}}; - const obj9 = {a: 5, b: {d: 4}}; - - diff(obj7, obj8); - [ - { "op": "replace", "path": ['b', 'c'], "value": 4 } - ] - - diff(obj8, obj9); - [ - { "op": "replace", "path": ['a'], "value": 5 } - { "op": "remove", "path": ['b', 'c']} - { "op": "add", "path": ['b', 'd'], "value": 4 } - ] -*/ - -function diff(obj1, obj2, pathConverter) { - if (!obj1 || typeof obj1 != 'object' || !obj2 || typeof obj2 != 'object') { - throw new Error('both arguments must be objects or arrays'); - } - - pathConverter || - (pathConverter = function(arr) { - return arr; - }); - - function getDiff({obj1, obj2, basePath, basePathForRemoves, diffs}) { - var obj1Keys = Object.keys(obj1); - var obj1KeysLength = obj1Keys.length; - var obj2Keys = Object.keys(obj2); - var obj2KeysLength = obj2Keys.length; - var path; - - var lengthDelta = obj1.length - obj2.length; - - if (trimFromRight(obj1, obj2)) { - for (var i = 0; i < obj1KeysLength; i++) { - var key = Array.isArray(obj1) ? Number(obj1Keys[i]) : obj1Keys[i]; - if (!(key in obj2)) { - path = basePathForRemoves.concat(key); - diffs.remove.push({ - op: 'remove', - path: pathConverter(path), - }); - } - } - - for (var i = 0; i < obj2KeysLength; i++) { - var key = Array.isArray(obj2) ? Number(obj2Keys[i]) : obj2Keys[i]; - pushReplaces({ - key, - obj1, - obj2, - path: basePath.concat(key), - pathForRemoves: basePath.concat(key), - diffs, - }); - } - } else { - // trim from left, objects are both arrays - for (var i = 0; i < lengthDelta; i++) { - path = basePathForRemoves.concat(i); - diffs.remove.push({ - op: 'remove', - path: pathConverter(path), - }); - } - - // now make a copy of obj1 with excess elements left trimmed and see if there any replaces - var obj1Trimmed = obj1.slice(lengthDelta);; - for (var i = 0; i < obj2KeysLength; i++) { - pushReplaces({ - key: i, - obj1: obj1Trimmed, - obj2, - path: basePath.concat(i), - // since list of removes are reversed before presenting result, - // we need to ignore existing parent removes when doing nested removes - pathForRemoves: basePath.concat(i + lengthDelta), - diffs, - }); - } - } - } - - var diffs = {remove: [], replace: [], add: []}; - getDiff({ - obj1, - obj2, - basePath: [], - basePathForRemoves: [], - diffs, - }); - - // reverse removes since we want to maintain indexes - return diffs.remove - .reverse() - .concat(diffs.replace) - .concat(diffs.add); - - function pushReplaces({key, obj1, obj2, path, pathForRemoves, diffs}) { - var obj1AtKey = obj1[key]; - var obj2AtKey = obj2[key]; - - if(!(key in obj1) && (key in obj2)) { - var obj2Value = obj2AtKey; - diffs.add.push({ - op: 'add', - path: pathConverter(path), - value: obj2Value, - }); - } else if(obj1AtKey !== obj2AtKey) { - if(Object(obj1AtKey) !== obj1AtKey || - Object(obj2AtKey) !== obj2AtKey || differentTypes(obj1AtKey, obj2AtKey) - ) { - pushReplace(path, diffs, obj2AtKey); - } else { - if(!Object.keys(obj1AtKey).length && - !Object.keys(obj2AtKey).length && - String(obj1AtKey) != String(obj2AtKey)) { - pushReplace(path, diffs, obj2AtKey); - } else { - getDiff({ - obj1: obj1[key], - obj2: obj2[key], - basePath: path, - basePathForRemoves: pathForRemoves, - diffs}); - } - } - } - } - - function pushReplace(path, diffs, newValue) { - diffs.replace.push({ - op: 'replace', - path: pathConverter(path), - value: newValue, - }); - } -} - -function jsonPatchPathConverter(arrayPath) { - return [''].concat(arrayPath).join('/'); -} - -function differentTypes(a, b) { - return Object.prototype.toString.call(a) != Object.prototype.toString.call(b); -} - -function trimFromRight(obj1, obj2) { - var lengthDelta = obj1.length - obj2.length; - if (Array.isArray(obj1) && Array.isArray(obj2) && lengthDelta > 0) { - var leftMatches = 0; - var rightMatches = 0; - for (var i = 0; i < obj2.length; i++) { - if (String(obj1[i]) === String(obj2[i])) { - leftMatches++; - } else { - break; - } - } - for (var j = obj2.length; j > 0; j--) { - if (String(obj1[j + lengthDelta]) === String(obj2[j])) { - rightMatches++; - } else { - break; - } - } - - // bias to trim right becase it requires less index shifting - return leftMatches >= rightMatches; - } - return true; -} - -export {diff, jsonPatchPathConverter}; diff --git a/node_modules/npm/node_modules/just-diff/package.json b/node_modules/npm/node_modules/just-diff/package.json deleted file mode 100644 index 0403b04..0000000 --- a/node_modules/npm/node_modules/just-diff/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "just-diff", - "version": "6.0.2", - "description": "Return an object representing the diffs between two objects. Supports jsonPatch protocol", - "type": "module", - "exports": { - ".": { - "types": "./index.d.ts", - "require": "./index.cjs", - "import": "./index.mjs" - }, - "./package.json": "./package.json" - }, - "main": "index.cjs", - "types": "index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "build": "rollup -c" - }, - "repository": "https://github.com/angus-c/just", - "keywords": [ - "object", - "diff", - "jsonPatch", - "no-dependencies", - "just" - ], - "author": "Angus Croll", - "license": "MIT", - "bugs": { - "url": "https://github.com/angus-c/just/issues" - } -} \ No newline at end of file diff --git a/node_modules/npm/node_modules/just-diff/rollup.config.js b/node_modules/npm/node_modules/just-diff/rollup.config.js deleted file mode 100644 index fb9d24a..0000000 --- a/node_modules/npm/node_modules/just-diff/rollup.config.js +++ /dev/null @@ -1,3 +0,0 @@ -const createRollupConfig = require('../../config/createRollupConfig'); - -module.exports = createRollupConfig(__dirname); diff --git a/node_modules/npm/node_modules/libnpmaccess/LICENSE b/node_modules/npm/node_modules/libnpmaccess/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmaccess/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmaccess/README.md b/node_modules/npm/node_modules/libnpmaccess/README.md deleted file mode 100644 index 060016b..0000000 --- a/node_modules/npm/node_modules/libnpmaccess/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# libnpmaccess - -[![npm version](https://img.shields.io/npm/v/libnpmaccess.svg)](https://npm.im/libnpmaccess) -[![license](https://img.shields.io/npm/l/libnpmaccess.svg)](https://npm.im/libnpmaccess) -[![CI - libnpmaccess](https://github.com/npm/cli/actions/workflows/ci-libnpmaccess.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmaccess.yml) - -[`libnpmaccess`](https://github.com/npm/libnpmaccess) is a Node.js -library that provides programmatic access to the guts of the npm CLI's `npm -access` command. This includes managing account mfa settings, listing -packages and permissions, looking at package collaborators, and defining -package permissions for users, orgs, and teams. - -## Example - -```javascript -const access = require('libnpmaccess') -const opts = { '//registry.npmjs.org/:_authToken: 'npm_token } - -// List all packages @zkat has access to on the npm registry. -console.log(Object.keys(await access.getPackages('zkat', opts))) -``` - -### API - -#### `opts` for all `libnpmaccess` commands - -`libnpmaccess` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). - -All options are passed through directly to that library, so please refer -to [its own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -#### `spec` parameter for all `libnpmaccess` commands - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. - -#### `access.getCollaborators(spec, opts) -> Promise` - -Gets collaborators for a given package - -#### `access.getPackages(user|scope|team, opts) -> Promise` - -Gets all packages for a given user, scope, or team. - -Teams should be in the format `scope:team` or `@scope:team` - -Users and scopes can be in the format `@scope` or `scope` - -#### `access.getVisibility(spec, opts) -> Promise` - -Gets the visibility of a given package - -#### `access.removePermissions(team, spec, opts) -> Promise` - -Removes the access for a given team to a package. - -Teams should be in the format `scope:team` or `@scope:team` - -#### `access.setAccess(package, access, opts) -> Promise` - -Sets access level for package described by `spec`. - -The npm registry accepts the following `access` levels: - -`public`: package is public -`private`: package is private - -The npm registry also only allows scoped packages to have their access -level set. - -#### access.setMfa(spec, level, opts) -> Promise` - -Sets the publishing mfa requirements for a given package. Level must be one of the -following - -`none`: mfa is not required to publish this package. -`publish`: mfa is required to publish this package, automation tokens -cannot be used to publish. -`automation`: mfa is required to publish this package, automation tokens -may also be used for publishing from continuous integration workflows. - -#### access.setPermissions(team, spec, permssions, opts) -> Promise` - -Sets permissions levels for a given team to a package. - -Teams should be in the format `scope:team` or `@scope:team` - -The npm registry accepts the following `permissions`: - -`read-only`: Read only permissions -`read-write`: Read and write (aka publish) permissions diff --git a/node_modules/npm/node_modules/libnpmaccess/lib/index.js b/node_modules/npm/node_modules/libnpmaccess/lib/index.js deleted file mode 100644 index fca0e47..0000000 --- a/node_modules/npm/node_modules/libnpmaccess/lib/index.js +++ /dev/null @@ -1,140 +0,0 @@ -'use strict' - -const npa = require('npm-package-arg') -const npmFetch = require('npm-registry-fetch') - -const npar = (spec) => { - spec = npa(spec) - if (!spec.registry) { - throw new Error('must use package name only') - } - return spec -} - -const parseTeam = (scopeTeam) => { - let slice = 0 - if (scopeTeam.startsWith('@')) { - slice = 1 - } - const [scope, team] = scopeTeam.slice(slice).split(':').map(encodeURIComponent) - return { scope, team } -} - -const getPackages = async (scopeTeam, opts) => { - const { scope, team } = parseTeam(scopeTeam) - - let uri - if (team) { - uri = `/-/team/${scope}/${team}/package` - } else { - uri = `/-/org/${scope}/package` - } - try { - return await npmFetch.json(uri, opts) - } catch (err) { - if (err.code === 'E404') { - uri = `/-/user/${scope}/package` - return npmFetch.json(uri, opts) - } - throw err - } -} - -const getCollaborators = async (pkg, opts) => { - const spec = npar(pkg) - const uri = `/-/package/${spec.escapedName}/collaborators` - return npmFetch.json(uri, opts) -} - -const getVisibility = async (pkg, opts) => { - const spec = npar(pkg) - const uri = `/-/package/${spec.escapedName}/visibility` - return npmFetch.json(uri, opts) -} - -const setAccess = async (pkg, access, opts) => { - const spec = npar(pkg) - const uri = `/-/package/${spec.escapedName}/access` - await npmFetch(uri, { - ...opts, - method: 'POST', - body: { access }, - spec, - ignoreBody: true, - }) - return true -} - -const setMfa = async (pkg, level, opts) => { - const spec = npar(pkg) - const body = {} - switch (level) { - case 'none': - body.publish_requires_tfa = false - break - case 'publish': - // tfa is required, automation tokens can not override tfa - body.publish_requires_tfa = true - body.automation_token_overrides_tfa = false - break - case 'automation': - // tfa is required, automation tokens can override tfa - body.publish_requires_tfa = true - body.automation_token_overrides_tfa = true - break - default: - throw new Error(`Invalid mfa setting ${level}`) - } - const uri = `/-/package/${spec.escapedName}/access` - await npmFetch(uri, { - ...opts, - method: 'POST', - body, - spec, - ignoreBody: true, - }) - return true -} - -const setPermissions = async (scopeTeam, pkg, permissions, opts) => { - const spec = npar(pkg) - const { scope, team } = parseTeam(scopeTeam) - if (!scope || !team) { - throw new Error('team must be in format `scope:team`') - } - const uri = `/-/team/${scope}/${team}/package` - await npmFetch(uri, { - ...opts, - method: 'PUT', - body: { package: spec.name, permissions }, - scope, - spec, - ignoreBody: true, - }) - return true -} - -const removePermissions = async (scopeTeam, pkg, opts) => { - const spec = npar(pkg) - const { scope, team } = parseTeam(scopeTeam) - const uri = `/-/team/${scope}/${team}/package` - await npmFetch(uri, { - ...opts, - method: 'DELETE', - body: { package: spec.name }, - scope, - spec, - ignoreBody: true, - }) - return true -} - -module.exports = { - getCollaborators, - getPackages, - getVisibility, - removePermissions, - setAccess, - setMfa, - setPermissions, -} diff --git a/node_modules/npm/node_modules/libnpmaccess/package.json b/node_modules/npm/node_modules/libnpmaccess/package.json deleted file mode 100644 index 8b8459d..0000000 --- a/node_modules/npm/node_modules/libnpmaccess/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "libnpmaccess", - "version": "8.0.2", - "description": "programmatic library for `npm access` commands", - "author": "GitHub Inc.", - "license": "ISC", - "main": "lib/index.js", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "test": "tap", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmaccess" - }, - "bugs": "https://github.com/npm/libnpmaccess/issues", - "homepage": "https://npmjs.com/package/libnpmaccess", - "dependencies": { - "npm-package-arg": "^11.0.1", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "files": [ - "bin/", - "lib/" - ], - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmdiff/LICENSE b/node_modules/npm/node_modules/libnpmdiff/LICENSE deleted file mode 100644 index d3a1cdf..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) GitHub Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmdiff/README.md b/node_modules/npm/node_modules/libnpmdiff/README.md deleted file mode 100644 index b8eb083..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# libnpmdiff - -[![npm version](https://img.shields.io/npm/v/libnpmdiff.svg)](https://npm.im/libnpmdiff) -[![license](https://img.shields.io/npm/l/libnpmdiff.svg)](https://npm.im/libnpmdiff) -[![CI - libnpmdiff](https://github.com/npm/cli/actions/workflows/ci-libnpmdiff.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmdiff.yml) -The registry diff lib. - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [Contributing](#contributing) -* [API](#api) -* [LICENSE](#license) - -## Example - -```js -const libdiff = require('libnpmdiff') - -const patch = await libdiff([ - 'abbrev@1.1.0', - 'abbrev@1.1.1' -]) -console.log( - patch -) -``` - -Returns: - -```patch -diff --git a/package.json b/package.json -index v1.1.0..v1.1.1 100644 ---- a/package.json -+++ b/package.json -@@ -1,6 +1,6 @@ - { - "name": "abbrev", -- "version": "1.1.0", -+ "version": "1.1.1", - "description": "Like ruby's abbrev module, but in js", - "author": "Isaac Z. Schlueter ", - "main": "abbrev.js", - -``` - -## Install - -`$ npm install libnpmdiff` - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The -[Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) -outlines the process for community interaction and contribution. Please don't -hesitate to jump in if you'd like to, or even ask us questions if something -isn't clear. - -All participants and maintainers in this project are expected to follow the -[npm Code of Conduct](https://docs.npmjs.com/policies/conduct), and just -generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `> libnpmdif([ a, b ], [opts]) -> Promise` - -Fetches the registry tarballs and compare files between a spec `a` and spec `b`. **npm** spec types are usually described in `@` form but multiple other types are alsos supported, for more info on valid specs take a look at [`npm-package-arg`](https://github.com/npm/npm-package-arg). - -**Options**: - -- `color `: Should add ANSI colors to string output? Defaults to `false`. -- `tagVersionPrefix `: What prefix should be used to define version numbers. Defaults to `v` -- `diffUnified `: How many lines of code to print before/after each diff. Defaults to `3`. -- `diffFiles >`: If set only prints patches for the files listed in this array (also accepts globs). Defaults to `undefined`. -- `diffIgnoreAllSpace `: Whether or not should ignore changes in whitespace (very useful to avoid indentation changes extra diff lines). Defaults to `false`. -- `diffNameOnly `: Prints only file names and no patch diffs. Defaults to `false`. -- `diffNoPrefix `: If true then skips printing any prefixes in filenames. Defaults to `false`. -- `diffSrcPrefix `: Prefix to be used in the filenames from `a`. Defaults to `a/`. -- `diffDstPrefix `: Prefix to be used in the filenames from `b`. Defaults to `b/`. -- `diffText `: Should treat all files as text and try to print diff for binary files. Defaults to `false`. -- ...`cache`, `registry`, `where` and other common options accepted by [pacote](https://github.com/npm/pacote#options) - -Returns a `Promise` that fullfils with a `String` containing the resulting patch diffs. - -Throws an error if either `a` or `b` are missing or if trying to diff more than two specs. - -## LICENSE - -[ISC](./LICENSE) - diff --git a/node_modules/npm/node_modules/libnpmdiff/lib/format-diff.js b/node_modules/npm/node_modules/libnpmdiff/lib/format-diff.js deleted file mode 100644 index 211386c..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/lib/format-diff.js +++ /dev/null @@ -1,96 +0,0 @@ -const EOL = '\n' - -const colorizeDiff = require('@npmcli/disparity-colors') -const jsDiff = require('diff') - -const shouldPrintPatch = require('./should-print-patch.js') - -const formatDiff = ({ files, opts = {}, refs, versions }) => { - let res = '' - const srcPrefix = opts.diffNoPrefix ? '' : opts.diffSrcPrefix || 'a/' - const dstPrefix = opts.diffNoPrefix ? '' : opts.diffDstPrefix || 'b/' - - for (const filename of files.values()) { - const names = { - a: `${srcPrefix}${filename}`, - b: `${dstPrefix}${filename}`, - } - - let fileMode = '' - const filenames = { - a: refs.get(`a/${filename}`), - b: refs.get(`b/${filename}`), - } - const contents = { - a: filenames.a && filenames.a.content, - b: filenames.b && filenames.b.content, - } - const modes = { - a: filenames.a && filenames.a.mode, - b: filenames.b && filenames.b.mode, - } - - if (contents.a === contents.b && modes.a === modes.b) { - continue - } - - if (opts.diffNameOnly) { - res += `${filename}${EOL}` - continue - } - - let patch = '' - let headerLength = 0 - const header = str => { - headerLength++ - patch += `${str}${EOL}` - } - - // manually build a git diff-compatible header - header(`diff --git ${names.a} ${names.b}`) - if (modes.a === modes.b) { - fileMode = filenames.a.mode - } else { - if (modes.a && !modes.b) { - header(`deleted file mode ${modes.a}`) - } else if (!modes.a && modes.b) { - header(`new file mode ${modes.b}`) - } else { - header(`old mode ${modes.a}`) - header(`new mode ${modes.b}`) - } - } - /* eslint-disable-next-line max-len */ - header(`index ${opts.tagVersionPrefix || 'v'}${versions.a}..${opts.tagVersionPrefix || 'v'}${versions.b} ${fileMode}`) - - if (shouldPrintPatch(filename)) { - patch += jsDiff.createTwoFilesPatch( - names.a, - names.b, - contents.a || '', - contents.b || '', - '', - '', - { - context: opts.diffUnified === 0 ? 0 : opts.diffUnified || 3, - ignoreWhitespace: opts.diffIgnoreAllSpace, - } - ).replace( - '===================================================================\n', - '' - ).replace(/\t\n/g, '\n') // strip trailing tabs - headerLength += 2 - } else { - header(`--- ${names.a}`) - header(`+++ ${names.b}`) - } - - res += (opts.color - ? colorizeDiff(patch, { headerLength }) - : patch) - } - - return res.trim() -} - -module.exports = formatDiff diff --git a/node_modules/npm/node_modules/libnpmdiff/lib/index.js b/node_modules/npm/node_modules/libnpmdiff/lib/index.js deleted file mode 100644 index 10532c1..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/lib/index.js +++ /dev/null @@ -1,62 +0,0 @@ -const pacote = require('pacote') - -const formatDiff = require('./format-diff.js') -const getTarball = require('./tarball.js') -const untar = require('./untar.js') - -// TODO: we test this condition in the diff command -// so this error probably doesnt need to be here. Or -// if it does we should figure out a standard code -// so we can catch it in the cli and display it consistently -const argsError = () => - Object.assign( - new TypeError('libnpmdiff needs two arguments to compare'), - { code: 'EDIFFARGS' } - ) -const diff = async (specs, opts = {}) => { - if (specs.length !== 2) { - throw argsError() - } - - const [ - aManifest, - bManifest, - ] = - await Promise.all(specs.map(spec => pacote.manifest(spec, opts))) - - const versions = { - a: aManifest.version, - b: bManifest.version, - } - - // fetches tarball using pacote - const [a, b] = await Promise.all([ - getTarball(aManifest, opts), - getTarball(bManifest, opts), - ]) - - // read all files - // populates `files` and `refs` - const { - files, - refs, - } = await untar([ - { - prefix: 'a/', - item: a, - }, - { - prefix: 'b/', - item: b, - }, - ], opts) - - return formatDiff({ - files, - opts, - refs, - versions, - }) -} - -module.exports = diff diff --git a/node_modules/npm/node_modules/libnpmdiff/lib/should-print-patch.js b/node_modules/npm/node_modules/libnpmdiff/lib/should-print-patch.js deleted file mode 100644 index f8277a8..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/lib/should-print-patch.js +++ /dev/null @@ -1,22 +0,0 @@ -const { basename, extname } = require('path') - -const binaryExtensions = require('binary-extensions') - -// we should try to print patches as long as the -// extension is not identified as binary files -const shouldPrintPatch = (path, opts = {}) => { - if (opts.diffText) { - return true - } - - const filename = basename(path) - const extension = ( - filename.startsWith('.') - ? filename - : extname(filename) - ).slice(1) - - return !binaryExtensions.includes(extension) -} - -module.exports = shouldPrintPatch diff --git a/node_modules/npm/node_modules/libnpmdiff/lib/tarball.js b/node_modules/npm/node_modules/libnpmdiff/lib/tarball.js deleted file mode 100644 index 930d624..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/lib/tarball.js +++ /dev/null @@ -1,38 +0,0 @@ -const { relative } = require('path') - -const Arborist = require('@npmcli/arborist') -const npa = require('npm-package-arg') -const pkgContents = require('@npmcli/installed-package-contents') -const pacote = require('pacote') -const { tarCreateOptions } = pacote.DirFetcher -const tar = require('tar') - -// returns a simplified tarball when reading files from node_modules folder, -// thus avoiding running the prepare scripts and the extra logic from packlist -const nodeModulesTarball = (manifest, opts) => - pkgContents({ path: manifest._resolved, depth: 1 }) - .then(files => - files.map(file => relative(manifest._resolved, file)) - ) - .then(files => - tar.c(tarCreateOptions(manifest), files).concat() - ) - -const tarball = (manifest, opts) => { - const resolved = manifest._resolved - const where = opts.where || process.cwd() - - const fromNodeModules = npa(resolved).type === 'directory' - && /node_modules[\\/](@[^\\/]+\/)?[^\\/]+[\\/]?$/.test(relative(where, resolved)) - - if (fromNodeModules) { - return nodeModulesTarball(manifest, opts) - } - - return pacote.tarball(manifest._resolved, { - ...opts, - Arborist, - }) -} - -module.exports = tarball diff --git a/node_modules/npm/node_modules/libnpmdiff/lib/untar.js b/node_modules/npm/node_modules/libnpmdiff/lib/untar.js deleted file mode 100644 index 341ae27..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/lib/untar.js +++ /dev/null @@ -1,96 +0,0 @@ -const tar = require('tar') -const { minimatch } = require('minimatch') - -const normalizeMatch = str => str - .replace(/\\+/g, '/') - .replace(/^\.\/|^\./, '') - -// files and refs are mutating params -// filterFiles, item, prefix and opts are read-only options -const untar = ({ files, refs }, { filterFiles, item, prefix }) => { - tar.list({ - filter: (path, entry) => { - const fileMatch = () => - (!filterFiles.length || - filterFiles.some(f => { - const pattern = normalizeMatch(f) - return minimatch( - normalizeMatch(path), - `{package/,}${pattern}`, - { matchBase: pattern.startsWith('*') } - ) - })) - - // expands usage of simple path filters, e.g: lib or src/ - const folderMatch = () => - filterFiles.some(f => - normalizeMatch(path).startsWith(normalizeMatch(f)) || - normalizeMatch(path).startsWith(`package/${normalizeMatch(f)}`)) - - if ( - entry.type === 'File' && - (fileMatch() || folderMatch()) - ) { - const key = path.replace(/^[^/]+\/?/, '') - files.add(key) - - // should skip reading file when using --name-only option - let content - try { - entry.setEncoding('utf8') - content = entry.concat() - } catch (e) { - /* istanbul ignore next */ - throw Object.assign( - new Error('failed to read files'), - { code: 'EDIFFUNTAR' } - ) - } - - refs.set(`${prefix}${key}`, { - content, - mode: `100${entry.mode.toString(8)}`, - }) - return true - } - }, - }) - .on('error', /* istanbul ignore next */ e => { - throw e - }) - .end(item) -} - -const readTarballs = async (tarballs, opts = {}) => { - const files = new Set() - const refs = new Map() - const arr = [].concat(tarballs) - - const filterFiles = opts.diffFiles || [] - - for (const i of arr) { - untar({ - files, - refs, - }, { - item: i.item, - prefix: i.prefix, - filterFiles, - }) - } - - // await to read all content from included files - const allRefs = [...refs.values()] - const contents = await Promise.all(allRefs.map(async ref => ref.content)) - - contents.forEach((content, index) => { - allRefs[index].content = content - }) - - return { - files, - refs, - } -} - -module.exports = readTarballs diff --git a/node_modules/npm/node_modules/libnpmdiff/package.json b/node_modules/npm/node_modules/libnpmdiff/package.json deleted file mode 100644 index 02e4dc2..0000000 --- a/node_modules/npm/node_modules/libnpmdiff/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "libnpmdiff", - "version": "6.0.4", - "description": "The registry diff", - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmdiff" - }, - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "keywords": [ - "npm", - "npmcli", - "libnpm", - "cli", - "diff" - ], - "author": "GitHub Inc.", - "contributors": [ - { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com", - "twitter": "ruyadorno" - } - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "lintfix": "npm run lint -- --fix", - "test": "tap", - "posttest": "npm run lint", - "snap": "tap", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "tap": "^16.3.8" - }, - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/disparity-colors": "^3.0.0", - "@npmcli/installed-package-contents": "^2.0.2", - "binary-extensions": "^2.2.0", - "diff": "^5.1.0", - "minimatch": "^9.0.0", - "npm-package-arg": "^11.0.1", - "pacote": "^17.0.4", - "tar": "^6.2.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmexec/LICENSE b/node_modules/npm/node_modules/libnpmexec/LICENSE deleted file mode 100644 index d3a1cdf..0000000 --- a/node_modules/npm/node_modules/libnpmexec/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) GitHub Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmexec/README.md b/node_modules/npm/node_modules/libnpmexec/README.md deleted file mode 100644 index fb4a1e3..0000000 --- a/node_modules/npm/node_modules/libnpmexec/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# libnpmexec - -[![npm version](https://img.shields.io/npm/v/libnpmexec.svg)](https://npm.im/libnpmexec) -[![license](https://img.shields.io/npm/l/libnpmexec.svg)](https://npm.im/libnpmexec) -[![CI - libnpmexec](https://github.com/npm/cli/actions/workflows/ci-libnpmexec.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmexec.yml) - -The `npm exec` (`npx`) Programmatic API - -## Install - -`npm install libnpmexec` - -## Usage: - -```js -const libexec = require('libnpmexec') -await libexec({ - args: ['yosay', 'Bom dia!'], - cache: '~/.npm/_cacache', - npxCache: '~/.npm/_npx', - yes: true, -}) -``` - -## API: - -### `libexec(opts)` - -- `opts`: - - `args`: List of pkgs to execute **Array**, defaults to `[]` - - `call`: An alternative command to run when using `packages` option **String**, defaults to empty string. - - `cache`: The path location to where the npm cache folder is placed **String** - - `npxCache`: The path location to where the npx cache folder is placed **String** - - `chalk`: Chalk instance to use for colors? **Required** - - `localBin`: Location to the `node_modules/.bin` folder of the local project to start scanning for bin files **String**, defaults to `./node_modules/.bin`. **libexec** will walk up the directory structure looking for `node_modules/.bin` folders in parent folders that might satisfy the current `arg` and will use that bin if found. - - `locationMsg`: Overrides "at location" message when entering interactive mode **String** - - `globalBin`: Location to the global space bin folder, same as: `$(npm bin -g)` **String**, defaults to empty string. - - `output`: A function to print output to **Function** - - `packages`: A list of packages to be used (possibly fetch from the registry) **Array**, defaults to `[]` - - `path`: Location to where to read local project info (`package.json`) **String**, defaults to `.` - - `runPath`: Location to where to execute the script **String**, defaults to `.` - - `scriptShell`: Default shell to be used **String**, defaults to `sh` on POSIX systems, `process.env.ComSpec` OR `cmd` on Windows - - `yes`: Should skip download confirmation prompt when fetching missing packages from the registry? **Boolean** - - `registry`, `cache`, and more options that are forwarded to [@npmcli/arborist](https://github.com/npm/arborist/) and [pacote](https://github.com/npm/pacote/#options) **Object** - -## LICENSE - -[ISC](./LICENSE) diff --git a/node_modules/npm/node_modules/libnpmexec/lib/file-exists.js b/node_modules/npm/node_modules/libnpmexec/lib/file-exists.js deleted file mode 100644 index 55c04bd..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/file-exists.js +++ /dev/null @@ -1,33 +0,0 @@ -const { resolve } = require('path') -const { stat } = require('fs/promises') -const { walkUp } = require('walk-up-path') - -const fileExists = async (file) => { - try { - const res = await stat(file) - return res.isFile() - } catch { - return false - } -} - -const localFileExists = async (dir, binName, root) => { - for (const path of walkUp(dir)) { - const binDir = resolve(path, 'node_modules', '.bin') - - if (await fileExists(resolve(binDir, binName))) { - return binDir - } - - if (path.toLowerCase() === resolve(root).toLowerCase()) { - return false - } - } - - return false -} - -module.exports = { - fileExists, - localFileExists, -} diff --git a/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js b/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js deleted file mode 100644 index 8ebc0e7..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js +++ /dev/null @@ -1,22 +0,0 @@ -const getBinFromManifest = (mani) => { - // if we have a bin matching (unscoped portion of) packagename, use that - // otherwise if there's 1 bin or all bin value is the same (alias), use - // that, otherwise fail - const bin = mani.bin || {} - if (new Set(Object.values(bin)).size === 1) { - return Object.keys(bin)[0] - } - - // XXX probably a util to parse this better? - const name = mani.name.replace(/^@[^/]+\//, '') - if (bin[name]) { - return name - } - - // XXX need better error message - throw Object.assign(new Error('could not determine executable to run'), { - pkgid: mani._id, - }) -} - -module.exports = getBinFromManifest diff --git a/node_modules/npm/node_modules/libnpmexec/lib/index.js b/node_modules/npm/node_modules/libnpmexec/lib/index.js deleted file mode 100644 index 34bb207..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/index.js +++ /dev/null @@ -1,285 +0,0 @@ -'use strict' - -const { mkdir } = require('fs/promises') -const Arborist = require('@npmcli/arborist') -const ciInfo = require('ci-info') -const crypto = require('crypto') -const log = require('proc-log') -const npa = require('npm-package-arg') -const npmlog = require('npmlog') -const pacote = require('pacote') -const read = require('read') -const semver = require('semver') - -const { fileExists, localFileExists } = require('./file-exists.js') -const getBinFromManifest = require('./get-bin-from-manifest.js') -const noTTY = require('./no-tty.js') -const runScript = require('./run-script.js') -const isWindows = require('./is-windows.js') - -const { dirname, resolve } = require('path') - -const binPaths = [] - -// when checking the local tree we look up manifests, cache those results by -// spec.raw so we don't have to fetch again when we check npxCache -const manifests = new Map() - -const getManifest = async (spec, flatOptions) => { - if (!manifests.has(spec.raw)) { - const manifest = await pacote.manifest(spec, { ...flatOptions, preferOnline: true }) - manifests.set(spec.raw, manifest) - } - return manifests.get(spec.raw) -} - -// Returns the required manifest if the spec is missing from the tree -// Returns the found node if it is in the tree -const missingFromTree = async ({ spec, tree, flatOptions, isNpxTree }) => { - // If asking for a spec by name only (spec.raw === spec.name): - // - In local or global mode go with anything in the tree that matches - // - If looking in the npx cache check if a newer version is available - const npxByNameOnly = isNpxTree && spec.name === spec.raw - if (spec.registry && spec.type !== 'tag' && !npxByNameOnly) { - // registry spec that is not a specific tag. - const nodesBySpec = tree.inventory.query('packageName', spec.name) - for (const node of nodesBySpec) { - if (spec.rawSpec === '*') { - return { node } - } - // package requested by specific version - if (spec.type === 'version' && (node.pkgid === spec.raw)) { - return { node } - } - // package requested by version range, only remaining registry type - if (semver.satisfies(node.package.version, spec.rawSpec)) { - return { node } - } - } - const manifest = await getManifest(spec, flatOptions) - return { manifest } - } else { - // non-registry spec, or a specific tag, or name only in npx tree. Look up - // manifest and check resolved to see if it's in the tree. - const manifest = await getManifest(spec, flatOptions) - if (spec.type === 'directory') { - return { manifest } - } - const nodesByManifest = tree.inventory.query('packageName', manifest.name) - for (const node of nodesByManifest) { - if (node.package.resolved === manifest._resolved) { - // we have a package by the same name and the same resolved destination, nothing to add. - return { node } - } - } - return { manifest } - } -} - -const exec = async (opts) => { - const { - args = [], - call = '', - localBin = resolve('./node_modules/.bin'), - locationMsg = undefined, - globalBin = '', - globalPath, - output, - // dereference values because we manipulate it later - packages: [...packages] = [], - path = '.', - runPath = '.', - scriptShell = isWindows ? process.env.ComSpec || 'cmd' : 'sh', - ...flatOptions - } = opts - - let yes = opts.yes - const run = () => runScript({ - args, - call, - flatOptions, - locationMsg, - output, - path, - binPaths, - runPath, - scriptShell, - }) - - // interactive mode - if (!call && !args.length && !packages.length) { - return run() - } - - let needPackageCommandSwap = (args.length > 0) && (packages.length === 0) - // If they asked for a command w/o specifying a package, see if there is a - // bin that directly matches that name: - // - in the local package itself - // - in the local tree - // - globally - if (needPackageCommandSwap) { - let localManifest - try { - localManifest = await pacote.manifest(path, flatOptions) - } catch { - // no local package.json? no problem, move one. - } - if (localManifest?.bin?.[args[0]]) { - // we have to install the local package into the npx cache so that its - // bin links get set up - flatOptions.installLinks = false - // args[0] will exist when the package is installed - packages.push(path) - yes = true - needPackageCommandSwap = false - } else { - const dir = dirname(dirname(localBin)) - const localBinPath = await localFileExists(dir, args[0], '/') - if (localBinPath) { - binPaths.push(localBinPath) - return await run() - } else if (globalPath && await fileExists(`${globalBin}/${args[0]}`)) { - binPaths.push(globalBin) - return await run() - } - // We swap out args[0] with the bin from the manifest later - packages.push(args[0]) - } - } - - // Resolve any directory specs so that the npx directory is unique to the - // resolved directory, not the potentially relative one (i.e. "npx .") - for (const i in packages) { - const pkg = packages[i] - const spec = npa(pkg) - if (spec.type === 'directory') { - packages[i] = spec.fetchSpec - } - } - - const localArb = new Arborist({ ...flatOptions, path }) - const localTree = await localArb.loadActual() - - // Find anything that isn't installed locally - const needInstall = [] - let commandManifest - await Promise.all(packages.map(async (pkg, i) => { - const spec = npa(pkg, path) - const { manifest, node } = await missingFromTree({ spec, tree: localTree, flatOptions }) - if (manifest) { - // Package does not exist in the local tree - needInstall.push({ spec, manifest }) - if (i === 0) { - commandManifest = manifest - } - } else if (i === 0) { - // The node.package has enough to look up the bin - commandManifest = node.package - } - })) - - if (needPackageCommandSwap) { - const spec = npa(args[0]) - - if (spec.type === 'directory') { - yes = true - } - - args[0] = getBinFromManifest(commandManifest) - - if (needInstall.length > 0 && globalPath) { - // See if the package is installed globally, and run the translated bin - const globalArb = new Arborist({ ...flatOptions, path: globalPath, global: true }) - const globalTree = await globalArb.loadActual() - const { manifest: globalManifest } = - await missingFromTree({ spec, tree: globalTree, flatOptions }) - if (!globalManifest && await fileExists(`${globalBin}/${args[0]}`)) { - binPaths.push(globalBin) - return await run() - } - } - } - - const add = [] - if (needInstall.length > 0) { - // Install things to the npx cache, if needed - const { npxCache } = flatOptions - if (!npxCache) { - throw new Error('Must provide a valid npxCache path') - } - const hash = crypto.createHash('sha512') - .update(packages.map(p => { - // Keeps the npx directory unique to the resolved directory, not the - // potentially relative one (i.e. "npx .") - const spec = npa(p) - if (spec.type === 'directory') { - return spec.fetchSpec - } - return p - }).sort((a, b) => a.localeCompare(b, 'en')).join('\n')) - .digest('hex') - .slice(0, 16) - const installDir = resolve(npxCache, hash) - await mkdir(installDir, { recursive: true }) - const npxArb = new Arborist({ - ...flatOptions, - path: installDir, - }) - const npxTree = await npxArb.loadActual() - await Promise.all(needInstall.map(async ({ spec }) => { - const { manifest } = await missingFromTree({ - spec, - tree: npxTree, - flatOptions, - isNpxTree: true, - }) - if (manifest) { - // Manifest is not in npxCache, we need to install it there - if (!spec.registry) { - add.push(manifest._from) - } else { - add.push(manifest._id) - } - } - })) - - if (add.length) { - if (!yes) { - const missingPackages = add.map(a => `${a.replace(/@$/, '')}`) - // set -n to always say no - if (yes === false) { - // Error message lists missing package(s) when process is canceled - /* eslint-disable-next-line max-len */ - throw new Error(`npx canceled due to missing packages and no YES option: ${JSON.stringify(missingPackages)}`) - } - - if (noTTY() || ciInfo.isCI) { - log.warn('exec', `The following package${ - add.length === 1 ? ' was' : 's were' - } not found and will be installed: ${ - add.map((pkg) => pkg.replace(/@$/, '')).join(', ') - }`) - } else { - const addList = missingPackages.join('\n') + '\n' - const prompt = `Need to install the following packages:\n${ - addList - }Ok to proceed? ` - npmlog.clearProgress() - const confirm = await read({ prompt, default: 'y' }) - if (confirm.trim().toLowerCase().charAt(0) !== 'y') { - throw new Error('canceled') - } - } - } - await npxArb.reify({ - ...flatOptions, - add, - }) - } - binPaths.push(resolve(installDir, 'node_modules/.bin')) - } - - return await run() -} - -module.exports = exec diff --git a/node_modules/npm/node_modules/libnpmexec/lib/is-windows.js b/node_modules/npm/node_modules/libnpmexec/lib/is-windows.js deleted file mode 100644 index fbece90..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/is-windows.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = process.platform === 'win32' diff --git a/node_modules/npm/node_modules/libnpmexec/lib/no-tty.js b/node_modules/npm/node_modules/libnpmexec/lib/no-tty.js deleted file mode 100644 index 601798d..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/no-tty.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = () => !process.stdin.isTTY diff --git a/node_modules/npm/node_modules/libnpmexec/lib/run-script.js b/node_modules/npm/node_modules/libnpmexec/lib/run-script.js deleted file mode 100644 index 89dcf2e..0000000 --- a/node_modules/npm/node_modules/libnpmexec/lib/run-script.js +++ /dev/null @@ -1,71 +0,0 @@ -const ciInfo = require('ci-info') -const runScript = require('@npmcli/run-script') -const readPackageJson = require('read-package-json-fast') -const npmlog = require('npmlog') -const log = require('proc-log') -const noTTY = require('./no-tty.js') - -const run = async ({ - args, - call, - flatOptions, - locationMsg, - output = () => {}, - path, - binPaths, - runPath, - scriptShell, -}) => { - // turn list of args into command string - const script = call || args.shift() || scriptShell - - // do the fakey runScript dance - // still should work if no package.json in cwd - const realPkg = await readPackageJson(`${path}/package.json`) - .catch(() => ({})) - const pkg = { - ...realPkg, - scripts: { - ...(realPkg.scripts || {}), - npx: script, - }, - } - - npmlog.disableProgress() - - try { - if (script === scriptShell) { - if (!noTTY()) { - if (ciInfo.isCI) { - return log.warn('exec', 'Interactive mode disabled in CI environment') - } - - locationMsg = locationMsg || ` at location:\n${flatOptions.chalk.dim(runPath)}` - - output(`${ - flatOptions.chalk.reset('\nEntering npm script environment') - }${ - flatOptions.chalk.reset(locationMsg) - }${ - flatOptions.chalk.bold('\nType \'exit\' or ^D when finished\n') - }`) - } - } - return await runScript({ - ...flatOptions, - pkg, - banner: false, - // we always run in cwd, not --prefix - path: runPath, - binPaths, - event: 'npx', - args, - stdio: 'inherit', - scriptShell, - }) - } finally { - npmlog.enableProgress() - } -} - -module.exports = run diff --git a/node_modules/npm/node_modules/libnpmexec/package.json b/node_modules/npm/node_modules/libnpmexec/package.json deleted file mode 100644 index 55a5bf2..0000000 --- a/node_modules/npm/node_modules/libnpmexec/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "libnpmexec", - "version": "7.0.5", - "files": [ - "bin/", - "lib/" - ], - "main": "lib/index.js", - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "description": "npm exec (npx) programmatic API", - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmexec" - }, - "keywords": [ - "npm", - "npmcli", - "libnpm", - "cli", - "workspaces", - "libnpmexec" - ], - "author": "GitHub Inc.", - "contributors": [ - { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com", - "twitter": "ruyadorno" - } - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "posttest": "npm run lint", - "test": "tap", - "snap": "tap", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "files": "test/*.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.21.3", - "bin-links": "^4.0.1", - "chalk": "^5.2.0", - "just-extend": "^6.2.0", - "just-safe-set": "^4.2.1", - "tap": "^16.3.8" - }, - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/run-script": "^7.0.2", - "ci-info": "^4.0.0", - "npm-package-arg": "^11.0.1", - "npmlog": "^7.0.1", - "pacote": "^17.0.4", - "proc-log": "^3.0.0", - "read": "^2.0.0", - "read-package-json-fast": "^3.0.2", - "semver": "^7.3.7", - "walk-up-path": "^3.0.1" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - } -} diff --git a/node_modules/npm/node_modules/libnpmfund/LICENSE b/node_modules/npm/node_modules/libnpmfund/LICENSE deleted file mode 100644 index dedcd7d..0000000 --- a/node_modules/npm/node_modules/libnpmfund/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) npm Inc. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmfund/README.md b/node_modules/npm/node_modules/libnpmfund/README.md deleted file mode 100644 index 6072b11..0000000 --- a/node_modules/npm/node_modules/libnpmfund/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# libnpmfund - -[![npm version](https://img.shields.io/npm/v/libnpmfund.svg)](https://npm.im/libnpmfund) -[![license](https://img.shields.io/npm/l/libnpmfund.svg)](https://npm.im/libnpmfund) -[![CI - libnpmfund](https://github.com/npm/cli/actions/workflows/ci-libnpmfund.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmfund.yml) - -[`libnpmfund`](https://github.com/npm/libnpmfund) is a Node.js library for -retrieving **funding** information for packages installed using -[`arborist`](https://github.com/npm/arborist). - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [Contributing](#contributing) -* [API](#api) -* [LICENSE](#license) - -## Example - -```js -const { read } = require('libnpmfund') - -const fundingInfo = await read() -console.log( - JSON.stringify(fundingInfo, null, 2) -) -// => { - length: 2, - name: 'foo', - version: '1.0.0', - funding: { url: 'https://example.com' }, - dependencies: { - bar: { - version: '1.0.0', - funding: { url: 'http://collective.example.com' } - } - } -} -``` - -## Install - -`$ npm install libnpmfund` - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The -[Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md) -outlines the process for community interaction and contribution. Please don't -hesitate to jump in if you'd like to, or even ask us questions if something -isn't clear. - -All participants and maintainers in this project are expected to follow the -[npm Code of Conduct](https://www.npmjs.com/policies/conduct), and just -generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -##### `> fund.read([opts]) -> Promise` - -Reads **funding** info from a npm install and returns a promise for a -tree object that only contains packages in which funding info is defined. - -Options: - -- `countOnly`: Uses the tree-traversal logic from **npm fund** but skips over -any obj definition and just returns an obj containing `{ length }` - useful for -things such as printing a `6 packages are looking for funding` msg. -- `workspaces`: `Array` List of workspaces names to filter for, -the result will only include a subset of the resulting tree that includes -only the nodes that are children of the listed workspaces names. -- `path`, `registry` and more [Arborist](https://github.com/npm/arborist/) options. - -##### `> fund.readTree(tree, [opts]) -> Promise` - -Reads **funding** info from a given install tree and returns a tree object -that only contains packages in which funding info is defined. - -- `tree`: An [`arborist`](https://github.com/npm/arborist) tree to be used, e.g: - -```js -const Arborist = require('@npmcli/arborist') -const { readTree } = require('libnpmfund') - -const arb = new Arborist({ path: process.cwd() }) -const tree = await arb.loadActual() - -return readTree(tree, { countOnly: false }) -``` - -Options: - -- `countOnly`: Uses the tree-traversal logic from **npm fund** but skips over -any obj definition and just returns an obj containing `{ length }` - useful for -things such as printing a `6 packages are looking for funding` msg. - -##### `> fund.normalizeFunding(funding) -> Object` - -From a `funding` ``, retrieves normalized funding objects -containing a `url` property. - -e.g: - -```js -normalizeFunding('http://example.com') -// => { - url: 'http://example.com' -} -``` - -##### `> fund.isValidFunding(funding) -> Boolean` - -Returns `` if `funding` is a valid funding object, e.g: - -```js -isValidFunding({ foo: 'not a valid funding obj' }) -// => false - -isValidFunding('http://example.com') -// => true -``` - -## LICENSE - -[ISC](./LICENSE) diff --git a/node_modules/npm/node_modules/libnpmfund/lib/index.js b/node_modules/npm/node_modules/libnpmfund/lib/index.js deleted file mode 100644 index a53893d..0000000 --- a/node_modules/npm/node_modules/libnpmfund/lib/index.js +++ /dev/null @@ -1,210 +0,0 @@ -'use strict' - -const URL = require('url').URL -const Arborist = require('@npmcli/arborist') - -// supports object funding and string shorthand, or an array of these -// if original was an array, returns an array; else returns the lone item -function normalizeFunding (funding) { - const normalizeItem = item => - typeof item === 'string' ? { url: item } : item - const sources = [].concat(funding || []).map(normalizeItem) - return Array.isArray(funding) ? sources : sources[0] -} - -// Is the value of a `funding` property of a `package.json` -// a valid type+url for `npm fund` to display? -function isValidFunding (funding) { - if (!funding) { - return false - } - - if (Array.isArray(funding)) { - return funding.every(f => !Array.isArray(f) && isValidFunding(f)) - } - - try { - var parsed = new URL(funding.url || funding) - } catch (error) { - return false - } - - if ( - parsed.protocol !== 'https:' && - parsed.protocol !== 'http:' - ) { - return false - } - - return Boolean(parsed.host) -} - -const empty = () => Object.create(null) - -function readTree (tree, opts) { - let packageWithFundingCount = 0 - const seen = new Set() - const { countOnly } = opts || {} - const _trailingDependencies = Symbol('trailingDependencies') - - let filterSet - - if (opts && opts.workspaces && opts.workspaces.length) { - const arb = new Arborist(opts) - filterSet = arb.workspaceDependencySet(tree, opts.workspaces) - } - - function tracked (name, version) { - const key = String(name) + String(version) - if (seen.has(key)) { - return true - } - - seen.add(key) - } - - function retrieveDependencies (dependencies) { - const trailing = dependencies[_trailingDependencies] - - if (trailing) { - return Object.assign( - empty(), - dependencies, - trailing - ) - } - - return dependencies - } - - function hasDependencies (dependencies) { - return dependencies && ( - Object.keys(dependencies).length || - dependencies[_trailingDependencies] - ) - } - - function attachFundingInfo (target, funding) { - if (funding && isValidFunding(funding)) { - target.funding = normalizeFunding(funding) - packageWithFundingCount++ - } - } - - function getFundingDependencies (t) { - const edges = t && t.edgesOut && t.edgesOut.values() - if (!edges) { - return empty() - } - - const directDepsWithFunding = Array.from(edges).map(edge => { - if (!edge || !edge.to) { - return empty() - } - - const node = edge.to.target || edge.to - if (!node.package) { - return empty() - } - - if (filterSet && filterSet.size > 0 && !filterSet.has(node)) { - return empty() - } - - const { name, funding, version } = node.package - - // avoids duplicated items within the funding tree - if (tracked(name, version)) { - return empty() - } - - const fundingItem = {} - - if (version) { - fundingItem.version = version - } - - attachFundingInfo(fundingItem, funding) - - return { - node, - fundingItem, - } - }) - - return directDepsWithFunding.reduce( - (res, { node, fundingItem }, i) => { - if (!fundingItem || - fundingItem.length === 0 || - !node) { - return res - } - - // recurse - const transitiveDependencies = node.edgesOut && - node.edgesOut.size > 0 && - getFundingDependencies(node) - - // if we're only counting items there's no need - // to add all the data to the resulting object - if (countOnly) { - return null - } - - if (hasDependencies(transitiveDependencies)) { - fundingItem.dependencies = - retrieveDependencies(transitiveDependencies) - } - - if (isValidFunding(fundingItem.funding)) { - res[node.package.name] = fundingItem - } else if (hasDependencies(fundingItem.dependencies)) { - res[_trailingDependencies] = - Object.assign( - empty(), - res[_trailingDependencies], - fundingItem.dependencies - ) - } - - return res - }, countOnly ? null : empty()) - } - - const treeDependencies = getFundingDependencies(tree) - const result = { - length: packageWithFundingCount, - } - - if (!countOnly) { - const name = - (tree && tree.package && tree.package.name) || - (tree && tree.name) - result.name = name || (tree && tree.path) - - if (tree && tree.package && tree.package.version) { - result.version = tree.package.version - } - - if (tree && tree.package && tree.package.funding) { - result.funding = normalizeFunding(tree.package.funding) - } - - result.dependencies = retrieveDependencies(treeDependencies) - } - - return result -} - -async function read (opts) { - const arb = new Arborist(opts) - const tree = await arb.loadActual(opts) - return readTree(tree, opts) -} - -module.exports = { - read, - readTree, - normalizeFunding, - isValidFunding, -} diff --git a/node_modules/npm/node_modules/libnpmfund/package.json b/node_modules/npm/node_modules/libnpmfund/package.json deleted file mode 100644 index b300223..0000000 --- a/node_modules/npm/node_modules/libnpmfund/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "libnpmfund", - "version": "5.0.2", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "description": "Programmatic API for npm fund", - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmfund" - }, - "keywords": [ - "npm", - "npmcli", - "libnpm", - "cli", - "git", - "fund", - "gitfund" - ], - "author": "GitHub Inc.", - "contributors": [ - { - "name": "Ruy Adorno", - "url": "https://ruyadorno.com", - "twitter": "ruyadorno" - } - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "lintfix": "npm run lint -- --fix", - "posttest": "npm run lint", - "test": "tap", - "snap": "tap", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "tap": "^16.3.8" - }, - "dependencies": { - "@npmcli/arborist": "^7.2.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmhook/LICENSE.md b/node_modules/npm/node_modules/libnpmhook/LICENSE.md deleted file mode 100644 index 8d28acf..0000000 --- a/node_modules/npm/node_modules/libnpmhook/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmhook/README.md b/node_modules/npm/node_modules/libnpmhook/README.md deleted file mode 100644 index 309f804..0000000 --- a/node_modules/npm/node_modules/libnpmhook/README.md +++ /dev/null @@ -1,271 +0,0 @@ -# libnpmhook - -[![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) -[![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) -[![CI - libnpmhook](https://github.com/npm/cli/actions/workflows/ci-libnpmhook.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmhook.yml) - -[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for -programmatically managing the npm registry's server-side hooks. - -For a more general introduction to managing hooks, see [the introductory blog -post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm). - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [Contributing](#contributing) -* [API](#api) - * [hook opts](#opts) - * [`add()`](#add) - * [`rm()`](#rm) - * [`ls()`](#ls) - * [`ls.stream()`](#ls-stream) - * [`update()`](#update) - -## Example - -```js -const hooks = require('libnpmhook') - -console.log(await hooks.ls('mypkg', {token: 'deadbeef'})) -// array of hook objects on `mypkg`. -``` - -## Install - -`$ npm install libnpmhook` - -### API - -#### `opts` for `libnpmhook` commands - -`libnpmhook` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmhook` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` - -#### `> hooks.add(name, endpoint, secret, [opts]) -> Promise` - -`name` is the name of the package, org, or user/org scope to watch. The type is -determined by the name syntax: `'@foo/bar'` and `'foo'` are treated as packages, -`@foo` is treated as a scope, and `~user` is treated as an org name or scope. -Each type will attach to different events. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was created, -including its generated `id`. - -See also: [`POST -/v1/hooks/hook`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#post-v1hookshook) - -##### Example - -```javascript -await hooks.add('~zkat', 'https://example.com/api/added', 'supersekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://example.com/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.find(id, [opts]) -> Promise` - -Returns the hook identified by `id`. - -The returned Promise resolves to the full hook object that was found, or error -with `err.code` of `'E404'` if it didn't exist. - -See also: [`GET -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hookshookid) - -##### Example - -```javascript -await hooks.find('16f7xoal', {token: 'myregistrytoken'}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://example.com/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.rm(id, [opts]) -> Promise` - -Removes the hook identified by `id`. - -The returned Promise resolves to the full hook object that was removed, if it -existed, or `null` if no such hook was there (instead of erroring). - -See also: [`DELETE -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#delete-v1hookshookid) - -##### Example - -```javascript -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://example.com/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: true, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } - -// Repeat it... -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> null -``` - -#### `> hooks.update(id, endpoint, secret, [opts]) -> Promise` - -The `id` should be a hook ID from a previously-created hook. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was updated, if it -existed. Otherwise, it will error with an `'E404'` error code. - -See also: [`PUT -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#put-v1hookshookid) - -##### Example - -```javascript -await hooks.update('16fxoal', 'https://example.com/api/other', 'newsekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://example.com/api/other', - secret: 'newsekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:14:41.964Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.ls([opts]) -> Promise` - -Resolves to an array of hook objects associated with the account you're -authenticated as. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls.stream()`](#ls-stream) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -await hooks.ls({token: 'myregistrytoken'}) - -=> -[ - { id: '16f7xoal', ... }, - { id: 'wnyf98a1', ... }, - ... -] -``` - -#### `> hooks.ls.stream([opts]) -> Stream` - -Returns a stream of hook objects associated with the account you're -authenticated as. The returned stream is a valid `Symbol.asyncIterator` on -`node@>=10`. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls()`](#ls) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -for await (let hook of hooks.ls.stream({token: 'myregistrytoken'})) { - console.log('found hook:', hook.id) -} - -=> -// outputs: -// found hook: 16f7xoal -// found hook: wnyf98a1 -``` diff --git a/node_modules/npm/node_modules/libnpmhook/lib/index.js b/node_modules/npm/node_modules/libnpmhook/lib/index.js deleted file mode 100644 index 091cdc4..0000000 --- a/node_modules/npm/node_modules/libnpmhook/lib/index.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict' - -const fetch = require('npm-registry-fetch') -const validate = require('aproba') - -const eu = encodeURIComponent -const cmd = module.exports = {} -cmd.add = (name, endpoint, secret, opts = {}) => { - validate('SSSO', [name, endpoint, secret, opts]) - let type = 'package' - if (name.match(/^@[^/]+$/)) { - type = 'scope' - } - if (name[0] === '~') { - type = 'owner' - name = name.slice(1) - } - return fetch.json('/-/npm/v1/hooks/hook', { - ...opts, - method: 'POST', - body: { type, name, endpoint, secret }, - }) -} - -cmd.rm = (id, opts = {}) => { - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, { - ...opts, - method: 'DELETE', - }).catch(err => { - if (err.code === 'E404') { - return null - } else { - throw err - } - }) -} - -cmd.update = (id, endpoint, secret, opts = {}) => { - validate('SSSO', [id, endpoint, secret, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, { - ...opts, - method: 'PUT', - body: { endpoint, secret }, - }) -} - -cmd.find = (id, opts = {}) => { - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts) -} - -cmd.ls = (opts = {}) => { - return cmd.ls.stream(opts).collect() -} - -cmd.ls.stream = (opts = {}) => { - const { package: pkg, limit, offset } = opts - validate('S|Z', [pkg]) - validate('N|Z', [limit]) - validate('N|Z', [offset]) - return fetch.json.stream('/-/npm/v1/hooks', 'objects.*', { - ...opts, - query: { - package: pkg, - limit, - offset, - }, - }) -} diff --git a/node_modules/npm/node_modules/libnpmhook/package.json b/node_modules/npm/node_modules/libnpmhook/package.json deleted file mode 100644 index 0bd822a..0000000 --- a/node_modules/npm/node_modules/libnpmhook/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "libnpmhook", - "version": "10.0.1", - "description": "programmatic API for managing npm registry hooks", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "test": "tap", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "posttest": "npm run lint", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmhook" - }, - "keywords": [ - "npm", - "hooks", - "registry", - "npm api" - ], - "author": "GitHub Inc.", - "license": "ISC", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmorg/LICENSE b/node_modules/npm/node_modules/libnpmorg/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmorg/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmorg/README.md b/node_modules/npm/node_modules/libnpmorg/README.md deleted file mode 100644 index d516552..0000000 --- a/node_modules/npm/node_modules/libnpmorg/README.md +++ /dev/null @@ -1,148 +0,0 @@ -# libnpmorg - -[![npm version](https://img.shields.io/npm/v/libnpmorg.svg)](https://npm.im/libnpmorg) -[![license](https://img.shields.io/npm/l/libnpmorg.svg)](https://npm.im/libnpmorg) -[![CI - libnpmorg](https://github.com/npm/cli/actions/workflows/ci-libnpmorg.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmorg.yml) - -[`libnpmorg`](https://github.com/npm/libnpmorg) is a Node.js library for -programmatically accessing the [npm Org membership -API](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail). - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [Contributing](#contributing) -* [API](#api) - * [hook opts](#opts) - * [`set()`](#set) - * [`rm()`](#rm) - * [`ls()`](#ls) - * [`ls.stream()`](#ls-stream) - -## Example - -```js -const org = require('libnpmorg') - -console.log(await org.ls('myorg', {token: 'deadbeef'})) -=> -Roster { - zkat: 'developer', - iarna: 'admin', - isaacs: 'owner' -} -``` - -## Install - -`$ npm install libnpmorg` - -### API - -#### `opts` for `libnpmorg` commands - -`libnpmorg` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmorg` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` - -#### `> org.set(org, user, [role], [opts]) -> Promise` - -The returned Promise resolves to a [Membership -Detail](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail) -object. - -The `role` is optional and should be one of `admin`, `owner`, or `developer`. -`developer` is the default if no `role` is provided. - -`org` and `user` must be scope names for the org name and user name -respectively. They can optionally be prefixed with `@`. - -See also: [`PUT -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-replace) - -##### Example - -```javascript -await org.set('@myorg', '@myuser', 'admin', {token: 'deadbeef'}) -=> -MembershipDetail { - org: { - name: 'myorg', - size: 15 - }, - user: 'myuser', - role: 'admin' -} -``` - -#### `> org.rm(org, user, [opts]) -> Promise` - -The Promise resolves to `null` on success. - -`org` and `user` must be scope names for the org name and user name -respectively. They can optionally be prefixed with `@`. - -See also: [`DELETE -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-delete) - -##### Example - -```javascript -await org.rm('myorg', 'myuser', {token: 'deadbeef'}) -``` - -#### `> org.ls(org, [opts]) -> Promise` - -The Promise resolves to a -[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster) -object. - -`org` must be a scope name for an org, and can be optionally prefixed with `@`. - -See also: [`GET -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster) - -##### Example - -```javascript -await org.ls('myorg', {token: 'deadbeef'}) -=> -Roster { - zkat: 'developer', - iarna: 'admin', - isaacs: 'owner' -} -``` - -#### `> org.ls.stream(org, [opts]) -> Stream` - -Returns a stream of entries for a -[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster), -with each emitted entry in `[key, value]` format. - -`org` must be a scope name for an org, and can be optionally prefixed with `@`. - -The returned stream is a valid `Symbol.asyncIterator`. - -See also: [`GET -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster) - -##### Example - -```javascript -for await (let [user, role] of org.ls.stream('myorg', {token: 'deadbeef'})) { - console.log(`user: ${user} (${role})`) -} -=> -user: zkat (developer) -user: iarna (admin) -user: isaacs (owner) -``` diff --git a/node_modules/npm/node_modules/libnpmorg/lib/index.js b/node_modules/npm/node_modules/libnpmorg/lib/index.js deleted file mode 100644 index 4684b51..0000000 --- a/node_modules/npm/node_modules/libnpmorg/lib/index.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -const eu = encodeURIComponent -const fetch = require('npm-registry-fetch') -const validate = require('aproba') - -// From https://github.com/npm/registry/blob/master/docs/orgs/memberships.md -const cmd = module.exports - -class MembershipDetail {} -cmd.set = (org, user, role, opts = {}) => { - if ( - typeof role === 'object' && - Object.keys(opts).length === 0 - ) { - opts = role - role = undefined - } - validate('SSSO|SSZO', [org, user, role, opts]) - user = user.replace(/^@?/, '') - org = org.replace(/^@?/, '') - return fetch.json(`/-/org/${eu(org)}/user`, { - ...opts, - method: 'PUT', - body: { user, role }, - }).then(ret => Object.assign(new MembershipDetail(), ret)) -} - -cmd.rm = (org, user, opts = {}) => { - validate('SSO', [org, user, opts]) - user = user.replace(/^@?/, '') - org = org.replace(/^@?/, '') - return fetch(`/-/org/${eu(org)}/user`, { - ...opts, - method: 'DELETE', - body: { user }, - ignoreBody: true, - }).then(() => null) -} - -class Roster {} -cmd.ls = (org, opts = {}) => { - return cmd.ls.stream(org, opts) - .collect() - .then(data => data.reduce((acc, [key, val]) => { - if (!acc) { - acc = {} - } - acc[key] = val - return acc - }, null)) - .then(ret => Object.assign(new Roster(), ret)) -} - -cmd.ls.stream = (org, opts = {}) => { - validate('SO', [org, opts]) - org = org.replace(/^@?/, '') - return fetch.json.stream(`/-/org/${eu(org)}/user`, '*', { - ...opts, - mapJSON: (value, [key]) => { - return [key, value] - }, - }) -} diff --git a/node_modules/npm/node_modules/libnpmorg/package.json b/node_modules/npm/node_modules/libnpmorg/package.json deleted file mode 100644 index a0aedb7..0000000 --- a/node_modules/npm/node_modules/libnpmorg/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "libnpmorg", - "version": "6.0.2", - "description": "Programmatic api for `npm org` commands", - "author": "GitHub Inc.", - "main": "lib/index.js", - "keywords": [ - "libnpm", - "npm", - "package manager", - "api", - "orgs", - "teams" - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "test": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "files": [ - "bin/", - "lib/" - ], - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "minipass": "^7.0.4", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmorg" - }, - "bugs": "https://github.com/npm/libnpmorg/issues", - "homepage": "https://npmjs.com/package/libnpmorg", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmpack/LICENSE b/node_modules/npm/node_modules/libnpmpack/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmpack/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmpack/README.md b/node_modules/npm/node_modules/libnpmpack/README.md deleted file mode 100644 index e3ed416..0000000 --- a/node_modules/npm/node_modules/libnpmpack/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# libnpmpack - -[![npm version](https://img.shields.io/npm/v/libnpmpack.svg)](https://npm.im/libnpmpack) -[![license](https://img.shields.io/npm/l/libnpmpack.svg)](https://npm.im/libnpmpack) -[![CI - libnpmpack](https://github.com/npm/cli/actions/workflows/ci-libnpmpack.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmpack.yml) - -[`libnpmpack`](https://github.com/npm/libnpmpack) is a Node.js library for -programmatically packing tarballs from a local directory or from a registry or github spec. If packing from a local source, `libnpmpack` will also run the `prepack` and `postpack` lifecycles. - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [`pack()`](#pack) - -## Example - -```js -const pack = require('libnpmpack') -``` - -## Install - -`$ npm install libnpmpack` - -### API - -#### `> pack(spec, [opts]) -> Promise` - -Packs a tarball from a local directory or from a registry or github spec and returns a Promise that resolves to the tarball data Buffer, with from, resolved, and integrity fields attached. - -If no options are passed, the tarball file will be saved on the same directory from which `pack` was called in. - -`libnpmpack` uses [`pacote`](https://npm.im/pacote). -Most options are passed through directly to that library, so please refer to -[its own `opts` -documentation](https://www.npmjs.com/package/pacote#options) -for options that can be passed in. - -##### Examples - -```javascript -// packs from cwd -const tarball = await pack() - -// packs from a local directory -const localTar = await pack('/Users/claudiahdz/projects/my-cool-pkg') - -// packs from a registry spec -const registryTar = await pack('abbrev@1.0.3') - -// packs from a github spec -const githubTar = await pack('isaacs/rimraf#PR-192') -``` diff --git a/node_modules/npm/node_modules/libnpmpack/lib/index.js b/node_modules/npm/node_modules/libnpmpack/lib/index.js deleted file mode 100644 index 70d67d3..0000000 --- a/node_modules/npm/node_modules/libnpmpack/lib/index.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict' - -const pacote = require('pacote') -const npa = require('npm-package-arg') -const runScript = require('@npmcli/run-script') -const path = require('path') -const util = require('util') -const Arborist = require('@npmcli/arborist') -const writeFile = util.promisify(require('fs').writeFile) - -module.exports = pack -async function pack (spec = 'file:.', opts = {}) { - // gets spec - spec = npa(spec) - - const manifest = await pacote.manifest(spec, opts) - - // Default to true if no log options passed, set to false if we're in silent - // mode - const banner = !opts.silent - - const stdio = opts.foregroundScripts ? 'inherit' : 'pipe' - - if (spec.type === 'directory' && !opts.ignoreScripts) { - // prepack - await runScript({ - ...opts, - event: 'prepack', - path: spec.fetchSpec, - stdio, - pkg: manifest, - banner, - }) - } - - // packs tarball - const tarball = await pacote.tarball(manifest._resolved, { - ...opts, - Arborist, - integrity: manifest._integrity, - }) - - // check for explicit `false` so the default behavior is to skip writing to disk - if (opts.dryRun === false) { - const filename = `${manifest.name}-${manifest.version}.tgz` - .replace(/^@/, '').replace(/\//, '-') - const destination = path.resolve(opts.packDestination, filename) - await writeFile(destination, tarball) - } - - if (spec.type === 'directory' && !opts.ignoreScripts) { - // postpack - await runScript({ - ...opts, - event: 'postpack', - path: spec.fetchSpec, - stdio, - pkg: manifest, - banner, - env: { - npm_package_from: tarball.from, - npm_package_resolved: tarball.resolved, - npm_package_integrity: tarball.integrity, - }, - }) - } - - return tarball -} diff --git a/node_modules/npm/node_modules/libnpmpack/package.json b/node_modules/npm/node_modules/libnpmpack/package.json deleted file mode 100644 index 7200106..0000000 --- a/node_modules/npm/node_modules/libnpmpack/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "libnpmpack", - "version": "6.0.4", - "description": "Programmatic API for the bits behind npm pack", - "author": "GitHub Inc.", - "main": "lib/index.js", - "contributors": [ - "Claudia Hernández " - ], - "files": [ - "bin/", - "lib/" - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "test": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "spawk": "^1.7.1", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmpack" - }, - "bugs": "https://github.com/npm/libnpmpack/issues", - "homepage": "https://npmjs.com/package/libnpmpack", - "dependencies": { - "@npmcli/arborist": "^7.2.1", - "@npmcli/run-script": "^7.0.2", - "npm-package-arg": "^11.0.1", - "pacote": "^17.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmpublish/LICENSE b/node_modules/npm/node_modules/libnpmpublish/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmpublish/README.md b/node_modules/npm/node_modules/libnpmpublish/README.md deleted file mode 100644 index 90b1f7c..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# libnpmpublish - -[![npm version](https://img.shields.io/npm/v/libnpmpublish.svg)](https://npm.im/libnpmpublish) -[![license](https://img.shields.io/npm/l/libnpmpublish.svg)](https://npm.im/libnpmpublish) -[![CI - libnpmpublish](https://github.com/npm/cli/actions/workflows/ci-libnpmpublish.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmpublish.yml) - -[`libnpmpublish`](https://github.com/npm/libnpmpublish) is a Node.js -library for programmatically publishing and unpublishing npm packages. Give -it a manifest as an object and a tarball as a Buffer, and it'll put them on -the registry for you. - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [publish/unpublish opts](#opts) - * [`publish()`](#publish) - * [`unpublish()`](#unpublish) - -## Example - -```js -const { publish, unpublish } = require('libnpmpublish') -``` - -## Install - -`$ npm install libnpmpublish` - -### API - -#### `opts` for `libnpmpublish` commands - -`libnpmpublish` uses -[`npm-registry-fetch`](https://npm.im/npm-registry-fetch). Most options -are passed through directly to that library, so please refer to [its own -`opts` documentation](http://npm.im/npm-registry-fetch#fetch-options) for -options that can be passed in. - -A couple of options of note: - -* `opts.defaultTag` - registers the published package with the given tag, - defaults to `latest`. - -* `opts.access` - tells the registry whether this package should be - published as `public` or `restricted`. Only applies to scoped - packages. Defaults to `public`. - -* `opts.token` - can be passed in and will be used as the authentication - token for the registry. For other ways to pass in auth details, see the - n-r-f docs. - -* `opts.provenance` - when running in a supported CI environment, will trigger - the generation of a signed provenance statement to be published alongside - the package. Mutually exclusive with the `provenanceFile` option. - -* `opts.provenanceFile` - specifies the path to an externally-generated - provenance statement to be published alongside the package. Mutually - exclusive with the `provenance` option. The specified file should be a - [Sigstore Bundle](https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto) - containing a [DSSE](https://github.com/secure-systems-lab/dsse)-packaged - provenance statement. - -#### `> libpub.publish(manifest, tarData, [opts]) -> Promise` - -Sends the package represented by the `manifest` and `tarData` to the -configured registry. - -`manifest` should be the parsed `package.json` for the package being -published (which can also be the manifest pulled from a packument, a git -repo, tarball, etc.) - -`tarData` is a `Buffer` of the tarball being published. - -If `opts.npmVersion` is passed in, it will be used as the `_npmVersion` -field in the outgoing packument. You may put your own user-agent string in -there to identify your publishes. - -If `opts.algorithms` is passed in, it should be an array of hashing -algorithms to generate `integrity` hashes for. The default is `['sha512']`, -which means you end up with `dist.integrity = 'sha512-deadbeefbadc0ffee'`. -Any algorithm supported by your current node version is allowed -- npm -clients that do not support those algorithms will simply ignore the -unsupported hashes. - -##### Example - -```js -// note that pacote.manifest() and pacote.tarball() can also take -// any spec that npm can install. a folder shown here, since that's -// far and away the most common use case. -const path = '/a/path/to/your/source/code' -const pacote = require('pacote') // see: http://npm.im/pacote -const manifest = await pacote.manifest(path) -const tarData = await pacote.tarball(path) -await libpub.publish(manifest, tarData, { - npmVersion: 'my-pub-script@1.0.2', - token: 'my-auth-token-here' -}, opts) -// Package has been published to the npm registry. -``` - -#### `> libpub.unpublish(spec, [opts]) -> Promise` - -Unpublishes `spec` from the appropriate registry. The registry in question may -have its own limitations on unpublishing. - -`spec` should be either a string, or a valid -[`npm-package-arg`](https://npm.im/npm-package-arg) parsed spec object. For -legacy compatibility reasons, only `tag` and `version` specs will work as -expected. `range` specs will fail silently in most cases. - -##### Example - -```js -await libpub.unpublish('lodash', { token: 'i-am-the-worst'}) -// -// `lodash` has now been unpublished, along with all its versions -``` diff --git a/node_modules/npm/node_modules/libnpmpublish/lib/index.js b/node_modules/npm/node_modules/libnpmpublish/lib/index.js deleted file mode 100644 index 35687e0..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/lib/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - publish: require('./publish.js'), - unpublish: require('./unpublish.js'), -} diff --git a/node_modules/npm/node_modules/libnpmpublish/lib/provenance.js b/node_modules/npm/node_modules/libnpmpublish/lib/provenance.js deleted file mode 100644 index 090d4cd..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/lib/provenance.js +++ /dev/null @@ -1,245 +0,0 @@ -const sigstore = require('sigstore') -const { readFile } = require('fs/promises') -const ci = require('ci-info') -const { env } = process - -const INTOTO_PAYLOAD_TYPE = 'application/vnd.in-toto+json' -const INTOTO_STATEMENT_V01_TYPE = 'https://in-toto.io/Statement/v0.1' -const INTOTO_STATEMENT_V1_TYPE = 'https://in-toto.io/Statement/v1' -const SLSA_PREDICATE_V02_TYPE = 'https://slsa.dev/provenance/v0.2' -const SLSA_PREDICATE_V1_TYPE = 'https://slsa.dev/provenance/v1' - -const GITHUB_BUILDER_ID_PREFIX = 'https://github.com/actions/runner' -const GITHUB_BUILD_TYPE = 'https://slsa-framework.github.io/github-actions-buildtypes/workflow/v1' - -const GITLAB_BUILD_TYPE_PREFIX = 'https://github.com/npm/cli/gitlab' -const GITLAB_BUILD_TYPE_VERSION = 'v0alpha1' - -const generateProvenance = async (subject, opts) => { - let payload - if (ci.GITHUB_ACTIONS) { - /* istanbul ignore next - not covering missing env var case */ - const relativeRef = (env.GITHUB_WORKFLOW_REF || '').replace(env.GITHUB_REPOSITORY + '/', '') - const delimiterIndex = relativeRef.indexOf('@') - const workflowPath = relativeRef.slice(0, delimiterIndex) - const workflowRef = relativeRef.slice(delimiterIndex + 1) - - payload = { - _type: INTOTO_STATEMENT_V1_TYPE, - subject, - predicateType: SLSA_PREDICATE_V1_TYPE, - predicate: { - buildDefinition: { - buildType: GITHUB_BUILD_TYPE, - externalParameters: { - workflow: { - ref: workflowRef, - repository: `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}`, - path: workflowPath, - }, - }, - internalParameters: { - github: { - event_name: env.GITHUB_EVENT_NAME, - repository_id: env.GITHUB_REPOSITORY_ID, - repository_owner_id: env.GITHUB_REPOSITORY_OWNER_ID, - }, - }, - resolvedDependencies: [ - { - uri: `git+${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}@${env.GITHUB_REF}`, - digest: { - gitCommit: env.GITHUB_SHA, - }, - }, - ], - }, - runDetails: { - builder: { id: `${GITHUB_BUILDER_ID_PREFIX}/${env.RUNNER_ENVIRONMENT}` }, - metadata: { - /* eslint-disable-next-line max-len */ - invocationId: `${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}/attempts/${env.GITHUB_RUN_ATTEMPT}`, - }, - }, - }, - } - } - if (ci.GITLAB) { - payload = { - _type: INTOTO_STATEMENT_V01_TYPE, - subject, - predicateType: SLSA_PREDICATE_V02_TYPE, - predicate: { - buildType: `${GITLAB_BUILD_TYPE_PREFIX}/${GITLAB_BUILD_TYPE_VERSION}`, - builder: { id: `${env.CI_PROJECT_URL}/-/runners/${env.CI_RUNNER_ID}` }, - invocation: { - configSource: { - uri: `git+${env.CI_PROJECT_URL}`, - digest: { - sha1: env.CI_COMMIT_SHA, - }, - entryPoint: env.CI_JOB_NAME, - }, - parameters: { - CI: env.CI, - CI_API_GRAPHQL_URL: env.CI_API_GRAPHQL_URL, - CI_API_V4_URL: env.CI_API_V4_URL, - CI_BUILD_BEFORE_SHA: env.CI_BUILD_BEFORE_SHA, - CI_BUILD_ID: env.CI_BUILD_ID, - CI_BUILD_NAME: env.CI_BUILD_NAME, - CI_BUILD_REF: env.CI_BUILD_REF, - CI_BUILD_REF_NAME: env.CI_BUILD_REF_NAME, - CI_BUILD_REF_SLUG: env.CI_BUILD_REF_SLUG, - CI_BUILD_STAGE: env.CI_BUILD_STAGE, - CI_COMMIT_BEFORE_SHA: env.CI_COMMIT_BEFORE_SHA, - CI_COMMIT_BRANCH: env.CI_COMMIT_BRANCH, - CI_COMMIT_REF_NAME: env.CI_COMMIT_REF_NAME, - CI_COMMIT_REF_PROTECTED: env.CI_COMMIT_REF_PROTECTED, - CI_COMMIT_REF_SLUG: env.CI_COMMIT_REF_SLUG, - CI_COMMIT_SHA: env.CI_COMMIT_SHA, - CI_COMMIT_SHORT_SHA: env.CI_COMMIT_SHORT_SHA, - CI_COMMIT_TIMESTAMP: env.CI_COMMIT_TIMESTAMP, - CI_COMMIT_TITLE: env.CI_COMMIT_TITLE, - CI_CONFIG_PATH: env.CI_CONFIG_PATH, - CI_DEFAULT_BRANCH: env.CI_DEFAULT_BRANCH, - CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX: - env.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX, - CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX: env.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX, - CI_DEPENDENCY_PROXY_SERVER: env.CI_DEPENDENCY_PROXY_SERVER, - CI_DEPENDENCY_PROXY_USER: env.CI_DEPENDENCY_PROXY_USER, - CI_JOB_ID: env.CI_JOB_ID, - CI_JOB_NAME: env.CI_JOB_NAME, - CI_JOB_NAME_SLUG: env.CI_JOB_NAME_SLUG, - CI_JOB_STAGE: env.CI_JOB_STAGE, - CI_JOB_STARTED_AT: env.CI_JOB_STARTED_AT, - CI_JOB_URL: env.CI_JOB_URL, - CI_NODE_TOTAL: env.CI_NODE_TOTAL, - CI_PAGES_DOMAIN: env.CI_PAGES_DOMAIN, - CI_PAGES_URL: env.CI_PAGES_URL, - CI_PIPELINE_CREATED_AT: env.CI_PIPELINE_CREATED_AT, - CI_PIPELINE_ID: env.CI_PIPELINE_ID, - CI_PIPELINE_IID: env.CI_PIPELINE_IID, - CI_PIPELINE_SOURCE: env.CI_PIPELINE_SOURCE, - CI_PIPELINE_URL: env.CI_PIPELINE_URL, - CI_PROJECT_CLASSIFICATION_LABEL: env.CI_PROJECT_CLASSIFICATION_LABEL, - CI_PROJECT_DESCRIPTION: env.CI_PROJECT_DESCRIPTION, - CI_PROJECT_ID: env.CI_PROJECT_ID, - CI_PROJECT_NAME: env.CI_PROJECT_NAME, - CI_PROJECT_NAMESPACE: env.CI_PROJECT_NAMESPACE, - CI_PROJECT_NAMESPACE_ID: env.CI_PROJECT_NAMESPACE_ID, - CI_PROJECT_PATH: env.CI_PROJECT_PATH, - CI_PROJECT_PATH_SLUG: env.CI_PROJECT_PATH_SLUG, - CI_PROJECT_REPOSITORY_LANGUAGES: env.CI_PROJECT_REPOSITORY_LANGUAGES, - CI_PROJECT_ROOT_NAMESPACE: env.CI_PROJECT_ROOT_NAMESPACE, - CI_PROJECT_TITLE: env.CI_PROJECT_TITLE, - CI_PROJECT_URL: env.CI_PROJECT_URL, - CI_PROJECT_VISIBILITY: env.CI_PROJECT_VISIBILITY, - CI_REGISTRY: env.CI_REGISTRY, - CI_REGISTRY_IMAGE: env.CI_REGISTRY_IMAGE, - CI_REGISTRY_USER: env.CI_REGISTRY_USER, - CI_RUNNER_DESCRIPTION: env.CI_RUNNER_DESCRIPTION, - CI_RUNNER_ID: env.CI_RUNNER_ID, - CI_RUNNER_TAGS: env.CI_RUNNER_TAGS, - CI_SERVER_HOST: env.CI_SERVER_HOST, - CI_SERVER_NAME: env.CI_SERVER_NAME, - CI_SERVER_PORT: env.CI_SERVER_PORT, - CI_SERVER_PROTOCOL: env.CI_SERVER_PROTOCOL, - CI_SERVER_REVISION: env.CI_SERVER_REVISION, - CI_SERVER_SHELL_SSH_HOST: env.CI_SERVER_SHELL_SSH_HOST, - CI_SERVER_SHELL_SSH_PORT: env.CI_SERVER_SHELL_SSH_PORT, - CI_SERVER_URL: env.CI_SERVER_URL, - CI_SERVER_VERSION: env.CI_SERVER_VERSION, - CI_SERVER_VERSION_MAJOR: env.CI_SERVER_VERSION_MAJOR, - CI_SERVER_VERSION_MINOR: env.CI_SERVER_VERSION_MINOR, - CI_SERVER_VERSION_PATCH: env.CI_SERVER_VERSION_PATCH, - CI_TEMPLATE_REGISTRY_HOST: env.CI_TEMPLATE_REGISTRY_HOST, - GITLAB_CI: env.GITLAB_CI, - GITLAB_FEATURES: env.GITLAB_FEATURES, - GITLAB_USER_ID: env.GITLAB_USER_ID, - GITLAB_USER_LOGIN: env.GITLAB_USER_LOGIN, - RUNNER_GENERATE_ARTIFACTS_METADATA: env.RUNNER_GENERATE_ARTIFACTS_METADATA, - }, - environment: { - name: env.CI_RUNNER_DESCRIPTION, - architecture: env.CI_RUNNER_EXECUTABLE_ARCH, - server: env.CI_SERVER_URL, - project: env.CI_PROJECT_PATH, - job: { - id: env.CI_JOB_ID, - }, - pipeline: { - id: env.CI_PIPELINE_ID, - ref: env.CI_CONFIG_PATH, - }, - }, - }, - metadata: { - buildInvocationId: `${env.CI_JOB_URL}`, - completeness: { - parameters: true, - environment: true, - materials: false, - }, - reproducible: false, - }, - materials: [ - { - uri: `git+${env.CI_PROJECT_URL}`, - digest: { - sha1: env.CI_COMMIT_SHA, - }, - }, - ], - }, - } - } - return sigstore.attest(Buffer.from(JSON.stringify(payload)), INTOTO_PAYLOAD_TYPE, opts) -} - -const verifyProvenance = async (subject, provenancePath) => { - let provenanceBundle - try { - provenanceBundle = JSON.parse(await readFile(provenancePath)) - } catch (err) { - err.message = `Invalid provenance provided: ${err.message}` - throw err - } - - const payload = extractProvenance(provenanceBundle) - if (!payload.subject || !payload.subject.length) { - throw new Error('No subject found in sigstore bundle payload') - } - if (payload.subject.length > 1) { - throw new Error('Found more than one subject in the sigstore bundle payload') - } - - const bundleSubject = payload.subject[0] - if (subject.name !== bundleSubject.name) { - throw new Error( - `Provenance subject ${bundleSubject.name} does not match the package: ${subject.name}` - ) - } - if (subject.digest.sha512 !== bundleSubject.digest.sha512) { - throw new Error('Provenance subject digest does not match the package') - } - - await sigstore.verify(provenanceBundle) - return provenanceBundle -} - -const extractProvenance = (bundle) => { - if (!bundle?.dsseEnvelope?.payload) { - throw new Error('No dsseEnvelope with payload found in sigstore bundle') - } - try { - return JSON.parse(Buffer.from(bundle.dsseEnvelope.payload, 'base64').toString('utf8')) - } catch (err) { - err.message = `Failed to parse payload from dsseEnvelope: ${err.message}` - throw err - } -} - -module.exports = { - generateProvenance, - verifyProvenance, -} diff --git a/node_modules/npm/node_modules/libnpmpublish/lib/publish.js b/node_modules/npm/node_modules/libnpmpublish/lib/publish.js deleted file mode 100644 index b0ef782..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/lib/publish.js +++ /dev/null @@ -1,225 +0,0 @@ -const { fixer } = require('normalize-package-data') -const npmFetch = require('npm-registry-fetch') -const npa = require('npm-package-arg') -const log = require('proc-log') -const semver = require('semver') -const { URL } = require('url') -const ssri = require('ssri') -const ciInfo = require('ci-info') - -const { generateProvenance, verifyProvenance } = require('./provenance') - -const TLOG_BASE_URL = 'https://search.sigstore.dev/' - -const publish = async (manifest, tarballData, opts) => { - if (manifest.private) { - throw Object.assign( - new Error(`This package has been marked as private -Remove the 'private' field from the package.json to publish it.`), - { code: 'EPRIVATE' } - ) - } - - // spec is used to pick the appropriate registry/auth combo - const spec = npa.resolve(manifest.name, manifest.version) - opts = { - access: 'public', - algorithms: ['sha512'], - defaultTag: 'latest', - ...opts, - spec, - } - - const reg = npmFetch.pickRegistry(spec, opts) - const pubManifest = patchManifest(manifest, opts) - - // registry-frontdoor cares about the access level, - // which is only configurable for scoped packages - if (!spec.scope && opts.access === 'restricted') { - throw Object.assign( - new Error("Can't restrict access to unscoped packages."), - { code: 'EUNSCOPED' } - ) - } - - const { metadata, transparencyLogUrl } = await buildMetadata( - reg, - pubManifest, - tarballData, - spec, - opts - ) - - const res = await npmFetch(spec.escapedName, { - ...opts, - method: 'PUT', - body: metadata, - ignoreBody: true, - }) - if (transparencyLogUrl) { - res.transparencyLogUrl = transparencyLogUrl - } - return res -} - -const patchManifest = (_manifest, opts) => { - const { npmVersion } = opts - // we only update top-level fields, so a shallow clone is fine - const manifest = { ..._manifest } - - manifest._nodeVersion = process.versions.node - if (npmVersion) { - manifest._npmVersion = npmVersion - } - - fixer.fixNameField(manifest, { strict: true, allowLegacyCase: true }) - const version = semver.clean(manifest.version) - if (!version) { - throw Object.assign( - new Error('invalid semver: ' + manifest.version), - { code: 'EBADSEMVER' } - ) - } - manifest.version = version - return manifest -} - -const buildMetadata = async (registry, manifest, tarballData, spec, opts) => { - const { access, defaultTag, algorithms, provenance, provenanceFile } = opts - const root = { - _id: manifest.name, - name: manifest.name, - description: manifest.description, - 'dist-tags': {}, - versions: {}, - access, - } - - root.versions[manifest.version] = manifest - const tag = manifest.tag || defaultTag - root['dist-tags'][tag] = manifest.version - - const tarballName = `${manifest.name}-${manifest.version}.tgz` - const provenanceBundleName = `${manifest.name}-${manifest.version}.sigstore` - const tarballURI = `${manifest.name}/-/${tarballName}` - const integrity = ssri.fromData(tarballData, { - algorithms: [...new Set(['sha1'].concat(algorithms))], - }) - - manifest._id = `${manifest.name}@${manifest.version}` - manifest.dist = { ...manifest.dist } - // Don't bother having sha1 in the actual integrity field - manifest.dist.integrity = integrity.sha512[0].toString() - // Legacy shasum support - manifest.dist.shasum = integrity.sha1[0].hexDigest() - - // NB: the CLI always fetches via HTTPS if the registry is HTTPS, - // regardless of what's here. This makes it so that installing - // from an HTTP-only mirror doesn't cause problems, though. - manifest.dist.tarball = new URL(tarballURI, registry).href - .replace(/^https:\/\//, 'http://') - - root._attachments = {} - root._attachments[tarballName] = { - content_type: 'application/octet-stream', - data: tarballData.toString('base64'), - length: tarballData.length, - } - - // Handle case where --provenance flag was set to true - let transparencyLogUrl - if (provenance === true || provenanceFile) { - let provenanceBundle - const subject = { - name: npa.toPurl(spec), - digest: { sha512: integrity.sha512[0].hexDigest() }, - } - - if (provenance === true) { - await ensureProvenanceGeneration(registry, spec, opts) - provenanceBundle = await generateProvenance([subject], opts) - - /* eslint-disable-next-line max-len */ - log.notice('publish', `Signed provenance statement with source and build information from ${ciInfo.name}`) - - const tlogEntry = provenanceBundle?.verificationMaterial?.tlogEntries[0] - /* istanbul ignore else */ - if (tlogEntry) { - transparencyLogUrl = `${TLOG_BASE_URL}?logIndex=${tlogEntry.logIndex}` - log.notice( - 'publish', - `Provenance statement published to transparency log: ${transparencyLogUrl}` - ) - } - } else { - provenanceBundle = await verifyProvenance(subject, provenanceFile) - } - - const serializedBundle = JSON.stringify(provenanceBundle) - root._attachments[provenanceBundleName] = { - content_type: provenanceBundle.mediaType, - data: serializedBundle, - length: serializedBundle.length, - } - } - - return { - metadata: root, - transparencyLogUrl, - } -} - -// Check that all the prereqs are met for provenance generation -const ensureProvenanceGeneration = async (registry, spec, opts) => { - if (ciInfo.GITHUB_ACTIONS) { - // Ensure that the GHA OIDC token is available - if (!process.env.ACTIONS_ID_TOKEN_REQUEST_URL) { - throw Object.assign( - /* eslint-disable-next-line max-len */ - new Error('Provenance generation in GitHub Actions requires "write" access to the "id-token" permission'), - { code: 'EUSAGE' } - ) - } - } else if (ciInfo.GITLAB) { - // Ensure that the Sigstore OIDC token is available - if (!process.env.SIGSTORE_ID_TOKEN) { - throw Object.assign( - /* eslint-disable-next-line max-len */ - new Error('Provenance generation in GitLab CI requires "SIGSTORE_ID_TOKEN" with "sigstore" audience to be present in "id_tokens". For more info see:\nhttps://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html'), - { code: 'EUSAGE' } - ) - } - } else { - throw Object.assign( - new Error('Automatic provenance generation not supported for provider: ' + ciInfo.name), - { code: 'EUSAGE' } - ) - } - - // Some registries (e.g. GH packages) require auth to check visibility, - // and always return 404 when no auth is supplied. In this case we assume - // the package is always private and require `--access public` to publish - // with provenance. - let visibility = { public: false } - if (opts.access !== 'public') { - try { - const res = await npmFetch - .json(`${registry}/-/package/${spec.escapedName}/visibility`, opts) - visibility = res - } catch (err) { - if (err.code !== 'E404') { - throw err - } - } - } - - if (!visibility.public && opts.provenance === true && opts.access !== 'public') { - throw Object.assign( - /* eslint-disable-next-line max-len */ - new Error("Can't generate provenance for new or private package, you must set `access` to public."), - { code: 'EUSAGE' } - ) - } -} - -module.exports = publish diff --git a/node_modules/npm/node_modules/libnpmpublish/lib/unpublish.js b/node_modules/npm/node_modules/libnpmpublish/lib/unpublish.js deleted file mode 100644 index 9b124c1..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/lib/unpublish.js +++ /dev/null @@ -1,119 +0,0 @@ -'use strict' - -const { URL } = require('url') -const npa = require('npm-package-arg') -const npmFetch = require('npm-registry-fetch') -const semver = require('semver') - -// given a tarball url and a registry url, returns just the -// relevant pathname portion of it, so that it can be handled -// elegantly by npm-registry-fetch which only expects pathnames -// and handles the registry hostname via opts -const getPathname = (tarball, registry) => { - const registryUrl = new URL(registry).pathname.slice(1) - let tarballUrl = new URL(tarball).pathname.slice(1) - - // test the tarball url to see if it starts with a possible - // pathname from the registry url, in that case strips that portion - // of it so that we only return the post-registry-url pathname - if (registryUrl) { - tarballUrl = tarballUrl.slice(registryUrl.length) - } - return tarballUrl -} - -const unpublish = async (spec, opts) => { - spec = npa(spec) - // spec is used to pick the appropriate registry/auth combo. - opts = { - force: false, - ...opts, - spec, - } - - try { - const pkgUri = spec.escapedName - const pkg = await npmFetch.json(pkgUri, { - ...opts, - query: { write: true }, - }) - - const version = spec.rawSpec - const allVersions = pkg.versions || {} - const versionData = allVersions[version] - - const rawSpecs = (!spec.rawSpec || spec.rawSpec === '*') - const onlyVersion = Object.keys(allVersions).length === 1 - const noVersions = !Object.keys(allVersions).length - - // if missing specific version, - // assumed unpublished - if (!versionData && !rawSpecs && !noVersions) { - return true - } - - // unpublish all versions of a package: - // - no specs supplied "npm unpublish foo" - // - all specs ("*") "npm unpublish foo@*" - // - there was only one version - // - has no versions field on packument - if (rawSpecs || onlyVersion || noVersions) { - await npmFetch(`${pkgUri}/-rev/${pkg._rev}`, { - ...opts, - method: 'DELETE', - ignoreBody: true, - }) - return true - } else { - const dist = allVersions[version].dist - delete allVersions[version] - - const latestVer = pkg['dist-tags'].latest - - // deleting dist tags associated to version - Object.keys(pkg['dist-tags']).forEach(tag => { - if (pkg['dist-tags'][tag] === version) { - delete pkg['dist-tags'][tag] - } - }) - - if (latestVer === version) { - pkg['dist-tags'].latest = Object.keys( - allVersions - ).sort(semver.compareLoose).pop() - } - - delete pkg._revisions - delete pkg._attachments - - // Update packument with removed versions - await npmFetch(`${pkgUri}/-rev/${pkg._rev}`, { - ...opts, - method: 'PUT', - body: pkg, - ignoreBody: true, - }) - - // Remove the tarball itself - const { _rev } = await npmFetch.json(pkgUri, { - ...opts, - query: { write: true }, - }) - const tarballUrl = getPathname(dist.tarball, opts.registry) - await npmFetch(`${tarballUrl}/-rev/${_rev}`, { - ...opts, - method: 'DELETE', - ignoreBody: true, - }) - return true - } - } catch (err) { - if (err.code !== 'E404') { - throw err - } - - return true - } -} - -module.exports = unpublish diff --git a/node_modules/npm/node_modules/libnpmpublish/package.json b/node_modules/npm/node_modules/libnpmpublish/package.json deleted file mode 100644 index ce29824..0000000 --- a/node_modules/npm/node_modules/libnpmpublish/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "libnpmpublish", - "version": "9.0.3", - "description": "Programmatic API for the bits behind npm publish and unpublish", - "author": "GitHub Inc.", - "main": "lib/index.js", - "contributors": [ - "Kat Marchán ", - "Claudia Hernández " - ], - "files": [ - "bin/", - "lib/" - ], - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "lintfix": "npm run lint -- --fix", - "test": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/mock-globals": "^1.0.0", - "@npmcli/mock-registry": "^1.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmpublish" - }, - "bugs": "https://github.com/npm/cli/issues", - "homepage": "https://npmjs.com/package/libnpmpublish", - "dependencies": { - "ci-info": "^4.0.0", - "normalize-package-data": "^6.0.0", - "npm-package-arg": "^11.0.1", - "npm-registry-fetch": "^16.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.7", - "sigstore": "^2.1.0", - "ssri": "^10.0.5" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmsearch/LICENSE b/node_modules/npm/node_modules/libnpmsearch/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmsearch/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmsearch/README.md b/node_modules/npm/node_modules/libnpmsearch/README.md deleted file mode 100644 index 86d75b1..0000000 --- a/node_modules/npm/node_modules/libnpmsearch/README.md +++ /dev/null @@ -1,173 +0,0 @@ -# libnpmsearch - -[![npm version](https://img.shields.io/npm/v/libnpmsearch.svg)](https://npm.im/libnpmsearch) -[![license](https://img.shields.io/npm/l/libnpmsearch.svg)](https://npm.im/libnpmsearch) -[![CI - libnpmsearch](https://github.com/npm/cli/actions/workflows/ci-libnpmsearch.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmsearch.yml) - -[`libnpmsearch`](https://github.com/npm/libnpmsearch) is a Node.js library for -programmatically accessing the npm search endpoint. It does **not** support -legacy search through `/-/all`. - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [Contributing](#contributing) -* [API](#api) - * [search opts](#opts) - * [`search()`](#search) - * [`search.stream()`](#search-stream) - -## Example - -```js -const search = require('libnpmsearch') - -console.log(await search('libnpm')) -=> -[ - { - name: 'libnpm', - description: 'programmatic npm API', - ...etc - }, - { - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc - }, - ...more -] -``` - -## Install - -`$ npm install libnpmsearch` - -### API - -#### `opts` for `libnpmsearch` commands - -The following opts are used directly by `libnpmsearch` itself: - -* `opts.limit` - Number of results to limit the query to. Default: 20 -* `opts.from` - Offset number for results. Used with `opts.limit` for pagination. Default: 0 -* `opts.detailed` - If true, returns an object with `package`, `score`, and `searchScore` fields, with `package` being what would usually be returned, and the other two containing details about how that package scored. Useful for UIs. Default: false -* `opts.sortBy` - Used as a shorthand to set `opts.quality`, `opts.maintenance`, and `opts.popularity` with values that prioritize each one. Should be one of `'optimal'`, `'quality'`, `'maintenance'`, or `'popularity'`. Default: `'optimal'` -* `opts.maintenance` - Decimal number between `0` and `1` that defines the weight of `maintenance` metrics when scoring and sorting packages. Default: `0.65` (same as `opts.sortBy: 'optimal'`) -* `opts.popularity` - Decimal number between `0` and `1` that defines the weight of `popularity` metrics when scoring and sorting packages. Default: `0.98` (same as `opts.sortBy: 'optimal'`) -* `opts.quality` - Decimal number between `0` and `1` that defines the weight of `quality` metrics when scoring and sorting packages. Default: `0.5` (same as `opts.sortBy: 'optimal'`) - -`libnpmsearch` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -Most options are passed through directly to that library, so please refer to -[its own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs. - -#### `> search(query, [opts]) -> Promise` - -`query` must be either a String or an Array of search terms. - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -The returned Promise resolved to an Array of search results with the following -format: - -```js -{ - name: String, - version: SemverString, - description: String || null, - maintainers: [ - { - username: String, - email: String - }, - ...etc - ] || null, - keywords: [String] || null, - date: Date || null -} -``` - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -For streamed results, see [`search.stream`](#search-stream). - -##### Example - -```javascript -await search('libnpm') -=> -[ - { - name: 'libnpm', - description: 'programmatic npm API', - ...etc - }, - { - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc - }, - ...more -] -``` - -#### `> search.stream(query, [opts]) -> Stream` - -`query` must be either a String or an Array of search terms. - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -The returned Stream emits one entry per search result, with each entry having -the following format: - -```js -{ - name: String, - version: SemverString, - description: String || null, - maintainers: [ - { - username: String, - email: String - }, - ...etc - ] || null, - keywords: [String] || null, - date: Date || null -} -``` - -For getting results in one chunk, see [`search`](#search-stream). - -##### Example - -```javascript -search.stream('libnpm').on('data', console.log) -=> -// entry 1 -{ - name: 'libnpm', - description: 'programmatic npm API', - ...etc -} -// entry 2 -{ - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc -} -// etc -``` diff --git a/node_modules/npm/node_modules/libnpmsearch/lib/index.js b/node_modules/npm/node_modules/libnpmsearch/lib/index.js deleted file mode 100644 index 9590591..0000000 --- a/node_modules/npm/node_modules/libnpmsearch/lib/index.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict' - -const npmFetch = require('npm-registry-fetch') - -module.exports = search -function search (query, opts) { - return search.stream(query, opts).collect() -} -search.stream = searchStream -function searchStream (query, opts = {}) { - opts = { - detailed: false, - limit: 20, - from: 0, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5, - ...opts.opts, // this is to support the cli's --searchopts parameter - ...opts, - } - - switch (opts.sortBy) { - case 'optimal': { - opts.quality = 0.65 - opts.popularity = 0.98 - opts.maintenance = 0.5 - break - } - case 'quality': { - opts.quality = 1 - opts.popularity = 0 - opts.maintenance = 0 - break - } - case 'popularity': { - opts.quality = 0 - opts.popularity = 1 - opts.maintenance = 0 - break - } - case 'maintenance': { - opts.quality = 0 - opts.popularity = 0 - opts.maintenance = 1 - break - } - } - return npmFetch.json.stream('/-/v1/search', 'objects.*', - { - ...opts, - query: { - text: Array.isArray(query) ? query.join(' ') : query, - size: opts.limit, - from: opts.from, - quality: opts.quality, - popularity: opts.popularity, - maintenance: opts.maintenance, - }, - mapJSON: (obj) => { - if (obj.package.date) { - obj.package.date = new Date(obj.package.date) - } - if (opts.detailed) { - return obj - } else { - return obj.package - } - }, - } - ) -} diff --git a/node_modules/npm/node_modules/libnpmsearch/package.json b/node_modules/npm/node_modules/libnpmsearch/package.json deleted file mode 100644 index 42cb788..0000000 --- a/node_modules/npm/node_modules/libnpmsearch/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "libnpmsearch", - "version": "7.0.1", - "description": "Programmatic API for searching in npm and compatible registries.", - "author": "GitHub Inc.", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "keywords": [ - "npm", - "search", - "api", - "libnpm" - ], - "license": "ISC", - "scripts": { - "posttest": "npm run lint", - "test": "tap", - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmsearch" - }, - "bugs": "https://github.com/npm/libnpmsearch/issues", - "homepage": "https://npmjs.com/package/libnpmsearch", - "dependencies": { - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmteam/LICENSE b/node_modules/npm/node_modules/libnpmteam/LICENSE deleted file mode 100644 index 209e447..0000000 --- a/node_modules/npm/node_modules/libnpmteam/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmteam/README.md b/node_modules/npm/node_modules/libnpmteam/README.md deleted file mode 100644 index 97323f8..0000000 --- a/node_modules/npm/node_modules/libnpmteam/README.md +++ /dev/null @@ -1,188 +0,0 @@ -# libnpmteam - -[![npm version](https://img.shields.io/npm/v/libnpmteam.svg)](https://npm.im/libnpmteam) -[![license](https://img.shields.io/npm/l/libnpmteam.svg)](https://npm.im/libnpmteam) -[![CI - libnpmteam](https://github.com/npm/cli/actions/workflows/ci-libnpmteam.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmteam.yml) - -[`libnpmteam`](https://github.com/npm/libnpmteam) is a Node.js -library that provides programmatic access to the guts of the npm CLI's `npm -team` command and its various subcommands. - -## Example - -```javascript -const team = require('libnpmteam') - -// List all teams for the @npm org. -console.log(await team.lsTeams('npm')) -``` - -## Publishing -1. Manually create CHANGELOG.md file -1. Commit changes to CHANGELOG.md - ```bash - $ git commit -m "chore: updated CHANGELOG.md" - ``` -1. Run `npm version {newVersion}` - ```bash - # Example - $ npm version patch - # 1. Runs `coverage` and `lint` scripts - # 2. Bumps package version; and **create commit/tag** - # 3. Runs `npm publish`; publishing directory with **unpushed commit** - # 4. Runs `git push origin --follow-tags` - ``` - -## Table of Contents - -* [Installing](#install) -* [Example](#example) -* [API](#api) - * [team opts](#opts) - * [`create()`](#create) - * [`destroy()`](#destroy) - * [`add()`](#add) - * [`rm()`](#rm) - * [`lsTeams()`](#ls-teams) - * [`lsTeams.stream()`](#ls-teams-stream) - * [`lsUsers()`](#ls-users) - * [`lsUsers.stream()`](#ls-users-stream) - -### Install - -`$ npm install libnpmteam` - -### API - -#### `opts` for `libnpmteam` commands - -`libnpmteam` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmteam` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` - -#### `> team.create(team, [opts]) -> Promise` - -Creates a team named `team`. Team names use the format `@:`, with -the `@` being optional. - -Additionally, `opts.description` may be passed in to include a description. - -##### Example - -```javascript -await team.create('@npm:cli', {token: 'myregistrytoken'}) -// The @npm:cli team now exists. -``` - -#### `> team.destroy(team, [opts]) -> Promise` - -Destroys a team named `team`. Team names use the format `@:`, with -the `@` being optional. - -##### Example - -```javascript -await team.destroy('@npm:cli', {token: 'myregistrytoken'}) -// The @npm:cli team has been destroyed. -``` - -#### `> team.add(user, team, [opts]) -> Promise` - -Adds `user` to `team`. - -##### Example - -```javascript -await team.add('zkat', '@npm:cli', {token: 'myregistrytoken'}) -// @zkat now belongs to the @npm:cli team. -``` - -#### `> team.rm(user, team, [opts]) -> Promise` - -Removes `user` from `team`. - -##### Example - -```javascript -await team.rm('zkat', '@npm:cli', {token: 'myregistrytoken'}) -// @zkat is no longer part of the @npm:cli team. -``` - -#### `> team.lsTeams(scope, [opts]) -> Promise` - -Resolves to an array of team names belonging to `scope`. - -##### Example - -```javascript -await team.lsTeams('@npm', {token: 'myregistrytoken'}) -=> -[ - 'npm:cli', - 'npm:web', - 'npm:registry', - 'npm:developers' -] -``` - -#### `> team.lsTeams.stream(scope, [opts]) -> Stream` - -Returns a stream of teams belonging to `scope`. - -For a Promise-based version of these results, see [`team.lsTeams()`](#ls-teams). - -##### Example - -```javascript -for await (let team of team.lsTeams.stream('@npm', {token: 'myregistrytoken'})) { - console.log(team) -} - -// outputs -// npm:cli -// npm:web -// npm:registry -// npm:developers -``` - -#### `> team.lsUsers(team, [opts]) -> Promise` - -Resolves to an array of usernames belonging to `team`. - -For a streamed version of these results, see [`team.lsUsers.stream()`](#ls-users-stream). - -##### Example - -```javascript -await team.lsUsers('@npm:cli', {token: 'myregistrytoken'}) -=> -[ - 'iarna', - 'zkat' -] -``` - -#### `> team.lsUsers.stream(team, [opts]) -> Stream` - -Returns a stream of usernames belonging to `team`. - -For a Promise-based version of these results, see [`team.lsUsers()`](#ls-users). - -##### Example - -```javascript -for await (let user of team.lsUsers.stream('@npm:cli', {token: 'myregistrytoken'})) { - console.log(user) -} - -// outputs -// iarna -// zkat -``` diff --git a/node_modules/npm/node_modules/libnpmteam/lib/index.js b/node_modules/npm/node_modules/libnpmteam/lib/index.js deleted file mode 100644 index 9925d2c..0000000 --- a/node_modules/npm/node_modules/libnpmteam/lib/index.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict' - -const eu = encodeURIComponent -const npmFetch = require('npm-registry-fetch') -const validate = require('aproba') - -const cmd = module.exports - -cmd.create = (entity, opts = {}) => { - return Promise.resolve().then(() => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/org/${eu(scope)}/team` - return npmFetch.json(uri, { - ...opts, - method: 'PUT', - scope, - body: { name: team, description: opts.description }, - }) - }) -} - -cmd.destroy = async (entity, opts = {}) => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}` - await npmFetch(uri, { - ...opts, - method: 'DELETE', - scope, - ignoreBody: true, - }) - return true -} - -cmd.add = (user, entity, opts = {}) => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}/user` - return npmFetch.json(uri, { - ...opts, - method: 'PUT', - scope, - body: { user }, - }) -} - -cmd.rm = async (user, entity, opts = {}) => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}/user` - await npmFetch(uri, { - ...opts, - method: 'DELETE', - scope, - body: { user }, - ignoreBody: true, - }) - return true -} - -cmd.lsTeams = (...args) => cmd.lsTeams.stream(...args).collect() - -cmd.lsTeams.stream = (scope, opts = {}) => { - validate('SO', [scope, opts]) - const uri = `/-/org/${eu(scope)}/team` - return npmFetch.json.stream(uri, '.*', { - ...opts, - query: { format: 'cli' }, - }) -} - -cmd.lsUsers = (...args) => cmd.lsUsers.stream(...args).collect() - -cmd.lsUsers.stream = (entity, opts = {}) => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}/user` - return npmFetch.json.stream(uri, '.*', { - ...opts, - query: { format: 'cli' }, - }) -} - -cmd.edit = () => { - throw new Error('edit is not implemented yet') -} - -function splitEntity (entity = '') { - const [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || [] - return { scope, team } -} diff --git a/node_modules/npm/node_modules/libnpmteam/package.json b/node_modules/npm/node_modules/libnpmteam/package.json deleted file mode 100644 index bafeeb3..0000000 --- a/node_modules/npm/node_modules/libnpmteam/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "libnpmteam", - "description": "npm Team management APIs", - "version": "6.0.1", - "author": "GitHub Inc.", - "license": "ISC", - "main": "lib/index.js", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "test": "tap", - "posttest": "npm run lint", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "nock": "^13.3.3", - "tap": "^16.3.8" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmteam" - }, - "files": [ - "bin/", - "lib/" - ], - "homepage": "https://npmjs.com/package/libnpmteam", - "dependencies": { - "aproba": "^2.0.0", - "npm-registry-fetch": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - }, - "tap": { - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - } -} diff --git a/node_modules/npm/node_modules/libnpmversion/LICENSE b/node_modules/npm/node_modules/libnpmversion/LICENSE deleted file mode 100644 index 05eeeb8..0000000 --- a/node_modules/npm/node_modules/libnpmversion/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/libnpmversion/README.md b/node_modules/npm/node_modules/libnpmversion/README.md deleted file mode 100644 index ac9ee50..0000000 --- a/node_modules/npm/node_modules/libnpmversion/README.md +++ /dev/null @@ -1,164 +0,0 @@ -# libnpmversion - -[![npm version](https://img.shields.io/npm/v/libnpmversion.svg)](https://npm.im/libnpmversion) -[![license](https://img.shields.io/npm/l/libnpmversion.svg)](https://npm.im/libnpmversion) -[![CI - libnpmversion](https://github.com/npm/cli/actions/workflows/ci-libnpmversion.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmversion.yml) - -Library to do the things that 'npm version' does. - -## USAGE - -```js -const npmVersion = require('libnpmversion') - -// argument can be one of: -// - any semver version string (set to that exact version) -// - 'major', 'minor', 'patch', 'pre{major,minor,patch}' (increment at -// that value) -// - 'from-git' (set to the latest semver-lookin git tag - this skips -// gitTagVersion, but will still sign if asked) -npmVersion(arg, { - path: '/path/to/my/pkg', // defaults to cwd - - allowSameVersion: false, // allow tagging/etc to the current version - preid: '', // when arg=='pre', define the prerelease string, like 'beta' etc. - tagVersionPrefix: 'v', // tag as 'v1.2.3' when versioning to 1.2.3 - commitHooks: true, // default true, run git commit hooks, default true - gitTagVersion: true, // default true, tag the version - signGitCommit: false, // default false, gpg sign the git commit - signGitTag: false, // default false, gpg sign the git tag - force: false, // push forward recklessly if any problems happen - ignoreScripts: false, // do not run pre/post/version lifecycle scripts - scriptShell: '/bin/bash', // shell to run lifecycle scripts in - message: 'v%s', // message for tag and commit, replace %s with the version - silent: false, // passed to @npmcli/run-script to control whether it logs -}).then(newVersion => { - console.error('version updated!', newVersion) -}) -``` - -## Description - -Run this in a package directory to bump the version and write the new data -back to `package.json`, `package-lock.json`, and, if present, -`npm-shrinkwrap.json`. - -The `newversion` argument should be a valid semver string, a valid second -argument to [semver.inc](https://github.com/npm/node-semver#functions) (one -of `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`, -`prerelease`), or `from-git`. In the second case, the existing version will -be incremented by 1 in the specified field. `from-git` will try to read -the latest git tag, and use that as the new npm version. - -If run in a git repo, it will also create a version commit and tag. This -behavior is controlled by `gitTagVersion` (see below), and can be -disabled by setting `gitTagVersion: false` in the options. -It will fail if the working directory is not clean, unless `force: true` is -set. - -If supplied with a `message` string option, it will -use it as a commit message when creating a version commit. If the -`message` option contains `%s` then that will be replaced with the -resulting version number. - -If the `signGitTag` option is set, then the tag will be signed using -the `-s` flag to git. Note that you must have a default GPG key set up in -your git config for this to work properly. - -If `preversion`, `version`, or `postversion` are in the `scripts` property -of the package.json, they will be executed in the appropriate sequence. - -The exact order of execution is as follows: - -1. Check to make sure the git working directory is clean before we get - started. Your scripts may add files to the commit in future steps. - This step is skipped if the `force` flag is set. -2. Run the `preversion` script. These scripts have access to the old - `version` in package.json. A typical use would be running your full - test suite before deploying. Any files you want added to the commit - should be explicitly added using `git add`. -3. Bump `version` in `package.json` as requested (`patch`, `minor`, - `major`, explicit version number, etc). -4. Run the `version` script. These scripts have access to the new `version` - in package.json (so they can incorporate it into file headers in - generated files for example). Again, scripts should explicitly add - generated files to the commit using `git add`. -5. Commit and tag. -6. Run the `postversion` script. Use it to clean up the file system or - automatically push the commit and/or tag. - -Take the following example: - -```json -{ - "scripts": { - "preversion": "npm test", - "version": "npm run build && git add -A dist", - "postversion": "git push && git push --tags && rm -rf build/temp" - } -} -``` - -This runs all your tests, and proceeds only if they pass. Then runs your -`build` script, and adds everything in the `dist` directory to the commit. -After the commit, it pushes the new commit and tag up to the server, and -deletes the `build/temp` directory. - -## API - -### `npmVersion(newversion, options = {}) -> Promise` - -Do the things. Returns a promise that resolves to the new version if -all is well, or rejects if any errors are encountered. - -### Options - -#### `path` String - -The path to the package being versionified. Defaults to process.cwd(). - -#### `allowSameVersion` Boolean - -Allow setting the version to the current version in package.json. Default -`false`. - -#### `preid` String -When the `newversion` is pre, premajor, preminor, or prepatch, this -defines the prerelease string, like 'beta' etc. - -#### `tagVersionPrefix` String - -The prefix to add to the raw semver string for the tag name. Defaults to -`'v'`. (So, by default it tags as 'v1.2.3' when versioning to 1.2.3.) - -#### `commitHooks` Boolean - -Run git commit hooks. Default true. - -#### `gitTagVersion` Boolean - -Tag the version, default true. - -#### `signGitCommit` Boolean - -GPG sign the git commit. Default `false`. - -#### `signGitTag` Boolean - -GPG sign the git tag. Default `false`. - -#### `force` Boolean - -Push forward recklessly if any problems happen. Default `false`. - -#### `ignoreScripts` Boolean - -Do not run pre/post/version lifecycle scripts. Default `false`. - -#### `scriptShell` String - -Path to the shell, which should execute the lifecycle scripts. Defaults to `/bin/sh` on unix, or `cmd.exe` on windows. - -#### `message` String - -The message for the git commit and annotated git tag that are created. diff --git a/node_modules/npm/node_modules/libnpmversion/lib/commit.js b/node_modules/npm/node_modules/libnpmversion/lib/commit.js deleted file mode 100644 index dec6edb..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/commit.js +++ /dev/null @@ -1,17 +0,0 @@ -const git = require('@npmcli/git') - -module.exports = (version, opts) => { - const { commitHooks, allowSameVersion, signGitCommit, message } = opts - const args = ['commit'] - if (commitHooks === false) { - args.push('-n') - } - if (allowSameVersion) { - args.push('--allow-empty') - } - if (signGitCommit) { - args.push('-S') - } - args.push('-m') - return git.spawn([...args, message.replace(/%s/g, version)], opts) -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/enforce-clean.js b/node_modules/npm/node_modules/libnpmversion/lib/enforce-clean.js deleted file mode 100644 index 721f146..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/enforce-clean.js +++ /dev/null @@ -1,32 +0,0 @@ -const git = require('@npmcli/git') -const log = require('proc-log') - -// returns true if it's cool to do git stuff -// throws if it's unclean, and not forced. -module.exports = async opts => { - const { force } = opts - let hadError = false - const clean = await git.isClean(opts).catch(er => { - if (er.code === 'ENOGIT') { - log.warn( - 'version', - 'This is a Git checkout, but the git command was not found.', - 'npm could not create a Git tag for this release!' - ) - hadError = true - // how can merges be real if our git isn't real? - return true - } else { - throw er - } - }) - - if (!clean) { - if (!force) { - throw new Error('Git working directory not clean.') - } - log.warn('version', 'Git working directory not clean, proceeding forcefully.') - } - - return !hadError -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/index.js b/node_modules/npm/node_modules/libnpmversion/lib/index.js deleted file mode 100644 index 95acd11..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/index.js +++ /dev/null @@ -1,40 +0,0 @@ -const readJson = require('./read-json.js') -const version = require('./version.js') - -module.exports = async (newversion, opts = {}) => { - const { - path = process.cwd(), - allowSameVersion = false, - tagVersionPrefix = 'v', - commitHooks = true, - gitTagVersion = true, - signGitCommit = false, - signGitTag = false, - force = false, - ignoreScripts = false, - scriptShell = undefined, - preid = null, - message = 'v%s', - silent, - } = opts - - const pkg = opts.pkg || await readJson(path + '/package.json') - - return version(newversion, { - path, - cwd: path, - allowSameVersion, - tagVersionPrefix, - commitHooks, - gitTagVersion, - signGitCommit, - signGitTag, - force, - ignoreScripts, - scriptShell, - preid, - pkg, - message, - silent, - }) -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/read-json.js b/node_modules/npm/node_modules/libnpmversion/lib/read-json.js deleted file mode 100644 index 2dd0f7a..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/read-json.js +++ /dev/null @@ -1,7 +0,0 @@ -// can't use read-package-json-fast, because we want to ensure -// that we make as few changes as possible, even for safety issues. -const { promisify } = require('util') -const readFile = promisify(require('fs').readFile) -const parse = require('json-parse-even-better-errors') - -module.exports = async path => parse(await readFile(path)) diff --git a/node_modules/npm/node_modules/libnpmversion/lib/retrieve-tag.js b/node_modules/npm/node_modules/libnpmversion/lib/retrieve-tag.js deleted file mode 100644 index c5fb64e..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/retrieve-tag.js +++ /dev/null @@ -1,13 +0,0 @@ -const { spawn } = require('@npmcli/git') -const semver = require('semver') - -module.exports = async opts => { - const tag = (await spawn( - ['describe', '--tags', '--abbrev=0', '--match=*.*.*'], - opts)).stdout.trim() - const ver = semver.coerce(tag, { loose: true }) - if (ver) { - return ver.version - } - throw new Error(`Tag is not a valid version: ${JSON.stringify(tag)}`) -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/tag.js b/node_modules/npm/node_modules/libnpmversion/lib/tag.js deleted file mode 100644 index 095456b..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/tag.js +++ /dev/null @@ -1,30 +0,0 @@ -const git = require('@npmcli/git') - -module.exports = async (version, opts) => { - const { - signGitTag, - allowSameVersion, - tagVersionPrefix, - message, - } = opts - - const tag = `${tagVersionPrefix}${version}` - const flags = ['-'] - - if (signGitTag) { - flags.push('s') - } - - if (allowSameVersion) { - flags.push('f') - } - - flags.push('m') - - return git.spawn([ - 'tag', - flags.join(''), - message.replace(/%s/g, version), - tag, - ], opts) -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/version.js b/node_modules/npm/node_modules/libnpmversion/lib/version.js deleted file mode 100644 index f14b95e..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/version.js +++ /dev/null @@ -1,140 +0,0 @@ -// called with all the options already set to their defaults - -const retrieveTag = require('./retrieve-tag.js') -const semver = require('semver') -const enforceClean = require('./enforce-clean.js') -const writeJson = require('./write-json.js') -const readJson = require('./read-json.js') -const git = require('@npmcli/git') -const commit = require('./commit.js') -const tag = require('./tag.js') -const log = require('proc-log') - -const runScript = require('@npmcli/run-script') - -module.exports = async (newversion, opts) => { - const { - path, - allowSameVersion, - gitTagVersion, - ignoreScripts, - preid, - pkg, - silent, - } = opts - - const { valid, clean, inc } = semver - const current = pkg.version || '0.0.0' - const currentClean = clean(current) - - let newV - if (valid(newversion, { loose: true })) { - newV = clean(newversion, { loose: true }) - } else if (newversion === 'from-git') { - newV = await retrieveTag(opts) - } else { - newV = inc(currentClean, newversion, { loose: true }, preid) - } - - if (!newV) { - throw Object.assign(new Error('Invalid version: ' + newversion), { - current, - requested: newversion, - }) - } - - if (newV === currentClean && !allowSameVersion) { - throw Object.assign(new Error('Version not changed'), { - current, - requested: newversion, - newVersion: newV, - }) - } - - const isGitDir = newversion === 'from-git' || await git.is(opts) - - // ok! now we know the new version, and the old version is in pkg - - // - check if git dir is clean - // returns false if we should not keep doing git stuff - const doGit = gitTagVersion && isGitDir && await enforceClean(opts) - - if (!ignoreScripts) { - await runScript({ - ...opts, - pkg, - stdio: 'inherit', - event: 'preversion', - banner: !silent, - env: { - npm_old_version: current, - npm_new_version: newV, - }, - }) - } - - // - update the files - pkg.version = newV - delete pkg._id - await writeJson(`${path}/package.json`, pkg) - - // try to update shrinkwrap, but ok if this fails - const locks = [`${path}/package-lock.json`, `${path}/npm-shrinkwrap.json`] - const haveLocks = [] - for (const lock of locks) { - try { - const sw = await readJson(lock) - sw.version = newV - if (sw.packages && sw.packages['']) { - sw.packages[''].version = newV - } - await writeJson(lock, sw) - haveLocks.push(lock) - } catch { - // ignore errors - } - } - - if (!ignoreScripts) { - await runScript({ - ...opts, - pkg, - stdio: 'inherit', - event: 'version', - banner: !silent, - env: { - npm_old_version: current, - npm_new_version: newV, - }, - }) - } - - if (doGit) { - // - git add, git commit, git tag - await git.spawn(['add', `${path}/package.json`], opts) - // sometimes people .gitignore their lockfiles - for (const lock of haveLocks) { - await git.spawn(['add', lock], opts).catch(() => {}) - } - await commit(newV, opts) - await tag(newV, opts) - } else { - log.verbose('version', 'Not tagging: not in a git repo or no git cmd') - } - - if (!ignoreScripts) { - await runScript({ - ...opts, - pkg, - stdio: 'inherit', - event: 'postversion', - banner: !silent, - env: { - npm_old_version: current, - npm_new_version: newV, - }, - }) - } - - return newV -} diff --git a/node_modules/npm/node_modules/libnpmversion/lib/write-json.js b/node_modules/npm/node_modules/libnpmversion/lib/write-json.js deleted file mode 100644 index f066d72..0000000 --- a/node_modules/npm/node_modules/libnpmversion/lib/write-json.js +++ /dev/null @@ -1,16 +0,0 @@ -// write the json back, preserving the line breaks and indent -const { promisify } = require('util') -const writeFile = promisify(require('fs').writeFile) -const kIndent = Symbol.for('indent') -const kNewline = Symbol.for('newline') - -module.exports = async (path, pkg) => { - const { - [kIndent]: indent = 2, - [kNewline]: newline = '\n', - } = pkg - delete pkg._id - const raw = JSON.stringify(pkg, null, indent) + '\n' - const data = newline === '\n' ? raw : raw.split('\n').join(newline) - return writeFile(path, data) -} diff --git a/node_modules/npm/node_modules/libnpmversion/package.json b/node_modules/npm/node_modules/libnpmversion/package.json deleted file mode 100644 index 782eeca..0000000 --- a/node_modules/npm/node_modules/libnpmversion/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "libnpmversion", - "version": "5.0.2", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "description": "library to do the things that 'npm version' does", - "repository": { - "type": "git", - "url": "https://github.com/npm/cli.git", - "directory": "workspaces/libnpmversion" - }, - "author": "GitHub Inc.", - "license": "ISC", - "scripts": { - "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", - "test": "tap", - "posttest": "npm run lint", - "snap": "tap", - "postlint": "template-oss-check", - "lintfix": "npm run lint -- --fix", - "template-oss-apply": "template-oss-apply --force" - }, - "tap": { - "coverage-map": "map.js", - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.21.3", - "require-inject": "^1.4.4", - "tap": "^16.3.8" - }, - "dependencies": { - "@npmcli/git": "^5.0.3", - "@npmcli/run-script": "^7.0.2", - "json-parse-even-better-errors": "^3.0.0", - "proc-log": "^3.0.0", - "semver": "^7.3.7" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.21.3", - "content": "../../scripts/template-oss/index.js" - } -} diff --git a/node_modules/npm/node_modules/lru-cache/LICENSE b/node_modules/npm/node_modules/lru-cache/LICENSE deleted file mode 100644 index f785757..0000000 --- a/node_modules/npm/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/lru-cache/dist/commonjs/index.js b/node_modules/npm/node_modules/lru-cache/dist/commonjs/index.js deleted file mode 100644 index 4177cfe..0000000 --- a/node_modules/npm/node_modules/lru-cache/dist/commonjs/index.js +++ /dev/null @@ -1,1441 +0,0 @@ -"use strict"; -/** - * @module LRUCache - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LRUCache = void 0; -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const TYPE = Symbol('type'); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); - } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -} -/** - * Default export, the thing you're using this module to get. - * - * All properties from the options object (with the exception of - * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as - * normal public members. (`max` and `maxBase` are read-only getters.) - * Changing any of these will alter the defaults for subsequent method calls, - * but is otherwise safe. - */ -class LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); - } - } - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; - } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); - } - this.#initializeTTLTracking(); - } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - /* c8 ignore next */ - if (!ttl || !start) - return; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - return n; - }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - const s = starts[index]; - const t = ttls[index]; - return !!t && !!s && (cachedNow || getNow()) - s > t; - }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } - } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } - } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); - } - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; - } - /** - * Get the extended info about a given entry, to get its value, size, and - * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a - * single key. Always returns stale values, if their info is found in the - * cache, so be sure to check for expired TTLs if relevant. - */ - info(key) { - const i = this.#keyMap.get(key); - if (i === undefined) - return undefined; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - return undefined; - const entry = { value }; - if (this.#ttls && this.#starts) { - const ttl = this.#ttls[i]; - const start = this.#starts[i]; - if (ttl && start) { - const remain = ttl - (perf.now() - start); - entry.ttl = remain; - entry.start = Date.now(); - } - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - return entry; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; - } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.delete(k); - return this; - } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; - } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - const { __staleWhileFetching: s } = oldVal; - if (s !== undefined && !noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(s, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([s, k, 'set']); - } - } - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } - } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } - } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } - } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; - } - else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; - } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); - } - } - else if (status) { - status.has = 'miss'; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index === undefined || - (!allowStale && this.#isStale(index))) { - return; - } - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.delete(k); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v === undefined ? undefined : v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(undefined); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, - }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; - } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); - } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } - } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; - } - } - else if (status) { - status.get = 'miss'; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; - } - } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - const pi = this.#prev[index]; - this.#next[pi] = this.#next[index]; - const ni = this.#next[index]; - this.#prev[ni] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); - } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } -} -exports.LRUCache = LRUCache; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/lru-cache/dist/commonjs/package.json b/node_modules/npm/node_modules/lru-cache/dist/commonjs/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/node_modules/npm/node_modules/lru-cache/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/npm/node_modules/lru-cache/dist/esm/index.js b/node_modules/npm/node_modules/lru-cache/dist/esm/index.js deleted file mode 100644 index 42ae40b..0000000 --- a/node_modules/npm/node_modules/lru-cache/dist/esm/index.js +++ /dev/null @@ -1,1437 +0,0 @@ -/** - * @module LRUCache - */ -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); - } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); - } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); - } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const TYPE = Symbol('type'); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); - } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; - } -} -/** - * Default export, the thing you're using this module to get. - * - * All properties from the options object (with the exception of - * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as - * normal public members. (`max` and `maxBase` are read-only getters.) - * Changing any of these will alter the defaults for subsequent method calls, - * but is otherwise safe. - */ -export class LRUCache { - // properties coming in from the options of these, only max and maxSize - // really *need* to be protected. The rest can be modified, as they just - // set defaults for various methods. - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), - }; - } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; - } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); - } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); - } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); - } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); - } - } - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); - } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; - } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; - } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; - } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); - } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); - } - this.#initializeTTLTracking(); - } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); - } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } - } - } - /** - * Return the remaining TTL time for a given entry key - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.delete(this.#keyList[index]); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; - }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - /* c8 ignore next */ - if (!ttl || !start) - return; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; - } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ - } - return n; - }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) { - return Infinity; - } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - const s = starts[index]; - const t = ttls[index]; - return !!t && !!s && (cachedNow || getNow()) - s > t; - }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; - }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; - }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } - }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); - } - return 0; - }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } - } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } - } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } - } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } - } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } - } - } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); - } - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to Array.find(). fn is called as fn(value, key, cache). - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from - * most recently used to least recently used. fn is called as - * fn(value, key, cache). Does not update age or recenty of use. - * Does not iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } - } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.delete(this.#keyList[i]); - deleted = true; - } - } - return deleted; - } - /** - * Get the extended info about a given entry, to get its value, size, and - * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a - * single key. Always returns stale values, if their info is found in the - * cache, so be sure to check for expired TTLs if relevant. - */ - info(key) { - const i = this.#keyMap.get(key); - if (i === undefined) - return undefined; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - return undefined; - const entry = { value }; - if (this.#ttls && this.#starts) { - const ttl = this.#ttls[i]; - const start = this.#starts[i]; - if (ttl && start) { - const remain = ttl - (perf.now() - start); - entry.ttl = remain; - entry.start = Date.now(); - } - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - return entry; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to cache.load() - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); - } - return arr; - } - /** - * Reset the cache and load in the items in entries in the order listed. - * Note that the shape of the resulting cache may be different if the - * same options are not used in both caches. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; - } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.delete(k); - return this; - } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; - } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - const { __staleWhileFetching: s } = oldVal; - if (s !== undefined && !noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(s, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([s, k, 'set']); - } - } - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } - } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); - } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); - } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } - } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } - } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } - } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); - } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; - } - else { - this.#head = this.#next[head]; - } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; - } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); - } - } - else if (status) { - status.has = 'miss'; - } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index === undefined || - (!allowStale && this.#isStale(index))) { - return; - } - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; - } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.delete(k); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.delete(k); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v === undefined ? undefined : v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(undefined); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, - }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; - } - return bf; - } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); - } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; - } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.delete(k); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } - } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; - } - } - else if (status) { - status.get = 'miss'; - } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; - } - } - /** - * Deletes a key out of the cache. - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.clear(); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - const pi = this.#prev[index]; - this.#next[pi] = this.#next[index]; - const ni = this.#next[index]; - this.#prev[ni] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } - } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, 'delete'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'delete']); - } - } - } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); - } - if (this.#sizes) { - this.#sizes.fill(0); - } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } - } -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/lru-cache/dist/esm/package.json b/node_modules/npm/node_modules/lru-cache/dist/esm/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/npm/node_modules/lru-cache/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/npm/node_modules/lru-cache/package.json b/node_modules/npm/node_modules/lru-cache/package.json deleted file mode 100644 index 3702e6e..0000000 --- a/node_modules/npm/node_modules/lru-cache/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "10.1.0", - "author": "Isaac Z. Schlueter ", - "keywords": [ - "mru", - "lru", - "cache" - ], - "sideEffects": false, - "scripts": { - "build": "npm run prepare", - "prepare": "tshy", - "postprepare": "bash fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "format": "prettier --write .", - "typedoc": "typedoc --tsconfig ./.tshy/esm.json ./src/*.ts", - "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh", - "prebenchmark": "npm run prepare", - "benchmark": "make -C benchmark", - "preprofile": "npm run prepare", - "profile": "make -C benchmark profile" - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "tshy": { - "exports": { - ".": "./src/index.ts", - "./min": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.min.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.min.js" - } - } - } - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "@tapjs/clock": "^1.1.16", - "@types/node": "^20.2.5", - "@types/tap": "^15.0.6", - "benchmark": "^2.1.4", - "clock-mock": "^2.0.2", - "esbuild": "^0.17.11", - "eslint-config-prettier": "^8.5.0", - "marked": "^4.2.12", - "mkdirp": "^2.1.5", - "prettier": "^2.6.2", - "tap": "^18.5.7", - "tshy": "^1.8.0", - "tslib": "^2.4.0", - "typedoc": "^0.25.3", - "typescript": "^5.2.2" - }, - "license": "ISC", - "files": [ - "dist" - ], - "engines": { - "node": "14 || >=16.14" - }, - "prettier": { - "semi": false, - "printWidth": 70, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "node-arg": [ - "--expose-gc" - ], - "plugin": [ - "@tapjs/clock" - ] - }, - "exports": { - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - }, - "./min": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.min.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.min.js" - } - } - }, - "type": "module" -} diff --git a/node_modules/npm/node_modules/make-fetch-happen/LICENSE b/node_modules/npm/node_modules/make-fetch-happen/LICENSE deleted file mode 100644 index 1808eb2..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright 2017-2022 (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js b/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js deleted file mode 100644 index 4514109..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js +++ /dev/null @@ -1,469 +0,0 @@ -const { Request, Response } = require('minipass-fetch') -const { Minipass } = require('minipass') -const MinipassFlush = require('minipass-flush') -const cacache = require('cacache') -const url = require('url') - -const CachingMinipassPipeline = require('../pipeline.js') -const CachePolicy = require('./policy.js') -const cacheKey = require('./key.js') -const remote = require('../remote.js') - -const hasOwnProperty = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) - -// allow list for request headers that will be written to the cache index -// note: we will also store any request headers -// that are named in a response's vary header -const KEEP_REQUEST_HEADERS = [ - 'accept-charset', - 'accept-encoding', - 'accept-language', - 'accept', - 'cache-control', -] - -// allow list for response headers that will be written to the cache index -// note: we must not store the real response's age header, or when we load -// a cache policy based on the metadata it will think the cached response -// is always stale -const KEEP_RESPONSE_HEADERS = [ - 'cache-control', - 'content-encoding', - 'content-language', - 'content-type', - 'date', - 'etag', - 'expires', - 'last-modified', - 'link', - 'location', - 'pragma', - 'vary', -] - -// return an object containing all metadata to be written to the index -const getMetadata = (request, response, options) => { - const metadata = { - time: Date.now(), - url: request.url, - reqHeaders: {}, - resHeaders: {}, - - // options on which we must match the request and vary the response - options: { - compress: options.compress != null ? options.compress : request.compress, - }, - } - - // only save the status if it's not a 200 or 304 - if (response.status !== 200 && response.status !== 304) { - metadata.status = response.status - } - - for (const name of KEEP_REQUEST_HEADERS) { - if (request.headers.has(name)) { - metadata.reqHeaders[name] = request.headers.get(name) - } - } - - // if the request's host header differs from the host in the url - // we need to keep it, otherwise it's just noise and we ignore it - const host = request.headers.get('host') - const parsedUrl = new url.URL(request.url) - if (host && parsedUrl.host !== host) { - metadata.reqHeaders.host = host - } - - // if the response has a vary header, make sure - // we store the relevant request headers too - if (response.headers.has('vary')) { - const vary = response.headers.get('vary') - // a vary of "*" means every header causes a different response. - // in that scenario, we do not include any additional headers - // as the freshness check will always fail anyway and we don't - // want to bloat the cache indexes - if (vary !== '*') { - // copy any other request headers that will vary the response - const varyHeaders = vary.trim().toLowerCase().split(/\s*,\s*/) - for (const name of varyHeaders) { - if (request.headers.has(name)) { - metadata.reqHeaders[name] = request.headers.get(name) - } - } - } - } - - for (const name of KEEP_RESPONSE_HEADERS) { - if (response.headers.has(name)) { - metadata.resHeaders[name] = response.headers.get(name) - } - } - - for (const name of options.cacheAdditionalHeaders) { - if (response.headers.has(name)) { - metadata.resHeaders[name] = response.headers.get(name) - } - } - - return metadata -} - -// symbols used to hide objects that may be lazily evaluated in a getter -const _request = Symbol('request') -const _response = Symbol('response') -const _policy = Symbol('policy') - -class CacheEntry { - constructor ({ entry, request, response, options }) { - if (entry) { - this.key = entry.key - this.entry = entry - // previous versions of this module didn't write an explicit timestamp in - // the metadata, so fall back to the entry's timestamp. we can't use the - // entry timestamp to determine staleness because cacache will update it - // when it verifies its data - this.entry.metadata.time = this.entry.metadata.time || this.entry.time - } else { - this.key = cacheKey(request) - } - - this.options = options - - // these properties are behind getters that lazily evaluate - this[_request] = request - this[_response] = response - this[_policy] = null - } - - // returns a CacheEntry instance that satisfies the given request - // or undefined if no existing entry satisfies - static async find (request, options) { - try { - // compacts the index and returns an array of unique entries - var matches = await cacache.index.compact(options.cachePath, cacheKey(request), (A, B) => { - const entryA = new CacheEntry({ entry: A, options }) - const entryB = new CacheEntry({ entry: B, options }) - return entryA.policy.satisfies(entryB.request) - }, { - validateEntry: (entry) => { - // clean out entries with a buggy content-encoding value - if (entry.metadata && - entry.metadata.resHeaders && - entry.metadata.resHeaders['content-encoding'] === null) { - return false - } - - // if an integrity is null, it needs to have a status specified - if (entry.integrity === null) { - return !!(entry.metadata && entry.metadata.status) - } - - return true - }, - }) - } catch (err) { - // if the compact request fails, ignore the error and return - return - } - - // a cache mode of 'reload' means to behave as though we have no cache - // on the way to the network. return undefined to allow cacheFetch to - // create a brand new request no matter what. - if (options.cache === 'reload') { - return - } - - // find the specific entry that satisfies the request - let match - for (const entry of matches) { - const _entry = new CacheEntry({ - entry, - options, - }) - - if (_entry.policy.satisfies(request)) { - match = _entry - break - } - } - - return match - } - - // if the user made a PUT/POST/PATCH then we invalidate our - // cache for the same url by deleting the index entirely - static async invalidate (request, options) { - const key = cacheKey(request) - try { - await cacache.rm.entry(options.cachePath, key, { removeFully: true }) - } catch (err) { - // ignore errors - } - } - - get request () { - if (!this[_request]) { - this[_request] = new Request(this.entry.metadata.url, { - method: 'GET', - headers: this.entry.metadata.reqHeaders, - ...this.entry.metadata.options, - }) - } - - return this[_request] - } - - get response () { - if (!this[_response]) { - this[_response] = new Response(null, { - url: this.entry.metadata.url, - counter: this.options.counter, - status: this.entry.metadata.status || 200, - headers: { - ...this.entry.metadata.resHeaders, - 'content-length': this.entry.size, - }, - }) - } - - return this[_response] - } - - get policy () { - if (!this[_policy]) { - this[_policy] = new CachePolicy({ - entry: this.entry, - request: this.request, - response: this.response, - options: this.options, - }) - } - - return this[_policy] - } - - // wraps the response in a pipeline that stores the data - // in the cache while the user consumes it - async store (status) { - // if we got a status other than 200, 301, or 308, - // or the CachePolicy forbid storage, append the - // cache status header and return it untouched - if ( - this.request.method !== 'GET' || - ![200, 301, 308].includes(this.response.status) || - !this.policy.storable() - ) { - this.response.headers.set('x-local-cache-status', 'skip') - return this.response - } - - const size = this.response.headers.get('content-length') - const cacheOpts = { - algorithms: this.options.algorithms, - metadata: getMetadata(this.request, this.response, this.options), - size, - integrity: this.options.integrity, - integrityEmitter: this.response.body.hasIntegrityEmitter && this.response.body, - } - - let body = null - // we only set a body if the status is a 200, redirects are - // stored as metadata only - if (this.response.status === 200) { - let cacheWriteResolve, cacheWriteReject - const cacheWritePromise = new Promise((resolve, reject) => { - cacheWriteResolve = resolve - cacheWriteReject = reject - }) - - body = new CachingMinipassPipeline({ events: ['integrity', 'size'] }, new MinipassFlush({ - flush () { - return cacheWritePromise - }, - })) - // this is always true since if we aren't reusing the one from the remote fetch, we - // are using the one from cacache - body.hasIntegrityEmitter = true - - const onResume = () => { - const tee = new Minipass() - const cacheStream = cacache.put.stream(this.options.cachePath, this.key, cacheOpts) - // re-emit the integrity and size events on our new response body so they can be reused - cacheStream.on('integrity', i => body.emit('integrity', i)) - cacheStream.on('size', s => body.emit('size', s)) - // stick a flag on here so downstream users will know if they can expect integrity events - tee.pipe(cacheStream) - // TODO if the cache write fails, log a warning but return the response anyway - // eslint-disable-next-line promise/catch-or-return - cacheStream.promise().then(cacheWriteResolve, cacheWriteReject) - body.unshift(tee) - body.unshift(this.response.body) - } - - body.once('resume', onResume) - body.once('end', () => body.removeListener('resume', onResume)) - } else { - await cacache.index.insert(this.options.cachePath, this.key, null, cacheOpts) - } - - // note: we do not set the x-local-cache-hash header because we do not know - // the hash value until after the write to the cache completes, which doesn't - // happen until after the response has been sent and it's too late to write - // the header anyway - this.response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - this.response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - this.response.headers.set('x-local-cache-mode', 'stream') - this.response.headers.set('x-local-cache-status', status) - this.response.headers.set('x-local-cache-time', new Date().toISOString()) - const newResponse = new Response(body, { - url: this.response.url, - status: this.response.status, - headers: this.response.headers, - counter: this.options.counter, - }) - return newResponse - } - - // use the cached data to create a response and return it - async respond (method, options, status) { - let response - if (method === 'HEAD' || [301, 308].includes(this.response.status)) { - // if the request is a HEAD, or the response is a redirect, - // then the metadata in the entry already includes everything - // we need to build a response - response = this.response - } else { - // we're responding with a full cached response, so create a body - // that reads from cacache and attach it to a new Response - const body = new Minipass() - const headers = { ...this.policy.responseHeaders() } - - const onResume = () => { - const cacheStream = cacache.get.stream.byDigest( - this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize } - ) - cacheStream.on('error', async (err) => { - cacheStream.pause() - if (err.code === 'EINTEGRITY') { - await cacache.rm.content( - this.options.cachePath, this.entry.integrity, { memoize: this.options.memoize } - ) - } - if (err.code === 'ENOENT' || err.code === 'EINTEGRITY') { - await CacheEntry.invalidate(this.request, this.options) - } - body.emit('error', err) - cacheStream.resume() - }) - // emit the integrity and size events based on our metadata so we're consistent - body.emit('integrity', this.entry.integrity) - body.emit('size', Number(headers['content-length'])) - cacheStream.pipe(body) - } - - body.once('resume', onResume) - body.once('end', () => body.removeListener('resume', onResume)) - response = new Response(body, { - url: this.entry.metadata.url, - counter: options.counter, - status: 200, - headers, - }) - } - - response.headers.set('x-local-cache', encodeURIComponent(this.options.cachePath)) - response.headers.set('x-local-cache-hash', encodeURIComponent(this.entry.integrity)) - response.headers.set('x-local-cache-key', encodeURIComponent(this.key)) - response.headers.set('x-local-cache-mode', 'stream') - response.headers.set('x-local-cache-status', status) - response.headers.set('x-local-cache-time', new Date(this.entry.metadata.time).toUTCString()) - return response - } - - // use the provided request along with this cache entry to - // revalidate the stored response. returns a response, either - // from the cache or from the update - async revalidate (request, options) { - const revalidateRequest = new Request(request, { - headers: this.policy.revalidationHeaders(request), - }) - - try { - // NOTE: be sure to remove the headers property from the - // user supplied options, since we have already defined - // them on the new request object. if they're still in the - // options then those will overwrite the ones from the policy - var response = await remote(revalidateRequest, { - ...options, - headers: undefined, - }) - } catch (err) { - // if the network fetch fails, return the stale - // cached response unless it has a cache-control - // of 'must-revalidate' - if (!this.policy.mustRevalidate) { - return this.respond(request.method, options, 'stale') - } - - throw err - } - - if (this.policy.revalidated(revalidateRequest, response)) { - // we got a 304, write a new index to the cache and respond from cache - const metadata = getMetadata(request, response, options) - // 304 responses do not include headers that are specific to the response data - // since they do not include a body, so we copy values for headers that were - // in the old cache entry to the new one, if the new metadata does not already - // include that header - for (const name of KEEP_RESPONSE_HEADERS) { - if ( - !hasOwnProperty(metadata.resHeaders, name) && - hasOwnProperty(this.entry.metadata.resHeaders, name) - ) { - metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] - } - } - - for (const name of options.cacheAdditionalHeaders) { - const inMeta = hasOwnProperty(metadata.resHeaders, name) - const inEntry = hasOwnProperty(this.entry.metadata.resHeaders, name) - const inPolicy = hasOwnProperty(this.policy.response.headers, name) - - // if the header is in the existing entry, but it is not in the metadata - // then we need to write it to the metadata as this will refresh the on-disk cache - if (!inMeta && inEntry) { - metadata.resHeaders[name] = this.entry.metadata.resHeaders[name] - } - // if the header is in the metadata, but not in the policy, then we need to set - // it in the policy so that it's included in the immediate response. future - // responses will load a new cache entry, so we don't need to change that - if (!inPolicy && inMeta) { - this.policy.response.headers[name] = metadata.resHeaders[name] - } - } - - try { - await cacache.index.insert(options.cachePath, this.key, this.entry.integrity, { - size: this.entry.size, - metadata, - }) - } catch (err) { - // if updating the cache index fails, we ignore it and - // respond anyway - } - return this.respond(request.method, options, 'revalidated') - } - - // if we got a modified response, create a new entry based on it - const newEntry = new CacheEntry({ - request, - response, - options, - }) - - // respond with the new entry while writing it to the cache - return newEntry.store('updated') - } -} - -module.exports = CacheEntry diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/errors.js b/node_modules/npm/node_modules/make-fetch-happen/lib/cache/errors.js deleted file mode 100644 index 67a6657..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/errors.js +++ /dev/null @@ -1,11 +0,0 @@ -class NotCachedError extends Error { - constructor (url) { - /* eslint-disable-next-line max-len */ - super(`request to ${url} failed: cache mode is 'only-if-cached' but no cached response is available.`) - this.code = 'ENOTCACHED' - } -} - -module.exports = { - NotCachedError, -} diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js b/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js deleted file mode 100644 index 0de49d2..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js +++ /dev/null @@ -1,49 +0,0 @@ -const { NotCachedError } = require('./errors.js') -const CacheEntry = require('./entry.js') -const remote = require('../remote.js') - -// do whatever is necessary to get a Response and return it -const cacheFetch = async (request, options) => { - // try to find a cached entry that satisfies this request - const entry = await CacheEntry.find(request, options) - if (!entry) { - // no cached result, if the cache mode is 'only-if-cached' that's a failure - if (options.cache === 'only-if-cached') { - throw new NotCachedError(request.url) - } - - // otherwise, we make a request, store it and return it - const response = await remote(request, options) - const newEntry = new CacheEntry({ request, response, options }) - return newEntry.store('miss') - } - - // we have a cached response that satisfies this request, however if the cache - // mode is 'no-cache' then we send the revalidation request no matter what - if (options.cache === 'no-cache') { - return entry.revalidate(request, options) - } - - // if the cached entry is not stale, or if the cache mode is 'force-cache' or - // 'only-if-cached' we can respond with the cached entry. set the status - // based on the result of needsRevalidation and respond - const _needsRevalidation = entry.policy.needsRevalidation(request) - if (options.cache === 'force-cache' || - options.cache === 'only-if-cached' || - !_needsRevalidation) { - return entry.respond(request.method, options, _needsRevalidation ? 'stale' : 'hit') - } - - // if we got here, the cache entry is stale so revalidate it - return entry.revalidate(request, options) -} - -cacheFetch.invalidate = async (request, options) => { - if (!options.cachePath) { - return - } - - return CacheEntry.invalidate(request, options) -} - -module.exports = cacheFetch diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/key.js b/node_modules/npm/node_modules/make-fetch-happen/lib/cache/key.js deleted file mode 100644 index f7684d5..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/key.js +++ /dev/null @@ -1,17 +0,0 @@ -const { URL, format } = require('url') - -// options passed to url.format() when generating a key -const formatOptions = { - auth: false, - fragment: false, - search: true, - unicode: false, -} - -// returns a string to be used as the cache key for the Request -const cacheKey = (request) => { - const parsed = new URL(request.url) - return `make-fetch-happen:request-cache:${format(parsed, formatOptions)}` -} - -module.exports = cacheKey diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/policy.js b/node_modules/npm/node_modules/make-fetch-happen/lib/cache/policy.js deleted file mode 100644 index ada3c86..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/cache/policy.js +++ /dev/null @@ -1,161 +0,0 @@ -const CacheSemantics = require('http-cache-semantics') -const Negotiator = require('negotiator') -const ssri = require('ssri') - -// options passed to http-cache-semantics constructor -const policyOptions = { - shared: false, - ignoreCargoCult: true, -} - -// a fake empty response, used when only testing the -// request for storability -const emptyResponse = { status: 200, headers: {} } - -// returns a plain object representation of the Request -const requestObject = (request) => { - const _obj = { - method: request.method, - url: request.url, - headers: {}, - compress: request.compress, - } - - request.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -// returns a plain object representation of the Response -const responseObject = (response) => { - const _obj = { - status: response.status, - headers: {}, - } - - response.headers.forEach((value, key) => { - _obj.headers[key] = value - }) - - return _obj -} - -class CachePolicy { - constructor ({ entry, request, response, options }) { - this.entry = entry - this.request = requestObject(request) - this.response = responseObject(response) - this.options = options - this.policy = new CacheSemantics(this.request, this.response, policyOptions) - - if (this.entry) { - // if we have an entry, copy the timestamp to the _responseTime - // this is necessary because the CacheSemantics constructor forces - // the value to Date.now() which means a policy created from a - // cache entry is likely to always identify itself as stale - this.policy._responseTime = this.entry.metadata.time - } - } - - // static method to quickly determine if a request alone is storable - static storable (request, options) { - // no cachePath means no caching - if (!options.cachePath) { - return false - } - - // user explicitly asked not to cache - if (options.cache === 'no-store') { - return false - } - - // we only cache GET and HEAD requests - if (!['GET', 'HEAD'].includes(request.method)) { - return false - } - - // otherwise, let http-cache-semantics make the decision - // based on the request's headers - const policy = new CacheSemantics(requestObject(request), emptyResponse, policyOptions) - return policy.storable() - } - - // returns true if the policy satisfies the request - satisfies (request) { - const _req = requestObject(request) - if (this.request.headers.host !== _req.headers.host) { - return false - } - - if (this.request.compress !== _req.compress) { - return false - } - - const negotiatorA = new Negotiator(this.request) - const negotiatorB = new Negotiator(_req) - - if (JSON.stringify(negotiatorA.mediaTypes()) !== JSON.stringify(negotiatorB.mediaTypes())) { - return false - } - - if (JSON.stringify(negotiatorA.languages()) !== JSON.stringify(negotiatorB.languages())) { - return false - } - - if (JSON.stringify(negotiatorA.encodings()) !== JSON.stringify(negotiatorB.encodings())) { - return false - } - - if (this.options.integrity) { - return ssri.parse(this.options.integrity).match(this.entry.integrity) - } - - return true - } - - // returns true if the request and response allow caching - storable () { - return this.policy.storable() - } - - // NOTE: this is a hack to avoid parsing the cache-control - // header ourselves, it returns true if the response's - // cache-control contains must-revalidate - get mustRevalidate () { - return !!this.policy._rescc['must-revalidate'] - } - - // returns true if the cached response requires revalidation - // for the given request - needsRevalidation (request) { - const _req = requestObject(request) - // force method to GET because we only cache GETs - // but can serve a HEAD from a cached GET - _req.method = 'GET' - return !this.policy.satisfiesWithoutRevalidation(_req) - } - - responseHeaders () { - return this.policy.responseHeaders() - } - - // returns a new object containing the appropriate headers - // to send a revalidation request - revalidationHeaders (request) { - const _req = requestObject(request) - return this.policy.revalidationHeaders(_req) - } - - // returns true if the request/response was revalidated - // successfully. returns false if a new response was received - revalidated (request, response) { - const _req = requestObject(request) - const _res = responseObject(response) - const policy = this.policy.revalidatedPolicy(_req, _res) - return !policy.modified - } -} - -module.exports = CachePolicy diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js b/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js deleted file mode 100644 index 233ba67..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict' - -const { FetchError, Request, isRedirect } = require('minipass-fetch') -const url = require('url') - -const CachePolicy = require('./cache/policy.js') -const cache = require('./cache/index.js') -const remote = require('./remote.js') - -// given a Request, a Response and user options -// return true if the response is a redirect that -// can be followed. we throw errors that will result -// in the fetch being rejected if the redirect is -// possible but invalid for some reason -const canFollowRedirect = (request, response, options) => { - if (!isRedirect(response.status)) { - return false - } - - if (options.redirect === 'manual') { - return false - } - - if (options.redirect === 'error') { - throw new FetchError(`redirect mode is set to error: ${request.url}`, - 'no-redirect', { code: 'ENOREDIRECT' }) - } - - if (!response.headers.has('location')) { - throw new FetchError(`redirect location header missing for: ${request.url}`, - 'no-location', { code: 'EINVALIDREDIRECT' }) - } - - if (request.counter >= request.follow) { - throw new FetchError(`maximum redirect reached at: ${request.url}`, - 'max-redirect', { code: 'EMAXREDIRECT' }) - } - - return true -} - -// given a Request, a Response, and the user's options return an object -// with a new Request and a new options object that will be used for -// following the redirect -const getRedirect = (request, response, options) => { - const _opts = { ...options } - const location = response.headers.get('location') - const redirectUrl = new url.URL(location, /^https?:/.test(location) ? undefined : request.url) - // Comment below is used under the following license: - /** - * @license - * Copyright (c) 2010-2012 Mikeal Rogers - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an "AS - * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ - - // Remove authorization if changing hostnames (but not if just - // changing ports or protocols). This matches the behavior of request: - // https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138 - if (new url.URL(request.url).hostname !== redirectUrl.hostname) { - request.headers.delete('authorization') - request.headers.delete('cookie') - } - - // for POST request with 301/302 response, or any request with 303 response, - // use GET when following redirect - if ( - response.status === 303 || - (request.method === 'POST' && [301, 302].includes(response.status)) - ) { - _opts.method = 'GET' - _opts.body = null - request.headers.delete('content-length') - } - - _opts.headers = {} - request.headers.forEach((value, key) => { - _opts.headers[key] = value - }) - - _opts.counter = ++request.counter - const redirectReq = new Request(url.format(redirectUrl), _opts) - return { - request: redirectReq, - options: _opts, - } -} - -const fetch = async (request, options) => { - const response = CachePolicy.storable(request, options) - ? await cache(request, options) - : await remote(request, options) - - // if the request wasn't a GET or HEAD, and the response - // status is between 200 and 399 inclusive, invalidate the - // request url - if (!['GET', 'HEAD'].includes(request.method) && - response.status >= 200 && - response.status <= 399) { - await cache.invalidate(request, options) - } - - if (!canFollowRedirect(request, response, options)) { - return response - } - - const redirect = getRedirect(request, response, options) - return fetch(redirect.request, redirect.options) -} - -module.exports = fetch diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/index.js b/node_modules/npm/node_modules/make-fetch-happen/lib/index.js deleted file mode 100644 index 2f12e8e..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/index.js +++ /dev/null @@ -1,41 +0,0 @@ -const { FetchError, Headers, Request, Response } = require('minipass-fetch') - -const configureOptions = require('./options.js') -const fetch = require('./fetch.js') - -const makeFetchHappen = (url, opts) => { - const options = configureOptions(opts) - - const request = new Request(url, options) - return fetch(request, options) -} - -makeFetchHappen.defaults = (defaultUrl, defaultOptions = {}, wrappedFetch = makeFetchHappen) => { - if (typeof defaultUrl === 'object') { - defaultOptions = defaultUrl - defaultUrl = null - } - - const defaultedFetch = (url, options = {}) => { - const finalUrl = url || defaultUrl - const finalOptions = { - ...defaultOptions, - ...options, - headers: { - ...defaultOptions.headers, - ...options.headers, - }, - } - return wrappedFetch(finalUrl, finalOptions) - } - - defaultedFetch.defaults = (defaultUrl1, defaultOptions1 = {}) => - makeFetchHappen.defaults(defaultUrl1, defaultOptions1, defaultedFetch) - return defaultedFetch -} - -module.exports = makeFetchHappen -module.exports.FetchError = FetchError -module.exports.Headers = Headers -module.exports.Request = Request -module.exports.Response = Response diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/options.js b/node_modules/npm/node_modules/make-fetch-happen/lib/options.js deleted file mode 100644 index f775112..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/options.js +++ /dev/null @@ -1,54 +0,0 @@ -const dns = require('dns') - -const conditionalHeaders = [ - 'if-modified-since', - 'if-none-match', - 'if-unmodified-since', - 'if-match', - 'if-range', -] - -const configureOptions = (opts) => { - const { strictSSL, ...options } = { ...opts } - options.method = options.method ? options.method.toUpperCase() : 'GET' - options.rejectUnauthorized = strictSSL !== false - - if (!options.retry) { - options.retry = { retries: 0 } - } else if (typeof options.retry === 'string') { - const retries = parseInt(options.retry, 10) - if (isFinite(retries)) { - options.retry = { retries } - } else { - options.retry = { retries: 0 } - } - } else if (typeof options.retry === 'number') { - options.retry = { retries: options.retry } - } else { - options.retry = { retries: 0, ...options.retry } - } - - options.dns = { ttl: 5 * 60 * 1000, lookup: dns.lookup, ...options.dns } - - options.cache = options.cache || 'default' - if (options.cache === 'default') { - const hasConditionalHeader = Object.keys(options.headers || {}).some((name) => { - return conditionalHeaders.includes(name.toLowerCase()) - }) - if (hasConditionalHeader) { - options.cache = 'no-store' - } - } - - options.cacheAdditionalHeaders = options.cacheAdditionalHeaders || [] - - // cacheManager is deprecated, but if it's set and - // cachePath is not we should copy it to the new field - if (options.cacheManager && !options.cachePath) { - options.cachePath = options.cacheManager - } - - return options -} - -module.exports = configureOptions diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/pipeline.js b/node_modules/npm/node_modules/make-fetch-happen/lib/pipeline.js deleted file mode 100644 index b1d221b..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/pipeline.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict' - -const MinipassPipeline = require('minipass-pipeline') - -class CachingMinipassPipeline extends MinipassPipeline { - #events = [] - #data = new Map() - - constructor (opts, ...streams) { - // CRITICAL: do NOT pass the streams to the call to super(), this will start - // the flow of data and potentially cause the events we need to catch to emit - // before we've finished our own setup. instead we call super() with no args, - // finish our setup, and then push the streams into ourselves to start the - // data flow - super() - this.#events = opts.events - - /* istanbul ignore next - coverage disabled because this is pointless to test here */ - if (streams.length) { - this.push(...streams) - } - } - - on (event, handler) { - if (this.#events.includes(event) && this.#data.has(event)) { - return handler(...this.#data.get(event)) - } - - return super.on(event, handler) - } - - emit (event, ...data) { - if (this.#events.includes(event)) { - this.#data.set(event, data) - } - - return super.emit(event, ...data) - } -} - -module.exports = CachingMinipassPipeline diff --git a/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js b/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js deleted file mode 100644 index 2aef9f8..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/lib/remote.js +++ /dev/null @@ -1,127 +0,0 @@ -const { Minipass } = require('minipass') -const fetch = require('minipass-fetch') -const promiseRetry = require('promise-retry') -const ssri = require('ssri') - -const CachingMinipassPipeline = require('./pipeline.js') -const { getAgent } = require('@npmcli/agent') -const pkg = require('../package.json') - -const USER_AGENT = `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})` - -const RETRY_ERRORS = [ - 'ECONNRESET', // remote socket closed on us - 'ECONNREFUSED', // remote host refused to open connection - 'EADDRINUSE', // failed to bind to a local port (proxy?) - 'ETIMEDOUT', // someone in the transaction is WAY TOO SLOW - // from @npmcli/agent - 'ECONNECTIONTIMEOUT', - 'EIDLETIMEOUT', - 'ERESPONSETIMEOUT', - 'ETRANSFERTIMEOUT', - // Known codes we do NOT retry on: - // ENOTFOUND (getaddrinfo failure. Either bad hostname, or offline) - // EINVALIDPROXY // invalid protocol from @npmcli/agent - // EINVALIDRESPONSE // invalid status code from @npmcli/agent -] - -const RETRY_TYPES = [ - 'request-timeout', -] - -// make a request directly to the remote source, -// retrying certain classes of errors as well as -// following redirects (through the cache if necessary) -// and verifying response integrity -const remoteFetch = (request, options) => { - const agent = getAgent(request.url, options) - if (!request.headers.has('connection')) { - request.headers.set('connection', agent ? 'keep-alive' : 'close') - } - - if (!request.headers.has('user-agent')) { - request.headers.set('user-agent', USER_AGENT) - } - - // keep our own options since we're overriding the agent - // and the redirect mode - const _opts = { - ...options, - agent, - redirect: 'manual', - } - - return promiseRetry(async (retryHandler, attemptNum) => { - const req = new fetch.Request(request, _opts) - try { - let res = await fetch(req, _opts) - if (_opts.integrity && res.status === 200) { - // we got a 200 response and the user has specified an expected - // integrity value, so wrap the response in an ssri stream to verify it - const integrityStream = ssri.integrityStream({ - algorithms: _opts.algorithms, - integrity: _opts.integrity, - size: _opts.size, - }) - const pipeline = new CachingMinipassPipeline({ - events: ['integrity', 'size'], - }, res.body, integrityStream) - // we also propagate the integrity and size events out to the pipeline so we can use - // this new response body as an integrityEmitter for cacache - integrityStream.on('integrity', i => pipeline.emit('integrity', i)) - integrityStream.on('size', s => pipeline.emit('size', s)) - res = new fetch.Response(pipeline, res) - // set an explicit flag so we know if our response body will emit integrity and size - res.body.hasIntegrityEmitter = true - } - - res.headers.set('x-fetch-attempts', attemptNum) - - // do not retry POST requests, or requests with a streaming body - // do retry requests with a 408, 420, 429 or 500+ status in the response - const isStream = Minipass.isStream(req.body) - const isRetriable = req.method !== 'POST' && - !isStream && - ([408, 420, 429].includes(res.status) || res.status >= 500) - - if (isRetriable) { - if (typeof options.onRetry === 'function') { - options.onRetry(res) - } - - return retryHandler(res) - } - - return res - } catch (err) { - const code = (err.code === 'EPROMISERETRY') - ? err.retried.code - : err.code - - // err.retried will be the thing that was thrown from above - // if it's a response, we just got a bad status code and we - // can re-throw to allow the retry - const isRetryError = err.retried instanceof fetch.Response || - (RETRY_ERRORS.includes(code) && RETRY_TYPES.includes(err.type)) - - if (req.method === 'POST' || isRetryError) { - throw err - } - - if (typeof options.onRetry === 'function') { - options.onRetry(err) - } - - return retryHandler(err) - } - }, options.retry).catch((err) => { - // don't reject for http errors, just return them - if (err.status >= 400 && err.type !== 'system') { - return err - } - - throw err - }) -} - -module.exports = remoteFetch diff --git a/node_modules/npm/node_modules/make-fetch-happen/package.json b/node_modules/npm/node_modules/make-fetch-happen/package.json deleted file mode 100644 index a874ace..0000000 --- a/node_modules/npm/node_modules/make-fetch-happen/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "make-fetch-happen", - "version": "13.0.0", - "description": "Opinionated, caching, retrying fetch client", - "main": "lib/index.js", - "files": [ - "bin/", - "lib/" - ], - "scripts": { - "test": "tap", - "posttest": "npm run lint", - "eslint": "eslint", - "lint": "eslint \"**/*.js\"", - "lintfix": "npm run lint -- --fix", - "postlint": "template-oss-check", - "snap": "tap", - "template-oss-apply": "template-oss-apply --force" - }, - "repository": { - "type": "git", - "url": "https://github.com/npm/make-fetch-happen.git" - }, - "keywords": [ - "http", - "request", - "fetch", - "mean girls", - "caching", - "cache", - "subresource integrity" - ], - "author": "GitHub Inc.", - "license": "ISC", - "dependencies": { - "@npmcli/agent": "^2.0.0", - "cacache": "^18.0.0", - "http-cache-semantics": "^4.1.1", - "is-lambda": "^1.0.1", - "minipass": "^7.0.2", - "minipass-fetch": "^3.0.0", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "ssri": "^10.0.0" - }, - "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.18.0", - "nock": "^13.2.4", - "safe-buffer": "^5.2.1", - "standard-version": "^9.3.2", - "tap": "^16.0.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - }, - "tap": { - "color": 1, - "files": "test/*.js", - "check-coverage": true, - "timeout": 60, - "nyc-arg": [ - "--exclude", - "tap-snapshots/**" - ] - }, - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "ciVersions": [ - "16.14.0", - "16.x", - "18.0.0", - "18.x" - ], - "version": "4.18.0", - "publish": "true" - } -} diff --git a/node_modules/npm/node_modules/minimatch/LICENSE b/node_modules/npm/node_modules/minimatch/LICENSE deleted file mode 100644 index 1493534..0000000 --- a/node_modules/npm/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/assert-valid-pattern.js b/node_modules/npm/node_modules/minimatch/dist/cjs/assert-valid-pattern.js deleted file mode 100644 index 5fc86bb..0000000 --- a/node_modules/npm/node_modules/minimatch/dist/cjs/assert-valid-pattern.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertValidPattern = void 0; -const MAX_PATTERN_LENGTH = 1024 * 64; -const assertValidPattern = (pattern) => { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern'); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long'); - } -}; -exports.assertValidPattern = assertValidPattern; -//# sourceMappingURL=assert-valid-pattern.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/ast.js b/node_modules/npm/node_modules/minimatch/dist/cjs/ast.js deleted file mode 100644 index a98ae79..0000000 --- a/node_modules/npm/node_modules/minimatch/dist/cjs/ast.js +++ /dev/null @@ -1,589 +0,0 @@ -"use strict"; -// parse a single path portion -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AST = void 0; -const brace_expressions_js_1 = require("./brace-expressions.js"); -const unescape_js_1 = require("./unescape.js"); -const types = new Set(['!', '?', '+', '*', '@']); -const isExtglobType = (c) => types.has(c); -// Patterns that get prepended to bind to the start of either the -// entire string, or just a single path portion, to prevent dots -// and/or traversal patterns, when needed. -// Exts don't need the ^ or / bit, because the root binds that already. -const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; -const startNoDot = '(?!\\.)'; -// characters that indicate a start of pattern needs the "no dots" bit, -// because a dot *might* be matched. ( is not in the list, because in -// the case of a child extglob, it will handle the prevention itself. -const addPatternStart = new Set(['[', '.']); -// cases where traversal is A-OK, no dot prevention needed -const justDots = new Set(['..', '.']); -const reSpecials = new Set('().*{}+?[]^$\\!'); -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// any single thing other than / -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// use + when we need to ensure that *something* matches, because the * is -// the only thing in the path portion. -const starNoEmpty = qmark + '+?'; -// remove the \ chars that we added if we end up doing a nonmagic compare -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') -class AST { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - constructor(type, parent, options = {}) { - this.type = type; - // extglobs are inherently magical - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === '!' && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - /* c8 ignore start */ - if (this.#hasMagic !== undefined) - return this.#hasMagic; - /* c8 ignore stop */ - for (const p of this.#parts) { - if (typeof p === 'string') - continue; - if (p.type || p.hasMagic) - return (this.#hasMagic = true); - } - // note: will be undefined until we generate the regexp src and find out - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } - } - #fillNegs() { - /* c8 ignore start */ - if (this !== this.#root) - throw new Error('should only call on root'); - if (this.#filledNegs) - return this; - /* c8 ignore stop */ - // call toString() once to fill this out - this.toString(); - this.#filledNegs = true; - let n; - while ((n = this.#negs.pop())) { - if (n.type !== '!') - continue; - // walk up the tree, appending everthing that comes AFTER parentIndex - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - /* c8 ignore start */ - if (typeof part === 'string') { - throw new Error('string part in extglob AST??'); - } - /* c8 ignore stop */ - part.copyIn(pp.#parts[i]); - } - } - p = pp; - pp = p.#parent; - } - } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === '') - continue; - /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { - throw new Error('invalid part: ' + p); - } - /* c8 ignore stop */ - this.#parts.push(p); - } - } - toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) - : [this.type, ...this.#parts.map(p => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && - (this === this.#root || - (this.#root.#filledNegs && this.#parent?.type === '!'))) { - ret.push({}); - } - return ret; - } - isStart() { - if (this.#root === this) - return true; - // if (this.type) return !!this.#parent?.isStart() - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - // if everything AHEAD of this is a negation, then it's still the "start" - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { - return false; - } - } - return true; - } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === '!') - return true; - if (!this.#parent?.isEnd()) - return false; - if (!this.type) - return this.#parent?.isEnd(); - // if not root, it'll always have a parent - /* c8 ignore start */ - const pl = this.#parent ? this.#parent.#parts.length : 0; - /* c8 ignore stop */ - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === 'string') - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new AST(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt) { - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - // outside of a extglob, append until we find a start - let i = pos; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { - ast.push(acc); - acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); - ast.push(ext); - continue; - } - acc += c; - } - ast.push(acc); - return i; - } - // some kind of extglob, pos is at the ( - // find the next | or ) - let i = pos + 1; - let part = new AST(null, ast); - const parts = []; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === '(') { - part.push(acc); - acc = ''; - const ext = new AST(c, part); - part.push(ext); - i = AST.#parseAST(str, ext, i, opt); - continue; - } - if (c === '|') { - part.push(acc); - acc = ''; - parts.push(part); - part = new AST(null, ast); - continue; - } - if (c === ')') { - if (acc === '' && ast.#parts.length === 0) { - ast.#emptyExt = true; - } - part.push(acc); - acc = ''; - ast.push(...parts, part); - return i; - } - acc += c; - } - // unfinished extglob - // if we got here, it was a malformed extglob! not an extglob, but - // maybe something else in there. - ast.type = null; - ast.#hasMagic = undefined; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - // should only be called on root - /* c8 ignore start */ - if (this !== this.#root) - return this.#root.toMMPattern(); - /* c8 ignore stop */ - const glob = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - // if we're in nocase mode, and not nocaseMagicOnly, then we do - // still need a regular expression if we have to case-insensitively - // match capital/lowercase characters. - const anyMagic = hasMagic || - this.#hasMagic || - (this.#options.nocase && - !this.#options.nocaseMagicOnly && - glob.toUpperCase() !== glob.toLowerCase()); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob, - }); - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource(allowDot) { - const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) - this.#fillNegs(); - if (!this.type) { - const noEmpty = this.isStart() && this.isEnd(); - const src = this.#parts - .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) - : p.toRegExpSource(allowDot); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }) - .join(''); - let start = ''; - if (this.isStart()) { - if (typeof this.#parts[0] === 'string') { - // this is the string that will match the start of the pattern, - // so we need to protect against dots and such. - // '.' and '..' cannot match unless the pattern is that exactly, - // even if it starts with . or dot:true is set. - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - // check if we have a possibility of matching . or .., - // and prevent that. - const needNoTrav = - // dots are allowed, and the pattern starts with [ or . - (dot && aps.has(src.charAt(0))) || - // the pattern starts with \., and then [ or . - (src.startsWith('\\.') && aps.has(src.charAt(2))) || - // the pattern starts with \.\., and then [ or . - (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); - // no need to prevent dots if it can't match a dot, or if a - // sub-pattern will be preventing it anyway. - const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; - } - } - } - // append the "end of path portion" pattern to negation tails - let end = ''; - if (this.isEnd() && - this.#root.#filledNegs && - this.#parent?.type === '!') { - end = '(?:$|\\/)'; - } - const final = start + src + end; - return [ - final, - (0, unescape_js_1.unescape)(src), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - // We need to calculate the body *twice* if it's a repeat pattern - // at the start, once in nodot mode, then again in dot mode, so a - // pattern like *(?) can match 'x.y' - const repeated = this.type === '*' || this.type === '+'; - // some kind of extglob - const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; - let body = this.#partsToRegExp(dot); - if (this.isStart() && this.isEnd() && !body && this.type !== '!') { - // invalid extglob, has to at least be *something* present, if it's - // the entire path portion. - const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; - return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; - } - // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' - : this.#partsToRegExp(true); - if (bodyDotAllowed === body) { - bodyDotAllowed = ''; - } - if (bodyDotAllowed) { - body = `(?:${body})(?:${bodyDotAllowed})*?`; - } - // an empty !() is exactly equivalent to a starNoEmpty - let final = ''; - if (this.type === '!' && this.#emptyExt) { - final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; - } - else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` - : `)${this.type}`; - final = start + body + close; - } - return [ - final, - (0, unescape_js_1.unescape)(body), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - #partsToRegExp(dot) { - return this.#parts - .map(p => { - // extglob ASTs should only contain parent ASTs - /* c8 ignore start */ - if (typeof p === 'string') { - throw new Error('string type in extglob ast??'); - } - /* c8 ignore stop */ - // can ignore hasMagic, because extglobs are already always magic - const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); - this.#uflag = this.#uflag || uflag; - return re; - }) - .filter(p => !(this.isStart() && this.isEnd()) || !!p) - .join('|'); - } - static #parseGlob(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ''; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? '\\' : '') + c; - continue; - } - if (c === '\\') { - if (i === glob.length - 1) { - re += '\\\\'; - } - else { - escaping = true; - } - continue; - } - if (c === '[') { - const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; - } - } - if (c === '*') { - if (noEmpty && glob === '*') - re += starNoEmpty; - else - re += star; - hasMagic = true; - continue; - } - if (c === '?') { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); - } - return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; - } -} -exports.AST = AST; -//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/brace-expressions.js b/node_modules/npm/node_modules/minimatch/dist/cjs/brace-expressions.js deleted file mode 100644 index 0e13eef..0000000 --- a/node_modules/npm/node_modules/minimatch/dist/cjs/brace-expressions.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -// translate the various posix character classes into unicode properties -// this works across all unicode locales -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseClass = void 0; -// { : [, /u flag required, negated] -const posixClasses = { - '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], - '[:alpha:]': ['\\p{L}\\p{Nl}', true], - '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], - '[:blank:]': ['\\p{Zs}\\t', true], - '[:cntrl:]': ['\\p{Cc}', true], - '[:digit:]': ['\\p{Nd}', true], - '[:graph:]': ['\\p{Z}\\p{C}', true, true], - '[:lower:]': ['\\p{Ll}', true], - '[:print:]': ['\\p{C}', true], - '[:punct:]': ['\\p{P}', true], - '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], - '[:upper:]': ['\\p{Lu}', true], - '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], - '[:xdigit:]': ['A-Fa-f0-9', false], -}; -// only need to escape a few things inside of brace expressions -// escapes: [ \ ] - -const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); -// escape all regexp magic characters -const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// everything has already been escaped, we just have to join -const rangesToString = (ranges) => ranges.join(''); -// takes a glob string at a posix brace expression, and returns -// an equivalent regular expression source, and boolean indicating -// whether the /u flag needs to be applied, and the number of chars -// consumed to parse the character class. -// This also removes out of order ranges, and returns ($.) if the -// entire class just no good. -const parseClass = (glob, position) => { - const pos = position; - /* c8 ignore start */ - if (glob.charAt(pos) !== '[') { - throw new Error('not in a brace expression'); - } - /* c8 ignore stop */ - const ranges = []; - const negs = []; - let i = pos + 1; - let sawStart = false; - let uflag = false; - let escaping = false; - let negate = false; - let endPos = pos; - let rangeStart = ''; - WHILE: while (i < glob.length) { - const c = glob.charAt(i); - if ((c === '!' || c === '^') && i === pos + 1) { - negate = true; - i++; - continue; - } - if (c === ']' && sawStart && !escaping) { - endPos = i + 1; - break; - } - sawStart = true; - if (c === '\\') { - if (!escaping) { - escaping = true; - i++; - continue; - } - // escaped \ char, fall through and treat like normal char - } - if (c === '[' && !escaping) { - // either a posix class, a collation equivalent, or just a [ - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { - if (glob.startsWith(cls, i)) { - // invalid, [a-[] is fine, but not [a-[:alpha]] - if (rangeStart) { - return ['$.', false, glob.length - pos, true]; - } - i += cls.length; - if (neg) - negs.push(unip); - else - ranges.push(unip); - uflag = uflag || u; - continue WHILE; - } - } - } - // now it's just a normal character, effectively - escaping = false; - if (rangeStart) { - // throw this range away if it's not valid, but others - // can still match. - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); - } - else if (c === rangeStart) { - ranges.push(braceEscape(c)); - } - rangeStart = ''; - i++; - continue; - } - // now might be the start of a range. - // can be either c-d or c-] or c] or c] at this point - if (glob.startsWith('-]', i + 1)) { - ranges.push(braceEscape(c + '-')); - i += 2; - continue; - } - if (glob.startsWith('-', i + 1)) { - rangeStart = c; - i += 2; - continue; - } - // not the start of a range, just a single character - ranges.push(braceEscape(c)); - i++; - } - if (endPos < i) { - // didn't see the end of the class, not a valid class, - // but might still be valid as a literal match. - return ['', false, 0, false]; - } - // if we got no ranges and no negates, then we have a range that - // cannot possibly match anything, and that poisons the whole glob - if (!ranges.length && !negs.length) { - return ['$.', false, glob.length - pos, true]; - } - // if we got one positive range, and it's a single character, then that's - // not actually a magic pattern, it's just that one literal character. - // we should not treat that as "magic", we should just return the literal - // character. [_] is a perfectly valid way to escape glob magic chars. - if (negs.length === 0 && - ranges.length === 1 && - /^\\?.$/.test(ranges[0]) && - !negate) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; - const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges - : snegs; - return [comb, uflag, endPos - pos, true]; -}; -exports.parseClass = parseClass; -//# sourceMappingURL=brace-expressions.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/escape.js b/node_modules/npm/node_modules/minimatch/dist/cjs/escape.js deleted file mode 100644 index 02a4f8a..0000000 --- a/node_modules/npm/node_modules/minimatch/dist/cjs/escape.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.escape = void 0; -/** - * Escape all magic characters in a glob pattern. - * - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} - * option is used, then characters are escaped by wrapping in `[]`, because - * a magic character wrapped in a character class can only be satisfied by - * that exact character. In this mode, `\` is _not_ escaped, because it is - * not interpreted as a magic character, but instead as a path separator. - */ -const escape = (s, { windowsPathsNoEscape = false, } = {}) => { - // don't need to escape +@! because we escape the parens - // that make those magic, and escaping ! as [!] isn't valid, - // because [!]] is a valid glob class meaning not ']'. - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') - : s.replace(/[?*()[\]\\]/g, '\\$&'); -}; -exports.escape = escape; -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/index.js b/node_modules/npm/node_modules/minimatch/dist/cjs/index.js deleted file mode 100644 index d70e681..0000000 --- a/node_modules/npm/node_modules/minimatch/dist/cjs/index.js +++ /dev/null @@ -1,1011 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = __importDefault(require("brace-expansion")); -const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); -const ast_js_1 = require("./ast.js"); -const escape_js_1 = require("./escape.js"); -const unescape_js_1 = require("./unescape.js"); -const minimatch = (p, pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false; - } - return new Minimatch(pattern, options).match(p); -}; -exports.minimatch = minimatch; -// Optimized checking for the most common glob patterns. -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; -const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); -const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); -const starDotExtTestNocase = (ext) => { - ext = ext.toLowerCase(); - return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); -}; -const starDotExtTestNocaseDot = (ext) => { - ext = ext.toLowerCase(); - return (f) => f.toLowerCase().endsWith(ext); -}; -const starDotStarRE = /^\*+\.\*+$/; -const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); -const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); -const dotStarRE = /^\.\*+$/; -const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); -const starRE = /^\*+$/; -const starTest = (f) => f.length !== 0 && !f.startsWith('.'); -const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; -const qmarksTestNocase = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestNocaseDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTest = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTestNoExt = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && !f.startsWith('.'); -}; -const qmarksTestNoExtDot = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && f !== '.' && f !== '..'; -}; -/* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && - process.env && - process.env.__MINIMATCH_TESTING_PLATFORM__) || - process.platform - : 'posix'); -const path = { - win32: { sep: '\\' }, - posix: { sep: '/' }, -}; -/* c8 ignore stop */ -exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; -exports.minimatch.sep = exports.sep; -exports.GLOBSTAR = Symbol('globstar **'); -exports.minimatch.GLOBSTAR = exports.GLOBSTAR; -// any single thing other than / -// don't need to escape / when using new RegExp() -const qmark = '[^/]'; -// * => any number of characters -const 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. -const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; -const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); -exports.filter = filter; -exports.minimatch.filter = exports.filter; -const ext = (a, b = {}) => Object.assign({}, a, b); -const defaults = (def) => { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return exports.minimatch; - } - const orig = exports.minimatch; - const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); - return Object.assign(m, { - Minimatch: class Minimatch extends orig.Minimatch { - constructor(pattern, options = {}) { - super(pattern, ext(def, options)); - } - static defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - } - }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, - unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), - escape: (s, options = {}) => orig.escape(s, ext(def, options)), - filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), - defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), - braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), - match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), - sep: orig.sep, - GLOBSTAR: exports.GLOBSTAR, - }); -}; -exports.defaults = defaults; -exports.minimatch.defaults = exports.defaults; -// 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 -const braceExpand = (pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern]; - } - return (0, brace_expansion_1.default)(pattern); -}; -exports.braceExpand = braceExpand; -exports.minimatch.braceExpand = exports.braceExpand; -// 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. -const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); -exports.makeRe = makeRe; -exports.minimatch.makeRe = exports.makeRe; -const match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options); - list = list.filter(f => mm.match(f)); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; -}; -exports.match = match; -exports.minimatch.match = exports.match; -// replace stuff like \* with * -const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -class Minimatch { - options; - set; - pattern; - windowsPathsNoEscape; - nonegate; - negate; - comment; - empty; - preserveMultipleSlashes; - partial; - globSet; - globParts; - nocase; - isWindows; - platform; - windowsNoMagicRoot; - regexp; - constructor(pattern, options = {}) { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - options = options || {}; - this.options = options; - this.pattern = pattern; - this.platform = options.platform || defaultPlatform; - this.isWindows = this.platform === 'win32'; - this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - this.pattern = this.pattern.replace(/\\/g, '/'); - } - this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; - this.regexp = null; - this.negate = false; - this.nonegate = !!options.nonegate; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.nocase = !!this.options.nocase; - this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot - : !!(this.isWindows && this.nocase); - this.globSet = []; - this.globParts = []; - this.set = []; - // make the set of regexps etc. - this.make(); - } - hasMagic() { - if (this.options.magicalBraces && this.set.length > 1) { - return true; - } - for (const pattern of this.set) { - for (const part of pattern) { - if (typeof part !== 'string') - return true; - } - } - return false; - } - debug(..._) { } - make() { - const pattern = this.pattern; - const 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 - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - // 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 - // - // First, we preprocess to make the glob pattern sets a bit simpler - // and deduped. There are some perf-killing patterns that can cause - // problems with a glob walk, but we can simplify them down a bit. - const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); - this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); - // glob --> regexps - let set = this.globParts.map((s, _, __) => { - if (this.isWindows && this.windowsNoMagicRoot) { - // check if it's a drive or unc path. - const isUNC = s[0] === '' && - s[1] === '' && - (s[2] === '?' || !globMagic.test(s[2])) && - !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); - if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; - } - else if (isDrive) { - return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; - } - } - return s.map(ss => this.parse(ss)); - }); - this.debug(this.pattern, set); - // filter out everything that didn't compile properly. - this.set = set.filter(s => s.indexOf(false) === -1); - // do not treat the ? in UNC paths as magic - if (this.isWindows) { - for (let i = 0; i < this.set.length; i++) { - const p = this.set[i]; - if (p[0] === '' && - p[1] === '' && - this.globParts[i][2] === '?' && - typeof p[3] === 'string' && - /^[a-z]:$/i.test(p[3])) { - p[2] = '?'; - } - } - } - this.debug(this.pattern, this.set); - } - // various transforms to equivalent pattern sets that are - // faster to process in a filesystem walk. The goal is to - // eliminate what we can, and push all ** patterns as far - // to the right as possible, even if it increases the number - // of patterns that we have to process. - preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * - if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === '**') { - globParts[i][j] = '*'; - } - } - } - } - const { optimizationLevel = 1 } = this.options; - if (optimizationLevel >= 2) { - // aggressive optimization for the purpose of fs walking - globParts = this.firstPhasePreProcess(globParts); - globParts = this.secondPhasePreProcess(globParts); - } - else if (optimizationLevel >= 1) { - // just basic optimizations to remove some .. parts - globParts = this.levelOneOptimize(globParts); - } - else { - globParts = this.adjascentGlobstarOptimize(globParts); - } - return globParts; - } - // just get rid of adjascent ** portions - adjascentGlobstarOptimize(globParts) { - return globParts.map(parts => { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let i = gs; - while (parts[i + 1] === '**') { - i++; - } - if (i !== gs) { - parts.splice(gs, i - gs); - } - } - return parts; - }); - } - // get rid of adjascent ** and resolve .. portions - levelOneOptimize(globParts) { - return globParts.map(parts => { - parts = parts.reduce((set, part) => { - const prev = set[set.length - 1]; - if (part === '**' && prev === '**') { - return set; - } - if (part === '..') { - if (prev && prev !== '..' && prev !== '.' && prev !== '**') { - set.pop(); - return set; - } - } - set.push(part); - return set; - }, []); - return parts.length === 0 ? [''] : parts; - }); - } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); - } - let didSomething = false; - do { - didSomething = false; - //
// -> 
/
-            if (!this.preserveMultipleSlashes) {
-                for (let i = 1; i < parts.length - 1; i++) {
-                    const p = parts[i];
-                    // don't squeeze out UNC patterns
-                    if (i === 1 && p === '' && parts[0] === '')
-                        continue;
-                    if (p === '.' || p === '') {
-                        didSomething = true;
-                        parts.splice(i, 1);
-                        i--;
-                    }
-                }
-                if (parts[0] === '.' &&
-                    parts.length === 2 &&
-                    (parts[1] === '.' || parts[1] === '')) {
-                    didSomething = true;
-                    parts.pop();
-                }
-            }
-            // 
/

/../ ->

/
-            let dd = 0;
-            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
-                const p = parts[dd - 1];
-                if (p && p !== '.' && p !== '..' && p !== '**') {
-                    didSomething = true;
-                    parts.splice(dd - 1, 2);
-                    dd -= 2;
-                }
-            }
-        } while (didSomething);
-        return parts.length === 0 ? [''] : parts;
-    }
-    // First phase: single-pattern processing
-    // 
 is 1 or more portions
-    //  is 1 or more portions
-    // 

is any portion other than ., .., '', or ** - // is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - //

// -> 
/
-    // 
/

/../ ->

/
-    // **/**/ -> **/
-    //
-    // **/*/ -> */**/ <== not valid because ** doesn't follow
-    // this WOULD be allowed if ** did follow symlinks, or * didn't
-    firstPhasePreProcess(globParts) {
-        let didSomething = false;
-        do {
-            didSomething = false;
-            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let gss = gs; - while (parts[gss + 1] === '**') { - //

/**/**/ -> 
/**/
-                        gss++;
-                    }
-                    // eg, if gs is 2 and gss is 4, that means we have 3 **
-                    // parts, and can remove 2 of them.
-                    if (gss > gs) {
-                        parts.splice(gs + 1, gss - gs);
-                    }
-                    let next = parts[gs + 1];
-                    const p = parts[gs + 2];
-                    const p2 = parts[gs + 3];
-                    if (next !== '..')
-                        continue;
-                    if (!p ||
-                        p === '.' ||
-                        p === '..' ||
-                        !p2 ||
-                        p2 === '.' ||
-                        p2 === '..') {
-                        continue;
-                    }
-                    didSomething = true;
-                    // edit parts in place, and push the new one
-                    parts.splice(gs, 1);
-                    const other = parts.slice(0);
-                    other[gs] = '**';
-                    globParts.push(other);
-                    gs--;
-                }
-                // 
// -> 
/
-                if (!this.preserveMultipleSlashes) {
-                    for (let i = 1; i < parts.length - 1; i++) {
-                        const p = parts[i];
-                        // don't squeeze out UNC patterns
-                        if (i === 1 && p === '' && parts[0] === '')
-                            continue;
-                        if (p === '.' || p === '') {
-                            didSomething = true;
-                            parts.splice(i, 1);
-                            i--;
-                        }
-                    }
-                    if (parts[0] === '.' &&
-                        parts.length === 2 &&
-                        (parts[1] === '.' || parts[1] === '')) {
-                        didSomething = true;
-                        parts.pop();
-                    }
-                }
-                // 
/

/../ ->

/
-                let dd = 0;
-                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
-                    const p = parts[dd - 1];
-                    if (p && p !== '.' && p !== '..' && p !== '**') {
-                        didSomething = true;
-                        const needDot = dd === 1 && parts[dd + 1] === '**';
-                        const splin = needDot ? ['.'] : [];
-                        parts.splice(dd - 1, 2, ...splin);
-                        if (parts.length === 0)
-                            parts.push('');
-                        dd -= 2;
-                    }
-                }
-            }
-        } while (didSomething);
-        return globParts;
-    }
-    // second phase: multi-pattern dedupes
-    // {
/*/,
/

/} ->

/*/
-    // {
/,
/} -> 
/
-    // {
/**/,
/} -> 
/**/
-    //
-    // {
/**/,
/**/

/} ->

/**/
-    // ^-- not valid because ** doens't follow symlinks
-    secondPhasePreProcess(globParts) {
-        for (let i = 0; i < globParts.length - 1; i++) {
-            for (let j = i + 1; j < globParts.length; j++) {
-                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
-                if (!matched)
-                    continue;
-                globParts[i] = matched;
-                globParts[j] = [];
-            }
-        }
-        return globParts.filter(gs => gs.length);
-    }
-    partsMatch(a, b, emptyGSMatch = false) {
-        let ai = 0;
-        let bi = 0;
-        let result = [];
-        let which = '';
-        while (ai < a.length && bi < b.length) {
-            if (a[ai] === b[bi]) {
-                result.push(which === 'b' ? b[bi] : a[ai]);
-                ai++;
-                bi++;
-            }
-            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
-                result.push(a[ai]);
-                ai++;
-            }
-            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
-                result.push(b[bi]);
-                bi++;
-            }
-            else if (a[ai] === '*' &&
-                b[bi] &&
-                (this.options.dot || !b[bi].startsWith('.')) &&
-                b[bi] !== '**') {
-                if (which === 'b')
-                    return false;
-                which = 'a';
-                result.push(a[ai]);
-                ai++;
-                bi++;
-            }
-            else if (b[bi] === '*' &&
-                a[ai] &&
-                (this.options.dot || !a[ai].startsWith('.')) &&
-                a[ai] !== '**') {
-                if (which === 'a')
-                    return false;
-                which = 'b';
-                result.push(b[bi]);
-                ai++;
-                bi++;
-            }
-            else {
-                return false;
-            }
-        }
-        // if we fall out of the loop, it means they two are identical
-        // as long as their lengths match
-        return a.length === b.length && result;
-    }
-    parseNegate() {
-        if (this.nonegate)
-            return;
-        const pattern = this.pattern;
-        let negate = false;
-        let negateOffset = 0;
-        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
-            negate = !negate;
-            negateOffset++;
-        }
-        if (negateOffset)
-            this.pattern = pattern.slice(negateOffset);
-        this.negate = 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.
-    matchOne(file, pattern, partial = false) {
-        const options = this.options;
-        // UNC paths like //?/X:/... can match X:/... and vice versa
-        // Drive letters in absolute drive or unc paths are always compared
-        // case-insensitively.
-        if (this.isWindows) {
-            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
-            const fileUNC = !fileDrive &&
-                file[0] === '' &&
-                file[1] === '' &&
-                file[2] === '?' &&
-                /^[a-z]:$/i.test(file[3]);
-            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
-            const patternUNC = !patternDrive &&
-                pattern[0] === '' &&
-                pattern[1] === '' &&
-                pattern[2] === '?' &&
-                typeof pattern[3] === 'string' &&
-                /^[a-z]:$/i.test(pattern[3]);
-            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
-            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
-            if (typeof fdi === 'number' && typeof pdi === 'number') {
-                const [fd, pd] = [file[fdi], pattern[pdi]];
-                if (fd.toLowerCase() === pd.toLowerCase()) {
-                    pattern[pdi] = fd;
-                    if (pdi > fdi) {
-                        pattern = pattern.slice(pdi);
-                    }
-                    else if (fdi > pdi) {
-                        file = file.slice(fdi);
-                    }
-                }
-            }
-        }
-        // resolve and reduce . and .. portions in the file as well.
-        // dont' need to do the second phase, because it's only one string[]
-        const { optimizationLevel = 1 } = this.options;
-        if (optimizationLevel >= 2) {
-            file = this.levelTwoFileOptimize(file);
-        }
-        this.debug('matchOne', this, { file, 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.
-            /* c8 ignore start */
-            if (p === false) {
-                return false;
-            }
-            /* c8 ignore stop */
-            if (p === exports.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.
-                /* c8 ignore start */
-                if (partial) {
-                    // ran out of file
-                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
-                    if (fr === fl) {
-                        return true;
-                    }
-                }
-                /* c8 ignore stop */
-                return false;
-            }
-            // something other than **
-            // non-magic patterns just have to match exactly
-            // patterns with magic have been turned into regexps.
-            let hit;
-            if (typeof p === 'string') {
-                hit = f === p;
-                this.debug('string match', p, f, hit);
-            }
-            else {
-                hit = p.test(f);
-                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/
-            return fi === fl - 1 && file[fi] === '';
-            /* c8 ignore start */
-        }
-        else {
-            // should be unreachable.
-            throw new Error('wtf?');
-        }
-        /* c8 ignore stop */
-    }
-    braceExpand() {
-        return (0, exports.braceExpand)(this.pattern, this.options);
-    }
-    parse(pattern) {
-        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
-        const options = this.options;
-        // shortcuts
-        if (pattern === '**')
-            return exports.GLOBSTAR;
-        if (pattern === '')
-            return '';
-        // far and away, the most common glob pattern parts are
-        // *, *.*, and *.  Add a fast check method for those.
-        let m;
-        let fastTest = null;
-        if ((m = pattern.match(starRE))) {
-            fastTest = options.dot ? starTestDot : starTest;
-        }
-        else if ((m = pattern.match(starDotExtRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? starDotExtTestNocaseDot
-                    : starDotExtTestNocase
-                : options.dot
-                    ? starDotExtTestDot
-                    : starDotExtTest)(m[1]);
-        }
-        else if ((m = pattern.match(qmarksRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? qmarksTestNocaseDot
-                    : qmarksTestNocase
-                : options.dot
-                    ? qmarksTestDot
-                    : qmarksTest)(m);
-        }
-        else if ((m = pattern.match(starDotStarRE))) {
-            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
-        }
-        else if ((m = pattern.match(dotStarRE))) {
-            fastTest = dotStarTest;
-        }
-        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
-        return fastTest ? Object.assign(re, { test: fastTest }) : re;
-    }
-    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.
-        const set = this.set;
-        if (!set.length) {
-            this.regexp = false;
-            return this.regexp;
-        }
-        const options = this.options;
-        const twoStar = options.noglobstar
-            ? star
-            : options.dot
-                ? twoStarDot
-                : twoStarNoDot;
-        const flags = new Set(options.nocase ? ['i'] : []);
-        // regexpify non-globstar patterns
-        // if ** is only item, then we just do one twoStar
-        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
-        // if ** is last, append (\/twoStar|) to previous
-        // if ** is in the middle, append (\/|\/twoStar\/) to previous
-        // then filter out GLOBSTAR symbols
-        let re = set
-            .map(pattern => {
-            const pp = pattern.map(p => {
-                if (p instanceof RegExp) {
-                    for (const f of p.flags.split(''))
-                        flags.add(f);
-                }
-                return typeof p === 'string'
-                    ? regExpEscape(p)
-                    : p === exports.GLOBSTAR
-                        ? exports.GLOBSTAR
-                        : p._src;
-            });
-            pp.forEach((p, i) => {
-                const next = pp[i + 1];
-                const prev = pp[i - 1];
-                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
-                    return;
-                }
-                if (prev === undefined) {
-                    if (next !== undefined && next !== exports.GLOBSTAR) {
-                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
-                    }
-                    else {
-                        pp[i] = twoStar;
-                    }
-                }
-                else if (next === undefined) {
-                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
-                }
-                else if (next !== exports.GLOBSTAR) {
-                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
-                    pp[i + 1] = exports.GLOBSTAR;
-                }
-            });
-            return pp.filter(p => p !== exports.GLOBSTAR).join('/');
-        })
-            .join('|');
-        // need to wrap in parens if we had more than one thing with |,
-        // otherwise only the first will be anchored to ^ and the last to $
-        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
-        // must match entire pattern
-        // ending in a * or ** will make it less strict.
-        re = '^' + open + re + close + '$';
-        // can match anything, as long as it's not this.
-        if (this.negate)
-            re = '^(?!' + re + ').+$';
-        try {
-            this.regexp = new RegExp(re, [...flags].join(''));
-            /* c8 ignore start */
-        }
-        catch (ex) {
-            // should be impossible
-            this.regexp = false;
-        }
-        /* c8 ignore stop */
-        return this.regexp;
-    }
-    slashSplit(p) {
-        // if p starts with // on windows, we preserve that
-        // so that UNC paths aren't broken.  Otherwise, any number of
-        // / characters are coalesced into one, unless
-        // preserveMultipleSlashes is set to true.
-        if (this.preserveMultipleSlashes) {
-            return p.split('/');
-        }
-        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
-            // add an extra '' for the one we lose
-            return ['', ...p.split(/\/+/)];
-        }
-        else {
-            return p.split(/\/+/);
-        }
-    }
-    match(f, partial = this.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;
-        }
-        const options = this.options;
-        // windows: need to use /, not \
-        if (this.isWindows) {
-            f = f.split('\\').join('/');
-        }
-        // treat the test path as a set of pathparts.
-        const ff = this.slashSplit(f);
-        this.debug(this.pattern, 'split', ff);
-        // 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.
-        const set = this.set;
-        this.debug(this.pattern, 'set', set);
-        // Find the basename of the path by looking for the last non-empty segment
-        let filename = ff[ff.length - 1];
-        if (!filename) {
-            for (let i = ff.length - 2; !filename && i >= 0; i--) {
-                filename = ff[i];
-            }
-        }
-        for (let i = 0; i < set.length; i++) {
-            const pattern = set[i];
-            let file = ff;
-            if (options.matchBase && pattern.length === 1) {
-                file = [filename];
-            }
-            const 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;
-    }
-    static defaults(def) {
-        return exports.minimatch.defaults(def).Minimatch;
-    }
-}
-exports.Minimatch = Minimatch;
-/* c8 ignore start */
-var ast_js_2 = require("./ast.js");
-Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
-var escape_js_2 = require("./escape.js");
-Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
-var unescape_js_2 = require("./unescape.js");
-Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
-/* c8 ignore stop */
-exports.minimatch.AST = ast_js_1.AST;
-exports.minimatch.Minimatch = Minimatch;
-exports.minimatch.escape = escape_js_1.escape;
-exports.minimatch.unescape = unescape_js_1.unescape;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/package.json b/node_modules/npm/node_modules/minimatch/dist/cjs/package.json
deleted file mode 100644
index 5bbefff..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/cjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "type": "commonjs"
-}
diff --git a/node_modules/npm/node_modules/minimatch/dist/cjs/unescape.js b/node_modules/npm/node_modules/minimatch/dist/cjs/unescape.js
deleted file mode 100644
index 47c36bc..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/cjs/unescape.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.unescape = void 0;
-/**
- * Un-escape a string that has been escaped with {@link escape}.
- *
- * If the {@link windowsPathsNoEscape} option is used, then square-brace
- * escapes are removed, but not backslash escapes.  For example, it will turn
- * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
- * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
- *
- * When `windowsPathsNoEscape` is not set, then both brace escapes and
- * backslash escapes are removed.
- *
- * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
- * or unescaped.
- */
-const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
-    return windowsPathsNoEscape
-        ? s.replace(/\[([^\/\\])\]/g, '$1')
-        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
-};
-exports.unescape = unescape;
-//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/assert-valid-pattern.js b/node_modules/npm/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
deleted file mode 100644
index 7b534fc..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const MAX_PATTERN_LENGTH = 1024 * 64;
-export const assertValidPattern = (pattern) => {
-    if (typeof pattern !== 'string') {
-        throw new TypeError('invalid pattern');
-    }
-    if (pattern.length > MAX_PATTERN_LENGTH) {
-        throw new TypeError('pattern is too long');
-    }
-};
-//# sourceMappingURL=assert-valid-pattern.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/ast.js b/node_modules/npm/node_modules/minimatch/dist/mjs/ast.js
deleted file mode 100644
index 9f9835e..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/ast.js
+++ /dev/null
@@ -1,585 +0,0 @@
-// parse a single path portion
-import { parseClass } from './brace-expressions.js';
-import { unescape } from './unescape.js';
-const types = new Set(['!', '?', '+', '*', '@']);
-const isExtglobType = (c) => types.has(c);
-// Patterns that get prepended to bind to the start of either the
-// entire string, or just a single path portion, to prevent dots
-// and/or traversal patterns, when needed.
-// Exts don't need the ^ or / bit, because the root binds that already.
-const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
-const startNoDot = '(?!\\.)';
-// characters that indicate a start of pattern needs the "no dots" bit,
-// because a dot *might* be matched. ( is not in the list, because in
-// the case of a child extglob, it will handle the prevention itself.
-const addPatternStart = new Set(['[', '.']);
-// cases where traversal is A-OK, no dot prevention needed
-const justDots = new Set(['..', '.']);
-const reSpecials = new Set('().*{}+?[]^$\\!');
-const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-// any single thing other than /
-const qmark = '[^/]';
-// * => any number of characters
-const star = qmark + '*?';
-// use + when we need to ensure that *something* matches, because the * is
-// the only thing in the path portion.
-const starNoEmpty = qmark + '+?';
-// remove the \ chars that we added if we end up doing a nonmagic compare
-// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
-export class AST {
-    type;
-    #root;
-    #hasMagic;
-    #uflag = false;
-    #parts = [];
-    #parent;
-    #parentIndex;
-    #negs;
-    #filledNegs = false;
-    #options;
-    #toString;
-    // set to true if it's an extglob with no children
-    // (which really means one child of '')
-    #emptyExt = false;
-    constructor(type, parent, options = {}) {
-        this.type = type;
-        // extglobs are inherently magical
-        if (type)
-            this.#hasMagic = true;
-        this.#parent = parent;
-        this.#root = this.#parent ? this.#parent.#root : this;
-        this.#options = this.#root === this ? options : this.#root.#options;
-        this.#negs = this.#root === this ? [] : this.#root.#negs;
-        if (type === '!' && !this.#root.#filledNegs)
-            this.#negs.push(this);
-        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
-    }
-    get hasMagic() {
-        /* c8 ignore start */
-        if (this.#hasMagic !== undefined)
-            return this.#hasMagic;
-        /* c8 ignore stop */
-        for (const p of this.#parts) {
-            if (typeof p === 'string')
-                continue;
-            if (p.type || p.hasMagic)
-                return (this.#hasMagic = true);
-        }
-        // note: will be undefined until we generate the regexp src and find out
-        return this.#hasMagic;
-    }
-    // reconstructs the pattern
-    toString() {
-        if (this.#toString !== undefined)
-            return this.#toString;
-        if (!this.type) {
-            return (this.#toString = this.#parts.map(p => String(p)).join(''));
-        }
-        else {
-            return (this.#toString =
-                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
-        }
-    }
-    #fillNegs() {
-        /* c8 ignore start */
-        if (this !== this.#root)
-            throw new Error('should only call on root');
-        if (this.#filledNegs)
-            return this;
-        /* c8 ignore stop */
-        // call toString() once to fill this out
-        this.toString();
-        this.#filledNegs = true;
-        let n;
-        while ((n = this.#negs.pop())) {
-            if (n.type !== '!')
-                continue;
-            // walk up the tree, appending everthing that comes AFTER parentIndex
-            let p = n;
-            let pp = p.#parent;
-            while (pp) {
-                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
-                    for (const part of n.#parts) {
-                        /* c8 ignore start */
-                        if (typeof part === 'string') {
-                            throw new Error('string part in extglob AST??');
-                        }
-                        /* c8 ignore stop */
-                        part.copyIn(pp.#parts[i]);
-                    }
-                }
-                p = pp;
-                pp = p.#parent;
-            }
-        }
-        return this;
-    }
-    push(...parts) {
-        for (const p of parts) {
-            if (p === '')
-                continue;
-            /* c8 ignore start */
-            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
-                throw new Error('invalid part: ' + p);
-            }
-            /* c8 ignore stop */
-            this.#parts.push(p);
-        }
-    }
-    toJSON() {
-        const ret = this.type === null
-            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
-            : [this.type, ...this.#parts.map(p => p.toJSON())];
-        if (this.isStart() && !this.type)
-            ret.unshift([]);
-        if (this.isEnd() &&
-            (this === this.#root ||
-                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
-            ret.push({});
-        }
-        return ret;
-    }
-    isStart() {
-        if (this.#root === this)
-            return true;
-        // if (this.type) return !!this.#parent?.isStart()
-        if (!this.#parent?.isStart())
-            return false;
-        if (this.#parentIndex === 0)
-            return true;
-        // if everything AHEAD of this is a negation, then it's still the "start"
-        const p = this.#parent;
-        for (let i = 0; i < this.#parentIndex; i++) {
-            const pp = p.#parts[i];
-            if (!(pp instanceof AST && pp.type === '!')) {
-                return false;
-            }
-        }
-        return true;
-    }
-    isEnd() {
-        if (this.#root === this)
-            return true;
-        if (this.#parent?.type === '!')
-            return true;
-        if (!this.#parent?.isEnd())
-            return false;
-        if (!this.type)
-            return this.#parent?.isEnd();
-        // if not root, it'll always have a parent
-        /* c8 ignore start */
-        const pl = this.#parent ? this.#parent.#parts.length : 0;
-        /* c8 ignore stop */
-        return this.#parentIndex === pl - 1;
-    }
-    copyIn(part) {
-        if (typeof part === 'string')
-            this.push(part);
-        else
-            this.push(part.clone(this));
-    }
-    clone(parent) {
-        const c = new AST(this.type, parent);
-        for (const p of this.#parts) {
-            c.copyIn(p);
-        }
-        return c;
-    }
-    static #parseAST(str, ast, pos, opt) {
-        let escaping = false;
-        let inBrace = false;
-        let braceStart = -1;
-        let braceNeg = false;
-        if (ast.type === null) {
-            // outside of a extglob, append until we find a start
-            let i = pos;
-            let acc = '';
-            while (i < str.length) {
-                const c = str.charAt(i++);
-                // still accumulate escapes at this point, but we do ignore
-                // starts that are escaped
-                if (escaping || c === '\\') {
-                    escaping = !escaping;
-                    acc += c;
-                    continue;
-                }
-                if (inBrace) {
-                    if (i === braceStart + 1) {
-                        if (c === '^' || c === '!') {
-                            braceNeg = true;
-                        }
-                    }
-                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
-                        inBrace = false;
-                    }
-                    acc += c;
-                    continue;
-                }
-                else if (c === '[') {
-                    inBrace = true;
-                    braceStart = i;
-                    braceNeg = false;
-                    acc += c;
-                    continue;
-                }
-                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
-                    ast.push(acc);
-                    acc = '';
-                    const ext = new AST(c, ast);
-                    i = AST.#parseAST(str, ext, i, opt);
-                    ast.push(ext);
-                    continue;
-                }
-                acc += c;
-            }
-            ast.push(acc);
-            return i;
-        }
-        // some kind of extglob, pos is at the (
-        // find the next | or )
-        let i = pos + 1;
-        let part = new AST(null, ast);
-        const parts = [];
-        let acc = '';
-        while (i < str.length) {
-            const c = str.charAt(i++);
-            // still accumulate escapes at this point, but we do ignore
-            // starts that are escaped
-            if (escaping || c === '\\') {
-                escaping = !escaping;
-                acc += c;
-                continue;
-            }
-            if (inBrace) {
-                if (i === braceStart + 1) {
-                    if (c === '^' || c === '!') {
-                        braceNeg = true;
-                    }
-                }
-                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
-                    inBrace = false;
-                }
-                acc += c;
-                continue;
-            }
-            else if (c === '[') {
-                inBrace = true;
-                braceStart = i;
-                braceNeg = false;
-                acc += c;
-                continue;
-            }
-            if (isExtglobType(c) && str.charAt(i) === '(') {
-                part.push(acc);
-                acc = '';
-                const ext = new AST(c, part);
-                part.push(ext);
-                i = AST.#parseAST(str, ext, i, opt);
-                continue;
-            }
-            if (c === '|') {
-                part.push(acc);
-                acc = '';
-                parts.push(part);
-                part = new AST(null, ast);
-                continue;
-            }
-            if (c === ')') {
-                if (acc === '' && ast.#parts.length === 0) {
-                    ast.#emptyExt = true;
-                }
-                part.push(acc);
-                acc = '';
-                ast.push(...parts, part);
-                return i;
-            }
-            acc += c;
-        }
-        // unfinished extglob
-        // if we got here, it was a malformed extglob! not an extglob, but
-        // maybe something else in there.
-        ast.type = null;
-        ast.#hasMagic = undefined;
-        ast.#parts = [str.substring(pos - 1)];
-        return i;
-    }
-    static fromGlob(pattern, options = {}) {
-        const ast = new AST(null, undefined, options);
-        AST.#parseAST(pattern, ast, 0, options);
-        return ast;
-    }
-    // returns the regular expression if there's magic, or the unescaped
-    // string if not.
-    toMMPattern() {
-        // should only be called on root
-        /* c8 ignore start */
-        if (this !== this.#root)
-            return this.#root.toMMPattern();
-        /* c8 ignore stop */
-        const glob = this.toString();
-        const [re, body, hasMagic, uflag] = this.toRegExpSource();
-        // if we're in nocase mode, and not nocaseMagicOnly, then we do
-        // still need a regular expression if we have to case-insensitively
-        // match capital/lowercase characters.
-        const anyMagic = hasMagic ||
-            this.#hasMagic ||
-            (this.#options.nocase &&
-                !this.#options.nocaseMagicOnly &&
-                glob.toUpperCase() !== glob.toLowerCase());
-        if (!anyMagic) {
-            return body;
-        }
-        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
-        return Object.assign(new RegExp(`^${re}$`, flags), {
-            _src: re,
-            _glob: glob,
-        });
-    }
-    // returns the string match, the regexp source, whether there's magic
-    // in the regexp (so a regular expression is required) and whether or
-    // not the uflag is needed for the regular expression (for posix classes)
-    // TODO: instead of injecting the start/end at this point, just return
-    // the BODY of the regexp, along with the start/end portions suitable
-    // for binding the start/end in either a joined full-path makeRe context
-    // (where we bind to (^|/), or a standalone matchPart context (where
-    // we bind to ^, and not /).  Otherwise slashes get duped!
-    //
-    // In part-matching mode, the start is:
-    // - if not isStart: nothing
-    // - if traversal possible, but not allowed: ^(?!\.\.?$)
-    // - if dots allowed or not possible: ^
-    // - if dots possible and not allowed: ^(?!\.)
-    // end is:
-    // - if not isEnd(): nothing
-    // - else: $
-    //
-    // In full-path matching mode, we put the slash at the START of the
-    // pattern, so start is:
-    // - if first pattern: same as part-matching mode
-    // - if not isStart(): nothing
-    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
-    // - if dots allowed or not possible: /
-    // - if dots possible and not allowed: /(?!\.)
-    // end is:
-    // - if last pattern, same as part-matching mode
-    // - else nothing
-    //
-    // Always put the (?:$|/) on negated tails, though, because that has to be
-    // there to bind the end of the negated pattern portion, and it's easier to
-    // just stick it in now rather than try to inject it later in the middle of
-    // the pattern.
-    //
-    // We can just always return the same end, and leave it up to the caller
-    // to know whether it's going to be used joined or in parts.
-    // And, if the start is adjusted slightly, can do the same there:
-    // - if not isStart: nothing
-    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
-    // - if dots allowed or not possible: (?:/|^)
-    // - if dots possible and not allowed: (?:/|^)(?!\.)
-    //
-    // But it's better to have a simpler binding without a conditional, for
-    // performance, so probably better to return both start options.
-    //
-    // Then the caller just ignores the end if it's not the first pattern,
-    // and the start always gets applied.
-    //
-    // But that's always going to be $ if it's the ending pattern, or nothing,
-    // so the caller can just attach $ at the end of the pattern when building.
-    //
-    // So the todo is:
-    // - better detect what kind of start is needed
-    // - return both flavors of starting pattern
-    // - attach $ at the end of the pattern when creating the actual RegExp
-    //
-    // Ah, but wait, no, that all only applies to the root when the first pattern
-    // is not an extglob. If the first pattern IS an extglob, then we need all
-    // that dot prevention biz to live in the extglob portions, because eg
-    // +(*|.x*) can match .xy but not .yx.
-    //
-    // So, return the two flavors if it's #root and the first child is not an
-    // AST, otherwise leave it to the child AST to handle it, and there,
-    // use the (?:^|/) style of start binding.
-    //
-    // Even simplified further:
-    // - Since the start for a join is eg /(?!\.) and the start for a part
-    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
-    // or start or whatever) and prepend ^ or / at the Regexp construction.
-    toRegExpSource(allowDot) {
-        const dot = allowDot ?? !!this.#options.dot;
-        if (this.#root === this)
-            this.#fillNegs();
-        if (!this.type) {
-            const noEmpty = this.isStart() && this.isEnd();
-            const src = this.#parts
-                .map(p => {
-                const [re, _, hasMagic, uflag] = typeof p === 'string'
-                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
-                    : p.toRegExpSource(allowDot);
-                this.#hasMagic = this.#hasMagic || hasMagic;
-                this.#uflag = this.#uflag || uflag;
-                return re;
-            })
-                .join('');
-            let start = '';
-            if (this.isStart()) {
-                if (typeof this.#parts[0] === 'string') {
-                    // this is the string that will match the start of the pattern,
-                    // so we need to protect against dots and such.
-                    // '.' and '..' cannot match unless the pattern is that exactly,
-                    // even if it starts with . or dot:true is set.
-                    const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
-                    if (!dotTravAllowed) {
-                        const aps = addPatternStart;
-                        // check if we have a possibility of matching . or ..,
-                        // and prevent that.
-                        const needNoTrav = 
-                        // dots are allowed, and the pattern starts with [ or .
-                        (dot && aps.has(src.charAt(0))) ||
-                            // the pattern starts with \., and then [ or .
-                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
-                            // the pattern starts with \.\., and then [ or .
-                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
-                        // no need to prevent dots if it can't match a dot, or if a
-                        // sub-pattern will be preventing it anyway.
-                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
-                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
-                    }
-                }
-            }
-            // append the "end of path portion" pattern to negation tails
-            let end = '';
-            if (this.isEnd() &&
-                this.#root.#filledNegs &&
-                this.#parent?.type === '!') {
-                end = '(?:$|\\/)';
-            }
-            const final = start + src + end;
-            return [
-                final,
-                unescape(src),
-                (this.#hasMagic = !!this.#hasMagic),
-                this.#uflag,
-            ];
-        }
-        // We need to calculate the body *twice* if it's a repeat pattern
-        // at the start, once in nodot mode, then again in dot mode, so a
-        // pattern like *(?) can match 'x.y'
-        const repeated = this.type === '*' || this.type === '+';
-        // some kind of extglob
-        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
-        let body = this.#partsToRegExp(dot);
-        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
-            // invalid extglob, has to at least be *something* present, if it's
-            // the entire path portion.
-            const s = this.toString();
-            this.#parts = [s];
-            this.type = null;
-            this.#hasMagic = undefined;
-            return [s, unescape(this.toString()), false, false];
-        }
-        // XXX abstract out this map method
-        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
-            ? ''
-            : this.#partsToRegExp(true);
-        if (bodyDotAllowed === body) {
-            bodyDotAllowed = '';
-        }
-        if (bodyDotAllowed) {
-            body = `(?:${body})(?:${bodyDotAllowed})*?`;
-        }
-        // an empty !() is exactly equivalent to a starNoEmpty
-        let final = '';
-        if (this.type === '!' && this.#emptyExt) {
-            final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
-        }
-        else {
-            const close = this.type === '!'
-                ? // !() must match something,but !(x) can match ''
-                    '))' +
-                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
-                        star +
-                        ')'
-                : this.type === '@'
-                    ? ')'
-                    : this.type === '?'
-                        ? ')?'
-                        : this.type === '+' && bodyDotAllowed
-                            ? ')'
-                            : this.type === '*' && bodyDotAllowed
-                                ? `)?`
-                                : `)${this.type}`;
-            final = start + body + close;
-        }
-        return [
-            final,
-            unescape(body),
-            (this.#hasMagic = !!this.#hasMagic),
-            this.#uflag,
-        ];
-    }
-    #partsToRegExp(dot) {
-        return this.#parts
-            .map(p => {
-            // extglob ASTs should only contain parent ASTs
-            /* c8 ignore start */
-            if (typeof p === 'string') {
-                throw new Error('string type in extglob ast??');
-            }
-            /* c8 ignore stop */
-            // can ignore hasMagic, because extglobs are already always magic
-            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
-            this.#uflag = this.#uflag || uflag;
-            return re;
-        })
-            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
-            .join('|');
-    }
-    static #parseGlob(glob, hasMagic, noEmpty = false) {
-        let escaping = false;
-        let re = '';
-        let uflag = false;
-        for (let i = 0; i < glob.length; i++) {
-            const c = glob.charAt(i);
-            if (escaping) {
-                escaping = false;
-                re += (reSpecials.has(c) ? '\\' : '') + c;
-                continue;
-            }
-            if (c === '\\') {
-                if (i === glob.length - 1) {
-                    re += '\\\\';
-                }
-                else {
-                    escaping = true;
-                }
-                continue;
-            }
-            if (c === '[') {
-                const [src, needUflag, consumed, magic] = parseClass(glob, i);
-                if (consumed) {
-                    re += src;
-                    uflag = uflag || needUflag;
-                    i += consumed - 1;
-                    hasMagic = hasMagic || magic;
-                    continue;
-                }
-            }
-            if (c === '*') {
-                if (noEmpty && glob === '*')
-                    re += starNoEmpty;
-                else
-                    re += star;
-                hasMagic = true;
-                continue;
-            }
-            if (c === '?') {
-                re += qmark;
-                hasMagic = true;
-                continue;
-            }
-            re += regExpEscape(c);
-        }
-        return [re, unescape(glob), !!hasMagic, uflag];
-    }
-}
-//# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/brace-expressions.js b/node_modules/npm/node_modules/minimatch/dist/mjs/brace-expressions.js
deleted file mode 100644
index c629d6a..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/brace-expressions.js
+++ /dev/null
@@ -1,148 +0,0 @@
-// translate the various posix character classes into unicode properties
-// this works across all unicode locales
-// { : [, /u flag required, negated]
-const posixClasses = {
-    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
-    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
-    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
-    '[:blank:]': ['\\p{Zs}\\t', true],
-    '[:cntrl:]': ['\\p{Cc}', true],
-    '[:digit:]': ['\\p{Nd}', true],
-    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
-    '[:lower:]': ['\\p{Ll}', true],
-    '[:print:]': ['\\p{C}', true],
-    '[:punct:]': ['\\p{P}', true],
-    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
-    '[:upper:]': ['\\p{Lu}', true],
-    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
-    '[:xdigit:]': ['A-Fa-f0-9', false],
-};
-// only need to escape a few things inside of brace expressions
-// escapes: [ \ ] -
-const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
-// escape all regexp magic characters
-const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-// everything has already been escaped, we just have to join
-const rangesToString = (ranges) => ranges.join('');
-// takes a glob string at a posix brace expression, and returns
-// an equivalent regular expression source, and boolean indicating
-// whether the /u flag needs to be applied, and the number of chars
-// consumed to parse the character class.
-// This also removes out of order ranges, and returns ($.) if the
-// entire class just no good.
-export const parseClass = (glob, position) => {
-    const pos = position;
-    /* c8 ignore start */
-    if (glob.charAt(pos) !== '[') {
-        throw new Error('not in a brace expression');
-    }
-    /* c8 ignore stop */
-    const ranges = [];
-    const negs = [];
-    let i = pos + 1;
-    let sawStart = false;
-    let uflag = false;
-    let escaping = false;
-    let negate = false;
-    let endPos = pos;
-    let rangeStart = '';
-    WHILE: while (i < glob.length) {
-        const c = glob.charAt(i);
-        if ((c === '!' || c === '^') && i === pos + 1) {
-            negate = true;
-            i++;
-            continue;
-        }
-        if (c === ']' && sawStart && !escaping) {
-            endPos = i + 1;
-            break;
-        }
-        sawStart = true;
-        if (c === '\\') {
-            if (!escaping) {
-                escaping = true;
-                i++;
-                continue;
-            }
-            // escaped \ char, fall through and treat like normal char
-        }
-        if (c === '[' && !escaping) {
-            // either a posix class, a collation equivalent, or just a [
-            for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
-                if (glob.startsWith(cls, i)) {
-                    // invalid, [a-[] is fine, but not [a-[:alpha]]
-                    if (rangeStart) {
-                        return ['$.', false, glob.length - pos, true];
-                    }
-                    i += cls.length;
-                    if (neg)
-                        negs.push(unip);
-                    else
-                        ranges.push(unip);
-                    uflag = uflag || u;
-                    continue WHILE;
-                }
-            }
-        }
-        // now it's just a normal character, effectively
-        escaping = false;
-        if (rangeStart) {
-            // throw this range away if it's not valid, but others
-            // can still match.
-            if (c > rangeStart) {
-                ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
-            }
-            else if (c === rangeStart) {
-                ranges.push(braceEscape(c));
-            }
-            rangeStart = '';
-            i++;
-            continue;
-        }
-        // now might be the start of a range.
-        // can be either c-d or c-] or c] or c] at this point
-        if (glob.startsWith('-]', i + 1)) {
-            ranges.push(braceEscape(c + '-'));
-            i += 2;
-            continue;
-        }
-        if (glob.startsWith('-', i + 1)) {
-            rangeStart = c;
-            i += 2;
-            continue;
-        }
-        // not the start of a range, just a single character
-        ranges.push(braceEscape(c));
-        i++;
-    }
-    if (endPos < i) {
-        // didn't see the end of the class, not a valid class,
-        // but might still be valid as a literal match.
-        return ['', false, 0, false];
-    }
-    // if we got no ranges and no negates, then we have a range that
-    // cannot possibly match anything, and that poisons the whole glob
-    if (!ranges.length && !negs.length) {
-        return ['$.', false, glob.length - pos, true];
-    }
-    // if we got one positive range, and it's a single character, then that's
-    // not actually a magic pattern, it's just that one literal character.
-    // we should not treat that as "magic", we should just return the literal
-    // character. [_] is a perfectly valid way to escape glob magic chars.
-    if (negs.length === 0 &&
-        ranges.length === 1 &&
-        /^\\?.$/.test(ranges[0]) &&
-        !negate) {
-        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
-        return [regexpEscape(r), false, endPos - pos, false];
-    }
-    const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
-    const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
-    const comb = ranges.length && negs.length
-        ? '(' + sranges + '|' + snegs + ')'
-        : ranges.length
-            ? sranges
-            : snegs;
-    return [comb, uflag, endPos - pos, true];
-};
-//# sourceMappingURL=brace-expressions.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/escape.js b/node_modules/npm/node_modules/minimatch/dist/mjs/escape.js
deleted file mode 100644
index 16f7c8c..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/escape.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Escape all magic characters in a glob pattern.
- *
- * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
- * option is used, then characters are escaped by wrapping in `[]`, because
- * a magic character wrapped in a character class can only be satisfied by
- * that exact character.  In this mode, `\` is _not_ escaped, because it is
- * not interpreted as a magic character, but instead as a path separator.
- */
-export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
-    // don't need to escape +@! because we escape the parens
-    // that make those magic, and escaping ! as [!] isn't valid,
-    // because [!]] is a valid glob class meaning not ']'.
-    return windowsPathsNoEscape
-        ? s.replace(/[?*()[\]]/g, '[$&]')
-        : s.replace(/[?*()[\]\\]/g, '\\$&');
-};
-//# sourceMappingURL=escape.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/index.js b/node_modules/npm/node_modules/minimatch/dist/mjs/index.js
deleted file mode 100644
index 831b6a6..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/index.js
+++ /dev/null
@@ -1,995 +0,0 @@
-import expand from 'brace-expansion';
-import { assertValidPattern } from './assert-valid-pattern.js';
-import { AST } from './ast.js';
-import { escape } from './escape.js';
-import { unescape } from './unescape.js';
-export const minimatch = (p, pattern, options = {}) => {
-    assertValidPattern(pattern);
-    // shortcut: comments match nothing.
-    if (!options.nocomment && pattern.charAt(0) === '#') {
-        return false;
-    }
-    return new Minimatch(pattern, options).match(p);
-};
-// Optimized checking for the most common glob patterns.
-const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
-const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
-const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
-const starDotExtTestNocase = (ext) => {
-    ext = ext.toLowerCase();
-    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
-};
-const starDotExtTestNocaseDot = (ext) => {
-    ext = ext.toLowerCase();
-    return (f) => f.toLowerCase().endsWith(ext);
-};
-const starDotStarRE = /^\*+\.\*+$/;
-const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
-const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
-const dotStarRE = /^\.\*+$/;
-const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
-const starRE = /^\*+$/;
-const starTest = (f) => f.length !== 0 && !f.startsWith('.');
-const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
-const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
-const qmarksTestNocase = ([$0, ext = '']) => {
-    const noext = qmarksTestNoExt([$0]);
-    if (!ext)
-        return noext;
-    ext = ext.toLowerCase();
-    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
-};
-const qmarksTestNocaseDot = ([$0, ext = '']) => {
-    const noext = qmarksTestNoExtDot([$0]);
-    if (!ext)
-        return noext;
-    ext = ext.toLowerCase();
-    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
-};
-const qmarksTestDot = ([$0, ext = '']) => {
-    const noext = qmarksTestNoExtDot([$0]);
-    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
-};
-const qmarksTest = ([$0, ext = '']) => {
-    const noext = qmarksTestNoExt([$0]);
-    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
-};
-const qmarksTestNoExt = ([$0]) => {
-    const len = $0.length;
-    return (f) => f.length === len && !f.startsWith('.');
-};
-const qmarksTestNoExtDot = ([$0]) => {
-    const len = $0.length;
-    return (f) => f.length === len && f !== '.' && f !== '..';
-};
-/* c8 ignore start */
-const defaultPlatform = (typeof process === 'object' && process
-    ? (typeof process.env === 'object' &&
-        process.env &&
-        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
-        process.platform
-    : 'posix');
-const path = {
-    win32: { sep: '\\' },
-    posix: { sep: '/' },
-};
-/* c8 ignore stop */
-export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
-minimatch.sep = sep;
-export const GLOBSTAR = Symbol('globstar **');
-minimatch.GLOBSTAR = GLOBSTAR;
-// any single thing other than /
-// don't need to escape / when using new RegExp()
-const qmark = '[^/]';
-// * => any number of characters
-const 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.
-const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
-// not a ^ or / followed by a dot,
-// followed by anything, any number of times.
-const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
-export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
-minimatch.filter = filter;
-const ext = (a, b = {}) => Object.assign({}, a, b);
-export const defaults = (def) => {
-    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
-        return minimatch;
-    }
-    const orig = minimatch;
-    const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
-    return Object.assign(m, {
-        Minimatch: class Minimatch extends orig.Minimatch {
-            constructor(pattern, options = {}) {
-                super(pattern, ext(def, options));
-            }
-            static defaults(options) {
-                return orig.defaults(ext(def, options)).Minimatch;
-            }
-        },
-        AST: class AST extends orig.AST {
-            /* c8 ignore start */
-            constructor(type, parent, options = {}) {
-                super(type, parent, ext(def, options));
-            }
-            /* c8 ignore stop */
-            static fromGlob(pattern, options = {}) {
-                return orig.AST.fromGlob(pattern, ext(def, options));
-            }
-        },
-        unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
-        escape: (s, options = {}) => orig.escape(s, ext(def, options)),
-        filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
-        defaults: (options) => orig.defaults(ext(def, options)),
-        makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
-        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
-        match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
-        sep: orig.sep,
-        GLOBSTAR: GLOBSTAR,
-    });
-};
-minimatch.defaults = defaults;
-// 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
-export const braceExpand = (pattern, options = {}) => {
-    assertValidPattern(pattern);
-    // Thanks to Yeting Li  for
-    // improving this regexp to avoid a ReDOS vulnerability.
-    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
-        // shortcut. no need to expand.
-        return [pattern];
-    }
-    return expand(pattern);
-};
-minimatch.braceExpand = braceExpand;
-// 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.
-export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
-minimatch.makeRe = makeRe;
-export const match = (list, pattern, options = {}) => {
-    const mm = new Minimatch(pattern, options);
-    list = list.filter(f => mm.match(f));
-    if (mm.options.nonull && !list.length) {
-        list.push(pattern);
-    }
-    return list;
-};
-minimatch.match = match;
-// replace stuff like \* with *
-const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
-const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-export class Minimatch {
-    options;
-    set;
-    pattern;
-    windowsPathsNoEscape;
-    nonegate;
-    negate;
-    comment;
-    empty;
-    preserveMultipleSlashes;
-    partial;
-    globSet;
-    globParts;
-    nocase;
-    isWindows;
-    platform;
-    windowsNoMagicRoot;
-    regexp;
-    constructor(pattern, options = {}) {
-        assertValidPattern(pattern);
-        options = options || {};
-        this.options = options;
-        this.pattern = pattern;
-        this.platform = options.platform || defaultPlatform;
-        this.isWindows = this.platform === 'win32';
-        this.windowsPathsNoEscape =
-            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
-        if (this.windowsPathsNoEscape) {
-            this.pattern = this.pattern.replace(/\\/g, '/');
-        }
-        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
-        this.regexp = null;
-        this.negate = false;
-        this.nonegate = !!options.nonegate;
-        this.comment = false;
-        this.empty = false;
-        this.partial = !!options.partial;
-        this.nocase = !!this.options.nocase;
-        this.windowsNoMagicRoot =
-            options.windowsNoMagicRoot !== undefined
-                ? options.windowsNoMagicRoot
-                : !!(this.isWindows && this.nocase);
-        this.globSet = [];
-        this.globParts = [];
-        this.set = [];
-        // make the set of regexps etc.
-        this.make();
-    }
-    hasMagic() {
-        if (this.options.magicalBraces && this.set.length > 1) {
-            return true;
-        }
-        for (const pattern of this.set) {
-            for (const part of pattern) {
-                if (typeof part !== 'string')
-                    return true;
-            }
-        }
-        return false;
-    }
-    debug(..._) { }
-    make() {
-        const pattern = this.pattern;
-        const 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
-        this.globSet = [...new Set(this.braceExpand())];
-        if (options.debug) {
-            this.debug = (...args) => console.error(...args);
-        }
-        this.debug(this.pattern, this.globSet);
-        // 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
-        //
-        // First, we preprocess to make the glob pattern sets a bit simpler
-        // and deduped.  There are some perf-killing patterns that can cause
-        // problems with a glob walk, but we can simplify them down a bit.
-        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
-        this.globParts = this.preprocess(rawGlobParts);
-        this.debug(this.pattern, this.globParts);
-        // glob --> regexps
-        let set = this.globParts.map((s, _, __) => {
-            if (this.isWindows && this.windowsNoMagicRoot) {
-                // check if it's a drive or unc path.
-                const isUNC = s[0] === '' &&
-                    s[1] === '' &&
-                    (s[2] === '?' || !globMagic.test(s[2])) &&
-                    !globMagic.test(s[3]);
-                const isDrive = /^[a-z]:/i.test(s[0]);
-                if (isUNC) {
-                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
-                }
-                else if (isDrive) {
-                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
-                }
-            }
-            return s.map(ss => this.parse(ss));
-        });
-        this.debug(this.pattern, set);
-        // filter out everything that didn't compile properly.
-        this.set = set.filter(s => s.indexOf(false) === -1);
-        // do not treat the ? in UNC paths as magic
-        if (this.isWindows) {
-            for (let i = 0; i < this.set.length; i++) {
-                const p = this.set[i];
-                if (p[0] === '' &&
-                    p[1] === '' &&
-                    this.globParts[i][2] === '?' &&
-                    typeof p[3] === 'string' &&
-                    /^[a-z]:$/i.test(p[3])) {
-                    p[2] = '?';
-                }
-            }
-        }
-        this.debug(this.pattern, this.set);
-    }
-    // various transforms to equivalent pattern sets that are
-    // faster to process in a filesystem walk.  The goal is to
-    // eliminate what we can, and push all ** patterns as far
-    // to the right as possible, even if it increases the number
-    // of patterns that we have to process.
-    preprocess(globParts) {
-        // if we're not in globstar mode, then turn all ** into *
-        if (this.options.noglobstar) {
-            for (let i = 0; i < globParts.length; i++) {
-                for (let j = 0; j < globParts[i].length; j++) {
-                    if (globParts[i][j] === '**') {
-                        globParts[i][j] = '*';
-                    }
-                }
-            }
-        }
-        const { optimizationLevel = 1 } = this.options;
-        if (optimizationLevel >= 2) {
-            // aggressive optimization for the purpose of fs walking
-            globParts = this.firstPhasePreProcess(globParts);
-            globParts = this.secondPhasePreProcess(globParts);
-        }
-        else if (optimizationLevel >= 1) {
-            // just basic optimizations to remove some .. parts
-            globParts = this.levelOneOptimize(globParts);
-        }
-        else {
-            globParts = this.adjascentGlobstarOptimize(globParts);
-        }
-        return globParts;
-    }
-    // just get rid of adjascent ** portions
-    adjascentGlobstarOptimize(globParts) {
-        return globParts.map(parts => {
-            let gs = -1;
-            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
-                let i = gs;
-                while (parts[i + 1] === '**') {
-                    i++;
-                }
-                if (i !== gs) {
-                    parts.splice(gs, i - gs);
-                }
-            }
-            return parts;
-        });
-    }
-    // get rid of adjascent ** and resolve .. portions
-    levelOneOptimize(globParts) {
-        return globParts.map(parts => {
-            parts = parts.reduce((set, part) => {
-                const prev = set[set.length - 1];
-                if (part === '**' && prev === '**') {
-                    return set;
-                }
-                if (part === '..') {
-                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
-                        set.pop();
-                        return set;
-                    }
-                }
-                set.push(part);
-                return set;
-            }, []);
-            return parts.length === 0 ? [''] : parts;
-        });
-    }
-    levelTwoFileOptimize(parts) {
-        if (!Array.isArray(parts)) {
-            parts = this.slashSplit(parts);
-        }
-        let didSomething = false;
-        do {
-            didSomething = false;
-            // 
// -> 
/
-            if (!this.preserveMultipleSlashes) {
-                for (let i = 1; i < parts.length - 1; i++) {
-                    const p = parts[i];
-                    // don't squeeze out UNC patterns
-                    if (i === 1 && p === '' && parts[0] === '')
-                        continue;
-                    if (p === '.' || p === '') {
-                        didSomething = true;
-                        parts.splice(i, 1);
-                        i--;
-                    }
-                }
-                if (parts[0] === '.' &&
-                    parts.length === 2 &&
-                    (parts[1] === '.' || parts[1] === '')) {
-                    didSomething = true;
-                    parts.pop();
-                }
-            }
-            // 
/

/../ ->

/
-            let dd = 0;
-            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
-                const p = parts[dd - 1];
-                if (p && p !== '.' && p !== '..' && p !== '**') {
-                    didSomething = true;
-                    parts.splice(dd - 1, 2);
-                    dd -= 2;
-                }
-            }
-        } while (didSomething);
-        return parts.length === 0 ? [''] : parts;
-    }
-    // First phase: single-pattern processing
-    // 
 is 1 or more portions
-    //  is 1 or more portions
-    // 

is any portion other than ., .., '', or ** - // is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - //

// -> 
/
-    // 
/

/../ ->

/
-    // **/**/ -> **/
-    //
-    // **/*/ -> */**/ <== not valid because ** doesn't follow
-    // this WOULD be allowed if ** did follow symlinks, or * didn't
-    firstPhasePreProcess(globParts) {
-        let didSomething = false;
-        do {
-            didSomething = false;
-            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let gss = gs; - while (parts[gss + 1] === '**') { - //

/**/**/ -> 
/**/
-                        gss++;
-                    }
-                    // eg, if gs is 2 and gss is 4, that means we have 3 **
-                    // parts, and can remove 2 of them.
-                    if (gss > gs) {
-                        parts.splice(gs + 1, gss - gs);
-                    }
-                    let next = parts[gs + 1];
-                    const p = parts[gs + 2];
-                    const p2 = parts[gs + 3];
-                    if (next !== '..')
-                        continue;
-                    if (!p ||
-                        p === '.' ||
-                        p === '..' ||
-                        !p2 ||
-                        p2 === '.' ||
-                        p2 === '..') {
-                        continue;
-                    }
-                    didSomething = true;
-                    // edit parts in place, and push the new one
-                    parts.splice(gs, 1);
-                    const other = parts.slice(0);
-                    other[gs] = '**';
-                    globParts.push(other);
-                    gs--;
-                }
-                // 
// -> 
/
-                if (!this.preserveMultipleSlashes) {
-                    for (let i = 1; i < parts.length - 1; i++) {
-                        const p = parts[i];
-                        // don't squeeze out UNC patterns
-                        if (i === 1 && p === '' && parts[0] === '')
-                            continue;
-                        if (p === '.' || p === '') {
-                            didSomething = true;
-                            parts.splice(i, 1);
-                            i--;
-                        }
-                    }
-                    if (parts[0] === '.' &&
-                        parts.length === 2 &&
-                        (parts[1] === '.' || parts[1] === '')) {
-                        didSomething = true;
-                        parts.pop();
-                    }
-                }
-                // 
/

/../ ->

/
-                let dd = 0;
-                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
-                    const p = parts[dd - 1];
-                    if (p && p !== '.' && p !== '..' && p !== '**') {
-                        didSomething = true;
-                        const needDot = dd === 1 && parts[dd + 1] === '**';
-                        const splin = needDot ? ['.'] : [];
-                        parts.splice(dd - 1, 2, ...splin);
-                        if (parts.length === 0)
-                            parts.push('');
-                        dd -= 2;
-                    }
-                }
-            }
-        } while (didSomething);
-        return globParts;
-    }
-    // second phase: multi-pattern dedupes
-    // {
/*/,
/

/} ->

/*/
-    // {
/,
/} -> 
/
-    // {
/**/,
/} -> 
/**/
-    //
-    // {
/**/,
/**/

/} ->

/**/
-    // ^-- not valid because ** doens't follow symlinks
-    secondPhasePreProcess(globParts) {
-        for (let i = 0; i < globParts.length - 1; i++) {
-            for (let j = i + 1; j < globParts.length; j++) {
-                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
-                if (!matched)
-                    continue;
-                globParts[i] = matched;
-                globParts[j] = [];
-            }
-        }
-        return globParts.filter(gs => gs.length);
-    }
-    partsMatch(a, b, emptyGSMatch = false) {
-        let ai = 0;
-        let bi = 0;
-        let result = [];
-        let which = '';
-        while (ai < a.length && bi < b.length) {
-            if (a[ai] === b[bi]) {
-                result.push(which === 'b' ? b[bi] : a[ai]);
-                ai++;
-                bi++;
-            }
-            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
-                result.push(a[ai]);
-                ai++;
-            }
-            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
-                result.push(b[bi]);
-                bi++;
-            }
-            else if (a[ai] === '*' &&
-                b[bi] &&
-                (this.options.dot || !b[bi].startsWith('.')) &&
-                b[bi] !== '**') {
-                if (which === 'b')
-                    return false;
-                which = 'a';
-                result.push(a[ai]);
-                ai++;
-                bi++;
-            }
-            else if (b[bi] === '*' &&
-                a[ai] &&
-                (this.options.dot || !a[ai].startsWith('.')) &&
-                a[ai] !== '**') {
-                if (which === 'a')
-                    return false;
-                which = 'b';
-                result.push(b[bi]);
-                ai++;
-                bi++;
-            }
-            else {
-                return false;
-            }
-        }
-        // if we fall out of the loop, it means they two are identical
-        // as long as their lengths match
-        return a.length === b.length && result;
-    }
-    parseNegate() {
-        if (this.nonegate)
-            return;
-        const pattern = this.pattern;
-        let negate = false;
-        let negateOffset = 0;
-        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
-            negate = !negate;
-            negateOffset++;
-        }
-        if (negateOffset)
-            this.pattern = pattern.slice(negateOffset);
-        this.negate = 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.
-    matchOne(file, pattern, partial = false) {
-        const options = this.options;
-        // UNC paths like //?/X:/... can match X:/... and vice versa
-        // Drive letters in absolute drive or unc paths are always compared
-        // case-insensitively.
-        if (this.isWindows) {
-            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
-            const fileUNC = !fileDrive &&
-                file[0] === '' &&
-                file[1] === '' &&
-                file[2] === '?' &&
-                /^[a-z]:$/i.test(file[3]);
-            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
-            const patternUNC = !patternDrive &&
-                pattern[0] === '' &&
-                pattern[1] === '' &&
-                pattern[2] === '?' &&
-                typeof pattern[3] === 'string' &&
-                /^[a-z]:$/i.test(pattern[3]);
-            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
-            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
-            if (typeof fdi === 'number' && typeof pdi === 'number') {
-                const [fd, pd] = [file[fdi], pattern[pdi]];
-                if (fd.toLowerCase() === pd.toLowerCase()) {
-                    pattern[pdi] = fd;
-                    if (pdi > fdi) {
-                        pattern = pattern.slice(pdi);
-                    }
-                    else if (fdi > pdi) {
-                        file = file.slice(fdi);
-                    }
-                }
-            }
-        }
-        // resolve and reduce . and .. portions in the file as well.
-        // dont' need to do the second phase, because it's only one string[]
-        const { optimizationLevel = 1 } = this.options;
-        if (optimizationLevel >= 2) {
-            file = this.levelTwoFileOptimize(file);
-        }
-        this.debug('matchOne', this, { file, 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.
-            /* c8 ignore start */
-            if (p === false) {
-                return false;
-            }
-            /* c8 ignore stop */
-            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.
-                /* c8 ignore start */
-                if (partial) {
-                    // ran out of file
-                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
-                    if (fr === fl) {
-                        return true;
-                    }
-                }
-                /* c8 ignore stop */
-                return false;
-            }
-            // something other than **
-            // non-magic patterns just have to match exactly
-            // patterns with magic have been turned into regexps.
-            let hit;
-            if (typeof p === 'string') {
-                hit = f === p;
-                this.debug('string match', p, f, hit);
-            }
-            else {
-                hit = p.test(f);
-                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/
-            return fi === fl - 1 && file[fi] === '';
-            /* c8 ignore start */
-        }
-        else {
-            // should be unreachable.
-            throw new Error('wtf?');
-        }
-        /* c8 ignore stop */
-    }
-    braceExpand() {
-        return braceExpand(this.pattern, this.options);
-    }
-    parse(pattern) {
-        assertValidPattern(pattern);
-        const options = this.options;
-        // shortcuts
-        if (pattern === '**')
-            return GLOBSTAR;
-        if (pattern === '')
-            return '';
-        // far and away, the most common glob pattern parts are
-        // *, *.*, and *.  Add a fast check method for those.
-        let m;
-        let fastTest = null;
-        if ((m = pattern.match(starRE))) {
-            fastTest = options.dot ? starTestDot : starTest;
-        }
-        else if ((m = pattern.match(starDotExtRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? starDotExtTestNocaseDot
-                    : starDotExtTestNocase
-                : options.dot
-                    ? starDotExtTestDot
-                    : starDotExtTest)(m[1]);
-        }
-        else if ((m = pattern.match(qmarksRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? qmarksTestNocaseDot
-                    : qmarksTestNocase
-                : options.dot
-                    ? qmarksTestDot
-                    : qmarksTest)(m);
-        }
-        else if ((m = pattern.match(starDotStarRE))) {
-            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
-        }
-        else if ((m = pattern.match(dotStarRE))) {
-            fastTest = dotStarTest;
-        }
-        const re = AST.fromGlob(pattern, this.options).toMMPattern();
-        return fastTest ? Object.assign(re, { test: fastTest }) : re;
-    }
-    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.
-        const set = this.set;
-        if (!set.length) {
-            this.regexp = false;
-            return this.regexp;
-        }
-        const options = this.options;
-        const twoStar = options.noglobstar
-            ? star
-            : options.dot
-                ? twoStarDot
-                : twoStarNoDot;
-        const flags = new Set(options.nocase ? ['i'] : []);
-        // regexpify non-globstar patterns
-        // if ** is only item, then we just do one twoStar
-        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
-        // if ** is last, append (\/twoStar|) to previous
-        // if ** is in the middle, append (\/|\/twoStar\/) to previous
-        // then filter out GLOBSTAR symbols
-        let re = set
-            .map(pattern => {
-            const pp = pattern.map(p => {
-                if (p instanceof RegExp) {
-                    for (const f of p.flags.split(''))
-                        flags.add(f);
-                }
-                return typeof p === 'string'
-                    ? regExpEscape(p)
-                    : p === GLOBSTAR
-                        ? GLOBSTAR
-                        : p._src;
-            });
-            pp.forEach((p, i) => {
-                const next = pp[i + 1];
-                const prev = pp[i - 1];
-                if (p !== GLOBSTAR || prev === GLOBSTAR) {
-                    return;
-                }
-                if (prev === undefined) {
-                    if (next !== undefined && next !== GLOBSTAR) {
-                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
-                    }
-                    else {
-                        pp[i] = twoStar;
-                    }
-                }
-                else if (next === undefined) {
-                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
-                }
-                else if (next !== GLOBSTAR) {
-                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
-                    pp[i + 1] = GLOBSTAR;
-                }
-            });
-            return pp.filter(p => p !== GLOBSTAR).join('/');
-        })
-            .join('|');
-        // need to wrap in parens if we had more than one thing with |,
-        // otherwise only the first will be anchored to ^ and the last to $
-        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
-        // must match entire pattern
-        // ending in a * or ** will make it less strict.
-        re = '^' + open + re + close + '$';
-        // can match anything, as long as it's not this.
-        if (this.negate)
-            re = '^(?!' + re + ').+$';
-        try {
-            this.regexp = new RegExp(re, [...flags].join(''));
-            /* c8 ignore start */
-        }
-        catch (ex) {
-            // should be impossible
-            this.regexp = false;
-        }
-        /* c8 ignore stop */
-        return this.regexp;
-    }
-    slashSplit(p) {
-        // if p starts with // on windows, we preserve that
-        // so that UNC paths aren't broken.  Otherwise, any number of
-        // / characters are coalesced into one, unless
-        // preserveMultipleSlashes is set to true.
-        if (this.preserveMultipleSlashes) {
-            return p.split('/');
-        }
-        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
-            // add an extra '' for the one we lose
-            return ['', ...p.split(/\/+/)];
-        }
-        else {
-            return p.split(/\/+/);
-        }
-    }
-    match(f, partial = this.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;
-        }
-        const options = this.options;
-        // windows: need to use /, not \
-        if (this.isWindows) {
-            f = f.split('\\').join('/');
-        }
-        // treat the test path as a set of pathparts.
-        const ff = this.slashSplit(f);
-        this.debug(this.pattern, 'split', ff);
-        // 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.
-        const set = this.set;
-        this.debug(this.pattern, 'set', set);
-        // Find the basename of the path by looking for the last non-empty segment
-        let filename = ff[ff.length - 1];
-        if (!filename) {
-            for (let i = ff.length - 2; !filename && i >= 0; i--) {
-                filename = ff[i];
-            }
-        }
-        for (let i = 0; i < set.length; i++) {
-            const pattern = set[i];
-            let file = ff;
-            if (options.matchBase && pattern.length === 1) {
-                file = [filename];
-            }
-            const 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;
-    }
-    static defaults(def) {
-        return minimatch.defaults(def).Minimatch;
-    }
-}
-/* c8 ignore start */
-export { AST } from './ast.js';
-export { escape } from './escape.js';
-export { unescape } from './unescape.js';
-/* c8 ignore stop */
-minimatch.AST = AST;
-minimatch.Minimatch = Minimatch;
-minimatch.escape = escape;
-minimatch.unescape = unescape;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/package.json b/node_modules/npm/node_modules/minimatch/dist/mjs/package.json
deleted file mode 100644
index 3dbc1ca..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "type": "module"
-}
diff --git a/node_modules/npm/node_modules/minimatch/dist/mjs/unescape.js b/node_modules/npm/node_modules/minimatch/dist/mjs/unescape.js
deleted file mode 100644
index 0faf9a2..0000000
--- a/node_modules/npm/node_modules/minimatch/dist/mjs/unescape.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Un-escape a string that has been escaped with {@link escape}.
- *
- * If the {@link windowsPathsNoEscape} option is used, then square-brace
- * escapes are removed, but not backslash escapes.  For example, it will turn
- * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
- * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
- *
- * When `windowsPathsNoEscape` is not set, then both brace escapes and
- * backslash escapes are removed.
- *
- * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
- * or unescaped.
- */
-export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
-    return windowsPathsNoEscape
-        ? s.replace(/\[([^\/\\])\]/g, '$1')
-        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
-};
-//# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minimatch/package.json b/node_modules/npm/node_modules/minimatch/package.json
deleted file mode 100644
index 061c3b9..0000000
--- a/node_modules/npm/node_modules/minimatch/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me)",
-  "name": "minimatch",
-  "description": "a glob matcher in javascript",
-  "version": "9.0.3",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/isaacs/minimatch.git"
-  },
-  "main": "./dist/cjs/index.js",
-  "module": "./dist/mjs/index.js",
-  "types": "./dist/cjs/index.d.ts",
-  "exports": {
-    ".": {
-      "import": {
-        "types": "./dist/mjs/index.d.ts",
-        "default": "./dist/mjs/index.js"
-      },
-      "require": {
-        "types": "./dist/cjs/index.d.ts",
-        "default": "./dist/cjs/index.js"
-      }
-    }
-  },
-  "files": [
-    "dist"
-  ],
-  "scripts": {
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags",
-    "preprepare": "rm -rf dist",
-    "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
-    "postprepare": "bash fixup.sh",
-    "pretest": "npm run prepare",
-    "presnap": "npm run prepare",
-    "test": "c8 tap",
-    "snap": "c8 tap",
-    "format": "prettier --write . --loglevel warn",
-    "benchmark": "node benchmark/index.js",
-    "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  },
-  "engines": {
-    "node": ">=16 || 14 >=14.17"
-  },
-  "dependencies": {
-    "brace-expansion": "^2.0.1"
-  },
-  "devDependencies": {
-    "@types/brace-expansion": "^1.1.0",
-    "@types/node": "^18.15.11",
-    "@types/tap": "^15.0.8",
-    "c8": "^7.12.0",
-    "eslint-config-prettier": "^8.6.0",
-    "mkdirp": "1",
-    "prettier": "^2.8.2",
-    "tap": "^16.3.7",
-    "ts-node": "^10.9.1",
-    "typedoc": "^0.23.21",
-    "typescript": "^4.9.3"
-  },
-  "tap": {
-    "coverage": false,
-    "node-arg": [
-      "--no-warnings",
-      "--loader",
-      "ts-node/esm"
-    ],
-    "ts": false
-  },
-  "funding": {
-    "url": "https://github.com/sponsors/isaacs"
-  },
-  "license": "ISC"
-}
diff --git a/node_modules/npm/node_modules/minipass-collect/LICENSE b/node_modules/npm/node_modules/minipass-collect/LICENSE
deleted file mode 100644
index 8b8575a..0000000
--- a/node_modules/npm/node_modules/minipass-collect/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2019-2023 Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-collect/index.js b/node_modules/npm/node_modules/minipass-collect/index.js
deleted file mode 100644
index 3497f55..0000000
--- a/node_modules/npm/node_modules/minipass-collect/index.js
+++ /dev/null
@@ -1,71 +0,0 @@
-const { Minipass } = require('minipass')
-const _data = Symbol('_data')
-const _length = Symbol('_length')
-class Collect extends Minipass {
-  constructor (options) {
-    super(options)
-    this[_data] = []
-    this[_length] = 0
-  }
-  write (chunk, encoding, cb) {
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding)
-    this[_data].push(c)
-    this[_length] += c.length
-    if (cb)
-      cb()
-    return true
-  }
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    const result = Buffer.concat(this[_data], this[_length])
-    super.write(result)
-    return super.end(cb)
-  }
-}
-module.exports = Collect
-
-// it would be possible to DRY this a bit by doing something like
-// this.collector = new Collect() and listening on its data event,
-// but it's not much code, and we may as well save the extra obj
-class CollectPassThrough extends Minipass {
-  constructor (options) {
-    super(options)
-    this[_data] = []
-    this[_length] = 0
-  }
-  write (chunk, encoding, cb) {
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const c = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, encoding)
-    this[_data].push(c)
-    this[_length] += c.length
-    return super.write(chunk, encoding, cb)
-  }
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    const result = Buffer.concat(this[_data], this[_length])
-    this.emit('collect', result)
-    return super.end(cb)
-  }
-}
-module.exports.PassThrough = CollectPassThrough
diff --git a/node_modules/npm/node_modules/minipass-collect/package.json b/node_modules/npm/node_modules/minipass-collect/package.json
deleted file mode 100644
index f9daa81..0000000
--- a/node_modules/npm/node_modules/minipass-collect/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "name": "minipass-collect",
-  "version": "2.0.1",
-  "description": "A Minipass stream that collects all the data into a single chunk",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^16.3.8"
-  },
-  "dependencies": {
-    "minipass": "^7.0.3"
-  },
-  "files": [
-    "index.js"
-  ],
-  "engines": {
-    "node": ">=16 || 14 >=14.17"
-  },
-  "repository": "https://github.com/isaacs/minipass-collect"
-}
diff --git a/node_modules/npm/node_modules/minipass-fetch/LICENSE b/node_modules/npm/node_modules/minipass-fetch/LICENSE
deleted file mode 100644
index 3c3410c..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-Copyright (c) 2016 David Frank
-
-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: This is a derivative work based on "node-fetch" by David Frank,
-modified and distributed under the terms of the MIT license above.
-https://github.com/bitinn/node-fetch
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/abort-error.js b/node_modules/npm/node_modules/minipass-fetch/lib/abort-error.js
deleted file mode 100644
index b18f643..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/abort-error.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict'
-class AbortError extends Error {
-  constructor (message) {
-    super(message)
-    this.code = 'FETCH_ABORTED'
-    this.type = 'aborted'
-    Error.captureStackTrace(this, this.constructor)
-  }
-
-  get name () {
-    return 'AbortError'
-  }
-
-  // don't allow name to be overridden, but don't throw either
-  set name (s) {}
-}
-module.exports = AbortError
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/blob.js b/node_modules/npm/node_modules/minipass-fetch/lib/blob.js
deleted file mode 100644
index 121b173..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/blob.js
+++ /dev/null
@@ -1,97 +0,0 @@
-'use strict'
-const { Minipass } = require('minipass')
-const TYPE = Symbol('type')
-const BUFFER = Symbol('buffer')
-
-class Blob {
-  constructor (blobParts, options) {
-    this[TYPE] = ''
-
-    const buffers = []
-    let size = 0
-
-    if (blobParts) {
-      const a = blobParts
-      const length = Number(a.length)
-      for (let i = 0; i < length; i++) {
-        const element = a[i]
-        const buffer = element instanceof Buffer ? element
-          : ArrayBuffer.isView(element)
-            ? Buffer.from(element.buffer, element.byteOffset, element.byteLength)
-            : element instanceof ArrayBuffer ? Buffer.from(element)
-            : element instanceof Blob ? element[BUFFER]
-            : typeof element === 'string' ? Buffer.from(element)
-            : Buffer.from(String(element))
-        size += buffer.length
-        buffers.push(buffer)
-      }
-    }
-
-    this[BUFFER] = Buffer.concat(buffers, size)
-
-    const type = options && options.type !== undefined
-      && String(options.type).toLowerCase()
-    if (type && !/[^\u0020-\u007E]/.test(type)) {
-      this[TYPE] = type
-    }
-  }
-
-  get size () {
-    return this[BUFFER].length
-  }
-
-  get type () {
-    return this[TYPE]
-  }
-
-  text () {
-    return Promise.resolve(this[BUFFER].toString())
-  }
-
-  arrayBuffer () {
-    const buf = this[BUFFER]
-    const off = buf.byteOffset
-    const len = buf.byteLength
-    const ab = buf.buffer.slice(off, off + len)
-    return Promise.resolve(ab)
-  }
-
-  stream () {
-    return new Minipass().end(this[BUFFER])
-  }
-
-  slice (start, end, type) {
-    const size = this.size
-    const relativeStart = start === undefined ? 0
-      : start < 0 ? Math.max(size + start, 0)
-      : Math.min(start, size)
-    const relativeEnd = end === undefined ? size
-      : end < 0 ? Math.max(size + end, 0)
-      : Math.min(end, size)
-    const span = Math.max(relativeEnd - relativeStart, 0)
-
-    const buffer = this[BUFFER]
-    const slicedBuffer = buffer.slice(
-      relativeStart,
-      relativeStart + span
-    )
-    const blob = new Blob([], { type })
-    blob[BUFFER] = slicedBuffer
-    return blob
-  }
-
-  get [Symbol.toStringTag] () {
-    return 'Blob'
-  }
-
-  static get BUFFER () {
-    return BUFFER
-  }
-}
-
-Object.defineProperties(Blob.prototype, {
-  size: { enumerable: true },
-  type: { enumerable: true },
-})
-
-module.exports = Blob
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/body.js b/node_modules/npm/node_modules/minipass-fetch/lib/body.js
deleted file mode 100644
index 6a517a2..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/body.js
+++ /dev/null
@@ -1,350 +0,0 @@
-'use strict'
-const { Minipass } = require('minipass')
-const MinipassSized = require('minipass-sized')
-
-const Blob = require('./blob.js')
-const { BUFFER } = Blob
-const FetchError = require('./fetch-error.js')
-
-// optional dependency on 'encoding'
-let convert
-try {
-  convert = require('encoding').convert
-} catch (e) {
-  // defer error until textConverted is called
-}
-
-const INTERNALS = Symbol('Body internals')
-const CONSUME_BODY = Symbol('consumeBody')
-
-class Body {
-  constructor (bodyArg, options = {}) {
-    const { size = 0, timeout = 0 } = options
-    const body = bodyArg === undefined || bodyArg === null ? null
-      : isURLSearchParams(bodyArg) ? Buffer.from(bodyArg.toString())
-      : isBlob(bodyArg) ? bodyArg
-      : Buffer.isBuffer(bodyArg) ? bodyArg
-      : Object.prototype.toString.call(bodyArg) === '[object ArrayBuffer]'
-        ? Buffer.from(bodyArg)
-        : ArrayBuffer.isView(bodyArg)
-          ? Buffer.from(bodyArg.buffer, bodyArg.byteOffset, bodyArg.byteLength)
-          : Minipass.isStream(bodyArg) ? bodyArg
-          : Buffer.from(String(bodyArg))
-
-    this[INTERNALS] = {
-      body,
-      disturbed: false,
-      error: null,
-    }
-
-    this.size = size
-    this.timeout = timeout
-
-    if (Minipass.isStream(body)) {
-      body.on('error', er => {
-        const error = er.name === 'AbortError' ? er
-          : new FetchError(`Invalid response while trying to fetch ${
-            this.url}: ${er.message}`, 'system', er)
-        this[INTERNALS].error = error
-      })
-    }
-  }
-
-  get body () {
-    return this[INTERNALS].body
-  }
-
-  get bodyUsed () {
-    return this[INTERNALS].disturbed
-  }
-
-  arrayBuffer () {
-    return this[CONSUME_BODY]().then(buf =>
-      buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength))
-  }
-
-  blob () {
-    const ct = this.headers && this.headers.get('content-type') || ''
-    return this[CONSUME_BODY]().then(buf => Object.assign(
-      new Blob([], { type: ct.toLowerCase() }),
-      { [BUFFER]: buf }
-    ))
-  }
-
-  async json () {
-    const buf = await this[CONSUME_BODY]()
-    try {
-      return JSON.parse(buf.toString())
-    } catch (er) {
-      throw new FetchError(
-        `invalid json response body at ${this.url} reason: ${er.message}`,
-        'invalid-json'
-      )
-    }
-  }
-
-  text () {
-    return this[CONSUME_BODY]().then(buf => buf.toString())
-  }
-
-  buffer () {
-    return this[CONSUME_BODY]()
-  }
-
-  textConverted () {
-    return this[CONSUME_BODY]().then(buf => convertBody(buf, this.headers))
-  }
-
-  [CONSUME_BODY] () {
-    if (this[INTERNALS].disturbed) {
-      return Promise.reject(new TypeError(`body used already for: ${
-        this.url}`))
-    }
-
-    this[INTERNALS].disturbed = true
-
-    if (this[INTERNALS].error) {
-      return Promise.reject(this[INTERNALS].error)
-    }
-
-    // body is null
-    if (this.body === null) {
-      return Promise.resolve(Buffer.alloc(0))
-    }
-
-    if (Buffer.isBuffer(this.body)) {
-      return Promise.resolve(this.body)
-    }
-
-    const upstream = isBlob(this.body) ? this.body.stream() : this.body
-
-    /* istanbul ignore if: should never happen */
-    if (!Minipass.isStream(upstream)) {
-      return Promise.resolve(Buffer.alloc(0))
-    }
-
-    const stream = this.size && upstream instanceof MinipassSized ? upstream
-      : !this.size && upstream instanceof Minipass &&
-        !(upstream instanceof MinipassSized) ? upstream
-      : this.size ? new MinipassSized({ size: this.size })
-      : new Minipass()
-
-    // allow timeout on slow response body, but only if the stream is still writable. this
-    // makes the timeout center on the socket stream from lib/index.js rather than the
-    // intermediary minipass stream we create to receive the data
-    const resTimeout = this.timeout && stream.writable ? setTimeout(() => {
-      stream.emit('error', new FetchError(
-        `Response timeout while trying to fetch ${
-          this.url} (over ${this.timeout}ms)`, 'body-timeout'))
-    }, this.timeout) : null
-
-    // do not keep the process open just for this timeout, even
-    // though we expect it'll get cleared eventually.
-    if (resTimeout && resTimeout.unref) {
-      resTimeout.unref()
-    }
-
-    // do the pipe in the promise, because the pipe() can send too much
-    // data through right away and upset the MP Sized object
-    return new Promise((resolve, reject) => {
-      // if the stream is some other kind of stream, then pipe through a MP
-      // so we can collect it more easily.
-      if (stream !== upstream) {
-        upstream.on('error', er => stream.emit('error', er))
-        upstream.pipe(stream)
-      }
-      resolve()
-    }).then(() => stream.concat()).then(buf => {
-      clearTimeout(resTimeout)
-      return buf
-    }).catch(er => {
-      clearTimeout(resTimeout)
-      // request was aborted, reject with this Error
-      if (er.name === 'AbortError' || er.name === 'FetchError') {
-        throw er
-      } else if (er.name === 'RangeError') {
-        throw new FetchError(`Could not create Buffer from response body for ${
-          this.url}: ${er.message}`, 'system', er)
-      } else {
-        // other errors, such as incorrect content-encoding or content-length
-        throw new FetchError(`Invalid response body while trying to fetch ${
-          this.url}: ${er.message}`, 'system', er)
-      }
-    })
-  }
-
-  static clone (instance) {
-    if (instance.bodyUsed) {
-      throw new Error('cannot clone body after it is used')
-    }
-
-    const body = instance.body
-
-    // check that body is a stream and not form-data object
-    // NB: can't clone the form-data object without having it as a dependency
-    if (Minipass.isStream(body) && typeof body.getBoundary !== 'function') {
-      // create a dedicated tee stream so that we don't lose data
-      // potentially sitting in the body stream's buffer by writing it
-      // immediately to p1 and not having it for p2.
-      const tee = new Minipass()
-      const p1 = new Minipass()
-      const p2 = new Minipass()
-      tee.on('error', er => {
-        p1.emit('error', er)
-        p2.emit('error', er)
-      })
-      body.on('error', er => tee.emit('error', er))
-      tee.pipe(p1)
-      tee.pipe(p2)
-      body.pipe(tee)
-      // set instance body to one fork, return the other
-      instance[INTERNALS].body = p1
-      return p2
-    } else {
-      return instance.body
-    }
-  }
-
-  static extractContentType (body) {
-    return body === null || body === undefined ? null
-      : typeof body === 'string' ? 'text/plain;charset=UTF-8'
-      : isURLSearchParams(body)
-        ? 'application/x-www-form-urlencoded;charset=UTF-8'
-        : isBlob(body) ? body.type || null
-        : Buffer.isBuffer(body) ? null
-        : Object.prototype.toString.call(body) === '[object ArrayBuffer]' ? null
-        : ArrayBuffer.isView(body) ? null
-        : typeof body.getBoundary === 'function'
-          ? `multipart/form-data;boundary=${body.getBoundary()}`
-          : Minipass.isStream(body) ? null
-          : 'text/plain;charset=UTF-8'
-  }
-
-  static getTotalBytes (instance) {
-    const { body } = instance
-    return (body === null || body === undefined) ? 0
-      : isBlob(body) ? body.size
-      : Buffer.isBuffer(body) ? body.length
-      : body && typeof body.getLengthSync === 'function' && (
-        // detect form data input from form-data module
-        body._lengthRetrievers &&
-        /* istanbul ignore next */ body._lengthRetrievers.length === 0 || // 1.x
-        body.hasKnownLength && body.hasKnownLength()) // 2.x
-        ? body.getLengthSync()
-        : null
-  }
-
-  static writeToStream (dest, instance) {
-    const { body } = instance
-
-    if (body === null || body === undefined) {
-      dest.end()
-    } else if (Buffer.isBuffer(body) || typeof body === 'string') {
-      dest.end(body)
-    } else {
-      // body is stream or blob
-      const stream = isBlob(body) ? body.stream() : body
-      stream.on('error', er => dest.emit('error', er)).pipe(dest)
-    }
-
-    return dest
-  }
-}
-
-Object.defineProperties(Body.prototype, {
-  body: { enumerable: true },
-  bodyUsed: { enumerable: true },
-  arrayBuffer: { enumerable: true },
-  blob: { enumerable: true },
-  json: { enumerable: true },
-  text: { enumerable: true },
-})
-
-const isURLSearchParams = obj =>
-  // Duck-typing as a necessary condition.
-  (typeof obj !== 'object' ||
-    typeof obj.append !== 'function' ||
-    typeof obj.delete !== 'function' ||
-    typeof obj.get !== 'function' ||
-    typeof obj.getAll !== 'function' ||
-    typeof obj.has !== 'function' ||
-    typeof obj.set !== 'function') ? false
-  // Brand-checking and more duck-typing as optional condition.
-  : obj.constructor.name === 'URLSearchParams' ||
-    Object.prototype.toString.call(obj) === '[object URLSearchParams]' ||
-    typeof obj.sort === 'function'
-
-const isBlob = obj =>
-  typeof obj === 'object' &&
-  typeof obj.arrayBuffer === 'function' &&
-  typeof obj.type === 'string' &&
-  typeof obj.stream === 'function' &&
-  typeof obj.constructor === 'function' &&
-  typeof obj.constructor.name === 'string' &&
-  /^(Blob|File)$/.test(obj.constructor.name) &&
-  /^(Blob|File)$/.test(obj[Symbol.toStringTag])
-
-const convertBody = (buffer, headers) => {
-  /* istanbul ignore if */
-  if (typeof convert !== 'function') {
-    throw new Error('The package `encoding` must be installed to use the textConverted() function')
-  }
-
-  const ct = headers && headers.get('content-type')
-  let charset = 'utf-8'
-  let res
-
-  // header
-  if (ct) {
-    res = /charset=([^;]*)/i.exec(ct)
-  }
-
-  // no charset in content type, peek at response body for at most 1024 bytes
-  const str = buffer.slice(0, 1024).toString()
-
-  // html5
-  if (!res && str) {
-    res = / this.expect
-      ? 'max-size' : type
-    this.message = message
-    Error.captureStackTrace(this, this.constructor)
-  }
-
-  get name () {
-    return 'FetchError'
-  }
-
-  // don't allow name to be overwritten
-  set name (n) {}
-
-  get [Symbol.toStringTag] () {
-    return 'FetchError'
-  }
-}
-module.exports = FetchError
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/headers.js b/node_modules/npm/node_modules/minipass-fetch/lib/headers.js
deleted file mode 100644
index dd6e854..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/headers.js
+++ /dev/null
@@ -1,267 +0,0 @@
-'use strict'
-const invalidTokenRegex = /[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/
-const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/
-
-const validateName = name => {
-  name = `${name}`
-  if (invalidTokenRegex.test(name) || name === '') {
-    throw new TypeError(`${name} is not a legal HTTP header name`)
-  }
-}
-
-const validateValue = value => {
-  value = `${value}`
-  if (invalidHeaderCharRegex.test(value)) {
-    throw new TypeError(`${value} is not a legal HTTP header value`)
-  }
-}
-
-const find = (map, name) => {
-  name = name.toLowerCase()
-  for (const key in map) {
-    if (key.toLowerCase() === name) {
-      return key
-    }
-  }
-  return undefined
-}
-
-const MAP = Symbol('map')
-class Headers {
-  constructor (init = undefined) {
-    this[MAP] = Object.create(null)
-    if (init instanceof Headers) {
-      const rawHeaders = init.raw()
-      const headerNames = Object.keys(rawHeaders)
-      for (const headerName of headerNames) {
-        for (const value of rawHeaders[headerName]) {
-          this.append(headerName, value)
-        }
-      }
-      return
-    }
-
-    // no-op
-    if (init === undefined || init === null) {
-      return
-    }
-
-    if (typeof init === 'object') {
-      const method = init[Symbol.iterator]
-      if (method !== null && method !== undefined) {
-        if (typeof method !== 'function') {
-          throw new TypeError('Header pairs must be iterable')
-        }
-
-        // sequence>
-        // Note: per spec we have to first exhaust the lists then process them
-        const pairs = []
-        for (const pair of init) {
-          if (typeof pair !== 'object' ||
-              typeof pair[Symbol.iterator] !== 'function') {
-            throw new TypeError('Each header pair must be iterable')
-          }
-          const arrPair = Array.from(pair)
-          if (arrPair.length !== 2) {
-            throw new TypeError('Each header pair must be a name/value tuple')
-          }
-          pairs.push(arrPair)
-        }
-
-        for (const pair of pairs) {
-          this.append(pair[0], pair[1])
-        }
-      } else {
-        // record
-        for (const key of Object.keys(init)) {
-          this.append(key, init[key])
-        }
-      }
-    } else {
-      throw new TypeError('Provided initializer must be an object')
-    }
-  }
-
-  get (name) {
-    name = `${name}`
-    validateName(name)
-    const key = find(this[MAP], name)
-    if (key === undefined) {
-      return null
-    }
-
-    return this[MAP][key].join(', ')
-  }
-
-  forEach (callback, thisArg = undefined) {
-    let pairs = getHeaders(this)
-    for (let i = 0; i < pairs.length; i++) {
-      const [name, value] = pairs[i]
-      callback.call(thisArg, value, name, this)
-      // refresh in case the callback added more headers
-      pairs = getHeaders(this)
-    }
-  }
-
-  set (name, value) {
-    name = `${name}`
-    value = `${value}`
-    validateName(name)
-    validateValue(value)
-    const key = find(this[MAP], name)
-    this[MAP][key !== undefined ? key : name] = [value]
-  }
-
-  append (name, value) {
-    name = `${name}`
-    value = `${value}`
-    validateName(name)
-    validateValue(value)
-    const key = find(this[MAP], name)
-    if (key !== undefined) {
-      this[MAP][key].push(value)
-    } else {
-      this[MAP][name] = [value]
-    }
-  }
-
-  has (name) {
-    name = `${name}`
-    validateName(name)
-    return find(this[MAP], name) !== undefined
-  }
-
-  delete (name) {
-    name = `${name}`
-    validateName(name)
-    const key = find(this[MAP], name)
-    if (key !== undefined) {
-      delete this[MAP][key]
-    }
-  }
-
-  raw () {
-    return this[MAP]
-  }
-
-  keys () {
-    return new HeadersIterator(this, 'key')
-  }
-
-  values () {
-    return new HeadersIterator(this, 'value')
-  }
-
-  [Symbol.iterator] () {
-    return new HeadersIterator(this, 'key+value')
-  }
-
-  entries () {
-    return new HeadersIterator(this, 'key+value')
-  }
-
-  get [Symbol.toStringTag] () {
-    return 'Headers'
-  }
-
-  static exportNodeCompatibleHeaders (headers) {
-    const obj = Object.assign(Object.create(null), headers[MAP])
-
-    // http.request() only supports string as Host header. This hack makes
-    // specifying custom Host header possible.
-    const hostHeaderKey = find(headers[MAP], 'Host')
-    if (hostHeaderKey !== undefined) {
-      obj[hostHeaderKey] = obj[hostHeaderKey][0]
-    }
-
-    return obj
-  }
-
-  static createHeadersLenient (obj) {
-    const headers = new Headers()
-    for (const name of Object.keys(obj)) {
-      if (invalidTokenRegex.test(name)) {
-        continue
-      }
-
-      if (Array.isArray(obj[name])) {
-        for (const val of obj[name]) {
-          if (invalidHeaderCharRegex.test(val)) {
-            continue
-          }
-
-          if (headers[MAP][name] === undefined) {
-            headers[MAP][name] = [val]
-          } else {
-            headers[MAP][name].push(val)
-          }
-        }
-      } else if (!invalidHeaderCharRegex.test(obj[name])) {
-        headers[MAP][name] = [obj[name]]
-      }
-    }
-    return headers
-  }
-}
-
-Object.defineProperties(Headers.prototype, {
-  get: { enumerable: true },
-  forEach: { enumerable: true },
-  set: { enumerable: true },
-  append: { enumerable: true },
-  has: { enumerable: true },
-  delete: { enumerable: true },
-  keys: { enumerable: true },
-  values: { enumerable: true },
-  entries: { enumerable: true },
-})
-
-const getHeaders = (headers, kind = 'key+value') =>
-  Object.keys(headers[MAP]).sort().map(
-    kind === 'key' ? k => k.toLowerCase()
-    : kind === 'value' ? k => headers[MAP][k].join(', ')
-    : k => [k.toLowerCase(), headers[MAP][k].join(', ')]
-  )
-
-const INTERNAL = Symbol('internal')
-
-class HeadersIterator {
-  constructor (target, kind) {
-    this[INTERNAL] = {
-      target,
-      kind,
-      index: 0,
-    }
-  }
-
-  get [Symbol.toStringTag] () {
-    return 'HeadersIterator'
-  }
-
-  next () {
-    /* istanbul ignore if: should be impossible */
-    if (!this || Object.getPrototypeOf(this) !== HeadersIterator.prototype) {
-      throw new TypeError('Value of `this` is not a HeadersIterator')
-    }
-
-    const { target, kind, index } = this[INTERNAL]
-    const values = getHeaders(target, kind)
-    const len = values.length
-    if (index >= len) {
-      return {
-        value: undefined,
-        done: true,
-      }
-    }
-
-    this[INTERNAL].index++
-
-    return { value: values[index], done: false }
-  }
-}
-
-// manually extend because 'extends' requires a ctor
-Object.setPrototypeOf(HeadersIterator.prototype,
-  Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())))
-
-module.exports = Headers
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/index.js b/node_modules/npm/node_modules/minipass-fetch/lib/index.js
deleted file mode 100644
index 77e8255..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/index.js
+++ /dev/null
@@ -1,377 +0,0 @@
-'use strict'
-const { URL } = require('url')
-const http = require('http')
-const https = require('https')
-const zlib = require('minizlib')
-const { Minipass } = require('minipass')
-
-const Body = require('./body.js')
-const { writeToStream, getTotalBytes } = Body
-const Response = require('./response.js')
-const Headers = require('./headers.js')
-const { createHeadersLenient } = Headers
-const Request = require('./request.js')
-const { getNodeRequestOptions } = Request
-const FetchError = require('./fetch-error.js')
-const AbortError = require('./abort-error.js')
-
-// XXX this should really be split up and unit-ized for easier testing
-// and better DRY implementation of data/http request aborting
-const fetch = async (url, opts) => {
-  if (/^data:/.test(url)) {
-    const request = new Request(url, opts)
-    // delay 1 promise tick so that the consumer can abort right away
-    return Promise.resolve().then(() => new Promise((resolve, reject) => {
-      let type, data
-      try {
-        const { pathname, search } = new URL(url)
-        const split = pathname.split(',')
-        if (split.length < 2) {
-          throw new Error('invalid data: URI')
-        }
-        const mime = split.shift()
-        const base64 = /;base64$/.test(mime)
-        type = base64 ? mime.slice(0, -1 * ';base64'.length) : mime
-        const rawData = decodeURIComponent(split.join(',') + search)
-        data = base64 ? Buffer.from(rawData, 'base64') : Buffer.from(rawData)
-      } catch (er) {
-        return reject(new FetchError(`[${request.method}] ${
-          request.url} invalid URL, ${er.message}`, 'system', er))
-      }
-
-      const { signal } = request
-      if (signal && signal.aborted) {
-        return reject(new AbortError('The user aborted a request.'))
-      }
-
-      const headers = { 'Content-Length': data.length }
-      if (type) {
-        headers['Content-Type'] = type
-      }
-      return resolve(new Response(data, { headers }))
-    }))
-  }
-
-  return new Promise((resolve, reject) => {
-    // build request object
-    const request = new Request(url, opts)
-    let options
-    try {
-      options = getNodeRequestOptions(request)
-    } catch (er) {
-      return reject(er)
-    }
-
-    const send = (options.protocol === 'https:' ? https : http).request
-    const { signal } = request
-    let response = null
-    const abort = () => {
-      const error = new AbortError('The user aborted a request.')
-      reject(error)
-      if (Minipass.isStream(request.body) &&
-          typeof request.body.destroy === 'function') {
-        request.body.destroy(error)
-      }
-      if (response && response.body) {
-        response.body.emit('error', error)
-      }
-    }
-
-    if (signal && signal.aborted) {
-      return abort()
-    }
-
-    const abortAndFinalize = () => {
-      abort()
-      finalize()
-    }
-
-    const finalize = () => {
-      req.abort()
-      if (signal) {
-        signal.removeEventListener('abort', abortAndFinalize)
-      }
-      clearTimeout(reqTimeout)
-    }
-
-    // send request
-    const req = send(options)
-
-    if (signal) {
-      signal.addEventListener('abort', abortAndFinalize)
-    }
-
-    let reqTimeout = null
-    if (request.timeout) {
-      req.once('socket', socket => {
-        reqTimeout = setTimeout(() => {
-          reject(new FetchError(`network timeout at: ${
-            request.url}`, 'request-timeout'))
-          finalize()
-        }, request.timeout)
-      })
-    }
-
-    req.on('error', er => {
-      // if a 'response' event is emitted before the 'error' event, then by the
-      // time this handler is run it's too late to reject the Promise for the
-      // response. instead, we forward the error event to the response stream
-      // so that the error will surface to the user when they try to consume
-      // the body. this is done as a side effect of aborting the request except
-      // for in windows, where we must forward the event manually, otherwise
-      // there is no longer a ref'd socket attached to the request and the
-      // stream never ends so the event loop runs out of work and the process
-      // exits without warning.
-      // coverage skipped here due to the difficulty in testing
-      // istanbul ignore next
-      if (req.res) {
-        req.res.emit('error', er)
-      }
-      reject(new FetchError(`request to ${request.url} failed, reason: ${
-        er.message}`, 'system', er))
-      finalize()
-    })
-
-    req.on('response', res => {
-      clearTimeout(reqTimeout)
-
-      const headers = createHeadersLenient(res.headers)
-
-      // HTTP fetch step 5
-      if (fetch.isRedirect(res.statusCode)) {
-        // HTTP fetch step 5.2
-        const location = headers.get('Location')
-
-        // HTTP fetch step 5.3
-        let locationURL = null
-        try {
-          locationURL = location === null ? null : new URL(location, request.url).toString()
-        } catch {
-          // error here can only be invalid URL in Location: header
-          // do not throw when options.redirect == manual
-          // let the user extract the errorneous redirect URL
-          if (request.redirect !== 'manual') {
-            /* eslint-disable-next-line max-len */
-            reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'))
-            finalize()
-            return
-          }
-        }
-
-        // HTTP fetch step 5.5
-        if (request.redirect === 'error') {
-          reject(new FetchError('uri requested responds with a redirect, ' +
-            `redirect mode is set to error: ${request.url}`, 'no-redirect'))
-          finalize()
-          return
-        } else if (request.redirect === 'manual') {
-          // node-fetch-specific step: make manual redirect a bit easier to
-          // use by setting the Location header value to the resolved URL.
-          if (locationURL !== null) {
-            // handle corrupted header
-            try {
-              headers.set('Location', locationURL)
-            } catch (err) {
-              /* istanbul ignore next: nodejs server prevent invalid
-                 response headers, we can't test this through normal
-                 request */
-              reject(err)
-            }
-          }
-        } else if (request.redirect === 'follow' && locationURL !== null) {
-          // HTTP-redirect fetch step 5
-          if (request.counter >= request.follow) {
-            reject(new FetchError(`maximum redirect reached at: ${
-              request.url}`, 'max-redirect'))
-            finalize()
-            return
-          }
-
-          // HTTP-redirect fetch step 9
-          if (res.statusCode !== 303 &&
-              request.body &&
-              getTotalBytes(request) === null) {
-            reject(new FetchError(
-              'Cannot follow redirect with body being a readable stream',
-              'unsupported-redirect'
-            ))
-            finalize()
-            return
-          }
-
-          // Update host due to redirection
-          request.headers.set('host', (new URL(locationURL)).host)
-
-          // HTTP-redirect fetch step 6 (counter increment)
-          // Create a new Request object.
-          const requestOpts = {
-            headers: new Headers(request.headers),
-            follow: request.follow,
-            counter: request.counter + 1,
-            agent: request.agent,
-            compress: request.compress,
-            method: request.method,
-            body: request.body,
-            signal: request.signal,
-            timeout: request.timeout,
-          }
-
-          // if the redirect is to a new hostname, strip the authorization and cookie headers
-          const parsedOriginal = new URL(request.url)
-          const parsedRedirect = new URL(locationURL)
-          if (parsedOriginal.hostname !== parsedRedirect.hostname) {
-            requestOpts.headers.delete('authorization')
-            requestOpts.headers.delete('cookie')
-          }
-
-          // HTTP-redirect fetch step 11
-          if (res.statusCode === 303 || (
-            (res.statusCode === 301 || res.statusCode === 302) &&
-              request.method === 'POST'
-          )) {
-            requestOpts.method = 'GET'
-            requestOpts.body = undefined
-            requestOpts.headers.delete('content-length')
-          }
-
-          // HTTP-redirect fetch step 15
-          resolve(fetch(new Request(locationURL, requestOpts)))
-          finalize()
-          return
-        }
-      } // end if(isRedirect)
-
-      // prepare response
-      res.once('end', () =>
-        signal && signal.removeEventListener('abort', abortAndFinalize))
-
-      const body = new Minipass()
-      // if an error occurs, either on the response stream itself, on one of the
-      // decoder streams, or a response length timeout from the Body class, we
-      // forward the error through to our internal body stream. If we see an
-      // error event on that, we call finalize to abort the request and ensure
-      // we don't leave a socket believing a request is in flight.
-      // this is difficult to test, so lacks specific coverage.
-      body.on('error', finalize)
-      // exceedingly rare that the stream would have an error,
-      // but just in case we proxy it to the stream in use.
-      res.on('error', /* istanbul ignore next */ er => body.emit('error', er))
-      res.on('data', (chunk) => body.write(chunk))
-      res.on('end', () => body.end())
-
-      const responseOptions = {
-        url: request.url,
-        status: res.statusCode,
-        statusText: res.statusMessage,
-        headers: headers,
-        size: request.size,
-        timeout: request.timeout,
-        counter: request.counter,
-        trailer: new Promise(resolveTrailer =>
-          res.on('end', () => resolveTrailer(createHeadersLenient(res.trailers)))),
-      }
-
-      // HTTP-network fetch step 12.1.1.3
-      const codings = headers.get('Content-Encoding')
-
-      // HTTP-network fetch step 12.1.1.4: handle content codings
-
-      // in following scenarios we ignore compression support
-      // 1. compression support is disabled
-      // 2. HEAD request
-      // 3. no Content-Encoding header
-      // 4. no content response (204)
-      // 5. content not modified response (304)
-      if (!request.compress ||
-          request.method === 'HEAD' ||
-          codings === null ||
-          res.statusCode === 204 ||
-          res.statusCode === 304) {
-        response = new Response(body, responseOptions)
-        resolve(response)
-        return
-      }
-
-      // Be less strict when decoding compressed responses, since sometimes
-      // servers send slightly invalid responses that are still accepted
-      // by common browsers.
-      // Always using Z_SYNC_FLUSH is what cURL does.
-      const zlibOptions = {
-        flush: zlib.constants.Z_SYNC_FLUSH,
-        finishFlush: zlib.constants.Z_SYNC_FLUSH,
-      }
-
-      // for gzip
-      if (codings === 'gzip' || codings === 'x-gzip') {
-        const unzip = new zlib.Gunzip(zlibOptions)
-        response = new Response(
-          // exceedingly rare that the stream would have an error,
-          // but just in case we proxy it to the stream in use.
-          body.on('error', /* istanbul ignore next */ er => unzip.emit('error', er)).pipe(unzip),
-          responseOptions
-        )
-        resolve(response)
-        return
-      }
-
-      // for deflate
-      if (codings === 'deflate' || codings === 'x-deflate') {
-        // handle the infamous raw deflate response from old servers
-        // a hack for old IIS and Apache servers
-        const raw = res.pipe(new Minipass())
-        raw.once('data', chunk => {
-          // see http://stackoverflow.com/questions/37519828
-          const decoder = (chunk[0] & 0x0F) === 0x08
-            ? new zlib.Inflate()
-            : new zlib.InflateRaw()
-          // exceedingly rare that the stream would have an error,
-          // but just in case we proxy it to the stream in use.
-          body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder)
-          response = new Response(decoder, responseOptions)
-          resolve(response)
-        })
-        return
-      }
-
-      // for br
-      if (codings === 'br') {
-        // ignoring coverage so tests don't have to fake support (or lack of) for brotli
-        // istanbul ignore next
-        try {
-          var decoder = new zlib.BrotliDecompress()
-        } catch (err) {
-          reject(err)
-          finalize()
-          return
-        }
-        // exceedingly rare that the stream would have an error,
-        // but just in case we proxy it to the stream in use.
-        body.on('error', /* istanbul ignore next */ er => decoder.emit('error', er)).pipe(decoder)
-        response = new Response(decoder, responseOptions)
-        resolve(response)
-        return
-      }
-
-      // otherwise, use response as-is
-      response = new Response(body, responseOptions)
-      resolve(response)
-    })
-
-    writeToStream(req, request)
-  })
-}
-
-module.exports = fetch
-
-fetch.isRedirect = code =>
-  code === 301 ||
-  code === 302 ||
-  code === 303 ||
-  code === 307 ||
-  code === 308
-
-fetch.Headers = Headers
-fetch.Request = Request
-fetch.Response = Response
-fetch.FetchError = FetchError
-fetch.AbortError = AbortError
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/request.js b/node_modules/npm/node_modules/minipass-fetch/lib/request.js
deleted file mode 100644
index 054439e..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/request.js
+++ /dev/null
@@ -1,282 +0,0 @@
-'use strict'
-const { URL } = require('url')
-const { Minipass } = require('minipass')
-const Headers = require('./headers.js')
-const { exportNodeCompatibleHeaders } = Headers
-const Body = require('./body.js')
-const { clone, extractContentType, getTotalBytes } = Body
-
-const version = require('../package.json').version
-const defaultUserAgent =
-  `minipass-fetch/${version} (+https://github.com/isaacs/minipass-fetch)`
-
-const INTERNALS = Symbol('Request internals')
-
-const isRequest = input =>
-  typeof input === 'object' && typeof input[INTERNALS] === 'object'
-
-const isAbortSignal = signal => {
-  const proto = (
-    signal
-    && typeof signal === 'object'
-    && Object.getPrototypeOf(signal)
-  )
-  return !!(proto && proto.constructor.name === 'AbortSignal')
-}
-
-class Request extends Body {
-  constructor (input, init = {}) {
-    const parsedURL = isRequest(input) ? new URL(input.url)
-      : input && input.href ? new URL(input.href)
-      : new URL(`${input}`)
-
-    if (isRequest(input)) {
-      init = { ...input[INTERNALS], ...init }
-    } else if (!input || typeof input === 'string') {
-      input = {}
-    }
-
-    const method = (init.method || input.method || 'GET').toUpperCase()
-    const isGETHEAD = method === 'GET' || method === 'HEAD'
-
-    if ((init.body !== null && init.body !== undefined ||
-        isRequest(input) && input.body !== null) && isGETHEAD) {
-      throw new TypeError('Request with GET/HEAD method cannot have body')
-    }
-
-    const inputBody = init.body !== null && init.body !== undefined ? init.body
-      : isRequest(input) && input.body !== null ? clone(input)
-      : null
-
-    super(inputBody, {
-      timeout: init.timeout || input.timeout || 0,
-      size: init.size || input.size || 0,
-    })
-
-    const headers = new Headers(init.headers || input.headers || {})
-
-    if (inputBody !== null && inputBody !== undefined &&
-        !headers.has('Content-Type')) {
-      const contentType = extractContentType(inputBody)
-      if (contentType) {
-        headers.append('Content-Type', contentType)
-      }
-    }
-
-    const signal = 'signal' in init ? init.signal
-      : null
-
-    if (signal !== null && signal !== undefined && !isAbortSignal(signal)) {
-      throw new TypeError('Expected signal must be an instanceof AbortSignal')
-    }
-
-    // TLS specific options that are handled by node
-    const {
-      ca,
-      cert,
-      ciphers,
-      clientCertEngine,
-      crl,
-      dhparam,
-      ecdhCurve,
-      family,
-      honorCipherOrder,
-      key,
-      passphrase,
-      pfx,
-      rejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED !== '0',
-      secureOptions,
-      secureProtocol,
-      servername,
-      sessionIdContext,
-    } = init
-
-    this[INTERNALS] = {
-      method,
-      redirect: init.redirect || input.redirect || 'follow',
-      headers,
-      parsedURL,
-      signal,
-      ca,
-      cert,
-      ciphers,
-      clientCertEngine,
-      crl,
-      dhparam,
-      ecdhCurve,
-      family,
-      honorCipherOrder,
-      key,
-      passphrase,
-      pfx,
-      rejectUnauthorized,
-      secureOptions,
-      secureProtocol,
-      servername,
-      sessionIdContext,
-    }
-
-    // node-fetch-only options
-    this.follow = init.follow !== undefined ? init.follow
-      : input.follow !== undefined ? input.follow
-      : 20
-    this.compress = init.compress !== undefined ? init.compress
-      : input.compress !== undefined ? input.compress
-      : true
-    this.counter = init.counter || input.counter || 0
-    this.agent = init.agent || input.agent
-  }
-
-  get method () {
-    return this[INTERNALS].method
-  }
-
-  get url () {
-    return this[INTERNALS].parsedURL.toString()
-  }
-
-  get headers () {
-    return this[INTERNALS].headers
-  }
-
-  get redirect () {
-    return this[INTERNALS].redirect
-  }
-
-  get signal () {
-    return this[INTERNALS].signal
-  }
-
-  clone () {
-    return new Request(this)
-  }
-
-  get [Symbol.toStringTag] () {
-    return 'Request'
-  }
-
-  static getNodeRequestOptions (request) {
-    const parsedURL = request[INTERNALS].parsedURL
-    const headers = new Headers(request[INTERNALS].headers)
-
-    // fetch step 1.3
-    if (!headers.has('Accept')) {
-      headers.set('Accept', '*/*')
-    }
-
-    // Basic fetch
-    if (!/^https?:$/.test(parsedURL.protocol)) {
-      throw new TypeError('Only HTTP(S) protocols are supported')
-    }
-
-    if (request.signal &&
-        Minipass.isStream(request.body) &&
-        typeof request.body.destroy !== 'function') {
-      throw new Error(
-        'Cancellation of streamed requests with AbortSignal is not supported')
-    }
-
-    // HTTP-network-or-cache fetch steps 2.4-2.7
-    const contentLengthValue =
-      (request.body === null || request.body === undefined) &&
-        /^(POST|PUT)$/i.test(request.method) ? '0'
-      : request.body !== null && request.body !== undefined
-        ? getTotalBytes(request)
-        : null
-
-    if (contentLengthValue) {
-      headers.set('Content-Length', contentLengthValue + '')
-    }
-
-    // HTTP-network-or-cache fetch step 2.11
-    if (!headers.has('User-Agent')) {
-      headers.set('User-Agent', defaultUserAgent)
-    }
-
-    // HTTP-network-or-cache fetch step 2.15
-    if (request.compress && !headers.has('Accept-Encoding')) {
-      headers.set('Accept-Encoding', 'gzip,deflate')
-    }
-
-    const agent = typeof request.agent === 'function'
-      ? request.agent(parsedURL)
-      : request.agent
-
-    if (!headers.has('Connection') && !agent) {
-      headers.set('Connection', 'close')
-    }
-
-    // TLS specific options that are handled by node
-    const {
-      ca,
-      cert,
-      ciphers,
-      clientCertEngine,
-      crl,
-      dhparam,
-      ecdhCurve,
-      family,
-      honorCipherOrder,
-      key,
-      passphrase,
-      pfx,
-      rejectUnauthorized,
-      secureOptions,
-      secureProtocol,
-      servername,
-      sessionIdContext,
-    } = request[INTERNALS]
-
-    // HTTP-network fetch step 4.2
-    // chunked encoding is handled by Node.js
-
-    // we cannot spread parsedURL directly, so we have to read each property one-by-one
-    // and map them to the equivalent https?.request() method options
-    const urlProps = {
-      auth: parsedURL.username || parsedURL.password
-        ? `${parsedURL.username}:${parsedURL.password}`
-        : '',
-      host: parsedURL.host,
-      hostname: parsedURL.hostname,
-      path: `${parsedURL.pathname}${parsedURL.search}`,
-      port: parsedURL.port,
-      protocol: parsedURL.protocol,
-    }
-
-    return {
-      ...urlProps,
-      method: request.method,
-      headers: exportNodeCompatibleHeaders(headers),
-      agent,
-      ca,
-      cert,
-      ciphers,
-      clientCertEngine,
-      crl,
-      dhparam,
-      ecdhCurve,
-      family,
-      honorCipherOrder,
-      key,
-      passphrase,
-      pfx,
-      rejectUnauthorized,
-      secureOptions,
-      secureProtocol,
-      servername,
-      sessionIdContext,
-      timeout: request.timeout,
-    }
-  }
-}
-
-module.exports = Request
-
-Object.defineProperties(Request.prototype, {
-  method: { enumerable: true },
-  url: { enumerable: true },
-  headers: { enumerable: true },
-  redirect: { enumerable: true },
-  clone: { enumerable: true },
-  signal: { enumerable: true },
-})
diff --git a/node_modules/npm/node_modules/minipass-fetch/lib/response.js b/node_modules/npm/node_modules/minipass-fetch/lib/response.js
deleted file mode 100644
index 54cb52d..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/lib/response.js
+++ /dev/null
@@ -1,90 +0,0 @@
-'use strict'
-const http = require('http')
-const { STATUS_CODES } = http
-
-const Headers = require('./headers.js')
-const Body = require('./body.js')
-const { clone, extractContentType } = Body
-
-const INTERNALS = Symbol('Response internals')
-
-class Response extends Body {
-  constructor (body = null, opts = {}) {
-    super(body, opts)
-
-    const status = opts.status || 200
-    const headers = new Headers(opts.headers)
-
-    if (body !== null && body !== undefined && !headers.has('Content-Type')) {
-      const contentType = extractContentType(body)
-      if (contentType) {
-        headers.append('Content-Type', contentType)
-      }
-    }
-
-    this[INTERNALS] = {
-      url: opts.url,
-      status,
-      statusText: opts.statusText || STATUS_CODES[status],
-      headers,
-      counter: opts.counter,
-      trailer: Promise.resolve(opts.trailer || new Headers()),
-    }
-  }
-
-  get trailer () {
-    return this[INTERNALS].trailer
-  }
-
-  get url () {
-    return this[INTERNALS].url || ''
-  }
-
-  get status () {
-    return this[INTERNALS].status
-  }
-
-  get ok () {
-    return this[INTERNALS].status >= 200 && this[INTERNALS].status < 300
-  }
-
-  get redirected () {
-    return this[INTERNALS].counter > 0
-  }
-
-  get statusText () {
-    return this[INTERNALS].statusText
-  }
-
-  get headers () {
-    return this[INTERNALS].headers
-  }
-
-  clone () {
-    return new Response(clone(this), {
-      url: this.url,
-      status: this.status,
-      statusText: this.statusText,
-      headers: this.headers,
-      ok: this.ok,
-      redirected: this.redirected,
-      trailer: this.trailer,
-    })
-  }
-
-  get [Symbol.toStringTag] () {
-    return 'Response'
-  }
-}
-
-module.exports = Response
-
-Object.defineProperties(Response.prototype, {
-  url: { enumerable: true },
-  status: { enumerable: true },
-  ok: { enumerable: true },
-  redirected: { enumerable: true },
-  statusText: { enumerable: true },
-  headers: { enumerable: true },
-  clone: { enumerable: true },
-})
diff --git a/node_modules/npm/node_modules/minipass-fetch/package.json b/node_modules/npm/node_modules/minipass-fetch/package.json
deleted file mode 100644
index 581275b..0000000
--- a/node_modules/npm/node_modules/minipass-fetch/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
-  "name": "minipass-fetch",
-  "version": "3.0.4",
-  "description": "An implementation of window.fetch in Node.js using Minipass streams",
-  "license": "MIT",
-  "main": "lib/index.js",
-  "scripts": {
-    "test:tls-fixtures": "./test/fixtures/tls/setup.sh",
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "tap": {
-    "coverage-map": "map.js",
-    "check-coverage": true,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "@ungap/url-search-params": "^0.2.2",
-    "abort-controller": "^3.0.0",
-    "abortcontroller-polyfill": "~1.7.3",
-    "encoding": "^0.1.13",
-    "form-data": "^4.0.0",
-    "nock": "^13.2.4",
-    "parted": "^0.1.1",
-    "string-to-arraybuffer": "^1.0.2",
-    "tap": "^16.0.0"
-  },
-  "dependencies": {
-    "minipass": "^7.0.3",
-    "minipass-sized": "^1.0.3",
-    "minizlib": "^2.1.2"
-  },
-  "optionalDependencies": {
-    "encoding": "^0.1.13"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/minipass-fetch.git"
-  },
-  "keywords": [
-    "fetch",
-    "minipass",
-    "node-fetch",
-    "window.fetch"
-  ],
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "author": "GitHub Inc.",
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "publish": "true"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-flush/LICENSE b/node_modules/npm/node_modules/minipass-flush/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/minipass-flush/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-flush/index.js b/node_modules/npm/node_modules/minipass-flush/index.js
deleted file mode 100644
index cb2537f..0000000
--- a/node_modules/npm/node_modules/minipass-flush/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const Minipass = require('minipass')
-const _flush = Symbol('_flush')
-const _flushed = Symbol('_flushed')
-const _flushing = Symbol('_flushing')
-class Flush extends Minipass {
-  constructor (opt = {}) {
-    if (typeof opt === 'function')
-      opt = { flush: opt }
-
-    super(opt)
-
-    // or extend this class and provide a 'flush' method in your subclass
-    if (typeof opt.flush !== 'function' && typeof this.flush !== 'function')
-      throw new TypeError('must provide flush function in options')
-
-    this[_flush] = opt.flush || this.flush
-  }
-
-  emit (ev, ...data) {
-    if ((ev !== 'end' && ev !== 'finish') || this[_flushed])
-      return super.emit(ev, ...data)
-
-    if (this[_flushing])
-      return
-
-    this[_flushing] = true
-
-    const afterFlush = er => {
-      this[_flushed] = true
-      er ? super.emit('error', er) : super.emit('end')
-    }
-
-    const ret = this[_flush](afterFlush)
-    if (ret && ret.then)
-      ret.then(() => afterFlush(), er => afterFlush(er))
-  }
-}
-
-module.exports = Flush
diff --git a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/LICENSE
deleted file mode 100644
index bf1dece..0000000
--- a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/index.js b/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/index.js
deleted file mode 100644
index e8797aa..0000000
--- a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/index.js
+++ /dev/null
@@ -1,649 +0,0 @@
-'use strict'
-const proc = typeof process === 'object' && process ? process : {
-  stdout: null,
-  stderr: null,
-}
-const EE = require('events')
-const Stream = require('stream')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const EMITTED_ERROR = Symbol('emittedError')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-const EMITDATA = Symbol('emitData')
-const EMITEND = Symbol('emitEnd')
-const EMITEND2 = Symbol('emitEnd2')
-const ASYNC = Symbol('async')
-
-const defer = fn => Promise.resolve().then(fn)
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_  !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
-  || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
-  || Symbol('iterator not implemented')
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
-  ev === 'end' ||
-  ev === 'finish' ||
-  ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
-  typeof b === 'object' &&
-  b.constructor &&
-  b.constructor.name === 'ArrayBuffer' &&
-  b.byteLength >= 0
-
-const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
-
-class Pipe {
-  constructor (src, dest, opts) {
-    this.src = src
-    this.dest = dest
-    this.opts = opts
-    this.ondrain = () => src[RESUME]()
-    dest.on('drain', this.ondrain)
-  }
-  unpipe () {
-    this.dest.removeListener('drain', this.ondrain)
-  }
-  // istanbul ignore next - only here for the prototype
-  proxyErrors () {}
-  end () {
-    this.unpipe()
-    if (this.opts.end)
-      this.dest.end()
-  }
-}
-
-class PipeProxyErrors extends Pipe {
-  unpipe () {
-    this.src.removeListener('error', this.proxyErrors)
-    super.unpipe()
-  }
-  constructor (src, dest, opts) {
-    super(src, dest, opts)
-    this.proxyErrors = er => dest.emit('error', er)
-    src.on('error', this.proxyErrors)
-  }
-}
-
-module.exports = class Minipass extends Stream {
-  constructor (options) {
-    super()
-    this[FLOWING] = false
-    // whether we're explicitly paused
-    this[PAUSED] = false
-    this.pipes = []
-    this.buffer = []
-    this[OBJECTMODE] = options && options.objectMode || false
-    if (this[OBJECTMODE])
-      this[ENCODING] = null
-    else
-      this[ENCODING] = options && options.encoding || null
-    if (this[ENCODING] === 'buffer')
-      this[ENCODING] = null
-    this[ASYNC] = options && !!options.async || false
-    this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
-    this[EOF] = false
-    this[EMITTED_END] = false
-    this[EMITTING_END] = false
-    this[CLOSED] = false
-    this[EMITTED_ERROR] = null
-    this.writable = true
-    this.readable = true
-    this[BUFFERLENGTH] = 0
-    this[DESTROYED] = false
-  }
-
-  get bufferLength () { return this[BUFFERLENGTH] }
-
-  get encoding () { return this[ENCODING] }
-  set encoding (enc) {
-    if (this[OBJECTMODE])
-      throw new Error('cannot set encoding in objectMode')
-
-    if (this[ENCODING] && enc !== this[ENCODING] &&
-        (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
-      throw new Error('cannot change encoding')
-
-    if (this[ENCODING] !== enc) {
-      this[DECODER] = enc ? new SD(enc) : null
-      if (this.buffer.length)
-        this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
-    }
-
-    this[ENCODING] = enc
-  }
-
-  setEncoding (enc) {
-    this.encoding = enc
-  }
-
-  get objectMode () { return this[OBJECTMODE] }
-  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
-
-  get ['async'] () { return this[ASYNC] }
-  set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
-
-  write (chunk, encoding, cb) {
-    if (this[EOF])
-      throw new Error('write after end')
-
-    if (this[DESTROYED]) {
-      this.emit('error', Object.assign(
-        new Error('Cannot call write after a stream was destroyed'),
-        { code: 'ERR_STREAM_DESTROYED' }
-      ))
-      return true
-    }
-
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const fn = this[ASYNC] ? defer : f => f()
-
-    // convert array buffers and typed array views into buffers
-    // at some point in the future, we may want to do the opposite!
-    // leave strings and buffers as-is
-    // anything else switches us into object mode
-    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-      if (isArrayBufferView(chunk))
-        chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
-      else if (isArrayBuffer(chunk))
-        chunk = Buffer.from(chunk)
-      else if (typeof chunk !== 'string')
-        // use the setter so we throw if we have encoding set
-        this.objectMode = true
-    }
-
-    // handle object mode up front, since it's simpler
-    // this yields better performance, fewer checks later.
-    if (this[OBJECTMODE]) {
-      /* istanbul ignore if - maybe impossible? */
-      if (this.flowing && this[BUFFERLENGTH] !== 0)
-        this[FLUSH](true)
-
-      if (this.flowing)
-        this.emit('data', chunk)
-      else
-        this[BUFFERPUSH](chunk)
-
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-
-      if (cb)
-        fn(cb)
-
-      return this.flowing
-    }
-
-    // at this point the chunk is a buffer or string
-    // don't buffer it up or send it to the decoder
-    if (!chunk.length) {
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-      if (cb)
-        fn(cb)
-      return this.flowing
-    }
-
-    // fast-path writing strings of same encoding to a stream with
-    // an empty buffer, skipping the buffer/decoder dance
-    if (typeof chunk === 'string' &&
-        // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
-      chunk = Buffer.from(chunk, encoding)
-    }
-
-    if (Buffer.isBuffer(chunk) && this[ENCODING])
-      chunk = this[DECODER].write(chunk)
-
-    // Note: flushing CAN potentially switch us into not-flowing mode
-    if (this.flowing && this[BUFFERLENGTH] !== 0)
-      this[FLUSH](true)
-
-    if (this.flowing)
-      this.emit('data', chunk)
-    else
-      this[BUFFERPUSH](chunk)
-
-    if (this[BUFFERLENGTH] !== 0)
-      this.emit('readable')
-
-    if (cb)
-      fn(cb)
-
-    return this.flowing
-  }
-
-  read (n) {
-    if (this[DESTROYED])
-      return null
-
-    if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
-      this[MAYBE_EMIT_END]()
-      return null
-    }
-
-    if (this[OBJECTMODE])
-      n = null
-
-    if (this.buffer.length > 1 && !this[OBJECTMODE]) {
-      if (this.encoding)
-        this.buffer = [this.buffer.join('')]
-      else
-        this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
-    }
-
-    const ret = this[READ](n || null, this.buffer[0])
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [READ] (n, chunk) {
-    if (n === chunk.length || n === null)
-      this[BUFFERSHIFT]()
-    else {
-      this.buffer[0] = chunk.slice(n)
-      chunk = chunk.slice(0, n)
-      this[BUFFERLENGTH] -= n
-    }
-
-    this.emit('data', chunk)
-
-    if (!this.buffer.length && !this[EOF])
-      this.emit('drain')
-
-    return chunk
-  }
-
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-    this[EOF] = true
-    this.writable = false
-
-    // if we haven't written anything, then go ahead and emit,
-    // even if we're not reading.
-    // we'll re-emit if a new 'end' listener is added anyway.
-    // This makes MP more suitable to write-only use cases.
-    if (this.flowing || !this[PAUSED])
-      this[MAYBE_EMIT_END]()
-    return this
-  }
-
-  // don't let the internal resume be overwritten
-  [RESUME] () {
-    if (this[DESTROYED])
-      return
-
-    this[PAUSED] = false
-    this[FLOWING] = true
-    this.emit('resume')
-    if (this.buffer.length)
-      this[FLUSH]()
-    else if (this[EOF])
-      this[MAYBE_EMIT_END]()
-    else
-      this.emit('drain')
-  }
-
-  resume () {
-    return this[RESUME]()
-  }
-
-  pause () {
-    this[FLOWING] = false
-    this[PAUSED] = true
-  }
-
-  get destroyed () {
-    return this[DESTROYED]
-  }
-
-  get flowing () {
-    return this[FLOWING]
-  }
-
-  get paused () {
-    return this[PAUSED]
-  }
-
-  [BUFFERPUSH] (chunk) {
-    if (this[OBJECTMODE])
-      this[BUFFERLENGTH] += 1
-    else
-      this[BUFFERLENGTH] += chunk.length
-    this.buffer.push(chunk)
-  }
-
-  [BUFFERSHIFT] () {
-    if (this.buffer.length) {
-      if (this[OBJECTMODE])
-        this[BUFFERLENGTH] -= 1
-      else
-        this[BUFFERLENGTH] -= this.buffer[0].length
-    }
-    return this.buffer.shift()
-  }
-
-  [FLUSH] (noDrain) {
-    do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
-    if (!noDrain && !this.buffer.length && !this[EOF])
-      this.emit('drain')
-  }
-
-  [FLUSHCHUNK] (chunk) {
-    return chunk ? (this.emit('data', chunk), this.flowing) : false
-  }
-
-  pipe (dest, opts) {
-    if (this[DESTROYED])
-      return
-
-    const ended = this[EMITTED_END]
-    opts = opts || {}
-    if (dest === proc.stdout || dest === proc.stderr)
-      opts.end = false
-    else
-      opts.end = opts.end !== false
-    opts.proxyErrors = !!opts.proxyErrors
-
-    // piping an ended stream ends immediately
-    if (ended) {
-      if (opts.end)
-        dest.end()
-    } else {
-      this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
-        : new PipeProxyErrors(this, dest, opts))
-      if (this[ASYNC])
-        defer(() => this[RESUME]())
-      else
-        this[RESUME]()
-    }
-
-    return dest
-  }
-
-  unpipe (dest) {
-    const p = this.pipes.find(p => p.dest === dest)
-    if (p) {
-      this.pipes.splice(this.pipes.indexOf(p), 1)
-      p.unpipe()
-    }
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'data' && !this.pipes.length && !this.flowing)
-      this[RESUME]()
-    else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
-      super.emit('readable')
-    else if (isEndish(ev) && this[EMITTED_END]) {
-      super.emit(ev)
-      this.removeAllListeners(ev)
-    } else if (ev === 'error' && this[EMITTED_ERROR]) {
-      if (this[ASYNC])
-        defer(() => fn.call(this, this[EMITTED_ERROR]))
-      else
-        fn.call(this, this[EMITTED_ERROR])
-    }
-    return ret
-  }
-
-  get emittedEnd () {
-    return this[EMITTED_END]
-  }
-
-  [MAYBE_EMIT_END] () {
-    if (!this[EMITTING_END] &&
-        !this[EMITTED_END] &&
-        !this[DESTROYED] &&
-        this.buffer.length === 0 &&
-        this[EOF]) {
-      this[EMITTING_END] = true
-      this.emit('end')
-      this.emit('prefinish')
-      this.emit('finish')
-      if (this[CLOSED])
-        this.emit('close')
-      this[EMITTING_END] = false
-    }
-  }
-
-  emit (ev, data, ...extra) {
-    // error and close are only events allowed after calling destroy()
-    if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
-      return
-    else if (ev === 'data') {
-      return !data ? false
-        : this[ASYNC] ? defer(() => this[EMITDATA](data))
-        : this[EMITDATA](data)
-    } else if (ev === 'end') {
-      return this[EMITEND]()
-    } else if (ev === 'close') {
-      this[CLOSED] = true
-      // don't emit close before 'end' and 'finish'
-      if (!this[EMITTED_END] && !this[DESTROYED])
-        return
-      const ret = super.emit('close')
-      this.removeAllListeners('close')
-      return ret
-    } else if (ev === 'error') {
-      this[EMITTED_ERROR] = data
-      const ret = super.emit('error', data)
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'resume') {
-      const ret = super.emit('resume')
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'finish' || ev === 'prefinish') {
-      const ret = super.emit(ev)
-      this.removeAllListeners(ev)
-      return ret
-    }
-
-    // Some other unknown event
-    const ret = super.emit(ev, data, ...extra)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITDATA] (data) {
-    for (const p of this.pipes) {
-      if (p.dest.write(data) === false)
-        this.pause()
-    }
-    const ret = super.emit('data', data)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITEND] () {
-    if (this[EMITTED_END])
-      return
-
-    this[EMITTED_END] = true
-    this.readable = false
-    if (this[ASYNC])
-      defer(() => this[EMITEND2]())
-    else
-      this[EMITEND2]()
-  }
-
-  [EMITEND2] () {
-    if (this[DECODER]) {
-      const data = this[DECODER].end()
-      if (data) {
-        for (const p of this.pipes) {
-          p.dest.write(data)
-        }
-        super.emit('data', data)
-      }
-    }
-
-    for (const p of this.pipes) {
-      p.end()
-    }
-    const ret = super.emit('end')
-    this.removeAllListeners('end')
-    return ret
-  }
-
-  // const all = await stream.collect()
-  collect () {
-    const buf = []
-    if (!this[OBJECTMODE])
-      buf.dataLength = 0
-    // set the promise first, in case an error is raised
-    // by triggering the flow here.
-    const p = this.promise()
-    this.on('data', c => {
-      buf.push(c)
-      if (!this[OBJECTMODE])
-        buf.dataLength += c.length
-    })
-    return p.then(() => buf)
-  }
-
-  // const data = await stream.concat()
-  concat () {
-    return this[OBJECTMODE]
-      ? Promise.reject(new Error('cannot concat in objectMode'))
-      : this.collect().then(buf =>
-          this[OBJECTMODE]
-            ? Promise.reject(new Error('cannot concat in objectMode'))
-            : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength))
-  }
-
-  // stream.promise().then(() => done, er => emitted error)
-  promise () {
-    return new Promise((resolve, reject) => {
-      this.on(DESTROYED, () => reject(new Error('stream destroyed')))
-      this.on('error', er => reject(er))
-      this.on('end', () => resolve())
-    })
-  }
-
-  // for await (let chunk of stream)
-  [ASYNCITERATOR] () {
-    const next = () => {
-      const res = this.read()
-      if (res !== null)
-        return Promise.resolve({ done: false, value: res })
-
-      if (this[EOF])
-        return Promise.resolve({ done: true })
-
-      let resolve = null
-      let reject = null
-      const onerr = er => {
-        this.removeListener('data', ondata)
-        this.removeListener('end', onend)
-        reject(er)
-      }
-      const ondata = value => {
-        this.removeListener('error', onerr)
-        this.removeListener('end', onend)
-        this.pause()
-        resolve({ value: value, done: !!this[EOF] })
-      }
-      const onend = () => {
-        this.removeListener('error', onerr)
-        this.removeListener('data', ondata)
-        resolve({ done: true })
-      }
-      const ondestroy = () => onerr(new Error('stream destroyed'))
-      return new Promise((res, rej) => {
-        reject = rej
-        resolve = res
-        this.once(DESTROYED, ondestroy)
-        this.once('error', onerr)
-        this.once('end', onend)
-        this.once('data', ondata)
-      })
-    }
-
-    return { next }
-  }
-
-  // for (let chunk of stream)
-  [ITERATOR] () {
-    const next = () => {
-      const value = this.read()
-      const done = value === null
-      return { value, done }
-    }
-    return { next }
-  }
-
-  destroy (er) {
-    if (this[DESTROYED]) {
-      if (er)
-        this.emit('error', er)
-      else
-        this.emit(DESTROYED)
-      return this
-    }
-
-    this[DESTROYED] = true
-
-    // throw away all buffered data, it's never coming out
-    this.buffer.length = 0
-    this[BUFFERLENGTH] = 0
-
-    if (typeof this.close === 'function' && !this[CLOSED])
-      this.close()
-
-    if (er)
-      this.emit('error', er)
-    else // if no error to emit, still reject pending promises
-      this.emit(DESTROYED)
-
-    return this
-  }
-
-  static isStream (s) {
-    return !!s && (s instanceof Minipass || s instanceof Stream ||
-      s instanceof EE && (
-        typeof s.pipe === 'function' || // readable
-        (typeof s.write === 'function' && typeof s.end === 'function') // writable
-      ))
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/package.json b/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/package.json
deleted file mode 100644
index 548d03f..0000000
--- a/node_modules/npm/node_modules/minipass-flush/node_modules/minipass/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "name": "minipass",
-  "version": "3.3.6",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "index.js",
-  "types": "index.d.ts",
-  "dependencies": {
-    "yallist": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/node": "^17.0.41",
-    "end-of-stream": "^1.4.0",
-    "prettier": "^2.6.2",
-    "tap": "^16.2.0",
-    "through2": "^2.0.3",
-    "ts-node": "^10.8.1",
-    "typescript": "^4.7.3"
-  },
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass.git"
-  },
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "files": [
-    "index.d.ts",
-    "index.js"
-  ],
-  "tap": {
-    "check-coverage": true
-  },
-  "engines": {
-    "node": ">=8"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-flush/package.json b/node_modules/npm/node_modules/minipass-flush/package.json
deleted file mode 100644
index 09127d0..0000000
--- a/node_modules/npm/node_modules/minipass-flush/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "name": "minipass-flush",
-  "version": "1.0.5",
-  "description": "A Minipass stream that calls a flush function before emitting 'end'",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^14.6.9"
-  },
-  "dependencies": {
-    "minipass": "^3.0.0"
-  },
-  "files": [
-    "index.js"
-  ],
-  "main": "index.js",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass-flush.git"
-  },
-  "keywords": [
-    "minipass",
-    "flush",
-    "stream"
-  ],
-  "engines": {
-    "node": ">= 8"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-json-stream/LICENSE b/node_modules/npm/node_modules/minipass-json-stream/LICENSE
deleted file mode 100644
index 2781a89..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-The MIT License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-Copyright (c) 2011 Dominic Tarr
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-
-----
-This is a derivative work based on JSONStream by Dominic Tarr, modified and
-redistributed according to the terms of the MIT license above.
-https://github.com/dominictarr/JSONStream
diff --git a/node_modules/npm/node_modules/minipass-json-stream/index.js b/node_modules/npm/node_modules/minipass-json-stream/index.js
deleted file mode 100644
index 5168d13..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/index.js
+++ /dev/null
@@ -1,227 +0,0 @@
-// put javascript in here
-'use strict'
-
-const Parser = require('jsonparse')
-const Minipass = require('minipass')
-
-class JSONStreamError extends Error {
-  constructor (err, caller) {
-    super(err.message)
-    Error.captureStackTrace(this, caller || this.constructor)
-  }
-  get name () {
-    return 'JSONStreamError'
-  }
-  set name (n) {}
-}
-
-const check = (x, y) =>
-  typeof x === 'string' ? String(y) === x
-  : x && typeof x.test === 'function' ? x.test(y)
-  : typeof x === 'boolean' || typeof x === 'object' ? x
-  : typeof x === 'function' ? x(y)
-  : false
-
-const _parser = Symbol('_parser')
-const _onValue = Symbol('_onValue')
-const _onTokenOriginal = Symbol('_onTokenOriginal')
-const _onToken = Symbol('_onToken')
-const _onError = Symbol('_onError')
-const _count = Symbol('_count')
-const _path = Symbol('_path')
-const _map = Symbol('_map')
-const _root = Symbol('_root')
-const _header = Symbol('_header')
-const _footer = Symbol('_footer')
-const _setHeaderFooter = Symbol('_setHeaderFooter')
-const _ending = Symbol('_ending')
-
-class JSONStream extends Minipass {
-  constructor (opts = {}) {
-    super({
-      ...opts,
-      objectMode: true,
-    })
-
-    this[_ending] = false
-    const parser = this[_parser] = new Parser()
-    parser.onValue = value => this[_onValue](value)
-    this[_onTokenOriginal] = parser.onToken
-    parser.onToken = (token, value) => this[_onToken](token, value)
-    parser.onError = er => this[_onError](er)
-
-    this[_count] = 0
-    this[_path] = typeof opts.path === 'string'
-      ? opts.path.split('.').map(e =>
-          e === '$*' ? { emitKey: true }
-          : e === '*' ? true
-          : e === '' ? { recurse: true }
-          : e)
-      : Array.isArray(opts.path) && opts.path.length ? opts.path
-      : null
-
-    this[_map] = typeof opts.map === 'function' ? opts.map : null
-    this[_root] = null
-    this[_header] = null
-    this[_footer] = null
-    this[_count] = 0
-  }
-
-  [_setHeaderFooter] (key, value) {
-    // header has not been emitted yet
-    if (this[_header] !== false) {
-      this[_header] = this[_header] || {}
-      this[_header][key] = value
-    }
-
-    // footer has not been emitted yet but header has
-    if (this[_footer] !== false && this[_header] === false) {
-      this[_footer] = this[_footer] || {}
-      this[_footer][key] = value
-    }
-  }
-
-  [_onError] (er) {
-    // error will always happen during a write() call.
-    const caller = this[_ending] ? this.end : this.write
-    this[_ending] = false
-    return this.emit('error', new JSONStreamError(er, caller))
-  }
-
-  [_onToken] (token, value) {
-    const parser = this[_parser]
-    this[_onTokenOriginal].call(parser, token, value)
-    if (parser.stack.length === 0) {
-      if (this[_root]) {
-        const root = this[_root]
-        if (!this[_path])
-          super.write(root)
-        this[_root] = null
-        this[_count] = 0
-      }
-    }
-  }
-
-  [_onValue] (value) {
-    const parser = this[_parser]
-    // the LAST onValue encountered is the root object.
-    // just overwrite it each time.
-    this[_root] = value
-
-    if(!this[_path]) return
-
-    let i = 0 // iterates on path
-    let j  = 0 // iterates on stack
-    let emitKey = false
-    let emitPath = false
-    while (i < this[_path].length) {
-      const key = this[_path][i]
-      j++
-
-      if (key && !key.recurse) {
-        const c = (j === parser.stack.length) ? parser : parser.stack[j]
-        if (!c) return
-        if (!check(key, c.key)) {
-          this[_setHeaderFooter](c.key, value)
-          return
-        }
-        emitKey = !!key.emitKey;
-        emitPath = !!key.emitPath;
-        i++
-      } else {
-        i++
-        if (i >= this[_path].length)
-          return
-        const nextKey = this[_path][i]
-        if (!nextKey)
-          return
-        while (true) {
-          const c = (j === parser.stack.length) ? parser : parser.stack[j]
-          if (!c) return
-          if (check(nextKey, c.key)) {
-            i++
-            if (!Object.isFrozen(parser.stack[j]))
-              parser.stack[j].value = null
-            break
-          } else {
-            this[_setHeaderFooter](c.key, value)
-          }
-          j++
-        }
-      }
-    }
-
-    // emit header
-    if (this[_header]) {
-      const header = this[_header]
-      this[_header] = false
-      this.emit('header', header)
-    }
-    if (j !== parser.stack.length) return
-
-    this[_count] ++
-    const actualPath = parser.stack.slice(1)
-      .map(e => e.key).concat([parser.key])
-    if (value !== null && value !== undefined) {
-      const data = this[_map] ? this[_map](value, actualPath) : value
-      if (data !== null && data !== undefined) {
-        const emit = emitKey || emitPath ? { value: data } : data
-        if (emitKey)
-          emit.key = parser.key
-        if (emitPath)
-          emit.path = actualPath
-        super.write(emit)
-      }
-    }
-
-    if (parser.value)
-      delete parser.value[parser.key]
-
-    for (const k of parser.stack) {
-      k.value = null
-    }
-  }
-
-  write (chunk, encoding, cb) {
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = null
-    if (typeof chunk === 'string')
-      chunk = Buffer.from(chunk, encoding)
-    else if (!Buffer.isBuffer(chunk))
-      return this.emit('error', new TypeError(
-        'Can only parse JSON from string or buffer input'))
-    this[_parser].write(chunk)
-    if (cb)
-      cb()
-    return this.flowing
-  }
-
-  end (chunk, encoding, cb) {
-    this[_ending] = true
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = null
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-
-    const h = this[_header]
-    this[_header] = null
-    const f = this[_footer]
-    this[_footer] = null
-    if (h)
-      this.emit('header', h)
-    if (f)
-      this.emit('footer', f)
-    return super.end()
-  }
-
-  static get JSONStreamError () { return JSONStreamError }
-  static parse (path, map) {
-    return new JSONStream({path, map})
-  }
-}
-
-module.exports = JSONStream
diff --git a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/LICENSE
deleted file mode 100644
index bf1dece..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/index.js b/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/index.js
deleted file mode 100644
index e8797aa..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/index.js
+++ /dev/null
@@ -1,649 +0,0 @@
-'use strict'
-const proc = typeof process === 'object' && process ? process : {
-  stdout: null,
-  stderr: null,
-}
-const EE = require('events')
-const Stream = require('stream')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const EMITTED_ERROR = Symbol('emittedError')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-const EMITDATA = Symbol('emitData')
-const EMITEND = Symbol('emitEnd')
-const EMITEND2 = Symbol('emitEnd2')
-const ASYNC = Symbol('async')
-
-const defer = fn => Promise.resolve().then(fn)
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_  !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
-  || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
-  || Symbol('iterator not implemented')
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
-  ev === 'end' ||
-  ev === 'finish' ||
-  ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
-  typeof b === 'object' &&
-  b.constructor &&
-  b.constructor.name === 'ArrayBuffer' &&
-  b.byteLength >= 0
-
-const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
-
-class Pipe {
-  constructor (src, dest, opts) {
-    this.src = src
-    this.dest = dest
-    this.opts = opts
-    this.ondrain = () => src[RESUME]()
-    dest.on('drain', this.ondrain)
-  }
-  unpipe () {
-    this.dest.removeListener('drain', this.ondrain)
-  }
-  // istanbul ignore next - only here for the prototype
-  proxyErrors () {}
-  end () {
-    this.unpipe()
-    if (this.opts.end)
-      this.dest.end()
-  }
-}
-
-class PipeProxyErrors extends Pipe {
-  unpipe () {
-    this.src.removeListener('error', this.proxyErrors)
-    super.unpipe()
-  }
-  constructor (src, dest, opts) {
-    super(src, dest, opts)
-    this.proxyErrors = er => dest.emit('error', er)
-    src.on('error', this.proxyErrors)
-  }
-}
-
-module.exports = class Minipass extends Stream {
-  constructor (options) {
-    super()
-    this[FLOWING] = false
-    // whether we're explicitly paused
-    this[PAUSED] = false
-    this.pipes = []
-    this.buffer = []
-    this[OBJECTMODE] = options && options.objectMode || false
-    if (this[OBJECTMODE])
-      this[ENCODING] = null
-    else
-      this[ENCODING] = options && options.encoding || null
-    if (this[ENCODING] === 'buffer')
-      this[ENCODING] = null
-    this[ASYNC] = options && !!options.async || false
-    this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
-    this[EOF] = false
-    this[EMITTED_END] = false
-    this[EMITTING_END] = false
-    this[CLOSED] = false
-    this[EMITTED_ERROR] = null
-    this.writable = true
-    this.readable = true
-    this[BUFFERLENGTH] = 0
-    this[DESTROYED] = false
-  }
-
-  get bufferLength () { return this[BUFFERLENGTH] }
-
-  get encoding () { return this[ENCODING] }
-  set encoding (enc) {
-    if (this[OBJECTMODE])
-      throw new Error('cannot set encoding in objectMode')
-
-    if (this[ENCODING] && enc !== this[ENCODING] &&
-        (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
-      throw new Error('cannot change encoding')
-
-    if (this[ENCODING] !== enc) {
-      this[DECODER] = enc ? new SD(enc) : null
-      if (this.buffer.length)
-        this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
-    }
-
-    this[ENCODING] = enc
-  }
-
-  setEncoding (enc) {
-    this.encoding = enc
-  }
-
-  get objectMode () { return this[OBJECTMODE] }
-  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
-
-  get ['async'] () { return this[ASYNC] }
-  set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
-
-  write (chunk, encoding, cb) {
-    if (this[EOF])
-      throw new Error('write after end')
-
-    if (this[DESTROYED]) {
-      this.emit('error', Object.assign(
-        new Error('Cannot call write after a stream was destroyed'),
-        { code: 'ERR_STREAM_DESTROYED' }
-      ))
-      return true
-    }
-
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const fn = this[ASYNC] ? defer : f => f()
-
-    // convert array buffers and typed array views into buffers
-    // at some point in the future, we may want to do the opposite!
-    // leave strings and buffers as-is
-    // anything else switches us into object mode
-    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-      if (isArrayBufferView(chunk))
-        chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
-      else if (isArrayBuffer(chunk))
-        chunk = Buffer.from(chunk)
-      else if (typeof chunk !== 'string')
-        // use the setter so we throw if we have encoding set
-        this.objectMode = true
-    }
-
-    // handle object mode up front, since it's simpler
-    // this yields better performance, fewer checks later.
-    if (this[OBJECTMODE]) {
-      /* istanbul ignore if - maybe impossible? */
-      if (this.flowing && this[BUFFERLENGTH] !== 0)
-        this[FLUSH](true)
-
-      if (this.flowing)
-        this.emit('data', chunk)
-      else
-        this[BUFFERPUSH](chunk)
-
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-
-      if (cb)
-        fn(cb)
-
-      return this.flowing
-    }
-
-    // at this point the chunk is a buffer or string
-    // don't buffer it up or send it to the decoder
-    if (!chunk.length) {
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-      if (cb)
-        fn(cb)
-      return this.flowing
-    }
-
-    // fast-path writing strings of same encoding to a stream with
-    // an empty buffer, skipping the buffer/decoder dance
-    if (typeof chunk === 'string' &&
-        // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
-      chunk = Buffer.from(chunk, encoding)
-    }
-
-    if (Buffer.isBuffer(chunk) && this[ENCODING])
-      chunk = this[DECODER].write(chunk)
-
-    // Note: flushing CAN potentially switch us into not-flowing mode
-    if (this.flowing && this[BUFFERLENGTH] !== 0)
-      this[FLUSH](true)
-
-    if (this.flowing)
-      this.emit('data', chunk)
-    else
-      this[BUFFERPUSH](chunk)
-
-    if (this[BUFFERLENGTH] !== 0)
-      this.emit('readable')
-
-    if (cb)
-      fn(cb)
-
-    return this.flowing
-  }
-
-  read (n) {
-    if (this[DESTROYED])
-      return null
-
-    if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
-      this[MAYBE_EMIT_END]()
-      return null
-    }
-
-    if (this[OBJECTMODE])
-      n = null
-
-    if (this.buffer.length > 1 && !this[OBJECTMODE]) {
-      if (this.encoding)
-        this.buffer = [this.buffer.join('')]
-      else
-        this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
-    }
-
-    const ret = this[READ](n || null, this.buffer[0])
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [READ] (n, chunk) {
-    if (n === chunk.length || n === null)
-      this[BUFFERSHIFT]()
-    else {
-      this.buffer[0] = chunk.slice(n)
-      chunk = chunk.slice(0, n)
-      this[BUFFERLENGTH] -= n
-    }
-
-    this.emit('data', chunk)
-
-    if (!this.buffer.length && !this[EOF])
-      this.emit('drain')
-
-    return chunk
-  }
-
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-    this[EOF] = true
-    this.writable = false
-
-    // if we haven't written anything, then go ahead and emit,
-    // even if we're not reading.
-    // we'll re-emit if a new 'end' listener is added anyway.
-    // This makes MP more suitable to write-only use cases.
-    if (this.flowing || !this[PAUSED])
-      this[MAYBE_EMIT_END]()
-    return this
-  }
-
-  // don't let the internal resume be overwritten
-  [RESUME] () {
-    if (this[DESTROYED])
-      return
-
-    this[PAUSED] = false
-    this[FLOWING] = true
-    this.emit('resume')
-    if (this.buffer.length)
-      this[FLUSH]()
-    else if (this[EOF])
-      this[MAYBE_EMIT_END]()
-    else
-      this.emit('drain')
-  }
-
-  resume () {
-    return this[RESUME]()
-  }
-
-  pause () {
-    this[FLOWING] = false
-    this[PAUSED] = true
-  }
-
-  get destroyed () {
-    return this[DESTROYED]
-  }
-
-  get flowing () {
-    return this[FLOWING]
-  }
-
-  get paused () {
-    return this[PAUSED]
-  }
-
-  [BUFFERPUSH] (chunk) {
-    if (this[OBJECTMODE])
-      this[BUFFERLENGTH] += 1
-    else
-      this[BUFFERLENGTH] += chunk.length
-    this.buffer.push(chunk)
-  }
-
-  [BUFFERSHIFT] () {
-    if (this.buffer.length) {
-      if (this[OBJECTMODE])
-        this[BUFFERLENGTH] -= 1
-      else
-        this[BUFFERLENGTH] -= this.buffer[0].length
-    }
-    return this.buffer.shift()
-  }
-
-  [FLUSH] (noDrain) {
-    do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
-    if (!noDrain && !this.buffer.length && !this[EOF])
-      this.emit('drain')
-  }
-
-  [FLUSHCHUNK] (chunk) {
-    return chunk ? (this.emit('data', chunk), this.flowing) : false
-  }
-
-  pipe (dest, opts) {
-    if (this[DESTROYED])
-      return
-
-    const ended = this[EMITTED_END]
-    opts = opts || {}
-    if (dest === proc.stdout || dest === proc.stderr)
-      opts.end = false
-    else
-      opts.end = opts.end !== false
-    opts.proxyErrors = !!opts.proxyErrors
-
-    // piping an ended stream ends immediately
-    if (ended) {
-      if (opts.end)
-        dest.end()
-    } else {
-      this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
-        : new PipeProxyErrors(this, dest, opts))
-      if (this[ASYNC])
-        defer(() => this[RESUME]())
-      else
-        this[RESUME]()
-    }
-
-    return dest
-  }
-
-  unpipe (dest) {
-    const p = this.pipes.find(p => p.dest === dest)
-    if (p) {
-      this.pipes.splice(this.pipes.indexOf(p), 1)
-      p.unpipe()
-    }
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'data' && !this.pipes.length && !this.flowing)
-      this[RESUME]()
-    else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
-      super.emit('readable')
-    else if (isEndish(ev) && this[EMITTED_END]) {
-      super.emit(ev)
-      this.removeAllListeners(ev)
-    } else if (ev === 'error' && this[EMITTED_ERROR]) {
-      if (this[ASYNC])
-        defer(() => fn.call(this, this[EMITTED_ERROR]))
-      else
-        fn.call(this, this[EMITTED_ERROR])
-    }
-    return ret
-  }
-
-  get emittedEnd () {
-    return this[EMITTED_END]
-  }
-
-  [MAYBE_EMIT_END] () {
-    if (!this[EMITTING_END] &&
-        !this[EMITTED_END] &&
-        !this[DESTROYED] &&
-        this.buffer.length === 0 &&
-        this[EOF]) {
-      this[EMITTING_END] = true
-      this.emit('end')
-      this.emit('prefinish')
-      this.emit('finish')
-      if (this[CLOSED])
-        this.emit('close')
-      this[EMITTING_END] = false
-    }
-  }
-
-  emit (ev, data, ...extra) {
-    // error and close are only events allowed after calling destroy()
-    if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
-      return
-    else if (ev === 'data') {
-      return !data ? false
-        : this[ASYNC] ? defer(() => this[EMITDATA](data))
-        : this[EMITDATA](data)
-    } else if (ev === 'end') {
-      return this[EMITEND]()
-    } else if (ev === 'close') {
-      this[CLOSED] = true
-      // don't emit close before 'end' and 'finish'
-      if (!this[EMITTED_END] && !this[DESTROYED])
-        return
-      const ret = super.emit('close')
-      this.removeAllListeners('close')
-      return ret
-    } else if (ev === 'error') {
-      this[EMITTED_ERROR] = data
-      const ret = super.emit('error', data)
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'resume') {
-      const ret = super.emit('resume')
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'finish' || ev === 'prefinish') {
-      const ret = super.emit(ev)
-      this.removeAllListeners(ev)
-      return ret
-    }
-
-    // Some other unknown event
-    const ret = super.emit(ev, data, ...extra)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITDATA] (data) {
-    for (const p of this.pipes) {
-      if (p.dest.write(data) === false)
-        this.pause()
-    }
-    const ret = super.emit('data', data)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITEND] () {
-    if (this[EMITTED_END])
-      return
-
-    this[EMITTED_END] = true
-    this.readable = false
-    if (this[ASYNC])
-      defer(() => this[EMITEND2]())
-    else
-      this[EMITEND2]()
-  }
-
-  [EMITEND2] () {
-    if (this[DECODER]) {
-      const data = this[DECODER].end()
-      if (data) {
-        for (const p of this.pipes) {
-          p.dest.write(data)
-        }
-        super.emit('data', data)
-      }
-    }
-
-    for (const p of this.pipes) {
-      p.end()
-    }
-    const ret = super.emit('end')
-    this.removeAllListeners('end')
-    return ret
-  }
-
-  // const all = await stream.collect()
-  collect () {
-    const buf = []
-    if (!this[OBJECTMODE])
-      buf.dataLength = 0
-    // set the promise first, in case an error is raised
-    // by triggering the flow here.
-    const p = this.promise()
-    this.on('data', c => {
-      buf.push(c)
-      if (!this[OBJECTMODE])
-        buf.dataLength += c.length
-    })
-    return p.then(() => buf)
-  }
-
-  // const data = await stream.concat()
-  concat () {
-    return this[OBJECTMODE]
-      ? Promise.reject(new Error('cannot concat in objectMode'))
-      : this.collect().then(buf =>
-          this[OBJECTMODE]
-            ? Promise.reject(new Error('cannot concat in objectMode'))
-            : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength))
-  }
-
-  // stream.promise().then(() => done, er => emitted error)
-  promise () {
-    return new Promise((resolve, reject) => {
-      this.on(DESTROYED, () => reject(new Error('stream destroyed')))
-      this.on('error', er => reject(er))
-      this.on('end', () => resolve())
-    })
-  }
-
-  // for await (let chunk of stream)
-  [ASYNCITERATOR] () {
-    const next = () => {
-      const res = this.read()
-      if (res !== null)
-        return Promise.resolve({ done: false, value: res })
-
-      if (this[EOF])
-        return Promise.resolve({ done: true })
-
-      let resolve = null
-      let reject = null
-      const onerr = er => {
-        this.removeListener('data', ondata)
-        this.removeListener('end', onend)
-        reject(er)
-      }
-      const ondata = value => {
-        this.removeListener('error', onerr)
-        this.removeListener('end', onend)
-        this.pause()
-        resolve({ value: value, done: !!this[EOF] })
-      }
-      const onend = () => {
-        this.removeListener('error', onerr)
-        this.removeListener('data', ondata)
-        resolve({ done: true })
-      }
-      const ondestroy = () => onerr(new Error('stream destroyed'))
-      return new Promise((res, rej) => {
-        reject = rej
-        resolve = res
-        this.once(DESTROYED, ondestroy)
-        this.once('error', onerr)
-        this.once('end', onend)
-        this.once('data', ondata)
-      })
-    }
-
-    return { next }
-  }
-
-  // for (let chunk of stream)
-  [ITERATOR] () {
-    const next = () => {
-      const value = this.read()
-      const done = value === null
-      return { value, done }
-    }
-    return { next }
-  }
-
-  destroy (er) {
-    if (this[DESTROYED]) {
-      if (er)
-        this.emit('error', er)
-      else
-        this.emit(DESTROYED)
-      return this
-    }
-
-    this[DESTROYED] = true
-
-    // throw away all buffered data, it's never coming out
-    this.buffer.length = 0
-    this[BUFFERLENGTH] = 0
-
-    if (typeof this.close === 'function' && !this[CLOSED])
-      this.close()
-
-    if (er)
-      this.emit('error', er)
-    else // if no error to emit, still reject pending promises
-      this.emit(DESTROYED)
-
-    return this
-  }
-
-  static isStream (s) {
-    return !!s && (s instanceof Minipass || s instanceof Stream ||
-      s instanceof EE && (
-        typeof s.pipe === 'function' || // readable
-        (typeof s.write === 'function' && typeof s.end === 'function') // writable
-      ))
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/package.json b/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/package.json
deleted file mode 100644
index 548d03f..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/node_modules/minipass/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "name": "minipass",
-  "version": "3.3.6",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "index.js",
-  "types": "index.d.ts",
-  "dependencies": {
-    "yallist": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/node": "^17.0.41",
-    "end-of-stream": "^1.4.0",
-    "prettier": "^2.6.2",
-    "tap": "^16.2.0",
-    "through2": "^2.0.3",
-    "ts-node": "^10.8.1",
-    "typescript": "^4.7.3"
-  },
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass.git"
-  },
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "files": [
-    "index.d.ts",
-    "index.js"
-  ],
-  "tap": {
-    "check-coverage": true
-  },
-  "engines": {
-    "node": ">=8"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-json-stream/package.json b/node_modules/npm/node_modules/minipass-json-stream/package.json
deleted file mode 100644
index 19d1f35..0000000
--- a/node_modules/npm/node_modules/minipass-json-stream/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "name": "minipass-json-stream",
-  "version": "1.0.1",
-  "description": "Like JSONStream, but using Minipass streams",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "MIT",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "JSONStream": "^1.3.5",
-    "tap": "^14.6.9"
-  },
-  "dependencies": {
-    "jsonparse": "^1.3.1",
-    "minipass": "^3.0.0"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/npm/minipass-json-stream.git"
-  },
-  "keywords": [
-    "stream",
-    "json",
-    "parse",
-    "minipass",
-    "JSONStream"
-  ],
-  "files": [
-    "index.js"
-  ]
-}
diff --git a/node_modules/npm/node_modules/minipass-pipeline/LICENSE b/node_modules/npm/node_modules/minipass-pipeline/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-pipeline/index.js b/node_modules/npm/node_modules/minipass-pipeline/index.js
deleted file mode 100644
index b94ea14..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/index.js
+++ /dev/null
@@ -1,128 +0,0 @@
-const Minipass = require('minipass')
-const EE = require('events')
-const isStream = s => s && s instanceof EE && (
-  typeof s.pipe === 'function' || // readable
-  (typeof s.write === 'function' && typeof s.end === 'function') // writable
-)
-
-const _head = Symbol('_head')
-const _tail = Symbol('_tail')
-const _linkStreams = Symbol('_linkStreams')
-const _setHead = Symbol('_setHead')
-const _setTail = Symbol('_setTail')
-const _onError = Symbol('_onError')
-const _onData = Symbol('_onData')
-const _onEnd = Symbol('_onEnd')
-const _onDrain = Symbol('_onDrain')
-const _streams = Symbol('_streams')
-class Pipeline extends Minipass {
-  constructor (opts, ...streams) {
-    if (isStream(opts)) {
-      streams.unshift(opts)
-      opts = {}
-    }
-
-    super(opts)
-    this[_streams] = []
-    if (streams.length)
-      this.push(...streams)
-  }
-
-  [_linkStreams] (streams) {
-    // reduce takes (left,right), and we return right to make it the
-    // new left value.
-    return streams.reduce((src, dest) => {
-      src.on('error', er => dest.emit('error', er))
-      src.pipe(dest)
-      return dest
-    })
-  }
-
-  push (...streams) {
-    this[_streams].push(...streams)
-    if (this[_tail])
-      streams.unshift(this[_tail])
-
-    const linkRet = this[_linkStreams](streams)
-
-    this[_setTail](linkRet)
-    if (!this[_head])
-      this[_setHead](streams[0])
-  }
-
-  unshift (...streams) {
-    this[_streams].unshift(...streams)
-    if (this[_head])
-      streams.push(this[_head])
-
-    const linkRet = this[_linkStreams](streams)
-    this[_setHead](streams[0])
-    if (!this[_tail])
-      this[_setTail](linkRet)
-  }
-
-  destroy (er) {
-    // set fire to the whole thing.
-    this[_streams].forEach(s =>
-      typeof s.destroy === 'function' && s.destroy())
-    return super.destroy(er)
-  }
-
-  // readable interface -> tail
-  [_setTail] (stream) {
-    this[_tail] = stream
-    stream.on('error', er => this[_onError](stream, er))
-    stream.on('data', chunk => this[_onData](stream, chunk))
-    stream.on('end', () => this[_onEnd](stream))
-    stream.on('finish', () => this[_onEnd](stream))
-  }
-
-  // errors proxied down the pipeline
-  // they're considered part of the "read" interface
-  [_onError] (stream, er) {
-    if (stream === this[_tail])
-      this.emit('error', er)
-  }
-  [_onData] (stream, chunk) {
-    if (stream === this[_tail])
-      super.write(chunk)
-  }
-  [_onEnd] (stream) {
-    if (stream === this[_tail])
-      super.end()
-  }
-  pause () {
-    super.pause()
-    return this[_tail] && this[_tail].pause && this[_tail].pause()
-  }
-
-  // NB: Minipass calls its internal private [RESUME] method during
-  // pipe drains, to avoid hazards where stream.resume() is overridden.
-  // Thus, we need to listen to the resume *event*, not override the
-  // resume() method, and proxy *that* to the tail.
-  emit (ev, ...args) {
-    if (ev === 'resume' && this[_tail] && this[_tail].resume)
-      this[_tail].resume()
-    return super.emit(ev, ...args)
-  }
-
-  // writable interface -> head
-  [_setHead] (stream) {
-    this[_head] = stream
-    stream.on('drain', () => this[_onDrain](stream))
-  }
-  [_onDrain] (stream) {
-    if (stream === this[_head])
-      this.emit('drain')
-  }
-  write (chunk, enc, cb) {
-    return this[_head].write(chunk, enc, cb) &&
-      (this.flowing || this.buffer.length === 0)
-  }
-  end (chunk, enc, cb) {
-    this[_head].end(chunk, enc, cb)
-    return this
-  }
-}
-
-module.exports = Pipeline
diff --git a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/LICENSE
deleted file mode 100644
index bf1dece..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js b/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js
deleted file mode 100644
index e8797aa..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/index.js
+++ /dev/null
@@ -1,649 +0,0 @@
-'use strict'
-const proc = typeof process === 'object' && process ? process : {
-  stdout: null,
-  stderr: null,
-}
-const EE = require('events')
-const Stream = require('stream')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const EMITTED_ERROR = Symbol('emittedError')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-const EMITDATA = Symbol('emitData')
-const EMITEND = Symbol('emitEnd')
-const EMITEND2 = Symbol('emitEnd2')
-const ASYNC = Symbol('async')
-
-const defer = fn => Promise.resolve().then(fn)
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_  !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
-  || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
-  || Symbol('iterator not implemented')
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
-  ev === 'end' ||
-  ev === 'finish' ||
-  ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
-  typeof b === 'object' &&
-  b.constructor &&
-  b.constructor.name === 'ArrayBuffer' &&
-  b.byteLength >= 0
-
-const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
-
-class Pipe {
-  constructor (src, dest, opts) {
-    this.src = src
-    this.dest = dest
-    this.opts = opts
-    this.ondrain = () => src[RESUME]()
-    dest.on('drain', this.ondrain)
-  }
-  unpipe () {
-    this.dest.removeListener('drain', this.ondrain)
-  }
-  // istanbul ignore next - only here for the prototype
-  proxyErrors () {}
-  end () {
-    this.unpipe()
-    if (this.opts.end)
-      this.dest.end()
-  }
-}
-
-class PipeProxyErrors extends Pipe {
-  unpipe () {
-    this.src.removeListener('error', this.proxyErrors)
-    super.unpipe()
-  }
-  constructor (src, dest, opts) {
-    super(src, dest, opts)
-    this.proxyErrors = er => dest.emit('error', er)
-    src.on('error', this.proxyErrors)
-  }
-}
-
-module.exports = class Minipass extends Stream {
-  constructor (options) {
-    super()
-    this[FLOWING] = false
-    // whether we're explicitly paused
-    this[PAUSED] = false
-    this.pipes = []
-    this.buffer = []
-    this[OBJECTMODE] = options && options.objectMode || false
-    if (this[OBJECTMODE])
-      this[ENCODING] = null
-    else
-      this[ENCODING] = options && options.encoding || null
-    if (this[ENCODING] === 'buffer')
-      this[ENCODING] = null
-    this[ASYNC] = options && !!options.async || false
-    this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
-    this[EOF] = false
-    this[EMITTED_END] = false
-    this[EMITTING_END] = false
-    this[CLOSED] = false
-    this[EMITTED_ERROR] = null
-    this.writable = true
-    this.readable = true
-    this[BUFFERLENGTH] = 0
-    this[DESTROYED] = false
-  }
-
-  get bufferLength () { return this[BUFFERLENGTH] }
-
-  get encoding () { return this[ENCODING] }
-  set encoding (enc) {
-    if (this[OBJECTMODE])
-      throw new Error('cannot set encoding in objectMode')
-
-    if (this[ENCODING] && enc !== this[ENCODING] &&
-        (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
-      throw new Error('cannot change encoding')
-
-    if (this[ENCODING] !== enc) {
-      this[DECODER] = enc ? new SD(enc) : null
-      if (this.buffer.length)
-        this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
-    }
-
-    this[ENCODING] = enc
-  }
-
-  setEncoding (enc) {
-    this.encoding = enc
-  }
-
-  get objectMode () { return this[OBJECTMODE] }
-  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
-
-  get ['async'] () { return this[ASYNC] }
-  set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
-
-  write (chunk, encoding, cb) {
-    if (this[EOF])
-      throw new Error('write after end')
-
-    if (this[DESTROYED]) {
-      this.emit('error', Object.assign(
-        new Error('Cannot call write after a stream was destroyed'),
-        { code: 'ERR_STREAM_DESTROYED' }
-      ))
-      return true
-    }
-
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const fn = this[ASYNC] ? defer : f => f()
-
-    // convert array buffers and typed array views into buffers
-    // at some point in the future, we may want to do the opposite!
-    // leave strings and buffers as-is
-    // anything else switches us into object mode
-    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-      if (isArrayBufferView(chunk))
-        chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
-      else if (isArrayBuffer(chunk))
-        chunk = Buffer.from(chunk)
-      else if (typeof chunk !== 'string')
-        // use the setter so we throw if we have encoding set
-        this.objectMode = true
-    }
-
-    // handle object mode up front, since it's simpler
-    // this yields better performance, fewer checks later.
-    if (this[OBJECTMODE]) {
-      /* istanbul ignore if - maybe impossible? */
-      if (this.flowing && this[BUFFERLENGTH] !== 0)
-        this[FLUSH](true)
-
-      if (this.flowing)
-        this.emit('data', chunk)
-      else
-        this[BUFFERPUSH](chunk)
-
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-
-      if (cb)
-        fn(cb)
-
-      return this.flowing
-    }
-
-    // at this point the chunk is a buffer or string
-    // don't buffer it up or send it to the decoder
-    if (!chunk.length) {
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-      if (cb)
-        fn(cb)
-      return this.flowing
-    }
-
-    // fast-path writing strings of same encoding to a stream with
-    // an empty buffer, skipping the buffer/decoder dance
-    if (typeof chunk === 'string' &&
-        // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
-      chunk = Buffer.from(chunk, encoding)
-    }
-
-    if (Buffer.isBuffer(chunk) && this[ENCODING])
-      chunk = this[DECODER].write(chunk)
-
-    // Note: flushing CAN potentially switch us into not-flowing mode
-    if (this.flowing && this[BUFFERLENGTH] !== 0)
-      this[FLUSH](true)
-
-    if (this.flowing)
-      this.emit('data', chunk)
-    else
-      this[BUFFERPUSH](chunk)
-
-    if (this[BUFFERLENGTH] !== 0)
-      this.emit('readable')
-
-    if (cb)
-      fn(cb)
-
-    return this.flowing
-  }
-
-  read (n) {
-    if (this[DESTROYED])
-      return null
-
-    if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
-      this[MAYBE_EMIT_END]()
-      return null
-    }
-
-    if (this[OBJECTMODE])
-      n = null
-
-    if (this.buffer.length > 1 && !this[OBJECTMODE]) {
-      if (this.encoding)
-        this.buffer = [this.buffer.join('')]
-      else
-        this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
-    }
-
-    const ret = this[READ](n || null, this.buffer[0])
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [READ] (n, chunk) {
-    if (n === chunk.length || n === null)
-      this[BUFFERSHIFT]()
-    else {
-      this.buffer[0] = chunk.slice(n)
-      chunk = chunk.slice(0, n)
-      this[BUFFERLENGTH] -= n
-    }
-
-    this.emit('data', chunk)
-
-    if (!this.buffer.length && !this[EOF])
-      this.emit('drain')
-
-    return chunk
-  }
-
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-    this[EOF] = true
-    this.writable = false
-
-    // if we haven't written anything, then go ahead and emit,
-    // even if we're not reading.
-    // we'll re-emit if a new 'end' listener is added anyway.
-    // This makes MP more suitable to write-only use cases.
-    if (this.flowing || !this[PAUSED])
-      this[MAYBE_EMIT_END]()
-    return this
-  }
-
-  // don't let the internal resume be overwritten
-  [RESUME] () {
-    if (this[DESTROYED])
-      return
-
-    this[PAUSED] = false
-    this[FLOWING] = true
-    this.emit('resume')
-    if (this.buffer.length)
-      this[FLUSH]()
-    else if (this[EOF])
-      this[MAYBE_EMIT_END]()
-    else
-      this.emit('drain')
-  }
-
-  resume () {
-    return this[RESUME]()
-  }
-
-  pause () {
-    this[FLOWING] = false
-    this[PAUSED] = true
-  }
-
-  get destroyed () {
-    return this[DESTROYED]
-  }
-
-  get flowing () {
-    return this[FLOWING]
-  }
-
-  get paused () {
-    return this[PAUSED]
-  }
-
-  [BUFFERPUSH] (chunk) {
-    if (this[OBJECTMODE])
-      this[BUFFERLENGTH] += 1
-    else
-      this[BUFFERLENGTH] += chunk.length
-    this.buffer.push(chunk)
-  }
-
-  [BUFFERSHIFT] () {
-    if (this.buffer.length) {
-      if (this[OBJECTMODE])
-        this[BUFFERLENGTH] -= 1
-      else
-        this[BUFFERLENGTH] -= this.buffer[0].length
-    }
-    return this.buffer.shift()
-  }
-
-  [FLUSH] (noDrain) {
-    do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
-    if (!noDrain && !this.buffer.length && !this[EOF])
-      this.emit('drain')
-  }
-
-  [FLUSHCHUNK] (chunk) {
-    return chunk ? (this.emit('data', chunk), this.flowing) : false
-  }
-
-  pipe (dest, opts) {
-    if (this[DESTROYED])
-      return
-
-    const ended = this[EMITTED_END]
-    opts = opts || {}
-    if (dest === proc.stdout || dest === proc.stderr)
-      opts.end = false
-    else
-      opts.end = opts.end !== false
-    opts.proxyErrors = !!opts.proxyErrors
-
-    // piping an ended stream ends immediately
-    if (ended) {
-      if (opts.end)
-        dest.end()
-    } else {
-      this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
-        : new PipeProxyErrors(this, dest, opts))
-      if (this[ASYNC])
-        defer(() => this[RESUME]())
-      else
-        this[RESUME]()
-    }
-
-    return dest
-  }
-
-  unpipe (dest) {
-    const p = this.pipes.find(p => p.dest === dest)
-    if (p) {
-      this.pipes.splice(this.pipes.indexOf(p), 1)
-      p.unpipe()
-    }
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'data' && !this.pipes.length && !this.flowing)
-      this[RESUME]()
-    else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
-      super.emit('readable')
-    else if (isEndish(ev) && this[EMITTED_END]) {
-      super.emit(ev)
-      this.removeAllListeners(ev)
-    } else if (ev === 'error' && this[EMITTED_ERROR]) {
-      if (this[ASYNC])
-        defer(() => fn.call(this, this[EMITTED_ERROR]))
-      else
-        fn.call(this, this[EMITTED_ERROR])
-    }
-    return ret
-  }
-
-  get emittedEnd () {
-    return this[EMITTED_END]
-  }
-
-  [MAYBE_EMIT_END] () {
-    if (!this[EMITTING_END] &&
-        !this[EMITTED_END] &&
-        !this[DESTROYED] &&
-        this.buffer.length === 0 &&
-        this[EOF]) {
-      this[EMITTING_END] = true
-      this.emit('end')
-      this.emit('prefinish')
-      this.emit('finish')
-      if (this[CLOSED])
-        this.emit('close')
-      this[EMITTING_END] = false
-    }
-  }
-
-  emit (ev, data, ...extra) {
-    // error and close are only events allowed after calling destroy()
-    if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
-      return
-    else if (ev === 'data') {
-      return !data ? false
-        : this[ASYNC] ? defer(() => this[EMITDATA](data))
-        : this[EMITDATA](data)
-    } else if (ev === 'end') {
-      return this[EMITEND]()
-    } else if (ev === 'close') {
-      this[CLOSED] = true
-      // don't emit close before 'end' and 'finish'
-      if (!this[EMITTED_END] && !this[DESTROYED])
-        return
-      const ret = super.emit('close')
-      this.removeAllListeners('close')
-      return ret
-    } else if (ev === 'error') {
-      this[EMITTED_ERROR] = data
-      const ret = super.emit('error', data)
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'resume') {
-      const ret = super.emit('resume')
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'finish' || ev === 'prefinish') {
-      const ret = super.emit(ev)
-      this.removeAllListeners(ev)
-      return ret
-    }
-
-    // Some other unknown event
-    const ret = super.emit(ev, data, ...extra)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITDATA] (data) {
-    for (const p of this.pipes) {
-      if (p.dest.write(data) === false)
-        this.pause()
-    }
-    const ret = super.emit('data', data)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITEND] () {
-    if (this[EMITTED_END])
-      return
-
-    this[EMITTED_END] = true
-    this.readable = false
-    if (this[ASYNC])
-      defer(() => this[EMITEND2]())
-    else
-      this[EMITEND2]()
-  }
-
-  [EMITEND2] () {
-    if (this[DECODER]) {
-      const data = this[DECODER].end()
-      if (data) {
-        for (const p of this.pipes) {
-          p.dest.write(data)
-        }
-        super.emit('data', data)
-      }
-    }
-
-    for (const p of this.pipes) {
-      p.end()
-    }
-    const ret = super.emit('end')
-    this.removeAllListeners('end')
-    return ret
-  }
-
-  // const all = await stream.collect()
-  collect () {
-    const buf = []
-    if (!this[OBJECTMODE])
-      buf.dataLength = 0
-    // set the promise first, in case an error is raised
-    // by triggering the flow here.
-    const p = this.promise()
-    this.on('data', c => {
-      buf.push(c)
-      if (!this[OBJECTMODE])
-        buf.dataLength += c.length
-    })
-    return p.then(() => buf)
-  }
-
-  // const data = await stream.concat()
-  concat () {
-    return this[OBJECTMODE]
-      ? Promise.reject(new Error('cannot concat in objectMode'))
-      : this.collect().then(buf =>
-          this[OBJECTMODE]
-            ? Promise.reject(new Error('cannot concat in objectMode'))
-            : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength))
-  }
-
-  // stream.promise().then(() => done, er => emitted error)
-  promise () {
-    return new Promise((resolve, reject) => {
-      this.on(DESTROYED, () => reject(new Error('stream destroyed')))
-      this.on('error', er => reject(er))
-      this.on('end', () => resolve())
-    })
-  }
-
-  // for await (let chunk of stream)
-  [ASYNCITERATOR] () {
-    const next = () => {
-      const res = this.read()
-      if (res !== null)
-        return Promise.resolve({ done: false, value: res })
-
-      if (this[EOF])
-        return Promise.resolve({ done: true })
-
-      let resolve = null
-      let reject = null
-      const onerr = er => {
-        this.removeListener('data', ondata)
-        this.removeListener('end', onend)
-        reject(er)
-      }
-      const ondata = value => {
-        this.removeListener('error', onerr)
-        this.removeListener('end', onend)
-        this.pause()
-        resolve({ value: value, done: !!this[EOF] })
-      }
-      const onend = () => {
-        this.removeListener('error', onerr)
-        this.removeListener('data', ondata)
-        resolve({ done: true })
-      }
-      const ondestroy = () => onerr(new Error('stream destroyed'))
-      return new Promise((res, rej) => {
-        reject = rej
-        resolve = res
-        this.once(DESTROYED, ondestroy)
-        this.once('error', onerr)
-        this.once('end', onend)
-        this.once('data', ondata)
-      })
-    }
-
-    return { next }
-  }
-
-  // for (let chunk of stream)
-  [ITERATOR] () {
-    const next = () => {
-      const value = this.read()
-      const done = value === null
-      return { value, done }
-    }
-    return { next }
-  }
-
-  destroy (er) {
-    if (this[DESTROYED]) {
-      if (er)
-        this.emit('error', er)
-      else
-        this.emit(DESTROYED)
-      return this
-    }
-
-    this[DESTROYED] = true
-
-    // throw away all buffered data, it's never coming out
-    this.buffer.length = 0
-    this[BUFFERLENGTH] = 0
-
-    if (typeof this.close === 'function' && !this[CLOSED])
-      this.close()
-
-    if (er)
-      this.emit('error', er)
-    else // if no error to emit, still reject pending promises
-      this.emit(DESTROYED)
-
-    return this
-  }
-
-  static isStream (s) {
-    return !!s && (s instanceof Minipass || s instanceof Stream ||
-      s instanceof EE && (
-        typeof s.pipe === 'function' || // readable
-        (typeof s.write === 'function' && typeof s.end === 'function') // writable
-      ))
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json b/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json
deleted file mode 100644
index 548d03f..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/node_modules/minipass/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "name": "minipass",
-  "version": "3.3.6",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "index.js",
-  "types": "index.d.ts",
-  "dependencies": {
-    "yallist": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/node": "^17.0.41",
-    "end-of-stream": "^1.4.0",
-    "prettier": "^2.6.2",
-    "tap": "^16.2.0",
-    "through2": "^2.0.3",
-    "ts-node": "^10.8.1",
-    "typescript": "^4.7.3"
-  },
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass.git"
-  },
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "files": [
-    "index.d.ts",
-    "index.js"
-  ],
-  "tap": {
-    "check-coverage": true
-  },
-  "engines": {
-    "node": ">=8"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-pipeline/package.json b/node_modules/npm/node_modules/minipass-pipeline/package.json
deleted file mode 100644
index d608dc6..0000000
--- a/node_modules/npm/node_modules/minipass-pipeline/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "name": "minipass-pipeline",
-  "version": "1.2.4",
-  "description": "create a pipeline of streams using Minipass",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^14.6.9"
-  },
-  "dependencies": {
-    "minipass": "^3.0.0"
-  },
-  "files": [
-    "index.js"
-  ],
-  "engines": {
-    "node": ">=8"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-sized/LICENSE b/node_modules/npm/node_modules/minipass-sized/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/minipass-sized/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-sized/index.js b/node_modules/npm/node_modules/minipass-sized/index.js
deleted file mode 100644
index a0c8acd..0000000
--- a/node_modules/npm/node_modules/minipass-sized/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-const Minipass = require('minipass')
-
-class SizeError extends Error {
-  constructor (found, expect) {
-    super(`Bad data size: expected ${expect} bytes, but got ${found}`)
-    this.expect = expect
-    this.found = found
-    this.code = 'EBADSIZE'
-	  Error.captureStackTrace(this, this.constructor)
-  }
-  get name () {
-    return 'SizeError'
-  }
-}
-
-class MinipassSized extends Minipass {
-  constructor (options = {}) {
-    super(options)
-
-    if (options.objectMode)
-      throw new TypeError(`${
-        this.constructor.name
-      } streams only work with string and buffer data`)
-
-    this.found = 0
-    this.expect = options.size
-    if (typeof this.expect !== 'number' ||
-        this.expect > Number.MAX_SAFE_INTEGER ||
-        isNaN(this.expect) ||
-        this.expect < 0 ||
-        !isFinite(this.expect) ||
-        this.expect !== Math.floor(this.expect))
-      throw new Error('invalid expected size: ' + this.expect)
-  }
-
-  write (chunk, encoding, cb) {
-    const buffer = Buffer.isBuffer(chunk) ? chunk
-      : typeof chunk === 'string' ?
-        Buffer.from(chunk, typeof encoding === 'string' ? encoding : 'utf8')
-      : chunk
-
-    if (!Buffer.isBuffer(buffer)) {
-      this.emit('error', new TypeError(`${
-        this.constructor.name
-      } streams only work with string and buffer data`))
-      return false
-    }
-
-    this.found += buffer.length
-    if (this.found > this.expect)
-      this.emit('error', new SizeError(this.found, this.expect))
-
-    return super.write(chunk, encoding, cb)
-  }
-
-  emit (ev, ...data) {
-    if (ev === 'end') {
-      if (this.found !== this.expect)
-        this.emit('error', new SizeError(this.found, this.expect))
-    }
-    return super.emit(ev, ...data)
-  }
-}
-
-MinipassSized.SizeError = SizeError
-
-module.exports = MinipassSized
diff --git a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/LICENSE
deleted file mode 100644
index bf1dece..0000000
--- a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/index.js b/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/index.js
deleted file mode 100644
index e8797aa..0000000
--- a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/index.js
+++ /dev/null
@@ -1,649 +0,0 @@
-'use strict'
-const proc = typeof process === 'object' && process ? process : {
-  stdout: null,
-  stderr: null,
-}
-const EE = require('events')
-const Stream = require('stream')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const EMITTED_ERROR = Symbol('emittedError')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-const EMITDATA = Symbol('emitData')
-const EMITEND = Symbol('emitEnd')
-const EMITEND2 = Symbol('emitEnd2')
-const ASYNC = Symbol('async')
-
-const defer = fn => Promise.resolve().then(fn)
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_  !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
-  || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
-  || Symbol('iterator not implemented')
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
-  ev === 'end' ||
-  ev === 'finish' ||
-  ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
-  typeof b === 'object' &&
-  b.constructor &&
-  b.constructor.name === 'ArrayBuffer' &&
-  b.byteLength >= 0
-
-const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
-
-class Pipe {
-  constructor (src, dest, opts) {
-    this.src = src
-    this.dest = dest
-    this.opts = opts
-    this.ondrain = () => src[RESUME]()
-    dest.on('drain', this.ondrain)
-  }
-  unpipe () {
-    this.dest.removeListener('drain', this.ondrain)
-  }
-  // istanbul ignore next - only here for the prototype
-  proxyErrors () {}
-  end () {
-    this.unpipe()
-    if (this.opts.end)
-      this.dest.end()
-  }
-}
-
-class PipeProxyErrors extends Pipe {
-  unpipe () {
-    this.src.removeListener('error', this.proxyErrors)
-    super.unpipe()
-  }
-  constructor (src, dest, opts) {
-    super(src, dest, opts)
-    this.proxyErrors = er => dest.emit('error', er)
-    src.on('error', this.proxyErrors)
-  }
-}
-
-module.exports = class Minipass extends Stream {
-  constructor (options) {
-    super()
-    this[FLOWING] = false
-    // whether we're explicitly paused
-    this[PAUSED] = false
-    this.pipes = []
-    this.buffer = []
-    this[OBJECTMODE] = options && options.objectMode || false
-    if (this[OBJECTMODE])
-      this[ENCODING] = null
-    else
-      this[ENCODING] = options && options.encoding || null
-    if (this[ENCODING] === 'buffer')
-      this[ENCODING] = null
-    this[ASYNC] = options && !!options.async || false
-    this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
-    this[EOF] = false
-    this[EMITTED_END] = false
-    this[EMITTING_END] = false
-    this[CLOSED] = false
-    this[EMITTED_ERROR] = null
-    this.writable = true
-    this.readable = true
-    this[BUFFERLENGTH] = 0
-    this[DESTROYED] = false
-  }
-
-  get bufferLength () { return this[BUFFERLENGTH] }
-
-  get encoding () { return this[ENCODING] }
-  set encoding (enc) {
-    if (this[OBJECTMODE])
-      throw new Error('cannot set encoding in objectMode')
-
-    if (this[ENCODING] && enc !== this[ENCODING] &&
-        (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
-      throw new Error('cannot change encoding')
-
-    if (this[ENCODING] !== enc) {
-      this[DECODER] = enc ? new SD(enc) : null
-      if (this.buffer.length)
-        this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
-    }
-
-    this[ENCODING] = enc
-  }
-
-  setEncoding (enc) {
-    this.encoding = enc
-  }
-
-  get objectMode () { return this[OBJECTMODE] }
-  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
-
-  get ['async'] () { return this[ASYNC] }
-  set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
-
-  write (chunk, encoding, cb) {
-    if (this[EOF])
-      throw new Error('write after end')
-
-    if (this[DESTROYED]) {
-      this.emit('error', Object.assign(
-        new Error('Cannot call write after a stream was destroyed'),
-        { code: 'ERR_STREAM_DESTROYED' }
-      ))
-      return true
-    }
-
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const fn = this[ASYNC] ? defer : f => f()
-
-    // convert array buffers and typed array views into buffers
-    // at some point in the future, we may want to do the opposite!
-    // leave strings and buffers as-is
-    // anything else switches us into object mode
-    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-      if (isArrayBufferView(chunk))
-        chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
-      else if (isArrayBuffer(chunk))
-        chunk = Buffer.from(chunk)
-      else if (typeof chunk !== 'string')
-        // use the setter so we throw if we have encoding set
-        this.objectMode = true
-    }
-
-    // handle object mode up front, since it's simpler
-    // this yields better performance, fewer checks later.
-    if (this[OBJECTMODE]) {
-      /* istanbul ignore if - maybe impossible? */
-      if (this.flowing && this[BUFFERLENGTH] !== 0)
-        this[FLUSH](true)
-
-      if (this.flowing)
-        this.emit('data', chunk)
-      else
-        this[BUFFERPUSH](chunk)
-
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-
-      if (cb)
-        fn(cb)
-
-      return this.flowing
-    }
-
-    // at this point the chunk is a buffer or string
-    // don't buffer it up or send it to the decoder
-    if (!chunk.length) {
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-      if (cb)
-        fn(cb)
-      return this.flowing
-    }
-
-    // fast-path writing strings of same encoding to a stream with
-    // an empty buffer, skipping the buffer/decoder dance
-    if (typeof chunk === 'string' &&
-        // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
-      chunk = Buffer.from(chunk, encoding)
-    }
-
-    if (Buffer.isBuffer(chunk) && this[ENCODING])
-      chunk = this[DECODER].write(chunk)
-
-    // Note: flushing CAN potentially switch us into not-flowing mode
-    if (this.flowing && this[BUFFERLENGTH] !== 0)
-      this[FLUSH](true)
-
-    if (this.flowing)
-      this.emit('data', chunk)
-    else
-      this[BUFFERPUSH](chunk)
-
-    if (this[BUFFERLENGTH] !== 0)
-      this.emit('readable')
-
-    if (cb)
-      fn(cb)
-
-    return this.flowing
-  }
-
-  read (n) {
-    if (this[DESTROYED])
-      return null
-
-    if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
-      this[MAYBE_EMIT_END]()
-      return null
-    }
-
-    if (this[OBJECTMODE])
-      n = null
-
-    if (this.buffer.length > 1 && !this[OBJECTMODE]) {
-      if (this.encoding)
-        this.buffer = [this.buffer.join('')]
-      else
-        this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
-    }
-
-    const ret = this[READ](n || null, this.buffer[0])
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [READ] (n, chunk) {
-    if (n === chunk.length || n === null)
-      this[BUFFERSHIFT]()
-    else {
-      this.buffer[0] = chunk.slice(n)
-      chunk = chunk.slice(0, n)
-      this[BUFFERLENGTH] -= n
-    }
-
-    this.emit('data', chunk)
-
-    if (!this.buffer.length && !this[EOF])
-      this.emit('drain')
-
-    return chunk
-  }
-
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-    this[EOF] = true
-    this.writable = false
-
-    // if we haven't written anything, then go ahead and emit,
-    // even if we're not reading.
-    // we'll re-emit if a new 'end' listener is added anyway.
-    // This makes MP more suitable to write-only use cases.
-    if (this.flowing || !this[PAUSED])
-      this[MAYBE_EMIT_END]()
-    return this
-  }
-
-  // don't let the internal resume be overwritten
-  [RESUME] () {
-    if (this[DESTROYED])
-      return
-
-    this[PAUSED] = false
-    this[FLOWING] = true
-    this.emit('resume')
-    if (this.buffer.length)
-      this[FLUSH]()
-    else if (this[EOF])
-      this[MAYBE_EMIT_END]()
-    else
-      this.emit('drain')
-  }
-
-  resume () {
-    return this[RESUME]()
-  }
-
-  pause () {
-    this[FLOWING] = false
-    this[PAUSED] = true
-  }
-
-  get destroyed () {
-    return this[DESTROYED]
-  }
-
-  get flowing () {
-    return this[FLOWING]
-  }
-
-  get paused () {
-    return this[PAUSED]
-  }
-
-  [BUFFERPUSH] (chunk) {
-    if (this[OBJECTMODE])
-      this[BUFFERLENGTH] += 1
-    else
-      this[BUFFERLENGTH] += chunk.length
-    this.buffer.push(chunk)
-  }
-
-  [BUFFERSHIFT] () {
-    if (this.buffer.length) {
-      if (this[OBJECTMODE])
-        this[BUFFERLENGTH] -= 1
-      else
-        this[BUFFERLENGTH] -= this.buffer[0].length
-    }
-    return this.buffer.shift()
-  }
-
-  [FLUSH] (noDrain) {
-    do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
-    if (!noDrain && !this.buffer.length && !this[EOF])
-      this.emit('drain')
-  }
-
-  [FLUSHCHUNK] (chunk) {
-    return chunk ? (this.emit('data', chunk), this.flowing) : false
-  }
-
-  pipe (dest, opts) {
-    if (this[DESTROYED])
-      return
-
-    const ended = this[EMITTED_END]
-    opts = opts || {}
-    if (dest === proc.stdout || dest === proc.stderr)
-      opts.end = false
-    else
-      opts.end = opts.end !== false
-    opts.proxyErrors = !!opts.proxyErrors
-
-    // piping an ended stream ends immediately
-    if (ended) {
-      if (opts.end)
-        dest.end()
-    } else {
-      this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
-        : new PipeProxyErrors(this, dest, opts))
-      if (this[ASYNC])
-        defer(() => this[RESUME]())
-      else
-        this[RESUME]()
-    }
-
-    return dest
-  }
-
-  unpipe (dest) {
-    const p = this.pipes.find(p => p.dest === dest)
-    if (p) {
-      this.pipes.splice(this.pipes.indexOf(p), 1)
-      p.unpipe()
-    }
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'data' && !this.pipes.length && !this.flowing)
-      this[RESUME]()
-    else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
-      super.emit('readable')
-    else if (isEndish(ev) && this[EMITTED_END]) {
-      super.emit(ev)
-      this.removeAllListeners(ev)
-    } else if (ev === 'error' && this[EMITTED_ERROR]) {
-      if (this[ASYNC])
-        defer(() => fn.call(this, this[EMITTED_ERROR]))
-      else
-        fn.call(this, this[EMITTED_ERROR])
-    }
-    return ret
-  }
-
-  get emittedEnd () {
-    return this[EMITTED_END]
-  }
-
-  [MAYBE_EMIT_END] () {
-    if (!this[EMITTING_END] &&
-        !this[EMITTED_END] &&
-        !this[DESTROYED] &&
-        this.buffer.length === 0 &&
-        this[EOF]) {
-      this[EMITTING_END] = true
-      this.emit('end')
-      this.emit('prefinish')
-      this.emit('finish')
-      if (this[CLOSED])
-        this.emit('close')
-      this[EMITTING_END] = false
-    }
-  }
-
-  emit (ev, data, ...extra) {
-    // error and close are only events allowed after calling destroy()
-    if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
-      return
-    else if (ev === 'data') {
-      return !data ? false
-        : this[ASYNC] ? defer(() => this[EMITDATA](data))
-        : this[EMITDATA](data)
-    } else if (ev === 'end') {
-      return this[EMITEND]()
-    } else if (ev === 'close') {
-      this[CLOSED] = true
-      // don't emit close before 'end' and 'finish'
-      if (!this[EMITTED_END] && !this[DESTROYED])
-        return
-      const ret = super.emit('close')
-      this.removeAllListeners('close')
-      return ret
-    } else if (ev === 'error') {
-      this[EMITTED_ERROR] = data
-      const ret = super.emit('error', data)
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'resume') {
-      const ret = super.emit('resume')
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'finish' || ev === 'prefinish') {
-      const ret = super.emit(ev)
-      this.removeAllListeners(ev)
-      return ret
-    }
-
-    // Some other unknown event
-    const ret = super.emit(ev, data, ...extra)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITDATA] (data) {
-    for (const p of this.pipes) {
-      if (p.dest.write(data) === false)
-        this.pause()
-    }
-    const ret = super.emit('data', data)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITEND] () {
-    if (this[EMITTED_END])
-      return
-
-    this[EMITTED_END] = true
-    this.readable = false
-    if (this[ASYNC])
-      defer(() => this[EMITEND2]())
-    else
-      this[EMITEND2]()
-  }
-
-  [EMITEND2] () {
-    if (this[DECODER]) {
-      const data = this[DECODER].end()
-      if (data) {
-        for (const p of this.pipes) {
-          p.dest.write(data)
-        }
-        super.emit('data', data)
-      }
-    }
-
-    for (const p of this.pipes) {
-      p.end()
-    }
-    const ret = super.emit('end')
-    this.removeAllListeners('end')
-    return ret
-  }
-
-  // const all = await stream.collect()
-  collect () {
-    const buf = []
-    if (!this[OBJECTMODE])
-      buf.dataLength = 0
-    // set the promise first, in case an error is raised
-    // by triggering the flow here.
-    const p = this.promise()
-    this.on('data', c => {
-      buf.push(c)
-      if (!this[OBJECTMODE])
-        buf.dataLength += c.length
-    })
-    return p.then(() => buf)
-  }
-
-  // const data = await stream.concat()
-  concat () {
-    return this[OBJECTMODE]
-      ? Promise.reject(new Error('cannot concat in objectMode'))
-      : this.collect().then(buf =>
-          this[OBJECTMODE]
-            ? Promise.reject(new Error('cannot concat in objectMode'))
-            : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength))
-  }
-
-  // stream.promise().then(() => done, er => emitted error)
-  promise () {
-    return new Promise((resolve, reject) => {
-      this.on(DESTROYED, () => reject(new Error('stream destroyed')))
-      this.on('error', er => reject(er))
-      this.on('end', () => resolve())
-    })
-  }
-
-  // for await (let chunk of stream)
-  [ASYNCITERATOR] () {
-    const next = () => {
-      const res = this.read()
-      if (res !== null)
-        return Promise.resolve({ done: false, value: res })
-
-      if (this[EOF])
-        return Promise.resolve({ done: true })
-
-      let resolve = null
-      let reject = null
-      const onerr = er => {
-        this.removeListener('data', ondata)
-        this.removeListener('end', onend)
-        reject(er)
-      }
-      const ondata = value => {
-        this.removeListener('error', onerr)
-        this.removeListener('end', onend)
-        this.pause()
-        resolve({ value: value, done: !!this[EOF] })
-      }
-      const onend = () => {
-        this.removeListener('error', onerr)
-        this.removeListener('data', ondata)
-        resolve({ done: true })
-      }
-      const ondestroy = () => onerr(new Error('stream destroyed'))
-      return new Promise((res, rej) => {
-        reject = rej
-        resolve = res
-        this.once(DESTROYED, ondestroy)
-        this.once('error', onerr)
-        this.once('end', onend)
-        this.once('data', ondata)
-      })
-    }
-
-    return { next }
-  }
-
-  // for (let chunk of stream)
-  [ITERATOR] () {
-    const next = () => {
-      const value = this.read()
-      const done = value === null
-      return { value, done }
-    }
-    return { next }
-  }
-
-  destroy (er) {
-    if (this[DESTROYED]) {
-      if (er)
-        this.emit('error', er)
-      else
-        this.emit(DESTROYED)
-      return this
-    }
-
-    this[DESTROYED] = true
-
-    // throw away all buffered data, it's never coming out
-    this.buffer.length = 0
-    this[BUFFERLENGTH] = 0
-
-    if (typeof this.close === 'function' && !this[CLOSED])
-      this.close()
-
-    if (er)
-      this.emit('error', er)
-    else // if no error to emit, still reject pending promises
-      this.emit(DESTROYED)
-
-    return this
-  }
-
-  static isStream (s) {
-    return !!s && (s instanceof Minipass || s instanceof Stream ||
-      s instanceof EE && (
-        typeof s.pipe === 'function' || // readable
-        (typeof s.write === 'function' && typeof s.end === 'function') // writable
-      ))
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/package.json b/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/package.json
deleted file mode 100644
index 548d03f..0000000
--- a/node_modules/npm/node_modules/minipass-sized/node_modules/minipass/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "name": "minipass",
-  "version": "3.3.6",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "index.js",
-  "types": "index.d.ts",
-  "dependencies": {
-    "yallist": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/node": "^17.0.41",
-    "end-of-stream": "^1.4.0",
-    "prettier": "^2.6.2",
-    "tap": "^16.2.0",
-    "through2": "^2.0.3",
-    "ts-node": "^10.8.1",
-    "typescript": "^4.7.3"
-  },
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass.git"
-  },
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "files": [
-    "index.d.ts",
-    "index.js"
-  ],
-  "tap": {
-    "check-coverage": true
-  },
-  "engines": {
-    "node": ">=8"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-sized/package.json b/node_modules/npm/node_modules/minipass-sized/package.json
deleted file mode 100644
index a3257fd..0000000
--- a/node_modules/npm/node_modules/minipass-sized/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-  "name": "minipass-sized",
-  "version": "1.0.3",
-  "description": "A Minipass stream that raises an error if you get a different number of bytes than expected",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^14.6.4"
-  },
-  "dependencies": {
-    "minipass": "^3.0.0"
-  },
-  "main": "index.js",
-  "keywords": [
-    "minipass",
-    "size",
-    "length"
-  ],
-  "directories": {
-    "test": "test"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass-sized.git"
-  },
-  "engines": {
-    "node": ">=8"
-  }
-}
diff --git a/node_modules/npm/node_modules/minipass-sized/test/basic.js b/node_modules/npm/node_modules/minipass-sized/test/basic.js
deleted file mode 100644
index bbdcada..0000000
--- a/node_modules/npm/node_modules/minipass-sized/test/basic.js
+++ /dev/null
@@ -1,83 +0,0 @@
-const t = require('tap')
-const MPS = require('../')
-
-t.test('ok if size checks out', t => {
-  const mps = new MPS({ size: 4 })
-
-  mps.write(Buffer.from('a').toString('hex'), 'hex')
-  mps.write(Buffer.from('sd'))
-  mps.end('f')
-  return mps.concat().then(data => t.equal(data.toString(), 'asdf'))
-})
-
-t.test('error if size exceeded', t => {
-  const mps = new MPS({ size: 1 })
-  mps.on('error', er => {
-    t.match(er, {
-      message: 'Bad data size: expected 1 bytes, but got 4',
-      found: 4,
-      expect: 1,
-      code: 'EBADSIZE',
-      name: 'SizeError',
-    })
-    t.end()
-  })
-  mps.write('asdf')
-})
-
-t.test('error if size is not met', t => {
-  const mps = new MPS({ size: 999 })
-  t.throws(() => mps.end(), {
-    message: 'Bad data size: expected 999 bytes, but got 0',
-    found: 0,
-    name: 'SizeError',
-    expect: 999,
-    code: 'EBADSIZE',
-  })
-  t.end()
-})
-
-t.test('error if non-string/buffer is written', t => {
-  const mps = new MPS({size:1})
-  mps.on('error', er => {
-    t.match(er, {
-      message: 'MinipassSized streams only work with string and buffer data'
-    })
-    t.end()
-  })
-  mps.write({some:'object'})
-})
-
-t.test('projectiles', t => {
-  t.throws(() => new MPS(), {
-    message: 'invalid expected size: undefined'
-  }, 'size is required')
-  t.throws(() => new MPS({size: true}), {
-    message: 'invalid expected size: true'
-  }, 'size must be number')
-  t.throws(() => new MPS({size: NaN}), {
-    message: 'invalid expected size: NaN'
-  }, 'size must not be NaN')
-  t.throws(() => new MPS({size:1.2}), {
-    message: 'invalid expected size: 1.2'
-  }, 'size must be integer')
-  t.throws(() => new MPS({size: Infinity}), {
-    message: 'invalid expected size: Infinity'
-  }, 'size must be finite')
-  t.throws(() => new MPS({size: -1}), {
-    message: 'invalid expected size: -1'
-  }, 'size must be positive')
-  t.throws(() => new MPS({objectMode: true}), {
-    message: 'MinipassSized streams only work with string and buffer data'
-  }, 'no objectMode')
-  t.throws(() => new MPS({size: Number.MAX_SAFE_INTEGER + 1000000}), {
-    message: 'invalid expected size: 9007199255740992'
-  })
-  t.end()
-})
-
-t.test('exports SizeError class', t => {
-  t.isa(MPS.SizeError, 'function')
-  t.isa(MPS.SizeError.prototype, Error)
-  t.end()
-})
diff --git a/node_modules/npm/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minipass/LICENSE
deleted file mode 100644
index 97f8e32..0000000
--- a/node_modules/npm/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minipass/dist/commonjs/index.js b/node_modules/npm/node_modules/minipass/dist/commonjs/index.js
deleted file mode 100644
index b6cdae8..0000000
--- a/node_modules/npm/node_modules/minipass/dist/commonjs/index.js
+++ /dev/null
@@ -1,1028 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
-    return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Minipass = exports.isWritable = exports.isReadable = exports.isStream = void 0;
-const proc = typeof process === 'object' && process
-    ? process
-    : {
-        stdout: null,
-        stderr: null,
-    };
-const events_1 = require("events");
-const stream_1 = __importDefault(require("stream"));
-const string_decoder_1 = require("string_decoder");
-/**
- * Return true if the argument is a Minipass stream, Node stream, or something
- * else that Minipass can interact with.
- */
-const isStream = (s) => !!s &&
-    typeof s === 'object' &&
-    (s instanceof Minipass ||
-        s instanceof stream_1.default ||
-        (0, exports.isReadable)(s) ||
-        (0, exports.isWritable)(s));
-exports.isStream = isStream;
-/**
- * Return true if the argument is a valid {@link Minipass.Readable}
- */
-const isReadable = (s) => !!s &&
-    typeof s === 'object' &&
-    s instanceof events_1.EventEmitter &&
-    typeof s.pipe === 'function' &&
-    // node core Writable streams have a pipe() method, but it throws
-    s.pipe !== stream_1.default.Writable.prototype.pipe;
-exports.isReadable = isReadable;
-/**
- * Return true if the argument is a valid {@link Minipass.Writable}
- */
-const isWritable = (s) => !!s &&
-    typeof s === 'object' &&
-    s instanceof events_1.EventEmitter &&
-    typeof s.write === 'function' &&
-    typeof s.end === 'function';
-exports.isWritable = isWritable;
-const EOF = Symbol('EOF');
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd');
-const EMITTED_END = Symbol('emittedEnd');
-const EMITTING_END = Symbol('emittingEnd');
-const EMITTED_ERROR = Symbol('emittedError');
-const CLOSED = Symbol('closed');
-const READ = Symbol('read');
-const FLUSH = Symbol('flush');
-const FLUSHCHUNK = Symbol('flushChunk');
-const ENCODING = Symbol('encoding');
-const DECODER = Symbol('decoder');
-const FLOWING = Symbol('flowing');
-const PAUSED = Symbol('paused');
-const RESUME = Symbol('resume');
-const BUFFER = Symbol('buffer');
-const PIPES = Symbol('pipes');
-const BUFFERLENGTH = Symbol('bufferLength');
-const BUFFERPUSH = Symbol('bufferPush');
-const BUFFERSHIFT = Symbol('bufferShift');
-const OBJECTMODE = Symbol('objectMode');
-// internal event when stream is destroyed
-const DESTROYED = Symbol('destroyed');
-// internal event when stream has an error
-const ERROR = Symbol('error');
-const EMITDATA = Symbol('emitData');
-const EMITEND = Symbol('emitEnd');
-const EMITEND2 = Symbol('emitEnd2');
-const ASYNC = Symbol('async');
-const ABORT = Symbol('abort');
-const ABORTED = Symbol('aborted');
-const SIGNAL = Symbol('signal');
-const DATALISTENERS = Symbol('dataListeners');
-const DISCARDED = Symbol('discarded');
-const defer = (fn) => Promise.resolve().then(fn);
-const nodefer = (fn) => fn();
-const isEndish = (ev) => ev === 'end' || ev === 'finish' || ev === 'prefinish';
-const isArrayBufferLike = (b) => b instanceof ArrayBuffer ||
-    (!!b &&
-        typeof b === 'object' &&
-        b.constructor &&
-        b.constructor.name === 'ArrayBuffer' &&
-        b.byteLength >= 0);
-const isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
-/**
- * Internal class representing a pipe to a destination stream.
- *
- * @internal
- */
-class Pipe {
-    src;
-    dest;
-    opts;
-    ondrain;
-    constructor(src, dest, opts) {
-        this.src = src;
-        this.dest = dest;
-        this.opts = opts;
-        this.ondrain = () => src[RESUME]();
-        this.dest.on('drain', this.ondrain);
-    }
-    unpipe() {
-        this.dest.removeListener('drain', this.ondrain);
-    }
-    // only here for the prototype
-    /* c8 ignore start */
-    proxyErrors(_er) { }
-    /* c8 ignore stop */
-    end() {
-        this.unpipe();
-        if (this.opts.end)
-            this.dest.end();
-    }
-}
-/**
- * Internal class representing a pipe to a destination stream where
- * errors are proxied.
- *
- * @internal
- */
-class PipeProxyErrors extends Pipe {
-    unpipe() {
-        this.src.removeListener('error', this.proxyErrors);
-        super.unpipe();
-    }
-    constructor(src, dest, opts) {
-        super(src, dest, opts);
-        this.proxyErrors = er => dest.emit('error', er);
-        src.on('error', this.proxyErrors);
-    }
-}
-const isObjectModeOptions = (o) => !!o.objectMode;
-const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== 'buffer';
-/**
- * Main export, the Minipass class
- *
- * `RType` is the type of data emitted, defaults to Buffer
- *
- * `WType` is the type of data to be written, if RType is buffer or string,
- * then any {@link Minipass.ContiguousData} is allowed.
- *
- * `Events` is the set of event handler signatures that this object
- * will emit, see {@link Minipass.Events}
- */
-class Minipass extends events_1.EventEmitter {
-    [FLOWING] = false;
-    [PAUSED] = false;
-    [PIPES] = [];
-    [BUFFER] = [];
-    [OBJECTMODE];
-    [ENCODING];
-    [ASYNC];
-    [DECODER];
-    [EOF] = false;
-    [EMITTED_END] = false;
-    [EMITTING_END] = false;
-    [CLOSED] = false;
-    [EMITTED_ERROR] = null;
-    [BUFFERLENGTH] = 0;
-    [DESTROYED] = false;
-    [SIGNAL];
-    [ABORTED] = false;
-    [DATALISTENERS] = 0;
-    [DISCARDED] = false;
-    /**
-     * true if the stream can be written
-     */
-    writable = true;
-    /**
-     * true if the stream can be read
-     */
-    readable = true;
-    /**
-     * If `RType` is Buffer, then options do not need to be provided.
-     * Otherwise, an options object must be provided to specify either
-     * {@link Minipass.SharedOptions.objectMode} or
-     * {@link Minipass.SharedOptions.encoding}, as appropriate.
-     */
-    constructor(...args) {
-        const options = (args[0] ||
-            {});
-        super();
-        if (options.objectMode && typeof options.encoding === 'string') {
-            throw new TypeError('Encoding and objectMode may not be used together');
-        }
-        if (isObjectModeOptions(options)) {
-            this[OBJECTMODE] = true;
-            this[ENCODING] = null;
-        }
-        else if (isEncodingOptions(options)) {
-            this[ENCODING] = options.encoding;
-            this[OBJECTMODE] = false;
-        }
-        else {
-            this[OBJECTMODE] = false;
-            this[ENCODING] = null;
-        }
-        this[ASYNC] = !!options.async;
-        this[DECODER] = this[ENCODING]
-            ? new string_decoder_1.StringDecoder(this[ENCODING])
-            : null;
-        //@ts-ignore - private option for debugging and testing
-        if (options && options.debugExposeBuffer === true) {
-            Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] });
-        }
-        //@ts-ignore - private option for debugging and testing
-        if (options && options.debugExposePipes === true) {
-            Object.defineProperty(this, 'pipes', { get: () => this[PIPES] });
-        }
-        const { signal } = options;
-        if (signal) {
-            this[SIGNAL] = signal;
-            if (signal.aborted) {
-                this[ABORT]();
-            }
-            else {
-                signal.addEventListener('abort', () => this[ABORT]());
-            }
-        }
-    }
-    /**
-     * The amount of data stored in the buffer waiting to be read.
-     *
-     * For Buffer strings, this will be the total byte length.
-     * For string encoding streams, this will be the string character length,
-     * according to JavaScript's `string.length` logic.
-     * For objectMode streams, this is a count of the items waiting to be
-     * emitted.
-     */
-    get bufferLength() {
-        return this[BUFFERLENGTH];
-    }
-    /**
-     * The `BufferEncoding` currently in use, or `null`
-     */
-    get encoding() {
-        return this[ENCODING];
-    }
-    /**
-     * @deprecated - This is a read only property
-     */
-    set encoding(_enc) {
-        throw new Error('Encoding must be set at instantiation time');
-    }
-    /**
-     * @deprecated - Encoding may only be set at instantiation time
-     */
-    setEncoding(_enc) {
-        throw new Error('Encoding must be set at instantiation time');
-    }
-    /**
-     * True if this is an objectMode stream
-     */
-    get objectMode() {
-        return this[OBJECTMODE];
-    }
-    /**
-     * @deprecated - This is a read-only property
-     */
-    set objectMode(_om) {
-        throw new Error('objectMode must be set at instantiation time');
-    }
-    /**
-     * true if this is an async stream
-     */
-    get ['async']() {
-        return this[ASYNC];
-    }
-    /**
-     * Set to true to make this stream async.
-     *
-     * Once set, it cannot be unset, as this would potentially cause incorrect
-     * behavior.  Ie, a sync stream can be made async, but an async stream
-     * cannot be safely made sync.
-     */
-    set ['async'](a) {
-        this[ASYNC] = this[ASYNC] || !!a;
-    }
-    // drop everything and get out of the flow completely
-    [ABORT]() {
-        this[ABORTED] = true;
-        this.emit('abort', this[SIGNAL]?.reason);
-        this.destroy(this[SIGNAL]?.reason);
-    }
-    /**
-     * True if the stream has been aborted.
-     */
-    get aborted() {
-        return this[ABORTED];
-    }
-    /**
-     * No-op setter. Stream aborted status is set via the AbortSignal provided
-     * in the constructor options.
-     */
-    set aborted(_) { }
-    write(chunk, encoding, cb) {
-        if (this[ABORTED])
-            return false;
-        if (this[EOF])
-            throw new Error('write after end');
-        if (this[DESTROYED]) {
-            this.emit('error', Object.assign(new Error('Cannot call write after a stream was destroyed'), { code: 'ERR_STREAM_DESTROYED' }));
-            return true;
-        }
-        if (typeof encoding === 'function') {
-            cb = encoding;
-            encoding = 'utf8';
-        }
-        if (!encoding)
-            encoding = 'utf8';
-        const fn = this[ASYNC] ? defer : nodefer;
-        // convert array buffers and typed array views into buffers
-        // at some point in the future, we may want to do the opposite!
-        // leave strings and buffers as-is
-        // anything is only allowed if in object mode, so throw
-        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-            if (isArrayBufferView(chunk)) {
-                //@ts-ignore - sinful unsafe type changing
-                chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
-            }
-            else if (isArrayBufferLike(chunk)) {
-                //@ts-ignore - sinful unsafe type changing
-                chunk = Buffer.from(chunk);
-            }
-            else if (typeof chunk !== 'string') {
-                throw new Error('Non-contiguous data written to non-objectMode stream');
-            }
-        }
-        // handle object mode up front, since it's simpler
-        // this yields better performance, fewer checks later.
-        if (this[OBJECTMODE]) {
-            // maybe impossible?
-            /* c8 ignore start */
-            if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-                this[FLUSH](true);
-            /* c8 ignore stop */
-            if (this[FLOWING])
-                this.emit('data', chunk);
-            else
-                this[BUFFERPUSH](chunk);
-            if (this[BUFFERLENGTH] !== 0)
-                this.emit('readable');
-            if (cb)
-                fn(cb);
-            return this[FLOWING];
-        }
-        // at this point the chunk is a buffer or string
-        // don't buffer it up or send it to the decoder
-        if (!chunk.length) {
-            if (this[BUFFERLENGTH] !== 0)
-                this.emit('readable');
-            if (cb)
-                fn(cb);
-            return this[FLOWING];
-        }
-        // fast-path writing strings of same encoding to a stream with
-        // an empty buffer, skipping the buffer/decoder dance
-        if (typeof chunk === 'string' &&
-            // unless it is a string already ready for us to use
-            !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
-            //@ts-ignore - sinful unsafe type change
-            chunk = Buffer.from(chunk, encoding);
-        }
-        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
-            //@ts-ignore - sinful unsafe type change
-            chunk = this[DECODER].write(chunk);
-        }
-        // Note: flushing CAN potentially switch us into not-flowing mode
-        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-            this[FLUSH](true);
-        if (this[FLOWING])
-            this.emit('data', chunk);
-        else
-            this[BUFFERPUSH](chunk);
-        if (this[BUFFERLENGTH] !== 0)
-            this.emit('readable');
-        if (cb)
-            fn(cb);
-        return this[FLOWING];
-    }
-    /**
-     * Low-level explicit read method.
-     *
-     * In objectMode, the argument is ignored, and one item is returned if
-     * available.
-     *
-     * `n` is the number of bytes (or in the case of encoding streams,
-     * characters) to consume. If `n` is not provided, then the entire buffer
-     * is returned, or `null` is returned if no data is available.
-     *
-     * If `n` is greater that the amount of data in the internal buffer,
-     * then `null` is returned.
-     */
-    read(n) {
-        if (this[DESTROYED])
-            return null;
-        this[DISCARDED] = false;
-        if (this[BUFFERLENGTH] === 0 ||
-            n === 0 ||
-            (n && n > this[BUFFERLENGTH])) {
-            this[MAYBE_EMIT_END]();
-            return null;
-        }
-        if (this[OBJECTMODE])
-            n = null;
-        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
-            // not object mode, so if we have an encoding, then RType is string
-            // otherwise, must be Buffer
-            this[BUFFER] = [
-                (this[ENCODING]
-                    ? this[BUFFER].join('')
-                    : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])),
-            ];
-        }
-        const ret = this[READ](n || null, this[BUFFER][0]);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [READ](n, chunk) {
-        if (this[OBJECTMODE])
-            this[BUFFERSHIFT]();
-        else {
-            const c = chunk;
-            if (n === c.length || n === null)
-                this[BUFFERSHIFT]();
-            else if (typeof c === 'string') {
-                this[BUFFER][0] = c.slice(n);
-                chunk = c.slice(0, n);
-                this[BUFFERLENGTH] -= n;
-            }
-            else {
-                this[BUFFER][0] = c.subarray(n);
-                chunk = c.subarray(0, n);
-                this[BUFFERLENGTH] -= n;
-            }
-        }
-        this.emit('data', chunk);
-        if (!this[BUFFER].length && !this[EOF])
-            this.emit('drain');
-        return chunk;
-    }
-    end(chunk, encoding, cb) {
-        if (typeof chunk === 'function') {
-            cb = chunk;
-            chunk = undefined;
-        }
-        if (typeof encoding === 'function') {
-            cb = encoding;
-            encoding = 'utf8';
-        }
-        if (chunk !== undefined)
-            this.write(chunk, encoding);
-        if (cb)
-            this.once('end', cb);
-        this[EOF] = true;
-        this.writable = false;
-        // if we haven't written anything, then go ahead and emit,
-        // even if we're not reading.
-        // we'll re-emit if a new 'end' listener is added anyway.
-        // This makes MP more suitable to write-only use cases.
-        if (this[FLOWING] || !this[PAUSED])
-            this[MAYBE_EMIT_END]();
-        return this;
-    }
-    // don't let the internal resume be overwritten
-    [RESUME]() {
-        if (this[DESTROYED])
-            return;
-        if (!this[DATALISTENERS] && !this[PIPES].length) {
-            this[DISCARDED] = true;
-        }
-        this[PAUSED] = false;
-        this[FLOWING] = true;
-        this.emit('resume');
-        if (this[BUFFER].length)
-            this[FLUSH]();
-        else if (this[EOF])
-            this[MAYBE_EMIT_END]();
-        else
-            this.emit('drain');
-    }
-    /**
-     * Resume the stream if it is currently in a paused state
-     *
-     * If called when there are no pipe destinations or `data` event listeners,
-     * this will place the stream in a "discarded" state, where all data will
-     * be thrown away. The discarded state is removed if a pipe destination or
-     * data handler is added, if pause() is called, or if any synchronous or
-     * asynchronous iteration is started.
-     */
-    resume() {
-        return this[RESUME]();
-    }
-    /**
-     * Pause the stream
-     */
-    pause() {
-        this[FLOWING] = false;
-        this[PAUSED] = true;
-        this[DISCARDED] = false;
-    }
-    /**
-     * true if the stream has been forcibly destroyed
-     */
-    get destroyed() {
-        return this[DESTROYED];
-    }
-    /**
-     * true if the stream is currently in a flowing state, meaning that
-     * any writes will be immediately emitted.
-     */
-    get flowing() {
-        return this[FLOWING];
-    }
-    /**
-     * true if the stream is currently in a paused state
-     */
-    get paused() {
-        return this[PAUSED];
-    }
-    [BUFFERPUSH](chunk) {
-        if (this[OBJECTMODE])
-            this[BUFFERLENGTH] += 1;
-        else
-            this[BUFFERLENGTH] += chunk.length;
-        this[BUFFER].push(chunk);
-    }
-    [BUFFERSHIFT]() {
-        if (this[OBJECTMODE])
-            this[BUFFERLENGTH] -= 1;
-        else
-            this[BUFFERLENGTH] -= this[BUFFER][0].length;
-        return this[BUFFER].shift();
-    }
-    [FLUSH](noDrain = false) {
-        do { } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&
-            this[BUFFER].length);
-        if (!noDrain && !this[BUFFER].length && !this[EOF])
-            this.emit('drain');
-    }
-    [FLUSHCHUNK](chunk) {
-        this.emit('data', chunk);
-        return this[FLOWING];
-    }
-    /**
-     * Pipe all data emitted by this stream into the destination provided.
-     *
-     * Triggers the flow of data.
-     */
-    pipe(dest, opts) {
-        if (this[DESTROYED])
-            return dest;
-        this[DISCARDED] = false;
-        const ended = this[EMITTED_END];
-        opts = opts || {};
-        if (dest === proc.stdout || dest === proc.stderr)
-            opts.end = false;
-        else
-            opts.end = opts.end !== false;
-        opts.proxyErrors = !!opts.proxyErrors;
-        // piping an ended stream ends immediately
-        if (ended) {
-            if (opts.end)
-                dest.end();
-        }
-        else {
-            // "as" here just ignores the WType, which pipes don't care about,
-            // since they're only consuming from us, and writing to the dest
-            this[PIPES].push(!opts.proxyErrors
-                ? new Pipe(this, dest, opts)
-                : new PipeProxyErrors(this, dest, opts));
-            if (this[ASYNC])
-                defer(() => this[RESUME]());
-            else
-                this[RESUME]();
-        }
-        return dest;
-    }
-    /**
-     * Fully unhook a piped destination stream.
-     *
-     * If the destination stream was the only consumer of this stream (ie,
-     * there are no other piped destinations or `'data'` event listeners)
-     * then the flow of data will stop until there is another consumer or
-     * {@link Minipass#resume} is explicitly called.
-     */
-    unpipe(dest) {
-        const p = this[PIPES].find(p => p.dest === dest);
-        if (p) {
-            if (this[PIPES].length === 1) {
-                if (this[FLOWING] && this[DATALISTENERS] === 0) {
-                    this[FLOWING] = false;
-                }
-                this[PIPES] = [];
-            }
-            else
-                this[PIPES].splice(this[PIPES].indexOf(p), 1);
-            p.unpipe();
-        }
-    }
-    /**
-     * Alias for {@link Minipass#on}
-     */
-    addListener(ev, handler) {
-        return this.on(ev, handler);
-    }
-    /**
-     * Mostly identical to `EventEmitter.on`, with the following
-     * behavior differences to prevent data loss and unnecessary hangs:
-     *
-     * - Adding a 'data' event handler will trigger the flow of data
-     *
-     * - Adding a 'readable' event handler when there is data waiting to be read
-     *   will cause 'readable' to be emitted immediately.
-     *
-     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
-     *   already passed will cause the event to be emitted immediately and all
-     *   handlers removed.
-     *
-     * - Adding an 'error' event handler after an error has been emitted will
-     *   cause the event to be re-emitted immediately with the error previously
-     *   raised.
-     */
-    on(ev, handler) {
-        const ret = super.on(ev, handler);
-        if (ev === 'data') {
-            this[DISCARDED] = false;
-            this[DATALISTENERS]++;
-            if (!this[PIPES].length && !this[FLOWING]) {
-                this[RESUME]();
-            }
-        }
-        else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {
-            super.emit('readable');
-        }
-        else if (isEndish(ev) && this[EMITTED_END]) {
-            super.emit(ev);
-            this.removeAllListeners(ev);
-        }
-        else if (ev === 'error' && this[EMITTED_ERROR]) {
-            const h = handler;
-            if (this[ASYNC])
-                defer(() => h.call(this, this[EMITTED_ERROR]));
-            else
-                h.call(this, this[EMITTED_ERROR]);
-        }
-        return ret;
-    }
-    /**
-     * Alias for {@link Minipass#off}
-     */
-    removeListener(ev, handler) {
-        return this.off(ev, handler);
-    }
-    /**
-     * Mostly identical to `EventEmitter.off`
-     *
-     * If a 'data' event handler is removed, and it was the last consumer
-     * (ie, there are no pipe destinations or other 'data' event listeners),
-     * then the flow of data will stop until there is another consumer or
-     * {@link Minipass#resume} is explicitly called.
-     */
-    off(ev, handler) {
-        const ret = super.off(ev, handler);
-        // if we previously had listeners, and now we don't, and we don't
-        // have any pipes, then stop the flow, unless it's been explicitly
-        // put in a discarded flowing state via stream.resume().
-        if (ev === 'data') {
-            this[DATALISTENERS] = this.listeners('data').length;
-            if (this[DATALISTENERS] === 0 &&
-                !this[DISCARDED] &&
-                !this[PIPES].length) {
-                this[FLOWING] = false;
-            }
-        }
-        return ret;
-    }
-    /**
-     * Mostly identical to `EventEmitter.removeAllListeners`
-     *
-     * If all 'data' event handlers are removed, and they were the last consumer
-     * (ie, there are no pipe destinations), then the flow of data will stop
-     * until there is another consumer or {@link Minipass#resume} is explicitly
-     * called.
-     */
-    removeAllListeners(ev) {
-        const ret = super.removeAllListeners(ev);
-        if (ev === 'data' || ev === undefined) {
-            this[DATALISTENERS] = 0;
-            if (!this[DISCARDED] && !this[PIPES].length) {
-                this[FLOWING] = false;
-            }
-        }
-        return ret;
-    }
-    /**
-     * true if the 'end' event has been emitted
-     */
-    get emittedEnd() {
-        return this[EMITTED_END];
-    }
-    [MAYBE_EMIT_END]() {
-        if (!this[EMITTING_END] &&
-            !this[EMITTED_END] &&
-            !this[DESTROYED] &&
-            this[BUFFER].length === 0 &&
-            this[EOF]) {
-            this[EMITTING_END] = true;
-            this.emit('end');
-            this.emit('prefinish');
-            this.emit('finish');
-            if (this[CLOSED])
-                this.emit('close');
-            this[EMITTING_END] = false;
-        }
-    }
-    /**
-     * Mostly identical to `EventEmitter.emit`, with the following
-     * behavior differences to prevent data loss and unnecessary hangs:
-     *
-     * If the stream has been destroyed, and the event is something other
-     * than 'close' or 'error', then `false` is returned and no handlers
-     * are called.
-     *
-     * If the event is 'end', and has already been emitted, then the event
-     * is ignored. If the stream is in a paused or non-flowing state, then
-     * the event will be deferred until data flow resumes. If the stream is
-     * async, then handlers will be called on the next tick rather than
-     * immediately.
-     *
-     * If the event is 'close', and 'end' has not yet been emitted, then
-     * the event will be deferred until after 'end' is emitted.
-     *
-     * If the event is 'error', and an AbortSignal was provided for the stream,
-     * and there are no listeners, then the event is ignored, matching the
-     * behavior of node core streams in the presense of an AbortSignal.
-     *
-     * If the event is 'finish' or 'prefinish', then all listeners will be
-     * removed after emitting the event, to prevent double-firing.
-     */
-    emit(ev, ...args) {
-        const data = args[0];
-        // error and close are only events allowed after calling destroy()
-        if (ev !== 'error' &&
-            ev !== 'close' &&
-            ev !== DESTROYED &&
-            this[DESTROYED]) {
-            return false;
-        }
-        else if (ev === 'data') {
-            return !this[OBJECTMODE] && !data
-                ? false
-                : this[ASYNC]
-                    ? (defer(() => this[EMITDATA](data)), true)
-                    : this[EMITDATA](data);
-        }
-        else if (ev === 'end') {
-            return this[EMITEND]();
-        }
-        else if (ev === 'close') {
-            this[CLOSED] = true;
-            // don't emit close before 'end' and 'finish'
-            if (!this[EMITTED_END] && !this[DESTROYED])
-                return false;
-            const ret = super.emit('close');
-            this.removeAllListeners('close');
-            return ret;
-        }
-        else if (ev === 'error') {
-            this[EMITTED_ERROR] = data;
-            super.emit(ERROR, data);
-            const ret = !this[SIGNAL] || this.listeners('error').length
-                ? super.emit('error', data)
-                : false;
-            this[MAYBE_EMIT_END]();
-            return ret;
-        }
-        else if (ev === 'resume') {
-            const ret = super.emit('resume');
-            this[MAYBE_EMIT_END]();
-            return ret;
-        }
-        else if (ev === 'finish' || ev === 'prefinish') {
-            const ret = super.emit(ev);
-            this.removeAllListeners(ev);
-            return ret;
-        }
-        // Some other unknown event
-        const ret = super.emit(ev, ...args);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [EMITDATA](data) {
-        for (const p of this[PIPES]) {
-            if (p.dest.write(data) === false)
-                this.pause();
-        }
-        const ret = this[DISCARDED] ? false : super.emit('data', data);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [EMITEND]() {
-        if (this[EMITTED_END])
-            return false;
-        this[EMITTED_END] = true;
-        this.readable = false;
-        return this[ASYNC]
-            ? (defer(() => this[EMITEND2]()), true)
-            : this[EMITEND2]();
-    }
-    [EMITEND2]() {
-        if (this[DECODER]) {
-            const data = this[DECODER].end();
-            if (data) {
-                for (const p of this[PIPES]) {
-                    p.dest.write(data);
-                }
-                if (!this[DISCARDED])
-                    super.emit('data', data);
-            }
-        }
-        for (const p of this[PIPES]) {
-            p.end();
-        }
-        const ret = super.emit('end');
-        this.removeAllListeners('end');
-        return ret;
-    }
-    /**
-     * Return a Promise that resolves to an array of all emitted data once
-     * the stream ends.
-     */
-    async collect() {
-        const buf = Object.assign([], {
-            dataLength: 0,
-        });
-        if (!this[OBJECTMODE])
-            buf.dataLength = 0;
-        // set the promise first, in case an error is raised
-        // by triggering the flow here.
-        const p = this.promise();
-        this.on('data', c => {
-            buf.push(c);
-            if (!this[OBJECTMODE])
-                buf.dataLength += c.length;
-        });
-        await p;
-        return buf;
-    }
-    /**
-     * Return a Promise that resolves to the concatenation of all emitted data
-     * once the stream ends.
-     *
-     * Not allowed on objectMode streams.
-     */
-    async concat() {
-        if (this[OBJECTMODE]) {
-            throw new Error('cannot concat in objectMode');
-        }
-        const buf = await this.collect();
-        return (this[ENCODING]
-            ? buf.join('')
-            : Buffer.concat(buf, buf.dataLength));
-    }
-    /**
-     * Return a void Promise that resolves once the stream ends.
-     */
-    async promise() {
-        return new Promise((resolve, reject) => {
-            this.on(DESTROYED, () => reject(new Error('stream destroyed')));
-            this.on('error', er => reject(er));
-            this.on('end', () => resolve());
-        });
-    }
-    /**
-     * Asynchronous `for await of` iteration.
-     *
-     * This will continue emitting all chunks until the stream terminates.
-     */
-    [Symbol.asyncIterator]() {
-        // set this up front, in case the consumer doesn't call next()
-        // right away.
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = async () => {
-            this.pause();
-            stopped = true;
-            return { value: undefined, done: true };
-        };
-        const next = () => {
-            if (stopped)
-                return stop();
-            const res = this.read();
-            if (res !== null)
-                return Promise.resolve({ done: false, value: res });
-            if (this[EOF])
-                return stop();
-            let resolve;
-            let reject;
-            const onerr = (er) => {
-                this.off('data', ondata);
-                this.off('end', onend);
-                this.off(DESTROYED, ondestroy);
-                stop();
-                reject(er);
-            };
-            const ondata = (value) => {
-                this.off('error', onerr);
-                this.off('end', onend);
-                this.off(DESTROYED, ondestroy);
-                this.pause();
-                resolve({ value, done: !!this[EOF] });
-            };
-            const onend = () => {
-                this.off('error', onerr);
-                this.off('data', ondata);
-                this.off(DESTROYED, ondestroy);
-                stop();
-                resolve({ done: true, value: undefined });
-            };
-            const ondestroy = () => onerr(new Error('stream destroyed'));
-            return new Promise((res, rej) => {
-                reject = rej;
-                resolve = res;
-                this.once(DESTROYED, ondestroy);
-                this.once('error', onerr);
-                this.once('end', onend);
-                this.once('data', ondata);
-            });
-        };
-        return {
-            next,
-            throw: stop,
-            return: stop,
-            [Symbol.asyncIterator]() {
-                return this;
-            },
-        };
-    }
-    /**
-     * Synchronous `for of` iteration.
-     *
-     * The iteration will terminate when the internal buffer runs out, even
-     * if the stream has not yet terminated.
-     */
-    [Symbol.iterator]() {
-        // set this up front, in case the consumer doesn't call next()
-        // right away.
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = () => {
-            this.pause();
-            this.off(ERROR, stop);
-            this.off(DESTROYED, stop);
-            this.off('end', stop);
-            stopped = true;
-            return { done: true, value: undefined };
-        };
-        const next = () => {
-            if (stopped)
-                return stop();
-            const value = this.read();
-            return value === null ? stop() : { done: false, value };
-        };
-        this.once('end', stop);
-        this.once(ERROR, stop);
-        this.once(DESTROYED, stop);
-        return {
-            next,
-            throw: stop,
-            return: stop,
-            [Symbol.iterator]() {
-                return this;
-            },
-        };
-    }
-    /**
-     * Destroy a stream, preventing it from being used for any further purpose.
-     *
-     * If the stream has a `close()` method, then it will be called on
-     * destruction.
-     *
-     * After destruction, any attempt to write data, read data, or emit most
-     * events will be ignored.
-     *
-     * If an error argument is provided, then it will be emitted in an
-     * 'error' event.
-     */
-    destroy(er) {
-        if (this[DESTROYED]) {
-            if (er)
-                this.emit('error', er);
-            else
-                this.emit(DESTROYED);
-            return this;
-        }
-        this[DESTROYED] = true;
-        this[DISCARDED] = true;
-        // throw away all buffered data, it's never coming out
-        this[BUFFER].length = 0;
-        this[BUFFERLENGTH] = 0;
-        const wc = this;
-        if (typeof wc.close === 'function' && !this[CLOSED])
-            wc.close();
-        if (er)
-            this.emit('error', er);
-        // if no error to emit, still reject pending promises
-        else
-            this.emit(DESTROYED);
-        return this;
-    }
-    /**
-     * Alias for {@link isStream}
-     *
-     * Former export location, maintained for backwards compatibility.
-     *
-     * @deprecated
-     */
-    static get isStream() {
-        return exports.isStream;
-    }
-}
-exports.Minipass = Minipass;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minipass/dist/commonjs/package.json b/node_modules/npm/node_modules/minipass/dist/commonjs/package.json
deleted file mode 100644
index 0292b99..0000000
--- a/node_modules/npm/node_modules/minipass/dist/commonjs/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type":"commonjs"}
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minipass/dist/esm/index.js b/node_modules/npm/node_modules/minipass/dist/esm/index.js
deleted file mode 100644
index b65fafb..0000000
--- a/node_modules/npm/node_modules/minipass/dist/esm/index.js
+++ /dev/null
@@ -1,1018 +0,0 @@
-const proc = typeof process === 'object' && process
-    ? process
-    : {
-        stdout: null,
-        stderr: null,
-    };
-import { EventEmitter } from 'events';
-import Stream from 'stream';
-import { StringDecoder } from 'string_decoder';
-/**
- * Return true if the argument is a Minipass stream, Node stream, or something
- * else that Minipass can interact with.
- */
-export const isStream = (s) => !!s &&
-    typeof s === 'object' &&
-    (s instanceof Minipass ||
-        s instanceof Stream ||
-        isReadable(s) ||
-        isWritable(s));
-/**
- * Return true if the argument is a valid {@link Minipass.Readable}
- */
-export const isReadable = (s) => !!s &&
-    typeof s === 'object' &&
-    s instanceof EventEmitter &&
-    typeof s.pipe === 'function' &&
-    // node core Writable streams have a pipe() method, but it throws
-    s.pipe !== Stream.Writable.prototype.pipe;
-/**
- * Return true if the argument is a valid {@link Minipass.Writable}
- */
-export const isWritable = (s) => !!s &&
-    typeof s === 'object' &&
-    s instanceof EventEmitter &&
-    typeof s.write === 'function' &&
-    typeof s.end === 'function';
-const EOF = Symbol('EOF');
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd');
-const EMITTED_END = Symbol('emittedEnd');
-const EMITTING_END = Symbol('emittingEnd');
-const EMITTED_ERROR = Symbol('emittedError');
-const CLOSED = Symbol('closed');
-const READ = Symbol('read');
-const FLUSH = Symbol('flush');
-const FLUSHCHUNK = Symbol('flushChunk');
-const ENCODING = Symbol('encoding');
-const DECODER = Symbol('decoder');
-const FLOWING = Symbol('flowing');
-const PAUSED = Symbol('paused');
-const RESUME = Symbol('resume');
-const BUFFER = Symbol('buffer');
-const PIPES = Symbol('pipes');
-const BUFFERLENGTH = Symbol('bufferLength');
-const BUFFERPUSH = Symbol('bufferPush');
-const BUFFERSHIFT = Symbol('bufferShift');
-const OBJECTMODE = Symbol('objectMode');
-// internal event when stream is destroyed
-const DESTROYED = Symbol('destroyed');
-// internal event when stream has an error
-const ERROR = Symbol('error');
-const EMITDATA = Symbol('emitData');
-const EMITEND = Symbol('emitEnd');
-const EMITEND2 = Symbol('emitEnd2');
-const ASYNC = Symbol('async');
-const ABORT = Symbol('abort');
-const ABORTED = Symbol('aborted');
-const SIGNAL = Symbol('signal');
-const DATALISTENERS = Symbol('dataListeners');
-const DISCARDED = Symbol('discarded');
-const defer = (fn) => Promise.resolve().then(fn);
-const nodefer = (fn) => fn();
-const isEndish = (ev) => ev === 'end' || ev === 'finish' || ev === 'prefinish';
-const isArrayBufferLike = (b) => b instanceof ArrayBuffer ||
-    (!!b &&
-        typeof b === 'object' &&
-        b.constructor &&
-        b.constructor.name === 'ArrayBuffer' &&
-        b.byteLength >= 0);
-const isArrayBufferView = (b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b);
-/**
- * Internal class representing a pipe to a destination stream.
- *
- * @internal
- */
-class Pipe {
-    src;
-    dest;
-    opts;
-    ondrain;
-    constructor(src, dest, opts) {
-        this.src = src;
-        this.dest = dest;
-        this.opts = opts;
-        this.ondrain = () => src[RESUME]();
-        this.dest.on('drain', this.ondrain);
-    }
-    unpipe() {
-        this.dest.removeListener('drain', this.ondrain);
-    }
-    // only here for the prototype
-    /* c8 ignore start */
-    proxyErrors(_er) { }
-    /* c8 ignore stop */
-    end() {
-        this.unpipe();
-        if (this.opts.end)
-            this.dest.end();
-    }
-}
-/**
- * Internal class representing a pipe to a destination stream where
- * errors are proxied.
- *
- * @internal
- */
-class PipeProxyErrors extends Pipe {
-    unpipe() {
-        this.src.removeListener('error', this.proxyErrors);
-        super.unpipe();
-    }
-    constructor(src, dest, opts) {
-        super(src, dest, opts);
-        this.proxyErrors = er => dest.emit('error', er);
-        src.on('error', this.proxyErrors);
-    }
-}
-const isObjectModeOptions = (o) => !!o.objectMode;
-const isEncodingOptions = (o) => !o.objectMode && !!o.encoding && o.encoding !== 'buffer';
-/**
- * Main export, the Minipass class
- *
- * `RType` is the type of data emitted, defaults to Buffer
- *
- * `WType` is the type of data to be written, if RType is buffer or string,
- * then any {@link Minipass.ContiguousData} is allowed.
- *
- * `Events` is the set of event handler signatures that this object
- * will emit, see {@link Minipass.Events}
- */
-export class Minipass extends EventEmitter {
-    [FLOWING] = false;
-    [PAUSED] = false;
-    [PIPES] = [];
-    [BUFFER] = [];
-    [OBJECTMODE];
-    [ENCODING];
-    [ASYNC];
-    [DECODER];
-    [EOF] = false;
-    [EMITTED_END] = false;
-    [EMITTING_END] = false;
-    [CLOSED] = false;
-    [EMITTED_ERROR] = null;
-    [BUFFERLENGTH] = 0;
-    [DESTROYED] = false;
-    [SIGNAL];
-    [ABORTED] = false;
-    [DATALISTENERS] = 0;
-    [DISCARDED] = false;
-    /**
-     * true if the stream can be written
-     */
-    writable = true;
-    /**
-     * true if the stream can be read
-     */
-    readable = true;
-    /**
-     * If `RType` is Buffer, then options do not need to be provided.
-     * Otherwise, an options object must be provided to specify either
-     * {@link Minipass.SharedOptions.objectMode} or
-     * {@link Minipass.SharedOptions.encoding}, as appropriate.
-     */
-    constructor(...args) {
-        const options = (args[0] ||
-            {});
-        super();
-        if (options.objectMode && typeof options.encoding === 'string') {
-            throw new TypeError('Encoding and objectMode may not be used together');
-        }
-        if (isObjectModeOptions(options)) {
-            this[OBJECTMODE] = true;
-            this[ENCODING] = null;
-        }
-        else if (isEncodingOptions(options)) {
-            this[ENCODING] = options.encoding;
-            this[OBJECTMODE] = false;
-        }
-        else {
-            this[OBJECTMODE] = false;
-            this[ENCODING] = null;
-        }
-        this[ASYNC] = !!options.async;
-        this[DECODER] = this[ENCODING]
-            ? new StringDecoder(this[ENCODING])
-            : null;
-        //@ts-ignore - private option for debugging and testing
-        if (options && options.debugExposeBuffer === true) {
-            Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] });
-        }
-        //@ts-ignore - private option for debugging and testing
-        if (options && options.debugExposePipes === true) {
-            Object.defineProperty(this, 'pipes', { get: () => this[PIPES] });
-        }
-        const { signal } = options;
-        if (signal) {
-            this[SIGNAL] = signal;
-            if (signal.aborted) {
-                this[ABORT]();
-            }
-            else {
-                signal.addEventListener('abort', () => this[ABORT]());
-            }
-        }
-    }
-    /**
-     * The amount of data stored in the buffer waiting to be read.
-     *
-     * For Buffer strings, this will be the total byte length.
-     * For string encoding streams, this will be the string character length,
-     * according to JavaScript's `string.length` logic.
-     * For objectMode streams, this is a count of the items waiting to be
-     * emitted.
-     */
-    get bufferLength() {
-        return this[BUFFERLENGTH];
-    }
-    /**
-     * The `BufferEncoding` currently in use, or `null`
-     */
-    get encoding() {
-        return this[ENCODING];
-    }
-    /**
-     * @deprecated - This is a read only property
-     */
-    set encoding(_enc) {
-        throw new Error('Encoding must be set at instantiation time');
-    }
-    /**
-     * @deprecated - Encoding may only be set at instantiation time
-     */
-    setEncoding(_enc) {
-        throw new Error('Encoding must be set at instantiation time');
-    }
-    /**
-     * True if this is an objectMode stream
-     */
-    get objectMode() {
-        return this[OBJECTMODE];
-    }
-    /**
-     * @deprecated - This is a read-only property
-     */
-    set objectMode(_om) {
-        throw new Error('objectMode must be set at instantiation time');
-    }
-    /**
-     * true if this is an async stream
-     */
-    get ['async']() {
-        return this[ASYNC];
-    }
-    /**
-     * Set to true to make this stream async.
-     *
-     * Once set, it cannot be unset, as this would potentially cause incorrect
-     * behavior.  Ie, a sync stream can be made async, but an async stream
-     * cannot be safely made sync.
-     */
-    set ['async'](a) {
-        this[ASYNC] = this[ASYNC] || !!a;
-    }
-    // drop everything and get out of the flow completely
-    [ABORT]() {
-        this[ABORTED] = true;
-        this.emit('abort', this[SIGNAL]?.reason);
-        this.destroy(this[SIGNAL]?.reason);
-    }
-    /**
-     * True if the stream has been aborted.
-     */
-    get aborted() {
-        return this[ABORTED];
-    }
-    /**
-     * No-op setter. Stream aborted status is set via the AbortSignal provided
-     * in the constructor options.
-     */
-    set aborted(_) { }
-    write(chunk, encoding, cb) {
-        if (this[ABORTED])
-            return false;
-        if (this[EOF])
-            throw new Error('write after end');
-        if (this[DESTROYED]) {
-            this.emit('error', Object.assign(new Error('Cannot call write after a stream was destroyed'), { code: 'ERR_STREAM_DESTROYED' }));
-            return true;
-        }
-        if (typeof encoding === 'function') {
-            cb = encoding;
-            encoding = 'utf8';
-        }
-        if (!encoding)
-            encoding = 'utf8';
-        const fn = this[ASYNC] ? defer : nodefer;
-        // convert array buffers and typed array views into buffers
-        // at some point in the future, we may want to do the opposite!
-        // leave strings and buffers as-is
-        // anything is only allowed if in object mode, so throw
-        if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-            if (isArrayBufferView(chunk)) {
-                //@ts-ignore - sinful unsafe type changing
-                chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
-            }
-            else if (isArrayBufferLike(chunk)) {
-                //@ts-ignore - sinful unsafe type changing
-                chunk = Buffer.from(chunk);
-            }
-            else if (typeof chunk !== 'string') {
-                throw new Error('Non-contiguous data written to non-objectMode stream');
-            }
-        }
-        // handle object mode up front, since it's simpler
-        // this yields better performance, fewer checks later.
-        if (this[OBJECTMODE]) {
-            // maybe impossible?
-            /* c8 ignore start */
-            if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-                this[FLUSH](true);
-            /* c8 ignore stop */
-            if (this[FLOWING])
-                this.emit('data', chunk);
-            else
-                this[BUFFERPUSH](chunk);
-            if (this[BUFFERLENGTH] !== 0)
-                this.emit('readable');
-            if (cb)
-                fn(cb);
-            return this[FLOWING];
-        }
-        // at this point the chunk is a buffer or string
-        // don't buffer it up or send it to the decoder
-        if (!chunk.length) {
-            if (this[BUFFERLENGTH] !== 0)
-                this.emit('readable');
-            if (cb)
-                fn(cb);
-            return this[FLOWING];
-        }
-        // fast-path writing strings of same encoding to a stream with
-        // an empty buffer, skipping the buffer/decoder dance
-        if (typeof chunk === 'string' &&
-            // unless it is a string already ready for us to use
-            !(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
-            //@ts-ignore - sinful unsafe type change
-            chunk = Buffer.from(chunk, encoding);
-        }
-        if (Buffer.isBuffer(chunk) && this[ENCODING]) {
-            //@ts-ignore - sinful unsafe type change
-            chunk = this[DECODER].write(chunk);
-        }
-        // Note: flushing CAN potentially switch us into not-flowing mode
-        if (this[FLOWING] && this[BUFFERLENGTH] !== 0)
-            this[FLUSH](true);
-        if (this[FLOWING])
-            this.emit('data', chunk);
-        else
-            this[BUFFERPUSH](chunk);
-        if (this[BUFFERLENGTH] !== 0)
-            this.emit('readable');
-        if (cb)
-            fn(cb);
-        return this[FLOWING];
-    }
-    /**
-     * Low-level explicit read method.
-     *
-     * In objectMode, the argument is ignored, and one item is returned if
-     * available.
-     *
-     * `n` is the number of bytes (or in the case of encoding streams,
-     * characters) to consume. If `n` is not provided, then the entire buffer
-     * is returned, or `null` is returned if no data is available.
-     *
-     * If `n` is greater that the amount of data in the internal buffer,
-     * then `null` is returned.
-     */
-    read(n) {
-        if (this[DESTROYED])
-            return null;
-        this[DISCARDED] = false;
-        if (this[BUFFERLENGTH] === 0 ||
-            n === 0 ||
-            (n && n > this[BUFFERLENGTH])) {
-            this[MAYBE_EMIT_END]();
-            return null;
-        }
-        if (this[OBJECTMODE])
-            n = null;
-        if (this[BUFFER].length > 1 && !this[OBJECTMODE]) {
-            // not object mode, so if we have an encoding, then RType is string
-            // otherwise, must be Buffer
-            this[BUFFER] = [
-                (this[ENCODING]
-                    ? this[BUFFER].join('')
-                    : Buffer.concat(this[BUFFER], this[BUFFERLENGTH])),
-            ];
-        }
-        const ret = this[READ](n || null, this[BUFFER][0]);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [READ](n, chunk) {
-        if (this[OBJECTMODE])
-            this[BUFFERSHIFT]();
-        else {
-            const c = chunk;
-            if (n === c.length || n === null)
-                this[BUFFERSHIFT]();
-            else if (typeof c === 'string') {
-                this[BUFFER][0] = c.slice(n);
-                chunk = c.slice(0, n);
-                this[BUFFERLENGTH] -= n;
-            }
-            else {
-                this[BUFFER][0] = c.subarray(n);
-                chunk = c.subarray(0, n);
-                this[BUFFERLENGTH] -= n;
-            }
-        }
-        this.emit('data', chunk);
-        if (!this[BUFFER].length && !this[EOF])
-            this.emit('drain');
-        return chunk;
-    }
-    end(chunk, encoding, cb) {
-        if (typeof chunk === 'function') {
-            cb = chunk;
-            chunk = undefined;
-        }
-        if (typeof encoding === 'function') {
-            cb = encoding;
-            encoding = 'utf8';
-        }
-        if (chunk !== undefined)
-            this.write(chunk, encoding);
-        if (cb)
-            this.once('end', cb);
-        this[EOF] = true;
-        this.writable = false;
-        // if we haven't written anything, then go ahead and emit,
-        // even if we're not reading.
-        // we'll re-emit if a new 'end' listener is added anyway.
-        // This makes MP more suitable to write-only use cases.
-        if (this[FLOWING] || !this[PAUSED])
-            this[MAYBE_EMIT_END]();
-        return this;
-    }
-    // don't let the internal resume be overwritten
-    [RESUME]() {
-        if (this[DESTROYED])
-            return;
-        if (!this[DATALISTENERS] && !this[PIPES].length) {
-            this[DISCARDED] = true;
-        }
-        this[PAUSED] = false;
-        this[FLOWING] = true;
-        this.emit('resume');
-        if (this[BUFFER].length)
-            this[FLUSH]();
-        else if (this[EOF])
-            this[MAYBE_EMIT_END]();
-        else
-            this.emit('drain');
-    }
-    /**
-     * Resume the stream if it is currently in a paused state
-     *
-     * If called when there are no pipe destinations or `data` event listeners,
-     * this will place the stream in a "discarded" state, where all data will
-     * be thrown away. The discarded state is removed if a pipe destination or
-     * data handler is added, if pause() is called, or if any synchronous or
-     * asynchronous iteration is started.
-     */
-    resume() {
-        return this[RESUME]();
-    }
-    /**
-     * Pause the stream
-     */
-    pause() {
-        this[FLOWING] = false;
-        this[PAUSED] = true;
-        this[DISCARDED] = false;
-    }
-    /**
-     * true if the stream has been forcibly destroyed
-     */
-    get destroyed() {
-        return this[DESTROYED];
-    }
-    /**
-     * true if the stream is currently in a flowing state, meaning that
-     * any writes will be immediately emitted.
-     */
-    get flowing() {
-        return this[FLOWING];
-    }
-    /**
-     * true if the stream is currently in a paused state
-     */
-    get paused() {
-        return this[PAUSED];
-    }
-    [BUFFERPUSH](chunk) {
-        if (this[OBJECTMODE])
-            this[BUFFERLENGTH] += 1;
-        else
-            this[BUFFERLENGTH] += chunk.length;
-        this[BUFFER].push(chunk);
-    }
-    [BUFFERSHIFT]() {
-        if (this[OBJECTMODE])
-            this[BUFFERLENGTH] -= 1;
-        else
-            this[BUFFERLENGTH] -= this[BUFFER][0].length;
-        return this[BUFFER].shift();
-    }
-    [FLUSH](noDrain = false) {
-        do { } while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) &&
-            this[BUFFER].length);
-        if (!noDrain && !this[BUFFER].length && !this[EOF])
-            this.emit('drain');
-    }
-    [FLUSHCHUNK](chunk) {
-        this.emit('data', chunk);
-        return this[FLOWING];
-    }
-    /**
-     * Pipe all data emitted by this stream into the destination provided.
-     *
-     * Triggers the flow of data.
-     */
-    pipe(dest, opts) {
-        if (this[DESTROYED])
-            return dest;
-        this[DISCARDED] = false;
-        const ended = this[EMITTED_END];
-        opts = opts || {};
-        if (dest === proc.stdout || dest === proc.stderr)
-            opts.end = false;
-        else
-            opts.end = opts.end !== false;
-        opts.proxyErrors = !!opts.proxyErrors;
-        // piping an ended stream ends immediately
-        if (ended) {
-            if (opts.end)
-                dest.end();
-        }
-        else {
-            // "as" here just ignores the WType, which pipes don't care about,
-            // since they're only consuming from us, and writing to the dest
-            this[PIPES].push(!opts.proxyErrors
-                ? new Pipe(this, dest, opts)
-                : new PipeProxyErrors(this, dest, opts));
-            if (this[ASYNC])
-                defer(() => this[RESUME]());
-            else
-                this[RESUME]();
-        }
-        return dest;
-    }
-    /**
-     * Fully unhook a piped destination stream.
-     *
-     * If the destination stream was the only consumer of this stream (ie,
-     * there are no other piped destinations or `'data'` event listeners)
-     * then the flow of data will stop until there is another consumer or
-     * {@link Minipass#resume} is explicitly called.
-     */
-    unpipe(dest) {
-        const p = this[PIPES].find(p => p.dest === dest);
-        if (p) {
-            if (this[PIPES].length === 1) {
-                if (this[FLOWING] && this[DATALISTENERS] === 0) {
-                    this[FLOWING] = false;
-                }
-                this[PIPES] = [];
-            }
-            else
-                this[PIPES].splice(this[PIPES].indexOf(p), 1);
-            p.unpipe();
-        }
-    }
-    /**
-     * Alias for {@link Minipass#on}
-     */
-    addListener(ev, handler) {
-        return this.on(ev, handler);
-    }
-    /**
-     * Mostly identical to `EventEmitter.on`, with the following
-     * behavior differences to prevent data loss and unnecessary hangs:
-     *
-     * - Adding a 'data' event handler will trigger the flow of data
-     *
-     * - Adding a 'readable' event handler when there is data waiting to be read
-     *   will cause 'readable' to be emitted immediately.
-     *
-     * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
-     *   already passed will cause the event to be emitted immediately and all
-     *   handlers removed.
-     *
-     * - Adding an 'error' event handler after an error has been emitted will
-     *   cause the event to be re-emitted immediately with the error previously
-     *   raised.
-     */
-    on(ev, handler) {
-        const ret = super.on(ev, handler);
-        if (ev === 'data') {
-            this[DISCARDED] = false;
-            this[DATALISTENERS]++;
-            if (!this[PIPES].length && !this[FLOWING]) {
-                this[RESUME]();
-            }
-        }
-        else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) {
-            super.emit('readable');
-        }
-        else if (isEndish(ev) && this[EMITTED_END]) {
-            super.emit(ev);
-            this.removeAllListeners(ev);
-        }
-        else if (ev === 'error' && this[EMITTED_ERROR]) {
-            const h = handler;
-            if (this[ASYNC])
-                defer(() => h.call(this, this[EMITTED_ERROR]));
-            else
-                h.call(this, this[EMITTED_ERROR]);
-        }
-        return ret;
-    }
-    /**
-     * Alias for {@link Minipass#off}
-     */
-    removeListener(ev, handler) {
-        return this.off(ev, handler);
-    }
-    /**
-     * Mostly identical to `EventEmitter.off`
-     *
-     * If a 'data' event handler is removed, and it was the last consumer
-     * (ie, there are no pipe destinations or other 'data' event listeners),
-     * then the flow of data will stop until there is another consumer or
-     * {@link Minipass#resume} is explicitly called.
-     */
-    off(ev, handler) {
-        const ret = super.off(ev, handler);
-        // if we previously had listeners, and now we don't, and we don't
-        // have any pipes, then stop the flow, unless it's been explicitly
-        // put in a discarded flowing state via stream.resume().
-        if (ev === 'data') {
-            this[DATALISTENERS] = this.listeners('data').length;
-            if (this[DATALISTENERS] === 0 &&
-                !this[DISCARDED] &&
-                !this[PIPES].length) {
-                this[FLOWING] = false;
-            }
-        }
-        return ret;
-    }
-    /**
-     * Mostly identical to `EventEmitter.removeAllListeners`
-     *
-     * If all 'data' event handlers are removed, and they were the last consumer
-     * (ie, there are no pipe destinations), then the flow of data will stop
-     * until there is another consumer or {@link Minipass#resume} is explicitly
-     * called.
-     */
-    removeAllListeners(ev) {
-        const ret = super.removeAllListeners(ev);
-        if (ev === 'data' || ev === undefined) {
-            this[DATALISTENERS] = 0;
-            if (!this[DISCARDED] && !this[PIPES].length) {
-                this[FLOWING] = false;
-            }
-        }
-        return ret;
-    }
-    /**
-     * true if the 'end' event has been emitted
-     */
-    get emittedEnd() {
-        return this[EMITTED_END];
-    }
-    [MAYBE_EMIT_END]() {
-        if (!this[EMITTING_END] &&
-            !this[EMITTED_END] &&
-            !this[DESTROYED] &&
-            this[BUFFER].length === 0 &&
-            this[EOF]) {
-            this[EMITTING_END] = true;
-            this.emit('end');
-            this.emit('prefinish');
-            this.emit('finish');
-            if (this[CLOSED])
-                this.emit('close');
-            this[EMITTING_END] = false;
-        }
-    }
-    /**
-     * Mostly identical to `EventEmitter.emit`, with the following
-     * behavior differences to prevent data loss and unnecessary hangs:
-     *
-     * If the stream has been destroyed, and the event is something other
-     * than 'close' or 'error', then `false` is returned and no handlers
-     * are called.
-     *
-     * If the event is 'end', and has already been emitted, then the event
-     * is ignored. If the stream is in a paused or non-flowing state, then
-     * the event will be deferred until data flow resumes. If the stream is
-     * async, then handlers will be called on the next tick rather than
-     * immediately.
-     *
-     * If the event is 'close', and 'end' has not yet been emitted, then
-     * the event will be deferred until after 'end' is emitted.
-     *
-     * If the event is 'error', and an AbortSignal was provided for the stream,
-     * and there are no listeners, then the event is ignored, matching the
-     * behavior of node core streams in the presense of an AbortSignal.
-     *
-     * If the event is 'finish' or 'prefinish', then all listeners will be
-     * removed after emitting the event, to prevent double-firing.
-     */
-    emit(ev, ...args) {
-        const data = args[0];
-        // error and close are only events allowed after calling destroy()
-        if (ev !== 'error' &&
-            ev !== 'close' &&
-            ev !== DESTROYED &&
-            this[DESTROYED]) {
-            return false;
-        }
-        else if (ev === 'data') {
-            return !this[OBJECTMODE] && !data
-                ? false
-                : this[ASYNC]
-                    ? (defer(() => this[EMITDATA](data)), true)
-                    : this[EMITDATA](data);
-        }
-        else if (ev === 'end') {
-            return this[EMITEND]();
-        }
-        else if (ev === 'close') {
-            this[CLOSED] = true;
-            // don't emit close before 'end' and 'finish'
-            if (!this[EMITTED_END] && !this[DESTROYED])
-                return false;
-            const ret = super.emit('close');
-            this.removeAllListeners('close');
-            return ret;
-        }
-        else if (ev === 'error') {
-            this[EMITTED_ERROR] = data;
-            super.emit(ERROR, data);
-            const ret = !this[SIGNAL] || this.listeners('error').length
-                ? super.emit('error', data)
-                : false;
-            this[MAYBE_EMIT_END]();
-            return ret;
-        }
-        else if (ev === 'resume') {
-            const ret = super.emit('resume');
-            this[MAYBE_EMIT_END]();
-            return ret;
-        }
-        else if (ev === 'finish' || ev === 'prefinish') {
-            const ret = super.emit(ev);
-            this.removeAllListeners(ev);
-            return ret;
-        }
-        // Some other unknown event
-        const ret = super.emit(ev, ...args);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [EMITDATA](data) {
-        for (const p of this[PIPES]) {
-            if (p.dest.write(data) === false)
-                this.pause();
-        }
-        const ret = this[DISCARDED] ? false : super.emit('data', data);
-        this[MAYBE_EMIT_END]();
-        return ret;
-    }
-    [EMITEND]() {
-        if (this[EMITTED_END])
-            return false;
-        this[EMITTED_END] = true;
-        this.readable = false;
-        return this[ASYNC]
-            ? (defer(() => this[EMITEND2]()), true)
-            : this[EMITEND2]();
-    }
-    [EMITEND2]() {
-        if (this[DECODER]) {
-            const data = this[DECODER].end();
-            if (data) {
-                for (const p of this[PIPES]) {
-                    p.dest.write(data);
-                }
-                if (!this[DISCARDED])
-                    super.emit('data', data);
-            }
-        }
-        for (const p of this[PIPES]) {
-            p.end();
-        }
-        const ret = super.emit('end');
-        this.removeAllListeners('end');
-        return ret;
-    }
-    /**
-     * Return a Promise that resolves to an array of all emitted data once
-     * the stream ends.
-     */
-    async collect() {
-        const buf = Object.assign([], {
-            dataLength: 0,
-        });
-        if (!this[OBJECTMODE])
-            buf.dataLength = 0;
-        // set the promise first, in case an error is raised
-        // by triggering the flow here.
-        const p = this.promise();
-        this.on('data', c => {
-            buf.push(c);
-            if (!this[OBJECTMODE])
-                buf.dataLength += c.length;
-        });
-        await p;
-        return buf;
-    }
-    /**
-     * Return a Promise that resolves to the concatenation of all emitted data
-     * once the stream ends.
-     *
-     * Not allowed on objectMode streams.
-     */
-    async concat() {
-        if (this[OBJECTMODE]) {
-            throw new Error('cannot concat in objectMode');
-        }
-        const buf = await this.collect();
-        return (this[ENCODING]
-            ? buf.join('')
-            : Buffer.concat(buf, buf.dataLength));
-    }
-    /**
-     * Return a void Promise that resolves once the stream ends.
-     */
-    async promise() {
-        return new Promise((resolve, reject) => {
-            this.on(DESTROYED, () => reject(new Error('stream destroyed')));
-            this.on('error', er => reject(er));
-            this.on('end', () => resolve());
-        });
-    }
-    /**
-     * Asynchronous `for await of` iteration.
-     *
-     * This will continue emitting all chunks until the stream terminates.
-     */
-    [Symbol.asyncIterator]() {
-        // set this up front, in case the consumer doesn't call next()
-        // right away.
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = async () => {
-            this.pause();
-            stopped = true;
-            return { value: undefined, done: true };
-        };
-        const next = () => {
-            if (stopped)
-                return stop();
-            const res = this.read();
-            if (res !== null)
-                return Promise.resolve({ done: false, value: res });
-            if (this[EOF])
-                return stop();
-            let resolve;
-            let reject;
-            const onerr = (er) => {
-                this.off('data', ondata);
-                this.off('end', onend);
-                this.off(DESTROYED, ondestroy);
-                stop();
-                reject(er);
-            };
-            const ondata = (value) => {
-                this.off('error', onerr);
-                this.off('end', onend);
-                this.off(DESTROYED, ondestroy);
-                this.pause();
-                resolve({ value, done: !!this[EOF] });
-            };
-            const onend = () => {
-                this.off('error', onerr);
-                this.off('data', ondata);
-                this.off(DESTROYED, ondestroy);
-                stop();
-                resolve({ done: true, value: undefined });
-            };
-            const ondestroy = () => onerr(new Error('stream destroyed'));
-            return new Promise((res, rej) => {
-                reject = rej;
-                resolve = res;
-                this.once(DESTROYED, ondestroy);
-                this.once('error', onerr);
-                this.once('end', onend);
-                this.once('data', ondata);
-            });
-        };
-        return {
-            next,
-            throw: stop,
-            return: stop,
-            [Symbol.asyncIterator]() {
-                return this;
-            },
-        };
-    }
-    /**
-     * Synchronous `for of` iteration.
-     *
-     * The iteration will terminate when the internal buffer runs out, even
-     * if the stream has not yet terminated.
-     */
-    [Symbol.iterator]() {
-        // set this up front, in case the consumer doesn't call next()
-        // right away.
-        this[DISCARDED] = false;
-        let stopped = false;
-        const stop = () => {
-            this.pause();
-            this.off(ERROR, stop);
-            this.off(DESTROYED, stop);
-            this.off('end', stop);
-            stopped = true;
-            return { done: true, value: undefined };
-        };
-        const next = () => {
-            if (stopped)
-                return stop();
-            const value = this.read();
-            return value === null ? stop() : { done: false, value };
-        };
-        this.once('end', stop);
-        this.once(ERROR, stop);
-        this.once(DESTROYED, stop);
-        return {
-            next,
-            throw: stop,
-            return: stop,
-            [Symbol.iterator]() {
-                return this;
-            },
-        };
-    }
-    /**
-     * Destroy a stream, preventing it from being used for any further purpose.
-     *
-     * If the stream has a `close()` method, then it will be called on
-     * destruction.
-     *
-     * After destruction, any attempt to write data, read data, or emit most
-     * events will be ignored.
-     *
-     * If an error argument is provided, then it will be emitted in an
-     * 'error' event.
-     */
-    destroy(er) {
-        if (this[DESTROYED]) {
-            if (er)
-                this.emit('error', er);
-            else
-                this.emit(DESTROYED);
-            return this;
-        }
-        this[DESTROYED] = true;
-        this[DISCARDED] = true;
-        // throw away all buffered data, it's never coming out
-        this[BUFFER].length = 0;
-        this[BUFFERLENGTH] = 0;
-        const wc = this;
-        if (typeof wc.close === 'function' && !this[CLOSED])
-            wc.close();
-        if (er)
-            this.emit('error', er);
-        // if no error to emit, still reject pending promises
-        else
-            this.emit(DESTROYED);
-        return this;
-    }
-    /**
-     * Alias for {@link isStream}
-     *
-     * Former export location, maintained for backwards compatibility.
-     *
-     * @deprecated
-     */
-    static get isStream() {
-        return isStream;
-    }
-}
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minipass/dist/esm/package.json b/node_modules/npm/node_modules/minipass/dist/esm/package.json
deleted file mode 100644
index 7c34deb..0000000
--- a/node_modules/npm/node_modules/minipass/dist/esm/package.json
+++ /dev/null
@@ -1 +0,0 @@
-{"type":"module"}
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/minipass/package.json b/node_modules/npm/node_modules/minipass/package.json
deleted file mode 100644
index 4398347..0000000
--- a/node_modules/npm/node_modules/minipass/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
-  "name": "minipass",
-  "version": "7.0.4",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "./dist/commonjs/index.js",
-  "types": "./dist/commonjs/index.d.ts",
-  "type": "module",
-  "tshy": {
-    "main": true,
-    "exports": {
-      "./package.json": "./package.json",
-      ".": "./src/index.ts"
-    }
-  },
-  "exports": {
-    "./package.json": "./package.json",
-    ".": {
-      "import": {
-        "types": "./dist/esm/index.d.ts",
-        "default": "./dist/esm/index.js"
-      },
-      "require": {
-        "types": "./dist/commonjs/index.d.ts",
-        "default": "./dist/commonjs/index.js"
-      }
-    }
-  },
-  "files": [
-    "dist"
-  ],
-  "scripts": {
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags",
-    "prepare": "tshy",
-    "pretest": "npm run prepare",
-    "presnap": "npm run prepare",
-    "test": "tap",
-    "snap": "tap",
-    "format": "prettier --write . --loglevel warn",
-    "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 75,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  },
-  "devDependencies": {
-    "@types/end-of-stream": "^1.4.2",
-    "@types/node": "^20.1.2",
-    "end-of-stream": "^1.4.0",
-    "node-abort-controller": "^3.1.1",
-    "prettier": "^2.6.2",
-    "sync-content": "^1.0.2",
-    "tap": "^18.3.0",
-    "through2": "^2.0.3",
-    "tshy": "^1.2.2",
-    "typedoc": "^0.25.1",
-    "typescript": "^5.2.2"
-  },
-  "repository": "https://github.com/isaacs/minipass",
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "engines": {
-    "node": ">=16 || 14 >=14.17"
-  },
-  "tap": {
-    "include": [
-      "test/*.ts"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/minizlib/LICENSE b/node_modules/npm/node_modules/minizlib/LICENSE
deleted file mode 100644
index ffce738..0000000
--- a/node_modules/npm/node_modules/minizlib/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Minizlib was created by Isaac Z. Schlueter.
-It is a derivative work of the Node.js project.
-
-"""
-Copyright Isaac Z. Schlueter and Contributors
-Copyright Node.js contributors. All rights reserved.
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-"""
diff --git a/node_modules/npm/node_modules/minizlib/constants.js b/node_modules/npm/node_modules/minizlib/constants.js
deleted file mode 100644
index 641ebc7..0000000
--- a/node_modules/npm/node_modules/minizlib/constants.js
+++ /dev/null
@@ -1,115 +0,0 @@
-// Update with any zlib constants that are added or changed in the future.
-// Node v6 didn't export this, so we just hard code the version and rely
-// on all the other hard-coded values from zlib v4736.  When node v6
-// support drops, we can just export the realZlibConstants object.
-const realZlibConstants = require('zlib').constants ||
-  /* istanbul ignore next */ { ZLIB_VERNUM: 4736 }
-
-module.exports = Object.freeze(Object.assign(Object.create(null), {
-  Z_NO_FLUSH: 0,
-  Z_PARTIAL_FLUSH: 1,
-  Z_SYNC_FLUSH: 2,
-  Z_FULL_FLUSH: 3,
-  Z_FINISH: 4,
-  Z_BLOCK: 5,
-  Z_OK: 0,
-  Z_STREAM_END: 1,
-  Z_NEED_DICT: 2,
-  Z_ERRNO: -1,
-  Z_STREAM_ERROR: -2,
-  Z_DATA_ERROR: -3,
-  Z_MEM_ERROR: -4,
-  Z_BUF_ERROR: -5,
-  Z_VERSION_ERROR: -6,
-  Z_NO_COMPRESSION: 0,
-  Z_BEST_SPEED: 1,
-  Z_BEST_COMPRESSION: 9,
-  Z_DEFAULT_COMPRESSION: -1,
-  Z_FILTERED: 1,
-  Z_HUFFMAN_ONLY: 2,
-  Z_RLE: 3,
-  Z_FIXED: 4,
-  Z_DEFAULT_STRATEGY: 0,
-  DEFLATE: 1,
-  INFLATE: 2,
-  GZIP: 3,
-  GUNZIP: 4,
-  DEFLATERAW: 5,
-  INFLATERAW: 6,
-  UNZIP: 7,
-  BROTLI_DECODE: 8,
-  BROTLI_ENCODE: 9,
-  Z_MIN_WINDOWBITS: 8,
-  Z_MAX_WINDOWBITS: 15,
-  Z_DEFAULT_WINDOWBITS: 15,
-  Z_MIN_CHUNK: 64,
-  Z_MAX_CHUNK: Infinity,
-  Z_DEFAULT_CHUNK: 16384,
-  Z_MIN_MEMLEVEL: 1,
-  Z_MAX_MEMLEVEL: 9,
-  Z_DEFAULT_MEMLEVEL: 8,
-  Z_MIN_LEVEL: -1,
-  Z_MAX_LEVEL: 9,
-  Z_DEFAULT_LEVEL: -1,
-  BROTLI_OPERATION_PROCESS: 0,
-  BROTLI_OPERATION_FLUSH: 1,
-  BROTLI_OPERATION_FINISH: 2,
-  BROTLI_OPERATION_EMIT_METADATA: 3,
-  BROTLI_MODE_GENERIC: 0,
-  BROTLI_MODE_TEXT: 1,
-  BROTLI_MODE_FONT: 2,
-  BROTLI_DEFAULT_MODE: 0,
-  BROTLI_MIN_QUALITY: 0,
-  BROTLI_MAX_QUALITY: 11,
-  BROTLI_DEFAULT_QUALITY: 11,
-  BROTLI_MIN_WINDOW_BITS: 10,
-  BROTLI_MAX_WINDOW_BITS: 24,
-  BROTLI_LARGE_MAX_WINDOW_BITS: 30,
-  BROTLI_DEFAULT_WINDOW: 22,
-  BROTLI_MIN_INPUT_BLOCK_BITS: 16,
-  BROTLI_MAX_INPUT_BLOCK_BITS: 24,
-  BROTLI_PARAM_MODE: 0,
-  BROTLI_PARAM_QUALITY: 1,
-  BROTLI_PARAM_LGWIN: 2,
-  BROTLI_PARAM_LGBLOCK: 3,
-  BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: 4,
-  BROTLI_PARAM_SIZE_HINT: 5,
-  BROTLI_PARAM_LARGE_WINDOW: 6,
-  BROTLI_PARAM_NPOSTFIX: 7,
-  BROTLI_PARAM_NDIRECT: 8,
-  BROTLI_DECODER_RESULT_ERROR: 0,
-  BROTLI_DECODER_RESULT_SUCCESS: 1,
-  BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: 2,
-  BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: 3,
-  BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: 0,
-  BROTLI_DECODER_PARAM_LARGE_WINDOW: 1,
-  BROTLI_DECODER_NO_ERROR: 0,
-  BROTLI_DECODER_SUCCESS: 1,
-  BROTLI_DECODER_NEEDS_MORE_INPUT: 2,
-  BROTLI_DECODER_NEEDS_MORE_OUTPUT: 3,
-  BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: -1,
-  BROTLI_DECODER_ERROR_FORMAT_RESERVED: -2,
-  BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: -3,
-  BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: -4,
-  BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: -5,
-  BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: -6,
-  BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: -7,
-  BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: -8,
-  BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: -9,
-  BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: -10,
-  BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: -11,
-  BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: -12,
-  BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: -13,
-  BROTLI_DECODER_ERROR_FORMAT_PADDING_1: -14,
-  BROTLI_DECODER_ERROR_FORMAT_PADDING_2: -15,
-  BROTLI_DECODER_ERROR_FORMAT_DISTANCE: -16,
-  BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: -19,
-  BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: -20,
-  BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: -21,
-  BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: -22,
-  BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: -25,
-  BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: -26,
-  BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: -27,
-  BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: -30,
-  BROTLI_DECODER_ERROR_UNREACHABLE: -31,
-}, realZlibConstants))
diff --git a/node_modules/npm/node_modules/minizlib/index.js b/node_modules/npm/node_modules/minizlib/index.js
deleted file mode 100644
index fbaf69e..0000000
--- a/node_modules/npm/node_modules/minizlib/index.js
+++ /dev/null
@@ -1,348 +0,0 @@
-'use strict'
-
-const assert = require('assert')
-const Buffer = require('buffer').Buffer
-const realZlib = require('zlib')
-
-const constants = exports.constants = require('./constants.js')
-const Minipass = require('minipass')
-
-const OriginalBufferConcat = Buffer.concat
-
-const _superWrite = Symbol('_superWrite')
-class ZlibError extends Error {
-  constructor (err) {
-    super('zlib: ' + err.message)
-    this.code = err.code
-    this.errno = err.errno
-    /* istanbul ignore if */
-    if (!this.code)
-      this.code = 'ZLIB_ERROR'
-
-    this.message = 'zlib: ' + err.message
-    Error.captureStackTrace(this, this.constructor)
-  }
-
-  get name () {
-    return 'ZlibError'
-  }
-}
-
-// the Zlib class they all inherit from
-// This thing manages the queue of requests, and returns
-// true or false if there is anything in the queue when
-// you call the .write() method.
-const _opts = Symbol('opts')
-const _flushFlag = Symbol('flushFlag')
-const _finishFlushFlag = Symbol('finishFlushFlag')
-const _fullFlushFlag = Symbol('fullFlushFlag')
-const _handle = Symbol('handle')
-const _onError = Symbol('onError')
-const _sawError = Symbol('sawError')
-const _level = Symbol('level')
-const _strategy = Symbol('strategy')
-const _ended = Symbol('ended')
-const _defaultFullFlush = Symbol('_defaultFullFlush')
-
-class ZlibBase extends Minipass {
-  constructor (opts, mode) {
-    if (!opts || typeof opts !== 'object')
-      throw new TypeError('invalid options for ZlibBase constructor')
-
-    super(opts)
-    this[_sawError] = false
-    this[_ended] = false
-    this[_opts] = opts
-
-    this[_flushFlag] = opts.flush
-    this[_finishFlushFlag] = opts.finishFlush
-    // this will throw if any options are invalid for the class selected
-    try {
-      this[_handle] = new realZlib[mode](opts)
-    } catch (er) {
-      // make sure that all errors get decorated properly
-      throw new ZlibError(er)
-    }
-
-    this[_onError] = (err) => {
-      // no sense raising multiple errors, since we abort on the first one.
-      if (this[_sawError])
-        return
-
-      this[_sawError] = true
-
-      // there is no way to cleanly recover.
-      // continuing only obscures problems.
-      this.close()
-      this.emit('error', err)
-    }
-
-    this[_handle].on('error', er => this[_onError](new ZlibError(er)))
-    this.once('end', () => this.close)
-  }
-
-  close () {
-    if (this[_handle]) {
-      this[_handle].close()
-      this[_handle] = null
-      this.emit('close')
-    }
-  }
-
-  reset () {
-    if (!this[_sawError]) {
-      assert(this[_handle], 'zlib binding closed')
-      return this[_handle].reset()
-    }
-  }
-
-  flush (flushFlag) {
-    if (this.ended)
-      return
-
-    if (typeof flushFlag !== 'number')
-      flushFlag = this[_fullFlushFlag]
-    this.write(Object.assign(Buffer.alloc(0), { [_flushFlag]: flushFlag }))
-  }
-
-  end (chunk, encoding, cb) {
-    if (chunk)
-      this.write(chunk, encoding)
-    this.flush(this[_finishFlushFlag])
-    this[_ended] = true
-    return super.end(null, null, cb)
-  }
-
-  get ended () {
-    return this[_ended]
-  }
-
-  write (chunk, encoding, cb) {
-    // process the chunk using the sync process
-    // then super.write() all the outputted chunks
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (typeof chunk === 'string')
-      chunk = Buffer.from(chunk, encoding)
-
-    if (this[_sawError])
-      return
-    assert(this[_handle], 'zlib binding closed')
-
-    // _processChunk tries to .close() the native handle after it's done, so we
-    // intercept that by temporarily making it a no-op.
-    const nativeHandle = this[_handle]._handle
-    const originalNativeClose = nativeHandle.close
-    nativeHandle.close = () => {}
-    const originalClose = this[_handle].close
-    this[_handle].close = () => {}
-    // It also calls `Buffer.concat()` at the end, which may be convenient
-    // for some, but which we are not interested in as it slows us down.
-    Buffer.concat = (args) => args
-    let result
-    try {
-      const flushFlag = typeof chunk[_flushFlag] === 'number'
-        ? chunk[_flushFlag] : this[_flushFlag]
-      result = this[_handle]._processChunk(chunk, flushFlag)
-      // if we don't throw, reset it back how it was
-      Buffer.concat = OriginalBufferConcat
-    } catch (err) {
-      // or if we do, put Buffer.concat() back before we emit error
-      // Error events call into user code, which may call Buffer.concat()
-      Buffer.concat = OriginalBufferConcat
-      this[_onError](new ZlibError(err))
-    } finally {
-      if (this[_handle]) {
-        // Core zlib resets `_handle` to null after attempting to close the
-        // native handle. Our no-op handler prevented actual closure, but we
-        // need to restore the `._handle` property.
-        this[_handle]._handle = nativeHandle
-        nativeHandle.close = originalNativeClose
-        this[_handle].close = originalClose
-        // `_processChunk()` adds an 'error' listener. If we don't remove it
-        // after each call, these handlers start piling up.
-        this[_handle].removeAllListeners('error')
-        // make sure OUR error listener is still attached tho
-      }
-    }
-
-    if (this[_handle])
-      this[_handle].on('error', er => this[_onError](new ZlibError(er)))
-
-    let writeReturn
-    if (result) {
-      if (Array.isArray(result) && result.length > 0) {
-        // The first buffer is always `handle._outBuffer`, which would be
-        // re-used for later invocations; so, we always have to copy that one.
-        writeReturn = this[_superWrite](Buffer.from(result[0]))
-        for (let i = 1; i < result.length; i++) {
-          writeReturn = this[_superWrite](result[i])
-        }
-      } else {
-        writeReturn = this[_superWrite](Buffer.from(result))
-      }
-    }
-
-    if (cb)
-      cb()
-    return writeReturn
-  }
-
-  [_superWrite] (data) {
-    return super.write(data)
-  }
-}
-
-class Zlib extends ZlibBase {
-  constructor (opts, mode) {
-    opts = opts || {}
-
-    opts.flush = opts.flush || constants.Z_NO_FLUSH
-    opts.finishFlush = opts.finishFlush || constants.Z_FINISH
-    super(opts, mode)
-
-    this[_fullFlushFlag] = constants.Z_FULL_FLUSH
-    this[_level] = opts.level
-    this[_strategy] = opts.strategy
-  }
-
-  params (level, strategy) {
-    if (this[_sawError])
-      return
-
-    if (!this[_handle])
-      throw new Error('cannot switch params when binding is closed')
-
-    // no way to test this without also not supporting params at all
-    /* istanbul ignore if */
-    if (!this[_handle].params)
-      throw new Error('not supported in this implementation')
-
-    if (this[_level] !== level || this[_strategy] !== strategy) {
-      this.flush(constants.Z_SYNC_FLUSH)
-      assert(this[_handle], 'zlib binding closed')
-      // .params() calls .flush(), but the latter is always async in the
-      // core zlib. We override .flush() temporarily to intercept that and
-      // flush synchronously.
-      const origFlush = this[_handle].flush
-      this[_handle].flush = (flushFlag, cb) => {
-        this.flush(flushFlag)
-        cb()
-      }
-      try {
-        this[_handle].params(level, strategy)
-      } finally {
-        this[_handle].flush = origFlush
-      }
-      /* istanbul ignore else */
-      if (this[_handle]) {
-        this[_level] = level
-        this[_strategy] = strategy
-      }
-    }
-  }
-}
-
-// minimal 2-byte header
-class Deflate extends Zlib {
-  constructor (opts) {
-    super(opts, 'Deflate')
-  }
-}
-
-class Inflate extends Zlib {
-  constructor (opts) {
-    super(opts, 'Inflate')
-  }
-}
-
-// gzip - bigger header, same deflate compression
-const _portable = Symbol('_portable')
-class Gzip extends Zlib {
-  constructor (opts) {
-    super(opts, 'Gzip')
-    this[_portable] = opts && !!opts.portable
-  }
-
-  [_superWrite] (data) {
-    if (!this[_portable])
-      return super[_superWrite](data)
-
-    // we'll always get the header emitted in one first chunk
-    // overwrite the OS indicator byte with 0xFF
-    this[_portable] = false
-    data[9] = 255
-    return super[_superWrite](data)
-  }
-}
-
-class Gunzip extends Zlib {
-  constructor (opts) {
-    super(opts, 'Gunzip')
-  }
-}
-
-// raw - no header
-class DeflateRaw extends Zlib {
-  constructor (opts) {
-    super(opts, 'DeflateRaw')
-  }
-}
-
-class InflateRaw extends Zlib {
-  constructor (opts) {
-    super(opts, 'InflateRaw')
-  }
-}
-
-// auto-detect header.
-class Unzip extends Zlib {
-  constructor (opts) {
-    super(opts, 'Unzip')
-  }
-}
-
-class Brotli extends ZlibBase {
-  constructor (opts, mode) {
-    opts = opts || {}
-
-    opts.flush = opts.flush || constants.BROTLI_OPERATION_PROCESS
-    opts.finishFlush = opts.finishFlush || constants.BROTLI_OPERATION_FINISH
-
-    super(opts, mode)
-
-    this[_fullFlushFlag] = constants.BROTLI_OPERATION_FLUSH
-  }
-}
-
-class BrotliCompress extends Brotli {
-  constructor (opts) {
-    super(opts, 'BrotliCompress')
-  }
-}
-
-class BrotliDecompress extends Brotli {
-  constructor (opts) {
-    super(opts, 'BrotliDecompress')
-  }
-}
-
-exports.Deflate = Deflate
-exports.Inflate = Inflate
-exports.Gzip = Gzip
-exports.Gunzip = Gunzip
-exports.DeflateRaw = DeflateRaw
-exports.InflateRaw = InflateRaw
-exports.Unzip = Unzip
-/* istanbul ignore else */
-if (typeof realZlib.BrotliCompress === 'function') {
-  exports.BrotliCompress = BrotliCompress
-  exports.BrotliDecompress = BrotliDecompress
-} else {
-  exports.BrotliCompress = exports.BrotliDecompress = class {
-    constructor () {
-      throw new Error('Brotli is not supported in this version of Node.js')
-    }
-  }
-}
diff --git a/node_modules/npm/node_modules/minizlib/node_modules/minipass/LICENSE b/node_modules/npm/node_modules/minizlib/node_modules/minipass/LICENSE
deleted file mode 100644
index bf1dece..0000000
--- a/node_modules/npm/node_modules/minizlib/node_modules/minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/minizlib/node_modules/minipass/index.js b/node_modules/npm/node_modules/minizlib/node_modules/minipass/index.js
deleted file mode 100644
index e8797aa..0000000
--- a/node_modules/npm/node_modules/minizlib/node_modules/minipass/index.js
+++ /dev/null
@@ -1,649 +0,0 @@
-'use strict'
-const proc = typeof process === 'object' && process ? process : {
-  stdout: null,
-  stderr: null,
-}
-const EE = require('events')
-const Stream = require('stream')
-const SD = require('string_decoder').StringDecoder
-
-const EOF = Symbol('EOF')
-const MAYBE_EMIT_END = Symbol('maybeEmitEnd')
-const EMITTED_END = Symbol('emittedEnd')
-const EMITTING_END = Symbol('emittingEnd')
-const EMITTED_ERROR = Symbol('emittedError')
-const CLOSED = Symbol('closed')
-const READ = Symbol('read')
-const FLUSH = Symbol('flush')
-const FLUSHCHUNK = Symbol('flushChunk')
-const ENCODING = Symbol('encoding')
-const DECODER = Symbol('decoder')
-const FLOWING = Symbol('flowing')
-const PAUSED = Symbol('paused')
-const RESUME = Symbol('resume')
-const BUFFERLENGTH = Symbol('bufferLength')
-const BUFFERPUSH = Symbol('bufferPush')
-const BUFFERSHIFT = Symbol('bufferShift')
-const OBJECTMODE = Symbol('objectMode')
-const DESTROYED = Symbol('destroyed')
-const EMITDATA = Symbol('emitData')
-const EMITEND = Symbol('emitEnd')
-const EMITEND2 = Symbol('emitEnd2')
-const ASYNC = Symbol('async')
-
-const defer = fn => Promise.resolve().then(fn)
-
-// TODO remove when Node v8 support drops
-const doIter = global._MP_NO_ITERATOR_SYMBOLS_  !== '1'
-const ASYNCITERATOR = doIter && Symbol.asyncIterator
-  || Symbol('asyncIterator not implemented')
-const ITERATOR = doIter && Symbol.iterator
-  || Symbol('iterator not implemented')
-
-// events that mean 'the stream is over'
-// these are treated specially, and re-emitted
-// if they are listened for after emitting.
-const isEndish = ev =>
-  ev === 'end' ||
-  ev === 'finish' ||
-  ev === 'prefinish'
-
-const isArrayBuffer = b => b instanceof ArrayBuffer ||
-  typeof b === 'object' &&
-  b.constructor &&
-  b.constructor.name === 'ArrayBuffer' &&
-  b.byteLength >= 0
-
-const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b)
-
-class Pipe {
-  constructor (src, dest, opts) {
-    this.src = src
-    this.dest = dest
-    this.opts = opts
-    this.ondrain = () => src[RESUME]()
-    dest.on('drain', this.ondrain)
-  }
-  unpipe () {
-    this.dest.removeListener('drain', this.ondrain)
-  }
-  // istanbul ignore next - only here for the prototype
-  proxyErrors () {}
-  end () {
-    this.unpipe()
-    if (this.opts.end)
-      this.dest.end()
-  }
-}
-
-class PipeProxyErrors extends Pipe {
-  unpipe () {
-    this.src.removeListener('error', this.proxyErrors)
-    super.unpipe()
-  }
-  constructor (src, dest, opts) {
-    super(src, dest, opts)
-    this.proxyErrors = er => dest.emit('error', er)
-    src.on('error', this.proxyErrors)
-  }
-}
-
-module.exports = class Minipass extends Stream {
-  constructor (options) {
-    super()
-    this[FLOWING] = false
-    // whether we're explicitly paused
-    this[PAUSED] = false
-    this.pipes = []
-    this.buffer = []
-    this[OBJECTMODE] = options && options.objectMode || false
-    if (this[OBJECTMODE])
-      this[ENCODING] = null
-    else
-      this[ENCODING] = options && options.encoding || null
-    if (this[ENCODING] === 'buffer')
-      this[ENCODING] = null
-    this[ASYNC] = options && !!options.async || false
-    this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null
-    this[EOF] = false
-    this[EMITTED_END] = false
-    this[EMITTING_END] = false
-    this[CLOSED] = false
-    this[EMITTED_ERROR] = null
-    this.writable = true
-    this.readable = true
-    this[BUFFERLENGTH] = 0
-    this[DESTROYED] = false
-  }
-
-  get bufferLength () { return this[BUFFERLENGTH] }
-
-  get encoding () { return this[ENCODING] }
-  set encoding (enc) {
-    if (this[OBJECTMODE])
-      throw new Error('cannot set encoding in objectMode')
-
-    if (this[ENCODING] && enc !== this[ENCODING] &&
-        (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH]))
-      throw new Error('cannot change encoding')
-
-    if (this[ENCODING] !== enc) {
-      this[DECODER] = enc ? new SD(enc) : null
-      if (this.buffer.length)
-        this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk))
-    }
-
-    this[ENCODING] = enc
-  }
-
-  setEncoding (enc) {
-    this.encoding = enc
-  }
-
-  get objectMode () { return this[OBJECTMODE] }
-  set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om }
-
-  get ['async'] () { return this[ASYNC] }
-  set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a }
-
-  write (chunk, encoding, cb) {
-    if (this[EOF])
-      throw new Error('write after end')
-
-    if (this[DESTROYED]) {
-      this.emit('error', Object.assign(
-        new Error('Cannot call write after a stream was destroyed'),
-        { code: 'ERR_STREAM_DESTROYED' }
-      ))
-      return true
-    }
-
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-
-    if (!encoding)
-      encoding = 'utf8'
-
-    const fn = this[ASYNC] ? defer : f => f()
-
-    // convert array buffers and typed array views into buffers
-    // at some point in the future, we may want to do the opposite!
-    // leave strings and buffers as-is
-    // anything else switches us into object mode
-    if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) {
-      if (isArrayBufferView(chunk))
-        chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
-      else if (isArrayBuffer(chunk))
-        chunk = Buffer.from(chunk)
-      else if (typeof chunk !== 'string')
-        // use the setter so we throw if we have encoding set
-        this.objectMode = true
-    }
-
-    // handle object mode up front, since it's simpler
-    // this yields better performance, fewer checks later.
-    if (this[OBJECTMODE]) {
-      /* istanbul ignore if - maybe impossible? */
-      if (this.flowing && this[BUFFERLENGTH] !== 0)
-        this[FLUSH](true)
-
-      if (this.flowing)
-        this.emit('data', chunk)
-      else
-        this[BUFFERPUSH](chunk)
-
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-
-      if (cb)
-        fn(cb)
-
-      return this.flowing
-    }
-
-    // at this point the chunk is a buffer or string
-    // don't buffer it up or send it to the decoder
-    if (!chunk.length) {
-      if (this[BUFFERLENGTH] !== 0)
-        this.emit('readable')
-      if (cb)
-        fn(cb)
-      return this.flowing
-    }
-
-    // fast-path writing strings of same encoding to a stream with
-    // an empty buffer, skipping the buffer/decoder dance
-    if (typeof chunk === 'string' &&
-        // unless it is a string already ready for us to use
-        !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) {
-      chunk = Buffer.from(chunk, encoding)
-    }
-
-    if (Buffer.isBuffer(chunk) && this[ENCODING])
-      chunk = this[DECODER].write(chunk)
-
-    // Note: flushing CAN potentially switch us into not-flowing mode
-    if (this.flowing && this[BUFFERLENGTH] !== 0)
-      this[FLUSH](true)
-
-    if (this.flowing)
-      this.emit('data', chunk)
-    else
-      this[BUFFERPUSH](chunk)
-
-    if (this[BUFFERLENGTH] !== 0)
-      this.emit('readable')
-
-    if (cb)
-      fn(cb)
-
-    return this.flowing
-  }
-
-  read (n) {
-    if (this[DESTROYED])
-      return null
-
-    if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) {
-      this[MAYBE_EMIT_END]()
-      return null
-    }
-
-    if (this[OBJECTMODE])
-      n = null
-
-    if (this.buffer.length > 1 && !this[OBJECTMODE]) {
-      if (this.encoding)
-        this.buffer = [this.buffer.join('')]
-      else
-        this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])]
-    }
-
-    const ret = this[READ](n || null, this.buffer[0])
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [READ] (n, chunk) {
-    if (n === chunk.length || n === null)
-      this[BUFFERSHIFT]()
-    else {
-      this.buffer[0] = chunk.slice(n)
-      chunk = chunk.slice(0, n)
-      this[BUFFERLENGTH] -= n
-    }
-
-    this.emit('data', chunk)
-
-    if (!this.buffer.length && !this[EOF])
-      this.emit('drain')
-
-    return chunk
-  }
-
-  end (chunk, encoding, cb) {
-    if (typeof chunk === 'function')
-      cb = chunk, chunk = null
-    if (typeof encoding === 'function')
-      cb = encoding, encoding = 'utf8'
-    if (chunk)
-      this.write(chunk, encoding)
-    if (cb)
-      this.once('end', cb)
-    this[EOF] = true
-    this.writable = false
-
-    // if we haven't written anything, then go ahead and emit,
-    // even if we're not reading.
-    // we'll re-emit if a new 'end' listener is added anyway.
-    // This makes MP more suitable to write-only use cases.
-    if (this.flowing || !this[PAUSED])
-      this[MAYBE_EMIT_END]()
-    return this
-  }
-
-  // don't let the internal resume be overwritten
-  [RESUME] () {
-    if (this[DESTROYED])
-      return
-
-    this[PAUSED] = false
-    this[FLOWING] = true
-    this.emit('resume')
-    if (this.buffer.length)
-      this[FLUSH]()
-    else if (this[EOF])
-      this[MAYBE_EMIT_END]()
-    else
-      this.emit('drain')
-  }
-
-  resume () {
-    return this[RESUME]()
-  }
-
-  pause () {
-    this[FLOWING] = false
-    this[PAUSED] = true
-  }
-
-  get destroyed () {
-    return this[DESTROYED]
-  }
-
-  get flowing () {
-    return this[FLOWING]
-  }
-
-  get paused () {
-    return this[PAUSED]
-  }
-
-  [BUFFERPUSH] (chunk) {
-    if (this[OBJECTMODE])
-      this[BUFFERLENGTH] += 1
-    else
-      this[BUFFERLENGTH] += chunk.length
-    this.buffer.push(chunk)
-  }
-
-  [BUFFERSHIFT] () {
-    if (this.buffer.length) {
-      if (this[OBJECTMODE])
-        this[BUFFERLENGTH] -= 1
-      else
-        this[BUFFERLENGTH] -= this.buffer[0].length
-    }
-    return this.buffer.shift()
-  }
-
-  [FLUSH] (noDrain) {
-    do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()))
-
-    if (!noDrain && !this.buffer.length && !this[EOF])
-      this.emit('drain')
-  }
-
-  [FLUSHCHUNK] (chunk) {
-    return chunk ? (this.emit('data', chunk), this.flowing) : false
-  }
-
-  pipe (dest, opts) {
-    if (this[DESTROYED])
-      return
-
-    const ended = this[EMITTED_END]
-    opts = opts || {}
-    if (dest === proc.stdout || dest === proc.stderr)
-      opts.end = false
-    else
-      opts.end = opts.end !== false
-    opts.proxyErrors = !!opts.proxyErrors
-
-    // piping an ended stream ends immediately
-    if (ended) {
-      if (opts.end)
-        dest.end()
-    } else {
-      this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts)
-        : new PipeProxyErrors(this, dest, opts))
-      if (this[ASYNC])
-        defer(() => this[RESUME]())
-      else
-        this[RESUME]()
-    }
-
-    return dest
-  }
-
-  unpipe (dest) {
-    const p = this.pipes.find(p => p.dest === dest)
-    if (p) {
-      this.pipes.splice(this.pipes.indexOf(p), 1)
-      p.unpipe()
-    }
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'data' && !this.pipes.length && !this.flowing)
-      this[RESUME]()
-    else if (ev === 'readable' && this[BUFFERLENGTH] !== 0)
-      super.emit('readable')
-    else if (isEndish(ev) && this[EMITTED_END]) {
-      super.emit(ev)
-      this.removeAllListeners(ev)
-    } else if (ev === 'error' && this[EMITTED_ERROR]) {
-      if (this[ASYNC])
-        defer(() => fn.call(this, this[EMITTED_ERROR]))
-      else
-        fn.call(this, this[EMITTED_ERROR])
-    }
-    return ret
-  }
-
-  get emittedEnd () {
-    return this[EMITTED_END]
-  }
-
-  [MAYBE_EMIT_END] () {
-    if (!this[EMITTING_END] &&
-        !this[EMITTED_END] &&
-        !this[DESTROYED] &&
-        this.buffer.length === 0 &&
-        this[EOF]) {
-      this[EMITTING_END] = true
-      this.emit('end')
-      this.emit('prefinish')
-      this.emit('finish')
-      if (this[CLOSED])
-        this.emit('close')
-      this[EMITTING_END] = false
-    }
-  }
-
-  emit (ev, data, ...extra) {
-    // error and close are only events allowed after calling destroy()
-    if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED])
-      return
-    else if (ev === 'data') {
-      return !data ? false
-        : this[ASYNC] ? defer(() => this[EMITDATA](data))
-        : this[EMITDATA](data)
-    } else if (ev === 'end') {
-      return this[EMITEND]()
-    } else if (ev === 'close') {
-      this[CLOSED] = true
-      // don't emit close before 'end' and 'finish'
-      if (!this[EMITTED_END] && !this[DESTROYED])
-        return
-      const ret = super.emit('close')
-      this.removeAllListeners('close')
-      return ret
-    } else if (ev === 'error') {
-      this[EMITTED_ERROR] = data
-      const ret = super.emit('error', data)
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'resume') {
-      const ret = super.emit('resume')
-      this[MAYBE_EMIT_END]()
-      return ret
-    } else if (ev === 'finish' || ev === 'prefinish') {
-      const ret = super.emit(ev)
-      this.removeAllListeners(ev)
-      return ret
-    }
-
-    // Some other unknown event
-    const ret = super.emit(ev, data, ...extra)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITDATA] (data) {
-    for (const p of this.pipes) {
-      if (p.dest.write(data) === false)
-        this.pause()
-    }
-    const ret = super.emit('data', data)
-    this[MAYBE_EMIT_END]()
-    return ret
-  }
-
-  [EMITEND] () {
-    if (this[EMITTED_END])
-      return
-
-    this[EMITTED_END] = true
-    this.readable = false
-    if (this[ASYNC])
-      defer(() => this[EMITEND2]())
-    else
-      this[EMITEND2]()
-  }
-
-  [EMITEND2] () {
-    if (this[DECODER]) {
-      const data = this[DECODER].end()
-      if (data) {
-        for (const p of this.pipes) {
-          p.dest.write(data)
-        }
-        super.emit('data', data)
-      }
-    }
-
-    for (const p of this.pipes) {
-      p.end()
-    }
-    const ret = super.emit('end')
-    this.removeAllListeners('end')
-    return ret
-  }
-
-  // const all = await stream.collect()
-  collect () {
-    const buf = []
-    if (!this[OBJECTMODE])
-      buf.dataLength = 0
-    // set the promise first, in case an error is raised
-    // by triggering the flow here.
-    const p = this.promise()
-    this.on('data', c => {
-      buf.push(c)
-      if (!this[OBJECTMODE])
-        buf.dataLength += c.length
-    })
-    return p.then(() => buf)
-  }
-
-  // const data = await stream.concat()
-  concat () {
-    return this[OBJECTMODE]
-      ? Promise.reject(new Error('cannot concat in objectMode'))
-      : this.collect().then(buf =>
-          this[OBJECTMODE]
-            ? Promise.reject(new Error('cannot concat in objectMode'))
-            : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength))
-  }
-
-  // stream.promise().then(() => done, er => emitted error)
-  promise () {
-    return new Promise((resolve, reject) => {
-      this.on(DESTROYED, () => reject(new Error('stream destroyed')))
-      this.on('error', er => reject(er))
-      this.on('end', () => resolve())
-    })
-  }
-
-  // for await (let chunk of stream)
-  [ASYNCITERATOR] () {
-    const next = () => {
-      const res = this.read()
-      if (res !== null)
-        return Promise.resolve({ done: false, value: res })
-
-      if (this[EOF])
-        return Promise.resolve({ done: true })
-
-      let resolve = null
-      let reject = null
-      const onerr = er => {
-        this.removeListener('data', ondata)
-        this.removeListener('end', onend)
-        reject(er)
-      }
-      const ondata = value => {
-        this.removeListener('error', onerr)
-        this.removeListener('end', onend)
-        this.pause()
-        resolve({ value: value, done: !!this[EOF] })
-      }
-      const onend = () => {
-        this.removeListener('error', onerr)
-        this.removeListener('data', ondata)
-        resolve({ done: true })
-      }
-      const ondestroy = () => onerr(new Error('stream destroyed'))
-      return new Promise((res, rej) => {
-        reject = rej
-        resolve = res
-        this.once(DESTROYED, ondestroy)
-        this.once('error', onerr)
-        this.once('end', onend)
-        this.once('data', ondata)
-      })
-    }
-
-    return { next }
-  }
-
-  // for (let chunk of stream)
-  [ITERATOR] () {
-    const next = () => {
-      const value = this.read()
-      const done = value === null
-      return { value, done }
-    }
-    return { next }
-  }
-
-  destroy (er) {
-    if (this[DESTROYED]) {
-      if (er)
-        this.emit('error', er)
-      else
-        this.emit(DESTROYED)
-      return this
-    }
-
-    this[DESTROYED] = true
-
-    // throw away all buffered data, it's never coming out
-    this.buffer.length = 0
-    this[BUFFERLENGTH] = 0
-
-    if (typeof this.close === 'function' && !this[CLOSED])
-      this.close()
-
-    if (er)
-      this.emit('error', er)
-    else // if no error to emit, still reject pending promises
-      this.emit(DESTROYED)
-
-    return this
-  }
-
-  static isStream (s) {
-    return !!s && (s instanceof Minipass || s instanceof Stream ||
-      s instanceof EE && (
-        typeof s.pipe === 'function' || // readable
-        (typeof s.write === 'function' && typeof s.end === 'function') // writable
-      ))
-  }
-}
diff --git a/node_modules/npm/node_modules/minizlib/node_modules/minipass/package.json b/node_modules/npm/node_modules/minizlib/node_modules/minipass/package.json
deleted file mode 100644
index 548d03f..0000000
--- a/node_modules/npm/node_modules/minizlib/node_modules/minipass/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "name": "minipass",
-  "version": "3.3.6",
-  "description": "minimal implementation of a PassThrough stream",
-  "main": "index.js",
-  "types": "index.d.ts",
-  "dependencies": {
-    "yallist": "^4.0.0"
-  },
-  "devDependencies": {
-    "@types/node": "^17.0.41",
-    "end-of-stream": "^1.4.0",
-    "prettier": "^2.6.2",
-    "tap": "^16.2.0",
-    "through2": "^2.0.3",
-    "ts-node": "^10.8.1",
-    "typescript": "^4.7.3"
-  },
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minipass.git"
-  },
-  "keywords": [
-    "passthrough",
-    "stream"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "ISC",
-  "files": [
-    "index.d.ts",
-    "index.js"
-  ],
-  "tap": {
-    "check-coverage": true
-  },
-  "engines": {
-    "node": ">=8"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 80,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  }
-}
diff --git a/node_modules/npm/node_modules/minizlib/package.json b/node_modules/npm/node_modules/minizlib/package.json
deleted file mode 100644
index 98825a5..0000000
--- a/node_modules/npm/node_modules/minizlib/package.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
-  "name": "minizlib",
-  "version": "2.1.2",
-  "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.",
-  "main": "index.js",
-  "dependencies": {
-    "minipass": "^3.0.0",
-    "yallist": "^4.0.0"
-  },
-  "scripts": {
-    "test": "tap test/*.js --100 -J",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --all; git push origin --tags"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/minizlib.git"
-  },
-  "keywords": [
-    "zlib",
-    "gzip",
-    "gunzip",
-    "deflate",
-    "inflate",
-    "compression",
-    "zip",
-    "unzip"
-  ],
-  "author": "Isaac Z. Schlueter  (http://blog.izs.me/)",
-  "license": "MIT",
-  "devDependencies": {
-    "tap": "^14.6.9"
-  },
-  "files": [
-    "index.js",
-    "constants.js"
-  ],
-  "engines": {
-    "node": ">= 8"
-  }
-}
diff --git a/node_modules/npm/node_modules/mkdirp/LICENSE b/node_modules/npm/node_modules/mkdirp/LICENSE
deleted file mode 100644
index 13fcd15..0000000
--- a/node_modules/npm/node_modules/mkdirp/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me)
-
-This project is free software released under the MIT license:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/mkdirp/bin/cmd.js b/node_modules/npm/node_modules/mkdirp/bin/cmd.js
deleted file mode 100755
index 6e0aa8d..0000000
--- a/node_modules/npm/node_modules/mkdirp/bin/cmd.js
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/usr/bin/env node
-
-const usage = () => `
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
-  Create each supplied directory including any necessary parent directories
-  that don't yet exist.
-
-  If the directory already exists, do nothing.
-
-OPTIONS are:
-
-  -m       If a directory needs to be created, set the mode as an octal
-  --mode=  permission string.
-
-  -v --version   Print the mkdirp version number
-
-  -h --help      Print this helpful banner
-
-  -p --print     Print the first directories created for each path provided
-
-  --manual       Use manual implementation, even if native is available
-`
-
-const dirs = []
-const opts = {}
-let print = false
-let dashdash = false
-let manual = false
-for (const arg of process.argv.slice(2)) {
-  if (dashdash)
-    dirs.push(arg)
-  else if (arg === '--')
-    dashdash = true
-  else if (arg === '--manual')
-    manual = true
-  else if (/^-h/.test(arg) || /^--help/.test(arg)) {
-    console.log(usage())
-    process.exit(0)
-  } else if (arg === '-v' || arg === '--version') {
-    console.log(require('../package.json').version)
-    process.exit(0)
-  } else if (arg === '-p' || arg === '--print') {
-    print = true
-  } else if (/^-m/.test(arg) || /^--mode=/.test(arg)) {
-    const mode = parseInt(arg.replace(/^(-m|--mode=)/, ''), 8)
-    if (isNaN(mode)) {
-      console.error(`invalid mode argument: ${arg}\nMust be an octal number.`)
-      process.exit(1)
-    }
-    opts.mode = mode
-  } else
-    dirs.push(arg)
-}
-
-const mkdirp = require('../')
-const impl = manual ? mkdirp.manual : mkdirp
-if (dirs.length === 0)
-  console.error(usage())
-
-Promise.all(dirs.map(dir => impl(dir, opts)))
-  .then(made => print ? made.forEach(m => m && console.log(m)) : null)
-  .catch(er => {
-    console.error(er.message)
-    if (er.code)
-      console.error('  code: ' + er.code)
-    process.exit(1)
-  })
diff --git a/node_modules/npm/node_modules/mkdirp/index.js b/node_modules/npm/node_modules/mkdirp/index.js
deleted file mode 100644
index ad7a16c..0000000
--- a/node_modules/npm/node_modules/mkdirp/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const optsArg = require('./lib/opts-arg.js')
-const pathArg = require('./lib/path-arg.js')
-
-const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')
-const {mkdirpManual, mkdirpManualSync} = require('./lib/mkdirp-manual.js')
-const {useNative, useNativeSync} = require('./lib/use-native.js')
-
-
-const mkdirp = (path, opts) => {
-  path = pathArg(path)
-  opts = optsArg(opts)
-  return useNative(opts)
-    ? mkdirpNative(path, opts)
-    : mkdirpManual(path, opts)
-}
-
-const mkdirpSync = (path, opts) => {
-  path = pathArg(path)
-  opts = optsArg(opts)
-  return useNativeSync(opts)
-    ? mkdirpNativeSync(path, opts)
-    : mkdirpManualSync(path, opts)
-}
-
-mkdirp.sync = mkdirpSync
-mkdirp.native = (path, opts) => mkdirpNative(pathArg(path), optsArg(opts))
-mkdirp.manual = (path, opts) => mkdirpManual(pathArg(path), optsArg(opts))
-mkdirp.nativeSync = (path, opts) => mkdirpNativeSync(pathArg(path), optsArg(opts))
-mkdirp.manualSync = (path, opts) => mkdirpManualSync(pathArg(path), optsArg(opts))
-
-module.exports = mkdirp
diff --git a/node_modules/npm/node_modules/mkdirp/lib/find-made.js b/node_modules/npm/node_modules/mkdirp/lib/find-made.js
deleted file mode 100644
index 022e492..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/find-made.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const {dirname} = require('path')
-
-const findMade = (opts, parent, path = undefined) => {
-  // we never want the 'made' return value to be a root directory
-  if (path === parent)
-    return Promise.resolve()
-
-  return opts.statAsync(parent).then(
-    st => st.isDirectory() ? path : undefined, // will fail later
-    er => er.code === 'ENOENT'
-      ? findMade(opts, dirname(parent), parent)
-      : undefined
-  )
-}
-
-const findMadeSync = (opts, parent, path = undefined) => {
-  if (path === parent)
-    return undefined
-
-  try {
-    return opts.statSync(parent).isDirectory() ? path : undefined
-  } catch (er) {
-    return er.code === 'ENOENT'
-      ? findMadeSync(opts, dirname(parent), parent)
-      : undefined
-  }
-}
-
-module.exports = {findMade, findMadeSync}
diff --git a/node_modules/npm/node_modules/mkdirp/lib/mkdirp-manual.js b/node_modules/npm/node_modules/mkdirp/lib/mkdirp-manual.js
deleted file mode 100644
index 2eb18cd..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/mkdirp-manual.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const {dirname} = require('path')
-
-const mkdirpManual = (path, opts, made) => {
-  opts.recursive = false
-  const parent = dirname(path)
-  if (parent === path) {
-    return opts.mkdirAsync(path, opts).catch(er => {
-      // swallowed by recursive implementation on posix systems
-      // any other error is a failure
-      if (er.code !== 'EISDIR')
-        throw er
-    })
-  }
-
-  return opts.mkdirAsync(path, opts).then(() => made || path, er => {
-    if (er.code === 'ENOENT')
-      return mkdirpManual(parent, opts)
-        .then(made => mkdirpManual(path, opts, made))
-    if (er.code !== 'EEXIST' && er.code !== 'EROFS')
-      throw er
-    return opts.statAsync(path).then(st => {
-      if (st.isDirectory())
-        return made
-      else
-        throw er
-    }, () => { throw er })
-  })
-}
-
-const mkdirpManualSync = (path, opts, made) => {
-  const parent = dirname(path)
-  opts.recursive = false
-
-  if (parent === path) {
-    try {
-      return opts.mkdirSync(path, opts)
-    } catch (er) {
-      // swallowed by recursive implementation on posix systems
-      // any other error is a failure
-      if (er.code !== 'EISDIR')
-        throw er
-      else
-        return
-    }
-  }
-
-  try {
-    opts.mkdirSync(path, opts)
-    return made || path
-  } catch (er) {
-    if (er.code === 'ENOENT')
-      return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made))
-    if (er.code !== 'EEXIST' && er.code !== 'EROFS')
-      throw er
-    try {
-      if (!opts.statSync(path).isDirectory())
-        throw er
-    } catch (_) {
-      throw er
-    }
-  }
-}
-
-module.exports = {mkdirpManual, mkdirpManualSync}
diff --git a/node_modules/npm/node_modules/mkdirp/lib/mkdirp-native.js b/node_modules/npm/node_modules/mkdirp/lib/mkdirp-native.js
deleted file mode 100644
index c7a6b69..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/mkdirp-native.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const {dirname} = require('path')
-const {findMade, findMadeSync} = require('./find-made.js')
-const {mkdirpManual, mkdirpManualSync} = require('./mkdirp-manual.js')
-
-const mkdirpNative = (path, opts) => {
-  opts.recursive = true
-  const parent = dirname(path)
-  if (parent === path)
-    return opts.mkdirAsync(path, opts)
-
-  return findMade(opts, path).then(made =>
-    opts.mkdirAsync(path, opts).then(() => made)
-    .catch(er => {
-      if (er.code === 'ENOENT')
-        return mkdirpManual(path, opts)
-      else
-        throw er
-    }))
-}
-
-const mkdirpNativeSync = (path, opts) => {
-  opts.recursive = true
-  const parent = dirname(path)
-  if (parent === path)
-    return opts.mkdirSync(path, opts)
-
-  const made = findMadeSync(opts, path)
-  try {
-    opts.mkdirSync(path, opts)
-    return made
-  } catch (er) {
-    if (er.code === 'ENOENT')
-      return mkdirpManualSync(path, opts)
-    else
-      throw er
-  }
-}
-
-module.exports = {mkdirpNative, mkdirpNativeSync}
diff --git a/node_modules/npm/node_modules/mkdirp/lib/opts-arg.js b/node_modules/npm/node_modules/mkdirp/lib/opts-arg.js
deleted file mode 100644
index 2fa4833..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/opts-arg.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { promisify } = require('util')
-const fs = require('fs')
-const optsArg = opts => {
-  if (!opts)
-    opts = { mode: 0o777, fs }
-  else if (typeof opts === 'object')
-    opts = { mode: 0o777, fs, ...opts }
-  else if (typeof opts === 'number')
-    opts = { mode: opts, fs }
-  else if (typeof opts === 'string')
-    opts = { mode: parseInt(opts, 8), fs }
-  else
-    throw new TypeError('invalid options argument')
-
-  opts.mkdir = opts.mkdir || opts.fs.mkdir || fs.mkdir
-  opts.mkdirAsync = promisify(opts.mkdir)
-  opts.stat = opts.stat || opts.fs.stat || fs.stat
-  opts.statAsync = promisify(opts.stat)
-  opts.statSync = opts.statSync || opts.fs.statSync || fs.statSync
-  opts.mkdirSync = opts.mkdirSync || opts.fs.mkdirSync || fs.mkdirSync
-  return opts
-}
-module.exports = optsArg
diff --git a/node_modules/npm/node_modules/mkdirp/lib/path-arg.js b/node_modules/npm/node_modules/mkdirp/lib/path-arg.js
deleted file mode 100644
index cc07de5..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/path-arg.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform
-const { resolve, parse } = require('path')
-const pathArg = path => {
-  if (/\0/.test(path)) {
-    // simulate same failure that node raises
-    throw Object.assign(
-      new TypeError('path must be a string without null bytes'),
-      {
-        path,
-        code: 'ERR_INVALID_ARG_VALUE',
-      }
-    )
-  }
-
-  path = resolve(path)
-  if (platform === 'win32') {
-    const badWinChars = /[*|"<>?:]/
-    const {root} = parse(path)
-    if (badWinChars.test(path.substr(root.length))) {
-      throw Object.assign(new Error('Illegal characters in path.'), {
-        path,
-        code: 'EINVAL',
-      })
-    }
-  }
-
-  return path
-}
-module.exports = pathArg
diff --git a/node_modules/npm/node_modules/mkdirp/lib/use-native.js b/node_modules/npm/node_modules/mkdirp/lib/use-native.js
deleted file mode 100644
index 079361d..0000000
--- a/node_modules/npm/node_modules/mkdirp/lib/use-native.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs')
-
-const version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version
-const versArr = version.replace(/^v/, '').split('.')
-const hasNative = +versArr[0] > 10 || +versArr[0] === 10 && +versArr[1] >= 12
-
-const useNative = !hasNative ? () => false : opts => opts.mkdir === fs.mkdir
-const useNativeSync = !hasNative ? () => false : opts => opts.mkdirSync === fs.mkdirSync
-
-module.exports = {useNative, useNativeSync}
diff --git a/node_modules/npm/node_modules/mkdirp/package.json b/node_modules/npm/node_modules/mkdirp/package.json
deleted file mode 100644
index 2913ed0..0000000
--- a/node_modules/npm/node_modules/mkdirp/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "name": "mkdirp",
-  "description": "Recursively mkdir, like `mkdir -p`",
-  "version": "1.0.4",
-  "main": "index.js",
-  "keywords": [
-    "mkdir",
-    "directory",
-    "make dir",
-    "make",
-    "dir",
-    "recursive",
-    "native"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/isaacs/node-mkdirp.git"
-  },
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "postpublish": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true,
-    "coverage-map": "map.js"
-  },
-  "devDependencies": {
-    "require-inject": "^1.4.4",
-    "tap": "^14.10.7"
-  },
-  "bin": "bin/cmd.js",
-  "license": "MIT",
-  "engines": {
-    "node": ">=10"
-  },
-  "files": [
-    "bin",
-    "lib",
-    "index.js"
-  ]
-}
diff --git a/node_modules/npm/node_modules/mkdirp/readme.markdown b/node_modules/npm/node_modules/mkdirp/readme.markdown
deleted file mode 100644
index 827de59..0000000
--- a/node_modules/npm/node_modules/mkdirp/readme.markdown
+++ /dev/null
@@ -1,266 +0,0 @@
-# mkdirp
-
-Like `mkdir -p`, but in Node.js!
-
-Now with a modern API and no\* bugs!
-
-\* may contain some bugs
-
-# example
-
-## pow.js
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is a Promise resolving to the first directory created
-mkdirp('/tmp/foo/bar/baz').then(made =>
-  console.log(`made directories, starting with ${made}`))
-```
-
-Output (where `/tmp/foo` already exists)
-
-```
-made directories, starting with /tmp/foo/bar
-```
-
-Or, if you don't have time to wait around for promises:
-
-```js
-const mkdirp = require('mkdirp')
-
-// return value is the first directory created
-const made = mkdirp.sync('/tmp/foo/bar/baz')
-console.log(`made directories, starting with ${made}`)
-```
-
-And now /tmp/foo/bar/baz exists, huzzah!
-
-# methods
-
-```js
-const mkdirp = require('mkdirp')
-```
-
-## mkdirp(dir, [opts]) -> Promise
-
-Create a new directory and any necessary subdirectories at `dir` with octal
-permission string `opts.mode`. If `opts` is a string or number, it will be
-treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Promise resolves to first directory `made` that had to be created, or
-`undefined` if everything already exists.  Promise rejects if any errors
-are encountered.  Note that, in the case of promise rejection, some
-directories _may_ have been created, as recursive directory creation is not
-an atomic operation.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdir(path, opts, cb)`
-and `opts.fs.stat(path, cb)`.
-
-You can also override just one or the other of `mkdir` and `stat` by
-passing in `opts.stat` or `opts.mkdir`, or providing an `fs` option that
-only overrides one of these.
-
-## mkdirp.sync(dir, opts) -> String|null
-
-Synchronously create a new directory and any necessary subdirectories at
-`dir` with octal permission string `opts.mode`. If `opts` is a string or
-number, it will be treated as the `opts.mode`.
-
-If `opts.mode` isn't specified, it defaults to `0o777 &
-(~process.umask())`.
-
-Returns the first directory that had to be created, or undefined if
-everything already exists.
-
-You can optionally pass in an alternate `fs` implementation by passing in
-`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)`
-and `opts.fs.statSync(path)`.
-
-You can also override just one or the other of `mkdirSync` and `statSync`
-by passing in `opts.statSync` or `opts.mkdirSync`, or providing an `fs`
-option that only overrides one of these.
-
-## mkdirp.manual, mkdirp.manualSync
-
-Use the manual implementation (not the native one).  This is the default
-when the native implementation is not available or the stat/mkdir
-implementation is overridden.
-
-## mkdirp.native, mkdirp.nativeSync
-
-Use the native implementation (not the manual one).  This is the default
-when the native implementation is available and stat/mkdir are not
-overridden.
-
-# implementation
-
-On Node.js v10.12.0 and above, use the native `fs.mkdir(p,
-{recursive:true})` option, unless `fs.mkdir`/`fs.mkdirSync` has been
-overridden by an option.
-
-## native implementation
-
-- If the path is a root directory, then pass it to the underlying
-  implementation and return the result/error.  (In this case, it'll either
-  succeed or fail, but we aren't actually creating any dirs.)
-- Walk up the path statting each directory, to find the first path that
-  will be created, `made`.
-- Call `fs.mkdir(path, { recursive: true })` (or `fs.mkdirSync`)
-- If error, raise it to the caller.
-- Return `made`.
-
-## manual implementation
-
-- Call underlying `fs.mkdir` implementation, with `recursive: false`
-- If error:
-  - If path is a root directory, raise to the caller and do not handle it
-  - If ENOENT, mkdirp parent dir, store result as `made`
-  - stat(path)
-    - If error, raise original `mkdir` error
-    - If directory, return `made`
-    - Else, raise original `mkdir` error
-- else
-  - return `undefined` if a root dir, or `made` if set, or `path`
-
-## windows vs unix caveat
-
-On Windows file systems, attempts to create a root directory (ie, a drive
-letter or root UNC path) will fail.  If the root directory exists, then it
-will fail with `EPERM`.  If the root directory does not exist, then it will
-fail with `ENOENT`.
-
-On posix file systems, attempts to create a root directory (in recursive
-mode) will succeed silently, as it is treated like just another directory
-that already exists.  (In non-recursive mode, of course, it fails with
-`EEXIST`.)
-
-In order to preserve this system-specific behavior (and because it's not as
-if we can create the parent of a root directory anyway), attempts to create
-a root directory are passed directly to the `fs` implementation, and any
-errors encountered are not handled.
-
-## native error caveat
-
-The native implementation (as of at least Node.js v13.4.0) does not provide
-appropriate errors in some cases (see
-[nodejs/node#31481](https://github.com/nodejs/node/issues/31481) and
-[nodejs/node#28015](https://github.com/nodejs/node/issues/28015)).
-
-In order to work around this issue, the native implementation will fall
-back to the manual implementation if an `ENOENT` error is encountered.
-
-# choosing a recursive mkdir implementation
-
-There are a few to choose from!  Use the one that suits your needs best :D
-
-## use `fs.mkdir(path, {recursive: true}, cb)` if:
-
-- You wish to optimize performance even at the expense of other factors.
-- You don't need to know the first dir created.
-- You are ok with getting `ENOENT` as the error when some other problem is
-  the actual cause.
-- You can limit your platforms to Node.js v10.12 and above.
-- You're ok with using callbacks instead of promises.
-- You don't need/want a CLI.
-- You don't need to override the `fs` methods in use.
-
-## use this module (mkdirp 1.x) if:
-
-- You need to know the first directory that was created.
-- You wish to use the native implementation if available, but fall back
-  when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You want more useful error messages than the native recursive mkdir
-  provides (at least as of Node.js v13.4), and are ok with re-trying on
-  `ENOENT` to achieve this.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-
-## use [`make-dir`](http://npm.im/make-dir) if:
-
-- You do not need to know the first dir created (and wish to save a few
-  `stat` calls when using the native implementation for this reason).
-- You wish to use the native implementation if available, but fall back
-  when it's not.
-- You prefer promise-returning APIs to callback-taking APIs.
-- You are ok with occasionally getting `ENOENT` errors for failures that
-  are actually related to something other than a missing file system entry.
-- You don't need/want a CLI.
-- You need to override the `fs` methods in use.
-
-## use mkdirp 0.x if:
-
-- You need to know the first directory that was created.
-- You need (or at least, are ok with) a CLI.
-- You need to override the `fs` methods in use.
-- You're ok with using callbacks instead of promises.
-- You are not running on Windows, where the root-level ENOENT errors can
-  lead to infinite regress.
-- You think vinyl just sounds warmer and richer for some weird reason.
-- You are supporting truly ancient Node.js versions, before even the advent
-  of a `Promise` language primitive.  (Please don't.  You deserve better.)
-
-# cli
-
-This package also ships with a `mkdirp` command.
-
-```
-$ mkdirp -h
-
-usage: mkdirp [DIR1,DIR2..] {OPTIONS}
-
-  Create each supplied directory including any necessary parent directories
-  that don't yet exist.
-
-  If the directory already exists, do nothing.
-
-OPTIONS are:
-
-  -m       If a directory needs to be created, set the mode as an octal
-  --mode=  permission string.
-
-  -v --version   Print the mkdirp version number
-
-  -h --help      Print this helpful banner
-
-  -p --print     Print the first directories created for each path provided
-
-  --manual       Use manual implementation, even if native is available
-```
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install mkdirp
-```
-
-to get the library locally, or
-
-```
-npm install -g mkdirp
-```
-
-to get the command everywhere, or
-
-```
-npx mkdirp ...
-```
-
-to run the command without installing it globally.
-
-# platform support
-
-This module works on node v8, but only v10 and above are officially
-supported, as Node v8 reached its LTS end of life 2020-01-01, which is in
-the past, as of this writing.
-
-# license
-
-MIT
diff --git a/node_modules/npm/node_modules/ms/index.js b/node_modules/npm/node_modules/ms/index.js
deleted file mode 100644
index ea734fb..0000000
--- a/node_modules/npm/node_modules/ms/index.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var w = d * 7;
-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' && isFinite(val)) {
-    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|weeks?|w|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 'weeks':
-    case 'week':
-    case 'w':
-      return n * w;
-    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) {
-  var msAbs = Math.abs(ms);
-  if (msAbs >= d) {
-    return Math.round(ms / d) + 'd';
-  }
-  if (msAbs >= h) {
-    return Math.round(ms / h) + 'h';
-  }
-  if (msAbs >= m) {
-    return Math.round(ms / m) + 'm';
-  }
-  if (msAbs >= s) {
-    return Math.round(ms / s) + 's';
-  }
-  return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtLong(ms) {
-  var msAbs = Math.abs(ms);
-  if (msAbs >= d) {
-    return plural(ms, msAbs, d, 'day');
-  }
-  if (msAbs >= h) {
-    return plural(ms, msAbs, h, 'hour');
-  }
-  if (msAbs >= m) {
-    return plural(ms, msAbs, m, 'minute');
-  }
-  if (msAbs >= s) {
-    return plural(ms, msAbs, s, 'second');
-  }
-  return ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, msAbs, n, name) {
-  var isPlural = msAbs >= n * 1.5;
-  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
-}
diff --git a/node_modules/npm/node_modules/ms/license.md b/node_modules/npm/node_modules/ms/license.md
deleted file mode 100644
index fa5d39b..0000000
--- a/node_modules/npm/node_modules/ms/license.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2020 Vercel, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/npm/node_modules/ms/package.json b/node_modules/npm/node_modules/ms/package.json
deleted file mode 100644
index 4997189..0000000
--- a/node_modules/npm/node_modules/ms/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
-  "name": "ms",
-  "version": "2.1.3",
-  "description": "Tiny millisecond conversion utility",
-  "repository": "vercel/ms",
-  "main": "./index",
-  "files": [
-    "index.js"
-  ],
-  "scripts": {
-    "precommit": "lint-staged",
-    "lint": "eslint lib/* bin/*",
-    "test": "mocha tests.js"
-  },
-  "eslintConfig": {
-    "extends": "eslint:recommended",
-    "env": {
-      "node": true,
-      "es6": true
-    }
-  },
-  "lint-staged": {
-    "*.js": [
-      "npm run lint",
-      "prettier --single-quote --write",
-      "git add"
-    ]
-  },
-  "license": "MIT",
-  "devDependencies": {
-    "eslint": "4.18.2",
-    "expect.js": "0.3.1",
-    "husky": "0.14.3",
-    "lint-staged": "5.0.0",
-    "mocha": "4.0.1",
-    "prettier": "2.0.5"
-  }
-}
diff --git a/node_modules/npm/node_modules/mute-stream/LICENSE b/node_modules/npm/node_modules/mute-stream/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/mute-stream/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/mute-stream/lib/index.js b/node_modules/npm/node_modules/mute-stream/lib/index.js
deleted file mode 100644
index 368f727..0000000
--- a/node_modules/npm/node_modules/mute-stream/lib/index.js
+++ /dev/null
@@ -1,142 +0,0 @@
-const Stream = require('stream')
-
-class MuteStream extends Stream {
-  #isTTY = null
-
-  constructor (opts = {}) {
-    super(opts)
-    this.writable = this.readable = true
-    this.muted = false
-    this.on('pipe', this._onpipe)
-    this.replace = opts.replace
-
-    // For readline-type situations
-    // This much at the start of a line being redrawn after a ctrl char
-    // is seen (such as backspace) won't be redrawn as the replacement
-    this._prompt = opts.prompt || null
-    this._hadControl = false
-  }
-
-  #destSrc (key, def) {
-    if (this._dest) {
-      return this._dest[key]
-    }
-    if (this._src) {
-      return this._src[key]
-    }
-    return def
-  }
-
-  #proxy (method, ...args) {
-    if (typeof this._dest?.[method] === 'function') {
-      this._dest[method](...args)
-    }
-    if (typeof this._src?.[method] === 'function') {
-      this._src[method](...args)
-    }
-  }
-
-  get isTTY () {
-    if (this.#isTTY !== null) {
-      return this.#isTTY
-    }
-    return this.#destSrc('isTTY', false)
-  }
-
-  // basically just get replace the getter/setter with a regular value
-  set isTTY (val) {
-    this.#isTTY = val
-  }
-
-  get rows () {
-    return this.#destSrc('rows')
-  }
-
-  get columns () {
-    return this.#destSrc('columns')
-  }
-
-  mute () {
-    this.muted = true
-  }
-
-  unmute () {
-    this.muted = false
-  }
-
-  _onpipe (src) {
-    this._src = src
-  }
-
-  pipe (dest, options) {
-    this._dest = dest
-    return super.pipe(dest, options)
-  }
-
-  pause () {
-    if (this._src) {
-      return this._src.pause()
-    }
-  }
-
-  resume () {
-    if (this._src) {
-      return this._src.resume()
-    }
-  }
-
-  write (c) {
-    if (this.muted) {
-      if (!this.replace) {
-        return true
-      }
-      // eslint-disable-next-line no-control-regex
-      if (c.match(/^\u001b/)) {
-        if (c.indexOf(this._prompt) === 0) {
-          c = c.slice(this._prompt.length)
-          c = c.replace(/./g, this.replace)
-          c = this._prompt + c
-        }
-        this._hadControl = true
-        return this.emit('data', c)
-      } else {
-        if (this._prompt && this._hadControl &&
-          c.indexOf(this._prompt) === 0) {
-          this._hadControl = false
-          this.emit('data', this._prompt)
-          c = c.slice(this._prompt.length)
-        }
-        c = c.toString().replace(/./g, this.replace)
-      }
-    }
-    this.emit('data', c)
-  }
-
-  end (c) {
-    if (this.muted) {
-      if (c && this.replace) {
-        c = c.toString().replace(/./g, this.replace)
-      } else {
-        c = null
-      }
-    }
-    if (c) {
-      this.emit('data', c)
-    }
-    this.emit('end')
-  }
-
-  destroy (...args) {
-    return this.#proxy('destroy', ...args)
-  }
-
-  destroySoon (...args) {
-    return this.#proxy('destroySoon', ...args)
-  }
-
-  close (...args) {
-    return this.#proxy('close', ...args)
-  }
-}
-
-module.exports = MuteStream
diff --git a/node_modules/npm/node_modules/mute-stream/package.json b/node_modules/npm/node_modules/mute-stream/package.json
deleted file mode 100644
index 37b2f50..0000000
--- a/node_modules/npm/node_modules/mute-stream/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-  "name": "mute-stream",
-  "version": "1.0.0",
-  "main": "lib/index.js",
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.11.0",
-    "tap": "^16.3.0"
-  },
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/mute-stream.git"
-  },
-  "keywords": [
-    "mute",
-    "stream",
-    "pipe"
-  ],
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "description": "Bytes go in, but they don't come out (when muted).",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "tap": {
-    "statements": 70,
-    "branches": 60,
-    "functions": 81,
-    "lines": 70,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.11.0"
-  }
-}
diff --git a/node_modules/npm/node_modules/negotiator/HISTORY.md b/node_modules/npm/node_modules/negotiator/HISTORY.md
deleted file mode 100644
index a9a5449..0000000
--- a/node_modules/npm/node_modules/negotiator/HISTORY.md
+++ /dev/null
@@ -1,108 +0,0 @@
-0.6.3 / 2022-01-22
-==================
-
-  * Revert "Lazy-load modules from main entry point"
-
-0.6.2 / 2019-04-29
-==================
-
-  * Fix sorting charset, encoding, and language with extra parameters
-
-0.6.1 / 2016-05-02
-==================
-
-  * perf: improve `Accept` parsing speed
-  * perf: improve `Accept-Charset` parsing speed
-  * perf: improve `Accept-Encoding` parsing speed
-  * perf: improve `Accept-Language` parsing speed
-
-0.6.0 / 2015-09-29
-==================
-
-  * Fix including type extensions in parameters in `Accept` parsing
-  * Fix parsing `Accept` parameters with quoted equals
-  * Fix parsing `Accept` parameters with quoted semicolons
-  * Lazy-load modules from main entry point
-  * perf: delay type concatenation until needed
-  * perf: enable strict mode
-  * perf: hoist regular expressions
-  * perf: remove closures getting spec properties
-  * perf: remove a closure from media type parsing
-  * perf: remove property delete from media type parsing
-
-0.5.3 / 2015-05-10
-==================
-
-  * Fix media type parameter matching to be case-insensitive
-
-0.5.2 / 2015-05-06
-==================
-
-  * Fix comparing media types with quoted values
-  * Fix splitting media types with quoted commas
-
-0.5.1 / 2015-02-14
-==================
-
-  * Fix preference sorting to be stable for long acceptable lists
-
-0.5.0 / 2014-12-18
-==================
-
-  * Fix list return order when large accepted list
-  * Fix missing identity encoding when q=0 exists
-  * Remove dynamic building of Negotiator class
-
-0.4.9 / 2014-10-14
-==================
-
-  * Fix error when media type has invalid parameter
-
-0.4.8 / 2014-09-28
-==================
-
-  * Fix all negotiations to be case-insensitive
-  * Stable sort preferences of same quality according to client order
-  * Support Node.js 0.6
-
-0.4.7 / 2014-06-24
-==================
-
-  * Handle invalid provided languages
-  * Handle invalid provided media types
-
-0.4.6 / 2014-06-11
-==================
-
-  *  Order by specificity when quality is the same
-
-0.4.5 / 2014-05-29
-==================
-
-  * Fix regression in empty header handling
-
-0.4.4 / 2014-05-29
-==================
-
-  * Fix behaviors when headers are not present
-
-0.4.3 / 2014-04-16
-==================
-
-  * Handle slashes on media params correctly
-
-0.4.2 / 2014-02-28
-==================
-
-  * Fix media type sorting
-  * Handle media types params strictly
-
-0.4.1 / 2014-01-16
-==================
-
-  * Use most specific matches
-
-0.4.0 / 2014-01-09
-==================
-
-  * Remove preferred prefix from methods
diff --git a/node_modules/npm/node_modules/negotiator/LICENSE b/node_modules/npm/node_modules/negotiator/LICENSE
deleted file mode 100644
index ea6b9e2..0000000
--- a/node_modules/npm/node_modules/negotiator/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2012-2014 Federico Romero
-Copyright (c) 2012-2014 Isaac Z. Schlueter
-Copyright (c) 2014-2015 Douglas Christopher Wilson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/negotiator/index.js b/node_modules/npm/node_modules/negotiator/index.js
deleted file mode 100644
index 4788264..0000000
--- a/node_modules/npm/node_modules/negotiator/index.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*!
- * negotiator
- * Copyright(c) 2012 Federico Romero
- * Copyright(c) 2012-2014 Isaac Z. Schlueter
- * Copyright(c) 2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-var preferredCharsets = require('./lib/charset')
-var preferredEncodings = require('./lib/encoding')
-var preferredLanguages = require('./lib/language')
-var preferredMediaTypes = require('./lib/mediaType')
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = Negotiator;
-module.exports.Negotiator = Negotiator;
-
-/**
- * Create a Negotiator instance from a request.
- * @param {object} request
- * @public
- */
-
-function Negotiator(request) {
-  if (!(this instanceof Negotiator)) {
-    return new Negotiator(request);
-  }
-
-  this.request = request;
-}
-
-Negotiator.prototype.charset = function charset(available) {
-  var set = this.charsets(available);
-  return set && set[0];
-};
-
-Negotiator.prototype.charsets = function charsets(available) {
-  return preferredCharsets(this.request.headers['accept-charset'], available);
-};
-
-Negotiator.prototype.encoding = function encoding(available) {
-  var set = this.encodings(available);
-  return set && set[0];
-};
-
-Negotiator.prototype.encodings = function encodings(available) {
-  return preferredEncodings(this.request.headers['accept-encoding'], available);
-};
-
-Negotiator.prototype.language = function language(available) {
-  var set = this.languages(available);
-  return set && set[0];
-};
-
-Negotiator.prototype.languages = function languages(available) {
-  return preferredLanguages(this.request.headers['accept-language'], available);
-};
-
-Negotiator.prototype.mediaType = function mediaType(available) {
-  var set = this.mediaTypes(available);
-  return set && set[0];
-};
-
-Negotiator.prototype.mediaTypes = function mediaTypes(available) {
-  return preferredMediaTypes(this.request.headers.accept, available);
-};
-
-// Backwards compatibility
-Negotiator.prototype.preferredCharset = Negotiator.prototype.charset;
-Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets;
-Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding;
-Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings;
-Negotiator.prototype.preferredLanguage = Negotiator.prototype.language;
-Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages;
-Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType;
-Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes;
diff --git a/node_modules/npm/node_modules/negotiator/lib/charset.js b/node_modules/npm/node_modules/negotiator/lib/charset.js
deleted file mode 100644
index cdd0148..0000000
--- a/node_modules/npm/node_modules/negotiator/lib/charset.js
+++ /dev/null
@@ -1,169 +0,0 @@
-/**
- * negotiator
- * Copyright(c) 2012 Isaac Z. Schlueter
- * Copyright(c) 2014 Federico Romero
- * Copyright(c) 2014-2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = preferredCharsets;
-module.exports.preferredCharsets = preferredCharsets;
-
-/**
- * Module variables.
- * @private
- */
-
-var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
-
-/**
- * Parse the Accept-Charset header.
- * @private
- */
-
-function parseAcceptCharset(accept) {
-  var accepts = accept.split(',');
-
-  for (var i = 0, j = 0; i < accepts.length; i++) {
-    var charset = parseCharset(accepts[i].trim(), i);
-
-    if (charset) {
-      accepts[j++] = charset;
-    }
-  }
-
-  // trim accepts
-  accepts.length = j;
-
-  return accepts;
-}
-
-/**
- * Parse a charset from the Accept-Charset header.
- * @private
- */
-
-function parseCharset(str, i) {
-  var match = simpleCharsetRegExp.exec(str);
-  if (!match) return null;
-
-  var charset = match[1];
-  var q = 1;
-  if (match[2]) {
-    var params = match[2].split(';')
-    for (var j = 0; j < params.length; j++) {
-      var p = params[j].trim().split('=');
-      if (p[0] === 'q') {
-        q = parseFloat(p[1]);
-        break;
-      }
-    }
-  }
-
-  return {
-    charset: charset,
-    q: q,
-    i: i
-  };
-}
-
-/**
- * Get the priority of a charset.
- * @private
- */
-
-function getCharsetPriority(charset, accepted, index) {
-  var priority = {o: -1, q: 0, s: 0};
-
-  for (var i = 0; i < accepted.length; i++) {
-    var spec = specify(charset, accepted[i], index);
-
-    if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
-      priority = spec;
-    }
-  }
-
-  return priority;
-}
-
-/**
- * Get the specificity of the charset.
- * @private
- */
-
-function specify(charset, spec, index) {
-  var s = 0;
-  if(spec.charset.toLowerCase() === charset.toLowerCase()){
-    s |= 1;
-  } else if (spec.charset !== '*' ) {
-    return null
-  }
-
-  return {
-    i: index,
-    o: spec.i,
-    q: spec.q,
-    s: s
-  }
-}
-
-/**
- * Get the preferred charsets from an Accept-Charset header.
- * @public
- */
-
-function preferredCharsets(accept, provided) {
-  // RFC 2616 sec 14.2: no header = *
-  var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || '');
-
-  if (!provided) {
-    // sorted list of all charsets
-    return accepts
-      .filter(isQuality)
-      .sort(compareSpecs)
-      .map(getFullCharset);
-  }
-
-  var priorities = provided.map(function getPriority(type, index) {
-    return getCharsetPriority(type, accepts, index);
-  });
-
-  // sorted list of accepted charsets
-  return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) {
-    return provided[priorities.indexOf(priority)];
-  });
-}
-
-/**
- * Compare two specs.
- * @private
- */
-
-function compareSpecs(a, b) {
-  return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
-}
-
-/**
- * Get full charset string.
- * @private
- */
-
-function getFullCharset(spec) {
-  return spec.charset;
-}
-
-/**
- * Check if a spec has any quality.
- * @private
- */
-
-function isQuality(spec) {
-  return spec.q > 0;
-}
diff --git a/node_modules/npm/node_modules/negotiator/lib/encoding.js b/node_modules/npm/node_modules/negotiator/lib/encoding.js
deleted file mode 100644
index 8432cd7..0000000
--- a/node_modules/npm/node_modules/negotiator/lib/encoding.js
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- * negotiator
- * Copyright(c) 2012 Isaac Z. Schlueter
- * Copyright(c) 2014 Federico Romero
- * Copyright(c) 2014-2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = preferredEncodings;
-module.exports.preferredEncodings = preferredEncodings;
-
-/**
- * Module variables.
- * @private
- */
-
-var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
-
-/**
- * Parse the Accept-Encoding header.
- * @private
- */
-
-function parseAcceptEncoding(accept) {
-  var accepts = accept.split(',');
-  var hasIdentity = false;
-  var minQuality = 1;
-
-  for (var i = 0, j = 0; i < accepts.length; i++) {
-    var encoding = parseEncoding(accepts[i].trim(), i);
-
-    if (encoding) {
-      accepts[j++] = encoding;
-      hasIdentity = hasIdentity || specify('identity', encoding);
-      minQuality = Math.min(minQuality, encoding.q || 1);
-    }
-  }
-
-  if (!hasIdentity) {
-    /*
-     * If identity doesn't explicitly appear in the accept-encoding header,
-     * it's added to the list of acceptable encoding with the lowest q
-     */
-    accepts[j++] = {
-      encoding: 'identity',
-      q: minQuality,
-      i: i
-    };
-  }
-
-  // trim accepts
-  accepts.length = j;
-
-  return accepts;
-}
-
-/**
- * Parse an encoding from the Accept-Encoding header.
- * @private
- */
-
-function parseEncoding(str, i) {
-  var match = simpleEncodingRegExp.exec(str);
-  if (!match) return null;
-
-  var encoding = match[1];
-  var q = 1;
-  if (match[2]) {
-    var params = match[2].split(';');
-    for (var j = 0; j < params.length; j++) {
-      var p = params[j].trim().split('=');
-      if (p[0] === 'q') {
-        q = parseFloat(p[1]);
-        break;
-      }
-    }
-  }
-
-  return {
-    encoding: encoding,
-    q: q,
-    i: i
-  };
-}
-
-/**
- * Get the priority of an encoding.
- * @private
- */
-
-function getEncodingPriority(encoding, accepted, index) {
-  var priority = {o: -1, q: 0, s: 0};
-
-  for (var i = 0; i < accepted.length; i++) {
-    var spec = specify(encoding, accepted[i], index);
-
-    if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
-      priority = spec;
-    }
-  }
-
-  return priority;
-}
-
-/**
- * Get the specificity of the encoding.
- * @private
- */
-
-function specify(encoding, spec, index) {
-  var s = 0;
-  if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
-    s |= 1;
-  } else if (spec.encoding !== '*' ) {
-    return null
-  }
-
-  return {
-    i: index,
-    o: spec.i,
-    q: spec.q,
-    s: s
-  }
-};
-
-/**
- * Get the preferred encodings from an Accept-Encoding header.
- * @public
- */
-
-function preferredEncodings(accept, provided) {
-  var accepts = parseAcceptEncoding(accept || '');
-
-  if (!provided) {
-    // sorted list of all encodings
-    return accepts
-      .filter(isQuality)
-      .sort(compareSpecs)
-      .map(getFullEncoding);
-  }
-
-  var priorities = provided.map(function getPriority(type, index) {
-    return getEncodingPriority(type, accepts, index);
-  });
-
-  // sorted list of accepted encodings
-  return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) {
-    return provided[priorities.indexOf(priority)];
-  });
-}
-
-/**
- * Compare two specs.
- * @private
- */
-
-function compareSpecs(a, b) {
-  return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
-}
-
-/**
- * Get full encoding string.
- * @private
- */
-
-function getFullEncoding(spec) {
-  return spec.encoding;
-}
-
-/**
- * Check if a spec has any quality.
- * @private
- */
-
-function isQuality(spec) {
-  return spec.q > 0;
-}
diff --git a/node_modules/npm/node_modules/negotiator/lib/language.js b/node_modules/npm/node_modules/negotiator/lib/language.js
deleted file mode 100644
index a231672..0000000
--- a/node_modules/npm/node_modules/negotiator/lib/language.js
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * negotiator
- * Copyright(c) 2012 Isaac Z. Schlueter
- * Copyright(c) 2014 Federico Romero
- * Copyright(c) 2014-2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = preferredLanguages;
-module.exports.preferredLanguages = preferredLanguages;
-
-/**
- * Module variables.
- * @private
- */
-
-var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;
-
-/**
- * Parse the Accept-Language header.
- * @private
- */
-
-function parseAcceptLanguage(accept) {
-  var accepts = accept.split(',');
-
-  for (var i = 0, j = 0; i < accepts.length; i++) {
-    var language = parseLanguage(accepts[i].trim(), i);
-
-    if (language) {
-      accepts[j++] = language;
-    }
-  }
-
-  // trim accepts
-  accepts.length = j;
-
-  return accepts;
-}
-
-/**
- * Parse a language from the Accept-Language header.
- * @private
- */
-
-function parseLanguage(str, i) {
-  var match = simpleLanguageRegExp.exec(str);
-  if (!match) return null;
-
-  var prefix = match[1]
-  var suffix = match[2]
-  var full = prefix
-
-  if (suffix) full += "-" + suffix;
-
-  var q = 1;
-  if (match[3]) {
-    var params = match[3].split(';')
-    for (var j = 0; j < params.length; j++) {
-      var p = params[j].split('=');
-      if (p[0] === 'q') q = parseFloat(p[1]);
-    }
-  }
-
-  return {
-    prefix: prefix,
-    suffix: suffix,
-    q: q,
-    i: i,
-    full: full
-  };
-}
-
-/**
- * Get the priority of a language.
- * @private
- */
-
-function getLanguagePriority(language, accepted, index) {
-  var priority = {o: -1, q: 0, s: 0};
-
-  for (var i = 0; i < accepted.length; i++) {
-    var spec = specify(language, accepted[i], index);
-
-    if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
-      priority = spec;
-    }
-  }
-
-  return priority;
-}
-
-/**
- * Get the specificity of the language.
- * @private
- */
-
-function specify(language, spec, index) {
-  var p = parseLanguage(language)
-  if (!p) return null;
-  var s = 0;
-  if(spec.full.toLowerCase() === p.full.toLowerCase()){
-    s |= 4;
-  } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {
-    s |= 2;
-  } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {
-    s |= 1;
-  } else if (spec.full !== '*' ) {
-    return null
-  }
-
-  return {
-    i: index,
-    o: spec.i,
-    q: spec.q,
-    s: s
-  }
-};
-
-/**
- * Get the preferred languages from an Accept-Language header.
- * @public
- */
-
-function preferredLanguages(accept, provided) {
-  // RFC 2616 sec 14.4: no header = *
-  var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');
-
-  if (!provided) {
-    // sorted list of all languages
-    return accepts
-      .filter(isQuality)
-      .sort(compareSpecs)
-      .map(getFullLanguage);
-  }
-
-  var priorities = provided.map(function getPriority(type, index) {
-    return getLanguagePriority(type, accepts, index);
-  });
-
-  // sorted list of accepted languages
-  return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {
-    return provided[priorities.indexOf(priority)];
-  });
-}
-
-/**
- * Compare two specs.
- * @private
- */
-
-function compareSpecs(a, b) {
-  return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
-}
-
-/**
- * Get full language string.
- * @private
- */
-
-function getFullLanguage(spec) {
-  return spec.full;
-}
-
-/**
- * Check if a spec has any quality.
- * @private
- */
-
-function isQuality(spec) {
-  return spec.q > 0;
-}
diff --git a/node_modules/npm/node_modules/negotiator/lib/mediaType.js b/node_modules/npm/node_modules/negotiator/lib/mediaType.js
deleted file mode 100644
index 67309dd..0000000
--- a/node_modules/npm/node_modules/negotiator/lib/mediaType.js
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * negotiator
- * Copyright(c) 2012 Isaac Z. Schlueter
- * Copyright(c) 2014 Federico Romero
- * Copyright(c) 2014-2015 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-'use strict';
-
-/**
- * Module exports.
- * @public
- */
-
-module.exports = preferredMediaTypes;
-module.exports.preferredMediaTypes = preferredMediaTypes;
-
-/**
- * Module variables.
- * @private
- */
-
-var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
-
-/**
- * Parse the Accept header.
- * @private
- */
-
-function parseAccept(accept) {
-  var accepts = splitMediaTypes(accept);
-
-  for (var i = 0, j = 0; i < accepts.length; i++) {
-    var mediaType = parseMediaType(accepts[i].trim(), i);
-
-    if (mediaType) {
-      accepts[j++] = mediaType;
-    }
-  }
-
-  // trim accepts
-  accepts.length = j;
-
-  return accepts;
-}
-
-/**
- * Parse a media type from the Accept header.
- * @private
- */
-
-function parseMediaType(str, i) {
-  var match = simpleMediaTypeRegExp.exec(str);
-  if (!match) return null;
-
-  var params = Object.create(null);
-  var q = 1;
-  var subtype = match[2];
-  var type = match[1];
-
-  if (match[3]) {
-    var kvps = splitParameters(match[3]).map(splitKeyValuePair);
-
-    for (var j = 0; j < kvps.length; j++) {
-      var pair = kvps[j];
-      var key = pair[0].toLowerCase();
-      var val = pair[1];
-
-      // get the value, unwrapping quotes
-      var value = val && val[0] === '"' && val[val.length - 1] === '"'
-        ? val.substr(1, val.length - 2)
-        : val;
-
-      if (key === 'q') {
-        q = parseFloat(value);
-        break;
-      }
-
-      // store parameter
-      params[key] = value;
-    }
-  }
-
-  return {
-    type: type,
-    subtype: subtype,
-    params: params,
-    q: q,
-    i: i
-  };
-}
-
-/**
- * Get the priority of a media type.
- * @private
- */
-
-function getMediaTypePriority(type, accepted, index) {
-  var priority = {o: -1, q: 0, s: 0};
-
-  for (var i = 0; i < accepted.length; i++) {
-    var spec = specify(type, accepted[i], index);
-
-    if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
-      priority = spec;
-    }
-  }
-
-  return priority;
-}
-
-/**
- * Get the specificity of the media type.
- * @private
- */
-
-function specify(type, spec, index) {
-  var p = parseMediaType(type);
-  var s = 0;
-
-  if (!p) {
-    return null;
-  }
-
-  if(spec.type.toLowerCase() == p.type.toLowerCase()) {
-    s |= 4
-  } else if(spec.type != '*') {
-    return null;
-  }
-
-  if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
-    s |= 2
-  } else if(spec.subtype != '*') {
-    return null;
-  }
-
-  var keys = Object.keys(spec.params);
-  if (keys.length > 0) {
-    if (keys.every(function (k) {
-      return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
-    })) {
-      s |= 1
-    } else {
-      return null
-    }
-  }
-
-  return {
-    i: index,
-    o: spec.i,
-    q: spec.q,
-    s: s,
-  }
-}
-
-/**
- * Get the preferred media types from an Accept header.
- * @public
- */
-
-function preferredMediaTypes(accept, provided) {
-  // RFC 2616 sec 14.2: no header = */*
-  var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
-
-  if (!provided) {
-    // sorted list of all types
-    return accepts
-      .filter(isQuality)
-      .sort(compareSpecs)
-      .map(getFullType);
-  }
-
-  var priorities = provided.map(function getPriority(type, index) {
-    return getMediaTypePriority(type, accepts, index);
-  });
-
-  // sorted list of accepted types
-  return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
-    return provided[priorities.indexOf(priority)];
-  });
-}
-
-/**
- * Compare two specs.
- * @private
- */
-
-function compareSpecs(a, b) {
-  return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
-}
-
-/**
- * Get full type string.
- * @private
- */
-
-function getFullType(spec) {
-  return spec.type + '/' + spec.subtype;
-}
-
-/**
- * Check if a spec has any quality.
- * @private
- */
-
-function isQuality(spec) {
-  return spec.q > 0;
-}
-
-/**
- * Count the number of quotes in a string.
- * @private
- */
-
-function quoteCount(string) {
-  var count = 0;
-  var index = 0;
-
-  while ((index = string.indexOf('"', index)) !== -1) {
-    count++;
-    index++;
-  }
-
-  return count;
-}
-
-/**
- * Split a key value pair.
- * @private
- */
-
-function splitKeyValuePair(str) {
-  var index = str.indexOf('=');
-  var key;
-  var val;
-
-  if (index === -1) {
-    key = str;
-  } else {
-    key = str.substr(0, index);
-    val = str.substr(index + 1);
-  }
-
-  return [key, val];
-}
-
-/**
- * Split an Accept header into media types.
- * @private
- */
-
-function splitMediaTypes(accept) {
-  var accepts = accept.split(',');
-
-  for (var i = 1, j = 0; i < accepts.length; i++) {
-    if (quoteCount(accepts[j]) % 2 == 0) {
-      accepts[++j] = accepts[i];
-    } else {
-      accepts[j] += ',' + accepts[i];
-    }
-  }
-
-  // trim accepts
-  accepts.length = j + 1;
-
-  return accepts;
-}
-
-/**
- * Split a string of parameters.
- * @private
- */
-
-function splitParameters(str) {
-  var parameters = str.split(';');
-
-  for (var i = 1, j = 0; i < parameters.length; i++) {
-    if (quoteCount(parameters[j]) % 2 == 0) {
-      parameters[++j] = parameters[i];
-    } else {
-      parameters[j] += ';' + parameters[i];
-    }
-  }
-
-  // trim parameters
-  parameters.length = j + 1;
-
-  for (var i = 0; i < parameters.length; i++) {
-    parameters[i] = parameters[i].trim();
-  }
-
-  return parameters;
-}
diff --git a/node_modules/npm/node_modules/negotiator/package.json b/node_modules/npm/node_modules/negotiator/package.json
deleted file mode 100644
index 297635f..0000000
--- a/node_modules/npm/node_modules/negotiator/package.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
-  "name": "negotiator",
-  "description": "HTTP content negotiation",
-  "version": "0.6.3",
-  "contributors": [
-    "Douglas Christopher Wilson ",
-    "Federico Romero ",
-    "Isaac Z. Schlueter  (http://blog.izs.me/)"
-  ],
-  "license": "MIT",
-  "keywords": [
-    "http",
-    "content negotiation",
-    "accept",
-    "accept-language",
-    "accept-encoding",
-    "accept-charset"
-  ],
-  "repository": "jshttp/negotiator",
-  "devDependencies": {
-    "eslint": "7.32.0",
-    "eslint-plugin-markdown": "2.2.1",
-    "mocha": "9.1.3",
-    "nyc": "15.1.0"
-  },
-  "files": [
-    "lib/",
-    "HISTORY.md",
-    "LICENSE",
-    "index.js",
-    "README.md"
-  ],
-  "engines": {
-    "node": ">= 0.6"
-  },
-  "scripts": {
-    "lint": "eslint .",
-    "test": "mocha --reporter spec --check-leaks --bail test/",
-    "test-ci": "nyc --reporter=lcov --reporter=text npm test",
-    "test-cov": "nyc --reporter=html --reporter=text npm test"
-  }
-}
diff --git a/node_modules/npm/node_modules/node-gyp/CHANGELOG.md b/node_modules/npm/node_modules/node-gyp/CHANGELOG.md
deleted file mode 100644
index 98315ad..0000000
--- a/node_modules/npm/node_modules/node-gyp/CHANGELOG.md
+++ /dev/null
@@ -1,905 +0,0 @@
-# Changelog
-
-### [10.0.1](https://www.github.com/nodejs/node-gyp/compare/v10.0.0...v10.0.1) (2023-11-02)
-
-
-### Bug Fixes
-
-* use local `util` for `findAccessibleSync()` ([b39e681](https://www.github.com/nodejs/node-gyp/commit/b39e6819aa9e2c45107d6e60a4913ca036ebfbfd))
-
-
-### Miscellaneous
-
-* add parallel test logging ([7de1f5f](https://www.github.com/nodejs/node-gyp/commit/7de1f5f32d550d26d48fe4f76aed5866744edcba))
-* lint fixes ([4e0ed99](https://www.github.com/nodejs/node-gyp/commit/4e0ed992566f43abc6e988af091ad07fde04acbf))
-* use platform specific timeouts in tests ([a68586a](https://www.github.com/nodejs/node-gyp/commit/a68586a67d0af238300662cc062422b42820044d))
-
-## [10.0.0](https://www.github.com/nodejs/node-gyp/compare/v9.4.0...v10.0.0) (2023-10-28)
-
-
-### ⚠ BREAKING CHANGES
-
-* use .npmignore file to limit which files are published (#2921)
-* the `Gyp` class exported is now created using ECMAScript classes and therefore might have small differences to classes that were previously created with `util.inherits`.
-* All internal functions have been coverted to return promises and no longer accept callbacks. This is not a breaking change for users but may be breaking to consumers of `node-gyp` if you are requiring internal functions directly.
-* `node-gyp` now supports node `^16.14.0 || >=18.0.0`
-* update engines.node to ^14.17.0 || ^16.13.0 || >=18.0.0
-
-### Features
-
-* convert all internal functions to async/await ([355622f](https://www.github.com/nodejs/node-gyp/commit/355622f4aac3bd3056b9e03aac5fa2f42a4b3576))
-* convert internal classes from util.inherits to classes ([d52997e](https://www.github.com/nodejs/node-gyp/commit/d52997e975b9da6e0cea3d9b99873e9ddc768679))
-* drop node 14 support ([#2929](https://www.github.com/nodejs/node-gyp/issues/2929)) ([1b3bd34](https://www.github.com/nodejs/node-gyp/commit/1b3bd341b40f384988d03207ce8187e93ba609bc))
-* drop rimraf dependency ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* **gyp:** update gyp to v0.16.1 ([#2923](https://www.github.com/nodejs/node-gyp/issues/2923)) ([707927c](https://www.github.com/nodejs/node-gyp/commit/707927cd579205ef2b4b17e61c1cce24c056b452))
-* replace npmlog with proc-log ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* update engines.node to ^14.17.0 || ^16.13.0 || >=18.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* use .npmignore file to limit which files are published ([#2921](https://www.github.com/nodejs/node-gyp/issues/2921)) ([864a979](https://www.github.com/nodejs/node-gyp/commit/864a979930cf0ef5ad64bc887b901fa8955d058f))
-
-
-### Bug Fixes
-
-* create Python symlink only during builds, and clean it up after ([#2721](https://www.github.com/nodejs/node-gyp/issues/2721)) ([0f1f667](https://www.github.com/nodejs/node-gyp/commit/0f1f667b737d21905e283df100a2cb639993562a))
-* promisify build command ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* use fs/promises in favor of fs.promises ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-
-
-### Tests
-
-* increase mocha timeout ([#2887](https://www.github.com/nodejs/node-gyp/issues/2887)) ([445c28f](https://www.github.com/nodejs/node-gyp/commit/445c28fabc5fbdf9c3bb3341fb70660a3530f6ad))
-* update expired certs ([#2908](https://www.github.com/nodejs/node-gyp/issues/2908)) ([5746691](https://www.github.com/nodejs/node-gyp/commit/5746691a36f7b37019d4b8d4e9616aec43d20410))
-
-
-### Doc
-
-* Add note about Python symlinks (PR 2362) to CHANGELOG.md for 9.1.0 ([#2783](https://www.github.com/nodejs/node-gyp/issues/2783)) ([b3d41ae](https://www.github.com/nodejs/node-gyp/commit/b3d41aeb737ddd54cc292f363abc561dcc0a614e))
-* README.md Do not hardcode the supported versions of Python ([#2880](https://www.github.com/nodejs/node-gyp/issues/2880)) ([bb93b94](https://www.github.com/nodejs/node-gyp/commit/bb93b946a9c74934b59164deb52128cf913c97d5))
-* update applicable GitHub links from master to main ([#2843](https://www.github.com/nodejs/node-gyp/issues/2843)) ([d644ce4](https://www.github.com/nodejs/node-gyp/commit/d644ce48311edf090d0e920ad449e5766c757933))
-* Update windows installation instructions in README.md ([#2882](https://www.github.com/nodejs/node-gyp/issues/2882)) ([c9caa2e](https://www.github.com/nodejs/node-gyp/commit/c9caa2ecf3c7deae68444ce8fabb32d2dca651cd))
-
-
-### Core
-
-* find python checks order changed on windows ([#2872](https://www.github.com/nodejs/node-gyp/issues/2872)) ([b030555](https://www.github.com/nodejs/node-gyp/commit/b030555cdb754d9c23906e7e707115cd077bbf76))
-* glob@10.3.10 ([#2926](https://www.github.com/nodejs/node-gyp/issues/2926)) ([4bef1ec](https://www.github.com/nodejs/node-gyp/commit/4bef1ecc7554097d92beb397fbe1a546c5227545))
-* glob@8.0.3 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* make-fetch-happen@13.0.0 ([#2927](https://www.github.com/nodejs/node-gyp/issues/2927)) ([059bb6f](https://www.github.com/nodejs/node-gyp/commit/059bb6fd41bb50955a9efbd97887773d60d53221))
-* nopt@^7.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* standard@17.0.0 and fix linting errors ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* which@3.0.0 ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* which@4.0.0 ([#2928](https://www.github.com/nodejs/node-gyp/issues/2928)) ([e388255](https://www.github.com/nodejs/node-gyp/commit/e38825531403aabeae7abe58e76867f31b832f36))
-
-
-### Miscellaneous
-
-* add check engines script to CI ([#2922](https://www.github.com/nodejs/node-gyp/issues/2922)) ([21a7249](https://www.github.com/nodejs/node-gyp/commit/21a7249b40d8f95e7721e450fd18764adb1648a7))
-* empty commit to add changelog entries from [#2770](https://www.github.com/nodejs/node-gyp/issues/2770) ([4a50fe3](https://www.github.com/nodejs/node-gyp/commit/4a50fe31574217c4b2a798fc72b19947a64ceea1))
-* GitHub Workflows security hardening ([#2740](https://www.github.com/nodejs/node-gyp/issues/2740)) ([26683e9](https://www.github.com/nodejs/node-gyp/commit/26683e993df038fb94d89f2276f3535e4522d79a))
-* misc testing fixes ([#2930](https://www.github.com/nodejs/node-gyp/issues/2930)) ([4e493d4](https://www.github.com/nodejs/node-gyp/commit/4e493d4fb262d12ac52c84979071ccc79e666a1a))
-* run tests after release please PR ([3032e10](https://www.github.com/nodejs/node-gyp/commit/3032e1061cc2b7b49f83c397d385bafddc6b0214))
-
-## [9.4.0](https://www.github.com/nodejs/node-gyp/compare/v9.3.1...v9.4.0) (2023-06-12)
-
-
-### Features
-
-* add support for native windows arm64 build tools ([bb76021](https://www.github.com/nodejs/node-gyp/commit/bb76021d35964d2bb125bc6214286f35ae4e6cad))
-* Upgrade Python linting from flake8 to ruff ([#2815](https://www.github.com/nodejs/node-gyp/issues/2815)) ([fc0ddc6](https://www.github.com/nodejs/node-gyp/commit/fc0ddc6523c62b10e5ca1257500b3ceac01450a7))
-
-
-### Bug Fixes
-
-* extract tarball to temp directory on Windows ([#2846](https://www.github.com/nodejs/node-gyp/issues/2846)) ([aaa117c](https://www.github.com/nodejs/node-gyp/commit/aaa117c514430aa2c1e568b95df1b6ed1c1fd3b6))
-* log statement is for devDir not nodedir ([#2840](https://www.github.com/nodejs/node-gyp/issues/2840)) ([55048f8](https://www.github.com/nodejs/node-gyp/commit/55048f8be5707c295fb0876306aded75638a8b63))
-
-
-### Miscellaneous
-
-* get update-gyp.py to work with Python >= v3.5 ([#2826](https://www.github.com/nodejs/node-gyp/issues/2826)) ([337e8e6](https://www.github.com/nodejs/node-gyp/commit/337e8e68209bd2481cbb11dacce61234dc5c9419))
-
-
-### Doc
-
-* docs/README.md add advise about deprecated node-sass ([#2828](https://www.github.com/nodejs/node-gyp/issues/2828)) ([6f3c2d3](https://www.github.com/nodejs/node-gyp/commit/6f3c2d3c6c0de0dbf8c7245f34c2e0b3eea53812))
-* Update README.md ([#2822](https://www.github.com/nodejs/node-gyp/issues/2822)) ([c7927e2](https://www.github.com/nodejs/node-gyp/commit/c7927e228dfde059c93e08c26b54dd8026144583))
-
-
-### Tests
-
-* remove deprecated Node.js and Python ([#2868](https://www.github.com/nodejs/node-gyp/issues/2868)) ([a0b3d1c](https://www.github.com/nodejs/node-gyp/commit/a0b3d1c3afed71a74501476fcbc6ee3fface4d13))
-
-### [9.3.1](https://www.github.com/nodejs/node-gyp/compare/v9.3.0...v9.3.1) (2022-12-16)
-
-
-### Bug Fixes
-
-* increase node 12 support to ^12.13 ([#2771](https://www.github.com/nodejs/node-gyp/issues/2771)) ([888efb9](https://www.github.com/nodejs/node-gyp/commit/888efb9055857afee6a6b54550722cf9ae3ee323))
-
-
-### Miscellaneous
-
-* update python test matrix ([#2774](https://www.github.com/nodejs/node-gyp/issues/2774)) ([38f01fa](https://www.github.com/nodejs/node-gyp/commit/38f01fa57d10fdb3db7697121d957bc2e0e96508))
-
-## [9.3.0](https://www.github.com/nodejs/node-gyp/compare/v9.2.0...v9.3.0) (2022-10-10)
-
-
-### Features
-
-* **gyp:** update gyp to v0.14.0 ([#2749](https://www.github.com/nodejs/node-gyp/issues/2749)) ([713b8dc](https://www.github.com/nodejs/node-gyp/commit/713b8dcdbf44532ca9453a127da266386cc737f8))
-* remove support for VS2015 in Node.js >=19 ([#2746](https://www.github.com/nodejs/node-gyp/issues/2746)) ([131d1a4](https://www.github.com/nodejs/node-gyp/commit/131d1a463baf034a04154bcda753a8295f112a34))
-* support IBM Open XL C/C++ on z/OS ([#2743](https://www.github.com/nodejs/node-gyp/issues/2743)) ([7d0c83d](https://www.github.com/nodejs/node-gyp/commit/7d0c83d2a95aca743dff972826d0da26203acfc4))
-
-## [9.2.0](https://www.github.com/nodejs/node-gyp/compare/v9.1.0...v9.2.0) (2022-10-02)
-
-
-### Features
-
-* Add proper support for IBM i ([a26494f](https://www.github.com/nodejs/node-gyp/commit/a26494fbb8883d9ef784503979e115dec3e2791e))
-* **gyp:** update gyp to v0.13.0 ([3e2a532](https://www.github.com/nodejs/node-gyp/commit/3e2a5324f1c24f3a04bca04cf54fe23d5c4d5e50))
-
-
-### Bug Fixes
-
-* node.js debugger adds stderr (but exit code is 0) -> shouldn't throw ([#2719](https://www.github.com/nodejs/node-gyp/issues/2719)) ([c379a74](https://www.github.com/nodejs/node-gyp/commit/c379a744c65c7ab07c2c3193d9c7e8f25ae1b05e))
-
-
-### Core
-
-* enable support for zoslib on z/OS ([#2600](https://www.github.com/nodejs/node-gyp/issues/2600)) ([83c0a12](https://www.github.com/nodejs/node-gyp/commit/83c0a12bf23b4cbf3125d41f9e2d4201db76c9ae))
-
-
-### Miscellaneous
-
-* update dependency - nopt@6.0.0 ([#2707](https://www.github.com/nodejs/node-gyp/issues/2707)) ([8958ecf](https://www.github.com/nodejs/node-gyp/commit/8958ecf2bb719227bbcbf155891c3186ee219a2e))
-
-## [9.1.0](https://www.github.com/nodejs/node-gyp/compare/v9.0.0...v9.1.0) (2022-07-13)
-
-
-### Features
-
-* Update function getSDK() to support Windows 11 SDK ([#2565](https://www.github.com/nodejs/node-gyp/issues/2565)) ([ea8520e](https://www.github.com/nodejs/node-gyp/commit/ea8520e3855374bd15b6d001fe112d58a8d7d737))
-
-
-### Bug Fixes
-
-* extend tap timeout length to allow for slow CI ([6f74c76](https://www.github.com/nodejs/node-gyp/commit/6f74c762fe3c19bdd20245cb5c02e2dfa65d9451))
-* new ca & server certs, bundle in .js file and unpack for testing ([147e3d3](https://www.github.com/nodejs/node-gyp/commit/147e3d34f44a97deb7aa507207680cf0f4e662a2))
-* re-label ([#2689](https://www.github.com/nodejs/node-gyp/issues/2689)) ([f0b7863](https://www.github.com/nodejs/node-gyp/commit/f0b7863dadfa365afc173025ae95351aec79abd9))
-* typo on readme ([bf81cd4](https://www.github.com/nodejs/node-gyp/commit/bf81cd452b931dd4dfa82762c23dd530a075d992))
-
-
-### Doc
-
-* update docs/README.md with latest version number ([62d2815](https://www.github.com/nodejs/node-gyp/commit/62d28151bf8266a34e1bcceeb25b4e6e2ae5ca5d))
-
-
-### Core
-
-* update due to rename of primary branch ([ca1f068](https://www.github.com/nodejs/node-gyp/commit/ca1f0681a5567ca8cd51acebccd37a633f19bc6a))
-* Add Python symlink to path (for non-Windows OSes only) ([#2362](https://github.com/nodejs/node-gyp/pull/2362)) ([b9ddcd5](https://github.com/nodejs/node-gyp/commit/b9ddcd5bbd93b05b03674836b6ebdae2c2e74c8c))
-
-
-### Tests
-
-* Try msvs-version: [2016, 2019, 2022] ([#2700](https://www.github.com/nodejs/node-gyp/issues/2700)) ([68b5b5b](https://www.github.com/nodejs/node-gyp/commit/68b5b5be9c94ac20c55e88654ff6f55234d7130a))
-* Upgrade GitHub Actions ([#2623](https://www.github.com/nodejs/node-gyp/issues/2623)) ([245cd5b](https://www.github.com/nodejs/node-gyp/commit/245cd5bbe4441d4f05e88f2fa20a86425419b6af))
-* Upgrade GitHub Actions ([#2701](https://www.github.com/nodejs/node-gyp/issues/2701)) ([1c64ca7](https://www.github.com/nodejs/node-gyp/commit/1c64ca7f4702c6eb43ecd16fbd67b5d939041621))
-
-## [9.0.0](https://www.github.com/nodejs/node-gyp/compare/v8.4.1...v9.0.0) (2022-02-24)
-
-
-### ⚠ BREAKING CHANGES
-
-* increase "engines" to "node" : "^12.22 || ^14.13 || >=16" (#2601)
-
-### Bug Fixes
-
-* _ in npm_config_ env variables ([eef4eef](https://www.github.com/nodejs/node-gyp/commit/eef4eefccb13ff6a32db862709ee5b2d4edf7e95))
-* update make-fetch-happen to a minimum of 10.0.3 ([839e414](https://www.github.com/nodejs/node-gyp/commit/839e414b63790c815a4a370d0feee8f24a94d40f))
-
-
-### Miscellaneous
-
-* add minimal SECURITY.md ([#2560](https://www.github.com/nodejs/node-gyp/issues/2560)) ([c2a1850](https://www.github.com/nodejs/node-gyp/commit/c2a185056e2e589b520fbc0bcc59c2935cd07ede))
-
-
-### Doc
-
-* Add notes/disclaimers for upgrading the copy of node-gyp that npm uses ([#2585](https://www.github.com/nodejs/node-gyp/issues/2585)) ([faf6d48](https://www.github.com/nodejs/node-gyp/commit/faf6d48f8a77c08a313baf9332358c4b1231c73c))
-* Rename and update Common-issues.md --> docs/README.md ([#2567](https://www.github.com/nodejs/node-gyp/issues/2567)) ([2ef5fb8](https://www.github.com/nodejs/node-gyp/commit/2ef5fb86277c4d81baffc0b9f642a8d86be1bfa5))
-* rephrase explanation of which node-gyp is used by npm ([#2587](https://www.github.com/nodejs/node-gyp/issues/2587)) ([a2f2988](https://www.github.com/nodejs/node-gyp/commit/a2f298870692022302fa27a1d42363c4a72df407))
-* title match content ([#2574](https://www.github.com/nodejs/node-gyp/issues/2574)) ([6e8f93b](https://www.github.com/nodejs/node-gyp/commit/6e8f93be0443f2649d4effa7bc773a9da06a33b4))
-* Update Python versions ([#2571](https://www.github.com/nodejs/node-gyp/issues/2571)) ([e069f13](https://www.github.com/nodejs/node-gyp/commit/e069f13658a8bfb5fd60f74708cf8be0856d92e3))
-
-
-### Core
-
-* add lib.target as path for searching libnode on z/OS ([1d499dd](https://www.github.com/nodejs/node-gyp/commit/1d499dd5606f39de2d34fa822fd0fa5ce17fbd06))
-* increase "engines" to "node" : "^12.22 || ^14.13 || >=16" ([#2601](https://www.github.com/nodejs/node-gyp/issues/2601)) ([6562f92](https://www.github.com/nodejs/node-gyp/commit/6562f92a6f2e67aeae081ddf5272ff117f1fab07))
-* make-fetch-happen@10.0.1 ([78f6660](https://www.github.com/nodejs/node-gyp/commit/78f66604e0df480d4f36a8fa4f3618c046a6fbdc))
-
-### [8.4.1](https://www.github.com/nodejs/node-gyp/compare/v8.4.0...v8.4.1) (2021-11-19)
-
-
-### Bug Fixes
-
-* windows command missing space ([#2553](https://www.github.com/nodejs/node-gyp/issues/2553)) ([cc37b88](https://www.github.com/nodejs/node-gyp/commit/cc37b880690706d3c5d04d5a68c76c392a0a23ed))
-
-
-### Doc
-
-* fix typo in powershell node-gyp update ([787cf7f](https://www.github.com/nodejs/node-gyp/commit/787cf7f8e5ddd5039e02b64ace6b7b15e06fe0a4))
-
-
-### Core
-
-* npmlog@6.0.0 ([8083f6b](https://www.github.com/nodejs/node-gyp/commit/8083f6b855bd7f3326af04c5f5269fc28d7f2508))
-
-## [8.4.0](https://www.github.com/nodejs/node-gyp/compare/v8.3.0...v8.4.0) (2021-11-05)
-
-
-### Features
-
-* build with config.gypi from node headers ([a27dc08](https://www.github.com/nodejs/node-gyp/commit/a27dc08696911c6d81e76cc228697243069103c1))
-* support vs2022 ([#2533](https://www.github.com/nodejs/node-gyp/issues/2533)) ([5a00387](https://www.github.com/nodejs/node-gyp/commit/5a00387e5f8018264a1822f6c4d5dbf425f21cf6))
-
-## [8.3.0](https://www.github.com/nodejs/node-gyp/compare/v8.2.0...v8.3.0) (2021-10-11)
-
-
-### Features
-
-* **gyp:** update gyp to v0.10.0 ([#2521](https://www.github.com/nodejs/node-gyp/issues/2521)) ([5585792](https://www.github.com/nodejs/node-gyp/commit/5585792922a97f0629f143c560efd74470eae87f))
-
-
-### Tests
-
-* Python 3.10 was release on Oct. 4th ([#2504](https://www.github.com/nodejs/node-gyp/issues/2504)) ([0a67dcd](https://www.github.com/nodejs/node-gyp/commit/0a67dcd1307f3560495219253241eafcbf4e2a69))
-
-
-### Miscellaneous
-
-* **deps:** bump make-fetch-happen from 8.0.14 to 9.1.0 ([b05b4fe](https://www.github.com/nodejs/node-gyp/commit/b05b4fe9891f718f40edf547e9b50e982826d48a))
-* refactor the creation of config.gypi file ([f2ad87f](https://www.github.com/nodejs/node-gyp/commit/f2ad87ff65f98ad66daa7225ad59d99b759a2b07))
-
-## [8.2.0](https://www.github.com/nodejs/node-gyp/compare/v8.1.0...v8.2.0) (2021-08-23)
-
-
-### Features
-
-* **gyp:** update gyp to v0.9.6 ([#2481](https://www.github.com/nodejs/node-gyp/issues/2481)) ([ed9a9ed](https://www.github.com/nodejs/node-gyp/commit/ed9a9ed653a17c84afa3c327161992d0da7d0cea))
-
-
-### Bug Fixes
-
-* add error arg back into catch block for older Node.js users ([5cde818](https://www.github.com/nodejs/node-gyp/commit/5cde818aac715477e9e9747966bb6b4c4ed070a8))
-* change default gyp update message ([#2420](https://www.github.com/nodejs/node-gyp/issues/2420)) ([cfd12ff](https://www.github.com/nodejs/node-gyp/commit/cfd12ff3bb0eb4525173413ef6a94b3cd8398cad))
-* doc how to update node-gyp independently from npm ([c8c0af7](https://www.github.com/nodejs/node-gyp/commit/c8c0af72e78141a02b5da4cd4d704838333a90bd))
-* missing spaces ([f0882b1](https://www.github.com/nodejs/node-gyp/commit/f0882b1264b2fa701adbc81a3be0b3cba80e333d))
-
-
-### Core
-
-* deep-copy process.config during configure ([#2368](https://www.github.com/nodejs/node-gyp/issues/2368)) ([5f1a06c](https://www.github.com/nodejs/node-gyp/commit/5f1a06c50f3b0c3d292f64948f85a004cfcc5c87))
-
-
-### Miscellaneous
-
-* **deps:** bump tar from 6.1.0 to 6.1.2 ([#2474](https://www.github.com/nodejs/node-gyp/issues/2474)) ([ec15a3e](https://www.github.com/nodejs/node-gyp/commit/ec15a3e5012004172713c11eebcc9d852d32d380))
-* fix typos discovered by codespell ([#2442](https://www.github.com/nodejs/node-gyp/issues/2442)) ([2d0ce55](https://www.github.com/nodejs/node-gyp/commit/2d0ce5595e232a3fc7c562cdf39efb77e2312cc1))
-* GitHub Actions Test on node: [12.x, 14.x, 16.x] ([#2439](https://www.github.com/nodejs/node-gyp/issues/2439)) ([b7bccdb](https://www.github.com/nodejs/node-gyp/commit/b7bccdb527d93b0bb0ce99713f083ce2985fe85c))
-
-
-### Doc
-
-* correct link to "binding.gyp files out in the wild" ([#2483](https://www.github.com/nodejs/node-gyp/issues/2483)) ([660dd7b](https://www.github.com/nodejs/node-gyp/commit/660dd7b2a822c184be8027b300e68be67b366772))
-* **wiki:** Add a link to the node-midi binding.gyp file. ([b354711](https://www.github.com/nodejs/node-gyp/commit/b3547115f6e356358138310e857c7f1ec627a8a7))
-* **wiki:** add bcrypt ([e199cfa](https://www.github.com/nodejs/node-gyp/commit/e199cfa8fc6161492d2a6ade2190510d0ebf7c0f))
-* **wiki:** Add helpful information ([4eda827](https://www.github.com/nodejs/node-gyp/commit/4eda8275c03dae6d2f5c40f3c1dbe930d84b0f2b))
-* **wiki:** Add node-canvas ([13a9553](https://www.github.com/nodejs/node-gyp/commit/13a955317b39caf98fd1f412d8d3f41599e979fd))
-* **wiki:** Add node-openvg-canvas and node-openvg. ([61f709e](https://www.github.com/nodejs/node-gyp/commit/61f709ec4d9f256a6467e9ff84430a48eeb629d1))
-* **wiki:** add one more example ([77f3632](https://www.github.com/nodejs/node-gyp/commit/77f363272930d3d4d24fd3973be22e6237128fcc))
-* **wiki:** add topcube, node-osmium, and node-osrm ([1a75d2b](https://www.github.com/nodejs/node-gyp/commit/1a75d2bf2f562ba50846893a516e111cfbb50885))
-* **wiki:** Added details for properly fixing ([3d4d9d5](https://www.github.com/nodejs/node-gyp/commit/3d4d9d52d6b5b49de06bb0bb5b68e2686d2b7ebd))
-* **wiki:** Added Ghostscript4JS ([bf4bed1](https://www.github.com/nodejs/node-gyp/commit/bf4bed1b96a7d22fba6f97f4552ad09f32ac3737))
-* **wiki:** added levelup ([1575bce](https://www.github.com/nodejs/node-gyp/commit/1575bce3a53db628bfb023fd6f3258fdf98c3195))
-* **wiki:** Added nk-mysql (nodamysql) ([5b4f2d0](https://www.github.com/nodejs/node-gyp/commit/5b4f2d0e1d5d3eadfd03aaf9c1668340f76c4bea))
-* **wiki:** Added nk-xrm-installer .gyp references, including .py scripts for providing complete reference to examples of fetching source via http, extracting, and moving files (as opposed to copying) ([ceb3088](https://www.github.com/nodejs/node-gyp/commit/ceb30885b74f6789374ef52267b84767be93ebe4))
-* **wiki:** Added tip about resolving frustrating LNK1181 error ([e64798d](https://www.github.com/nodejs/node-gyp/commit/e64798de8cac6031ad598a86d7599e81b4d20b17))
-* **wiki:** ADDED: Node.js binding to OpenCV ([e2dc777](https://www.github.com/nodejs/node-gyp/commit/e2dc77730b09d7ee8682d7713a7603a2d7aacabd))
-* **wiki:** Adding link to node-cryptopp's gyp file ([875adbe](https://www.github.com/nodejs/node-gyp/commit/875adbe2a4669fa5f2be0250ffbf98fb55e800fd))
-* **wiki:** Adding the sharp library to the list ([9dce0e4](https://www.github.com/nodejs/node-gyp/commit/9dce0e41650c3fa973e6135a79632d022c662a1d))
-* **wiki:** Adds node-fann ([23e3d48](https://www.github.com/nodejs/node-gyp/commit/23e3d485ed894ba7c631e9c062f5e366b50c416c))
-* **wiki:** Adds node-inotify and v8-profiler ([b6e542f](https://www.github.com/nodejs/node-gyp/commit/b6e542f644dbbfe22b88524ec500696e06ee4af7))
-* **wiki:** Bumping Python version from 2.3 to 2.7 as per the node-gyp readme ([55ebd6e](https://www.github.com/nodejs/node-gyp/commit/55ebd6ebacde975bf84f7bf4d8c66e64cc7cd0da))
-* **wiki:** C++ build tools version upgraded ([5b899b7](https://www.github.com/nodejs/node-gyp/commit/5b899b70db729c392ced7c98e8e17590c6499fc3))
-* **wiki:** change bcrypt url to binding.gyp file ([e11bdd8](https://www.github.com/nodejs/node-gyp/commit/e11bdd84de6144492d3eb327d67cbf2d62da1a76))
-* **wiki:** Clarification + direct link to VS2010 ([531c724](https://www.github.com/nodejs/node-gyp/commit/531c724561d947b5d870de8d52dd8c3c51c5ec2d))
-* **wiki:** Correcting the link to node-osmium ([fae7516](https://www.github.com/nodejs/node-gyp/commit/fae7516a1d2829b6e234eaded74fb112ebd79a05))
-* **wiki:** Created "binding.gyp" files out in the wild (markdown) ([d4fd143](https://www.github.com/nodejs/node-gyp/commit/d4fd14355bbe57f229f082f47bb2b3670868203f))
-* **wiki:** Created Common issues (markdown) ([a38299e](https://www.github.com/nodejs/node-gyp/commit/a38299ea340ceb0e732c6dc6a1b4760257644839))
-* **wiki:** Created Error: "pre" versions of node cannot be installed (markdown) ([98bc80d](https://www.github.com/nodejs/node-gyp/commit/98bc80d7a62ba70c881f3c39d94f804322e57852))
-* **wiki:** Created Linking to OpenSSL (markdown) ([c46d00d](https://www.github.com/nodejs/node-gyp/commit/c46d00d83bac5173dea8bbbb175a1a7de74fdaca))
-* **wiki:** Created Updating npm's bundled node gyp (markdown) ([e0ac8d1](https://www.github.com/nodejs/node-gyp/commit/e0ac8d15af46aadd1c220599e63199b154a514e6))
-* **wiki:** Created use of undeclared identifier 'TypedArray' (markdown) ([65ba711](https://www.github.com/nodejs/node-gyp/commit/65ba71139e9b7f64ac823e575ee9dbf17d937ce4))
-* **wiki:** Created Visual Studio 2010 Setup (markdown) ([5b80e83](https://www.github.com/nodejs/node-gyp/commit/5b80e834c8f79dda9fb2770a876ff3cf649c06f3))
-* **wiki:** Created Visual studio 2012 setup (markdown) ([becef31](https://www.github.com/nodejs/node-gyp/commit/becef316b6c46a33e783667720ee074a0141d1a5))
-* **wiki:** Destroyed Visual Studio 2010 Setup (markdown) ([93423b4](https://www.github.com/nodejs/node-gyp/commit/93423b43606de9664aeb79635825f5e9941ec9bc))
-* **wiki:** Destroyed Visual studio 2012 setup (markdown) ([3601508](https://www.github.com/nodejs/node-gyp/commit/3601508bb10fa05da0ddc7e70d57e4b4dd679657))
-* **wiki:** Different commands for Windows npm v6 vs. v7 ([0fce46b](https://www.github.com/nodejs/node-gyp/commit/0fce46b53340c85e8091cde347d5ed23a443c82f))
-* **wiki:** Drop  in favor of ([9285ff6](https://www.github.com/nodejs/node-gyp/commit/9285ff6e451c52c070a05f05f0a9602621d91d53))
-* **wiki:** Explicit link to Visual C++ 2010 Express ([378c363](https://www.github.com/nodejs/node-gyp/commit/378c3632f02c096ed819ec8f2611c65bef0c0554))
-* **wiki:** fix link to gyp file used to build libsqlite3 ([54db8d7](https://www.github.com/nodejs/node-gyp/commit/54db8d7ac33e3f98220960b5d86cfa18a75b53cb))
-* **wiki:** Fix link to node-zipfile ([92e49a8](https://www.github.com/nodejs/node-gyp/commit/92e49a858ed69cb4847a26a5676ab56ef5e2de33))
-* **wiki:** fixed node-serialport link ([954ee53](https://www.github.com/nodejs/node-gyp/commit/954ee530b3972d1db591fce32368e4e31b5a25d8))
-* **wiki:** I highly missing it in common issue as every windows biggner face that issue ([d617fae](https://www.github.com/nodejs/node-gyp/commit/d617faee29c40871ca5c8f93efd0ce929a40d541))
-* **wiki:** if ouns that the -h did not help. I founs on github that there was support for visual studio 2015, while i couldn't install node-red beacuse it kept telling me the key 2015 was missing. looking in he gyp python code i found the local file was bot up t dat with the github repo. updating took several efforts before i tried to drop the -g option. ([408b72f](https://www.github.com/nodejs/node-gyp/commit/408b72f561329408daeb17834436e381406efcc8))
-* **wiki:** If permissions error, please try  and then the command. ([ee8e1c1](https://www.github.com/nodejs/node-gyp/commit/ee8e1c1e5334096d58e0d6bca6c006f2ee9c88cb))
-* **wiki:** Improve Unix instructions ([c3e5487](https://www.github.com/nodejs/node-gyp/commit/c3e548736645b535ea5bce613d74ca3e98598243))
-* **wiki:** link to docs/ from README ([b52e487](https://www.github.com/nodejs/node-gyp/commit/b52e487eac1eb421573d1e67114a242eeff45a00))
-* **wiki:** Lower case L ([3aa2c6b](https://www.github.com/nodejs/node-gyp/commit/3aa2c6bdb07971b87505e32e32548d75264bd19f))
-* **wiki:** Make changes discussed in https://github.com/nodejs/node-gyp/issues/2416 ([1dcad87](https://www.github.com/nodejs/node-gyp/commit/1dcad873539027511a5f0243baf770ea90f6f4e2))
-* **wiki:** move wiki docs into doc/ ([f0a4835](https://www.github.com/nodejs/node-gyp/commit/f0a48355d86534ec3bdabcdb3ce3340fa2e17f39))
-* **wiki:** node-sass in the wild ([d310a73](https://www.github.com/nodejs/node-gyp/commit/d310a73d64d0065050377baac7047472f7424a1b))
-* **wiki:** node-srs was a 404 ([bbca21a](https://www.github.com/nodejs/node-gyp/commit/bbca21a1e1ede4c473aff365ca71989a5bda7b57))
-* **wiki:** Note: VS2010 seems to be no longer available!  VS2013 or nothing! ([7b5dcaf](https://www.github.com/nodejs/node-gyp/commit/7b5dcafafccdceae4b8f2b53ac9081a694b6ade8))
-* **wiki:** safer doc names, remove unnecessary TypedArray doc ([161c235](https://www.github.com/nodejs/node-gyp/commit/161c2353ef5b562f4acfb2fd77608fcbd0800fc0))
-* **wiki:** sorry, forgot to mention a specific windows version. ([d69dffc](https://www.github.com/nodejs/node-gyp/commit/d69dffc16c2b1e3c60dcb5d1c35a49270ba22a35))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([7444b47](https://www.github.com/nodejs/node-gyp/commit/7444b47a7caac1e14d1da474a7fcfcf88d328017))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d766b74](https://www.github.com/nodejs/node-gyp/commit/d766b7427851e6c2edc02e2504a7be9be7e330c0))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d319b0e](https://www.github.com/nodejs/node-gyp/commit/d319b0e98c7085de8e51bc5595eba4264b99a7d5))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3c6692d](https://www.github.com/nodejs/node-gyp/commit/3c6692d538f0ce973869aa237118b7d2483feccd))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([93392d5](https://www.github.com/nodejs/node-gyp/commit/93392d559ce6f250b9c7fe8177e6c88603809dc1))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([8841158](https://www.github.com/nodejs/node-gyp/commit/88411588f300e9b7c00fe516ecd977a1feeeb15c))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([81bfa1f](https://www.github.com/nodejs/node-gyp/commit/81bfa1f1b63d522a9f8a9ae9ca0c7ae90fe75140))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d1cd237](https://www.github.com/nodejs/node-gyp/commit/d1cd237bad06fa507adb354b9e2181a14dc63d24))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3de9e17](https://www.github.com/nodejs/node-gyp/commit/3de9e17e0b8a387eafe7bd18d0ec1e3191d118e8))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([a9b7096](https://www.github.com/nodejs/node-gyp/commit/a9b70968fb956eab3b95672048b94350e1565ca3))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([3236069](https://www.github.com/nodejs/node-gyp/commit/3236069689e7e0eb15b324fce74ab58158956f98))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([1462755](https://www.github.com/nodejs/node-gyp/commit/14627556966e5d513bdb8e5208f0e1300f68991f))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([7ab1337](https://www.github.com/nodejs/node-gyp/commit/7ab133752a6c402bb96dcd3d671d73e03e9487ad))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([640895d](https://www.github.com/nodejs/node-gyp/commit/640895d36b7448c646a3b850c1e159106f83c724))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([ced8c96](https://www.github.com/nodejs/node-gyp/commit/ced8c968457f285ab8989c291d28173d7730833c))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([27b883a](https://www.github.com/nodejs/node-gyp/commit/27b883a350ad0db6b9130d7b996f35855ec34c7a))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([d29fb13](https://www.github.com/nodejs/node-gyp/commit/d29fb134f1c4b9dd729ba95f2979e69e0934809f))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([2765891](https://www.github.com/nodejs/node-gyp/commit/27658913e6220cf0371b4b73e25a0e4ab11108a1))
-* **wiki:** Updated "binding.gyp" files out in the wild (markdown) ([dc97766](https://www.github.com/nodejs/node-gyp/commit/dc9776648d432bca6775c176641f16da14522d4c))
-* **wiki:** Updated Error: "pre" versions of node cannot be installed (markdown) ([e9f8b33](https://www.github.com/nodejs/node-gyp/commit/e9f8b33d1f87d04f22cb09a814d7c55d0fa38446))
-* **wiki:** Updated Home (markdown) ([3407109](https://www.github.com/nodejs/node-gyp/commit/3407109325cf7ba1e925656b9eb75feffab0557c))
-* **wiki:** Updated Home (markdown) ([6e392bc](https://www.github.com/nodejs/node-gyp/commit/6e392bcdd3dd1691773e6e16e1dffc35931b81e0))
-* **wiki:** Updated Home (markdown) ([65efe32](https://www.github.com/nodejs/node-gyp/commit/65efe32ccb8d446ce569453364f922dd9d27c945))
-* **wiki:** Updated Home (markdown) ([ea28f09](https://www.github.com/nodejs/node-gyp/commit/ea28f0947af91fa638be355143f5df89d2e431c8))
-* **wiki:** Updated Home (markdown) ([0e37ff4](https://www.github.com/nodejs/node-gyp/commit/0e37ff48b306c12149661b375895741d3d710da7))
-* **wiki:** Updated Home (markdown) ([b398ef4](https://www.github.com/nodejs/node-gyp/commit/b398ef46f660d2b1506508550dadfb4c35639e4b))
-* **wiki:** Updated Linking to OpenSSL (markdown) ([8919028](https://www.github.com/nodejs/node-gyp/commit/8919028921fd304f08044098434f0dc6071fb7cf))
-* **wiki:** Updated Linking to OpenSSL (markdown) ([c00eb77](https://www.github.com/nodejs/node-gyp/commit/c00eb778fc7dc27e4dab3a9219035ea20458b33b))
-* **wiki:** Updated node-levelup to node-leveldown (broken links) ([59668bb](https://www.github.com/nodejs/node-gyp/commit/59668bb0b904feccf3c09afa2fd37378c77af967))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([d314854](https://www.github.com/nodejs/node-gyp/commit/d31485415ef69d46effa6090c95698341965de1b))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([11858b0](https://www.github.com/nodejs/node-gyp/commit/11858b0655d1eee00c62ad628e719d4378803d14))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([33561e9](https://www.github.com/nodejs/node-gyp/commit/33561e9cbf5f4eb46111318503c77df2c6eb484a))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([4a7f2d0](https://www.github.com/nodejs/node-gyp/commit/4a7f2d0d869a65c99a78504976567017edadf657))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([979a706](https://www.github.com/nodejs/node-gyp/commit/979a7063b950c088a7f4896fc3a48e1d00dfd231))
-* **wiki:** Updated Updating npm's bundled node gyp (markdown) ([e50e04d](https://www.github.com/nodejs/node-gyp/commit/e50e04d7b6a3754ea0aa11fe8cef491b3bc5bdd4))
-
-## [8.1.0](https://www.github.com/nodejs/node-gyp/compare/v8.0.0...v8.1.0) (2021-05-28)
-
-
-### Features
-
-* **gyp:** update gyp to v0.9.1 ([#2402](https://www.github.com/nodejs/node-gyp/issues/2402)) ([814b1b0](https://www.github.com/nodejs/node-gyp/commit/814b1b0eda102afb9fc87e81638a9cf5b650bb10))
-
-
-### Miscellaneous
-
-* add `release-please-action` for automated releases ([#2395](https://www.github.com/nodejs/node-gyp/issues/2395)) ([07e9d7c](https://www.github.com/nodejs/node-gyp/commit/07e9d7c7ee80ba119ea760c635f72fd8e7efe198))
-
-
-### Core
-
-* fail gracefully if we can't find the username ([#2375](https://www.github.com/nodejs/node-gyp/issues/2375)) ([fca4795](https://www.github.com/nodejs/node-gyp/commit/fca4795512c67dc8420aaa0d913b5b89a4b147f3))
-* log as yes/no whether build dir was created ([#2370](https://www.github.com/nodejs/node-gyp/issues/2370)) ([245dee5](https://www.github.com/nodejs/node-gyp/commit/245dee5b62581309946872ae253226ea3a42c0e3))
-
-
-### Doc
-
-* fix v8.0.0 release date ([4b83c3d](https://www.github.com/nodejs/node-gyp/commit/4b83c3de7300457919d53f26d96ea9ad6f6bedd8))
-* remove redundant version info ([#2403](https://www.github.com/nodejs/node-gyp/issues/2403)) ([1423670](https://www.github.com/nodejs/node-gyp/commit/14236709de64b100a424396b91a5115639daa0ef))
-* Update README.md Visual Studio Community page polski to auto ([#2371](https://www.github.com/nodejs/node-gyp/issues/2371)) ([1b4697a](https://www.github.com/nodejs/node-gyp/commit/1b4697abf69ef574a48faf832a7098f4c6c224a5))
-
-## v8.0.0 2021-04-03
-
-* [[`0d8a6f1b19`](https://github.com/nodejs/node-gyp/commit/0d8a6f1b19)] - **ci**: update actions/setup-node to v2 (#2302) (Sora Morimoto) [#2302](https://github.com/nodejs/node-gyp/pull/2302)
-* [[`15a5c7d45b`](https://github.com/nodejs/node-gyp/commit/15a5c7d45b)] - **ci**: migrate deprecated grammar (#2285) (Jiawen Geng) [#2285](https://github.com/nodejs/node-gyp/pull/2285)
-* [[`06ddde27f9`](https://github.com/nodejs/node-gyp/commit/06ddde27f9)] - **deps**: sync mutual dependencies with npm (DeeDeeG) [#2348](https://github.com/nodejs/node-gyp/pull/2348)
-* [[`a5fd1f41e3`](https://github.com/nodejs/node-gyp/commit/a5fd1f41e3)] - **doc**: add downloads badge (#2352) (Jiawen Geng) [#2352](https://github.com/nodejs/node-gyp/pull/2352)
-* [[`cc1cbce056`](https://github.com/nodejs/node-gyp/commit/cc1cbce056)] - **doc**: update macOS\_Catalina.md (#2293) (iMrLopez) [#2293](https://github.com/nodejs/node-gyp/pull/2293)
-* [[`6287118fc4`](https://github.com/nodejs/node-gyp/commit/6287118fc4)] - **doc**: updated README.md to copy easily (#2281) (மனோஜ்குமார் பழனிச்சாமி) [#2281](https://github.com/nodejs/node-gyp/pull/2281)
-* [[`66c0f04467`](https://github.com/nodejs/node-gyp/commit/66c0f04467)] - **doc**: add missing `sudo` to Catalina doc (Karl Horky) [#2244](https://github.com/nodejs/node-gyp/pull/2244)
-* [[`0da2e0140d`](https://github.com/nodejs/node-gyp/commit/0da2e0140d)] - **gyp**: update gyp to v0.8.1 (#2355) (DeeDeeG) [#2355](https://github.com/nodejs/node-gyp/pull/2355)
-* [[`0093ec8646`](https://github.com/nodejs/node-gyp/commit/0093ec8646)] - **gyp**: Improve our flake8 linting tests (Christian Clauss) [#2356](https://github.com/nodejs/node-gyp/pull/2356)
-* [[`a78b584236`](https://github.com/nodejs/node-gyp/commit/a78b584236)] - **(SEMVER-MAJOR)** **gyp**: remove support for Python 2 (#2300) (Christian Clauss) [#2300](https://github.com/nodejs/node-gyp/pull/2300)
-* [[`c3c510d89e`](https://github.com/nodejs/node-gyp/commit/c3c510d89e)] - **gyp**: update gyp to v0.8.0 (#2318) (Christian Clauss) [#2318](https://github.com/nodejs/node-gyp/pull/2318)
-* [[`9e1397c52e`](https://github.com/nodejs/node-gyp/commit/9e1397c52e)] - **(SEMVER-MAJOR)** **gyp**: update gyp to v0.7.0 (#2284) (Jiawen Geng) [#2284](https://github.com/nodejs/node-gyp/pull/2284)
-* [[`1bd18f3e77`](https://github.com/nodejs/node-gyp/commit/1bd18f3e77)] - **(SEMVER-MAJOR)** **lib**: drop Python 2 support in find-python.js (#2333) (DeeDeeG) [#2333](https://github.com/nodejs/node-gyp/pull/2333)
-* [[`e81602ef55`](https://github.com/nodejs/node-gyp/commit/e81602ef55)] - **(SEMVER-MAJOR)** **lib**: migrate requests to fetch (#2220) (Matias Lopez) [#2220](https://github.com/nodejs/node-gyp/pull/2220)
-* [[`392b7760b4`](https://github.com/nodejs/node-gyp/commit/392b7760b4)] - **lib**: avoid changing process.config (#2322) (Michaël Zasso) [#2322](https://github.com/nodejs/node-gyp/pull/2322)
-
-## v7.1.2 2020-10-17
-
-* [[`096e3aded5`](https://github.com/nodejs/node-gyp/commit/096e3aded5)] - **gyp**: update gyp to 0.6.2 (Myles Borins) [#2241](https://github.com/nodejs/node-gyp/pull/2241)
-* [[`54f97cd243`](https://github.com/nodejs/node-gyp/commit/54f97cd243)] - **doc**: add cmd to reset `xcode-select` to initial state (Valera Rozuvan) [#2235](https://github.com/nodejs/node-gyp/pull/2235)
-
-## v7.1.1 2020-10-15
-
-This release restores the location of shared library builds to the pre-v7
-location. In v7.0.0 until this release, shared library outputs were placed
-in a lib.target subdirectory inside the build/{Release,Debug} directory for
-builds using `make` (Linux, etc.). This is inconsistent with macOS (Xcode)
-behavior and previous node-gyp behavior so has been reverted.
-We consider this a bug-fix rather than semver-major change.
-
-* [[`18bf2d1d38`](https://github.com/nodejs/node-gyp/commit/18bf2d1d38)] - **deps**: update deps to match npm@7 (Rod Vagg) [#2240](https://github.com/nodejs/node-gyp/pull/2240)
-* [[`ee6a837cb7`](https://github.com/nodejs/node-gyp/commit/ee6a837cb7)] - **gyp**: update gyp to 0.6.1 (Rod Vagg) [#2238](https://github.com/nodejs/node-gyp/pull/2238)
-* [[`3e7f8ccafc`](https://github.com/nodejs/node-gyp/commit/3e7f8ccafc)] - **lib**: better log message when ps fails (Martin Midtgaard) [#2229](https://github.com/nodejs/node-gyp/pull/2229)
-* [[`7fb314339f`](https://github.com/nodejs/node-gyp/commit/7fb314339f)] - **test**: GitHub Actions: Test on Python 3.9 (Christian Clauss) [#2230](https://github.com/nodejs/node-gyp/pull/2230)
-* [[`754996b9ec`](https://github.com/nodejs/node-gyp/commit/754996b9ec)] - **doc**: replace status badges with new Actions badge (Rod Vagg) [#2218](https://github.com/nodejs/node-gyp/pull/2218)
-* [[`2317dc400c`](https://github.com/nodejs/node-gyp/commit/2317dc400c)] - **ci**: switch to GitHub Actions (Shelley Vohr) [#2210](https://github.com/nodejs/node-gyp/pull/2210)
-* [[`2cca9b74f7`](https://github.com/nodejs/node-gyp/commit/2cca9b74f7)] - **doc**: drop the --production flag for installing windows-build-tools (DeeDeeG) [#2206](https://github.com/nodejs/node-gyp/pull/2206)
-
-## v7.1.0 2020-08-12
-
-* [[`aaf33c3029`](https://github.com/nodejs/node-gyp/commit/aaf33c3029)] - **build**: add update-gyp script (Samuel Attard) [#2167](https://github.com/nodejs/node-gyp/pull/2167)
-* * [[`3baa4e4172`](https://github.com/nodejs/node-gyp/commit/3baa4e4172)] - **(SEMVER-MINOR)** **gyp**: update gyp to 0.4.0 (Samuel Attard) [#2165](https://github.com/nodejs/node-gyp/pull/2165)
-* * [[`f461d56c53`](https://github.com/nodejs/node-gyp/commit/f461d56c53)] - **(SEMVER-MINOR)** **build**: support apple silicon (arm64 darwin) builds (Samuel Attard) [#2165](https://github.com/nodejs/node-gyp/pull/2165)
-* * [[`ee6fa7d3bc`](https://github.com/nodejs/node-gyp/commit/ee6fa7d3bc)] - **docs**: note that node-gyp@7 should solve Catalina CLT issues (Rod Vagg) [#2156](https://github.com/nodejs/node-gyp/pull/2156)
-* * [[`4fc8ff179d`](https://github.com/nodejs/node-gyp/commit/4fc8ff179d)] - **doc**: silence curl for macOS Catalina acid test (Chia Wei Ong) [#2150](https://github.com/nodejs/node-gyp/pull/2150)
-* * [[`7857cb2eb1`](https://github.com/nodejs/node-gyp/commit/7857cb2eb1)] - **deps**: increase "engines" to "node" : "\>= 10.12.0" (DeeDeeG) [#2153](https://github.com/nodejs/node-gyp/pull/2153)
-
-## v7.0.0 2020-06-03
-
-* [[`e18a61afc1`](https://github.com/nodejs/node-gyp/commit/e18a61afc1)] - **build**: shrink bloated addon binaries on windows (Shelley Vohr) [#2060](https://github.com/nodejs/node-gyp/pull/2060)
-* [[`4937722cf5`](https://github.com/nodejs/node-gyp/commit/4937722cf5)] - **(SEMVER-MAJOR)** **deps**: replace mkdirp with {recursive} mkdir (Rod Vagg) [#2123](https://github.com/nodejs/node-gyp/pull/2123)
-* [[`d45438a047`](https://github.com/nodejs/node-gyp/commit/d45438a047)] - **(SEMVER-MAJOR)** **deps**: update deps, match to npm@7 (Rod Vagg) [#2126](https://github.com/nodejs/node-gyp/pull/2126)
-* [[`ba4f34b7d6`](https://github.com/nodejs/node-gyp/commit/ba4f34b7d6)] - **doc**: update catalina xcode clt download link (Dario Vladovic) [#2133](https://github.com/nodejs/node-gyp/pull/2133)
-* [[`f7bfce96ed`](https://github.com/nodejs/node-gyp/commit/f7bfce96ed)] - **doc**: update acid test and introduce curl|bash test script (Dario Vladovic) [#2105](https://github.com/nodejs/node-gyp/pull/2105)
-* [[`e529f3309d`](https://github.com/nodejs/node-gyp/commit/e529f3309d)] - **doc**: update README to reflect upgrade to gyp-next (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092)
-* [[`9aed6286a3`](https://github.com/nodejs/node-gyp/commit/9aed6286a3)] - **doc**: give more attention to Catalina issues doc (Matheus Marchini) [#2134](https://github.com/nodejs/node-gyp/pull/2134)
-* [[`963f2a7b48`](https://github.com/nodejs/node-gyp/commit/963f2a7b48)] - **doc**: improve Catalina discoverability for search engines (Matheus Marchini) [#2135](https://github.com/nodejs/node-gyp/pull/2135)
-* [[`7b75af349b`](https://github.com/nodejs/node-gyp/commit/7b75af349b)] - **doc**: add macOS Catalina software update info (Karl Horky) [#2078](https://github.com/nodejs/node-gyp/pull/2078)
-* [[`4f23c7bee2`](https://github.com/nodejs/node-gyp/commit/4f23c7bee2)] - **doc**: update link to the code of conduct (#2073) (Michaël Zasso) [#2073](https://github.com/nodejs/node-gyp/pull/2073)
-* [[`473cfa283f`](https://github.com/nodejs/node-gyp/commit/473cfa283f)] - **doc**: note in README that Python 3.8 is supported (#2072) (Michaël Zasso) [#2072](https://github.com/nodejs/node-gyp/pull/2072)
-* [[`e7402b4a7c`](https://github.com/nodejs/node-gyp/commit/e7402b4a7c)] - **doc**: update catalina xcode cli tools download link (#2044) (Dario Vladović) [#2044](https://github.com/nodejs/node-gyp/pull/2044)
-* [[`35de45984f`](https://github.com/nodejs/node-gyp/commit/35de45984f)] - **doc**: update catalina xcode cli tools download link; formatting (Jonathan Hult) [#2034](https://github.com/nodejs/node-gyp/pull/2034)
-* [[`48642191f5`](https://github.com/nodejs/node-gyp/commit/48642191f5)] - **doc**: add download link for Command Line Tools for Xcode (Przemysław Bitkowski) [#2029](https://github.com/nodejs/node-gyp/pull/2029)
-* [[`ae5b150051`](https://github.com/nodejs/node-gyp/commit/ae5b150051)] - **doc**: Catalina suggestion: remove /Library/Developer/CommandLineTools (Christian Clauss) [#2022](https://github.com/nodejs/node-gyp/pull/2022)
-* [[`d1dea13fe4`](https://github.com/nodejs/node-gyp/commit/d1dea13fe4)] - **doc**: fix changelog 6.1.0 release year to be 2020 (Quentin Vernot) [#2021](https://github.com/nodejs/node-gyp/pull/2021)
-* [[`6356117b08`](https://github.com/nodejs/node-gyp/commit/6356117b08)] - **doc, bin**: stop suggesting opening  node-gyp issues (Bartosz Sosnowski) [#2096](https://github.com/nodejs/node-gyp/pull/2096)
-* [[`a6b76a8b48`](https://github.com/nodejs/node-gyp/commit/a6b76a8b48)] - **gyp**: update gyp to 0.2.1 (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092)
-* [[`ebc34ec823`](https://github.com/nodejs/node-gyp/commit/ebc34ec823)] - **gyp**: update gyp to 0.2.0 (Ujjwal Sharma) [#2092](https://github.com/nodejs/node-gyp/pull/2092)
-* [[`972780bde7`](https://github.com/nodejs/node-gyp/commit/972780bde7)] - **(SEMVER-MAJOR)** **gyp**: sync code base with nodejs repo (#1975) (Michaël Zasso) [#1975](https://github.com/nodejs/node-gyp/pull/1975)
-* [[`c255ffbf6a`](https://github.com/nodejs/node-gyp/commit/c255ffbf6a)] - **lib**: drop "-2" flag for "py.exe" launcher (DeeDeeG) [#2131](https://github.com/nodejs/node-gyp/pull/2131)
-* [[`1f7e1e93b5`](https://github.com/nodejs/node-gyp/commit/1f7e1e93b5)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018)
-* [[`741ab096d5`](https://github.com/nodejs/node-gyp/commit/741ab096d5)] - **test**: remove support for EOL versions of Node.js (Shelley Vohr)
-* [[`ca86ef2539`](https://github.com/nodejs/node-gyp/commit/ca86ef2539)] - **test**: bump actions/checkout from v1 to v2 (BSKY) [#2063](https://github.com/nodejs/node-gyp/pull/2063)
-
-## v6.1.0 2020-01-08
-
-* [[`9a7dd16b76`](https://github.com/nodejs/node-gyp/commit/9a7dd16b76)] - **doc**: remove backticks from Python version list (Rod Vagg) [#2011](https://github.com/nodejs/node-gyp/pull/2011)
-* [[`26cd6eaea6`](https://github.com/nodejs/node-gyp/commit/26cd6eaea6)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
-* [[`312c12ef4f`](https://github.com/nodejs/node-gyp/commit/312c12ef4f)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
-* [[`f7b6b6b77b`](https://github.com/nodejs/node-gyp/commit/f7b6b6b77b)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-* [[`6b8f2652dd`](https://github.com/nodejs/node-gyp/commit/6b8f2652dd)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
-* [[`20aa0b44f7`](https://github.com/nodejs/node-gyp/commit/20aa0b44f7)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962)
-* [[`14f2a07a39`](https://github.com/nodejs/node-gyp/commit/14f2a07a39)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
-* [[`f242ce4d2c`](https://github.com/nodejs/node-gyp/commit/f242ce4d2c)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
-* [[`3bcba2a01a`](https://github.com/nodejs/node-gyp/commit/3bcba2a01a)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
-* [[`470cc2178e`](https://github.com/nodejs/node-gyp/commit/470cc2178e)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
-* [[`31ecc8421d`](https://github.com/nodejs/node-gyp/commit/31ecc8421d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
-* [[`5a729e86ee`](https://github.com/nodejs/node-gyp/commit/5a729e86ee)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
-* [[`345c70e56d`](https://github.com/nodejs/node-gyp/commit/345c70e56d)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`d6a7e0e1fb`](https://github.com/nodejs/node-gyp/commit/d6a7e0e1fb)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`5a64e9bd32`](https://github.com/nodejs/node-gyp/commit/5a64e9bd32)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-* [[`04da736d38`](https://github.com/nodejs/node-gyp/commit/04da736d38)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961)
-* [[`0670e5189d`](https://github.com/nodejs/node-gyp/commit/0670e5189d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`c506a6a150`](https://github.com/nodejs/node-gyp/commit/c506a6a150)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-
-## v6.0.1 2019-11-01
-
-* [[`8ec2e681d5`](https://github.com/nodejs/node-gyp/commit/8ec2e681d5)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940)
-* [[`1b11be63cc`](https://github.com/nodejs/node-gyp/commit/1b11be63cc)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925)
-* [[`c0282daa48`](https://github.com/nodejs/node-gyp/commit/c0282daa48)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947)
-* [[`d8e09a1b6a`](https://github.com/nodejs/node-gyp/commit/d8e09a1b6a)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944)
-* [[`9c0f3404f0`](https://github.com/nodejs/node-gyp/commit/9c0f3404f0)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939)
-* [[`bb2eb72a3f`](https://github.com/nodejs/node-gyp/commit/bb2eb72a3f)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937)
-* [[`f0693413d9`](https://github.com/nodejs/node-gyp/commit/f0693413d9)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934)
-* [[`c60c22de58`](https://github.com/nodejs/node-gyp/commit/c60c22de58)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920)
-* [[`b91718eefc`](https://github.com/nodejs/node-gyp/commit/b91718eefc)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923)
-* [[`3538a317b6`](https://github.com/nodejs/node-gyp/commit/3538a317b6)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919)
-* [[`4fff8458c0`](https://github.com/nodejs/node-gyp/commit/4fff8458c0)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`60e4488f08`](https://github.com/nodejs/node-gyp/commit/60e4488f08)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`032db2a2d0`](https://github.com/nodejs/node-gyp/commit/032db2a2d0)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926)
-* [[`5a83630c33`](https://github.com/nodejs/node-gyp/commit/5a83630c33)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921)
-
-## v6.0.0 2019-10-04
-
-* [[`dd0e97ef0b`](https://github.com/nodejs/node-gyp/commit/dd0e97ef0b)] - **(SEMVER-MAJOR)** **lib**: try to find `python` after `python3` (Sam Roberts) [#1907](https://github.com/nodejs/node-gyp/pull/1907)
-* [[`f60ed47d14`](https://github.com/nodejs/node-gyp/commit/f60ed47d14)] - **travis**: add Python 3.5 and 3.6 tests on Linux (Christian Clauss) [#1903](https://github.com/nodejs/node-gyp/pull/1903)
-* [[`c763ca1838`](https://github.com/nodejs/node-gyp/commit/c763ca1838)] - **(SEMVER-MAJOR)** **doc**: Declare that node-gyp is Python 3 compatible (cclauss) [#1811](https://github.com/nodejs/node-gyp/pull/1811)
-* [[`3d1c60ab81`](https://github.com/nodejs/node-gyp/commit/3d1c60ab81)] - **(SEMVER-MAJOR)** **lib**: accept Python 3 by default (João Reis) [#1844](https://github.com/nodejs/node-gyp/pull/1844)
-* [[`c6e3b65a23`](https://github.com/nodejs/node-gyp/commit/c6e3b65a23)] - **(SEMVER-MAJOR)** **lib**: raise the minimum Python version from 2.6 to 2.7 (cclauss) [#1818](https://github.com/nodejs/node-gyp/pull/1818)
-
-## v5.1.1 2020-05-25
-
-* [[`bdd3a79abe`](https://github.com/nodejs/node-gyp/commit/bdd3a79abe)] - **build**: shrink bloated addon binaries on windows (Shelley Vohr) [#2060](https://github.com/nodejs/node-gyp/pull/2060)
-* [[`1f2ba75bc0`](https://github.com/nodejs/node-gyp/commit/1f2ba75bc0)] - **doc**: add macOS Catalina software update info (Karl Horky) [#2078](https://github.com/nodejs/node-gyp/pull/2078)
-* [[`c106d915f5`](https://github.com/nodejs/node-gyp/commit/c106d915f5)] - **doc**: update catalina xcode cli tools download link (#2044) (Dario Vladović) [#2044](https://github.com/nodejs/node-gyp/pull/2044)
-* [[`9a6fea92e2`](https://github.com/nodejs/node-gyp/commit/9a6fea92e2)] - **doc**: update catalina xcode cli tools download link; formatting (Jonathan Hult) [#2034](https://github.com/nodejs/node-gyp/pull/2034)
-* [[`59b0b1add8`](https://github.com/nodejs/node-gyp/commit/59b0b1add8)] - **doc**: add download link for Command Line Tools for Xcode (Przemysław Bitkowski) [#2029](https://github.com/nodejs/node-gyp/pull/2029)
-* [[`bb8d0e7b10`](https://github.com/nodejs/node-gyp/commit/bb8d0e7b10)] - **doc**: Catalina suggestion: remove /Library/Developer/CommandLineTools (Christian Clauss) [#2022](https://github.com/nodejs/node-gyp/pull/2022)
-* [[`fb2e80d4e3`](https://github.com/nodejs/node-gyp/commit/fb2e80d4e3)] - **doc**: update link to the code of conduct (#2073) (Michaël Zasso) [#2073](https://github.com/nodejs/node-gyp/pull/2073)
-* [[`251d9c885c`](https://github.com/nodejs/node-gyp/commit/251d9c885c)] - **doc**: note in README that Python 3.8 is supported (#2072) (Michaël Zasso) [#2072](https://github.com/nodejs/node-gyp/pull/2072)
-* [[`2b6fc3c8d6`](https://github.com/nodejs/node-gyp/commit/2b6fc3c8d6)] - **doc, bin**: stop suggesting opening  node-gyp issues (Bartosz Sosnowski) [#2096](https://github.com/nodejs/node-gyp/pull/2096)
-* [[`a876ae58ad`](https://github.com/nodejs/node-gyp/commit/a876ae58ad)] - **test**: bump actions/checkout from v1 to v2 (BSKY) [#2063](https://github.com/nodejs/node-gyp/pull/2063)
-
-## v5.1.0 2020-02-05
-
-* [[`f37a8b40d0`](https://github.com/nodejs/node-gyp/commit/f37a8b40d0)] - **doc**: add GitHub Actions badge (#1994) (Rod Vagg) [#1994](https://github.com/nodejs/node-gyp/pull/1994)
-* [[`cb3f6aae5e`](https://github.com/nodejs/node-gyp/commit/cb3f6aae5e)] - **doc**: update macOS\_Catalina.md (#1992) (James Home) [#1992](https://github.com/nodejs/node-gyp/pull/1992)
-* [[`0607596a4c`](https://github.com/nodejs/node-gyp/commit/0607596a4c)] - **doc**: fix typo in README.md (#1985) (Suraneti Rodsuwan) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-* [[`0d5a415a14`](https://github.com/nodejs/node-gyp/commit/0d5a415a14)] - **doc**: add travis badge (Rod Vagg) [#1971](https://github.com/nodejs/node-gyp/pull/1971)
-* [[`103740cd95`](https://github.com/nodejs/node-gyp/commit/103740cd95)] - **gyp**: list(dict) so we can del dict(key) while iterating (Christian Clauss) [#2009](https://github.com/nodejs/node-gyp/pull/2009)
-* [[`278dcddbdd`](https://github.com/nodejs/node-gyp/commit/278dcddbdd)] - **lib**: ignore VS instances that cause COMExceptions (Andrew Casey) [#2018](https://github.com/nodejs/node-gyp/pull/2018)
-* [[`1694907bbf`](https://github.com/nodejs/node-gyp/commit/1694907bbf)] - **lib**: compatibility with semver ≥ 7 (`new` for semver.Range) (Xavier Guimard) [#2006](https://github.com/nodejs/node-gyp/pull/2006)
-* [[`a3f1143514`](https://github.com/nodejs/node-gyp/commit/a3f1143514)] - **(SEMVER-MINOR)** **lib**: noproxy support, match proxy detection to `request` (Matias Lopez) [#1978](https://github.com/nodejs/node-gyp/pull/1978)
-* [[`52365819c7`](https://github.com/nodejs/node-gyp/commit/52365819c7)] - **test**: remove old docker test harness (#1993) (Rod Vagg) [#1993](https://github.com/nodejs/node-gyp/pull/1993)
-* [[`bc509c511d`](https://github.com/nodejs/node-gyp/commit/bc509c511d)] - **test**: add Windows to GitHub Actions testing (#1996) (Christian Clauss) [#1996](https://github.com/nodejs/node-gyp/pull/1996)
-* [[`91ee26dd48`](https://github.com/nodejs/node-gyp/commit/91ee26dd48)] - **test**: fix typo in header download test (#2001) (Richard Lau) [#2001](https://github.com/nodejs/node-gyp/pull/2001)
-* [[`0923f344c9`](https://github.com/nodejs/node-gyp/commit/0923f344c9)] - **test**: direct python invocation & simpler pyenv (Matias Lopez) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`32c8744b34`](https://github.com/nodejs/node-gyp/commit/32c8744b34)] - **test**: fix macOS Travis on Python 2.7 & 3.7 (Christian Clauss) [#1979](https://github.com/nodejs/node-gyp/pull/1979)
-* [[`fd4b1351e4`](https://github.com/nodejs/node-gyp/commit/fd4b1351e4)] - **test**: initial Github Actions with Ubuntu & macOS (Christian Clauss) [#1985](https://github.com/nodejs/node-gyp/pull/1985)
-
-## v5.0.7 2019-12-16
-
-Republish of v5.0.6 with unnecessary tarball removed from pack file.
-
-## v5.0.6 2019-12-16
-
-* [[`cdec00286f`](https://github.com/nodejs/node-gyp/commit/cdec00286f)] - **doc**: adjustments to the README.md for new users (Dan Pike) [#1919](https://github.com/nodejs/node-gyp/pull/1919)
-* [[`b7c8233ef2`](https://github.com/nodejs/node-gyp/commit/b7c8233ef2)] - **test**: fix Python unittests (cclauss) [#1961](https://github.com/nodejs/node-gyp/pull/1961)
-* [[`e12b00ab0a`](https://github.com/nodejs/node-gyp/commit/e12b00ab0a)] - **doc**: macOS Catalina add two commands (Christian Clauss) [#1962](https://github.com/nodejs/node-gyp/pull/1962)
-* [[`70b9890c0d`](https://github.com/nodejs/node-gyp/commit/70b9890c0d)] - **test**: add header download test (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`4029fa8629`](https://github.com/nodejs/node-gyp/commit/4029fa8629)] - **test**: configure proper devDir for invoking configure() (Rod Vagg) [#1796](https://github.com/nodejs/node-gyp/pull/1796)
-* [[`fe8b02cc8b`](https://github.com/nodejs/node-gyp/commit/fe8b02cc8b)] - **doc**: add macOS\_Catalina.md document (cclauss) [#1940](https://github.com/nodejs/node-gyp/pull/1940)
-* [[`8ea47ce365`](https://github.com/nodejs/node-gyp/commit/8ea47ce365)] - **gyp**: python3 fixes: utf8 decode, use of 'None' in eval (Wilfried Goesgens) [#1925](https://github.com/nodejs/node-gyp/pull/1925)
-* [[`c7229716ba`](https://github.com/nodejs/node-gyp/commit/c7229716ba)] - **gyp**: iteritems() -\> items() in compile\_commands\_json.py (cclauss) [#1947](https://github.com/nodejs/node-gyp/pull/1947)
-* [[`2a18b2a0f8`](https://github.com/nodejs/node-gyp/commit/2a18b2a0f8)] - **gyp**: make cmake python3 compatible (gengjiawen) [#1944](https://github.com/nodejs/node-gyp/pull/1944)
-* [[`70f391e844`](https://github.com/nodejs/node-gyp/commit/70f391e844)] - **gyp**: fix TypeError in XcodeVersion() (Christian Clauss) [#1939](https://github.com/nodejs/node-gyp/pull/1939)
-* [[`9f4f0fa34e`](https://github.com/nodejs/node-gyp/commit/9f4f0fa34e)] - **gyp**: finish decode stdout on Python 3 (Christian Clauss) [#1937](https://github.com/nodejs/node-gyp/pull/1937)
-* [[`7cf507906d`](https://github.com/nodejs/node-gyp/commit/7cf507906d)] - **src,win**: allow 403 errors for arm64 node.lib (Richard Lau) [#1934](https://github.com/nodejs/node-gyp/pull/1934)
-* [[`ad0d182c01`](https://github.com/nodejs/node-gyp/commit/ad0d182c01)] - **deps**: update deps to roughly match current npm@6 (Rod Vagg) [#1920](https://github.com/nodejs/node-gyp/pull/1920)
-* [[`1553081ed6`](https://github.com/nodejs/node-gyp/commit/1553081ed6)] - **test**: upgrade Linux Travis CI to Python 3.8 (Christian Clauss) [#1923](https://github.com/nodejs/node-gyp/pull/1923)
-* [[`0705cae9aa`](https://github.com/nodejs/node-gyp/commit/0705cae9aa)] - **travis**: ignore failed `brew upgrade npm`, update xcode (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`7bfdb6f5bf`](https://github.com/nodejs/node-gyp/commit/7bfdb6f5bf)] - **build**: avoid bare exceptions in xcode\_emulation.py (Christian Clauss) [#1932](https://github.com/nodejs/node-gyp/pull/1932)
-* [[`7edf7658fa`](https://github.com/nodejs/node-gyp/commit/7edf7658fa)] - **lib,install**: always download SHA sums on Windows (Sam Hughes) [#1926](https://github.com/nodejs/node-gyp/pull/1926)
-* [[`69056d04fe`](https://github.com/nodejs/node-gyp/commit/69056d04fe)] - **travis**: add Windows + Python 3.8 to the mix (Rod Vagg) [#1921](https://github.com/nodejs/node-gyp/pull/1921)
-
-## v5.0.5 2019-10-04
-
-* [[`3891391746`](https://github.com/nodejs/node-gyp/commit/3891391746)] - **doc**: reconcile README with Python 3 compat changes (Rod Vagg) [#1911](https://github.com/nodejs/node-gyp/pull/1911)
-* [[`07f81f1920`](https://github.com/nodejs/node-gyp/commit/07f81f1920)] - **lib**: accept Python 3 after Python 2 (Sam Roberts) [#1910](https://github.com/nodejs/node-gyp/pull/1910)
-* [[`04ce59f4a2`](https://github.com/nodejs/node-gyp/commit/04ce59f4a2)] - **doc**: clarify Python configuration, etc (Sam Roberts) [#1908](https://github.com/nodejs/node-gyp/pull/1908)
-* [[`01c46ee3df`](https://github.com/nodejs/node-gyp/commit/01c46ee3df)] - **gyp**: add \_\_lt\_\_ to MSVSSolutionEntry (João Reis) [#1904](https://github.com/nodejs/node-gyp/pull/1904)
-* [[`735d961b99`](https://github.com/nodejs/node-gyp/commit/735d961b99)] - **win**: support VS 2017 Desktop Express (João Reis) [#1902](https://github.com/nodejs/node-gyp/pull/1902)
-* [[`3834156a92`](https://github.com/nodejs/node-gyp/commit/3834156a92)] - **test**: add Python 3.5 and 3.6 tests on Linux (cclauss) [#1909](https://github.com/nodejs/node-gyp/pull/1909)
-* [[`1196e990d8`](https://github.com/nodejs/node-gyp/commit/1196e990d8)] - **src**: update to standard@14 (Rod Vagg) [#1899](https://github.com/nodejs/node-gyp/pull/1899)
-* [[`53ee7dfe89`](https://github.com/nodejs/node-gyp/commit/53ee7dfe89)] - **gyp**: fix undefined name: cflags --\> ldflags (Christian Clauss) [#1901](https://github.com/nodejs/node-gyp/pull/1901)
-* [[`5871dcf6c9`](https://github.com/nodejs/node-gyp/commit/5871dcf6c9)] - **src,win**: add support for fetching arm64 node.lib (Richard Townsend) [#1875](https://github.com/nodejs/node-gyp/pull/1875)
-
-## v5.0.4 2019-09-27
-
-* [[`1236869ffc`](https://github.com/nodejs/node-gyp/commit/1236869ffc)] - **gyp**: modify XcodeVersion() to convert "4.2" to "0420" and "10.0" to "1000" (Christian Clauss) [#1895](https://github.com/nodejs/node-gyp/pull/1895)
-* [[`36638afe48`](https://github.com/nodejs/node-gyp/commit/36638afe48)] - **gyp**: more decode stdout on Python 3 (cclauss) [#1894](https://github.com/nodejs/node-gyp/pull/1894)
-* [[`f753c167c5`](https://github.com/nodejs/node-gyp/commit/f753c167c5)] - **gyp**: decode stdout on Python 3 (cclauss) [#1890](https://github.com/nodejs/node-gyp/pull/1890)
-* [[`60a4083523`](https://github.com/nodejs/node-gyp/commit/60a4083523)] - **doc**: update xcode install instructions to match Node's BUILDING (Nhan Khong) [#1884](https://github.com/nodejs/node-gyp/pull/1884)
-* [[`19dbc9ac32`](https://github.com/nodejs/node-gyp/commit/19dbc9ac32)] - **deps**: update tar to 4.4.12 (Matheus Marchini) [#1889](https://github.com/nodejs/node-gyp/pull/1889)
-* [[`5f3ed92181`](https://github.com/nodejs/node-gyp/commit/5f3ed92181)] - **bin**: fix the usage instructions (Halit Ogunc) [#1888](https://github.com/nodejs/node-gyp/pull/1888)
-* [[`aab118edf1`](https://github.com/nodejs/node-gyp/commit/aab118edf1)] - **lib**: adding keep-alive header to download requests (Milad Farazmand) [#1863](https://github.com/nodejs/node-gyp/pull/1863)
-* [[`1186e89326`](https://github.com/nodejs/node-gyp/commit/1186e89326)] - **lib**: ignore non-critical os.userInfo() failures (Rod Vagg) [#1835](https://github.com/nodejs/node-gyp/pull/1835)
-* [[`785e527c3d`](https://github.com/nodejs/node-gyp/commit/785e527c3d)] - **doc**: fix missing argument for setting python path (lagorsse) [#1802](https://github.com/nodejs/node-gyp/pull/1802)
-* [[`a97615196c`](https://github.com/nodejs/node-gyp/commit/a97615196c)] - **gyp**: rm semicolons (Python != JavaScript) (MattIPv4) [#1858](https://github.com/nodejs/node-gyp/pull/1858)
-* [[`06019bac24`](https://github.com/nodejs/node-gyp/commit/06019bac24)] - **gyp**: assorted typo fixes (XhmikosR) [#1853](https://github.com/nodejs/node-gyp/pull/1853)
-* [[`3f4972c1ca`](https://github.com/nodejs/node-gyp/commit/3f4972c1ca)] - **gyp**: use "is" when comparing to None (Vladyslav Burzakovskyy) [#1860](https://github.com/nodejs/node-gyp/pull/1860)
-* [[`1cb4708073`](https://github.com/nodejs/node-gyp/commit/1cb4708073)] - **src,win**: improve unmanaged handling (Peter Sabath) [#1852](https://github.com/nodejs/node-gyp/pull/1852)
-* [[`5553cd910e`](https://github.com/nodejs/node-gyp/commit/5553cd910e)] - **gyp**: improve Windows+Cygwin compatibility (Jose Quijada) [#1817](https://github.com/nodejs/node-gyp/pull/1817)
-* [[`8bcb1fbb43`](https://github.com/nodejs/node-gyp/commit/8bcb1fbb43)] - **gyp**: Python 3 Windows fixes (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`2e24d0a326`](https://github.com/nodejs/node-gyp/commit/2e24d0a326)] - **test**: accept Python 3 in test-find-python.js (João Reis) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`1267b4dc1c`](https://github.com/nodejs/node-gyp/commit/1267b4dc1c)] - **build**: add test run Python 3.7 on macOS (Christian Clauss) [#1843](https://github.com/nodejs/node-gyp/pull/1843)
-* [[`da1b031aa3`](https://github.com/nodejs/node-gyp/commit/da1b031aa3)] - **build**: import StringIO on Python 2 and Python 3 (Christian Clauss) [#1836](https://github.com/nodejs/node-gyp/pull/1836)
-* [[`fa0ed4aa42`](https://github.com/nodejs/node-gyp/commit/fa0ed4aa42)] - **build**: more Python 3 compat, replace compile with ast (cclauss) [#1820](https://github.com/nodejs/node-gyp/pull/1820)
-* [[`18d5c7c9d0`](https://github.com/nodejs/node-gyp/commit/18d5c7c9d0)] - **win,src**: update win\_delay\_load\_hook.cc to work with /clr (Ivan Petrovic) [#1819](https://github.com/nodejs/node-gyp/pull/1819)
-
-## v5.0.3 2019-07-17
-
-* [[`66ad305775`](https://github.com/nodejs/node-gyp/commit/66ad305775)] - **python**: accept Python 3 conditionally (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815)
-* [[`7e7fce3fed`](https://github.com/nodejs/node-gyp/commit/7e7fce3fed)] - **python**: move Python detection to its own file (João Reis) [#1815](https://github.com/nodejs/node-gyp/pull/1815)
-* [[`e40c99e283`](https://github.com/nodejs/node-gyp/commit/e40c99e283)] - **src**: implement standard.js linting (Rod Vagg) [#1794](https://github.com/nodejs/node-gyp/pull/1794)
-* [[`bb92c761a9`](https://github.com/nodejs/node-gyp/commit/bb92c761a9)] - **test**: add Node.js 6 on Windows to Travis CI (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812)
-* [[`7fd924079f`](https://github.com/nodejs/node-gyp/commit/7fd924079f)] - **test**: increase tap timeout (João Reis) [#1812](https://github.com/nodejs/node-gyp/pull/1812)
-* [[`7e8127068f`](https://github.com/nodejs/node-gyp/commit/7e8127068f)] - **test**: cover supported node versions with travis (Rod Vagg) [#1809](https://github.com/nodejs/node-gyp/pull/1809)
-* [[`24109148df`](https://github.com/nodejs/node-gyp/commit/24109148df)] - **test**: downgrade to tap@^12 for continued Node 6 support (Rod Vagg) [#1808](https://github.com/nodejs/node-gyp/pull/1808)
-* [[`656117cc4a`](https://github.com/nodejs/node-gyp/commit/656117cc4a)] - **win**: make VS path match case-insensitive (João Reis) [#1806](https://github.com/nodejs/node-gyp/pull/1806)
-
-## v5.0.2 2019-06-27
-
-* [[`2761afbf73`](https://github.com/nodejs/node-gyp/commit/2761afbf73)] - **build,test**: add duplicate symbol test (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689)
-* [[`82f129d6de`](https://github.com/nodejs/node-gyp/commit/82f129d6de)] - **gyp**: replace optparse to argparse (KiYugadgeter) [#1591](https://github.com/nodejs/node-gyp/pull/1591)
-* [[`afaaa29c61`](https://github.com/nodejs/node-gyp/commit/afaaa29c61)] - **gyp**: remove from \_\_future\_\_ import with\_statement (cclauss) [#1799](https://github.com/nodejs/node-gyp/pull/1799)
-* [[`a991f633d6`](https://github.com/nodejs/node-gyp/commit/a991f633d6)] - **gyp**: fix the remaining Python 3 issues (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793)
-* [[`f952b08f84`](https://github.com/nodejs/node-gyp/commit/f952b08f84)] - **gyp**: move from \_\_future\_\_ import to the top of the file (cclauss) [#1789](https://github.com/nodejs/node-gyp/pull/1789)
-* [[`4f4a677dfa`](https://github.com/nodejs/node-gyp/commit/4f4a677dfa)] - **gyp**: use different default compiler for z/OS (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768)
-* [[`03683f09d6`](https://github.com/nodejs/node-gyp/commit/03683f09d6)] - **lib**: code de-duplication (Pavel Medvedev) [#965](https://github.com/nodejs/node-gyp/pull/965)
-* [[`611bc3c89f`](https://github.com/nodejs/node-gyp/commit/611bc3c89f)] - **lib**: add .json suffix for explicit require (Rod Vagg) [#1787](https://github.com/nodejs/node-gyp/pull/1787)
-* [[`d3478d7b0b`](https://github.com/nodejs/node-gyp/commit/d3478d7b0b)] - **meta**: add to .gitignore (Refael Ackermann) [#1573](https://github.com/nodejs/node-gyp/pull/1573)
-* [[`7a9a038e9e`](https://github.com/nodejs/node-gyp/commit/7a9a038e9e)] - **test**: add parallel test runs on macOS and Windows (cclauss) [#1800](https://github.com/nodejs/node-gyp/pull/1800)
-* [[`7dd7f2b2a2`](https://github.com/nodejs/node-gyp/commit/7dd7f2b2a2)] - **test**: fix Python syntax error in test-adding.js (cclauss) [#1793](https://github.com/nodejs/node-gyp/pull/1793)
-* [[`395f843de0`](https://github.com/nodejs/node-gyp/commit/395f843de0)] - **test**: replace self-signed cert with 'localhost' (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795)
-* [[`a52c6eb9e8`](https://github.com/nodejs/node-gyp/commit/a52c6eb9e8)] - **test**: migrate from tape to tap (Rod Vagg) [#1795](https://github.com/nodejs/node-gyp/pull/1795)
-* [[`ec2eb44a30`](https://github.com/nodejs/node-gyp/commit/ec2eb44a30)] - **test**: use Nan in duplicate\_symbols (Gabriel Schulhof) [#1689](https://github.com/nodejs/node-gyp/pull/1689)
-* [[`1597c84aad`](https://github.com/nodejs/node-gyp/commit/1597c84aad)] - **test**: use Travis CI to run tests on every pull request (cclauss) [#1752](https://github.com/nodejs/node-gyp/pull/1752)
-* [[`dd9bf929ac`](https://github.com/nodejs/node-gyp/commit/dd9bf929ac)] - **zos**: update compiler options (Shuowang (Wayne) Zhang) [#1768](https://github.com/nodejs/node-gyp/pull/1768)
-
-## v5.0.1 2019-06-20
-
-* [[`e3861722ed`](https://github.com/nodejs/node-gyp/commit/e3861722ed)] - **doc**: document --jobs max (David Sanders) [#1770](https://github.com/nodejs/node-gyp/pull/1770)
-* [[`1cfdb28886`](https://github.com/nodejs/node-gyp/commit/1cfdb28886)] - **lib**: reintroduce support for iojs file naming for releases \>= 1 && \< 4 (Samuel Attard) [#1777](https://github.com/nodejs/node-gyp/pull/1777)
-
-## v5.0.0 2019-06-13
-
-* [[`8a83972743`](https://github.com/nodejs/node-gyp/commit/8a83972743)] - **(SEMVER-MAJOR)** **bin**: follow XDG OS conventions for storing data (Selwyn) [#1570](https://github.com/nodejs/node-gyp/pull/1570)
-* [[`9e46872ea3`](https://github.com/nodejs/node-gyp/commit/9e46872ea3)] - **bin,lib**: remove extra comments/lines/spaces (Jon Moss) [#1508](https://github.com/nodejs/node-gyp/pull/1508)
-* [[`8098ebdeb4`](https://github.com/nodejs/node-gyp/commit/8098ebdeb4)] - **deps**: replace `osenv` dependency with native `os` (Selwyn)
-* [[`f83b457e03`](https://github.com/nodejs/node-gyp/commit/f83b457e03)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`323cee7323`](https://github.com/nodejs/node-gyp/commit/323cee7323)] - **deps**: pin `request` version range (Refael Ackermann) [#1300](https://github.com/nodejs/node-gyp/pull/1300)
-* [[`c515912d08`](https://github.com/nodejs/node-gyp/commit/c515912d08)] - **doc**: improve issue template (Bartosz Sosnowski) [#1618](https://github.com/nodejs/node-gyp/pull/1618)
-* [[`cca2d66727`](https://github.com/nodejs/node-gyp/commit/cca2d66727)] - **doc**: python info needs own header (Taylor D. Lee) [#1245](https://github.com/nodejs/node-gyp/pull/1245)
-* [[`3e64c780f5`](https://github.com/nodejs/node-gyp/commit/3e64c780f5)] - **doc**: lint README.md (Jon Moss) [#1498](https://github.com/nodejs/node-gyp/pull/1498)
-* [[`a20faedc91`](https://github.com/nodejs/node-gyp/commit/a20faedc91)] - **(SEMVER-MAJOR)** **gyp**: enable MARMASM items only on new VS versions (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`721eb691cf`](https://github.com/nodejs/node-gyp/commit/721eb691cf)] - **gyp**: teach MSVS generator about MARMASM Items (Jon Kunkee) [#1679](https://github.com/nodejs/node-gyp/pull/1679)
-* [[`91744bfecc`](https://github.com/nodejs/node-gyp/commit/91744bfecc)] - **gyp**: add support for Windows on Arm (Richard Townsend) [#1739](https://github.com/nodejs/node-gyp/pull/1739)
-* [[`a6e0a6c7ed`](https://github.com/nodejs/node-gyp/commit/a6e0a6c7ed)] - **gyp**: move compile\_commands\_json (Paul Maréchal) [#1661](https://github.com/nodejs/node-gyp/pull/1661)
-* [[`92e8b52cee`](https://github.com/nodejs/node-gyp/commit/92e8b52cee)] - **gyp**: fix target --\> self.target (cclauss)
-* [[`febdfa2137`](https://github.com/nodejs/node-gyp/commit/febdfa2137)] - **gyp**: fix sntex error (cclauss) [#1333](https://github.com/nodejs/node-gyp/pull/1333)
-* [[`588d333c14`](https://github.com/nodejs/node-gyp/commit/588d333c14)] - **gyp**: \_winreg module was renamed to winreg in Python 3. (Craig Rodrigues)
-* [[`98226d198c`](https://github.com/nodejs/node-gyp/commit/98226d198c)] - **gyp**: replace basestring with str, but only on Python 3. (Craig Rodrigues)
-* [[`7535e4478e`](https://github.com/nodejs/node-gyp/commit/7535e4478e)] - **gyp**: replace deprecated functions (Craig Rodrigues)
-* [[`2040cd21cc`](https://github.com/nodejs/node-gyp/commit/2040cd21cc)] - **gyp**: use print as a function, as specified in PEP 3105. (Craig Rodrigues)
-* [[`abef93ded5`](https://github.com/nodejs/node-gyp/commit/abef93ded5)] - **gyp**: get ready for python 3 (cclauss)
-* [[`43031fadcb`](https://github.com/nodejs/node-gyp/commit/43031fadcb)] - **python**: clean-up detection (João Reis) [#1582](https://github.com/nodejs/node-gyp/pull/1582)
-* [[`49ab79d221`](https://github.com/nodejs/node-gyp/commit/49ab79d221)] - **python**: more informative error (Refael Ackermann) [#1269](https://github.com/nodejs/node-gyp/pull/1269)
-* [[`997bc3c748`](https://github.com/nodejs/node-gyp/commit/997bc3c748)] - **readme**: add ARM64 info to MSVC setup instructions (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655)
-* [[`788e767179`](https://github.com/nodejs/node-gyp/commit/788e767179)] - **test**: remove unused variable (João Reis)
-* [[`6f5a408934`](https://github.com/nodejs/node-gyp/commit/6f5a408934)] - **tools**: fix usage of inherited -fPIC and -fPIE (Jens) [#1340](https://github.com/nodejs/node-gyp/pull/1340)
-* [[`0efb8fb34b`](https://github.com/nodejs/node-gyp/commit/0efb8fb34b)] - **(SEMVER-MAJOR)** **win**: support running in VS Command Prompt (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`360ddbdf3a`](https://github.com/nodejs/node-gyp/commit/360ddbdf3a)] - **(SEMVER-MAJOR)** **win**: add support for Visual Studio 2019 (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`8f43f68275`](https://github.com/nodejs/node-gyp/commit/8f43f68275)] - **(SEMVER-MAJOR)** **win**: detect all VS versions in node-gyp (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`7fe4095974`](https://github.com/nodejs/node-gyp/commit/7fe4095974)] - **(SEMVER-MAJOR)** **win**: generic Visual Studio 2017 detection (João Reis) [#1762](https://github.com/nodejs/node-gyp/pull/1762)
-* [[`7a71d68bce`](https://github.com/nodejs/node-gyp/commit/7a71d68bce)] - **win**: use msbuild from the configure stage (Bartosz Sosnowski) [#1654](https://github.com/nodejs/node-gyp/pull/1654)
-* [[`d3b21220a0`](https://github.com/nodejs/node-gyp/commit/d3b21220a0)] - **win**: fix delay-load hook for electron 4 (Andy Dill)
-* [[`81f3a92338`](https://github.com/nodejs/node-gyp/commit/81f3a92338)] - Update list of Node.js versions to test against. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670)
-* [[`4748f6ab75`](https://github.com/nodejs/node-gyp/commit/4748f6ab75)] - Remove deprecated compatibility code. (Ben Noordhuis) [#1670](https://github.com/nodejs/node-gyp/pull/1670)
-* [[`45e3221fd4`](https://github.com/nodejs/node-gyp/commit/45e3221fd4)] - Remove an outdated workaround for Python 2.4 (cclauss) [#1650](https://github.com/nodejs/node-gyp/pull/1650)
-* [[`721dc7d314`](https://github.com/nodejs/node-gyp/commit/721dc7d314)] - Add ARM64 to MSBuild /Platform logic (Jon Kunkee) [#1655](https://github.com/nodejs/node-gyp/pull/1655)
-* [[`a5b7410497`](https://github.com/nodejs/node-gyp/commit/a5b7410497)] - Add ESLint no-unused-vars rule (Jon Moss) [#1497](https://github.com/nodejs/node-gyp/pull/1497)
-
-## v4.0.0 2019-04-24
-
-* [[`ceed5cbe10`](https://github.com/nodejs/node-gyp/commit/ceed5cbe10)] - **deps**: updated tar package version to 4.4.8 (Pobegaylo Maksim) [#1713](https://github.com/nodejs/node-gyp/pull/1713)
-* [[`374519e066`](https://github.com/nodejs/node-gyp/commit/374519e066)] - **(SEMVER-MAJOR)** Upgrade to tar v3 (isaacs) [#1212](https://github.com/nodejs/node-gyp/pull/1212)
-* [[`e6699d13cd`](https://github.com/nodejs/node-gyp/commit/e6699d13cd)] - **test**: fix addon test for Node.js 12 and V8 7.4 (Richard Lau) [#1705](https://github.com/nodejs/node-gyp/pull/1705)
-* [[`0c6bf530a0`](https://github.com/nodejs/node-gyp/commit/0c6bf530a0)] - **lib**: use print() for python version detection (GreenAddress) [#1534](https://github.com/nodejs/node-gyp/pull/1534)
-
-## v3.8.0 2018-08-09
-
-* [[`c5929cb4fe`](https://github.com/nodejs/node-gyp/commit/c5929cb4fe)] - **doc**: update Xcode preferences tab name. (Ivan Daniluk) [#1330](https://github.com/nodejs/node-gyp/pull/1330)
-* [[`8b488da8b9`](https://github.com/nodejs/node-gyp/commit/8b488da8b9)] - **doc**: update link to commit guidelines (Jonas Hermsmeier) [#1456](https://github.com/nodejs/node-gyp/pull/1456)
-* [[`b4fe8c16f9`](https://github.com/nodejs/node-gyp/commit/b4fe8c16f9)] - **doc**: fix visual studio links (Bartosz Sosnowski) [#1490](https://github.com/nodejs/node-gyp/pull/1490)
-* [[`536759c7e9`](https://github.com/nodejs/node-gyp/commit/536759c7e9)] - **configure**: use sys.version\_info to get python version (Yang Guo) [#1504](https://github.com/nodejs/node-gyp/pull/1504)
-* [[`94c39c604e`](https://github.com/nodejs/node-gyp/commit/94c39c604e)] - **gyp**: fix ninja build failure (GYP patch) (Daniel Bevenius) [nodejs/node#12484](https://github.com/nodejs/node/pull/12484)
-* [[`e8ea74e0fa`](https://github.com/nodejs/node-gyp/commit/e8ea74e0fa)] - **tools**: patch gyp to avoid xcrun errors (Ujjwal Sharma) [nodejs/node#21520](https://github.com/nodejs/node/pull/21520)
-* [[`ea9aff44f2`](https://github.com/nodejs/node-gyp/commit/ea9aff44f2)] - **tools**: fix "the the" typos in comments (Masashi Hirano) [nodejs/node#20716](https://github.com/nodejs/node/pull/20716)
-* [[`207e5aa4fd`](https://github.com/nodejs/node-gyp/commit/207e5aa4fd)] - **gyp**: implement LD/LDXX for ninja and FIPS (Sam Roberts) 
-* [[`b416c5f4b7`](https://github.com/nodejs/node-gyp/commit/b416c5f4b7)] - **gyp**: enable cctest to use objects (gyp part) (Daniel Bevenius) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
-* [[`40692d016b`](https://github.com/nodejs/node-gyp/commit/40692d016b)] - **gyp**: add compile\_commands.json gyp generator (Ben Noordhuis) [nodejs/node#12450](https://github.com/nodejs/node/pull/12450)
-* [[`fc3c4e2b10`](https://github.com/nodejs/node-gyp/commit/fc3c4e2b10)] - **gyp**: float gyp patch for long filenames (Anna Henningsen) [nodejs/node#7963](https://github.com/nodejs/node/pull/7963)
-* [[`8aedbfdef6`](https://github.com/nodejs/node-gyp/commit/8aedbfdef6)] - **gyp**: backport GYP fix to fix AIX shared suffix (Stewart Addison) 
-* [[`6cd84b84fc`](https://github.com/nodejs/node-gyp/commit/6cd84b84fc)] - **test**: formatting and minor fixes for execFileSync replacement (Rod Vagg) [#1521](https://github.com/nodejs/node-gyp/pull/1521)
-* [[`60e421363f`](https://github.com/nodejs/node-gyp/commit/60e421363f)] - **test**: added test/processExecSync.js for when execFileSync is not available. (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`969447c5bd`](https://github.com/nodejs/node-gyp/commit/969447c5bd)] - **deps**: bump request to 2.8.7, fixes heok/hawk issues (Rohit Hazra) [#1492](https://github.com/nodejs/node-gyp/pull/1492)
-* [[`340403ccfe`](https://github.com/nodejs/node-gyp/commit/340403ccfe)] - **win**: improve parsing of SDK version (Alessandro Vergani) [#1516](https://github.com/nodejs/node-gyp/pull/1516)
-
-## v3.7.0 2018-06-08
-
-* [[`84cea7b30d`](https://github.com/nodejs/node-gyp/commit/84cea7b30d)] - Remove unused gyp test scripts. (Ben Noordhuis) [#1458](https://github.com/nodejs/node-gyp/pull/1458)
-* [[`0540e4ec63`](https://github.com/nodejs/node-gyp/commit/0540e4ec63)] - **gyp**: escape spaces in filenames in make generator (Jeff Senn) [#1436](https://github.com/nodejs/node-gyp/pull/1436)
-* [[`88fc6fa0ec`](https://github.com/nodejs/node-gyp/commit/88fc6fa0ec)] - Drop dependency on minimatch. (Brian Woodward) [#1158](https://github.com/nodejs/node-gyp/pull/1158)
-* [[`1e203c5148`](https://github.com/nodejs/node-gyp/commit/1e203c5148)] - Fix include path when pointing to Node.js source (Richard Lau) [#1055](https://github.com/nodejs/node-gyp/pull/1055)
-* [[`53d8cb967c`](https://github.com/nodejs/node-gyp/commit/53d8cb967c)] - Prefix build targets with /t: on Windows (Natalie Wolfe) [#1164](https://github.com/nodejs/node-gyp/pull/1164)
-* [[`53a5f8ff38`](https://github.com/nodejs/node-gyp/commit/53a5f8ff38)] - **gyp**: add support for .mm files to msvs generator (Julien Racle) [#1167](https://github.com/nodejs/node-gyp/pull/1167)
-* [[`dd8561e528`](https://github.com/nodejs/node-gyp/commit/dd8561e528)] - **zos**: don't use universal-new-lines mode (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
-* [[`e5a69010ed`](https://github.com/nodejs/node-gyp/commit/e5a69010ed)] - **zos**: add search locations for libnode.x (John Barboza) [#1451](https://github.com/nodejs/node-gyp/pull/1451)
-* [[`79febace53`](https://github.com/nodejs/node-gyp/commit/79febace53)] - **doc**: update macOS information in README (Josh Parnham) [#1323](https://github.com/nodejs/node-gyp/pull/1323)
-* [[`9425448945`](https://github.com/nodejs/node-gyp/commit/9425448945)] - **gyp**: don't print xcodebuild not found errors (Gibson Fahnestock) [#1370](https://github.com/nodejs/node-gyp/pull/1370)
-* [[`6f1286f5b2`](https://github.com/nodejs/node-gyp/commit/6f1286f5b2)] - Fix infinite install loop. (Ben Noordhuis) [#1384](https://github.com/nodejs/node-gyp/pull/1384)
-* [[`2580b9139e`](https://github.com/nodejs/node-gyp/commit/2580b9139e)] - Update `--nodedir` description in README. (Ben Noordhuis) [#1372](https://github.com/nodejs/node-gyp/pull/1372)
-* [[`a61360391a`](https://github.com/nodejs/node-gyp/commit/a61360391a)] - Update README with another way to install on windows (JeffAtDeere) [#1352](https://github.com/nodejs/node-gyp/pull/1352)
-* [[`47496bf6dc`](https://github.com/nodejs/node-gyp/commit/47496bf6dc)] - Fix IndexError when parsing GYP files. (Ben Noordhuis) [#1267](https://github.com/nodejs/node-gyp/pull/1267)
-* [[`b2024dee7b`](https://github.com/nodejs/node-gyp/commit/b2024dee7b)] - **zos**: support platform (John Barboza) [#1276](https://github.com/nodejs/node-gyp/pull/1276)
-* [[`90d86512f4`](https://github.com/nodejs/node-gyp/commit/90d86512f4)] - **win**: run PS with `-NoProfile` (Refael Ackermann) [#1292](https://github.com/nodejs/node-gyp/pull/1292)
-* [[`2da5f86ef7`](https://github.com/nodejs/node-gyp/commit/2da5f86ef7)] - **doc**: add github PR and Issue templates (Gibson Fahnestock) [#1228](https://github.com/nodejs/node-gyp/pull/1228)
-* [[`a46a770d68`](https://github.com/nodejs/node-gyp/commit/a46a770d68)] - **doc**: update proposed DCO and CoC (Mikeal Rogers) [#1229](https://github.com/nodejs/node-gyp/pull/1229)
-* [[`7e803d58e0`](https://github.com/nodejs/node-gyp/commit/7e803d58e0)] - **doc**: headerify the Install instructions (Nick Schonning) [#1225](https://github.com/nodejs/node-gyp/pull/1225)
-* [[`f27599193a`](https://github.com/nodejs/node-gyp/commit/f27599193a)] - **gyp**: update xml string encoding conversion (Liu Chao) [#1203](https://github.com/nodejs/node-gyp/pull/1203)
-* [[`0a07e481f7`](https://github.com/nodejs/node-gyp/commit/0a07e481f7)] - **configure**: don't set ensure if tarball is set (Gibson Fahnestock) [#1220](https://github.com/nodejs/node-gyp/pull/1220)
-
-## v3.6.3 2018-06-08
-
-* [[`90cd2e8da9`](https://github.com/nodejs/node-gyp/commit/90cd2e8da9)] - **gyp**: fix regex to match multi-digit versions (Jonas Hermsmeier) [#1455](https://github.com/nodejs/node-gyp/pull/1455)
-* [[`7900122337`](https://github.com/nodejs/node-gyp/commit/7900122337)] - deps: pin `request` version range (Refael Ackerman) [#1300](https://github.com/nodejs/node-gyp/pull/1300)
-
-## v3.6.2 2017-06-01
-
-* [[`72afdd62cd`](https://github.com/nodejs/node-gyp/commit/72afdd62cd)] - **build**: rename copyNodeLib() to doBuild() (Liu Chao) [#1206](https://github.com/nodejs/node-gyp/pull/1206)
-* [[`bad903ac70`](https://github.com/nodejs/node-gyp/commit/bad903ac70)] - **win**: more robust parsing of SDK version (Refael Ackermann) [#1198](https://github.com/nodejs/node-gyp/pull/1198)
-* [[`241752f381`](https://github.com/nodejs/node-gyp/commit/241752f381)] - Log dist-url. (Ben Noordhuis) [#1170](https://github.com/nodejs/node-gyp/pull/1170)
-* [[`386746c7d1`](https://github.com/nodejs/node-gyp/commit/386746c7d1)] - **configure**: use full path in node_lib_file GYP var (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964)
-* [[`0913b2dd99`](https://github.com/nodejs/node-gyp/commit/0913b2dd99)] - **build, win**: use target_arch to link with node.lib (Pavel Medvedev) [#964](https://github.com/nodejs/node-gyp/pull/964)
-* [[`c307b302f7`](https://github.com/nodejs/node-gyp/commit/c307b302f7)] - **doc**: blorb about setting `npm_config_OPTION_NAME` (Refael Ackermann) [#1185](https://github.com/nodejs/node-gyp/pull/1185)
-
-## v3.6.1 2017-04-30
-
-* [[`49801716c2`](https://github.com/nodejs/node-gyp/commit/49801716c2)] - **test**: fix test-find-python on v0.10.x buildbot. (Ben Noordhuis) [#1172](https://github.com/nodejs/node-gyp/pull/1172)
-* [[`a83a3801fc`](https://github.com/nodejs/node-gyp/commit/a83a3801fc)] - **test**: fix test/test-configure-python on AIX (Richard Lau) [#1131](https://github.com/nodejs/node-gyp/pull/1131)
-* [[`8a767145c9`](https://github.com/nodejs/node-gyp/commit/8a767145c9)] - **gyp**: Revert quote_cmd workaround (Kunal Pathak) [#1153](https://github.com/nodejs/node-gyp/pull/1153)
-* [[`c09cf7671e`](https://github.com/nodejs/node-gyp/commit/c09cf7671e)] - **doc**: add a note for using `configure` on Windows (Vse Mozhet Byt) [#1152](https://github.com/nodejs/node-gyp/pull/1152)
-* [[`da9cb5f411`](https://github.com/nodejs/node-gyp/commit/da9cb5f411)] - Delete superfluous .patch files. (Ben Noordhuis) [#1122](https://github.com/nodejs/node-gyp/pull/1122)
-
-## v3.6.0 2017-03-16
-
-* [[`ae141e1906`](https://github.com/nodejs/node-gyp/commit/ae141e1906)] - **win**: find and setup for VS2017 (Refael Ackermann) [#1130](https://github.com/nodejs/node-gyp/pull/1130)
-* [[`ec5fc36a80`](https://github.com/nodejs/node-gyp/commit/ec5fc36a80)] - Add support to build node.js with chakracore for ARM. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873)
-* [[`a04ea3051a`](https://github.com/nodejs/node-gyp/commit/a04ea3051a)] - Add support to build node.js with chakracore. (Kunal Pathak) [#873](https://github.com/nodejs/node-gyp/pull/873)
-* [[`93d7fa83c8`](https://github.com/nodejs/node-gyp/commit/93d7fa83c8)] - Upgrade semver dependency. (Ben Noordhuis) [#1107](https://github.com/nodejs/node-gyp/pull/1107)
-* [[`ff9a6fadfd`](https://github.com/nodejs/node-gyp/commit/ff9a6fadfd)] - Update link of gyp as Google code is shutting down (Peter Dave Hello) [#1061](https://github.com/nodejs/node-gyp/pull/1061)
-
-## v3.5.0 2017-01-10
-
-* [[`762d19a39e`](https://github.com/nodejs/node-gyp/commit/762d19a39e)] - \[doc\] merge History.md and CHANGELOG.md (Rod Vagg) 
-* [[`80fc5c3d31`](https://github.com/nodejs/node-gyp/commit/80fc5c3d31)] - Fix deprecated dependency warning (Simone Primarosa) [#1069](https://github.com/nodejs/node-gyp/pull/1069)
-* [[`05c44944fd`](https://github.com/nodejs/node-gyp/commit/05c44944fd)] - Open the build file with universal-newlines mode (Guy Margalit) [#1053](https://github.com/nodejs/node-gyp/pull/1053)
-* [[`37ae7be114`](https://github.com/nodejs/node-gyp/commit/37ae7be114)] - Try python launcher when stock python is python 3. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992)
-* [[`e3778d9907`](https://github.com/nodejs/node-gyp/commit/e3778d9907)] - Add lots of findPython() tests. (Ben Noordhuis) [#992](https://github.com/nodejs/node-gyp/pull/992)
-* [[`afc766adf6`](https://github.com/nodejs/node-gyp/commit/afc766adf6)] - Unset executable bit for .bat files (Pavel Medvedev) [#969](https://github.com/nodejs/node-gyp/pull/969)
-* [[`ddac348991`](https://github.com/nodejs/node-gyp/commit/ddac348991)] - Use push on PYTHONPATH and add tests (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`b182a19042`](https://github.com/nodejs/node-gyp/commit/b182a19042)] - ***Revert*** "add "path-array" dep" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`7c08b85c5a`](https://github.com/nodejs/node-gyp/commit/7c08b85c5a)] - ***Revert*** "**configure**: use "path-array" for PYTHONPATH" (Michael Hart) [#990](https://github.com/nodejs/node-gyp/pull/990)
-* [[`9c8d275526`](https://github.com/nodejs/node-gyp/commit/9c8d275526)] - Add --devdir flag. (Ben Noordhuis) [#916](https://github.com/nodejs/node-gyp/pull/916)
-* [[`f6eab1f9e4`](https://github.com/nodejs/node-gyp/commit/f6eab1f9e4)] - **doc**: add windows-build-tools to readme (Felix Rieseberg) [#970](https://github.com/nodejs/node-gyp/pull/970)
-
-## v3.4.0 2016-06-28
-
-* [[`ce5fd04e94`](https://github.com/nodejs/node-gyp/commit/ce5fd04e94)] - **deps**: update minimatch version (delphiactual) [#961](https://github.com/nodejs/node-gyp/pull/961)
-* [[`77383ddd85`](https://github.com/nodejs/node-gyp/commit/77383ddd85)] - Replace fs.accessSync call to fs.statSync (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
-* [[`0dba4bda57`](https://github.com/nodejs/node-gyp/commit/0dba4bda57)] - **test**: add simple addon test (Richard Lau) [#955](https://github.com/nodejs/node-gyp/pull/955)
-* [[`c4344b3889`](https://github.com/nodejs/node-gyp/commit/c4344b3889)] - **doc**: add --target option to README (Gibson Fahnestock) [#958](https://github.com/nodejs/node-gyp/pull/958)
-* [[`cc778e9215`](https://github.com/nodejs/node-gyp/commit/cc778e9215)] - Override BUILDING_UV_SHARED, BUILDING_V8_SHARED. (Ben Noordhuis) [#915](https://github.com/nodejs/node-gyp/pull/915)
-* [[`af35b2ad32`](https://github.com/nodejs/node-gyp/commit/af35b2ad32)] - Move VC++ Build Tools to Build Tools landing page. (Andrew Pardoe) [#953](https://github.com/nodejs/node-gyp/pull/953)
-* [[`f31482e226`](https://github.com/nodejs/node-gyp/commit/f31482e226)] - **win**: work around __pfnDliNotifyHook2 type change (Alexis Campailla) [#952](https://github.com/nodejs/node-gyp/pull/952)
-* [[`3df8222fa5`](https://github.com/nodejs/node-gyp/commit/3df8222fa5)] - Allow for npmlog@3.x (Rebecca Turner) [#950](https://github.com/nodejs/node-gyp/pull/950)
-* [[`a4fa07b390`](https://github.com/nodejs/node-gyp/commit/a4fa07b390)] - More verbose error on locating msbuild.exe failure. (Mateusz Jaworski) [#930](https://github.com/nodejs/node-gyp/pull/930)
-* [[`4ee31329e0`](https://github.com/nodejs/node-gyp/commit/4ee31329e0)] - **doc**: add command options to README.md (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
-* [[`c8c7ca86b9`](https://github.com/nodejs/node-gyp/commit/c8c7ca86b9)] - Add --silent option for zero output. (Gibson Fahnestock) [#937](https://github.com/nodejs/node-gyp/pull/937)
-* [[`ac29d23a7c`](https://github.com/nodejs/node-gyp/commit/ac29d23a7c)] - Upgrade to glob@7.0.3. (Ben Noordhuis) [#943](https://github.com/nodejs/node-gyp/pull/943)
-* [[`15fd56be3d`](https://github.com/nodejs/node-gyp/commit/15fd56be3d)] - Enable V8 deprecation warnings for native modules (Matt Loring) [#920](https://github.com/nodejs/node-gyp/pull/920)
-* [[`7f1c1b960c`](https://github.com/nodejs/node-gyp/commit/7f1c1b960c)] - **gyp**: improvements for android generator (Robert Chiras) [#935](https://github.com/nodejs/node-gyp/pull/935)
-* [[`088082766c`](https://github.com/nodejs/node-gyp/commit/088082766c)] - Update Windows install instructions (Sara Itani) [#867](https://github.com/nodejs/node-gyp/pull/867)
-* [[`625c1515f9`](https://github.com/nodejs/node-gyp/commit/625c1515f9)] - **gyp**: inherit CC/CXX for CC/CXX.host (Johan Bergström) [#908](https://github.com/nodejs/node-gyp/pull/908)
-* [[`3bcb1720e4`](https://github.com/nodejs/node-gyp/commit/3bcb1720e4)] - Add support for the Python launcher on Windows (Patrick Westerhoff) [#894](https://github.com/nodejs/node-gyp/pull/894
-
-## v3.3.1 2016-03-04
-
-* [[`a981ef847a`](https://github.com/nodejs/node-gyp/commit/a981ef847a)] - **gyp**: fix android generator (Robert Chiras) [#889](https://github.com/nodejs/node-gyp/pull/889)
-
-## v3.3.0 2016-02-16
-
-* [[`818d854a4d`](https://github.com/nodejs/node-gyp/commit/818d854a4d)] - Introduce NODEJS_ORG_MIRROR and IOJS_ORG_MIRROR (Rod Vagg) [#878](https://github.com/nodejs/node-gyp/pull/878)
-* [[`d1e4cc4b62`](https://github.com/nodejs/node-gyp/commit/d1e4cc4b62)] - **(SEMVER-MINOR)** Download headers tarball for ~0.12.10 || ~0.10.42 (Rod Vagg) [#877](https://github.com/nodejs/node-gyp/pull/877)
-* [[`6e28ad1bea`](https://github.com/nodejs/node-gyp/commit/6e28ad1bea)] - Allow for npmlog@2.x (Rebecca Turner) [#861](https://github.com/nodejs/node-gyp/pull/861)
-* [[`07371e5812`](https://github.com/nodejs/node-gyp/commit/07371e5812)] - Use -fPIC for NetBSD. (Marcin Cieślak) [#856](https://github.com/nodejs/node-gyp/pull/856)
-* [[`8c4b0ffa50`](https://github.com/nodejs/node-gyp/commit/8c4b0ffa50)] - **(SEMVER-MINOR)** Add --cafile command line option. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837)
-* [[`b3ad43498e`](https://github.com/nodejs/node-gyp/commit/b3ad43498e)] - **(SEMVER-MINOR)** Make download() function testable. (Ben Noordhuis) [#837](https://github.com/nodejs/node-gyp/pull/837)
-
-## v3.2.1 2015-12-03
-
-* [[`ab89b477c4`](https://github.com/nodejs/node-gyp/commit/ab89b477c4)] - Upgrade gyp to b3cef02. (Ben Noordhuis) [#831](https://github.com/nodejs/node-gyp/pull/831)
-* [[`90078ecb17`](https://github.com/nodejs/node-gyp/commit/90078ecb17)] - Define WIN32_LEAN_AND_MEAN conditionally. (Ben Noordhuis) [#824](https://github.com/nodejs/node-gyp/pull/824)
-
-## v3.2.0 2015-11-25
-
-* [[`268f1ca4c7`](https://github.com/nodejs/node-gyp/commit/268f1ca4c7)] - Use result of `which` when searching for python. (Refael Ackermann) [#668](https://github.com/nodejs/node-gyp/pull/668)
-* [[`817ed9bd78`](https://github.com/nodejs/node-gyp/commit/817ed9bd78)] - Add test for python executable search logic. (Ben Noordhuis) [#756](https://github.com/nodejs/node-gyp/pull/756)
-* [[`0e2dfda1f3`](https://github.com/nodejs/node-gyp/commit/0e2dfda1f3)] - Fix test/test-options when run through `npm test`. (Ben Noordhuis) [#755](https://github.com/nodejs/node-gyp/pull/755)
-* [[`9bfa0876b4`](https://github.com/nodejs/node-gyp/commit/9bfa0876b4)] - Add support for AIX (Michael Dawson) [#753](https://github.com/nodejs/node-gyp/pull/753)
-* [[`a8d441a0a2`](https://github.com/nodejs/node-gyp/commit/a8d441a0a2)] - Update README for Windows 10 support. (Jason Williams) [#766](https://github.com/nodejs/node-gyp/pull/766)
-* [[`d1d6015276`](https://github.com/nodejs/node-gyp/commit/d1d6015276)] - Update broken links and switch to HTTPS. (andrew morton) 
-
-## v3.1.0 2015-11-14
-
-* [[`9049241f91`](https://github.com/nodejs/node-gyp/commit/9049241f91)] - **gyp**: don't use links at all, just copy the files instead (Nathan Zadoks)
-* [[`8ef90348d1`](https://github.com/nodejs/node-gyp/commit/8ef90348d1)] - **gyp**: apply https://codereview.chromium.org/11361103/ (Nathan Rajlich)
-* [[`a2ed0df84e`](https://github.com/nodejs/node-gyp/commit/a2ed0df84e)] - **gyp**: always install into $PRODUCT_DIR (Nathan Rajlich)
-* [[`cc8b2fa83e`](https://github.com/nodejs/node-gyp/commit/cc8b2fa83e)] - Update gyp to b3cef02. (Imran Iqbal) [#781](https://github.com/nodejs/node-gyp/pull/781)
-* [[`f5d86eb84e`](https://github.com/nodejs/node-gyp/commit/f5d86eb84e)] - Update to tar@2.0.0. (Edgar Muentes) [#797](https://github.com/nodejs/node-gyp/pull/797)
-* [[`2ac7de02c4`](https://github.com/nodejs/node-gyp/commit/2ac7de02c4)] - Fix infinite loop with zero-length options. (Ben Noordhuis) [#745](https://github.com/nodejs/node-gyp/pull/745)
-* [[`101bed639b`](https://github.com/nodejs/node-gyp/commit/101bed639b)] - This platform value came from debian package, and now the value (Jérémy Lal) [#738](https://github.com/nodejs/node-gyp/pull/738)
-
-## v3.0.3 2015-09-14
-
-* [[`ad827cda30`](https://github.com/nodejs/node-gyp/commit/ad827cda30)] - tarballUrl global and && when checking for iojs (Lars-Magnus Skog) [#729](https://github.com/nodejs/node-gyp/pull/729)
-
-## v3.0.2 2015-09-12
-
-* [[`6e8c3bf3c6`](https://github.com/nodejs/node-gyp/commit/6e8c3bf3c6)] - add back support for passing additional cmdline args (Rod Vagg) [#723](https://github.com/nodejs/node-gyp/pull/723)
-* [[`ff82f2f3b9`](https://github.com/nodejs/node-gyp/commit/ff82f2f3b9)] - fixed broken link in docs to Visual Studio 2013 download (simon-p-r) [#722](https://github.com/nodejs/node-gyp/pull/722)
-
-## v3.0.1 2015-09-08
-
-* [[`846337e36b`](https://github.com/nodejs/node-gyp/commit/846337e36b)] - normalise versions for target == this comparison (Rod Vagg) [#716](https://github.com/nodejs/node-gyp/pull/716)
-
-## v3.0.0 2015-09-08
-
-* [[`9720d0373c`](https://github.com/nodejs/node-gyp/commit/9720d0373c)] - remove node_modules from tree (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`6dcf220db7`](https://github.com/nodejs/node-gyp/commit/6dcf220db7)] - test version major directly, don't use semver.satisfies() (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`938dd18d1c`](https://github.com/nodejs/node-gyp/commit/938dd18d1c)] - refactor for clarity, fix dist-url, add env var dist-url functionality (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`9e9df66a06`](https://github.com/nodejs/node-gyp/commit/9e9df66a06)] - use process.release, make aware of io.js & node v4 differences (Rod Vagg) [#711](https://github.com/nodejs/node-gyp/pull/711)
-* [[`1ea7ed01f4`](https://github.com/nodejs/node-gyp/commit/1ea7ed01f4)] - **deps**: update graceful-fs dependency to the latest (Sakthipriyan Vairamani) [#714](https://github.com/nodejs/node-gyp/pull/714)
-* [[`0fbc387b35`](https://github.com/nodejs/node-gyp/commit/0fbc387b35)] - Update repository URLs. (Ben Noordhuis) [#715](https://github.com/nodejs/node-gyp/pull/715)
-* [[`bbedb8868b`](https://github.com/nodejs/node-gyp/commit/bbedb8868b)] - **(SEMVER-MAJOR)** **win**: enable delay-load hook by default (Jeremiah Senkpiel) [#708](https://github.com/nodejs/node-gyp/pull/708)
-* [[`85ed107565`](https://github.com/nodejs/node-gyp/commit/85ed107565)] - Merge pull request #664 from othiym23/othiym23/allow-semver-5 (Nathan Rajlich)
-* [[`0c720d234c`](https://github.com/nodejs/node-gyp/commit/0c720d234c)] - allow semver@5 (Forrest L Norvell)
-
-## 2.0.2 / 2015-07-14
-
-  * Use HTTPS for dist url (#656, @SonicHedgehog)
-  * Merge pull request #648 from nevosegal/master
-  * Merge pull request #650 from magic890/patch-1
-  * Updated Installation section on README
-  * Updated link to gyp user documentation
-  * Fix download error message spelling (#643, @tomxtobin)
-  * Merge pull request #637 from lygstate/master
-  * Set NODE_GYP_DIR for addon.gypi to setting absolute path for
-    src/win_delay_load_hook.c, and fixes of the long relative path issue on Win32.
-    Fixes #636 (#637, @lygstate).
-
-## 2.0.1 / 2015-05-28
-
-  * configure: try/catch the semver range.test() call
-  * README: update for visual studio 2013 (#510, @samccone)
-
-## 2.0.0 / 2015-05-24
-
-  * configure: check for python2 executable by default, fallback to python
-  * configure: don't clobber existing $PYTHONPATH
-  * configure: use "path-array" for PYTHONPATH
-  * gyp: fix for non-acsii userprofile name on Windows
-  * gyp: always install into $PRODUCT_DIR
-  * gyp: apply https://codereview.chromium.org/11361103/
-  * gyp: don't use links at all, just copy the files instead
-  * gyp: update gyp to e1c8fcf7
-  * Updated README.md with updated Windows build info
-  * Show URL when a download fails
-  * package: add a "license" field
-  * move HMODULE m declaration to top
-  * Only add "-undefined dynamic_lookup" to loadable_module targets
-  * win: optionally allow node.exe/iojs.exe to be renamed
-  * Avoid downloading shasums if using tarPath
-  * Add target name preprocessor define: `NODE_GYP_MODULE_NAME`
-  * Show better error message in case of bad network settings
diff --git a/node_modules/npm/node_modules/node-gyp/CONTRIBUTING.md b/node_modules/npm/node_modules/node-gyp/CONTRIBUTING.md
deleted file mode 100644
index 5b97789..0000000
--- a/node_modules/npm/node_modules/node-gyp/CONTRIBUTING.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Contributing to node-gyp
-
-## Code of Conduct
-
-Please read the
-[Code of Conduct](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md)
-which explains the minimum behavior expectations for node-gyp contributors.
-
-
-## Developer's Certificate of Origin 1.1
-
-By making a contribution to this project, I certify that:
-
-* (a) The contribution was created in whole or in part by me and I
-  have the right to submit it under the open source license
-  indicated in the file; or
-
-* (b) The contribution is based upon previous work that, to the best
-  of my knowledge, is covered under an appropriate open source
-  license and I have the right under that license to submit that
-  work with modifications, whether created in whole or in part
-  by me, under the same open source license (unless I am
-  permitted to submit under a different license), as indicated
-  in the file; or
-
-* (c) The contribution was provided directly to me by some other
-  person who certified (a), (b) or (c) and I have not modified
-  it.
-
-* (d) I understand and agree that this project and the contribution
-  are public and that a record of the contribution (including all
-  personal information I submit with it, including my sign-off) is
-  maintained indefinitely and may be redistributed consistent with
-  this project or the open source license(s) involved.
diff --git a/node_modules/npm/node_modules/node-gyp/LICENSE b/node_modules/npm/node_modules/node-gyp/LICENSE
deleted file mode 100644
index 2ea4dc5..0000000
--- a/node_modules/npm/node_modules/node-gyp/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2012 Nathan Rajlich 
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/node-gyp/README.md b/node_modules/npm/node_modules/node-gyp/README.md
deleted file mode 100644
index f46ee06..0000000
--- a/node_modules/npm/node_modules/node-gyp/README.md
+++ /dev/null
@@ -1,263 +0,0 @@
-# `node-gyp` - Node.js native addon build tool
-
-[![Build Status](https://github.com/nodejs/node-gyp/workflows/Tests/badge.svg?branch=main)](https://github.com/nodejs/node-gyp/actions?query=workflow%3ATests+branch%3Amain)
-![npm](https://img.shields.io/npm/dm/node-gyp)
-
-`node-gyp` is a cross-platform command-line tool written in Node.js for
-compiling native addon modules for Node.js. It contains a vendored copy of the
-[gyp-next](https://github.com/nodejs/gyp-next) project that was previously used
-by the Chromium team and extended to support the development of Node.js native
-addons.
-
-Note that `node-gyp` is _not_ used to build Node.js itself.
-
-Multiple target versions of Node.js are supported (i.e. `0.8`, ..., `4`, `5`, `6`,
-etc.), regardless of what version of Node.js is actually installed on your system
-(`node-gyp` downloads the necessary development files or headers for the target version).
-
-## Features
-
- * The same build commands work on any of the supported platforms
- * Supports the targeting of different versions of Node.js
-
-## Installation
-
-You can install `node-gyp` using `npm`:
-
-``` bash
-npm install -g node-gyp
-```
-
-Depending on your operating system, you will need to install:
-
-### On Unix
-
-   * [A supported version of Python](https://devguide.python.org/versions/)
-   * `make`
-   * A proper C/C++ compiler toolchain, like [GCC](https://gcc.gnu.org)
-
-### On macOS
-
-   * [A supported version of Python](https://devguide.python.org/versions/)
-   * `Xcode Command Line Tools` which will install `clang`, `clang++`, and `make`.
-     * Install the `Xcode Command Line Tools` standalone by running `xcode-select --install`. -- OR --
-     * Alternatively, if you already have the [full Xcode installed](https://developer.apple.com/xcode/download/), you can install the Command Line Tools under the menu `Xcode -> Open Developer Tool -> More Developer Tools...`.
-
-
-### On Windows
-
-Install the current [version of Python](https://devguide.python.org/versions/) from the
-[Microsoft Store](https://apps.microsoft.com/store/search?publisher=Python+Software+Foundation).
-
-Install tools and configuration manually:
-   * Install Visual C++ Build Environment: [Visual Studio Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools)
-   (using "Visual C++ build tools" if using a version older than VS2019, otherwise use "Desktop development with C++" workload) or [Visual Studio Community](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community)
-   (using the "Desktop development with C++" workload)
-
-   If the above steps didn't work for you, please visit [Microsoft's Node.js Guidelines for Windows](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules) for additional tips.
-
-   To target native ARM64 Node.js on Windows on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".
-
-   To use the native ARM64 C++ compiler on Windows on ARM, ensure that you have Visual Studio 2022 [17.4 or later](https://devblogs.microsoft.com/visualstudio/arm64-visual-studio-is-officially-here/) installed.
-
-### Configuring Python Dependency
-
-`node-gyp` requires that you have installed a [supported version of Python](https://devguide.python.org/versions/).
-If you have multiple versions of Python installed, you can identify which version
-`node-gyp` should use in one of the following ways:
-
-1. by setting the `--python` command-line option, e.g.:
-
-``` bash
-node-gyp  --python /path/to/executable/python
-```
-
-2. If `node-gyp` is called by way of `npm`, *and* you have multiple versions of
-Python installed, then you can set the `npm_config_python` environment variable
-to the appropriate path:
-``` bash
-export npm_config_python=/path/to/executable/python
-```
-    Or on Windows:
-```console
-py --list-paths  # To see the installed Python versions
-set npm_config_python=C:\path\to\python.exe
-```
-
-3. If the `PYTHON` environment variable is set to the path of a Python executable,
-then that version will be used if it is a supported version.
-
-4. If the `NODE_GYP_FORCE_PYTHON` environment variable is set to the path of a
-Python executable, it will be used instead of any of the other configured or
-built-in Python search paths. If it's not a compatible version, no further
-searching will be done.
-
-### Build for Third Party Node.js Runtimes
-
-When building modules for third-party Node.js runtimes like Electron, which have
-different build configurations from the official Node.js distribution, you
-should use `--dist-url` or `--nodedir` flags to specify the headers of the
-runtime to build for.
-
-Also when `--dist-url` or `--nodedir` flags are passed, node-gyp will use the
-`config.gypi` shipped in the headers distribution to generate build
-configurations, which is different from the default mode that would use the
-`process.config` object of the running Node.js instance.
-
-Some old versions of Electron shipped malformed `config.gypi` in their headers
-distributions, and you might need to pass `--force-process-config` to node-gyp
-to work around configuration errors.
-
-## How to Use
-
-To compile your native addon first go to its root directory:
-
-``` bash
-cd my_node_addon
-```
-
-The next step is to generate the appropriate project build files for the current
-platform. Use `configure` for that:
-
-``` bash
-node-gyp configure
-```
-
-Auto-detection fails for Visual C++ Build Tools 2015, so `--msvs_version=2015`
-needs to be added (not needed when run by npm as configured above):
-``` bash
-node-gyp configure --msvs_version=2015
-```
-
-__Note__: The `configure` step looks for a `binding.gyp` file in the current
-directory to process. See below for instructions on creating a `binding.gyp` file.
-
-Now you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file
-(on Windows) in the `build/` directory. Next, invoke the `build` command:
-
-``` bash
-node-gyp build
-```
-
-Now you have your compiled `.node` bindings file! The compiled bindings end up
-in `build/Debug/` or `build/Release/`, depending on the build mode. At this point,
-you can require the `.node` file with Node.js and run your tests!
-
-__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or
-`-d`) switch when running either the `configure`, `build` or `rebuild` commands.
-
-## The `binding.gyp` file
-
-A `binding.gyp` file describes the configuration to build your module, in a
-JSON-like format. This file gets placed in the root of your package, alongside
-`package.json`.
-
-A barebones `gyp` file appropriate for building a Node.js addon could look like:
-
-```python
-{
-  "targets": [
-    {
-      "target_name": "binding",
-      "sources": [ "src/binding.cc" ]
-    }
-  ]
-}
-```
-
-## Further reading
-
-The **[docs](./docs/)** directory contains additional documentation on specific node-gyp topics that may be useful if you are experiencing problems installing or building addons using node-gyp.
-
-Some additional resources for Node.js native addons and writing `gyp` configuration files:
-
- * ["Going Native" a nodeschool.io tutorial](http://nodeschool.io/#goingnative)
- * ["Hello World" node addon example](https://github.com/nodejs/node/tree/main/test/addons/hello-world)
- * [gyp user documentation](https://gyp.gsrc.io/docs/UserDocumentation.md)
- * [gyp input format reference](https://gyp.gsrc.io/docs/InputFormatReference.md)
- * [*"binding.gyp" files out in the wild* wiki page](./docs/binding.gyp-files-in-the-wild.md)
-
-## Commands
-
-`node-gyp` responds to the following commands:
-
-| **Command**   | **Description**
-|:--------------|:---------------------------------------------------------------
-| `help`        | Shows the help dialog
-| `build`       | Invokes `make`/`msbuild.exe` and builds the native addon
-| `clean`       | Removes the `build` directory if it exists
-| `configure`   | Generates project build files for the current platform
-| `rebuild`     | Runs `clean`, `configure` and `build` all in a row
-| `install`     | Installs Node.js header files for the given version
-| `list`        | Lists the currently installed Node.js header versions
-| `remove`      | Removes the Node.js header files for the given version
-
-
-## Command Options
-
-`node-gyp` accepts the following command options:
-
-| **Command**                       | **Description**
-|:----------------------------------|:------------------------------------------
-| `-j n`, `--jobs n`                | Run `make` in parallel. The value `max` will use all available CPU cores
-| `--target=v6.2.1`                 | Node.js version to build for (default is `process.version`)
-| `--silly`, `--loglevel=silly`     | Log all progress to console
-| `--verbose`, `--loglevel=verbose` | Log most progress to console
-| `--silent`, `--loglevel=silent`   | Don't log anything to console
-| `debug`, `--debug`                | Make Debug build (default is `Release`)
-| `--release`, `--no-debug`         | Make Release build
-| `-C $dir`, `--directory=$dir`     | Run command in different directory
-| `--make=$make`                    | Override `make` command (e.g. `gmake`)
-| `--thin=yes`                      | Enable thin static libraries
-| `--arch=$arch`                    | Set target architecture (e.g. ia32)
-| `--tarball=$path`                 | Get headers from a local tarball
-| `--devdir=$path`                  | SDK download directory (default is OS cache directory)
-| `--ensure`                        | Don't reinstall headers if already present
-| `--dist-url=$url`                 | Download header tarball from custom URL
-| `--proxy=$url`                    | Set HTTP(S) proxy for downloading header tarball
-| `--noproxy=$urls`                 | Set urls to ignore proxies when downloading header tarball
-| `--cafile=$cafile`                | Override default CA chain (to download tarball)
-| `--nodedir=$path`                 | Set the path to the node source code
-| `--python=$path`                  | Set path to the Python binary
-| `--msvs_version=$version`         | Set Visual Studio version (Windows only)
-| `--solution=$solution`            | Set Visual Studio Solution version (Windows only)
-| `--force-process-config`          | Force using runtime's `process.config` object to generate `config.gypi` file
-
-## Configuration
-
-### Environment variables
-
-Use the form `npm_config_OPTION_NAME` for any of the command options listed
-above (dashes in option names should be replaced by underscores).
-
-For example, to set `devdir` equal to `/tmp/.gyp`, you would:
-
-Run this on Unix:
-
-```bash
-export npm_config_devdir=/tmp/.gyp
-```
-
-Or this on Windows:
-
-```console
-set npm_config_devdir=c:\temp\.gyp
-```
-
-### `npm` configuration for npm versions before v9
-
-Use the form `OPTION_NAME` for any of the command options listed above.
-
-For example, to set `devdir` equal to `/tmp/.gyp`, you would run:
-
-```bash
-npm config set [--global] devdir /tmp/.gyp
-```
-
-**Note:** Configuration set via `npm` will only be used when `node-gyp`
-is run via `npm`, not when `node-gyp` is run directly.
-
-## License
-
-`node-gyp` is available under the MIT license. See the [LICENSE
-file](LICENSE) for details.
diff --git a/node_modules/npm/node_modules/node-gyp/SECURITY.md b/node_modules/npm/node_modules/node-gyp/SECURITY.md
deleted file mode 100644
index 1e168d7..0000000
--- a/node_modules/npm/node_modules/node-gyp/SECURITY.md
+++ /dev/null
@@ -1,2 +0,0 @@
-If you believe you have found a security issue in the software in this
-repository, please consult https://github.com/nodejs/node/blob/HEAD/SECURITY.md.
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/node-gyp/addon.gypi b/node_modules/npm/node_modules/node-gyp/addon.gypi
deleted file mode 100644
index b4ac369..0000000
--- a/node_modules/npm/node_modules/node-gyp/addon.gypi
+++ /dev/null
@@ -1,204 +0,0 @@
-{
-  'variables' : {
-    'node_engine_include_dir%': 'deps/v8/include',
-    'node_host_binary%': 'node',
-    'node_with_ltcg%': 'true',
-  },
-  'target_defaults': {
-    'type': 'loadable_module',
-    'win_delay_load_hook': 'true',
-    'product_prefix': '',
-
-    'conditions': [
-      [ 'node_engine=="chakracore"', {
-        'variables': {
-          'node_engine_include_dir%': 'deps/chakrashim/include'
-        },
-      }]
-    ],
-
-    'include_dirs': [
-      '<(node_root_dir)/include/node',
-      '<(node_root_dir)/src',
-      '<(node_root_dir)/deps/openssl/config',
-      '<(node_root_dir)/deps/openssl/openssl/include',
-      '<(node_root_dir)/deps/uv/include',
-      '<(node_root_dir)/deps/zlib',
-      '<(node_root_dir)/<(node_engine_include_dir)'
-    ],
-    'defines!': [
-      'BUILDING_UV_SHARED=1',  # Inherited from common.gypi.
-      'BUILDING_V8_SHARED=1',  # Inherited from common.gypi.
-    ],
-    'defines': [
-      'NODE_GYP_MODULE_NAME=>(_target_name)',
-      'USING_UV_SHARED=1',
-      'USING_V8_SHARED=1',
-      # Warn when using deprecated V8 APIs.
-      'V8_DEPRECATION_WARNINGS=1'
-    ],
-
-    'target_conditions': [
-      ['_type=="loadable_module"', {
-        'product_extension': 'node',
-        'defines': [
-          'BUILDING_NODE_EXTENSION'
-        ],
-        'xcode_settings': {
-          'OTHER_LDFLAGS': [
-            '-undefined dynamic_lookup'
-          ],
-        },
-      }],
-
-      ['_type=="static_library"', {
-        # set to `1` to *disable* the -T thin archive 'ld' flag.
-        # older linkers don't support this flag.
-        'standalone_static_library': '<(standalone_static_library)'
-      }],
-
-      ['_type!="executable"', {
-        'conditions': [
-          [ 'OS=="android"', {
-            'cflags!': [ '-fPIE' ],
-          }]
-        ]
-      }],
-
-      ['_win_delay_load_hook=="true"', {
-        # If the addon specifies `'win_delay_load_hook': 'true'` in its
-        # binding.gyp, link a delay-load hook into the DLL. This hook ensures
-        # that the addon will work regardless of whether the node/iojs binary
-        # is named node.exe, iojs.exe, or something else.
-        'conditions': [
-          [ 'OS=="win"', {
-            'defines': [ 'HOST_BINARY=\"<(node_host_binary)<(EXECUTABLE_SUFFIX)\"', ],
-            'sources': [
-              '<(node_gyp_dir)/src/win_delay_load_hook.cc',
-            ],
-            'msvs_settings': {
-              'VCLinkerTool': {
-                'DelayLoadDLLs': [ '<(node_host_binary)<(EXECUTABLE_SUFFIX)' ],
-                # Don't print a linker warning when no imports from either .exe
-                # are used.
-                'AdditionalOptions': [ '/ignore:4199' ],
-              },
-            },
-          }],
-        ],
-      }],
-    ],
-
-    'conditions': [
-      [ 'OS=="mac"', {
-        'defines': [
-          '_DARWIN_USE_64_BIT_INODE=1'
-        ],
-        'xcode_settings': {
-          'DYLIB_INSTALL_NAME_BASE': '@rpath'
-        },
-      }],
-      [ 'OS=="aix"', {
-        'ldflags': [
-          '-Wl,-bimport:<(node_exp_file)'
-        ],
-      }],
-      [ 'OS=="os400"', {
-        'ldflags': [
-          '-Wl,-bimport:<(node_exp_file)'
-        ],
-      }],
-      [ 'OS=="zos"', {
-        'conditions': [
-          [ '"'
-          # needs to have dll-interface to be used by
-          # clients of class 'node::ObjectWrap'
-          4251
-        ],
-      }, {
-        # OS!="win"
-        'defines': [
-          '_LARGEFILE_SOURCE',
-          '_FILE_OFFSET_BITS=64'
-        ],
-      }],
-      [ 'OS in "freebsd openbsd netbsd solaris android" or \
-         (OS=="linux" and target_arch!="ia32")', {
-        'cflags': [ '-fPIC' ],
-      }],
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js b/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
deleted file mode 100755
index f8317b4..0000000
--- a/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/usr/bin/env node
-
-'use strict'
-
-process.title = 'node-gyp'
-
-const envPaths = require('env-paths')
-const gyp = require('../')
-const log = require('../lib/log')
-const os = require('os')
-
-/**
- * Process and execute the selected commands.
- */
-
-const prog = gyp()
-let completed = false
-prog.parseArgv(process.argv)
-prog.devDir = prog.opts.devdir
-
-const homeDir = os.homedir()
-if (prog.devDir) {
-  prog.devDir = prog.devDir.replace(/^~/, homeDir)
-} else if (homeDir) {
-  prog.devDir = envPaths('node-gyp', { suffix: '' }).cache
-} else {
-  throw new Error(
-    "node-gyp requires that the user's home directory is specified " +
-    'in either of the environmental variables HOME or USERPROFILE. ' +
-    'Overide with: --devdir /path/to/.node-gyp')
-}
-
-if (prog.todo.length === 0) {
-  if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
-    log.stdout('v%s', prog.version)
-  } else {
-    log.stdout('%s', prog.usage())
-  }
-  process.exit(0)
-}
-
-log.info('it worked if it ends with', 'ok')
-log.verbose('cli', process.argv)
-log.info('using', 'node-gyp@%s', prog.version)
-log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch)
-
-/**
- * Change dir if -C/--directory was passed.
- */
-
-const dir = prog.opts.directory
-if (dir) {
-  const fs = require('fs')
-  try {
-    const stat = fs.statSync(dir)
-    if (stat.isDirectory()) {
-      log.info('chdir', dir)
-      process.chdir(dir)
-    } else {
-      log.warn('chdir', dir + ' is not a directory')
-    }
-  } catch (e) {
-    if (e.code === 'ENOENT') {
-      log.warn('chdir', dir + ' is not a directory')
-    } else {
-      log.warn('chdir', 'error during chdir() "%s"', e.message)
-    }
-  }
-}
-
-async function run () {
-  const command = prog.todo.shift()
-  if (!command) {
-    // done!
-    completed = true
-    log.info('ok')
-    return
-  }
-
-  try {
-    const args = await prog.commands[command.name](command.args) ?? []
-
-    if (command.name === 'list') {
-      if (args.length) {
-        args.forEach((version) => log.stdout(version))
-      } else {
-        log.stdout('No node development files installed. Use `node-gyp install` to install a version.')
-      }
-    } else if (args.length >= 1) {
-      log.stdout(...args.slice(1))
-    }
-
-    // now run the next command in the queue
-    return run()
-  } catch (err) {
-    log.error(command.name + ' error')
-    log.error('stack', err.stack)
-    errorMessage()
-    log.error('not ok')
-    return process.exit(1)
-  }
-}
-
-process.on('exit', function (code) {
-  if (!completed && !code) {
-    log.error('Completion callback never invoked!')
-    issueMessage()
-    process.exit(6)
-  }
-})
-
-process.on('uncaughtException', function (err) {
-  log.error('UNCAUGHT EXCEPTION')
-  log.error('stack', err.stack)
-  issueMessage()
-  process.exit(7)
-})
-
-function errorMessage () {
-  // copied from npm's lib/utils/error-handler.js
-  const os = require('os')
-  log.error('System', os.type() + ' ' + os.release())
-  log.error('command', process.argv
-    .map(JSON.stringify).join(' '))
-  log.error('cwd', process.cwd())
-  log.error('node -v', process.version)
-  log.error('node-gyp -v', 'v' + prog.package.version)
-}
-
-function issueMessage () {
-  errorMessage()
-  log.error('', ['Node-gyp failed to build your package.',
-    'Try to update npm and/or node-gyp and if it does not help file an issue with the package author.'
-  ].join('\n'))
-}
-
-// start running the given commands!
-run()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/LICENSE b/node_modules/npm/node_modules/node-gyp/gyp/LICENSE
deleted file mode 100644
index c6944c5..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2020 Node.js contributors. All rights reserved.
-Copyright (c) 2009 Google Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/README.md b/node_modules/npm/node_modules/node-gyp/gyp/README.md
deleted file mode 100644
index be1d7b9..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-GYP can Generate Your Projects.
-===================================
-
-Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
-
-__gyp-next__ is [released](https://github.com/nodejs/gyp-next/releases) to the [__Python Packaging Index__](https://pypi.org/project/gyp-next) (PyPI) and can be installed with the command:
-* `python3 -m pip install gyp-next`
-
-When used as a command line utility, __gyp-next__ can also be installed with [pipx](https://pypa.github.io/pipx):
-* `pipx install gyp-next`
-```
-Installing to a new venv 'gyp-next'
-  installed package gyp-next 0.13.0, installed using Python 3.10.6
-  These apps are now globally available
-    - gyp
-done! ✨ 🌟 ✨
-```
-
-Or to run __gyp-next__ directly without installing it:
-* `pipx run gyp-next --help`
-```
-NOTE: running app 'gyp' from 'gyp-next'
-usage: usage: gyp [options ...] [build_file ...]
-
-options:
-  -h, --help            show this help message and exit
-  --build CONFIGS       configuration for build after project generation
-  --check               check format of gyp files
-  [ ... ]
-```
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc b/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
deleted file mode 100644
index 8bca510..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is used to generate an empty .pdb -- with a 4KB pagesize -- that is
-// then used during the final link for modules that have large PDBs. Otherwise,
-// the linker will generate a pdb with a page size of 1KB, which imposes a limit
-// of 1GB on the .pdb. By generating an initial empty .pdb with the compiler
-// (rather than the linker), this limit is avoided. With this in place PDBs may
-// grow to 2GB.
-//
-// This file is referenced by the msvs_large_pdb mechanism in MSVSUtil.py.
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/gyp b/node_modules/npm/node_modules/node-gyp/gyp/gyp
deleted file mode 100755
index 1b8b9bd..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/gyp
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Copyright 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-set -e
-base=$(dirname "$0")
-exec python "${base}/gyp_main.py" "$@"
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat b/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat
deleted file mode 100755
index c0b4ca2..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/gyp.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@rem Copyright (c) 2009 Google Inc. All rights reserved.
-@rem Use of this source code is governed by a BSD-style license that can be
-@rem found in the LICENSE file.
-
-@python "%~dp0gyp_main.py" %*
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py b/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
deleted file mode 100755
index f23dcdf..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2009 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import sys
-import subprocess
-
-
-def IsCygwin():
-    # Function copied from pylib/gyp/common.py
-    try:
-        out = subprocess.Popen(
-            "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT
-        )
-        stdout, _ = out.communicate()
-        return "CYGWIN" in stdout.decode("utf-8")
-    except Exception:
-        return False
-
-
-def UnixifyPath(path):
-    try:
-        if not IsCygwin():
-            return path
-        out = subprocess.Popen(
-            ["cygpath", "-u", path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT
-        )
-        stdout, _ = out.communicate()
-        return stdout.decode("utf-8")
-    except Exception:
-        return path
-
-
-# Make sure we're using the version of pylib in this repo, not one installed
-# elsewhere on the system. Also convert to Unix style path on Cygwin systems,
-# else the 'gyp' library will not be found
-path = UnixifyPath(sys.argv[0])
-sys.path.insert(0, os.path.join(os.path.dirname(path), "pylib"))
-import gyp  # noqa: E402
-
-if __name__ == "__main__":
-    sys.exit(gyp.script_main())
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
deleted file mode 100644
index bc0e93d..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
+++ /dev/null
@@ -1,365 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""New implementation of Visual Studio project generation."""
-
-import hashlib
-import os
-import random
-from operator import attrgetter
-
-import gyp.common
-
-
-def cmp(x, y):
-    return (x > y) - (x < y)
-
-
-# Initialize random number generator
-random.seed()
-
-# GUIDs for project types
-ENTRY_TYPE_GUIDS = {
-    "project": "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}",
-    "folder": "{2150E333-8FDC-42A3-9474-1A3956D46DE8}",
-}
-
-# ------------------------------------------------------------------------------
-# Helper functions
-
-
-def MakeGuid(name, seed="msvs_new"):
-    """Returns a GUID for the specified target name.
-
-  Args:
-    name: Target name.
-    seed: Seed for MD5 hash.
-  Returns:
-    A GUID-line string calculated from the name and seed.
-
-  This generates something which looks like a GUID, but depends only on the
-  name and seed.  This means the same name/seed will always generate the same
-  GUID, so that projects and solutions which refer to each other can explicitly
-  determine the GUID to refer to explicitly.  It also means that the GUID will
-  not change when the project for a target is rebuilt.
-  """
-    # Calculate a MD5 signature for the seed and name.
-    d = hashlib.md5((str(seed) + str(name)).encode("utf-8")).hexdigest().upper()
-    # Convert most of the signature to GUID form (discard the rest)
-    guid = (
-        "{"
-        + d[:8]
-        + "-"
-        + d[8:12]
-        + "-"
-        + d[12:16]
-        + "-"
-        + d[16:20]
-        + "-"
-        + d[20:32]
-        + "}"
-    )
-    return guid
-
-
-# ------------------------------------------------------------------------------
-
-
-class MSVSSolutionEntry:
-    def __cmp__(self, other):
-        # Sort by name then guid (so things are in order on vs2008).
-        return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
-
-
-class MSVSFolder(MSVSSolutionEntry):
-    """Folder in a Visual Studio project or solution."""
-
-    def __init__(self, path, name=None, entries=None, guid=None, items=None):
-        """Initializes the folder.
-
-    Args:
-      path: Full path to the folder.
-      name: Name of the folder.
-      entries: List of folder entries to nest inside this folder.  May contain
-          Folder or Project objects.  May be None, if the folder is empty.
-      guid: GUID to use for folder, if not None.
-      items: List of solution items to include in the folder project.  May be
-          None, if the folder does not directly contain items.
-    """
-        if name:
-            self.name = name
-        else:
-            # Use last layer.
-            self.name = os.path.basename(path)
-
-        self.path = path
-        self.guid = guid
-
-        # Copy passed lists (or set to empty lists)
-        self.entries = sorted(entries or [], key=attrgetter("path"))
-        self.items = list(items or [])
-
-        self.entry_type_guid = ENTRY_TYPE_GUIDS["folder"]
-
-    def get_guid(self):
-        if self.guid is None:
-            # Use consistent guids for folders (so things don't regenerate).
-            self.guid = MakeGuid(self.path, seed="msvs_folder")
-        return self.guid
-
-
-# ------------------------------------------------------------------------------
-
-
-class MSVSProject(MSVSSolutionEntry):
-    """Visual Studio project."""
-
-    def __init__(
-        self,
-        path,
-        name=None,
-        dependencies=None,
-        guid=None,
-        spec=None,
-        build_file=None,
-        config_platform_overrides=None,
-        fixpath_prefix=None,
-    ):
-        """Initializes the project.
-
-    Args:
-      path: Absolute path to the project file.
-      name: Name of project.  If None, the name will be the same as the base
-          name of the project file.
-      dependencies: List of other Project objects this project is dependent
-          upon, if not None.
-      guid: GUID to use for project, if not None.
-      spec: Dictionary specifying how to build this project.
-      build_file: Filename of the .gyp file that the vcproj file comes from.
-      config_platform_overrides: optional dict of configuration platforms to
-          used in place of the default for this target.
-      fixpath_prefix: the path used to adjust the behavior of _fixpath
-    """
-        self.path = path
-        self.guid = guid
-        self.spec = spec
-        self.build_file = build_file
-        # Use project filename if name not specified
-        self.name = name or os.path.splitext(os.path.basename(path))[0]
-
-        # Copy passed lists (or set to empty lists)
-        self.dependencies = list(dependencies or [])
-
-        self.entry_type_guid = ENTRY_TYPE_GUIDS["project"]
-
-        if config_platform_overrides:
-            self.config_platform_overrides = config_platform_overrides
-        else:
-            self.config_platform_overrides = {}
-        self.fixpath_prefix = fixpath_prefix
-        self.msbuild_toolset = None
-
-    def set_dependencies(self, dependencies):
-        self.dependencies = list(dependencies or [])
-
-    def get_guid(self):
-        if self.guid is None:
-            # Set GUID from path
-            # TODO(rspangler): This is fragile.
-            # 1. We can't just use the project filename sans path, since there could
-            #    be multiple projects with the same base name (for example,
-            #    foo/unittest.vcproj and bar/unittest.vcproj).
-            # 2. The path needs to be relative to $SOURCE_ROOT, so that the project
-            #    GUID is the same whether it's included from base/base.sln or
-            #    foo/bar/baz/baz.sln.
-            # 3. The GUID needs to be the same each time this builder is invoked, so
-            #    that we don't need to rebuild the solution when the project changes.
-            # 4. We should be able to handle pre-built project files by reading the
-            #    GUID from the files.
-            self.guid = MakeGuid(self.name)
-        return self.guid
-
-    def set_msbuild_toolset(self, msbuild_toolset):
-        self.msbuild_toolset = msbuild_toolset
-
-
-# ------------------------------------------------------------------------------
-
-
-class MSVSSolution:
-    """Visual Studio solution."""
-
-    def __init__(
-        self, path, version, entries=None, variants=None, websiteProperties=True
-    ):
-        """Initializes the solution.
-
-    Args:
-      path: Path to solution file.
-      version: Format version to emit.
-      entries: List of entries in solution.  May contain Folder or Project
-          objects.  May be None, if the folder is empty.
-      variants: List of build variant strings.  If none, a default list will
-          be used.
-      websiteProperties: Flag to decide if the website properties section
-          is generated.
-    """
-        self.path = path
-        self.websiteProperties = websiteProperties
-        self.version = version
-
-        # Copy passed lists (or set to empty lists)
-        self.entries = list(entries or [])
-
-        if variants:
-            # Copy passed list
-            self.variants = variants[:]
-        else:
-            # Use default
-            self.variants = ["Debug|Win32", "Release|Win32"]
-        # TODO(rspangler): Need to be able to handle a mapping of solution config
-        # to project config.  Should we be able to handle variants being a dict,
-        # or add a separate variant_map variable?  If it's a dict, we can't
-        # guarantee the order of variants since dict keys aren't ordered.
-
-        # TODO(rspangler): Automatically write to disk for now; should delay until
-        # node-evaluation time.
-        self.Write()
-
-    def Write(self, writer=gyp.common.WriteOnDiff):
-        """Writes the solution file to disk.
-
-    Raises:
-      IndexError: An entry appears multiple times.
-    """
-        # Walk the entry tree and collect all the folders and projects.
-        all_entries = set()
-        entries_to_check = self.entries[:]
-        while entries_to_check:
-            e = entries_to_check.pop(0)
-
-            # If this entry has been visited, nothing to do.
-            if e in all_entries:
-                continue
-
-            all_entries.add(e)
-
-            # If this is a folder, check its entries too.
-            if isinstance(e, MSVSFolder):
-                entries_to_check += e.entries
-
-        all_entries = sorted(all_entries, key=attrgetter("path"))
-
-        # Open file and print header
-        f = writer(self.path)
-        f.write(
-            "Microsoft Visual Studio Solution File, "
-            "Format Version %s\r\n" % self.version.SolutionVersion()
-        )
-        f.write("# %s\r\n" % self.version.Description())
-
-        # Project entries
-        sln_root = os.path.split(self.path)[0]
-        for e in all_entries:
-            relative_path = gyp.common.RelativePath(e.path, sln_root)
-            # msbuild does not accept an empty folder_name.
-            # use '.' in case relative_path is empty.
-            folder_name = relative_path.replace("/", "\\") or "."
-            f.write(
-                'Project("%s") = "%s", "%s", "%s"\r\n'
-                % (
-                    e.entry_type_guid,  # Entry type GUID
-                    e.name,  # Folder name
-                    folder_name,  # Folder name (again)
-                    e.get_guid(),  # Entry GUID
-                )
-            )
-
-            # TODO(rspangler): Need a way to configure this stuff
-            if self.websiteProperties:
-                f.write(
-                    "\tProjectSection(WebsiteProperties) = preProject\r\n"
-                    '\t\tDebug.AspNetCompiler.Debug = "True"\r\n'
-                    '\t\tRelease.AspNetCompiler.Debug = "False"\r\n'
-                    "\tEndProjectSection\r\n"
-                )
-
-            if isinstance(e, MSVSFolder) and e.items:
-                f.write("\tProjectSection(SolutionItems) = preProject\r\n")
-                for i in e.items:
-                    f.write(f"\t\t{i} = {i}\r\n")
-                f.write("\tEndProjectSection\r\n")
-
-            if isinstance(e, MSVSProject) and e.dependencies:
-                f.write("\tProjectSection(ProjectDependencies) = postProject\r\n")
-                for d in e.dependencies:
-                    f.write(f"\t\t{d.get_guid()} = {d.get_guid()}\r\n")
-                f.write("\tEndProjectSection\r\n")
-
-            f.write("EndProject\r\n")
-
-        # Global section
-        f.write("Global\r\n")
-
-        # Configurations (variants)
-        f.write("\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\r\n")
-        for v in self.variants:
-            f.write(f"\t\t{v} = {v}\r\n")
-        f.write("\tEndGlobalSection\r\n")
-
-        # Sort config guids for easier diffing of solution changes.
-        config_guids = []
-        config_guids_overrides = {}
-        for e in all_entries:
-            if isinstance(e, MSVSProject):
-                config_guids.append(e.get_guid())
-                config_guids_overrides[e.get_guid()] = e.config_platform_overrides
-        config_guids.sort()
-
-        f.write("\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\r\n")
-        for g in config_guids:
-            for v in self.variants:
-                nv = config_guids_overrides[g].get(v, v)
-                # Pick which project configuration to build for this solution
-                # configuration.
-                f.write(
-                    "\t\t%s.%s.ActiveCfg = %s\r\n"
-                    % (
-                        g,  # Project GUID
-                        v,  # Solution build configuration
-                        nv,  # Project build config for that solution config
-                    )
-                )
-
-                # Enable project in this solution configuration.
-                f.write(
-                    "\t\t%s.%s.Build.0 = %s\r\n"
-                    % (
-                        g,  # Project GUID
-                        v,  # Solution build configuration
-                        nv,  # Project build config for that solution config
-                    )
-                )
-        f.write("\tEndGlobalSection\r\n")
-
-        # TODO(rspangler): Should be able to configure this stuff too (though I've
-        # never seen this be any different)
-        f.write("\tGlobalSection(SolutionProperties) = preSolution\r\n")
-        f.write("\t\tHideSolutionNode = FALSE\r\n")
-        f.write("\tEndGlobalSection\r\n")
-
-        # Folder mappings
-        # Omit this section if there are no folders
-        if any(e.entries for e in all_entries if isinstance(e, MSVSFolder)):
-            f.write("\tGlobalSection(NestedProjects) = preSolution\r\n")
-            for e in all_entries:
-                if not isinstance(e, MSVSFolder):
-                    continue  # Does not apply to projects, only folders
-                for subentry in e.entries:
-                    f.write(f"\t\t{subentry.get_guid()} = {e.get_guid()}\r\n")
-            f.write("\tEndGlobalSection\r\n")
-
-        f.write("EndGlobal\r\n")
-
-        f.close()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
deleted file mode 100644
index 629f3f6..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
+++ /dev/null
@@ -1,206 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio project reader/writer."""
-
-import gyp.easy_xml as easy_xml
-
-# ------------------------------------------------------------------------------
-
-
-class Tool:
-    """Visual Studio tool."""
-
-    def __init__(self, name, attrs=None):
-        """Initializes the tool.
-
-    Args:
-      name: Tool name.
-      attrs: Dict of tool attributes; may be None.
-    """
-        self._attrs = attrs or {}
-        self._attrs["Name"] = name
-
-    def _GetSpecification(self):
-        """Creates an element for the tool.
-
-    Returns:
-      A new xml.dom.Element for the tool.
-    """
-        return ["Tool", self._attrs]
-
-
-class Filter:
-    """Visual Studio filter - that is, a virtual folder."""
-
-    def __init__(self, name, contents=None):
-        """Initializes the folder.
-
-    Args:
-      name: Filter (folder) name.
-      contents: List of filenames and/or Filter objects contained.
-    """
-        self.name = name
-        self.contents = list(contents or [])
-
-
-# ------------------------------------------------------------------------------
-
-
-class Writer:
-    """Visual Studio XML project writer."""
-
-    def __init__(self, project_path, version, name, guid=None, platforms=None):
-        """Initializes the project.
-
-    Args:
-      project_path: Path to the project file.
-      version: Format version to emit.
-      name: Name of the project.
-      guid: GUID to use for project, if not None.
-      platforms: Array of string, the supported platforms.  If null, ['Win32']
-    """
-        self.project_path = project_path
-        self.version = version
-        self.name = name
-        self.guid = guid
-
-        # Default to Win32 for platforms.
-        if not platforms:
-            platforms = ["Win32"]
-
-        # Initialize the specifications of the various sections.
-        self.platform_section = ["Platforms"]
-        for platform in platforms:
-            self.platform_section.append(["Platform", {"Name": platform}])
-        self.tool_files_section = ["ToolFiles"]
-        self.configurations_section = ["Configurations"]
-        self.files_section = ["Files"]
-
-        # Keep a dict keyed on filename to speed up access.
-        self.files_dict = {}
-
-    def AddToolFile(self, path):
-        """Adds a tool file to the project.
-
-    Args:
-      path: Relative path from project to tool file.
-    """
-        self.tool_files_section.append(["ToolFile", {"RelativePath": path}])
-
-    def _GetSpecForConfiguration(self, config_type, config_name, attrs, tools):
-        """Returns the specification for a configuration.
-
-    Args:
-      config_type: Type of configuration node.
-      config_name: Configuration name.
-      attrs: Dict of configuration attributes; may be None.
-      tools: List of tools (strings or Tool objects); may be None.
-    Returns:
-    """
-        # Handle defaults
-        if not attrs:
-            attrs = {}
-        if not tools:
-            tools = []
-
-        # Add configuration node and its attributes
-        node_attrs = attrs.copy()
-        node_attrs["Name"] = config_name
-        specification = [config_type, node_attrs]
-
-        # Add tool nodes and their attributes
-        if tools:
-            for t in tools:
-                if isinstance(t, Tool):
-                    specification.append(t._GetSpecification())
-                else:
-                    specification.append(Tool(t)._GetSpecification())
-        return specification
-
-    def AddConfig(self, name, attrs=None, tools=None):
-        """Adds a configuration to the project.
-
-    Args:
-      name: Configuration name.
-      attrs: Dict of configuration attributes; may be None.
-      tools: List of tools (strings or Tool objects); may be None.
-    """
-        spec = self._GetSpecForConfiguration("Configuration", name, attrs, tools)
-        self.configurations_section.append(spec)
-
-    def _AddFilesToNode(self, parent, files):
-        """Adds files and/or filters to the parent node.
-
-    Args:
-      parent: Destination node
-      files: A list of Filter objects and/or relative paths to files.
-
-    Will call itself recursively, if the files list contains Filter objects.
-    """
-        for f in files:
-            if isinstance(f, Filter):
-                node = ["Filter", {"Name": f.name}]
-                self._AddFilesToNode(node, f.contents)
-            else:
-                node = ["File", {"RelativePath": f}]
-                self.files_dict[f] = node
-            parent.append(node)
-
-    def AddFiles(self, files):
-        """Adds files to the project.
-
-    Args:
-      files: A list of Filter objects and/or relative paths to files.
-
-    This makes a copy of the file/filter tree at the time of this call.  If you
-    later add files to a Filter object which was passed into a previous call
-    to AddFiles(), it will not be reflected in this project.
-    """
-        self._AddFilesToNode(self.files_section, files)
-        # TODO(rspangler) This also doesn't handle adding files to an existing
-        # filter.  That is, it doesn't merge the trees.
-
-    def AddFileConfig(self, path, config, attrs=None, tools=None):
-        """Adds a configuration to a file.
-
-    Args:
-      path: Relative path to the file.
-      config: Name of configuration to add.
-      attrs: Dict of configuration attributes; may be None.
-      tools: List of tools (strings or Tool objects); may be None.
-
-    Raises:
-      ValueError: Relative path does not match any file added via AddFiles().
-    """
-        # Find the file node with the right relative path
-        parent = self.files_dict.get(path)
-        if not parent:
-            raise ValueError('AddFileConfig: file "%s" not in project.' % path)
-
-        # Add the config to the file node
-        spec = self._GetSpecForConfiguration("FileConfiguration", config, attrs, tools)
-        parent.append(spec)
-
-    def WriteIfChanged(self):
-        """Writes the project file."""
-        # First create XML content definition
-        content = [
-            "VisualStudioProject",
-            {
-                "ProjectType": "Visual C++",
-                "Version": self.version.ProjectVersion(),
-                "Name": self.name,
-                "ProjectGUID": self.guid,
-                "RootNamespace": self.name,
-                "Keyword": "Win32Proj",
-            },
-            self.platform_section,
-            self.tool_files_section,
-            self.configurations_section,
-            ["References"],  # empty section
-            self.files_section,
-            ["Globals"],  # empty section
-        ]
-        easy_xml.WriteXmlIfChanged(content, self.project_path, encoding="Windows-1252")
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
deleted file mode 100644
index 93633db..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
+++ /dev/null
@@ -1,1270 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-r"""Code to validate and convert settings of the Microsoft build tools.
-
-This file contains code to validate and convert settings of the Microsoft
-build tools.  The function ConvertToMSBuildSettings(), ValidateMSVSSettings(),
-and ValidateMSBuildSettings() are the entry points.
-
-This file was created by comparing the projects created by Visual Studio 2008
-and Visual Studio 2010 for all available settings through the user interface.
-The MSBuild schemas were also considered.  They are typically found in the
-MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild
-"""
-
-import re
-import sys
-
-# Dictionaries of settings validators. The key is the tool name, the value is
-# a dictionary mapping setting names to validation functions.
-_msvs_validators = {}
-_msbuild_validators = {}
-
-
-# A dictionary of settings converters. The key is the tool name, the value is
-# a dictionary mapping setting names to conversion functions.
-_msvs_to_msbuild_converters = {}
-
-
-# Tool name mapping from MSVS to MSBuild.
-_msbuild_name_of_tool = {}
-
-
-class _Tool:
-    """Represents a tool used by MSVS or MSBuild.
-
-  Attributes:
-      msvs_name: The name of the tool in MSVS.
-      msbuild_name: The name of the tool in MSBuild.
-  """
-
-    def __init__(self, msvs_name, msbuild_name):
-        self.msvs_name = msvs_name
-        self.msbuild_name = msbuild_name
-
-
-def _AddTool(tool):
-    """Adds a tool to the four dictionaries used to process settings.
-
-  This only defines the tool.  Each setting also needs to be added.
-
-  Args:
-    tool: The _Tool object to be added.
-  """
-    _msvs_validators[tool.msvs_name] = {}
-    _msbuild_validators[tool.msbuild_name] = {}
-    _msvs_to_msbuild_converters[tool.msvs_name] = {}
-    _msbuild_name_of_tool[tool.msvs_name] = tool.msbuild_name
-
-
-def _GetMSBuildToolSettings(msbuild_settings, tool):
-    """Returns an MSBuild tool dictionary.  Creates it if needed."""
-    return msbuild_settings.setdefault(tool.msbuild_name, {})
-
-
-class _Type:
-    """Type of settings (Base class)."""
-
-    def ValidateMSVS(self, value):
-        """Verifies that the value is legal for MSVS.
-
-    Args:
-      value: the value to check for this type.
-
-    Raises:
-      ValueError if value is not valid for MSVS.
-    """
-
-    def ValidateMSBuild(self, value):
-        """Verifies that the value is legal for MSBuild.
-
-    Args:
-      value: the value to check for this type.
-
-    Raises:
-      ValueError if value is not valid for MSBuild.
-    """
-
-    def ConvertToMSBuild(self, value):
-        """Returns the MSBuild equivalent of the MSVS value given.
-
-    Args:
-      value: the MSVS value to convert.
-
-    Returns:
-      the MSBuild equivalent.
-
-    Raises:
-      ValueError if value is not valid.
-    """
-        return value
-
-
-class _String(_Type):
-    """A setting that's just a string."""
-
-    def ValidateMSVS(self, value):
-        if not isinstance(value, str):
-            raise ValueError("expected string; got %r" % value)
-
-    def ValidateMSBuild(self, value):
-        if not isinstance(value, str):
-            raise ValueError("expected string; got %r" % value)
-
-    def ConvertToMSBuild(self, value):
-        # Convert the macros
-        return ConvertVCMacrosToMSBuild(value)
-
-
-class _StringList(_Type):
-    """A settings that's a list of strings."""
-
-    def ValidateMSVS(self, value):
-        if not isinstance(value, (list, str)):
-            raise ValueError("expected string list; got %r" % value)
-
-    def ValidateMSBuild(self, value):
-        if not isinstance(value, (list, str)):
-            raise ValueError("expected string list; got %r" % value)
-
-    def ConvertToMSBuild(self, value):
-        # Convert the macros
-        if isinstance(value, list):
-            return [ConvertVCMacrosToMSBuild(i) for i in value]
-        else:
-            return ConvertVCMacrosToMSBuild(value)
-
-
-class _Boolean(_Type):
-    """Boolean settings, can have the values 'false' or 'true'."""
-
-    def _Validate(self, value):
-        if value not in {"true", "false"}:
-            raise ValueError("expected bool; got %r" % value)
-
-    def ValidateMSVS(self, value):
-        self._Validate(value)
-
-    def ValidateMSBuild(self, value):
-        self._Validate(value)
-
-    def ConvertToMSBuild(self, value):
-        self._Validate(value)
-        return value
-
-
-class _Integer(_Type):
-    """Integer settings."""
-
-    def __init__(self, msbuild_base=10):
-        _Type.__init__(self)
-        self._msbuild_base = msbuild_base
-
-    def ValidateMSVS(self, value):
-        # Try to convert, this will raise ValueError if invalid.
-        self.ConvertToMSBuild(value)
-
-    def ValidateMSBuild(self, value):
-        # Try to convert, this will raise ValueError if invalid.
-        int(value, self._msbuild_base)
-
-    def ConvertToMSBuild(self, value):
-        msbuild_format = (self._msbuild_base == 10) and "%d" or "0x%04x"
-        return msbuild_format % int(value)
-
-
-class _Enumeration(_Type):
-    """Type of settings that is an enumeration.
-
-  In MSVS, the values are indexes like '0', '1', and '2'.
-  MSBuild uses text labels that are more representative, like 'Win32'.
-
-  Constructor args:
-    label_list: an array of MSBuild labels that correspond to the MSVS index.
-        In the rare cases where MSVS has skipped an index value, None is
-        used in the array to indicate the unused spot.
-    new: an array of labels that are new to MSBuild.
-  """
-
-    def __init__(self, label_list, new=None):
-        _Type.__init__(self)
-        self._label_list = label_list
-        self._msbuild_values = {value for value in label_list if value is not None}
-        if new is not None:
-            self._msbuild_values.update(new)
-
-    def ValidateMSVS(self, value):
-        # Try to convert.  It will raise an exception if not valid.
-        self.ConvertToMSBuild(value)
-
-    def ValidateMSBuild(self, value):
-        if value not in self._msbuild_values:
-            raise ValueError("unrecognized enumerated value %s" % value)
-
-    def ConvertToMSBuild(self, value):
-        index = int(value)
-        if index < 0 or index >= len(self._label_list):
-            raise ValueError(
-                "index value (%d) not in expected range [0, %d)"
-                % (index, len(self._label_list))
-            )
-        label = self._label_list[index]
-        if label is None:
-            raise ValueError("converted value for %s not specified." % value)
-        return label
-
-
-# Instantiate the various generic types.
-_boolean = _Boolean()
-_integer = _Integer()
-# For now, we don't do any special validation on these types:
-_string = _String()
-_file_name = _String()
-_folder_name = _String()
-_file_list = _StringList()
-_folder_list = _StringList()
-_string_list = _StringList()
-# Some boolean settings went from numerical values to boolean.  The
-# mapping is 0: default, 1: false, 2: true.
-_newly_boolean = _Enumeration(["", "false", "true"])
-
-
-def _Same(tool, name, setting_type):
-    """Defines a setting that has the same name in MSVS and MSBuild.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    name: the name of the setting.
-    setting_type: the type of this setting.
-  """
-    _Renamed(tool, name, name, setting_type)
-
-
-def _Renamed(tool, msvs_name, msbuild_name, setting_type):
-    """Defines a setting for which the name has changed.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    msvs_name: the name of the MSVS setting.
-    msbuild_name: the name of the MSBuild setting.
-    setting_type: the type of this setting.
-  """
-
-    def _Translate(value, msbuild_settings):
-        msbuild_tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
-        msbuild_tool_settings[msbuild_name] = setting_type.ConvertToMSBuild(value)
-
-    _msvs_validators[tool.msvs_name][msvs_name] = setting_type.ValidateMSVS
-    _msbuild_validators[tool.msbuild_name][msbuild_name] = setting_type.ValidateMSBuild
-    _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-def _Moved(tool, settings_name, msbuild_tool_name, setting_type):
-    _MovedAndRenamed(
-        tool, settings_name, msbuild_tool_name, settings_name, setting_type
-    )
-
-
-def _MovedAndRenamed(
-    tool, msvs_settings_name, msbuild_tool_name, msbuild_settings_name, setting_type
-):
-    """Defines a setting that may have moved to a new section.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    msvs_settings_name: the MSVS name of the setting.
-    msbuild_tool_name: the name of the MSBuild tool to place the setting under.
-    msbuild_settings_name: the MSBuild name of the setting.
-    setting_type: the type of this setting.
-  """
-
-    def _Translate(value, msbuild_settings):
-        tool_settings = msbuild_settings.setdefault(msbuild_tool_name, {})
-        tool_settings[msbuild_settings_name] = setting_type.ConvertToMSBuild(value)
-
-    _msvs_validators[tool.msvs_name][msvs_settings_name] = setting_type.ValidateMSVS
-    validator = setting_type.ValidateMSBuild
-    _msbuild_validators[msbuild_tool_name][msbuild_settings_name] = validator
-    _msvs_to_msbuild_converters[tool.msvs_name][msvs_settings_name] = _Translate
-
-
-def _MSVSOnly(tool, name, setting_type):
-    """Defines a setting that is only found in MSVS.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    name: the name of the setting.
-    setting_type: the type of this setting.
-  """
-
-    def _Translate(unused_value, unused_msbuild_settings):
-        # Since this is for MSVS only settings, no translation will happen.
-        pass
-
-    _msvs_validators[tool.msvs_name][name] = setting_type.ValidateMSVS
-    _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
-
-
-def _MSBuildOnly(tool, name, setting_type):
-    """Defines a setting that is only found in MSBuild.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    name: the name of the setting.
-    setting_type: the type of this setting.
-  """
-
-    def _Translate(value, msbuild_settings):
-        # Let msbuild-only properties get translated as-is from msvs_settings.
-        tool_settings = msbuild_settings.setdefault(tool.msbuild_name, {})
-        tool_settings[name] = value
-
-    _msbuild_validators[tool.msbuild_name][name] = setting_type.ValidateMSBuild
-    _msvs_to_msbuild_converters[tool.msvs_name][name] = _Translate
-
-
-def _ConvertedToAdditionalOption(tool, msvs_name, flag):
-    """Defines a setting that's handled via a command line option in MSBuild.
-
-  Args:
-    tool: a dictionary that gives the names of the tool for MSVS and MSBuild.
-    msvs_name: the name of the MSVS setting that if 'true' becomes a flag
-    flag: the flag to insert at the end of the AdditionalOptions
-  """
-
-    def _Translate(value, msbuild_settings):
-        if value == "true":
-            tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
-            if "AdditionalOptions" in tool_settings:
-                new_flags = "{} {}".format(tool_settings["AdditionalOptions"], flag)
-            else:
-                new_flags = flag
-            tool_settings["AdditionalOptions"] = new_flags
-
-    _msvs_validators[tool.msvs_name][msvs_name] = _boolean.ValidateMSVS
-    _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-def _CustomGeneratePreprocessedFile(tool, msvs_name):
-    def _Translate(value, msbuild_settings):
-        tool_settings = _GetMSBuildToolSettings(msbuild_settings, tool)
-        if value == "0":
-            tool_settings["PreprocessToFile"] = "false"
-            tool_settings["PreprocessSuppressLineNumbers"] = "false"
-        elif value == "1":  # /P
-            tool_settings["PreprocessToFile"] = "true"
-            tool_settings["PreprocessSuppressLineNumbers"] = "false"
-        elif value == "2":  # /EP /P
-            tool_settings["PreprocessToFile"] = "true"
-            tool_settings["PreprocessSuppressLineNumbers"] = "true"
-        else:
-            raise ValueError("value must be one of [0, 1, 2]; got %s" % value)
-
-    # Create a bogus validator that looks for '0', '1', or '2'
-    msvs_validator = _Enumeration(["a", "b", "c"]).ValidateMSVS
-    _msvs_validators[tool.msvs_name][msvs_name] = msvs_validator
-    msbuild_validator = _boolean.ValidateMSBuild
-    msbuild_tool_validators = _msbuild_validators[tool.msbuild_name]
-    msbuild_tool_validators["PreprocessToFile"] = msbuild_validator
-    msbuild_tool_validators["PreprocessSuppressLineNumbers"] = msbuild_validator
-    _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate
-
-
-fix_vc_macro_slashes_regex_list = ("IntDir", "OutDir")
-fix_vc_macro_slashes_regex = re.compile(
-    r"(\$\((?:%s)\))(?:[\\/]+)" % "|".join(fix_vc_macro_slashes_regex_list)
-)
-
-# Regular expression to detect keys that were generated by exclusion lists
-_EXCLUDED_SUFFIX_RE = re.compile("^(.*)_excluded$")
-
-
-def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr):
-    """Verify that 'setting' is valid if it is generated from an exclusion list.
-
-  If the setting appears to be generated from an exclusion list, the root name
-  is checked.
-
-  Args:
-      setting:   A string that is the setting name to validate
-      settings:  A dictionary where the keys are valid settings
-      error_msg: The message to emit in the event of error
-      stderr:    The stream receiving the error messages.
-  """
-    # This may be unrecognized because it's an exclusion list. If the
-    # setting name has the _excluded suffix, then check the root name.
-    unrecognized = True
-    m = re.match(_EXCLUDED_SUFFIX_RE, setting)
-    if m:
-        root_setting = m.group(1)
-        unrecognized = root_setting not in settings
-
-    if unrecognized:
-        # We don't know this setting. Give a warning.
-        print(error_msg, file=stderr)
-
-
-def FixVCMacroSlashes(s):
-    """Replace macros which have excessive following slashes.
-
-  These macros are known to have a built-in trailing slash. Furthermore, many
-  scripts hiccup on processing paths with extra slashes in the middle.
-
-  This list is probably not exhaustive.  Add as needed.
-  """
-    if "$" in s:
-        s = fix_vc_macro_slashes_regex.sub(r"\1", s)
-    return s
-
-
-def ConvertVCMacrosToMSBuild(s):
-    """Convert the MSVS macros found in the string to the MSBuild equivalent.
-
-  This list is probably not exhaustive.  Add as needed.
-  """
-    if "$" in s:
-        replace_map = {
-            "$(ConfigurationName)": "$(Configuration)",
-            "$(InputDir)": "%(RelativeDir)",
-            "$(InputExt)": "%(Extension)",
-            "$(InputFileName)": "%(Filename)%(Extension)",
-            "$(InputName)": "%(Filename)",
-            "$(InputPath)": "%(Identity)",
-            "$(ParentName)": "$(ProjectFileName)",
-            "$(PlatformName)": "$(Platform)",
-            "$(SafeInputName)": "%(Filename)",
-        }
-        for old, new in replace_map.items():
-            s = s.replace(old, new)
-        s = FixVCMacroSlashes(s)
-    return s
-
-
-def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr):
-    """Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
-
-  Args:
-      msvs_settings: A dictionary.  The key is the tool name.  The values are
-          themselves dictionaries of settings and their values.
-      stderr: The stream receiving the error messages.
-
-  Returns:
-      A dictionary of MSBuild settings.  The key is either the MSBuild tool name
-      or the empty string (for the global settings).  The values are themselves
-      dictionaries of settings and their values.
-  """
-    msbuild_settings = {}
-    for msvs_tool_name, msvs_tool_settings in msvs_settings.items():
-        if msvs_tool_name in _msvs_to_msbuild_converters:
-            msvs_tool = _msvs_to_msbuild_converters[msvs_tool_name]
-            for msvs_setting, msvs_value in msvs_tool_settings.items():
-                if msvs_setting in msvs_tool:
-                    # Invoke the translation function.
-                    try:
-                        msvs_tool[msvs_setting](msvs_value, msbuild_settings)
-                    except ValueError as e:
-                        print(
-                            "Warning: while converting %s/%s to MSBuild, "
-                            "%s" % (msvs_tool_name, msvs_setting, e),
-                            file=stderr,
-                        )
-                else:
-                    _ValidateExclusionSetting(
-                        msvs_setting,
-                        msvs_tool,
-                        (
-                            "Warning: unrecognized setting %s/%s "
-                            "while converting to MSBuild."
-                            % (msvs_tool_name, msvs_setting)
-                        ),
-                        stderr,
-                    )
-        else:
-            print(
-                "Warning: unrecognized tool %s while converting to "
-                "MSBuild." % msvs_tool_name,
-                file=stderr,
-            )
-    return msbuild_settings
-
-
-def ValidateMSVSSettings(settings, stderr=sys.stderr):
-    """Validates that the names of the settings are valid for MSVS.
-
-  Args:
-      settings: A dictionary.  The key is the tool name.  The values are
-          themselves dictionaries of settings and their values.
-      stderr: The stream receiving the error messages.
-  """
-    _ValidateSettings(_msvs_validators, settings, stderr)
-
-
-def ValidateMSBuildSettings(settings, stderr=sys.stderr):
-    """Validates that the names of the settings are valid for MSBuild.
-
-  Args:
-      settings: A dictionary.  The key is the tool name.  The values are
-          themselves dictionaries of settings and their values.
-      stderr: The stream receiving the error messages.
-  """
-    _ValidateSettings(_msbuild_validators, settings, stderr)
-
-
-def _ValidateSettings(validators, settings, stderr):
-    """Validates that the settings are valid for MSBuild or MSVS.
-
-  We currently only validate the names of the settings, not their values.
-
-  Args:
-      validators: A dictionary of tools and their validators.
-      settings: A dictionary.  The key is the tool name.  The values are
-          themselves dictionaries of settings and their values.
-      stderr: The stream receiving the error messages.
-  """
-    for tool_name in settings:
-        if tool_name in validators:
-            tool_validators = validators[tool_name]
-            for setting, value in settings[tool_name].items():
-                if setting in tool_validators:
-                    try:
-                        tool_validators[setting](value)
-                    except ValueError as e:
-                        print(
-                            f"Warning: for {tool_name}/{setting}, {e}",
-                            file=stderr,
-                        )
-                else:
-                    _ValidateExclusionSetting(
-                        setting,
-                        tool_validators,
-                        (f"Warning: unrecognized setting {tool_name}/{setting}"),
-                        stderr,
-                    )
-
-        else:
-            print("Warning: unrecognized tool %s" % (tool_name), file=stderr)
-
-
-# MSVS and MBuild names of the tools.
-_compile = _Tool("VCCLCompilerTool", "ClCompile")
-_link = _Tool("VCLinkerTool", "Link")
-_midl = _Tool("VCMIDLTool", "Midl")
-_rc = _Tool("VCResourceCompilerTool", "ResourceCompile")
-_lib = _Tool("VCLibrarianTool", "Lib")
-_manifest = _Tool("VCManifestTool", "Manifest")
-_masm = _Tool("MASM", "MASM")
-_armasm = _Tool("ARMASM", "ARMASM")
-
-
-_AddTool(_compile)
-_AddTool(_link)
-_AddTool(_midl)
-_AddTool(_rc)
-_AddTool(_lib)
-_AddTool(_manifest)
-_AddTool(_masm)
-_AddTool(_armasm)
-# Add sections only found in the MSBuild settings.
-_msbuild_validators[""] = {}
-_msbuild_validators["ProjectReference"] = {}
-_msbuild_validators["ManifestResourceCompile"] = {}
-
-# Descriptions of the compiler options, i.e. VCCLCompilerTool in MSVS and
-# ClCompile in MSBuild.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\cl.xml" for
-# the schema of the MSBuild ClCompile settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_compile, "AdditionalIncludeDirectories", _folder_list)  # /I
-_Same(_compile, "AdditionalOptions", _string_list)
-_Same(_compile, "AdditionalUsingDirectories", _folder_list)  # /AI
-_Same(_compile, "AssemblerListingLocation", _file_name)  # /Fa
-_Same(_compile, "BrowseInformationFile", _file_name)
-_Same(_compile, "BufferSecurityCheck", _boolean)  # /GS
-_Same(_compile, "DisableLanguageExtensions", _boolean)  # /Za
-_Same(_compile, "DisableSpecificWarnings", _string_list)  # /wd
-_Same(_compile, "EnableFiberSafeOptimizations", _boolean)  # /GT
-_Same(_compile, "EnablePREfast", _boolean)  # /analyze Visible='false'
-_Same(_compile, "ExpandAttributedSource", _boolean)  # /Fx
-_Same(_compile, "FloatingPointExceptions", _boolean)  # /fp:except
-_Same(_compile, "ForceConformanceInForLoopScope", _boolean)  # /Zc:forScope
-_Same(_compile, "ForcedIncludeFiles", _file_list)  # /FI
-_Same(_compile, "ForcedUsingFiles", _file_list)  # /FU
-_Same(_compile, "GenerateXMLDocumentationFiles", _boolean)  # /doc
-_Same(_compile, "IgnoreStandardIncludePath", _boolean)  # /X
-_Same(_compile, "MinimalRebuild", _boolean)  # /Gm
-_Same(_compile, "OmitDefaultLibName", _boolean)  # /Zl
-_Same(_compile, "OmitFramePointers", _boolean)  # /Oy
-_Same(_compile, "PreprocessorDefinitions", _string_list)  # /D
-_Same(_compile, "ProgramDataBaseFileName", _file_name)  # /Fd
-_Same(_compile, "RuntimeTypeInfo", _boolean)  # /GR
-_Same(_compile, "ShowIncludes", _boolean)  # /showIncludes
-_Same(_compile, "SmallerTypeCheck", _boolean)  # /RTCc
-_Same(_compile, "StringPooling", _boolean)  # /GF
-_Same(_compile, "SuppressStartupBanner", _boolean)  # /nologo
-_Same(_compile, "TreatWChar_tAsBuiltInType", _boolean)  # /Zc:wchar_t
-_Same(_compile, "UndefineAllPreprocessorDefinitions", _boolean)  # /u
-_Same(_compile, "UndefinePreprocessorDefinitions", _string_list)  # /U
-_Same(_compile, "UseFullPaths", _boolean)  # /FC
-_Same(_compile, "WholeProgramOptimization", _boolean)  # /GL
-_Same(_compile, "XMLDocumentationFileName", _file_name)
-_Same(_compile, "CompileAsWinRT", _boolean)  # /ZW
-
-_Same(
-    _compile,
-    "AssemblerOutput",
-    _Enumeration(
-        [
-            "NoListing",
-            "AssemblyCode",  # /FA
-            "All",  # /FAcs
-            "AssemblyAndMachineCode",  # /FAc
-            "AssemblyAndSourceCode",
-        ]
-    ),
-)  # /FAs
-_Same(
-    _compile,
-    "BasicRuntimeChecks",
-    _Enumeration(
-        [
-            "Default",
-            "StackFrameRuntimeCheck",  # /RTCs
-            "UninitializedLocalUsageCheck",  # /RTCu
-            "EnableFastChecks",
-        ]
-    ),
-)  # /RTC1
-_Same(
-    _compile, "BrowseInformation", _Enumeration(["false", "true", "true"])  # /FR
-)  # /Fr
-_Same(
-    _compile,
-    "CallingConvention",
-    _Enumeration(["Cdecl", "FastCall", "StdCall", "VectorCall"]),  # /Gd  # /Gr  # /Gz
-)  # /Gv
-_Same(
-    _compile,
-    "CompileAs",
-    _Enumeration(["Default", "CompileAsC", "CompileAsCpp"]),  # /TC
-)  # /TP
-_Same(
-    _compile,
-    "DebugInformationFormat",
-    _Enumeration(
-        [
-            "",  # Disabled
-            "OldStyle",  # /Z7
-            None,
-            "ProgramDatabase",  # /Zi
-            "EditAndContinue",
-        ]
-    ),
-)  # /ZI
-_Same(
-    _compile,
-    "EnableEnhancedInstructionSet",
-    _Enumeration(
-        [
-            "NotSet",
-            "StreamingSIMDExtensions",  # /arch:SSE
-            "StreamingSIMDExtensions2",  # /arch:SSE2
-            "AdvancedVectorExtensions",  # /arch:AVX (vs2012+)
-            "NoExtensions",  # /arch:IA32 (vs2012+)
-            # This one only exists in the new msbuild format.
-            "AdvancedVectorExtensions2",  # /arch:AVX2 (vs2013r2+)
-        ]
-    ),
-)
-_Same(
-    _compile,
-    "ErrorReporting",
-    _Enumeration(
-        [
-            "None",  # /errorReport:none
-            "Prompt",  # /errorReport:prompt
-            "Queue",
-        ],  # /errorReport:queue
-        new=["Send"],
-    ),
-)  # /errorReport:send"
-_Same(
-    _compile,
-    "ExceptionHandling",
-    _Enumeration(["false", "Sync", "Async"], new=["SyncCThrow"]),  # /EHsc  # /EHa
-)  # /EHs
-_Same(
-    _compile, "FavorSizeOrSpeed", _Enumeration(["Neither", "Speed", "Size"])  # /Ot
-)  # /Os
-_Same(
-    _compile,
-    "FloatingPointModel",
-    _Enumeration(["Precise", "Strict", "Fast"]),  # /fp:precise  # /fp:strict
-)  # /fp:fast
-_Same(
-    _compile,
-    "InlineFunctionExpansion",
-    _Enumeration(
-        ["Default", "OnlyExplicitInline", "AnySuitable"],  # /Ob1  # /Ob2
-        new=["Disabled"],
-    ),
-)  # /Ob0
-_Same(
-    _compile,
-    "Optimization",
-    _Enumeration(["Disabled", "MinSpace", "MaxSpeed", "Full"]),  # /Od  # /O1  # /O2
-)  # /Ox
-_Same(
-    _compile,
-    "RuntimeLibrary",
-    _Enumeration(
-        [
-            "MultiThreaded",  # /MT
-            "MultiThreadedDebug",  # /MTd
-            "MultiThreadedDLL",  # /MD
-            "MultiThreadedDebugDLL",
-        ]
-    ),
-)  # /MDd
-_Same(
-    _compile,
-    "StructMemberAlignment",
-    _Enumeration(
-        [
-            "Default",
-            "1Byte",  # /Zp1
-            "2Bytes",  # /Zp2
-            "4Bytes",  # /Zp4
-            "8Bytes",  # /Zp8
-            "16Bytes",
-        ]
-    ),
-)  # /Zp16
-_Same(
-    _compile,
-    "WarningLevel",
-    _Enumeration(
-        [
-            "TurnOffAllWarnings",  # /W0
-            "Level1",  # /W1
-            "Level2",  # /W2
-            "Level3",  # /W3
-            "Level4",
-        ],  # /W4
-        new=["EnableAllWarnings"],
-    ),
-)  # /Wall
-
-# Options found in MSVS that have been renamed in MSBuild.
-_Renamed(
-    _compile, "EnableFunctionLevelLinking", "FunctionLevelLinking", _boolean
-)  # /Gy
-_Renamed(_compile, "EnableIntrinsicFunctions", "IntrinsicFunctions", _boolean)  # /Oi
-_Renamed(_compile, "KeepComments", "PreprocessKeepComments", _boolean)  # /C
-_Renamed(_compile, "ObjectFile", "ObjectFileName", _file_name)  # /Fo
-_Renamed(_compile, "OpenMP", "OpenMPSupport", _boolean)  # /openmp
-_Renamed(
-    _compile, "PrecompiledHeaderThrough", "PrecompiledHeaderFile", _file_name
-)  # Used with /Yc and /Yu
-_Renamed(
-    _compile, "PrecompiledHeaderFile", "PrecompiledHeaderOutputFile", _file_name
-)  # /Fp
-_Renamed(
-    _compile,
-    "UsePrecompiledHeader",
-    "PrecompiledHeader",
-    _Enumeration(
-        ["NotUsing", "Create", "Use"]  # VS recognized '' for this value too.  # /Yc
-    ),
-)  # /Yu
-_Renamed(_compile, "WarnAsError", "TreatWarningAsError", _boolean)  # /WX
-
-_ConvertedToAdditionalOption(_compile, "DefaultCharIsUnsigned", "/J")
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_compile, "Detect64BitPortabilityProblems", _boolean)
-_MSVSOnly(_compile, "UseUnicodeResponseFiles", _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_compile, "BuildingInIDE", _boolean)
-_MSBuildOnly(
-    _compile, "CompileAsManaged", _Enumeration([], new=["false", "true"])
-)  # /clr
-_MSBuildOnly(_compile, "CreateHotpatchableImage", _boolean)  # /hotpatch
-_MSBuildOnly(_compile, "MultiProcessorCompilation", _boolean)  # /MP
-_MSBuildOnly(_compile, "PreprocessOutputPath", _string)  # /Fi
-_MSBuildOnly(_compile, "ProcessorNumber", _integer)  # the number of processors
-_MSBuildOnly(_compile, "TrackerLogDirectory", _folder_name)
-_MSBuildOnly(_compile, "TreatSpecificWarningsAsErrors", _string_list)  # /we
-_MSBuildOnly(_compile, "UseUnicodeForAssemblerListing", _boolean)  # /FAu
-
-# Defines a setting that needs very customized processing
-_CustomGeneratePreprocessedFile(_compile, "GeneratePreprocessedFile")
-
-
-# Directives for converting MSVS VCLinkerTool to MSBuild Link.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\link.xml" for
-# the schema of the MSBuild Link settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_link, "AdditionalDependencies", _file_list)
-_Same(_link, "AdditionalLibraryDirectories", _folder_list)  # /LIBPATH
-#  /MANIFESTDEPENDENCY:
-_Same(_link, "AdditionalManifestDependencies", _file_list)
-_Same(_link, "AdditionalOptions", _string_list)
-_Same(_link, "AddModuleNamesToAssembly", _file_list)  # /ASSEMBLYMODULE
-_Same(_link, "AllowIsolation", _boolean)  # /ALLOWISOLATION
-_Same(_link, "AssemblyLinkResource", _file_list)  # /ASSEMBLYLINKRESOURCE
-_Same(_link, "BaseAddress", _string)  # /BASE
-_Same(_link, "CLRUnmanagedCodeCheck", _boolean)  # /CLRUNMANAGEDCODECHECK
-_Same(_link, "DelayLoadDLLs", _file_list)  # /DELAYLOAD
-_Same(_link, "DelaySign", _boolean)  # /DELAYSIGN
-_Same(_link, "EmbedManagedResourceFile", _file_list)  # /ASSEMBLYRESOURCE
-_Same(_link, "EnableUAC", _boolean)  # /MANIFESTUAC
-_Same(_link, "EntryPointSymbol", _string)  # /ENTRY
-_Same(_link, "ForceSymbolReferences", _file_list)  # /INCLUDE
-_Same(_link, "FunctionOrder", _file_name)  # /ORDER
-_Same(_link, "GenerateDebugInformation", _boolean)  # /DEBUG
-_Same(_link, "GenerateMapFile", _boolean)  # /MAP
-_Same(_link, "HeapCommitSize", _string)
-_Same(_link, "HeapReserveSize", _string)  # /HEAP
-_Same(_link, "IgnoreAllDefaultLibraries", _boolean)  # /NODEFAULTLIB
-_Same(_link, "IgnoreEmbeddedIDL", _boolean)  # /IGNOREIDL
-_Same(_link, "ImportLibrary", _file_name)  # /IMPLIB
-_Same(_link, "KeyContainer", _file_name)  # /KEYCONTAINER
-_Same(_link, "KeyFile", _file_name)  # /KEYFILE
-_Same(_link, "ManifestFile", _file_name)  # /ManifestFile
-_Same(_link, "MapExports", _boolean)  # /MAPINFO:EXPORTS
-_Same(_link, "MapFileName", _file_name)
-_Same(_link, "MergedIDLBaseFileName", _file_name)  # /IDLOUT
-_Same(_link, "MergeSections", _string)  # /MERGE
-_Same(_link, "MidlCommandFile", _file_name)  # /MIDL
-_Same(_link, "ModuleDefinitionFile", _file_name)  # /DEF
-_Same(_link, "OutputFile", _file_name)  # /OUT
-_Same(_link, "PerUserRedirection", _boolean)
-_Same(_link, "Profile", _boolean)  # /PROFILE
-_Same(_link, "ProfileGuidedDatabase", _file_name)  # /PGD
-_Same(_link, "ProgramDatabaseFile", _file_name)  # /PDB
-_Same(_link, "RegisterOutput", _boolean)
-_Same(_link, "SetChecksum", _boolean)  # /RELEASE
-_Same(_link, "StackCommitSize", _string)
-_Same(_link, "StackReserveSize", _string)  # /STACK
-_Same(_link, "StripPrivateSymbols", _file_name)  # /PDBSTRIPPED
-_Same(_link, "SupportUnloadOfDelayLoadedDLL", _boolean)  # /DELAY:UNLOAD
-_Same(_link, "SuppressStartupBanner", _boolean)  # /NOLOGO
-_Same(_link, "SwapRunFromCD", _boolean)  # /SWAPRUN:CD
-_Same(_link, "TurnOffAssemblyGeneration", _boolean)  # /NOASSEMBLY
-_Same(_link, "TypeLibraryFile", _file_name)  # /TLBOUT
-_Same(_link, "TypeLibraryResourceID", _integer)  # /TLBID
-_Same(_link, "UACUIAccess", _boolean)  # /uiAccess='true'
-_Same(_link, "Version", _string)  # /VERSION
-
-_Same(_link, "EnableCOMDATFolding", _newly_boolean)  # /OPT:ICF
-_Same(_link, "FixedBaseAddress", _newly_boolean)  # /FIXED
-_Same(_link, "LargeAddressAware", _newly_boolean)  # /LARGEADDRESSAWARE
-_Same(_link, "OptimizeReferences", _newly_boolean)  # /OPT:REF
-_Same(_link, "RandomizedBaseAddress", _newly_boolean)  # /DYNAMICBASE
-_Same(_link, "TerminalServerAware", _newly_boolean)  # /TSAWARE
-
-_subsystem_enumeration = _Enumeration(
-    [
-        "NotSet",
-        "Console",  # /SUBSYSTEM:CONSOLE
-        "Windows",  # /SUBSYSTEM:WINDOWS
-        "Native",  # /SUBSYSTEM:NATIVE
-        "EFI Application",  # /SUBSYSTEM:EFI_APPLICATION
-        "EFI Boot Service Driver",  # /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
-        "EFI ROM",  # /SUBSYSTEM:EFI_ROM
-        "EFI Runtime",  # /SUBSYSTEM:EFI_RUNTIME_DRIVER
-        "WindowsCE",
-    ],  # /SUBSYSTEM:WINDOWSCE
-    new=["POSIX"],
-)  # /SUBSYSTEM:POSIX
-
-_target_machine_enumeration = _Enumeration(
-    [
-        "NotSet",
-        "MachineX86",  # /MACHINE:X86
-        None,
-        "MachineARM",  # /MACHINE:ARM
-        "MachineEBC",  # /MACHINE:EBC
-        "MachineIA64",  # /MACHINE:IA64
-        None,
-        "MachineMIPS",  # /MACHINE:MIPS
-        "MachineMIPS16",  # /MACHINE:MIPS16
-        "MachineMIPSFPU",  # /MACHINE:MIPSFPU
-        "MachineMIPSFPU16",  # /MACHINE:MIPSFPU16
-        None,
-        None,
-        None,
-        "MachineSH4",  # /MACHINE:SH4
-        None,
-        "MachineTHUMB",  # /MACHINE:THUMB
-        "MachineX64",
-    ]
-)  # /MACHINE:X64
-
-_Same(
-    _link, "AssemblyDebug", _Enumeration(["", "true", "false"])  # /ASSEMBLYDEBUG
-)  # /ASSEMBLYDEBUG:DISABLE
-_Same(
-    _link,
-    "CLRImageType",
-    _Enumeration(
-        [
-            "Default",
-            "ForceIJWImage",  # /CLRIMAGETYPE:IJW
-            "ForcePureILImage",  # /Switch="CLRIMAGETYPE:PURE
-            "ForceSafeILImage",
-        ]
-    ),
-)  # /Switch="CLRIMAGETYPE:SAFE
-_Same(
-    _link,
-    "CLRThreadAttribute",
-    _Enumeration(
-        [
-            "DefaultThreadingAttribute",  # /CLRTHREADATTRIBUTE:NONE
-            "MTAThreadingAttribute",  # /CLRTHREADATTRIBUTE:MTA
-            "STAThreadingAttribute",
-        ]
-    ),
-)  # /CLRTHREADATTRIBUTE:STA
-_Same(
-    _link,
-    "DataExecutionPrevention",
-    _Enumeration(["", "false", "true"]),  # /NXCOMPAT:NO
-)  # /NXCOMPAT
-_Same(
-    _link,
-    "Driver",
-    _Enumeration(["NotSet", "Driver", "UpOnly", "WDM"]),  # /Driver  # /DRIVER:UPONLY
-)  # /DRIVER:WDM
-_Same(
-    _link,
-    "LinkTimeCodeGeneration",
-    _Enumeration(
-        [
-            "Default",
-            "UseLinkTimeCodeGeneration",  # /LTCG
-            "PGInstrument",  # /LTCG:PGInstrument
-            "PGOptimization",  # /LTCG:PGOptimize
-            "PGUpdate",
-        ]
-    ),
-)  # /LTCG:PGUpdate
-_Same(
-    _link,
-    "ShowProgress",
-    _Enumeration(
-        ["NotSet", "LinkVerbose", "LinkVerboseLib"],  # /VERBOSE  # /VERBOSE:Lib
-        new=[
-            "LinkVerboseICF",  # /VERBOSE:ICF
-            "LinkVerboseREF",  # /VERBOSE:REF
-            "LinkVerboseSAFESEH",  # /VERBOSE:SAFESEH
-            "LinkVerboseCLR",
-        ],
-    ),
-)  # /VERBOSE:CLR
-_Same(_link, "SubSystem", _subsystem_enumeration)
-_Same(_link, "TargetMachine", _target_machine_enumeration)
-_Same(
-    _link,
-    "UACExecutionLevel",
-    _Enumeration(
-        [
-            "AsInvoker",  # /level='asInvoker'
-            "HighestAvailable",  # /level='highestAvailable'
-            "RequireAdministrator",
-        ]
-    ),
-)  # /level='requireAdministrator'
-_Same(_link, "MinimumRequiredVersion", _string)
-_Same(_link, "TreatLinkerWarningAsErrors", _boolean)  # /WX
-
-
-# Options found in MSVS that have been renamed in MSBuild.
-_Renamed(
-    _link,
-    "ErrorReporting",
-    "LinkErrorReporting",
-    _Enumeration(
-        [
-            "NoErrorReport",  # /ERRORREPORT:NONE
-            "PromptImmediately",  # /ERRORREPORT:PROMPT
-            "QueueForNextLogin",
-        ],  # /ERRORREPORT:QUEUE
-        new=["SendErrorReport"],
-    ),
-)  # /ERRORREPORT:SEND
-_Renamed(
-    _link, "IgnoreDefaultLibraryNames", "IgnoreSpecificDefaultLibraries", _file_list
-)  # /NODEFAULTLIB
-_Renamed(_link, "ResourceOnlyDLL", "NoEntryPoint", _boolean)  # /NOENTRY
-_Renamed(_link, "SwapRunFromNet", "SwapRunFromNET", _boolean)  # /SWAPRUN:NET
-
-_Moved(_link, "GenerateManifest", "", _boolean)
-_Moved(_link, "IgnoreImportLibrary", "", _boolean)
-_Moved(_link, "LinkIncremental", "", _newly_boolean)
-_Moved(_link, "LinkLibraryDependencies", "ProjectReference", _boolean)
-_Moved(_link, "UseLibraryDependencyInputs", "ProjectReference", _boolean)
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_link, "OptimizeForWindows98", _newly_boolean)
-_MSVSOnly(_link, "UseUnicodeResponseFiles", _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_link, "BuildingInIDE", _boolean)
-_MSBuildOnly(_link, "ImageHasSafeExceptionHandlers", _boolean)  # /SAFESEH
-_MSBuildOnly(_link, "LinkDLL", _boolean)  # /DLL Visible='false'
-_MSBuildOnly(_link, "LinkStatus", _boolean)  # /LTCG:STATUS
-_MSBuildOnly(_link, "PreventDllBinding", _boolean)  # /ALLOWBIND
-_MSBuildOnly(_link, "SupportNobindOfDelayLoadedDLL", _boolean)  # /DELAY:NOBIND
-_MSBuildOnly(_link, "TrackerLogDirectory", _folder_name)
-_MSBuildOnly(_link, "MSDOSStubFileName", _file_name)  # /STUB Visible='false'
-_MSBuildOnly(_link, "SectionAlignment", _integer)  # /ALIGN
-_MSBuildOnly(_link, "SpecifySectionAttributes", _string)  # /SECTION
-_MSBuildOnly(
-    _link,
-    "ForceFileOutput",
-    _Enumeration(
-        [],
-        new=[
-            "Enabled",  # /FORCE
-            # /FORCE:MULTIPLE
-            "MultiplyDefinedSymbolOnly",
-            "UndefinedSymbolOnly",
-        ],
-    ),
-)  # /FORCE:UNRESOLVED
-_MSBuildOnly(
-    _link,
-    "CreateHotPatchableImage",
-    _Enumeration(
-        [],
-        new=[
-            "Enabled",  # /FUNCTIONPADMIN
-            "X86Image",  # /FUNCTIONPADMIN:5
-            "X64Image",  # /FUNCTIONPADMIN:6
-            "ItaniumImage",
-        ],
-    ),
-)  # /FUNCTIONPADMIN:16
-_MSBuildOnly(
-    _link,
-    "CLRSupportLastError",
-    _Enumeration(
-        [],
-        new=[
-            "Enabled",  # /CLRSupportLastError
-            "Disabled",  # /CLRSupportLastError:NO
-            # /CLRSupportLastError:SYSTEMDLL
-            "SystemDlls",
-        ],
-    ),
-)
-
-
-# Directives for converting VCResourceCompilerTool to ResourceCompile.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\rc.xml" for
-# the schema of the MSBuild ResourceCompile settings.
-
-_Same(_rc, "AdditionalOptions", _string_list)
-_Same(_rc, "AdditionalIncludeDirectories", _folder_list)  # /I
-_Same(_rc, "Culture", _Integer(msbuild_base=16))
-_Same(_rc, "IgnoreStandardIncludePath", _boolean)  # /X
-_Same(_rc, "PreprocessorDefinitions", _string_list)  # /D
-_Same(_rc, "ResourceOutputFileName", _string)  # /fo
-_Same(_rc, "ShowProgress", _boolean)  # /v
-# There is no UI in VisualStudio 2008 to set the following properties.
-# However they are found in CL and other tools.  Include them here for
-# completeness, as they are very likely to have the same usage pattern.
-_Same(_rc, "SuppressStartupBanner", _boolean)  # /nologo
-_Same(_rc, "UndefinePreprocessorDefinitions", _string_list)  # /u
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_rc, "NullTerminateStrings", _boolean)  # /n
-_MSBuildOnly(_rc, "TrackerLogDirectory", _folder_name)
-
-
-# Directives for converting VCMIDLTool to Midl.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\midl.xml" for
-# the schema of the MSBuild Midl settings.
-
-_Same(_midl, "AdditionalIncludeDirectories", _folder_list)  # /I
-_Same(_midl, "AdditionalOptions", _string_list)
-_Same(_midl, "CPreprocessOptions", _string)  # /cpp_opt
-_Same(_midl, "ErrorCheckAllocations", _boolean)  # /error allocation
-_Same(_midl, "ErrorCheckBounds", _boolean)  # /error bounds_check
-_Same(_midl, "ErrorCheckEnumRange", _boolean)  # /error enum
-_Same(_midl, "ErrorCheckRefPointers", _boolean)  # /error ref
-_Same(_midl, "ErrorCheckStubData", _boolean)  # /error stub_data
-_Same(_midl, "GenerateStublessProxies", _boolean)  # /Oicf
-_Same(_midl, "GenerateTypeLibrary", _boolean)
-_Same(_midl, "HeaderFileName", _file_name)  # /h
-_Same(_midl, "IgnoreStandardIncludePath", _boolean)  # /no_def_idir
-_Same(_midl, "InterfaceIdentifierFileName", _file_name)  # /iid
-_Same(_midl, "MkTypLibCompatible", _boolean)  # /mktyplib203
-_Same(_midl, "OutputDirectory", _string)  # /out
-_Same(_midl, "PreprocessorDefinitions", _string_list)  # /D
-_Same(_midl, "ProxyFileName", _file_name)  # /proxy
-_Same(_midl, "RedirectOutputAndErrors", _file_name)  # /o
-_Same(_midl, "SuppressStartupBanner", _boolean)  # /nologo
-_Same(_midl, "TypeLibraryName", _file_name)  # /tlb
-_Same(_midl, "UndefinePreprocessorDefinitions", _string_list)  # /U
-_Same(_midl, "WarnAsError", _boolean)  # /WX
-
-_Same(
-    _midl,
-    "DefaultCharType",
-    _Enumeration(["Unsigned", "Signed", "Ascii"]),  # /char unsigned  # /char signed
-)  # /char ascii7
-_Same(
-    _midl,
-    "TargetEnvironment",
-    _Enumeration(
-        [
-            "NotSet",
-            "Win32",  # /env win32
-            "Itanium",  # /env ia64
-            "X64",  # /env x64
-            "ARM64",  # /env arm64
-        ]
-    ),
-)
-_Same(
-    _midl,
-    "EnableErrorChecks",
-    _Enumeration(["EnableCustom", "None", "All"]),  # /error none
-)  # /error all
-_Same(
-    _midl,
-    "StructMemberAlignment",
-    _Enumeration(["NotSet", "1", "2", "4", "8"]),  # Zp1  # Zp2  # Zp4
-)  # Zp8
-_Same(
-    _midl,
-    "WarningLevel",
-    _Enumeration(["0", "1", "2", "3", "4"]),  # /W0  # /W1  # /W2  # /W3
-)  # /W4
-
-_Renamed(_midl, "DLLDataFileName", "DllDataFileName", _file_name)  # /dlldata
-_Renamed(_midl, "ValidateParameters", "ValidateAllParameters", _boolean)  # /robust
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_midl, "ApplicationConfigurationMode", _boolean)  # /app_config
-_MSBuildOnly(_midl, "ClientStubFile", _file_name)  # /cstub
-_MSBuildOnly(
-    _midl, "GenerateClientFiles", _Enumeration([], new=["Stub", "None"])  # /client stub
-)  # /client none
-_MSBuildOnly(
-    _midl, "GenerateServerFiles", _Enumeration([], new=["Stub", "None"])  # /client stub
-)  # /client none
-_MSBuildOnly(_midl, "LocaleID", _integer)  # /lcid DECIMAL
-_MSBuildOnly(_midl, "ServerStubFile", _file_name)  # /sstub
-_MSBuildOnly(_midl, "SuppressCompilerWarnings", _boolean)  # /no_warn
-_MSBuildOnly(_midl, "TrackerLogDirectory", _folder_name)
-_MSBuildOnly(
-    _midl, "TypeLibFormat", _Enumeration([], new=["NewFormat", "OldFormat"])  # /newtlb
-)  # /oldtlb
-
-
-# Directives for converting VCLibrarianTool to Lib.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\lib.xml" for
-# the schema of the MSBuild Lib settings.
-
-_Same(_lib, "AdditionalDependencies", _file_list)
-_Same(_lib, "AdditionalLibraryDirectories", _folder_list)  # /LIBPATH
-_Same(_lib, "AdditionalOptions", _string_list)
-_Same(_lib, "ExportNamedFunctions", _string_list)  # /EXPORT
-_Same(_lib, "ForceSymbolReferences", _string)  # /INCLUDE
-_Same(_lib, "IgnoreAllDefaultLibraries", _boolean)  # /NODEFAULTLIB
-_Same(_lib, "IgnoreSpecificDefaultLibraries", _file_list)  # /NODEFAULTLIB
-_Same(_lib, "ModuleDefinitionFile", _file_name)  # /DEF
-_Same(_lib, "OutputFile", _file_name)  # /OUT
-_Same(_lib, "SuppressStartupBanner", _boolean)  # /NOLOGO
-_Same(_lib, "UseUnicodeResponseFiles", _boolean)
-_Same(_lib, "LinkTimeCodeGeneration", _boolean)  # /LTCG
-_Same(_lib, "TargetMachine", _target_machine_enumeration)
-
-# TODO(jeanluc) _link defines the same value that gets moved to
-# ProjectReference.  We may want to validate that they are consistent.
-_Moved(_lib, "LinkLibraryDependencies", "ProjectReference", _boolean)
-
-_MSBuildOnly(_lib, "DisplayLibrary", _string)  # /LIST Visible='false'
-_MSBuildOnly(
-    _lib,
-    "ErrorReporting",
-    _Enumeration(
-        [],
-        new=[
-            "PromptImmediately",  # /ERRORREPORT:PROMPT
-            "QueueForNextLogin",  # /ERRORREPORT:QUEUE
-            "SendErrorReport",  # /ERRORREPORT:SEND
-            "NoErrorReport",
-        ],
-    ),
-)  # /ERRORREPORT:NONE
-_MSBuildOnly(_lib, "MinimumRequiredVersion", _string)
-_MSBuildOnly(_lib, "Name", _file_name)  # /NAME
-_MSBuildOnly(_lib, "RemoveObjects", _file_list)  # /REMOVE
-_MSBuildOnly(_lib, "SubSystem", _subsystem_enumeration)
-_MSBuildOnly(_lib, "TrackerLogDirectory", _folder_name)
-_MSBuildOnly(_lib, "TreatLibWarningAsErrors", _boolean)  # /WX
-_MSBuildOnly(_lib, "Verbose", _boolean)
-
-
-# Directives for converting VCManifestTool to Mt.
-# See "c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\1033\mt.xml" for
-# the schema of the MSBuild Lib settings.
-
-# Options that have the same name in MSVS and MSBuild
-_Same(_manifest, "AdditionalManifestFiles", _file_list)  # /manifest
-_Same(_manifest, "AdditionalOptions", _string_list)
-_Same(_manifest, "AssemblyIdentity", _string)  # /identity:
-_Same(_manifest, "ComponentFileName", _file_name)  # /dll
-_Same(_manifest, "GenerateCatalogFiles", _boolean)  # /makecdfs
-_Same(_manifest, "InputResourceManifests", _string)  # /inputresource
-_Same(_manifest, "OutputManifestFile", _file_name)  # /out
-_Same(_manifest, "RegistrarScriptFile", _file_name)  # /rgs
-_Same(_manifest, "ReplacementsFile", _file_name)  # /replacements
-_Same(_manifest, "SuppressStartupBanner", _boolean)  # /nologo
-_Same(_manifest, "TypeLibraryFile", _file_name)  # /tlb:
-_Same(_manifest, "UpdateFileHashes", _boolean)  # /hashupdate
-_Same(_manifest, "UpdateFileHashesSearchPath", _file_name)
-_Same(_manifest, "VerboseOutput", _boolean)  # /verbose
-
-# Options that have moved location.
-_MovedAndRenamed(
-    _manifest,
-    "ManifestResourceFile",
-    "ManifestResourceCompile",
-    "ResourceOutputFileName",
-    _file_name,
-)
-_Moved(_manifest, "EmbedManifest", "", _boolean)
-
-# MSVS options not found in MSBuild.
-_MSVSOnly(_manifest, "DependencyInformationFile", _file_name)
-_MSVSOnly(_manifest, "UseFAT32Workaround", _boolean)
-_MSVSOnly(_manifest, "UseUnicodeResponseFiles", _boolean)
-
-# MSBuild options not found in MSVS.
-_MSBuildOnly(_manifest, "EnableDPIAwareness", _boolean)
-_MSBuildOnly(_manifest, "GenerateCategoryTags", _boolean)  # /category
-_MSBuildOnly(
-    _manifest, "ManifestFromManagedAssembly", _file_name
-)  # /managedassemblyname
-_MSBuildOnly(_manifest, "OutputResourceManifests", _string)  # /outputresource
-_MSBuildOnly(_manifest, "SuppressDependencyElement", _boolean)  # /nodependency
-_MSBuildOnly(_manifest, "TrackerLogDirectory", _folder_name)
-
-
-# Directives for MASM.
-# See "$(VCTargetsPath)\BuildCustomizations\masm.xml" for the schema of the
-# MSBuild MASM settings.
-
-# Options that have the same name in MSVS and MSBuild.
-_Same(_masm, "UseSafeExceptionHandlers", _boolean)  # /safeseh
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
deleted file mode 100755
index 6ca0968..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
+++ /dev/null
@@ -1,1547 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for the MSVSSettings.py file."""
-
-import unittest
-import gyp.MSVSSettings as MSVSSettings
-
-from io import StringIO
-
-
-class TestSequenceFunctions(unittest.TestCase):
-    def setUp(self):
-        self.stderr = StringIO()
-
-    def _ExpectedWarnings(self, expected):
-        """Compares recorded lines to expected warnings."""
-        self.stderr.seek(0)
-        actual = self.stderr.read().split("\n")
-        actual = [line for line in actual if line]
-        self.assertEqual(sorted(expected), sorted(actual))
-
-    def testValidateMSVSSettings_tool_names(self):
-        """Tests that only MSVS tool names are allowed."""
-        MSVSSettings.ValidateMSVSSettings(
-            {
-                "VCCLCompilerTool": {},
-                "VCLinkerTool": {},
-                "VCMIDLTool": {},
-                "foo": {},
-                "VCResourceCompilerTool": {},
-                "VCLibrarianTool": {},
-                "VCManifestTool": {},
-                "ClCompile": {},
-            },
-            self.stderr,
-        )
-        self._ExpectedWarnings(
-            ["Warning: unrecognized tool foo", "Warning: unrecognized tool ClCompile"]
-        )
-
-    def testValidateMSVSSettings_settings(self):
-        """Tests that for invalid MSVS settings."""
-        MSVSSettings.ValidateMSVSSettings(
-            {
-                "VCCLCompilerTool": {
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "AdditionalOptions": ["string1", "string2"],
-                    "AdditionalUsingDirectories": "folder1;folder2",
-                    "AssemblerListingLocation": "a_file_name",
-                    "AssemblerOutput": "0",
-                    "BasicRuntimeChecks": "5",
-                    "BrowseInformation": "fdkslj",
-                    "BrowseInformationFile": "a_file_name",
-                    "BufferSecurityCheck": "true",
-                    "CallingConvention": "-1",
-                    "CompileAs": "1",
-                    "DebugInformationFormat": "2",
-                    "DefaultCharIsUnsigned": "true",
-                    "Detect64BitPortabilityProblems": "true",
-                    "DisableLanguageExtensions": "true",
-                    "DisableSpecificWarnings": "string1;string2",
-                    "EnableEnhancedInstructionSet": "1",
-                    "EnableFiberSafeOptimizations": "true",
-                    "EnableFunctionLevelLinking": "true",
-                    "EnableIntrinsicFunctions": "true",
-                    "EnablePREfast": "true",
-                    "Enableprefast": "bogus",
-                    "ErrorReporting": "1",
-                    "ExceptionHandling": "1",
-                    "ExpandAttributedSource": "true",
-                    "FavorSizeOrSpeed": "1",
-                    "FloatingPointExceptions": "true",
-                    "FloatingPointModel": "1",
-                    "ForceConformanceInForLoopScope": "true",
-                    "ForcedIncludeFiles": "file1;file2",
-                    "ForcedUsingFiles": "file1;file2",
-                    "GeneratePreprocessedFile": "1",
-                    "GenerateXMLDocumentationFiles": "true",
-                    "IgnoreStandardIncludePath": "true",
-                    "InlineFunctionExpansion": "1",
-                    "KeepComments": "true",
-                    "MinimalRebuild": "true",
-                    "ObjectFile": "a_file_name",
-                    "OmitDefaultLibName": "true",
-                    "OmitFramePointers": "true",
-                    "OpenMP": "true",
-                    "Optimization": "1",
-                    "PrecompiledHeaderFile": "a_file_name",
-                    "PrecompiledHeaderThrough": "a_file_name",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "ProgramDataBaseFileName": "a_file_name",
-                    "RuntimeLibrary": "1",
-                    "RuntimeTypeInfo": "true",
-                    "ShowIncludes": "true",
-                    "SmallerTypeCheck": "true",
-                    "StringPooling": "true",
-                    "StructMemberAlignment": "1",
-                    "SuppressStartupBanner": "true",
-                    "TreatWChar_tAsBuiltInType": "true",
-                    "UndefineAllPreprocessorDefinitions": "true",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                    "UseFullPaths": "true",
-                    "UsePrecompiledHeader": "1",
-                    "UseUnicodeResponseFiles": "true",
-                    "WarnAsError": "true",
-                    "WarningLevel": "1",
-                    "WholeProgramOptimization": "true",
-                    "XMLDocumentationFileName": "a_file_name",
-                    "ZZXYZ": "bogus",
-                },
-                "VCLinkerTool": {
-                    "AdditionalDependencies": "file1;file2",
-                    "AdditionalDependencies_excluded": "file3",
-                    "AdditionalLibraryDirectories": "folder1;folder2",
-                    "AdditionalManifestDependencies": "file1;file2",
-                    "AdditionalOptions": "a string1",
-                    "AddModuleNamesToAssembly": "file1;file2",
-                    "AllowIsolation": "true",
-                    "AssemblyDebug": "2",
-                    "AssemblyLinkResource": "file1;file2",
-                    "BaseAddress": "a string1",
-                    "CLRImageType": "2",
-                    "CLRThreadAttribute": "2",
-                    "CLRUnmanagedCodeCheck": "true",
-                    "DataExecutionPrevention": "2",
-                    "DelayLoadDLLs": "file1;file2",
-                    "DelaySign": "true",
-                    "Driver": "2",
-                    "EmbedManagedResourceFile": "file1;file2",
-                    "EnableCOMDATFolding": "2",
-                    "EnableUAC": "true",
-                    "EntryPointSymbol": "a string1",
-                    "ErrorReporting": "2",
-                    "FixedBaseAddress": "2",
-                    "ForceSymbolReferences": "file1;file2",
-                    "FunctionOrder": "a_file_name",
-                    "GenerateDebugInformation": "true",
-                    "GenerateManifest": "true",
-                    "GenerateMapFile": "true",
-                    "HeapCommitSize": "a string1",
-                    "HeapReserveSize": "a string1",
-                    "IgnoreAllDefaultLibraries": "true",
-                    "IgnoreDefaultLibraryNames": "file1;file2",
-                    "IgnoreEmbeddedIDL": "true",
-                    "IgnoreImportLibrary": "true",
-                    "ImportLibrary": "a_file_name",
-                    "KeyContainer": "a_file_name",
-                    "KeyFile": "a_file_name",
-                    "LargeAddressAware": "2",
-                    "LinkIncremental": "2",
-                    "LinkLibraryDependencies": "true",
-                    "LinkTimeCodeGeneration": "2",
-                    "ManifestFile": "a_file_name",
-                    "MapExports": "true",
-                    "MapFileName": "a_file_name",
-                    "MergedIDLBaseFileName": "a_file_name",
-                    "MergeSections": "a string1",
-                    "MidlCommandFile": "a_file_name",
-                    "ModuleDefinitionFile": "a_file_name",
-                    "OptimizeForWindows98": "1",
-                    "OptimizeReferences": "2",
-                    "OutputFile": "a_file_name",
-                    "PerUserRedirection": "true",
-                    "Profile": "true",
-                    "ProfileGuidedDatabase": "a_file_name",
-                    "ProgramDatabaseFile": "a_file_name",
-                    "RandomizedBaseAddress": "2",
-                    "RegisterOutput": "true",
-                    "ResourceOnlyDLL": "true",
-                    "SetChecksum": "true",
-                    "ShowProgress": "2",
-                    "StackCommitSize": "a string1",
-                    "StackReserveSize": "a string1",
-                    "StripPrivateSymbols": "a_file_name",
-                    "SubSystem": "2",
-                    "SupportUnloadOfDelayLoadedDLL": "true",
-                    "SuppressStartupBanner": "true",
-                    "SwapRunFromCD": "true",
-                    "SwapRunFromNet": "true",
-                    "TargetMachine": "2",
-                    "TerminalServerAware": "2",
-                    "TurnOffAssemblyGeneration": "true",
-                    "TypeLibraryFile": "a_file_name",
-                    "TypeLibraryResourceID": "33",
-                    "UACExecutionLevel": "2",
-                    "UACUIAccess": "true",
-                    "UseLibraryDependencyInputs": "true",
-                    "UseUnicodeResponseFiles": "true",
-                    "Version": "a string1",
-                },
-                "VCMIDLTool": {
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "AdditionalOptions": "a string1",
-                    "CPreprocessOptions": "a string1",
-                    "DefaultCharType": "1",
-                    "DLLDataFileName": "a_file_name",
-                    "EnableErrorChecks": "1",
-                    "ErrorCheckAllocations": "true",
-                    "ErrorCheckBounds": "true",
-                    "ErrorCheckEnumRange": "true",
-                    "ErrorCheckRefPointers": "true",
-                    "ErrorCheckStubData": "true",
-                    "GenerateStublessProxies": "true",
-                    "GenerateTypeLibrary": "true",
-                    "HeaderFileName": "a_file_name",
-                    "IgnoreStandardIncludePath": "true",
-                    "InterfaceIdentifierFileName": "a_file_name",
-                    "MkTypLibCompatible": "true",
-                    "notgood": "bogus",
-                    "OutputDirectory": "a string1",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "ProxyFileName": "a_file_name",
-                    "RedirectOutputAndErrors": "a_file_name",
-                    "StructMemberAlignment": "1",
-                    "SuppressStartupBanner": "true",
-                    "TargetEnvironment": "1",
-                    "TypeLibraryName": "a_file_name",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                    "ValidateParameters": "true",
-                    "WarnAsError": "true",
-                    "WarningLevel": "1",
-                },
-                "VCResourceCompilerTool": {
-                    "AdditionalOptions": "a string1",
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "Culture": "1003",
-                    "IgnoreStandardIncludePath": "true",
-                    "notgood2": "bogus",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "ResourceOutputFileName": "a string1",
-                    "ShowProgress": "true",
-                    "SuppressStartupBanner": "true",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                },
-                "VCLibrarianTool": {
-                    "AdditionalDependencies": "file1;file2",
-                    "AdditionalLibraryDirectories": "folder1;folder2",
-                    "AdditionalOptions": "a string1",
-                    "ExportNamedFunctions": "string1;string2",
-                    "ForceSymbolReferences": "a string1",
-                    "IgnoreAllDefaultLibraries": "true",
-                    "IgnoreSpecificDefaultLibraries": "file1;file2",
-                    "LinkLibraryDependencies": "true",
-                    "ModuleDefinitionFile": "a_file_name",
-                    "OutputFile": "a_file_name",
-                    "SuppressStartupBanner": "true",
-                    "UseUnicodeResponseFiles": "true",
-                },
-                "VCManifestTool": {
-                    "AdditionalManifestFiles": "file1;file2",
-                    "AdditionalOptions": "a string1",
-                    "AssemblyIdentity": "a string1",
-                    "ComponentFileName": "a_file_name",
-                    "DependencyInformationFile": "a_file_name",
-                    "GenerateCatalogFiles": "true",
-                    "InputResourceManifests": "a string1",
-                    "ManifestResourceFile": "a_file_name",
-                    "OutputManifestFile": "a_file_name",
-                    "RegistrarScriptFile": "a_file_name",
-                    "ReplacementsFile": "a_file_name",
-                    "SuppressStartupBanner": "true",
-                    "TypeLibraryFile": "a_file_name",
-                    "UpdateFileHashes": "truel",
-                    "UpdateFileHashesSearchPath": "a_file_name",
-                    "UseFAT32Workaround": "true",
-                    "UseUnicodeResponseFiles": "true",
-                    "VerboseOutput": "true",
-                },
-            },
-            self.stderr,
-        )
-        self._ExpectedWarnings(
-            [
-                "Warning: for VCCLCompilerTool/BasicRuntimeChecks, "
-                "index value (5) not in expected range [0, 4)",
-                "Warning: for VCCLCompilerTool/BrowseInformation, "
-                "invalid literal for int() with base 10: 'fdkslj'",
-                "Warning: for VCCLCompilerTool/CallingConvention, "
-                "index value (-1) not in expected range [0, 4)",
-                "Warning: for VCCLCompilerTool/DebugInformationFormat, "
-                "converted value for 2 not specified.",
-                "Warning: unrecognized setting VCCLCompilerTool/Enableprefast",
-                "Warning: unrecognized setting VCCLCompilerTool/ZZXYZ",
-                "Warning: for VCLinkerTool/TargetMachine, "
-                "converted value for 2 not specified.",
-                "Warning: unrecognized setting VCMIDLTool/notgood",
-                "Warning: unrecognized setting VCResourceCompilerTool/notgood2",
-                "Warning: for VCManifestTool/UpdateFileHashes, "
-                "expected bool; got 'truel'"
-                "",
-            ]
-        )
-
-    def testValidateMSBuildSettings_settings(self):
-        """Tests that for invalid MSBuild settings."""
-        MSVSSettings.ValidateMSBuildSettings(
-            {
-                "ClCompile": {
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "AdditionalOptions": ["string1", "string2"],
-                    "AdditionalUsingDirectories": "folder1;folder2",
-                    "AssemblerListingLocation": "a_file_name",
-                    "AssemblerOutput": "NoListing",
-                    "BasicRuntimeChecks": "StackFrameRuntimeCheck",
-                    "BrowseInformation": "false",
-                    "BrowseInformationFile": "a_file_name",
-                    "BufferSecurityCheck": "true",
-                    "BuildingInIDE": "true",
-                    "CallingConvention": "Cdecl",
-                    "CompileAs": "CompileAsC",
-                    "CompileAsManaged": "true",
-                    "CreateHotpatchableImage": "true",
-                    "DebugInformationFormat": "ProgramDatabase",
-                    "DisableLanguageExtensions": "true",
-                    "DisableSpecificWarnings": "string1;string2",
-                    "EnableEnhancedInstructionSet": "StreamingSIMDExtensions",
-                    "EnableFiberSafeOptimizations": "true",
-                    "EnablePREfast": "true",
-                    "Enableprefast": "bogus",
-                    "ErrorReporting": "Prompt",
-                    "ExceptionHandling": "SyncCThrow",
-                    "ExpandAttributedSource": "true",
-                    "FavorSizeOrSpeed": "Neither",
-                    "FloatingPointExceptions": "true",
-                    "FloatingPointModel": "Precise",
-                    "ForceConformanceInForLoopScope": "true",
-                    "ForcedIncludeFiles": "file1;file2",
-                    "ForcedUsingFiles": "file1;file2",
-                    "FunctionLevelLinking": "false",
-                    "GenerateXMLDocumentationFiles": "true",
-                    "IgnoreStandardIncludePath": "true",
-                    "InlineFunctionExpansion": "OnlyExplicitInline",
-                    "IntrinsicFunctions": "false",
-                    "MinimalRebuild": "true",
-                    "MultiProcessorCompilation": "true",
-                    "ObjectFileName": "a_file_name",
-                    "OmitDefaultLibName": "true",
-                    "OmitFramePointers": "true",
-                    "OpenMPSupport": "true",
-                    "Optimization": "Disabled",
-                    "PrecompiledHeader": "NotUsing",
-                    "PrecompiledHeaderFile": "a_file_name",
-                    "PrecompiledHeaderOutputFile": "a_file_name",
-                    "PreprocessKeepComments": "true",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "PreprocessOutputPath": "a string1",
-                    "PreprocessSuppressLineNumbers": "false",
-                    "PreprocessToFile": "false",
-                    "ProcessorNumber": "33",
-                    "ProgramDataBaseFileName": "a_file_name",
-                    "RuntimeLibrary": "MultiThreaded",
-                    "RuntimeTypeInfo": "true",
-                    "ShowIncludes": "true",
-                    "SmallerTypeCheck": "true",
-                    "StringPooling": "true",
-                    "StructMemberAlignment": "1Byte",
-                    "SuppressStartupBanner": "true",
-                    "TrackerLogDirectory": "a_folder",
-                    "TreatSpecificWarningsAsErrors": "string1;string2",
-                    "TreatWarningAsError": "true",
-                    "TreatWChar_tAsBuiltInType": "true",
-                    "UndefineAllPreprocessorDefinitions": "true",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                    "UseFullPaths": "true",
-                    "UseUnicodeForAssemblerListing": "true",
-                    "WarningLevel": "TurnOffAllWarnings",
-                    "WholeProgramOptimization": "true",
-                    "XMLDocumentationFileName": "a_file_name",
-                    "ZZXYZ": "bogus",
-                },
-                "Link": {
-                    "AdditionalDependencies": "file1;file2",
-                    "AdditionalLibraryDirectories": "folder1;folder2",
-                    "AdditionalManifestDependencies": "file1;file2",
-                    "AdditionalOptions": "a string1",
-                    "AddModuleNamesToAssembly": "file1;file2",
-                    "AllowIsolation": "true",
-                    "AssemblyDebug": "",
-                    "AssemblyLinkResource": "file1;file2",
-                    "BaseAddress": "a string1",
-                    "BuildingInIDE": "true",
-                    "CLRImageType": "ForceIJWImage",
-                    "CLRSupportLastError": "Enabled",
-                    "CLRThreadAttribute": "MTAThreadingAttribute",
-                    "CLRUnmanagedCodeCheck": "true",
-                    "CreateHotPatchableImage": "X86Image",
-                    "DataExecutionPrevention": "false",
-                    "DelayLoadDLLs": "file1;file2",
-                    "DelaySign": "true",
-                    "Driver": "NotSet",
-                    "EmbedManagedResourceFile": "file1;file2",
-                    "EnableCOMDATFolding": "false",
-                    "EnableUAC": "true",
-                    "EntryPointSymbol": "a string1",
-                    "FixedBaseAddress": "false",
-                    "ForceFileOutput": "Enabled",
-                    "ForceSymbolReferences": "file1;file2",
-                    "FunctionOrder": "a_file_name",
-                    "GenerateDebugInformation": "true",
-                    "GenerateMapFile": "true",
-                    "HeapCommitSize": "a string1",
-                    "HeapReserveSize": "a string1",
-                    "IgnoreAllDefaultLibraries": "true",
-                    "IgnoreEmbeddedIDL": "true",
-                    "IgnoreSpecificDefaultLibraries": "a_file_list",
-                    "ImageHasSafeExceptionHandlers": "true",
-                    "ImportLibrary": "a_file_name",
-                    "KeyContainer": "a_file_name",
-                    "KeyFile": "a_file_name",
-                    "LargeAddressAware": "false",
-                    "LinkDLL": "true",
-                    "LinkErrorReporting": "SendErrorReport",
-                    "LinkStatus": "true",
-                    "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration",
-                    "ManifestFile": "a_file_name",
-                    "MapExports": "true",
-                    "MapFileName": "a_file_name",
-                    "MergedIDLBaseFileName": "a_file_name",
-                    "MergeSections": "a string1",
-                    "MidlCommandFile": "a_file_name",
-                    "MinimumRequiredVersion": "a string1",
-                    "ModuleDefinitionFile": "a_file_name",
-                    "MSDOSStubFileName": "a_file_name",
-                    "NoEntryPoint": "true",
-                    "OptimizeReferences": "false",
-                    "OutputFile": "a_file_name",
-                    "PerUserRedirection": "true",
-                    "PreventDllBinding": "true",
-                    "Profile": "true",
-                    "ProfileGuidedDatabase": "a_file_name",
-                    "ProgramDatabaseFile": "a_file_name",
-                    "RandomizedBaseAddress": "false",
-                    "RegisterOutput": "true",
-                    "SectionAlignment": "33",
-                    "SetChecksum": "true",
-                    "ShowProgress": "LinkVerboseREF",
-                    "SpecifySectionAttributes": "a string1",
-                    "StackCommitSize": "a string1",
-                    "StackReserveSize": "a string1",
-                    "StripPrivateSymbols": "a_file_name",
-                    "SubSystem": "Console",
-                    "SupportNobindOfDelayLoadedDLL": "true",
-                    "SupportUnloadOfDelayLoadedDLL": "true",
-                    "SuppressStartupBanner": "true",
-                    "SwapRunFromCD": "true",
-                    "SwapRunFromNET": "true",
-                    "TargetMachine": "MachineX86",
-                    "TerminalServerAware": "false",
-                    "TrackerLogDirectory": "a_folder",
-                    "TreatLinkerWarningAsErrors": "true",
-                    "TurnOffAssemblyGeneration": "true",
-                    "TypeLibraryFile": "a_file_name",
-                    "TypeLibraryResourceID": "33",
-                    "UACExecutionLevel": "AsInvoker",
-                    "UACUIAccess": "true",
-                    "Version": "a string1",
-                },
-                "ResourceCompile": {
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "AdditionalOptions": "a string1",
-                    "Culture": "0x236",
-                    "IgnoreStandardIncludePath": "true",
-                    "NullTerminateStrings": "true",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "ResourceOutputFileName": "a string1",
-                    "ShowProgress": "true",
-                    "SuppressStartupBanner": "true",
-                    "TrackerLogDirectory": "a_folder",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                },
-                "Midl": {
-                    "AdditionalIncludeDirectories": "folder1;folder2",
-                    "AdditionalOptions": "a string1",
-                    "ApplicationConfigurationMode": "true",
-                    "ClientStubFile": "a_file_name",
-                    "CPreprocessOptions": "a string1",
-                    "DefaultCharType": "Signed",
-                    "DllDataFileName": "a_file_name",
-                    "EnableErrorChecks": "EnableCustom",
-                    "ErrorCheckAllocations": "true",
-                    "ErrorCheckBounds": "true",
-                    "ErrorCheckEnumRange": "true",
-                    "ErrorCheckRefPointers": "true",
-                    "ErrorCheckStubData": "true",
-                    "GenerateClientFiles": "Stub",
-                    "GenerateServerFiles": "None",
-                    "GenerateStublessProxies": "true",
-                    "GenerateTypeLibrary": "true",
-                    "HeaderFileName": "a_file_name",
-                    "IgnoreStandardIncludePath": "true",
-                    "InterfaceIdentifierFileName": "a_file_name",
-                    "LocaleID": "33",
-                    "MkTypLibCompatible": "true",
-                    "OutputDirectory": "a string1",
-                    "PreprocessorDefinitions": "string1;string2",
-                    "ProxyFileName": "a_file_name",
-                    "RedirectOutputAndErrors": "a_file_name",
-                    "ServerStubFile": "a_file_name",
-                    "StructMemberAlignment": "NotSet",
-                    "SuppressCompilerWarnings": "true",
-                    "SuppressStartupBanner": "true",
-                    "TargetEnvironment": "Itanium",
-                    "TrackerLogDirectory": "a_folder",
-                    "TypeLibFormat": "NewFormat",
-                    "TypeLibraryName": "a_file_name",
-                    "UndefinePreprocessorDefinitions": "string1;string2",
-                    "ValidateAllParameters": "true",
-                    "WarnAsError": "true",
-                    "WarningLevel": "1",
-                },
-                "Lib": {
-                    "AdditionalDependencies": "file1;file2",
-                    "AdditionalLibraryDirectories": "folder1;folder2",
-                    "AdditionalOptions": "a string1",
-                    "DisplayLibrary": "a string1",
-                    "ErrorReporting": "PromptImmediately",
-                    "ExportNamedFunctions": "string1;string2",
-                    "ForceSymbolReferences": "a string1",
-                    "IgnoreAllDefaultLibraries": "true",
-                    "IgnoreSpecificDefaultLibraries": "file1;file2",
-                    "LinkTimeCodeGeneration": "true",
-                    "MinimumRequiredVersion": "a string1",
-                    "ModuleDefinitionFile": "a_file_name",
-                    "Name": "a_file_name",
-                    "OutputFile": "a_file_name",
-                    "RemoveObjects": "file1;file2",
-                    "SubSystem": "Console",
-                    "SuppressStartupBanner": "true",
-                    "TargetMachine": "MachineX86i",
-                    "TrackerLogDirectory": "a_folder",
-                    "TreatLibWarningAsErrors": "true",
-                    "UseUnicodeResponseFiles": "true",
-                    "Verbose": "true",
-                },
-                "Manifest": {
-                    "AdditionalManifestFiles": "file1;file2",
-                    "AdditionalOptions": "a string1",
-                    "AssemblyIdentity": "a string1",
-                    "ComponentFileName": "a_file_name",
-                    "EnableDPIAwareness": "fal",
-                    "GenerateCatalogFiles": "truel",
-                    "GenerateCategoryTags": "true",
-                    "InputResourceManifests": "a string1",
-                    "ManifestFromManagedAssembly": "a_file_name",
-                    "notgood3": "bogus",
-                    "OutputManifestFile": "a_file_name",
-                    "OutputResourceManifests": "a string1",
-                    "RegistrarScriptFile": "a_file_name",
-                    "ReplacementsFile": "a_file_name",
-                    "SuppressDependencyElement": "true",
-                    "SuppressStartupBanner": "true",
-                    "TrackerLogDirectory": "a_folder",
-                    "TypeLibraryFile": "a_file_name",
-                    "UpdateFileHashes": "true",
-                    "UpdateFileHashesSearchPath": "a_file_name",
-                    "VerboseOutput": "true",
-                },
-                "ProjectReference": {
-                    "LinkLibraryDependencies": "true",
-                    "UseLibraryDependencyInputs": "true",
-                },
-                "ManifestResourceCompile": {"ResourceOutputFileName": "a_file_name"},
-                "": {
-                    "EmbedManifest": "true",
-                    "GenerateManifest": "true",
-                    "IgnoreImportLibrary": "true",
-                    "LinkIncremental": "false",
-                },
-            },
-            self.stderr,
-        )
-        self._ExpectedWarnings(
-            [
-                "Warning: unrecognized setting ClCompile/Enableprefast",
-                "Warning: unrecognized setting ClCompile/ZZXYZ",
-                "Warning: unrecognized setting Manifest/notgood3",
-                "Warning: for Manifest/GenerateCatalogFiles, "
-                "expected bool; got 'truel'",
-                "Warning: for Lib/TargetMachine, unrecognized enumerated value "
-                "MachineX86i",
-                "Warning: for Manifest/EnableDPIAwareness, expected bool; got 'fal'",
-            ]
-        )
-
-    def testConvertToMSBuildSettings_empty(self):
-        """Tests an empty conversion."""
-        msvs_settings = {}
-        expected_msbuild_settings = {}
-        actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
-            msvs_settings, self.stderr
-        )
-        self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
-        self._ExpectedWarnings([])
-
-    def testConvertToMSBuildSettings_minimal(self):
-        """Tests a minimal conversion."""
-        msvs_settings = {
-            "VCCLCompilerTool": {
-                "AdditionalIncludeDirectories": "dir1",
-                "AdditionalOptions": "/foo",
-                "BasicRuntimeChecks": "0",
-            },
-            "VCLinkerTool": {
-                "LinkTimeCodeGeneration": "1",
-                "ErrorReporting": "1",
-                "DataExecutionPrevention": "2",
-            },
-        }
-        expected_msbuild_settings = {
-            "ClCompile": {
-                "AdditionalIncludeDirectories": "dir1",
-                "AdditionalOptions": "/foo",
-                "BasicRuntimeChecks": "Default",
-            },
-            "Link": {
-                "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration",
-                "LinkErrorReporting": "PromptImmediately",
-                "DataExecutionPrevention": "true",
-            },
-        }
-        actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
-            msvs_settings, self.stderr
-        )
-        self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
-        self._ExpectedWarnings([])
-
-    def testConvertToMSBuildSettings_warnings(self):
-        """Tests conversion that generates warnings."""
-        msvs_settings = {
-            "VCCLCompilerTool": {
-                "AdditionalIncludeDirectories": "1",
-                "AdditionalOptions": "2",
-                # These are incorrect values:
-                "BasicRuntimeChecks": "12",
-                "BrowseInformation": "21",
-                "UsePrecompiledHeader": "13",
-                "GeneratePreprocessedFile": "14",
-            },
-            "VCLinkerTool": {
-                # These are incorrect values:
-                "Driver": "10",
-                "LinkTimeCodeGeneration": "31",
-                "ErrorReporting": "21",
-                "FixedBaseAddress": "6",
-            },
-            "VCResourceCompilerTool": {
-                # Custom
-                "Culture": "1003"
-            },
-        }
-        expected_msbuild_settings = {
-            "ClCompile": {
-                "AdditionalIncludeDirectories": "1",
-                "AdditionalOptions": "2",
-            },
-            "Link": {},
-            "ResourceCompile": {
-                # Custom
-                "Culture": "0x03eb"
-            },
-        }
-        actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
-            msvs_settings, self.stderr
-        )
-        self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
-        self._ExpectedWarnings(
-            [
-                "Warning: while converting VCCLCompilerTool/BasicRuntimeChecks to "
-                "MSBuild, index value (12) not in expected range [0, 4)",
-                "Warning: while converting VCCLCompilerTool/BrowseInformation to "
-                "MSBuild, index value (21) not in expected range [0, 3)",
-                "Warning: while converting VCCLCompilerTool/UsePrecompiledHeader to "
-                "MSBuild, index value (13) not in expected range [0, 3)",
-                "Warning: while converting "
-                "VCCLCompilerTool/GeneratePreprocessedFile to "
-                "MSBuild, value must be one of [0, 1, 2]; got 14",
-                "Warning: while converting VCLinkerTool/Driver to "
-                "MSBuild, index value (10) not in expected range [0, 4)",
-                "Warning: while converting VCLinkerTool/LinkTimeCodeGeneration to "
-                "MSBuild, index value (31) not in expected range [0, 5)",
-                "Warning: while converting VCLinkerTool/ErrorReporting to "
-                "MSBuild, index value (21) not in expected range [0, 3)",
-                "Warning: while converting VCLinkerTool/FixedBaseAddress to "
-                "MSBuild, index value (6) not in expected range [0, 3)",
-            ]
-        )
-
-    def testConvertToMSBuildSettings_full_synthetic(self):
-        """Tests conversion of all the MSBuild settings."""
-        msvs_settings = {
-            "VCCLCompilerTool": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "AdditionalUsingDirectories": "folder1;folder2;folder3",
-                "AssemblerListingLocation": "a_file_name",
-                "AssemblerOutput": "0",
-                "BasicRuntimeChecks": "1",
-                "BrowseInformation": "2",
-                "BrowseInformationFile": "a_file_name",
-                "BufferSecurityCheck": "true",
-                "CallingConvention": "0",
-                "CompileAs": "1",
-                "DebugInformationFormat": "4",
-                "DefaultCharIsUnsigned": "true",
-                "Detect64BitPortabilityProblems": "true",
-                "DisableLanguageExtensions": "true",
-                "DisableSpecificWarnings": "d1;d2;d3",
-                "EnableEnhancedInstructionSet": "0",
-                "EnableFiberSafeOptimizations": "true",
-                "EnableFunctionLevelLinking": "true",
-                "EnableIntrinsicFunctions": "true",
-                "EnablePREfast": "true",
-                "ErrorReporting": "1",
-                "ExceptionHandling": "2",
-                "ExpandAttributedSource": "true",
-                "FavorSizeOrSpeed": "0",
-                "FloatingPointExceptions": "true",
-                "FloatingPointModel": "1",
-                "ForceConformanceInForLoopScope": "true",
-                "ForcedIncludeFiles": "file1;file2;file3",
-                "ForcedUsingFiles": "file1;file2;file3",
-                "GeneratePreprocessedFile": "1",
-                "GenerateXMLDocumentationFiles": "true",
-                "IgnoreStandardIncludePath": "true",
-                "InlineFunctionExpansion": "2",
-                "KeepComments": "true",
-                "MinimalRebuild": "true",
-                "ObjectFile": "a_file_name",
-                "OmitDefaultLibName": "true",
-                "OmitFramePointers": "true",
-                "OpenMP": "true",
-                "Optimization": "3",
-                "PrecompiledHeaderFile": "a_file_name",
-                "PrecompiledHeaderThrough": "a_file_name",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "ProgramDataBaseFileName": "a_file_name",
-                "RuntimeLibrary": "0",
-                "RuntimeTypeInfo": "true",
-                "ShowIncludes": "true",
-                "SmallerTypeCheck": "true",
-                "StringPooling": "true",
-                "StructMemberAlignment": "1",
-                "SuppressStartupBanner": "true",
-                "TreatWChar_tAsBuiltInType": "true",
-                "UndefineAllPreprocessorDefinitions": "true",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-                "UseFullPaths": "true",
-                "UsePrecompiledHeader": "1",
-                "UseUnicodeResponseFiles": "true",
-                "WarnAsError": "true",
-                "WarningLevel": "2",
-                "WholeProgramOptimization": "true",
-                "XMLDocumentationFileName": "a_file_name",
-            },
-            "VCLinkerTool": {
-                "AdditionalDependencies": "file1;file2;file3",
-                "AdditionalLibraryDirectories": "folder1;folder2;folder3",
-                "AdditionalLibraryDirectories_excluded": "folder1;folder2;folder3",
-                "AdditionalManifestDependencies": "file1;file2;file3",
-                "AdditionalOptions": "a_string",
-                "AddModuleNamesToAssembly": "file1;file2;file3",
-                "AllowIsolation": "true",
-                "AssemblyDebug": "0",
-                "AssemblyLinkResource": "file1;file2;file3",
-                "BaseAddress": "a_string",
-                "CLRImageType": "1",
-                "CLRThreadAttribute": "2",
-                "CLRUnmanagedCodeCheck": "true",
-                "DataExecutionPrevention": "0",
-                "DelayLoadDLLs": "file1;file2;file3",
-                "DelaySign": "true",
-                "Driver": "1",
-                "EmbedManagedResourceFile": "file1;file2;file3",
-                "EnableCOMDATFolding": "0",
-                "EnableUAC": "true",
-                "EntryPointSymbol": "a_string",
-                "ErrorReporting": "0",
-                "FixedBaseAddress": "1",
-                "ForceSymbolReferences": "file1;file2;file3",
-                "FunctionOrder": "a_file_name",
-                "GenerateDebugInformation": "true",
-                "GenerateManifest": "true",
-                "GenerateMapFile": "true",
-                "HeapCommitSize": "a_string",
-                "HeapReserveSize": "a_string",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreDefaultLibraryNames": "file1;file2;file3",
-                "IgnoreEmbeddedIDL": "true",
-                "IgnoreImportLibrary": "true",
-                "ImportLibrary": "a_file_name",
-                "KeyContainer": "a_file_name",
-                "KeyFile": "a_file_name",
-                "LargeAddressAware": "2",
-                "LinkIncremental": "1",
-                "LinkLibraryDependencies": "true",
-                "LinkTimeCodeGeneration": "2",
-                "ManifestFile": "a_file_name",
-                "MapExports": "true",
-                "MapFileName": "a_file_name",
-                "MergedIDLBaseFileName": "a_file_name",
-                "MergeSections": "a_string",
-                "MidlCommandFile": "a_file_name",
-                "ModuleDefinitionFile": "a_file_name",
-                "OptimizeForWindows98": "1",
-                "OptimizeReferences": "0",
-                "OutputFile": "a_file_name",
-                "PerUserRedirection": "true",
-                "Profile": "true",
-                "ProfileGuidedDatabase": "a_file_name",
-                "ProgramDatabaseFile": "a_file_name",
-                "RandomizedBaseAddress": "1",
-                "RegisterOutput": "true",
-                "ResourceOnlyDLL": "true",
-                "SetChecksum": "true",
-                "ShowProgress": "0",
-                "StackCommitSize": "a_string",
-                "StackReserveSize": "a_string",
-                "StripPrivateSymbols": "a_file_name",
-                "SubSystem": "2",
-                "SupportUnloadOfDelayLoadedDLL": "true",
-                "SuppressStartupBanner": "true",
-                "SwapRunFromCD": "true",
-                "SwapRunFromNet": "true",
-                "TargetMachine": "3",
-                "TerminalServerAware": "2",
-                "TurnOffAssemblyGeneration": "true",
-                "TypeLibraryFile": "a_file_name",
-                "TypeLibraryResourceID": "33",
-                "UACExecutionLevel": "1",
-                "UACUIAccess": "true",
-                "UseLibraryDependencyInputs": "false",
-                "UseUnicodeResponseFiles": "true",
-                "Version": "a_string",
-            },
-            "VCResourceCompilerTool": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "Culture": "1003",
-                "IgnoreStandardIncludePath": "true",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "ResourceOutputFileName": "a_string",
-                "ShowProgress": "true",
-                "SuppressStartupBanner": "true",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-            },
-            "VCMIDLTool": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "CPreprocessOptions": "a_string",
-                "DefaultCharType": "0",
-                "DLLDataFileName": "a_file_name",
-                "EnableErrorChecks": "2",
-                "ErrorCheckAllocations": "true",
-                "ErrorCheckBounds": "true",
-                "ErrorCheckEnumRange": "true",
-                "ErrorCheckRefPointers": "true",
-                "ErrorCheckStubData": "true",
-                "GenerateStublessProxies": "true",
-                "GenerateTypeLibrary": "true",
-                "HeaderFileName": "a_file_name",
-                "IgnoreStandardIncludePath": "true",
-                "InterfaceIdentifierFileName": "a_file_name",
-                "MkTypLibCompatible": "true",
-                "OutputDirectory": "a_string",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "ProxyFileName": "a_file_name",
-                "RedirectOutputAndErrors": "a_file_name",
-                "StructMemberAlignment": "3",
-                "SuppressStartupBanner": "true",
-                "TargetEnvironment": "1",
-                "TypeLibraryName": "a_file_name",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-                "ValidateParameters": "true",
-                "WarnAsError": "true",
-                "WarningLevel": "4",
-            },
-            "VCLibrarianTool": {
-                "AdditionalDependencies": "file1;file2;file3",
-                "AdditionalLibraryDirectories": "folder1;folder2;folder3",
-                "AdditionalLibraryDirectories_excluded": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "ExportNamedFunctions": "d1;d2;d3",
-                "ForceSymbolReferences": "a_string",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreSpecificDefaultLibraries": "file1;file2;file3",
-                "LinkLibraryDependencies": "true",
-                "ModuleDefinitionFile": "a_file_name",
-                "OutputFile": "a_file_name",
-                "SuppressStartupBanner": "true",
-                "UseUnicodeResponseFiles": "true",
-            },
-            "VCManifestTool": {
-                "AdditionalManifestFiles": "file1;file2;file3",
-                "AdditionalOptions": "a_string",
-                "AssemblyIdentity": "a_string",
-                "ComponentFileName": "a_file_name",
-                "DependencyInformationFile": "a_file_name",
-                "EmbedManifest": "true",
-                "GenerateCatalogFiles": "true",
-                "InputResourceManifests": "a_string",
-                "ManifestResourceFile": "my_name",
-                "OutputManifestFile": "a_file_name",
-                "RegistrarScriptFile": "a_file_name",
-                "ReplacementsFile": "a_file_name",
-                "SuppressStartupBanner": "true",
-                "TypeLibraryFile": "a_file_name",
-                "UpdateFileHashes": "true",
-                "UpdateFileHashesSearchPath": "a_file_name",
-                "UseFAT32Workaround": "true",
-                "UseUnicodeResponseFiles": "true",
-                "VerboseOutput": "true",
-            },
-        }
-        expected_msbuild_settings = {
-            "ClCompile": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string /J",
-                "AdditionalUsingDirectories": "folder1;folder2;folder3",
-                "AssemblerListingLocation": "a_file_name",
-                "AssemblerOutput": "NoListing",
-                "BasicRuntimeChecks": "StackFrameRuntimeCheck",
-                "BrowseInformation": "true",
-                "BrowseInformationFile": "a_file_name",
-                "BufferSecurityCheck": "true",
-                "CallingConvention": "Cdecl",
-                "CompileAs": "CompileAsC",
-                "DebugInformationFormat": "EditAndContinue",
-                "DisableLanguageExtensions": "true",
-                "DisableSpecificWarnings": "d1;d2;d3",
-                "EnableEnhancedInstructionSet": "NotSet",
-                "EnableFiberSafeOptimizations": "true",
-                "EnablePREfast": "true",
-                "ErrorReporting": "Prompt",
-                "ExceptionHandling": "Async",
-                "ExpandAttributedSource": "true",
-                "FavorSizeOrSpeed": "Neither",
-                "FloatingPointExceptions": "true",
-                "FloatingPointModel": "Strict",
-                "ForceConformanceInForLoopScope": "true",
-                "ForcedIncludeFiles": "file1;file2;file3",
-                "ForcedUsingFiles": "file1;file2;file3",
-                "FunctionLevelLinking": "true",
-                "GenerateXMLDocumentationFiles": "true",
-                "IgnoreStandardIncludePath": "true",
-                "InlineFunctionExpansion": "AnySuitable",
-                "IntrinsicFunctions": "true",
-                "MinimalRebuild": "true",
-                "ObjectFileName": "a_file_name",
-                "OmitDefaultLibName": "true",
-                "OmitFramePointers": "true",
-                "OpenMPSupport": "true",
-                "Optimization": "Full",
-                "PrecompiledHeader": "Create",
-                "PrecompiledHeaderFile": "a_file_name",
-                "PrecompiledHeaderOutputFile": "a_file_name",
-                "PreprocessKeepComments": "true",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "PreprocessSuppressLineNumbers": "false",
-                "PreprocessToFile": "true",
-                "ProgramDataBaseFileName": "a_file_name",
-                "RuntimeLibrary": "MultiThreaded",
-                "RuntimeTypeInfo": "true",
-                "ShowIncludes": "true",
-                "SmallerTypeCheck": "true",
-                "StringPooling": "true",
-                "StructMemberAlignment": "1Byte",
-                "SuppressStartupBanner": "true",
-                "TreatWarningAsError": "true",
-                "TreatWChar_tAsBuiltInType": "true",
-                "UndefineAllPreprocessorDefinitions": "true",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-                "UseFullPaths": "true",
-                "WarningLevel": "Level2",
-                "WholeProgramOptimization": "true",
-                "XMLDocumentationFileName": "a_file_name",
-            },
-            "Link": {
-                "AdditionalDependencies": "file1;file2;file3",
-                "AdditionalLibraryDirectories": "folder1;folder2;folder3",
-                "AdditionalManifestDependencies": "file1;file2;file3",
-                "AdditionalOptions": "a_string",
-                "AddModuleNamesToAssembly": "file1;file2;file3",
-                "AllowIsolation": "true",
-                "AssemblyDebug": "",
-                "AssemblyLinkResource": "file1;file2;file3",
-                "BaseAddress": "a_string",
-                "CLRImageType": "ForceIJWImage",
-                "CLRThreadAttribute": "STAThreadingAttribute",
-                "CLRUnmanagedCodeCheck": "true",
-                "DataExecutionPrevention": "",
-                "DelayLoadDLLs": "file1;file2;file3",
-                "DelaySign": "true",
-                "Driver": "Driver",
-                "EmbedManagedResourceFile": "file1;file2;file3",
-                "EnableCOMDATFolding": "",
-                "EnableUAC": "true",
-                "EntryPointSymbol": "a_string",
-                "FixedBaseAddress": "false",
-                "ForceSymbolReferences": "file1;file2;file3",
-                "FunctionOrder": "a_file_name",
-                "GenerateDebugInformation": "true",
-                "GenerateMapFile": "true",
-                "HeapCommitSize": "a_string",
-                "HeapReserveSize": "a_string",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreEmbeddedIDL": "true",
-                "IgnoreSpecificDefaultLibraries": "file1;file2;file3",
-                "ImportLibrary": "a_file_name",
-                "KeyContainer": "a_file_name",
-                "KeyFile": "a_file_name",
-                "LargeAddressAware": "true",
-                "LinkErrorReporting": "NoErrorReport",
-                "LinkTimeCodeGeneration": "PGInstrument",
-                "ManifestFile": "a_file_name",
-                "MapExports": "true",
-                "MapFileName": "a_file_name",
-                "MergedIDLBaseFileName": "a_file_name",
-                "MergeSections": "a_string",
-                "MidlCommandFile": "a_file_name",
-                "ModuleDefinitionFile": "a_file_name",
-                "NoEntryPoint": "true",
-                "OptimizeReferences": "",
-                "OutputFile": "a_file_name",
-                "PerUserRedirection": "true",
-                "Profile": "true",
-                "ProfileGuidedDatabase": "a_file_name",
-                "ProgramDatabaseFile": "a_file_name",
-                "RandomizedBaseAddress": "false",
-                "RegisterOutput": "true",
-                "SetChecksum": "true",
-                "ShowProgress": "NotSet",
-                "StackCommitSize": "a_string",
-                "StackReserveSize": "a_string",
-                "StripPrivateSymbols": "a_file_name",
-                "SubSystem": "Windows",
-                "SupportUnloadOfDelayLoadedDLL": "true",
-                "SuppressStartupBanner": "true",
-                "SwapRunFromCD": "true",
-                "SwapRunFromNET": "true",
-                "TargetMachine": "MachineARM",
-                "TerminalServerAware": "true",
-                "TurnOffAssemblyGeneration": "true",
-                "TypeLibraryFile": "a_file_name",
-                "TypeLibraryResourceID": "33",
-                "UACExecutionLevel": "HighestAvailable",
-                "UACUIAccess": "true",
-                "Version": "a_string",
-            },
-            "ResourceCompile": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "Culture": "0x03eb",
-                "IgnoreStandardIncludePath": "true",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "ResourceOutputFileName": "a_string",
-                "ShowProgress": "true",
-                "SuppressStartupBanner": "true",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-            },
-            "Midl": {
-                "AdditionalIncludeDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "CPreprocessOptions": "a_string",
-                "DefaultCharType": "Unsigned",
-                "DllDataFileName": "a_file_name",
-                "EnableErrorChecks": "All",
-                "ErrorCheckAllocations": "true",
-                "ErrorCheckBounds": "true",
-                "ErrorCheckEnumRange": "true",
-                "ErrorCheckRefPointers": "true",
-                "ErrorCheckStubData": "true",
-                "GenerateStublessProxies": "true",
-                "GenerateTypeLibrary": "true",
-                "HeaderFileName": "a_file_name",
-                "IgnoreStandardIncludePath": "true",
-                "InterfaceIdentifierFileName": "a_file_name",
-                "MkTypLibCompatible": "true",
-                "OutputDirectory": "a_string",
-                "PreprocessorDefinitions": "d1;d2;d3",
-                "ProxyFileName": "a_file_name",
-                "RedirectOutputAndErrors": "a_file_name",
-                "StructMemberAlignment": "4",
-                "SuppressStartupBanner": "true",
-                "TargetEnvironment": "Win32",
-                "TypeLibraryName": "a_file_name",
-                "UndefinePreprocessorDefinitions": "d1;d2;d3",
-                "ValidateAllParameters": "true",
-                "WarnAsError": "true",
-                "WarningLevel": "4",
-            },
-            "Lib": {
-                "AdditionalDependencies": "file1;file2;file3",
-                "AdditionalLibraryDirectories": "folder1;folder2;folder3",
-                "AdditionalOptions": "a_string",
-                "ExportNamedFunctions": "d1;d2;d3",
-                "ForceSymbolReferences": "a_string",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreSpecificDefaultLibraries": "file1;file2;file3",
-                "ModuleDefinitionFile": "a_file_name",
-                "OutputFile": "a_file_name",
-                "SuppressStartupBanner": "true",
-                "UseUnicodeResponseFiles": "true",
-            },
-            "Manifest": {
-                "AdditionalManifestFiles": "file1;file2;file3",
-                "AdditionalOptions": "a_string",
-                "AssemblyIdentity": "a_string",
-                "ComponentFileName": "a_file_name",
-                "GenerateCatalogFiles": "true",
-                "InputResourceManifests": "a_string",
-                "OutputManifestFile": "a_file_name",
-                "RegistrarScriptFile": "a_file_name",
-                "ReplacementsFile": "a_file_name",
-                "SuppressStartupBanner": "true",
-                "TypeLibraryFile": "a_file_name",
-                "UpdateFileHashes": "true",
-                "UpdateFileHashesSearchPath": "a_file_name",
-                "VerboseOutput": "true",
-            },
-            "ManifestResourceCompile": {"ResourceOutputFileName": "my_name"},
-            "ProjectReference": {
-                "LinkLibraryDependencies": "true",
-                "UseLibraryDependencyInputs": "false",
-            },
-            "": {
-                "EmbedManifest": "true",
-                "GenerateManifest": "true",
-                "IgnoreImportLibrary": "true",
-                "LinkIncremental": "false",
-            },
-        }
-        self.maxDiff = 9999  # on failure display a long diff
-        actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
-            msvs_settings, self.stderr
-        )
-        self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
-        self._ExpectedWarnings([])
-
-    def testConvertToMSBuildSettings_actual(self):
-        """Tests the conversion of an actual project.
-
-    A VS2008 project with most of the options defined was created through the
-    VS2008 IDE.  It was then converted to VS2010.  The tool settings found in
-    the .vcproj and .vcxproj files were converted to the two dictionaries
-    msvs_settings and expected_msbuild_settings.
-
-    Note that for many settings, the VS2010 converter adds macros like
-    %(AdditionalIncludeDirectories) to make sure than inherited values are
-    included.  Since the Gyp projects we generate do not use inheritance,
-    we removed these macros.  They were:
-        ClCompile:
-            AdditionalIncludeDirectories:  ';%(AdditionalIncludeDirectories)'
-            AdditionalOptions:  ' %(AdditionalOptions)'
-            AdditionalUsingDirectories:  ';%(AdditionalUsingDirectories)'
-            DisableSpecificWarnings: ';%(DisableSpecificWarnings)',
-            ForcedIncludeFiles:  ';%(ForcedIncludeFiles)',
-            ForcedUsingFiles:  ';%(ForcedUsingFiles)',
-            PreprocessorDefinitions:  ';%(PreprocessorDefinitions)',
-            UndefinePreprocessorDefinitions:
-                ';%(UndefinePreprocessorDefinitions)',
-        Link:
-            AdditionalDependencies:  ';%(AdditionalDependencies)',
-            AdditionalLibraryDirectories:  ';%(AdditionalLibraryDirectories)',
-            AdditionalManifestDependencies:
-                ';%(AdditionalManifestDependencies)',
-            AdditionalOptions:  ' %(AdditionalOptions)',
-            AddModuleNamesToAssembly:  ';%(AddModuleNamesToAssembly)',
-            AssemblyLinkResource:  ';%(AssemblyLinkResource)',
-            DelayLoadDLLs:  ';%(DelayLoadDLLs)',
-            EmbedManagedResourceFile:  ';%(EmbedManagedResourceFile)',
-            ForceSymbolReferences:  ';%(ForceSymbolReferences)',
-            IgnoreSpecificDefaultLibraries:
-                ';%(IgnoreSpecificDefaultLibraries)',
-        ResourceCompile:
-            AdditionalIncludeDirectories:  ';%(AdditionalIncludeDirectories)',
-            AdditionalOptions:  ' %(AdditionalOptions)',
-            PreprocessorDefinitions:  ';%(PreprocessorDefinitions)',
-        Manifest:
-            AdditionalManifestFiles:  ';%(AdditionalManifestFiles)',
-            AdditionalOptions:  ' %(AdditionalOptions)',
-            InputResourceManifests:  ';%(InputResourceManifests)',
-    """
-        msvs_settings = {
-            "VCCLCompilerTool": {
-                "AdditionalIncludeDirectories": "dir1",
-                "AdditionalOptions": "/more",
-                "AdditionalUsingDirectories": "test",
-                "AssemblerListingLocation": "$(IntDir)\\a",
-                "AssemblerOutput": "1",
-                "BasicRuntimeChecks": "3",
-                "BrowseInformation": "1",
-                "BrowseInformationFile": "$(IntDir)\\e",
-                "BufferSecurityCheck": "false",
-                "CallingConvention": "1",
-                "CompileAs": "1",
-                "DebugInformationFormat": "4",
-                "DefaultCharIsUnsigned": "true",
-                "Detect64BitPortabilityProblems": "true",
-                "DisableLanguageExtensions": "true",
-                "DisableSpecificWarnings": "abc",
-                "EnableEnhancedInstructionSet": "1",
-                "EnableFiberSafeOptimizations": "true",
-                "EnableFunctionLevelLinking": "true",
-                "EnableIntrinsicFunctions": "true",
-                "EnablePREfast": "true",
-                "ErrorReporting": "2",
-                "ExceptionHandling": "2",
-                "ExpandAttributedSource": "true",
-                "FavorSizeOrSpeed": "2",
-                "FloatingPointExceptions": "true",
-                "FloatingPointModel": "1",
-                "ForceConformanceInForLoopScope": "false",
-                "ForcedIncludeFiles": "def",
-                "ForcedUsingFiles": "ge",
-                "GeneratePreprocessedFile": "2",
-                "GenerateXMLDocumentationFiles": "true",
-                "IgnoreStandardIncludePath": "true",
-                "InlineFunctionExpansion": "1",
-                "KeepComments": "true",
-                "MinimalRebuild": "true",
-                "ObjectFile": "$(IntDir)\\b",
-                "OmitDefaultLibName": "true",
-                "OmitFramePointers": "true",
-                "OpenMP": "true",
-                "Optimization": "3",
-                "PrecompiledHeaderFile": "$(IntDir)\\$(TargetName).pche",
-                "PrecompiledHeaderThrough": "StdAfx.hd",
-                "PreprocessorDefinitions": "WIN32;_DEBUG;_CONSOLE",
-                "ProgramDataBaseFileName": "$(IntDir)\\vc90b.pdb",
-                "RuntimeLibrary": "3",
-                "RuntimeTypeInfo": "false",
-                "ShowIncludes": "true",
-                "SmallerTypeCheck": "true",
-                "StringPooling": "true",
-                "StructMemberAlignment": "3",
-                "SuppressStartupBanner": "false",
-                "TreatWChar_tAsBuiltInType": "false",
-                "UndefineAllPreprocessorDefinitions": "true",
-                "UndefinePreprocessorDefinitions": "wer",
-                "UseFullPaths": "true",
-                "UsePrecompiledHeader": "0",
-                "UseUnicodeResponseFiles": "false",
-                "WarnAsError": "true",
-                "WarningLevel": "3",
-                "WholeProgramOptimization": "true",
-                "XMLDocumentationFileName": "$(IntDir)\\c",
-            },
-            "VCLinkerTool": {
-                "AdditionalDependencies": "zx",
-                "AdditionalLibraryDirectories": "asd",
-                "AdditionalManifestDependencies": "s2",
-                "AdditionalOptions": "/mor2",
-                "AddModuleNamesToAssembly": "d1",
-                "AllowIsolation": "false",
-                "AssemblyDebug": "1",
-                "AssemblyLinkResource": "d5",
-                "BaseAddress": "23423",
-                "CLRImageType": "3",
-                "CLRThreadAttribute": "1",
-                "CLRUnmanagedCodeCheck": "true",
-                "DataExecutionPrevention": "0",
-                "DelayLoadDLLs": "d4",
-                "DelaySign": "true",
-                "Driver": "2",
-                "EmbedManagedResourceFile": "d2",
-                "EnableCOMDATFolding": "1",
-                "EnableUAC": "false",
-                "EntryPointSymbol": "f5",
-                "ErrorReporting": "2",
-                "FixedBaseAddress": "1",
-                "ForceSymbolReferences": "d3",
-                "FunctionOrder": "fssdfsd",
-                "GenerateDebugInformation": "true",
-                "GenerateManifest": "false",
-                "GenerateMapFile": "true",
-                "HeapCommitSize": "13",
-                "HeapReserveSize": "12",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreDefaultLibraryNames": "flob;flok",
-                "IgnoreEmbeddedIDL": "true",
-                "IgnoreImportLibrary": "true",
-                "ImportLibrary": "f4",
-                "KeyContainer": "f7",
-                "KeyFile": "f6",
-                "LargeAddressAware": "2",
-                "LinkIncremental": "0",
-                "LinkLibraryDependencies": "false",
-                "LinkTimeCodeGeneration": "1",
-                "ManifestFile": "$(IntDir)\\$(TargetFileName).2intermediate.manifest",
-                "MapExports": "true",
-                "MapFileName": "d5",
-                "MergedIDLBaseFileName": "f2",
-                "MergeSections": "f5",
-                "MidlCommandFile": "f1",
-                "ModuleDefinitionFile": "sdsd",
-                "OptimizeForWindows98": "2",
-                "OptimizeReferences": "2",
-                "OutputFile": "$(OutDir)\\$(ProjectName)2.exe",
-                "PerUserRedirection": "true",
-                "Profile": "true",
-                "ProfileGuidedDatabase": "$(TargetDir)$(TargetName).pgdd",
-                "ProgramDatabaseFile": "Flob.pdb",
-                "RandomizedBaseAddress": "1",
-                "RegisterOutput": "true",
-                "ResourceOnlyDLL": "true",
-                "SetChecksum": "false",
-                "ShowProgress": "1",
-                "StackCommitSize": "15",
-                "StackReserveSize": "14",
-                "StripPrivateSymbols": "d3",
-                "SubSystem": "1",
-                "SupportUnloadOfDelayLoadedDLL": "true",
-                "SuppressStartupBanner": "false",
-                "SwapRunFromCD": "true",
-                "SwapRunFromNet": "true",
-                "TargetMachine": "1",
-                "TerminalServerAware": "1",
-                "TurnOffAssemblyGeneration": "true",
-                "TypeLibraryFile": "f3",
-                "TypeLibraryResourceID": "12",
-                "UACExecutionLevel": "2",
-                "UACUIAccess": "true",
-                "UseLibraryDependencyInputs": "true",
-                "UseUnicodeResponseFiles": "false",
-                "Version": "333",
-            },
-            "VCResourceCompilerTool": {
-                "AdditionalIncludeDirectories": "f3",
-                "AdditionalOptions": "/more3",
-                "Culture": "3084",
-                "IgnoreStandardIncludePath": "true",
-                "PreprocessorDefinitions": "_UNICODE;UNICODE2",
-                "ResourceOutputFileName": "$(IntDir)/$(InputName)3.res",
-                "ShowProgress": "true",
-            },
-            "VCManifestTool": {
-                "AdditionalManifestFiles": "sfsdfsd",
-                "AdditionalOptions": "afdsdafsd",
-                "AssemblyIdentity": "sddfdsadfsa",
-                "ComponentFileName": "fsdfds",
-                "DependencyInformationFile": "$(IntDir)\\mt.depdfd",
-                "EmbedManifest": "false",
-                "GenerateCatalogFiles": "true",
-                "InputResourceManifests": "asfsfdafs",
-                "ManifestResourceFile":
-                    "$(IntDir)\\$(TargetFileName).embed.manifest.resfdsf",
-                "OutputManifestFile": "$(TargetPath).manifestdfs",
-                "RegistrarScriptFile": "sdfsfd",
-                "ReplacementsFile": "sdffsd",
-                "SuppressStartupBanner": "false",
-                "TypeLibraryFile": "sfsd",
-                "UpdateFileHashes": "true",
-                "UpdateFileHashesSearchPath": "sfsd",
-                "UseFAT32Workaround": "true",
-                "UseUnicodeResponseFiles": "false",
-                "VerboseOutput": "true",
-            },
-        }
-        expected_msbuild_settings = {
-            "ClCompile": {
-                "AdditionalIncludeDirectories": "dir1",
-                "AdditionalOptions": "/more /J",
-                "AdditionalUsingDirectories": "test",
-                "AssemblerListingLocation": "$(IntDir)a",
-                "AssemblerOutput": "AssemblyCode",
-                "BasicRuntimeChecks": "EnableFastChecks",
-                "BrowseInformation": "true",
-                "BrowseInformationFile": "$(IntDir)e",
-                "BufferSecurityCheck": "false",
-                "CallingConvention": "FastCall",
-                "CompileAs": "CompileAsC",
-                "DebugInformationFormat": "EditAndContinue",
-                "DisableLanguageExtensions": "true",
-                "DisableSpecificWarnings": "abc",
-                "EnableEnhancedInstructionSet": "StreamingSIMDExtensions",
-                "EnableFiberSafeOptimizations": "true",
-                "EnablePREfast": "true",
-                "ErrorReporting": "Queue",
-                "ExceptionHandling": "Async",
-                "ExpandAttributedSource": "true",
-                "FavorSizeOrSpeed": "Size",
-                "FloatingPointExceptions": "true",
-                "FloatingPointModel": "Strict",
-                "ForceConformanceInForLoopScope": "false",
-                "ForcedIncludeFiles": "def",
-                "ForcedUsingFiles": "ge",
-                "FunctionLevelLinking": "true",
-                "GenerateXMLDocumentationFiles": "true",
-                "IgnoreStandardIncludePath": "true",
-                "InlineFunctionExpansion": "OnlyExplicitInline",
-                "IntrinsicFunctions": "true",
-                "MinimalRebuild": "true",
-                "ObjectFileName": "$(IntDir)b",
-                "OmitDefaultLibName": "true",
-                "OmitFramePointers": "true",
-                "OpenMPSupport": "true",
-                "Optimization": "Full",
-                "PrecompiledHeader": "NotUsing",  # Actual conversion gives ''
-                "PrecompiledHeaderFile": "StdAfx.hd",
-                "PrecompiledHeaderOutputFile": "$(IntDir)$(TargetName).pche",
-                "PreprocessKeepComments": "true",
-                "PreprocessorDefinitions": "WIN32;_DEBUG;_CONSOLE",
-                "PreprocessSuppressLineNumbers": "true",
-                "PreprocessToFile": "true",
-                "ProgramDataBaseFileName": "$(IntDir)vc90b.pdb",
-                "RuntimeLibrary": "MultiThreadedDebugDLL",
-                "RuntimeTypeInfo": "false",
-                "ShowIncludes": "true",
-                "SmallerTypeCheck": "true",
-                "StringPooling": "true",
-                "StructMemberAlignment": "4Bytes",
-                "SuppressStartupBanner": "false",
-                "TreatWarningAsError": "true",
-                "TreatWChar_tAsBuiltInType": "false",
-                "UndefineAllPreprocessorDefinitions": "true",
-                "UndefinePreprocessorDefinitions": "wer",
-                "UseFullPaths": "true",
-                "WarningLevel": "Level3",
-                "WholeProgramOptimization": "true",
-                "XMLDocumentationFileName": "$(IntDir)c",
-            },
-            "Link": {
-                "AdditionalDependencies": "zx",
-                "AdditionalLibraryDirectories": "asd",
-                "AdditionalManifestDependencies": "s2",
-                "AdditionalOptions": "/mor2",
-                "AddModuleNamesToAssembly": "d1",
-                "AllowIsolation": "false",
-                "AssemblyDebug": "true",
-                "AssemblyLinkResource": "d5",
-                "BaseAddress": "23423",
-                "CLRImageType": "ForceSafeILImage",
-                "CLRThreadAttribute": "MTAThreadingAttribute",
-                "CLRUnmanagedCodeCheck": "true",
-                "DataExecutionPrevention": "",
-                "DelayLoadDLLs": "d4",
-                "DelaySign": "true",
-                "Driver": "UpOnly",
-                "EmbedManagedResourceFile": "d2",
-                "EnableCOMDATFolding": "false",
-                "EnableUAC": "false",
-                "EntryPointSymbol": "f5",
-                "FixedBaseAddress": "false",
-                "ForceSymbolReferences": "d3",
-                "FunctionOrder": "fssdfsd",
-                "GenerateDebugInformation": "true",
-                "GenerateMapFile": "true",
-                "HeapCommitSize": "13",
-                "HeapReserveSize": "12",
-                "IgnoreAllDefaultLibraries": "true",
-                "IgnoreEmbeddedIDL": "true",
-                "IgnoreSpecificDefaultLibraries": "flob;flok",
-                "ImportLibrary": "f4",
-                "KeyContainer": "f7",
-                "KeyFile": "f6",
-                "LargeAddressAware": "true",
-                "LinkErrorReporting": "QueueForNextLogin",
-                "LinkTimeCodeGeneration": "UseLinkTimeCodeGeneration",
-                "ManifestFile": "$(IntDir)$(TargetFileName).2intermediate.manifest",
-                "MapExports": "true",
-                "MapFileName": "d5",
-                "MergedIDLBaseFileName": "f2",
-                "MergeSections": "f5",
-                "MidlCommandFile": "f1",
-                "ModuleDefinitionFile": "sdsd",
-                "NoEntryPoint": "true",
-                "OptimizeReferences": "true",
-                "OutputFile": "$(OutDir)$(ProjectName)2.exe",
-                "PerUserRedirection": "true",
-                "Profile": "true",
-                "ProfileGuidedDatabase": "$(TargetDir)$(TargetName).pgdd",
-                "ProgramDatabaseFile": "Flob.pdb",
-                "RandomizedBaseAddress": "false",
-                "RegisterOutput": "true",
-                "SetChecksum": "false",
-                "ShowProgress": "LinkVerbose",
-                "StackCommitSize": "15",
-                "StackReserveSize": "14",
-                "StripPrivateSymbols": "d3",
-                "SubSystem": "Console",
-                "SupportUnloadOfDelayLoadedDLL": "true",
-                "SuppressStartupBanner": "false",
-                "SwapRunFromCD": "true",
-                "SwapRunFromNET": "true",
-                "TargetMachine": "MachineX86",
-                "TerminalServerAware": "false",
-                "TurnOffAssemblyGeneration": "true",
-                "TypeLibraryFile": "f3",
-                "TypeLibraryResourceID": "12",
-                "UACExecutionLevel": "RequireAdministrator",
-                "UACUIAccess": "true",
-                "Version": "333",
-            },
-            "ResourceCompile": {
-                "AdditionalIncludeDirectories": "f3",
-                "AdditionalOptions": "/more3",
-                "Culture": "0x0c0c",
-                "IgnoreStandardIncludePath": "true",
-                "PreprocessorDefinitions": "_UNICODE;UNICODE2",
-                "ResourceOutputFileName": "$(IntDir)%(Filename)3.res",
-                "ShowProgress": "true",
-            },
-            "Manifest": {
-                "AdditionalManifestFiles": "sfsdfsd",
-                "AdditionalOptions": "afdsdafsd",
-                "AssemblyIdentity": "sddfdsadfsa",
-                "ComponentFileName": "fsdfds",
-                "GenerateCatalogFiles": "true",
-                "InputResourceManifests": "asfsfdafs",
-                "OutputManifestFile": "$(TargetPath).manifestdfs",
-                "RegistrarScriptFile": "sdfsfd",
-                "ReplacementsFile": "sdffsd",
-                "SuppressStartupBanner": "false",
-                "TypeLibraryFile": "sfsd",
-                "UpdateFileHashes": "true",
-                "UpdateFileHashesSearchPath": "sfsd",
-                "VerboseOutput": "true",
-            },
-            "ProjectReference": {
-                "LinkLibraryDependencies": "false",
-                "UseLibraryDependencyInputs": "true",
-            },
-            "": {
-                "EmbedManifest": "false",
-                "GenerateManifest": "false",
-                "IgnoreImportLibrary": "true",
-                "LinkIncremental": "",
-            },
-            "ManifestResourceCompile": {
-                "ResourceOutputFileName":
-                    "$(IntDir)$(TargetFileName).embed.manifest.resfdsf"
-            },
-        }
-        self.maxDiff = 9999  # on failure display a long diff
-        actual_msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(
-            msvs_settings, self.stderr
-        )
-        self.assertEqual(expected_msbuild_settings, actual_msbuild_settings)
-        self._ExpectedWarnings([])
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
deleted file mode 100644
index 2e5c811..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio project reader/writer."""
-
-import gyp.easy_xml as easy_xml
-
-
-class Writer:
-    """Visual Studio XML tool file writer."""
-
-    def __init__(self, tool_file_path, name):
-        """Initializes the tool file.
-
-    Args:
-      tool_file_path: Path to the tool file.
-      name: Name of the tool file.
-    """
-        self.tool_file_path = tool_file_path
-        self.name = name
-        self.rules_section = ["Rules"]
-
-    def AddCustomBuildRule(
-        self, name, cmd, description, additional_dependencies, outputs, extensions
-    ):
-        """Adds a rule to the tool file.
-
-    Args:
-      name: Name of the rule.
-      description: Description of the rule.
-      cmd: Command line of the rule.
-      additional_dependencies: other files which may trigger the rule.
-      outputs: outputs of the rule.
-      extensions: extensions handled by the rule.
-    """
-        rule = [
-            "CustomBuildRule",
-            {
-                "Name": name,
-                "ExecutionDescription": description,
-                "CommandLine": cmd,
-                "Outputs": ";".join(outputs),
-                "FileExtensions": ";".join(extensions),
-                "AdditionalDependencies": ";".join(additional_dependencies),
-            },
-        ]
-        self.rules_section.append(rule)
-
-    def WriteIfChanged(self):
-        """Writes the tool file."""
-        content = [
-            "VisualStudioToolFile",
-            {"Version": "8.00", "Name": self.name},
-            self.rules_section,
-        ]
-        easy_xml.WriteXmlIfChanged(
-            content, self.tool_file_path, encoding="Windows-1252"
-        )
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
deleted file mode 100644
index e580c00..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Visual Studio user preferences file writer."""
-
-import os
-import re
-import socket  # for gethostname
-
-import gyp.easy_xml as easy_xml
-
-
-# ------------------------------------------------------------------------------
-
-
-def _FindCommandInPath(command):
-    """If there are no slashes in the command given, this function
-     searches the PATH env to find the given command, and converts it
-     to an absolute path.  We have to do this because MSVS is looking
-     for an actual file to launch a debugger on, not just a command
-     line.  Note that this happens at GYP time, so anything needing to
-     be built needs to have a full path."""
-    if "/" in command or "\\" in command:
-        # If the command already has path elements (either relative or
-        # absolute), then assume it is constructed properly.
-        return command
-    else:
-        # Search through the path list and find an existing file that
-        # we can access.
-        paths = os.environ.get("PATH", "").split(os.pathsep)
-        for path in paths:
-            item = os.path.join(path, command)
-            if os.path.isfile(item) and os.access(item, os.X_OK):
-                return item
-    return command
-
-
-def _QuoteWin32CommandLineArgs(args):
-    new_args = []
-    for arg in args:
-        # Replace all double-quotes with double-double-quotes to escape
-        # them for cmd shell, and then quote the whole thing if there
-        # are any.
-        if arg.find('"') != -1:
-            arg = '""'.join(arg.split('"'))
-            arg = '"%s"' % arg
-
-        # Otherwise, if there are any spaces, quote the whole arg.
-        elif re.search(r"[ \t\n]", arg):
-            arg = '"%s"' % arg
-        new_args.append(arg)
-    return new_args
-
-
-class Writer:
-    """Visual Studio XML user user file writer."""
-
-    def __init__(self, user_file_path, version, name):
-        """Initializes the user file.
-
-    Args:
-      user_file_path: Path to the user file.
-      version: Version info.
-      name: Name of the user file.
-    """
-        self.user_file_path = user_file_path
-        self.version = version
-        self.name = name
-        self.configurations = {}
-
-    def AddConfig(self, name):
-        """Adds a configuration to the project.
-
-    Args:
-      name: Configuration name.
-    """
-        self.configurations[name] = ["Configuration", {"Name": name}]
-
-    def AddDebugSettings(
-        self, config_name, command, environment={}, working_directory=""
-    ):
-        """Adds a DebugSettings node to the user file for a particular config.
-
-    Args:
-      command: command line to run.  First element in the list is the
-        executable.  All elements of the command will be quoted if
-        necessary.
-      working_directory: other files which may trigger the rule. (optional)
-    """
-        command = _QuoteWin32CommandLineArgs(command)
-
-        abs_command = _FindCommandInPath(command[0])
-
-        if environment and isinstance(environment, dict):
-            env_list = [f'{key}="{val}"' for (key, val) in environment.items()]
-            environment = " ".join(env_list)
-        else:
-            environment = ""
-
-        n_cmd = [
-            "DebugSettings",
-            {
-                "Command": abs_command,
-                "WorkingDirectory": working_directory,
-                "CommandArguments": " ".join(command[1:]),
-                "RemoteMachine": socket.gethostname(),
-                "Environment": environment,
-                "EnvironmentMerge": "true",
-                # Currently these are all "dummy" values that we're just setting
-                # in the default manner that MSVS does it.  We could use some of
-                # these to add additional capabilities, I suppose, but they might
-                # not have parity with other platforms then.
-                "Attach": "false",
-                "DebuggerType": "3",  # 'auto' debugger
-                "Remote": "1",
-                "RemoteCommand": "",
-                "HttpUrl": "",
-                "PDBPath": "",
-                "SQLDebugging": "",
-                "DebuggerFlavor": "0",
-                "MPIRunCommand": "",
-                "MPIRunArguments": "",
-                "MPIRunWorkingDirectory": "",
-                "ApplicationCommand": "",
-                "ApplicationArguments": "",
-                "ShimCommand": "",
-                "MPIAcceptMode": "",
-                "MPIAcceptFilter": "",
-            },
-        ]
-
-        # Find the config, and add it if it doesn't exist.
-        if config_name not in self.configurations:
-            self.AddConfig(config_name)
-
-        # Add the DebugSettings onto the appropriate config.
-        self.configurations[config_name].append(n_cmd)
-
-    def WriteIfChanged(self):
-        """Writes the user file."""
-        configs = ["Configurations"]
-        for config, spec in sorted(self.configurations.items()):
-            configs.append(spec)
-
-        content = [
-            "VisualStudioUserFile",
-            {"Version": self.version.ProjectVersion(), "Name": self.name},
-            configs,
-        ]
-        easy_xml.WriteXmlIfChanged(
-            content, self.user_file_path, encoding="Windows-1252"
-        )
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
deleted file mode 100644
index 36bb782..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
+++ /dev/null
@@ -1,271 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Utility functions shared amongst the Windows generators."""
-
-import copy
-import os
-
-
-# A dictionary mapping supported target types to extensions.
-TARGET_TYPE_EXT = {
-    "executable": "exe",
-    "loadable_module": "dll",
-    "shared_library": "dll",
-    "static_library": "lib",
-    "windows_driver": "sys",
-}
-
-
-def _GetLargePdbShimCcPath():
-    """Returns the path of the large_pdb_shim.cc file."""
-    this_dir = os.path.abspath(os.path.dirname(__file__))
-    src_dir = os.path.abspath(os.path.join(this_dir, "..", ".."))
-    win_data_dir = os.path.join(src_dir, "data", "win")
-    large_pdb_shim_cc = os.path.join(win_data_dir, "large-pdb-shim.cc")
-    return large_pdb_shim_cc
-
-
-def _DeepCopySomeKeys(in_dict, keys):
-    """Performs a partial deep-copy on |in_dict|, only copying the keys in |keys|.
-
-  Arguments:
-    in_dict: The dictionary to copy.
-    keys: The keys to be copied. If a key is in this list and doesn't exist in
-        |in_dict| this is not an error.
-  Returns:
-    The partially deep-copied dictionary.
-  """
-    d = {}
-    for key in keys:
-        if key not in in_dict:
-            continue
-        d[key] = copy.deepcopy(in_dict[key])
-    return d
-
-
-def _SuffixName(name, suffix):
-    """Add a suffix to the end of a target.
-
-  Arguments:
-    name: name of the target (foo#target)
-    suffix: the suffix to be added
-  Returns:
-    Target name with suffix added (foo_suffix#target)
-  """
-    parts = name.rsplit("#", 1)
-    parts[0] = f"{parts[0]}_{suffix}"
-    return "#".join(parts)
-
-
-def _ShardName(name, number):
-    """Add a shard number to the end of a target.
-
-  Arguments:
-    name: name of the target (foo#target)
-    number: shard number
-  Returns:
-    Target name with shard added (foo_1#target)
-  """
-    return _SuffixName(name, str(number))
-
-
-def ShardTargets(target_list, target_dicts):
-    """Shard some targets apart to work around the linkers limits.
-
-  Arguments:
-    target_list: List of target pairs: 'base/base.gyp:base'.
-    target_dicts: Dict of target properties keyed on target pair.
-  Returns:
-    Tuple of the new sharded versions of the inputs.
-  """
-    # Gather the targets to shard, and how many pieces.
-    targets_to_shard = {}
-    for t in target_dicts:
-        shards = int(target_dicts[t].get("msvs_shard", 0))
-        if shards:
-            targets_to_shard[t] = shards
-    # Shard target_list.
-    new_target_list = []
-    for t in target_list:
-        if t in targets_to_shard:
-            for i in range(targets_to_shard[t]):
-                new_target_list.append(_ShardName(t, i))
-        else:
-            new_target_list.append(t)
-    # Shard target_dict.
-    new_target_dicts = {}
-    for t in target_dicts:
-        if t in targets_to_shard:
-            for i in range(targets_to_shard[t]):
-                name = _ShardName(t, i)
-                new_target_dicts[name] = copy.copy(target_dicts[t])
-                new_target_dicts[name]["target_name"] = _ShardName(
-                    new_target_dicts[name]["target_name"], i
-                )
-                sources = new_target_dicts[name].get("sources", [])
-                new_sources = []
-                for pos in range(i, len(sources), targets_to_shard[t]):
-                    new_sources.append(sources[pos])
-                new_target_dicts[name]["sources"] = new_sources
-        else:
-            new_target_dicts[t] = target_dicts[t]
-    # Shard dependencies.
-    for t in sorted(new_target_dicts):
-        for deptype in ("dependencies", "dependencies_original"):
-            dependencies = copy.copy(new_target_dicts[t].get(deptype, []))
-            new_dependencies = []
-            for d in dependencies:
-                if d in targets_to_shard:
-                    for i in range(targets_to_shard[d]):
-                        new_dependencies.append(_ShardName(d, i))
-                else:
-                    new_dependencies.append(d)
-            new_target_dicts[t][deptype] = new_dependencies
-
-    return (new_target_list, new_target_dicts)
-
-
-def _GetPdbPath(target_dict, config_name, vars):
-    """Returns the path to the PDB file that will be generated by a given
-  configuration.
-
-  The lookup proceeds as follows:
-    - Look for an explicit path in the VCLinkerTool configuration block.
-    - Look for an 'msvs_large_pdb_path' variable.
-    - Use '<(PRODUCT_DIR)/<(product_name).(exe|dll).pdb' if 'product_name' is
-      specified.
-    - Use '<(PRODUCT_DIR)/<(target_name).(exe|dll).pdb'.
-
-  Arguments:
-    target_dict: The target dictionary to be searched.
-    config_name: The name of the configuration of interest.
-    vars: A dictionary of common GYP variables with generator-specific values.
-  Returns:
-    The path of the corresponding PDB file.
-  """
-    config = target_dict["configurations"][config_name]
-    msvs = config.setdefault("msvs_settings", {})
-
-    linker = msvs.get("VCLinkerTool", {})
-
-    pdb_path = linker.get("ProgramDatabaseFile")
-    if pdb_path:
-        return pdb_path
-
-    variables = target_dict.get("variables", {})
-    pdb_path = variables.get("msvs_large_pdb_path", None)
-    if pdb_path:
-        return pdb_path
-
-    pdb_base = target_dict.get("product_name", target_dict["target_name"])
-    pdb_base = "{}.{}.pdb".format(pdb_base, TARGET_TYPE_EXT[target_dict["type"]])
-    pdb_path = vars["PRODUCT_DIR"] + "/" + pdb_base
-
-    return pdb_path
-
-
-def InsertLargePdbShims(target_list, target_dicts, vars):
-    """Insert a shim target that forces the linker to use 4KB pagesize PDBs.
-
-  This is a workaround for targets with PDBs greater than 1GB in size, the
-  limit for the 1KB pagesize PDBs created by the linker by default.
-
-  Arguments:
-    target_list: List of target pairs: 'base/base.gyp:base'.
-    target_dicts: Dict of target properties keyed on target pair.
-    vars: A dictionary of common GYP variables with generator-specific values.
-  Returns:
-    Tuple of the shimmed version of the inputs.
-  """
-    # Determine which targets need shimming.
-    targets_to_shim = []
-    for t in target_dicts:
-        target_dict = target_dicts[t]
-
-        # We only want to shim targets that have msvs_large_pdb enabled.
-        if not int(target_dict.get("msvs_large_pdb", 0)):
-            continue
-        # This is intended for executable, shared_library and loadable_module
-        # targets where every configuration is set up to produce a PDB output.
-        # If any of these conditions is not true then the shim logic will fail
-        # below.
-        targets_to_shim.append(t)
-
-    large_pdb_shim_cc = _GetLargePdbShimCcPath()
-
-    for t in targets_to_shim:
-        target_dict = target_dicts[t]
-        target_name = target_dict.get("target_name")
-
-        base_dict = _DeepCopySomeKeys(
-            target_dict, ["configurations", "default_configuration", "toolset"]
-        )
-
-        # This is the dict for copying the source file (part of the GYP tree)
-        # to the intermediate directory of the project. This is necessary because
-        # we can't always build a relative path to the shim source file (on Windows
-        # GYP and the project may be on different drives), and Ninja hates absolute
-        # paths (it ends up generating the .obj and .obj.d alongside the source
-        # file, polluting GYPs tree).
-        copy_suffix = "large_pdb_copy"
-        copy_target_name = target_name + "_" + copy_suffix
-        full_copy_target_name = _SuffixName(t, copy_suffix)
-        shim_cc_basename = os.path.basename(large_pdb_shim_cc)
-        shim_cc_dir = vars["SHARED_INTERMEDIATE_DIR"] + "/" + copy_target_name
-        shim_cc_path = shim_cc_dir + "/" + shim_cc_basename
-        copy_dict = copy.deepcopy(base_dict)
-        copy_dict["target_name"] = copy_target_name
-        copy_dict["type"] = "none"
-        copy_dict["sources"] = [large_pdb_shim_cc]
-        copy_dict["copies"] = [
-            {"destination": shim_cc_dir, "files": [large_pdb_shim_cc]}
-        ]
-
-        # This is the dict for the PDB generating shim target. It depends on the
-        # copy target.
-        shim_suffix = "large_pdb_shim"
-        shim_target_name = target_name + "_" + shim_suffix
-        full_shim_target_name = _SuffixName(t, shim_suffix)
-        shim_dict = copy.deepcopy(base_dict)
-        shim_dict["target_name"] = shim_target_name
-        shim_dict["type"] = "static_library"
-        shim_dict["sources"] = [shim_cc_path]
-        shim_dict["dependencies"] = [full_copy_target_name]
-
-        # Set up the shim to output its PDB to the same location as the final linker
-        # target.
-        for config_name, config in shim_dict.get("configurations").items():
-            pdb_path = _GetPdbPath(target_dict, config_name, vars)
-
-            # A few keys that we don't want to propagate.
-            for key in ["msvs_precompiled_header", "msvs_precompiled_source", "test"]:
-                config.pop(key, None)
-
-            msvs = config.setdefault("msvs_settings", {})
-
-            # Update the compiler directives in the shim target.
-            compiler = msvs.setdefault("VCCLCompilerTool", {})
-            compiler["DebugInformationFormat"] = "3"
-            compiler["ProgramDataBaseFileName"] = pdb_path
-
-            # Set the explicit PDB path in the appropriate configuration of the
-            # original target.
-            config = target_dict["configurations"][config_name]
-            msvs = config.setdefault("msvs_settings", {})
-            linker = msvs.setdefault("VCLinkerTool", {})
-            linker["GenerateDebugInformation"] = "true"
-            linker["ProgramDatabaseFile"] = pdb_path
-
-        # Add the new targets. They must go to the beginning of the list so that
-        # the dependency generation works as expected in ninja.
-        target_list.insert(0, full_copy_target_name)
-        target_list.insert(0, full_shim_target_name)
-        target_dicts[full_copy_target_name] = copy_dict
-        target_dicts[full_shim_target_name] = shim_dict
-
-        # Update the original target to depend on the shim target.
-        target_dict.setdefault("dependencies", []).append(full_shim_target_name)
-
-    return (target_list, target_dicts)
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
deleted file mode 100644
index 8d7f21e..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py
+++ /dev/null
@@ -1,574 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Handle version information related to Visual Stuio."""
-
-import errno
-import os
-import re
-import subprocess
-import sys
-import glob
-
-
-def JoinPath(*args):
-    return os.path.normpath(os.path.join(*args))
-
-
-class VisualStudioVersion:
-    """Information regarding a version of Visual Studio."""
-
-    def __init__(
-        self,
-        short_name,
-        description,
-        solution_version,
-        project_version,
-        flat_sln,
-        uses_vcxproj,
-        path,
-        sdk_based,
-        default_toolset=None,
-        compatible_sdks=None,
-    ):
-        self.short_name = short_name
-        self.description = description
-        self.solution_version = solution_version
-        self.project_version = project_version
-        self.flat_sln = flat_sln
-        self.uses_vcxproj = uses_vcxproj
-        self.path = path
-        self.sdk_based = sdk_based
-        self.default_toolset = default_toolset
-        compatible_sdks = compatible_sdks or []
-        compatible_sdks.sort(key=lambda v: float(v.replace("v", "")), reverse=True)
-        self.compatible_sdks = compatible_sdks
-
-    def ShortName(self):
-        return self.short_name
-
-    def Description(self):
-        """Get the full description of the version."""
-        return self.description
-
-    def SolutionVersion(self):
-        """Get the version number of the sln files."""
-        return self.solution_version
-
-    def ProjectVersion(self):
-        """Get the version number of the vcproj or vcxproj files."""
-        return self.project_version
-
-    def FlatSolution(self):
-        return self.flat_sln
-
-    def UsesVcxproj(self):
-        """Returns true if this version uses a vcxproj file."""
-        return self.uses_vcxproj
-
-    def ProjectExtension(self):
-        """Returns the file extension for the project."""
-        return self.uses_vcxproj and ".vcxproj" or ".vcproj"
-
-    def Path(self):
-        """Returns the path to Visual Studio installation."""
-        return self.path
-
-    def ToolPath(self, tool):
-        """Returns the path to a given compiler tool. """
-        return os.path.normpath(os.path.join(self.path, "VC/bin", tool))
-
-    def DefaultToolset(self):
-        """Returns the msbuild toolset version that will be used in the absence
-    of a user override."""
-        return self.default_toolset
-
-    def _SetupScriptInternal(self, target_arch):
-        """Returns a command (with arguments) to be used to set up the
-    environment."""
-        assert target_arch in ("x86", "x64"), "target_arch not supported"
-        # If WindowsSDKDir is set and SetEnv.Cmd exists then we are using the
-        # depot_tools build tools and should run SetEnv.Cmd to set up the
-        # environment. The check for WindowsSDKDir alone is not sufficient because
-        # this is set by running vcvarsall.bat.
-        sdk_dir = os.environ.get("WindowsSDKDir", "")
-        setup_path = JoinPath(sdk_dir, "Bin", "SetEnv.Cmd")
-        if self.sdk_based and sdk_dir and os.path.exists(setup_path):
-            return [setup_path, "/" + target_arch]
-
-        is_host_arch_x64 = (
-            os.environ.get("PROCESSOR_ARCHITECTURE") == "AMD64"
-            or os.environ.get("PROCESSOR_ARCHITEW6432") == "AMD64"
-        )
-
-        # For VS2017 (and newer) it's fairly easy
-        if self.short_name >= "2017":
-            script_path = JoinPath(
-                self.path, "VC", "Auxiliary", "Build", "vcvarsall.bat"
-            )
-
-            # Always use a native executable, cross-compiling if necessary.
-            host_arch = "amd64" if is_host_arch_x64 else "x86"
-            msvc_target_arch = "amd64" if target_arch == "x64" else "x86"
-            arg = host_arch
-            if host_arch != msvc_target_arch:
-                arg += "_" + msvc_target_arch
-
-            return [script_path, arg]
-
-        # We try to find the best version of the env setup batch.
-        vcvarsall = JoinPath(self.path, "VC", "vcvarsall.bat")
-        if target_arch == "x86":
-            if (
-                self.short_name >= "2013"
-                and self.short_name[-1] != "e"
-                and is_host_arch_x64
-            ):
-                # VS2013 and later, non-Express have a x64-x86 cross that we want
-                # to prefer.
-                return [vcvarsall, "amd64_x86"]
-            else:
-                # Otherwise, the standard x86 compiler. We don't use VC/vcvarsall.bat
-                # for x86 because vcvarsall calls vcvars32, which it can only find if
-                # VS??COMNTOOLS is set, which isn't guaranteed.
-                return [JoinPath(self.path, "Common7", "Tools", "vsvars32.bat")]
-        elif target_arch == "x64":
-            arg = "x86_amd64"
-            # Use the 64-on-64 compiler if we're not using an express edition and
-            # we're running on a 64bit OS.
-            if self.short_name[-1] != "e" and is_host_arch_x64:
-                arg = "amd64"
-            return [vcvarsall, arg]
-
-    def SetupScript(self, target_arch):
-        script_data = self._SetupScriptInternal(target_arch)
-        script_path = script_data[0]
-        if not os.path.exists(script_path):
-            raise Exception(
-                "%s is missing - make sure VC++ tools are installed." % script_path
-            )
-        return script_data
-
-
-def _RegistryQueryBase(sysdir, key, value):
-    """Use reg.exe to read a particular key.
-
-  While ideally we might use the win32 module, we would like gyp to be
-  python neutral, so for instance cygwin python lacks this module.
-
-  Arguments:
-    sysdir: The system subdirectory to attempt to launch reg.exe from.
-    key: The registry key to read from.
-    value: The particular value to read.
-  Return:
-    stdout from reg.exe, or None for failure.
-  """
-    # Skip if not on Windows or Python Win32 setup issue
-    if sys.platform not in ("win32", "cygwin"):
-        return None
-    # Setup params to pass to and attempt to launch reg.exe
-    cmd = [os.path.join(os.environ.get("WINDIR", ""), sysdir, "reg.exe"), "query", key]
-    if value:
-        cmd.extend(["/v", value])
-    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    # Obtain the stdout from reg.exe, reading to the end so p.returncode is valid
-    # Note that the error text may be in [1] in some cases
-    text = p.communicate()[0].decode("utf-8")
-    # Check return code from reg.exe; officially 0==success and 1==error
-    if p.returncode:
-        return None
-    return text
-
-
-def _RegistryQuery(key, value=None):
-    r"""Use reg.exe to read a particular key through _RegistryQueryBase.
-
-  First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
-  that fails, it falls back to System32.  Sysnative is available on Vista and
-  up and available on Windows Server 2003 and XP through KB patch 942589. Note
-  that Sysnative will always fail if using 64-bit python due to it being a
-  virtual directory and System32 will work correctly in the first place.
-
-  KB 942589 - http://support.microsoft.com/kb/942589/en-us.
-
-  Arguments:
-    key: The registry key.
-    value: The particular registry value to read (optional).
-  Return:
-    stdout from reg.exe, or None for failure.
-  """
-    text = None
-    try:
-        text = _RegistryQueryBase("Sysnative", key, value)
-    except OSError as e:
-        if e.errno == errno.ENOENT:
-            text = _RegistryQueryBase("System32", key, value)
-        else:
-            raise
-    return text
-
-
-def _RegistryGetValueUsingWinReg(key, value):
-    """Use the _winreg module to obtain the value of a registry key.
-
-  Args:
-    key: The registry key.
-    value: The particular registry value to read.
-  Return:
-    contents of the registry key's value, or None on failure.  Throws
-    ImportError if winreg is unavailable.
-  """
-    from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
-    try:
-        root, subkey = key.split("\\", 1)
-        assert root == "HKLM"  # Only need HKLM for now.
-        with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey:
-            return QueryValueEx(hkey, value)[0]
-    except OSError:
-        return None
-
-
-def _RegistryGetValue(key, value):
-    """Use _winreg or reg.exe to obtain the value of a registry key.
-
-  Using _winreg is preferable because it solves an issue on some corporate
-  environments where access to reg.exe is locked down. However, we still need
-  to fallback to reg.exe for the case where the _winreg module is not available
-  (for example in cygwin python).
-
-  Args:
-    key: The registry key.
-    value: The particular registry value to read.
-  Return:
-    contents of the registry key's value, or None on failure.
-  """
-    try:
-        return _RegistryGetValueUsingWinReg(key, value)
-    except ImportError:
-        pass
-
-    # Fallback to reg.exe if we fail to import _winreg.
-    text = _RegistryQuery(key, value)
-    if not text:
-        return None
-    # Extract value.
-    match = re.search(r"REG_\w+\s+([^\r]+)\r\n", text)
-    if not match:
-        return None
-    return match.group(1)
-
-
-def _CreateVersion(name, path, sdk_based=False):
-    """Sets up MSVS project generation.
-
-  Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
-  autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
-  passed in that doesn't match a value in versions python will throw a error.
-  """
-    if path:
-        path = os.path.normpath(path)
-    versions = {
-        "2022": VisualStudioVersion(
-            "2022",
-            "Visual Studio 2022",
-            solution_version="12.00",
-            project_version="17.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v143",
-            compatible_sdks=["v8.1", "v10.0"],
-        ),
-        "2019": VisualStudioVersion(
-            "2019",
-            "Visual Studio 2019",
-            solution_version="12.00",
-            project_version="16.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v142",
-            compatible_sdks=["v8.1", "v10.0"],
-        ),
-        "2017": VisualStudioVersion(
-            "2017",
-            "Visual Studio 2017",
-            solution_version="12.00",
-            project_version="15.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v141",
-            compatible_sdks=["v8.1", "v10.0"],
-        ),
-        "2015": VisualStudioVersion(
-            "2015",
-            "Visual Studio 2015",
-            solution_version="12.00",
-            project_version="14.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v140",
-        ),
-        "2013": VisualStudioVersion(
-            "2013",
-            "Visual Studio 2013",
-            solution_version="13.00",
-            project_version="12.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v120",
-        ),
-        "2013e": VisualStudioVersion(
-            "2013e",
-            "Visual Studio 2013",
-            solution_version="13.00",
-            project_version="12.0",
-            flat_sln=True,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v120",
-        ),
-        "2012": VisualStudioVersion(
-            "2012",
-            "Visual Studio 2012",
-            solution_version="12.00",
-            project_version="4.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v110",
-        ),
-        "2012e": VisualStudioVersion(
-            "2012e",
-            "Visual Studio 2012",
-            solution_version="12.00",
-            project_version="4.0",
-            flat_sln=True,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-            default_toolset="v110",
-        ),
-        "2010": VisualStudioVersion(
-            "2010",
-            "Visual Studio 2010",
-            solution_version="11.00",
-            project_version="4.0",
-            flat_sln=False,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-        "2010e": VisualStudioVersion(
-            "2010e",
-            "Visual C++ Express 2010",
-            solution_version="11.00",
-            project_version="4.0",
-            flat_sln=True,
-            uses_vcxproj=True,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-        "2008": VisualStudioVersion(
-            "2008",
-            "Visual Studio 2008",
-            solution_version="10.00",
-            project_version="9.00",
-            flat_sln=False,
-            uses_vcxproj=False,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-        "2008e": VisualStudioVersion(
-            "2008e",
-            "Visual Studio 2008",
-            solution_version="10.00",
-            project_version="9.00",
-            flat_sln=True,
-            uses_vcxproj=False,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-        "2005": VisualStudioVersion(
-            "2005",
-            "Visual Studio 2005",
-            solution_version="9.00",
-            project_version="8.00",
-            flat_sln=False,
-            uses_vcxproj=False,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-        "2005e": VisualStudioVersion(
-            "2005e",
-            "Visual Studio 2005",
-            solution_version="9.00",
-            project_version="8.00",
-            flat_sln=True,
-            uses_vcxproj=False,
-            path=path,
-            sdk_based=sdk_based,
-        ),
-    }
-    return versions[str(name)]
-
-
-def _ConvertToCygpath(path):
-    """Convert to cygwin path if we are using cygwin."""
-    if sys.platform == "cygwin":
-        p = subprocess.Popen(["cygpath", path], stdout=subprocess.PIPE)
-        path = p.communicate()[0].decode("utf-8").strip()
-    return path
-
-
-def _DetectVisualStudioVersions(versions_to_check, force_express):
-    """Collect the list of installed visual studio versions.
-
-  Returns:
-    A list of visual studio versions installed in descending order of
-    usage preference.
-    Base this on the registry and a quick check if devenv.exe exists.
-    Possibilities are:
-      2005(e) - Visual Studio 2005 (8)
-      2008(e) - Visual Studio 2008 (9)
-      2010(e) - Visual Studio 2010 (10)
-      2012(e) - Visual Studio 2012 (11)
-      2013(e) - Visual Studio 2013 (12)
-      2015    - Visual Studio 2015 (14)
-      2017    - Visual Studio 2017 (15)
-      2019    - Visual Studio 2019 (16)
-      2022    - Visual Studio 2022 (17)
-    Where (e) is e for express editions of MSVS and blank otherwise.
-  """
-    version_to_year = {
-        "8.0": "2005",
-        "9.0": "2008",
-        "10.0": "2010",
-        "11.0": "2012",
-        "12.0": "2013",
-        "14.0": "2015",
-        "15.0": "2017",
-        "16.0": "2019",
-        "17.0": "2022",
-    }
-    versions = []
-    for version in versions_to_check:
-        # Old method of searching for which VS version is installed
-        # We don't use the 2010-encouraged-way because we also want to get the
-        # path to the binaries, which it doesn't offer.
-        keys = [
-            r"HKLM\Software\Microsoft\VisualStudio\%s" % version,
-            r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s" % version,
-            r"HKLM\Software\Microsoft\VCExpress\%s" % version,
-            r"HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s" % version,
-        ]
-        for index in range(len(keys)):
-            path = _RegistryGetValue(keys[index], "InstallDir")
-            if not path:
-                continue
-            path = _ConvertToCygpath(path)
-            # Check for full.
-            full_path = os.path.join(path, "devenv.exe")
-            express_path = os.path.join(path, "*express.exe")
-            if not force_express and os.path.exists(full_path):
-                # Add this one.
-                versions.append(
-                    _CreateVersion(
-                        version_to_year[version], os.path.join(path, "..", "..")
-                    )
-                )
-            # Check for express.
-            elif glob.glob(express_path):
-                # Add this one.
-                versions.append(
-                    _CreateVersion(
-                        version_to_year[version] + "e", os.path.join(path, "..", "..")
-                    )
-                )
-
-        # The old method above does not work when only SDK is installed.
-        keys = [
-            r"HKLM\Software\Microsoft\VisualStudio\SxS\VC7",
-            r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7",
-            r"HKLM\Software\Microsoft\VisualStudio\SxS\VS7",
-            r"HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VS7",
-        ]
-        for index in range(len(keys)):
-            path = _RegistryGetValue(keys[index], version)
-            if not path:
-                continue
-            path = _ConvertToCygpath(path)
-            if version == "15.0":
-                if os.path.exists(path):
-                    versions.append(_CreateVersion("2017", path))
-            elif version != "14.0":  # There is no Express edition for 2015.
-                versions.append(
-                    _CreateVersion(
-                        version_to_year[version] + "e",
-                        os.path.join(path, ".."),
-                        sdk_based=True,
-                    )
-                )
-
-    return versions
-
-
-def SelectVisualStudioVersion(version="auto", allow_fallback=True):
-    """Select which version of Visual Studio projects to generate.
-
-  Arguments:
-    version: Hook to allow caller to force a particular version (vs auto).
-  Returns:
-    An object representing a visual studio project format version.
-  """
-    # In auto mode, check environment variable for override.
-    if version == "auto":
-        version = os.environ.get("GYP_MSVS_VERSION", "auto")
-    version_map = {
-        "auto": ("17.0", "16.0", "15.0", "14.0", "12.0", "10.0", "9.0", "8.0", "11.0"),
-        "2005": ("8.0",),
-        "2005e": ("8.0",),
-        "2008": ("9.0",),
-        "2008e": ("9.0",),
-        "2010": ("10.0",),
-        "2010e": ("10.0",),
-        "2012": ("11.0",),
-        "2012e": ("11.0",),
-        "2013": ("12.0",),
-        "2013e": ("12.0",),
-        "2015": ("14.0",),
-        "2017": ("15.0",),
-        "2019": ("16.0",),
-        "2022": ("17.0",),
-    }
-    override_path = os.environ.get("GYP_MSVS_OVERRIDE_PATH")
-    if override_path:
-        msvs_version = os.environ.get("GYP_MSVS_VERSION")
-        if not msvs_version:
-            raise ValueError(
-                "GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be "
-                "set to a particular version (e.g. 2010e)."
-            )
-        return _CreateVersion(msvs_version, override_path, sdk_based=True)
-    version = str(version)
-    versions = _DetectVisualStudioVersions(version_map[version], "e" in version)
-    if not versions:
-        if not allow_fallback:
-            raise ValueError("Could not locate Visual Studio installation.")
-        if version == "auto":
-            # Default to 2005 if we couldn't find anything
-            return _CreateVersion("2005", None)
-        else:
-            return _CreateVersion(version, None)
-    return versions[0]
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
deleted file mode 100755
index d6cc013..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py
+++ /dev/null
@@ -1,692 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import copy
-import gyp.input
-import argparse
-import os.path
-import re
-import shlex
-import sys
-import traceback
-from gyp.common import GypError
-
-
-# Default debug modes for GYP
-debug = {}
-
-# List of "official" debug modes, but you can use anything you like.
-DEBUG_GENERAL = "general"
-DEBUG_VARIABLES = "variables"
-DEBUG_INCLUDES = "includes"
-
-
-def DebugOutput(mode, message, *args):
-    if "all" in gyp.debug or mode in gyp.debug:
-        ctx = ("unknown", 0, "unknown")
-        try:
-            f = traceback.extract_stack(limit=2)
-            if f:
-                ctx = f[0][:3]
-        except Exception:
-            pass
-        if args:
-            message %= args
-        print(
-            "%s:%s:%d:%s %s"
-            % (mode.upper(), os.path.basename(ctx[0]), ctx[1], ctx[2], message)
-        )
-
-
-def FindBuildFiles():
-    extension = ".gyp"
-    files = os.listdir(os.getcwd())
-    build_files = []
-    for file in files:
-        if file.endswith(extension):
-            build_files.append(file)
-    return build_files
-
-
-def Load(
-    build_files,
-    format,
-    default_variables={},
-    includes=[],
-    depth=".",
-    params=None,
-    check=False,
-    circular_check=True,
-):
-    """
-  Loads one or more specified build files.
-  default_variables and includes will be copied before use.
-  Returns the generator for the specified format and the
-  data returned by loading the specified build files.
-  """
-    if params is None:
-        params = {}
-
-    if "-" in format:
-        format, params["flavor"] = format.split("-", 1)
-
-    default_variables = copy.copy(default_variables)
-
-    # Default variables provided by this program and its modules should be
-    # named WITH_CAPITAL_LETTERS to provide a distinct "best practice" namespace,
-    # avoiding collisions with user and automatic variables.
-    default_variables["GENERATOR"] = format
-    default_variables["GENERATOR_FLAVOR"] = params.get("flavor", "")
-
-    # Format can be a custom python file, or by default the name of a module
-    # within gyp.generator.
-    if format.endswith(".py"):
-        generator_name = os.path.splitext(format)[0]
-        path, generator_name = os.path.split(generator_name)
-
-        # Make sure the path to the custom generator is in sys.path
-        # Don't worry about removing it once we are done.  Keeping the path
-        # to each generator that is used in sys.path is likely harmless and
-        # arguably a good idea.
-        path = os.path.abspath(path)
-        if path not in sys.path:
-            sys.path.insert(0, path)
-    else:
-        generator_name = "gyp.generator." + format
-
-    # These parameters are passed in order (as opposed to by key)
-    # because ActivePython cannot handle key parameters to __import__.
-    generator = __import__(generator_name, globals(), locals(), generator_name)
-    for (key, val) in generator.generator_default_variables.items():
-        default_variables.setdefault(key, val)
-
-    output_dir = params["options"].generator_output or params["options"].toplevel_dir
-    if default_variables["GENERATOR"] == "ninja":
-        default_variables.setdefault(
-            "PRODUCT_DIR_ABS",
-            os.path.join(
-                output_dir, "out", default_variables.get("build_type", "default")
-            ),
-        )
-    else:
-        default_variables.setdefault(
-            "PRODUCT_DIR_ABS",
-            os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
-        )
-
-    # Give the generator the opportunity to set additional variables based on
-    # the params it will receive in the output phase.
-    if getattr(generator, "CalculateVariables", None):
-        generator.CalculateVariables(default_variables, params)
-
-    # Give the generator the opportunity to set generator_input_info based on
-    # the params it will receive in the output phase.
-    if getattr(generator, "CalculateGeneratorInputInfo", None):
-        generator.CalculateGeneratorInputInfo(params)
-
-    # Fetch the generator specific info that gets fed to input, we use getattr
-    # so we can default things and the generators only have to provide what
-    # they need.
-    generator_input_info = {
-        "non_configuration_keys": getattr(
-            generator, "generator_additional_non_configuration_keys", []
-        ),
-        "path_sections": getattr(generator, "generator_additional_path_sections", []),
-        "extra_sources_for_rules": getattr(
-            generator, "generator_extra_sources_for_rules", []
-        ),
-        "generator_supports_multiple_toolsets": getattr(
-            generator, "generator_supports_multiple_toolsets", False
-        ),
-        "generator_wants_static_library_dependencies_adjusted": getattr(
-            generator, "generator_wants_static_library_dependencies_adjusted", True
-        ),
-        "generator_wants_sorted_dependencies": getattr(
-            generator, "generator_wants_sorted_dependencies", False
-        ),
-        "generator_filelist_paths": getattr(
-            generator, "generator_filelist_paths", None
-        ),
-    }
-
-    # Process the input specific to this generator.
-    result = gyp.input.Load(
-        build_files,
-        default_variables,
-        includes[:],
-        depth,
-        generator_input_info,
-        check,
-        circular_check,
-        params["parallel"],
-        params["root_targets"],
-    )
-    return [generator] + result
-
-
-def NameValueListToDict(name_value_list):
-    """
-  Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary
-  of the pairs.  If a string is simply NAME, then the value in the dictionary
-  is set to True.  If VALUE can be converted to an integer, it is.
-  """
-    result = {}
-    for item in name_value_list:
-        tokens = item.split("=", 1)
-        if len(tokens) == 2:
-            # If we can make it an int, use that, otherwise, use the string.
-            try:
-                token_value = int(tokens[1])
-            except ValueError:
-                token_value = tokens[1]
-            # Set the variable to the supplied value.
-            result[tokens[0]] = token_value
-        else:
-            # No value supplied, treat it as a boolean and set it.
-            result[tokens[0]] = True
-    return result
-
-
-def ShlexEnv(env_name):
-    flags = os.environ.get(env_name, [])
-    if flags:
-        flags = shlex.split(flags)
-    return flags
-
-
-def FormatOpt(opt, value):
-    if opt.startswith("--"):
-        return f"{opt}={value}"
-    return opt + value
-
-
-def RegenerateAppendFlag(flag, values, predicate, env_name, options):
-    """Regenerate a list of command line flags, for an option of action='append'.
-
-  The |env_name|, if given, is checked in the environment and used to generate
-  an initial list of options, then the options that were specified on the
-  command line (given in |values|) are appended.  This matches the handling of
-  environment variables and command line flags where command line flags override
-  the environment, while not requiring the environment to be set when the flags
-  are used again.
-  """
-    flags = []
-    if options.use_environment and env_name:
-        for flag_value in ShlexEnv(env_name):
-            value = FormatOpt(flag, predicate(flag_value))
-            if value in flags:
-                flags.remove(value)
-            flags.append(value)
-    if values:
-        for flag_value in values:
-            flags.append(FormatOpt(flag, predicate(flag_value)))
-    return flags
-
-
-def RegenerateFlags(options):
-    """Given a parsed options object, and taking the environment variables into
-  account, returns a list of flags that should regenerate an equivalent options
-  object (even in the absence of the environment variables.)
-
-  Any path options will be normalized relative to depth.
-
-  The format flag is not included, as it is assumed the calling generator will
-  set that as appropriate.
-  """
-
-    def FixPath(path):
-        path = gyp.common.FixIfRelativePath(path, options.depth)
-        if not path:
-            return os.path.curdir
-        return path
-
-    def Noop(value):
-        return value
-
-    # We always want to ignore the environment when regenerating, to avoid
-    # duplicate or changed flags in the environment at the time of regeneration.
-    flags = ["--ignore-environment"]
-    for name, metadata in options._regeneration_metadata.items():
-        opt = metadata["opt"]
-        value = getattr(options, name)
-        value_predicate = metadata["type"] == "path" and FixPath or Noop
-        action = metadata["action"]
-        env_name = metadata["env_name"]
-        if action == "append":
-            flags.extend(
-                RegenerateAppendFlag(opt, value, value_predicate, env_name, options)
-            )
-        elif action in ("store", None):  # None is a synonym for 'store'.
-            if value:
-                flags.append(FormatOpt(opt, value_predicate(value)))
-            elif options.use_environment and env_name and os.environ.get(env_name):
-                flags.append(FormatOpt(opt, value_predicate(os.environ.get(env_name))))
-        elif action in ("store_true", "store_false"):
-            if (action == "store_true" and value) or (
-                action == "store_false" and not value
-            ):
-                flags.append(opt)
-            elif options.use_environment and env_name:
-                print(
-                    "Warning: environment regeneration unimplemented "
-                    "for %s flag %r env_name %r" % (action, opt, env_name),
-                    file=sys.stderr,
-                )
-        else:
-            print(
-                "Warning: regeneration unimplemented for action %r "
-                "flag %r" % (action, opt),
-                file=sys.stderr,
-            )
-
-    return flags
-
-
-class RegeneratableOptionParser(argparse.ArgumentParser):
-    def __init__(self, usage):
-        self.__regeneratable_options = {}
-        argparse.ArgumentParser.__init__(self, usage=usage)
-
-    def add_argument(self, *args, **kw):
-        """Add an option to the parser.
-
-    This accepts the same arguments as ArgumentParser.add_argument, plus the
-    following:
-      regenerate: can be set to False to prevent this option from being included
-                  in regeneration.
-      env_name: name of environment variable that additional values for this
-                option come from.
-      type: adds type='path', to tell the regenerator that the values of
-            this option need to be made relative to options.depth
-    """
-        env_name = kw.pop("env_name", None)
-        if "dest" in kw and kw.pop("regenerate", True):
-            dest = kw["dest"]
-
-            # The path type is needed for regenerating, for optparse we can just treat
-            # it as a string.
-            type = kw.get("type")
-            if type == "path":
-                kw["type"] = str
-
-            self.__regeneratable_options[dest] = {
-                "action": kw.get("action"),
-                "type": type,
-                "env_name": env_name,
-                "opt": args[0],
-            }
-
-        argparse.ArgumentParser.add_argument(self, *args, **kw)
-
-    def parse_args(self, *args):
-        values, args = argparse.ArgumentParser.parse_known_args(self, *args)
-        values._regeneration_metadata = self.__regeneratable_options
-        return values, args
-
-
-def gyp_main(args):
-    my_name = os.path.basename(sys.argv[0])
-    usage = "usage: %(prog)s [options ...] [build_file ...]"
-
-    parser = RegeneratableOptionParser(usage=usage.replace("%s", "%(prog)s"))
-    parser.add_argument(
-        "--build",
-        dest="configs",
-        action="append",
-        help="configuration for build after project generation",
-    )
-    parser.add_argument(
-        "--check", dest="check", action="store_true", help="check format of gyp files"
-    )
-    parser.add_argument(
-        "--config-dir",
-        dest="config_dir",
-        action="store",
-        env_name="GYP_CONFIG_DIR",
-        default=None,
-        help="The location for configuration files like " "include.gypi.",
-    )
-    parser.add_argument(
-        "-d",
-        "--debug",
-        dest="debug",
-        metavar="DEBUGMODE",
-        action="append",
-        default=[],
-        help="turn on a debugging "
-        'mode for debugging GYP.  Supported modes are "variables", '
-        '"includes" and "general" or "all" for all of them.',
-    )
-    parser.add_argument(
-        "-D",
-        dest="defines",
-        action="append",
-        metavar="VAR=VAL",
-        env_name="GYP_DEFINES",
-        help="sets variable VAR to value VAL",
-    )
-    parser.add_argument(
-        "--depth",
-        dest="depth",
-        metavar="PATH",
-        type="path",
-        help="set DEPTH gyp variable to a relative path to PATH",
-    )
-    parser.add_argument(
-        "-f",
-        "--format",
-        dest="formats",
-        action="append",
-        env_name="GYP_GENERATORS",
-        regenerate=False,
-        help="output formats to generate",
-    )
-    parser.add_argument(
-        "-G",
-        dest="generator_flags",
-        action="append",
-        default=[],
-        metavar="FLAG=VAL",
-        env_name="GYP_GENERATOR_FLAGS",
-        help="sets generator flag FLAG to VAL",
-    )
-    parser.add_argument(
-        "--generator-output",
-        dest="generator_output",
-        action="store",
-        default=None,
-        metavar="DIR",
-        type="path",
-        env_name="GYP_GENERATOR_OUTPUT",
-        help="puts generated build files under DIR",
-    )
-    parser.add_argument(
-        "--ignore-environment",
-        dest="use_environment",
-        action="store_false",
-        default=True,
-        regenerate=False,
-        help="do not read options from environment variables",
-    )
-    parser.add_argument(
-        "-I",
-        "--include",
-        dest="includes",
-        action="append",
-        metavar="INCLUDE",
-        type="path",
-        help="files to include in all loaded .gyp files",
-    )
-    # --no-circular-check disables the check for circular relationships between
-    # .gyp files.  These relationships should not exist, but they've only been
-    # observed to be harmful with the Xcode generator.  Chromium's .gyp files
-    # currently have some circular relationships on non-Mac platforms, so this
-    # option allows the strict behavior to be used on Macs and the lenient
-    # behavior to be used elsewhere.
-    # TODO(mark): Remove this option when http://crbug.com/35878 is fixed.
-    parser.add_argument(
-        "--no-circular-check",
-        dest="circular_check",
-        action="store_false",
-        default=True,
-        regenerate=False,
-        help="don't check for circular relationships between files",
-    )
-    parser.add_argument(
-        "--no-parallel",
-        action="store_true",
-        default=False,
-        help="Disable multiprocessing",
-    )
-    parser.add_argument(
-        "-S",
-        "--suffix",
-        dest="suffix",
-        default="",
-        help="suffix to add to generated files",
-    )
-    parser.add_argument(
-        "--toplevel-dir",
-        dest="toplevel_dir",
-        action="store",
-        default=None,
-        metavar="DIR",
-        type="path",
-        help="directory to use as the root of the source tree",
-    )
-    parser.add_argument(
-        "-R",
-        "--root-target",
-        dest="root_targets",
-        action="append",
-        metavar="TARGET",
-        help="include only TARGET and its deep dependencies",
-    )
-    parser.add_argument(
-        "-V",
-        "--version",
-        dest="version",
-        action="store_true",
-        help="Show the version and exit.",
-    )
-
-    options, build_files_arg = parser.parse_args(args)
-    if options.version:
-        import pkg_resources
-        print(f"v{pkg_resources.get_distribution('gyp-next').version}")
-        return 0
-    build_files = build_files_arg
-
-    # Set up the configuration directory (defaults to ~/.gyp)
-    if not options.config_dir:
-        home = None
-        home_dot_gyp = None
-        if options.use_environment:
-            home_dot_gyp = os.environ.get("GYP_CONFIG_DIR", None)
-            if home_dot_gyp:
-                home_dot_gyp = os.path.expanduser(home_dot_gyp)
-
-        if not home_dot_gyp:
-            home_vars = ["HOME"]
-            if sys.platform in ("cygwin", "win32"):
-                home_vars.append("USERPROFILE")
-            for home_var in home_vars:
-                home = os.getenv(home_var)
-                if home:
-                    home_dot_gyp = os.path.join(home, ".gyp")
-                    if not os.path.exists(home_dot_gyp):
-                        home_dot_gyp = None
-                    else:
-                        break
-    else:
-        home_dot_gyp = os.path.expanduser(options.config_dir)
-
-    if home_dot_gyp and not os.path.exists(home_dot_gyp):
-        home_dot_gyp = None
-
-    if not options.formats:
-        # If no format was given on the command line, then check the env variable.
-        generate_formats = []
-        if options.use_environment:
-            generate_formats = os.environ.get("GYP_GENERATORS", [])
-        if generate_formats:
-            generate_formats = re.split(r"[\s,]", generate_formats)
-        if generate_formats:
-            options.formats = generate_formats
-        else:
-            # Nothing in the variable, default based on platform.
-            if sys.platform == "darwin":
-                options.formats = ["xcode"]
-            elif sys.platform in ("win32", "cygwin"):
-                options.formats = ["msvs"]
-            else:
-                options.formats = ["make"]
-
-    if not options.generator_output and options.use_environment:
-        g_o = os.environ.get("GYP_GENERATOR_OUTPUT")
-        if g_o:
-            options.generator_output = g_o
-
-    options.parallel = not options.no_parallel
-
-    for mode in options.debug:
-        gyp.debug[mode] = 1
-
-    # Do an extra check to avoid work when we're not debugging.
-    if DEBUG_GENERAL in gyp.debug:
-        DebugOutput(DEBUG_GENERAL, "running with these options:")
-        for option, value in sorted(options.__dict__.items()):
-            if option[0] == "_":
-                continue
-            if isinstance(value, str):
-                DebugOutput(DEBUG_GENERAL, "  %s: '%s'", option, value)
-            else:
-                DebugOutput(DEBUG_GENERAL, "  %s: %s", option, value)
-
-    if not build_files:
-        build_files = FindBuildFiles()
-    if not build_files:
-        raise GypError((usage + "\n\n%s: error: no build_file") % (my_name, my_name))
-
-    # TODO(mark): Chromium-specific hack!
-    # For Chromium, the gyp "depth" variable should always be a relative path
-    # to Chromium's top-level "src" directory.  If no depth variable was set
-    # on the command line, try to find a "src" directory by looking at the
-    # absolute path to each build file's directory.  The first "src" component
-    # found will be treated as though it were the path used for --depth.
-    if not options.depth:
-        for build_file in build_files:
-            build_file_dir = os.path.abspath(os.path.dirname(build_file))
-            build_file_dir_components = build_file_dir.split(os.path.sep)
-            components_len = len(build_file_dir_components)
-            for index in range(components_len - 1, -1, -1):
-                if build_file_dir_components[index] == "src":
-                    options.depth = os.path.sep.join(build_file_dir_components)
-                    break
-                del build_file_dir_components[index]
-
-            # If the inner loop found something, break without advancing to another
-            # build file.
-            if options.depth:
-                break
-
-        if not options.depth:
-            raise GypError(
-                "Could not automatically locate src directory.  This is"
-                "a temporary Chromium feature that will be removed.  Use"
-                "--depth as a workaround."
-            )
-
-    # If toplevel-dir is not set, we assume that depth is the root of our source
-    # tree.
-    if not options.toplevel_dir:
-        options.toplevel_dir = options.depth
-
-    # -D on the command line sets variable defaults - D isn't just for define,
-    # it's for default.  Perhaps there should be a way to force (-F?) a
-    # variable's value so that it can't be overridden by anything else.
-    cmdline_default_variables = {}
-    defines = []
-    if options.use_environment:
-        defines += ShlexEnv("GYP_DEFINES")
-    if options.defines:
-        defines += options.defines
-    cmdline_default_variables = NameValueListToDict(defines)
-    if DEBUG_GENERAL in gyp.debug:
-        DebugOutput(
-            DEBUG_GENERAL, "cmdline_default_variables: %s", cmdline_default_variables
-        )
-
-    # Set up includes.
-    includes = []
-
-    # If ~/.gyp/include.gypi exists, it'll be forcibly included into every
-    # .gyp file that's loaded, before anything else is included.
-    if home_dot_gyp:
-        default_include = os.path.join(home_dot_gyp, "include.gypi")
-        if os.path.exists(default_include):
-            print("Using overrides found in " + default_include)
-            includes.append(default_include)
-
-    # Command-line --include files come after the default include.
-    if options.includes:
-        includes.extend(options.includes)
-
-    # Generator flags should be prefixed with the target generator since they
-    # are global across all generator runs.
-    gen_flags = []
-    if options.use_environment:
-        gen_flags += ShlexEnv("GYP_GENERATOR_FLAGS")
-    if options.generator_flags:
-        gen_flags += options.generator_flags
-    generator_flags = NameValueListToDict(gen_flags)
-    if DEBUG_GENERAL in gyp.debug:
-        DebugOutput(DEBUG_GENERAL, "generator_flags: %s", generator_flags)
-
-    # Generate all requested formats (use a set in case we got one format request
-    # twice)
-    for format in set(options.formats):
-        params = {
-            "options": options,
-            "build_files": build_files,
-            "generator_flags": generator_flags,
-            "cwd": os.getcwd(),
-            "build_files_arg": build_files_arg,
-            "gyp_binary": sys.argv[0],
-            "home_dot_gyp": home_dot_gyp,
-            "parallel": options.parallel,
-            "root_targets": options.root_targets,
-            "target_arch": cmdline_default_variables.get("target_arch", ""),
-        }
-
-        # Start with the default variables from the command line.
-        [generator, flat_list, targets, data] = Load(
-            build_files,
-            format,
-            cmdline_default_variables,
-            includes,
-            options.depth,
-            params,
-            options.check,
-            options.circular_check,
-        )
-
-        # TODO(mark): Pass |data| for now because the generator needs a list of
-        # build files that came in.  In the future, maybe it should just accept
-        # a list, and not the whole data dict.
-        # NOTE: flat_list is the flattened dependency graph specifying the order
-        # that targets may be built.  Build systems that operate serially or that
-        # need to have dependencies defined before dependents reference them should
-        # generate targets in the order specified in flat_list.
-        generator.GenerateOutput(flat_list, targets, data, params)
-
-        if options.configs:
-            valid_configs = targets[flat_list[0]]["configurations"]
-            for conf in options.configs:
-                if conf not in valid_configs:
-                    raise GypError("Invalid config specified via --build: %s" % conf)
-            generator.PerformBuild(data, options.configs, params)
-
-    # Done
-    return 0
-
-
-def main(args):
-    try:
-        return gyp_main(args)
-    except GypError as e:
-        sys.stderr.write("gyp: %s\n" % e)
-        return 1
-
-
-# NOTE: setuptools generated console_scripts calls function with no arguments
-def script_main():
-    return main(sys.argv[1:])
-
-
-if __name__ == "__main__":
-    sys.exit(script_main())
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
deleted file mode 100644
index b73a0c5..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py
+++ /dev/null
@@ -1,654 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import errno
-import filecmp
-import os.path
-import re
-import tempfile
-import sys
-import subprocess
-
-from collections.abc import MutableSet
-
-
-# A minimal memoizing decorator. It'll blow up if the args aren't immutable,
-# among other "problems".
-class memoize:
-    def __init__(self, func):
-        self.func = func
-        self.cache = {}
-
-    def __call__(self, *args):
-        try:
-            return self.cache[args]
-        except KeyError:
-            result = self.func(*args)
-            self.cache[args] = result
-            return result
-
-
-class GypError(Exception):
-    """Error class representing an error, which is to be presented
-  to the user.  The main entry point will catch and display this.
-  """
-
-    pass
-
-
-def ExceptionAppend(e, msg):
-    """Append a message to the given exception's message."""
-    if not e.args:
-        e.args = (msg,)
-    elif len(e.args) == 1:
-        e.args = (str(e.args[0]) + " " + msg,)
-    else:
-        e.args = (str(e.args[0]) + " " + msg,) + e.args[1:]
-
-
-def FindQualifiedTargets(target, qualified_list):
-    """
-  Given a list of qualified targets, return the qualified targets for the
-  specified |target|.
-  """
-    return [t for t in qualified_list if ParseQualifiedTarget(t)[1] == target]
-
-
-def ParseQualifiedTarget(target):
-    # Splits a qualified target into a build file, target name and toolset.
-
-    # NOTE: rsplit is used to disambiguate the Windows drive letter separator.
-    target_split = target.rsplit(":", 1)
-    if len(target_split) == 2:
-        [build_file, target] = target_split
-    else:
-        build_file = None
-
-    target_split = target.rsplit("#", 1)
-    if len(target_split) == 2:
-        [target, toolset] = target_split
-    else:
-        toolset = None
-
-    return [build_file, target, toolset]
-
-
-def ResolveTarget(build_file, target, toolset):
-    # This function resolves a target into a canonical form:
-    # - a fully defined build file, either absolute or relative to the current
-    # directory
-    # - a target name
-    # - a toolset
-    #
-    # build_file is the file relative to which 'target' is defined.
-    # target is the qualified target.
-    # toolset is the default toolset for that target.
-    [parsed_build_file, target, parsed_toolset] = ParseQualifiedTarget(target)
-
-    if parsed_build_file:
-        if build_file:
-            # If a relative path, parsed_build_file is relative to the directory
-            # containing build_file.  If build_file is not in the current directory,
-            # parsed_build_file is not a usable path as-is.  Resolve it by
-            # interpreting it as relative to build_file.  If parsed_build_file is
-            # absolute, it is usable as a path regardless of the current directory,
-            # and os.path.join will return it as-is.
-            build_file = os.path.normpath(
-                os.path.join(os.path.dirname(build_file), parsed_build_file)
-            )
-            # Further (to handle cases like ../cwd), make it relative to cwd)
-            if not os.path.isabs(build_file):
-                build_file = RelativePath(build_file, ".")
-        else:
-            build_file = parsed_build_file
-
-    if parsed_toolset:
-        toolset = parsed_toolset
-
-    return [build_file, target, toolset]
-
-
-def BuildFile(fully_qualified_target):
-    # Extracts the build file from the fully qualified target.
-    return ParseQualifiedTarget(fully_qualified_target)[0]
-
-
-def GetEnvironFallback(var_list, default):
-    """Look up a key in the environment, with fallback to secondary keys
-  and finally falling back to a default value."""
-    for var in var_list:
-        if var in os.environ:
-            return os.environ[var]
-    return default
-
-
-def QualifiedTarget(build_file, target, toolset):
-    # "Qualified" means the file that a target was defined in and the target
-    # name, separated by a colon, suffixed by a # and the toolset name:
-    # /path/to/file.gyp:target_name#toolset
-    fully_qualified = build_file + ":" + target
-    if toolset:
-        fully_qualified = fully_qualified + "#" + toolset
-    return fully_qualified
-
-
-@memoize
-def RelativePath(path, relative_to, follow_path_symlink=True):
-    # Assuming both |path| and |relative_to| are relative to the current
-    # directory, returns a relative path that identifies path relative to
-    # relative_to.
-    # If |follow_symlink_path| is true (default) and |path| is a symlink, then
-    # this method returns a path to the real file represented by |path|. If it is
-    # false, this method returns a path to the symlink. If |path| is not a
-    # symlink, this option has no effect.
-
-    # Convert to normalized (and therefore absolute paths).
-    path = os.path.realpath(path) if follow_path_symlink else os.path.abspath(path)
-    relative_to = os.path.realpath(relative_to)
-
-    # On Windows, we can't create a relative path to a different drive, so just
-    # use the absolute path.
-    if sys.platform == "win32" and (
-        os.path.splitdrive(path)[0].lower()
-        != os.path.splitdrive(relative_to)[0].lower()
-    ):
-        return path
-
-    # Split the paths into components.
-    path_split = path.split(os.path.sep)
-    relative_to_split = relative_to.split(os.path.sep)
-
-    # Determine how much of the prefix the two paths share.
-    prefix_len = len(os.path.commonprefix([path_split, relative_to_split]))
-
-    # Put enough ".." components to back up out of relative_to to the common
-    # prefix, and then append the part of path_split after the common prefix.
-    relative_split = [os.path.pardir] * (
-        len(relative_to_split) - prefix_len
-    ) + path_split[prefix_len:]
-
-    if len(relative_split) == 0:
-        # The paths were the same.
-        return ""
-
-    # Turn it back into a string and we're done.
-    return os.path.join(*relative_split)
-
-
-@memoize
-def InvertRelativePath(path, toplevel_dir=None):
-    """Given a path like foo/bar that is relative to toplevel_dir, return
-  the inverse relative path back to the toplevel_dir.
-
-  E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
-  should always produce the empty string, unless the path contains symlinks.
-  """
-    if not path:
-        return path
-    toplevel_dir = "." if toplevel_dir is None else toplevel_dir
-    return RelativePath(toplevel_dir, os.path.join(toplevel_dir, path))
-
-
-def FixIfRelativePath(path, relative_to):
-    # Like RelativePath but returns |path| unchanged if it is absolute.
-    if os.path.isabs(path):
-        return path
-    return RelativePath(path, relative_to)
-
-
-def UnrelativePath(path, relative_to):
-    # Assuming that |relative_to| is relative to the current directory, and |path|
-    # is a path relative to the dirname of |relative_to|, returns a path that
-    # identifies |path| relative to the current directory.
-    rel_dir = os.path.dirname(relative_to)
-    return os.path.normpath(os.path.join(rel_dir, path))
-
-
-# re objects used by EncodePOSIXShellArgument.  See IEEE 1003.1 XCU.2.2 at
-# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02
-# and the documentation for various shells.
-
-# _quote is a pattern that should match any argument that needs to be quoted
-# with double-quotes by EncodePOSIXShellArgument.  It matches the following
-# characters appearing anywhere in an argument:
-#   \t, \n, space  parameter separators
-#   #              comments
-#   $              expansions (quoted to always expand within one argument)
-#   %              called out by IEEE 1003.1 XCU.2.2
-#   &              job control
-#   '              quoting
-#   (, )           subshell execution
-#   *, ?, [        pathname expansion
-#   ;              command delimiter
-#   <, >, |        redirection
-#   =              assignment
-#   {, }           brace expansion (bash)
-#   ~              tilde expansion
-# It also matches the empty string, because "" (or '') is the only way to
-# represent an empty string literal argument to a POSIX shell.
-#
-# This does not match the characters in _escape, because those need to be
-# backslash-escaped regardless of whether they appear in a double-quoted
-# string.
-_quote = re.compile("[\t\n #$%&'()*;<=>?[{|}~]|^$")
-
-# _escape is a pattern that should match any character that needs to be
-# escaped with a backslash, whether or not the argument matched the _quote
-# pattern.  _escape is used with re.sub to backslash anything in _escape's
-# first match group, hence the (parentheses) in the regular expression.
-#
-# _escape matches the following characters appearing anywhere in an argument:
-#   "  to prevent POSIX shells from interpreting this character for quoting
-#   \  to prevent POSIX shells from interpreting this character for escaping
-#   `  to prevent POSIX shells from interpreting this character for command
-#      substitution
-# Missing from this list is $, because the desired behavior of
-# EncodePOSIXShellArgument is to permit parameter (variable) expansion.
-#
-# Also missing from this list is !, which bash will interpret as the history
-# expansion character when history is enabled.  bash does not enable history
-# by default in non-interactive shells, so this is not thought to be a problem.
-# ! was omitted from this list because bash interprets "\!" as a literal string
-# including the backslash character (avoiding history expansion but retaining
-# the backslash), which would not be correct for argument encoding.  Handling
-# this case properly would also be problematic because bash allows the history
-# character to be changed with the histchars shell variable.  Fortunately,
-# as history is not enabled in non-interactive shells and
-# EncodePOSIXShellArgument is only expected to encode for non-interactive
-# shells, there is no room for error here by ignoring !.
-_escape = re.compile(r'(["\\`])')
-
-
-def EncodePOSIXShellArgument(argument):
-    """Encodes |argument| suitably for consumption by POSIX shells.
-
-  argument may be quoted and escaped as necessary to ensure that POSIX shells
-  treat the returned value as a literal representing the argument passed to
-  this function.  Parameter (variable) expansions beginning with $ are allowed
-  to remain intact without escaping the $, to allow the argument to contain
-  references to variables to be expanded by the shell.
-  """
-
-    if not isinstance(argument, str):
-        argument = str(argument)
-
-    quote = '"' if _quote.search(argument) else ""
-
-    encoded = quote + re.sub(_escape, r"\\\1", argument) + quote
-
-    return encoded
-
-
-def EncodePOSIXShellList(list):
-    """Encodes |list| suitably for consumption by POSIX shells.
-
-  Returns EncodePOSIXShellArgument for each item in list, and joins them
-  together using the space character as an argument separator.
-  """
-
-    encoded_arguments = []
-    for argument in list:
-        encoded_arguments.append(EncodePOSIXShellArgument(argument))
-    return " ".join(encoded_arguments)
-
-
-def DeepDependencyTargets(target_dicts, roots):
-    """Returns the recursive list of target dependencies."""
-    dependencies = set()
-    pending = set(roots)
-    while pending:
-        # Pluck out one.
-        r = pending.pop()
-        # Skip if visited already.
-        if r in dependencies:
-            continue
-        # Add it.
-        dependencies.add(r)
-        # Add its children.
-        spec = target_dicts[r]
-        pending.update(set(spec.get("dependencies", [])))
-        pending.update(set(spec.get("dependencies_original", [])))
-    return list(dependencies - set(roots))
-
-
-def BuildFileTargets(target_list, build_file):
-    """From a target_list, returns the subset from the specified build_file.
-  """
-    return [p for p in target_list if BuildFile(p) == build_file]
-
-
-def AllTargets(target_list, target_dicts, build_file):
-    """Returns all targets (direct and dependencies) for the specified build_file.
-  """
-    bftargets = BuildFileTargets(target_list, build_file)
-    deptargets = DeepDependencyTargets(target_dicts, bftargets)
-    return bftargets + deptargets
-
-
-def WriteOnDiff(filename):
-    """Write to a file only if the new contents differ.
-
-  Arguments:
-    filename: name of the file to potentially write to.
-  Returns:
-    A file like object which will write to temporary file and only overwrite
-    the target if it differs (on close).
-  """
-
-    class Writer:
-        """Wrapper around file which only covers the target if it differs."""
-
-        def __init__(self):
-            # On Cygwin remove the "dir" argument
-            # `C:` prefixed paths are treated as relative,
-            # consequently ending up with current dir "/cygdrive/c/..."
-            # being prefixed to those, which was
-            # obviously a non-existent path,
-            # for example: "/cygdrive/c//C:\".
-            # For more details see:
-            # https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp
-            base_temp_dir = "" if IsCygwin() else os.path.dirname(filename)
-            # Pick temporary file.
-            tmp_fd, self.tmp_path = tempfile.mkstemp(
-                suffix=".tmp",
-                prefix=os.path.split(filename)[1] + ".gyp.",
-                dir=base_temp_dir,
-            )
-            try:
-                self.tmp_file = os.fdopen(tmp_fd, "wb")
-            except Exception:
-                # Don't leave turds behind.
-                os.unlink(self.tmp_path)
-                raise
-
-        def __getattr__(self, attrname):
-            # Delegate everything else to self.tmp_file
-            return getattr(self.tmp_file, attrname)
-
-        def close(self):
-            try:
-                # Close tmp file.
-                self.tmp_file.close()
-                # Determine if different.
-                same = False
-                try:
-                    same = filecmp.cmp(self.tmp_path, filename, False)
-                except OSError as e:
-                    if e.errno != errno.ENOENT:
-                        raise
-
-                if same:
-                    # The new file is identical to the old one, just get rid of the new
-                    # one.
-                    os.unlink(self.tmp_path)
-                else:
-                    # The new file is different from the old one,
-                    # or there is no old one.
-                    # Rename the new file to the permanent name.
-                    #
-                    # tempfile.mkstemp uses an overly restrictive mode, resulting in a
-                    # file that can only be read by the owner, regardless of the umask.
-                    # There's no reason to not respect the umask here,
-                    # which means that an extra hoop is required
-                    # to fetch it and reset the new file's mode.
-                    #
-                    # No way to get the umask without setting a new one?  Set a safe one
-                    # and then set it back to the old value.
-                    umask = os.umask(0o77)
-                    os.umask(umask)
-                    os.chmod(self.tmp_path, 0o666 & ~umask)
-                    if sys.platform == "win32" and os.path.exists(filename):
-                        # NOTE: on windows (but not cygwin) rename will not replace an
-                        # existing file, so it must be preceded with a remove.
-                        # Sadly there is no way to make the switch atomic.
-                        os.remove(filename)
-                    os.rename(self.tmp_path, filename)
-            except Exception:
-                # Don't leave turds behind.
-                os.unlink(self.tmp_path)
-                raise
-
-        def write(self, s):
-            self.tmp_file.write(s.encode("utf-8"))
-
-    return Writer()
-
-
-def EnsureDirExists(path):
-    """Make sure the directory for |path| exists."""
-    try:
-        os.makedirs(os.path.dirname(path))
-    except OSError:
-        pass
-
-
-def GetFlavor(params):
-    """Returns |params.flavor| if it's set, the system's default flavor else."""
-    flavors = {
-        "cygwin": "win",
-        "win32": "win",
-        "darwin": "mac",
-    }
-
-    if "flavor" in params:
-        return params["flavor"]
-    if sys.platform in flavors:
-        return flavors[sys.platform]
-    if sys.platform.startswith("sunos"):
-        return "solaris"
-    if sys.platform.startswith(("dragonfly", "freebsd")):
-        return "freebsd"
-    if sys.platform.startswith("openbsd"):
-        return "openbsd"
-    if sys.platform.startswith("netbsd"):
-        return "netbsd"
-    if sys.platform.startswith("aix"):
-        return "aix"
-    if sys.platform.startswith(("os390", "zos")):
-        return "zos"
-    if sys.platform == "os400":
-        return "os400"
-
-    return "linux"
-
-
-def CopyTool(flavor, out_path, generator_flags={}):
-    """Finds (flock|mac|win)_tool.gyp in the gyp directory and copies it
-  to |out_path|."""
-    # aix and solaris just need flock emulation. mac and win use more complicated
-    # support scripts.
-    prefix = {
-        "aix": "flock",
-        "os400": "flock",
-        "solaris": "flock",
-        "mac": "mac",
-        "ios": "mac",
-        "win": "win",
-    }.get(flavor, None)
-    if not prefix:
-        return
-
-    # Slurp input file.
-    source_path = os.path.join(
-        os.path.dirname(os.path.abspath(__file__)), "%s_tool.py" % prefix
-    )
-    with open(source_path) as source_file:
-        source = source_file.readlines()
-
-    # Set custom header flags.
-    header = "# Generated by gyp. Do not edit.\n"
-    mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None)
-    if flavor == "mac" and mac_toolchain_dir:
-        header += "import os;\nos.environ['DEVELOPER_DIR']='%s'\n" % mac_toolchain_dir
-
-    # Add header and write it out.
-    tool_path = os.path.join(out_path, "gyp-%s-tool" % prefix)
-    with open(tool_path, "w") as tool_file:
-        tool_file.write("".join([source[0], header] + source[1:]))
-
-    # Make file executable.
-    os.chmod(tool_path, 0o755)
-
-
-# From Alex Martelli,
-# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52560
-# ASPN: Python Cookbook: Remove duplicates from a sequence
-# First comment, dated 2001/10/13.
-# (Also in the printed Python Cookbook.)
-
-
-def uniquer(seq, idfun=lambda x: x):
-    seen = {}
-    result = []
-    for item in seq:
-        marker = idfun(item)
-        if marker in seen:
-            continue
-        seen[marker] = 1
-        result.append(item)
-    return result
-
-
-# Based on http://code.activestate.com/recipes/576694/.
-class OrderedSet(MutableSet):
-    def __init__(self, iterable=None):
-        self.end = end = []
-        end += [None, end, end]  # sentinel node for doubly linked list
-        self.map = {}  # key --> [key, prev, next]
-        if iterable is not None:
-            self |= iterable
-
-    def __len__(self):
-        return len(self.map)
-
-    def __contains__(self, key):
-        return key in self.map
-
-    def add(self, key):
-        if key not in self.map:
-            end = self.end
-            curr = end[1]
-            curr[2] = end[1] = self.map[key] = [key, curr, end]
-
-    def discard(self, key):
-        if key in self.map:
-            key, prev_item, next_item = self.map.pop(key)
-            prev_item[2] = next_item
-            next_item[1] = prev_item
-
-    def __iter__(self):
-        end = self.end
-        curr = end[2]
-        while curr is not end:
-            yield curr[0]
-            curr = curr[2]
-
-    def __reversed__(self):
-        end = self.end
-        curr = end[1]
-        while curr is not end:
-            yield curr[0]
-            curr = curr[1]
-
-    # The second argument is an addition that causes a pylint warning.
-    def pop(self, last=True):  # pylint: disable=W0221
-        if not self:
-            raise KeyError("set is empty")
-        key = self.end[1][0] if last else self.end[2][0]
-        self.discard(key)
-        return key
-
-    def __repr__(self):
-        if not self:
-            return f"{self.__class__.__name__}()"
-        return f"{self.__class__.__name__}({list(self)!r})"
-
-    def __eq__(self, other):
-        if isinstance(other, OrderedSet):
-            return len(self) == len(other) and list(self) == list(other)
-        return set(self) == set(other)
-
-    # Extensions to the recipe.
-    def update(self, iterable):
-        for i in iterable:
-            if i not in self:
-                self.add(i)
-
-
-class CycleError(Exception):
-    """An exception raised when an unexpected cycle is detected."""
-
-    def __init__(self, nodes):
-        self.nodes = nodes
-
-    def __str__(self):
-        return "CycleError: cycle involving: " + str(self.nodes)
-
-
-def TopologicallySorted(graph, get_edges):
-    r"""Topologically sort based on a user provided edge definition.
-
-  Args:
-    graph: A list of node names.
-    get_edges: A function mapping from node name to a hashable collection
-               of node names which this node has outgoing edges to.
-  Returns:
-    A list containing all of the node in graph in topological order.
-    It is assumed that calling get_edges once for each node and caching is
-    cheaper than repeatedly calling get_edges.
-  Raises:
-    CycleError in the event of a cycle.
-  Example:
-    graph = {'a': '$(b) $(c)', 'b': 'hi', 'c': '$(b)'}
-    def GetEdges(node):
-      return re.findall(r'\$\(([^))]\)', graph[node])
-    print TopologicallySorted(graph.keys(), GetEdges)
-    ==>
-    ['a', 'c', b']
-  """
-    get_edges = memoize(get_edges)
-    visited = set()
-    visiting = set()
-    ordered_nodes = []
-
-    def Visit(node):
-        if node in visiting:
-            raise CycleError(visiting)
-        if node in visited:
-            return
-        visited.add(node)
-        visiting.add(node)
-        for neighbor in get_edges(node):
-            Visit(neighbor)
-        visiting.remove(node)
-        ordered_nodes.insert(0, node)
-
-    for node in sorted(graph):
-        Visit(node)
-    return ordered_nodes
-
-
-def CrossCompileRequested():
-    # TODO: figure out how to not build extra host objects in the
-    # non-cross-compile case when this is enabled, and enable unconditionally.
-    return (
-        os.environ.get("GYP_CROSSCOMPILE")
-        or os.environ.get("AR_host")
-        or os.environ.get("CC_host")
-        or os.environ.get("CXX_host")
-        or os.environ.get("AR_target")
-        or os.environ.get("CC_target")
-        or os.environ.get("CXX_target")
-    )
-
-
-def IsCygwin():
-    try:
-        out = subprocess.Popen(
-            "uname", stdout=subprocess.PIPE, stderr=subprocess.STDOUT
-        )
-        stdout = out.communicate()[0].decode("utf-8")
-        return "CYGWIN" in str(stdout)
-    except Exception:
-        return False
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
deleted file mode 100755
index 0534408..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Unit tests for the common.py file."""
-
-import gyp.common
-import unittest
-import sys
-
-
-class TestTopologicallySorted(unittest.TestCase):
-    def test_Valid(self):
-        """Test that sorting works on a valid graph with one possible order."""
-        graph = {
-            "a": ["b", "c"],
-            "b": [],
-            "c": ["d"],
-            "d": ["b"],
-        }
-
-        def GetEdge(node):
-            return tuple(graph[node])
-
-        self.assertEqual(
-            gyp.common.TopologicallySorted(graph.keys(), GetEdge), ["a", "c", "d", "b"]
-        )
-
-    def test_Cycle(self):
-        """Test that an exception is thrown on a cyclic graph."""
-        graph = {
-            "a": ["b"],
-            "b": ["c"],
-            "c": ["d"],
-            "d": ["a"],
-        }
-
-        def GetEdge(node):
-            return tuple(graph[node])
-
-        self.assertRaises(
-            gyp.common.CycleError, gyp.common.TopologicallySorted, graph.keys(), GetEdge
-        )
-
-
-class TestGetFlavor(unittest.TestCase):
-    """Test that gyp.common.GetFlavor works as intended"""
-
-    original_platform = ""
-
-    def setUp(self):
-        self.original_platform = sys.platform
-
-    def tearDown(self):
-        sys.platform = self.original_platform
-
-    def assertFlavor(self, expected, argument, param):
-        sys.platform = argument
-        self.assertEqual(expected, gyp.common.GetFlavor(param))
-
-    def test_platform_default(self):
-        self.assertFlavor("freebsd", "freebsd9", {})
-        self.assertFlavor("freebsd", "freebsd10", {})
-        self.assertFlavor("openbsd", "openbsd5", {})
-        self.assertFlavor("solaris", "sunos5", {})
-        self.assertFlavor("solaris", "sunos", {})
-        self.assertFlavor("linux", "linux2", {})
-        self.assertFlavor("linux", "linux3", {})
-        self.assertFlavor("linux", "linux", {})
-
-    def test_param(self):
-        self.assertFlavor("foobar", "linux2", {"flavor": "foobar"})
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
deleted file mode 100644
index 02567b2..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import sys
-import re
-import os
-import locale
-from functools import reduce
-
-
-def XmlToString(content, encoding="utf-8", pretty=False):
-    """ Writes the XML content to disk, touching the file only if it has changed.
-
-  Visual Studio files have a lot of pre-defined structures.  This function makes
-  it easy to represent these structures as Python data structures, instead of
-  having to create a lot of function calls.
-
-  Each XML element of the content is represented as a list composed of:
-  1. The name of the element, a string,
-  2. The attributes of the element, a dictionary (optional), and
-  3+. The content of the element, if any.  Strings are simple text nodes and
-      lists are child elements.
-
-  Example 1:
-      
-  becomes
-      ['test']
-
-  Example 2:
-      
-         This is
-         it!
-      
-
-  becomes
-      ['myelement', {'a':'value1', 'b':'value2'},
-         ['childtype', 'This is'],
-         ['childtype', 'it!'],
-      ]
-
-  Args:
-    content:  The structured content to be converted.
-    encoding: The encoding to report on the first XML line.
-    pretty: True if we want pretty printing with indents and new lines.
-
-  Returns:
-    The XML content as a string.
-  """
-    # We create a huge list of all the elements of the file.
-    xml_parts = ['' % encoding]
-    if pretty:
-        xml_parts.append("\n")
-    _ConstructContentList(xml_parts, content, pretty)
-
-    # Convert it to a string
-    return "".join(xml_parts)
-
-
-def _ConstructContentList(xml_parts, specification, pretty, level=0):
-    """ Appends the XML parts corresponding to the specification.
-
-  Args:
-    xml_parts: A list of XML parts to be appended to.
-    specification:  The specification of the element.  See EasyXml docs.
-    pretty: True if we want pretty printing with indents and new lines.
-    level: Indentation level.
-  """
-    # The first item in a specification is the name of the element.
-    if pretty:
-        indentation = "  " * level
-        new_line = "\n"
-    else:
-        indentation = ""
-        new_line = ""
-    name = specification[0]
-    if not isinstance(name, str):
-        raise Exception(
-            "The first item of an EasyXml specification should be "
-            "a string.  Specification was " + str(specification)
-        )
-    xml_parts.append(indentation + "<" + name)
-
-    # Optionally in second position is a dictionary of the attributes.
-    rest = specification[1:]
-    if rest and isinstance(rest[0], dict):
-        for at, val in sorted(rest[0].items()):
-            xml_parts.append(f' {at}="{_XmlEscape(val, attr=True)}"')
-        rest = rest[1:]
-    if rest:
-        xml_parts.append(">")
-        all_strings = reduce(lambda x, y: x and isinstance(y, str), rest, True)
-        multi_line = not all_strings
-        if multi_line and new_line:
-            xml_parts.append(new_line)
-        for child_spec in rest:
-            # If it's a string, append a text node.
-            # Otherwise recurse over that child definition
-            if isinstance(child_spec, str):
-                xml_parts.append(_XmlEscape(child_spec))
-            else:
-                _ConstructContentList(xml_parts, child_spec, pretty, level + 1)
-        if multi_line and indentation:
-            xml_parts.append(indentation)
-        xml_parts.append(f"{new_line}")
-    else:
-        xml_parts.append("/>%s" % new_line)
-
-
-def WriteXmlIfChanged(content, path, encoding="utf-8", pretty=False,
-                      win32=(sys.platform == "win32")):
-    """ Writes the XML content to disk, touching the file only if it has changed.
-
-  Args:
-    content:  The structured content to be written.
-    path: Location of the file.
-    encoding: The encoding to report on the first line of the XML file.
-    pretty: True if we want pretty printing with indents and new lines.
-  """
-    xml_string = XmlToString(content, encoding, pretty)
-    if win32 and os.linesep != "\r\n":
-        xml_string = xml_string.replace("\n", "\r\n")
-
-    try:  # getdefaultlocale() was removed in Python 3.11
-        default_encoding = locale.getdefaultlocale()[1]
-    except AttributeError:
-        default_encoding = locale.getencoding()
-
-    if default_encoding and default_encoding.upper() != encoding.upper():
-        xml_string = xml_string.encode(encoding)
-
-    # Get the old content
-    try:
-        with open(path) as file:
-            existing = file.read()
-    except OSError:
-        existing = None
-
-    # It has changed, write it
-    if existing != xml_string:
-        with open(path, "wb") as file:
-            file.write(xml_string)
-
-
-_xml_escape_map = {
-    '"': """,
-    "'": "'",
-    "<": "<",
-    ">": ">",
-    "&": "&",
-    "\n": "
",
-    "\r": "
",
-}
-
-
-_xml_escape_re = re.compile("(%s)" % "|".join(map(re.escape, _xml_escape_map.keys())))
-
-
-def _XmlEscape(value, attr=False):
-    """ Escape a string for inclusion in XML."""
-
-    def replace(match):
-        m = match.string[match.start() : match.end()]
-        # don't replace single quotes in attrs
-        if attr and m == "'":
-            return m
-        return _xml_escape_map[m]
-
-    return _xml_escape_re.sub(replace, value)
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
deleted file mode 100755
index 2d9b152..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-""" Unit tests for the easy_xml.py file. """
-
-import gyp.easy_xml as easy_xml
-import unittest
-
-from io import StringIO
-
-
-class TestSequenceFunctions(unittest.TestCase):
-    def setUp(self):
-        self.stderr = StringIO()
-
-    def test_EasyXml_simple(self):
-        self.assertEqual(
-            easy_xml.XmlToString(["test"]),
-            '',
-        )
-
-        self.assertEqual(
-            easy_xml.XmlToString(["test"], encoding="Windows-1252"),
-            '',
-        )
-
-    def test_EasyXml_simple_with_attributes(self):
-        self.assertEqual(
-            easy_xml.XmlToString(["test2", {"a": "value1", "b": "value2"}]),
-            '',
-        )
-
-    def test_EasyXml_escaping(self):
-        original = "'\"\r&\nfoo"
-        converted = "<test>'"
&
foo"
-        converted_apos = converted.replace("'", "'")
-        self.assertEqual(
-            easy_xml.XmlToString(["test3", {"a": original}, original]),
-            '%s'
-            % (converted, converted_apos),
-        )
-
-    def test_EasyXml_pretty(self):
-        self.assertEqual(
-            easy_xml.XmlToString(
-                ["test3", ["GrandParent", ["Parent1", ["Child"]], ["Parent2"]]],
-                pretty=True,
-            ),
-            '\n'
-            "\n"
-            "  \n"
-            "    \n"
-            "      \n"
-            "    \n"
-            "    \n"
-            "  \n"
-            "\n",
-        )
-
-    def test_EasyXml_complex(self):
-        # We want to create:
-        target = (
-            ''
-            ""
-            ''
-            "{D2250C20-3A94-4FB9-AF73-11BC5B73884B}"
-            "Win32Proj"
-            "automated_ui_tests"
-            ""
-            ''
-            "'
-            "Application"
-            "Unicode"
-            "SpectreLoadCF"
-            "14.36.32532"
-            ""
-            ""
-        )
-
-        xml = easy_xml.XmlToString(
-            [
-                "Project",
-                [
-                    "PropertyGroup",
-                    {"Label": "Globals"},
-                    ["ProjectGuid", "{D2250C20-3A94-4FB9-AF73-11BC5B73884B}"],
-                    ["Keyword", "Win32Proj"],
-                    ["RootNamespace", "automated_ui_tests"],
-                ],
-                ["Import", {"Project": "$(VCTargetsPath)\\Microsoft.Cpp.props"}],
-                [
-                    "PropertyGroup",
-                    {
-                        "Condition": "'$(Configuration)|$(Platform)'=='Debug|Win32'",
-                        "Label": "Configuration",
-                    },
-                    ["ConfigurationType", "Application"],
-                    ["CharacterSet", "Unicode"],
-                    ["SpectreMitigation", "SpectreLoadCF"],
-                    ["VCToolsVersion", "14.36.32532"],
-                ],
-            ]
-        )
-        self.assertEqual(xml, target)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
deleted file mode 100755
index 0754aff..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2011 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""These functions are executed via gyp-flock-tool when using the Makefile
-generator.  Used on systems that don't have a built-in flock."""
-
-import fcntl
-import os
-import struct
-import subprocess
-import sys
-
-
-def main(args):
-    executor = FlockTool()
-    executor.Dispatch(args)
-
-
-class FlockTool:
-    """This class emulates the 'flock' command."""
-
-    def Dispatch(self, args):
-        """Dispatches a string command to a method."""
-        if len(args) < 1:
-            raise Exception("Not enough arguments")
-
-        method = "Exec%s" % self._CommandifyName(args[0])
-        getattr(self, method)(*args[1:])
-
-    def _CommandifyName(self, name_string):
-        """Transforms a tool name like copy-info-plist to CopyInfoPlist"""
-        return name_string.title().replace("-", "")
-
-    def ExecFlock(self, lockfile, *cmd_list):
-        """Emulates the most basic behavior of Linux's flock(1)."""
-        # Rely on exception handling to report errors.
-        # Note that the stock python on SunOS has a bug
-        # where fcntl.flock(fd, LOCK_EX) always fails
-        # with EBADF, that's why we use this F_SETLK
-        # hack instead.
-        fd = os.open(lockfile, os.O_WRONLY | os.O_NOCTTY | os.O_CREAT, 0o666)
-        if sys.platform.startswith("aix") or sys.platform == "os400":
-            # Python on AIX is compiled with LARGEFILE support, which changes the
-            # struct size.
-            op = struct.pack("hhIllqq", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
-        else:
-            op = struct.pack("hhllhhl", fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
-        fcntl.fcntl(fd, fcntl.F_SETLK, op)
-        return subprocess.call(cmd_list)
-
-
-if __name__ == "__main__":
-    sys.exit(main(sys.argv[1:]))
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py
deleted file mode 100644
index e69de29..0000000
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
deleted file mode 100644
index 1334f2f..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
+++ /dev/null
@@ -1,804 +0,0 @@
-# Copyright (c) 2014 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""
-This script is intended for use as a GYP_GENERATOR. It takes as input (by way of
-the generator flag config_path) the path of a json file that dictates the files
-and targets to search for. The following keys are supported:
-files: list of paths (relative) of the files to search for.
-test_targets: unqualified target names to search for. Any target in this list
-that depends upon a file in |files| is output regardless of the type of target
-or chain of dependencies.
-additional_compile_targets: Unqualified targets to search for in addition to
-test_targets. Targets in the combined list that depend upon a file in |files|
-are not necessarily output. For example, if the target is of type none then the
-target is not output (but one of the descendants of the target will be).
-
-The following is output:
-error: only supplied if there is an error.
-compile_targets: minimal set of targets that directly or indirectly (for
-  targets of type none) depend on the files in |files| and is one of the
-  supplied targets or a target that one of the supplied targets depends on.
-  The expectation is this set of targets is passed into a build step. This list
-  always contains the output of test_targets as well.
-test_targets: set of targets from the supplied |test_targets| that either
-  directly or indirectly depend upon a file in |files|. This list if useful
-  if additional processing needs to be done for certain targets after the
-  build, such as running tests.
-status: outputs one of three values: none of the supplied files were found,
-  one of the include files changed so that it should be assumed everything
-  changed (in this case test_targets and compile_targets are not output) or at
-  least one file was found.
-invalid_targets: list of supplied targets that were not found.
-
-Example:
-Consider a graph like the following:
-  A     D
- / \
-B   C
-A depends upon both B and C, A is of type none and B and C are executables.
-D is an executable, has no dependencies and nothing depends on it.
-If |additional_compile_targets| = ["A"], |test_targets| = ["B", "C"] and
-files = ["b.cc", "d.cc"] (B depends upon b.cc and D depends upon d.cc), then
-the following is output:
-|compile_targets| = ["B"] B must built as it depends upon the changed file b.cc
-and the supplied target A depends upon it. A is not output as a build_target
-as it is of type none with no rules and actions.
-|test_targets| = ["B"] B directly depends upon the change file b.cc.
-
-Even though the file d.cc, which D depends upon, has changed D is not output
-as it was not supplied by way of |additional_compile_targets| or |test_targets|.
-
-If the generator flag analyzer_output_path is specified, output is written
-there. Otherwise output is written to stdout.
-
-In Gyp the "all" target is shorthand for the root targets in the files passed
-to gyp. For example, if file "a.gyp" contains targets "a1" and
-"a2", and file "b.gyp" contains targets "b1" and "b2" and "a2" has a dependency
-on "b2" and gyp is supplied "a.gyp" then "all" consists of "a1" and "a2".
-Notice that "b1" and "b2" are not in the "all" target as "b.gyp" was not
-directly supplied to gyp. OTOH if both "a.gyp" and "b.gyp" are supplied to gyp
-then the "all" target includes "b1" and "b2".
-"""
-
-
-import gyp.common
-import json
-import os
-import posixpath
-
-debug = False
-
-found_dependency_string = "Found dependency"
-no_dependency_string = "No dependencies"
-# Status when it should be assumed that everything has changed.
-all_changed_string = "Found dependency (all)"
-
-# MatchStatus is used indicate if and how a target depends upon the supplied
-# sources.
-# The target's sources contain one of the supplied paths.
-MATCH_STATUS_MATCHES = 1
-# The target has a dependency on another target that contains one of the
-# supplied paths.
-MATCH_STATUS_MATCHES_BY_DEPENDENCY = 2
-# The target's sources weren't in the supplied paths and none of the target's
-# dependencies depend upon a target that matched.
-MATCH_STATUS_DOESNT_MATCH = 3
-# The target doesn't contain the source, but the dependent targets have not yet
-# been visited to determine a more specific status yet.
-MATCH_STATUS_TBD = 4
-
-generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested()
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_default_variables = {}
-for dirname in [
-    "INTERMEDIATE_DIR",
-    "SHARED_INTERMEDIATE_DIR",
-    "PRODUCT_DIR",
-    "LIB_DIR",
-    "SHARED_LIB_DIR",
-]:
-    generator_default_variables[dirname] = "!!!"
-
-for unused in [
-    "RULE_INPUT_PATH",
-    "RULE_INPUT_ROOT",
-    "RULE_INPUT_NAME",
-    "RULE_INPUT_DIRNAME",
-    "RULE_INPUT_EXT",
-    "EXECUTABLE_PREFIX",
-    "EXECUTABLE_SUFFIX",
-    "STATIC_LIB_PREFIX",
-    "STATIC_LIB_SUFFIX",
-    "SHARED_LIB_PREFIX",
-    "SHARED_LIB_SUFFIX",
-    "CONFIGURATION_NAME",
-]:
-    generator_default_variables[unused] = ""
-
-
-def _ToGypPath(path):
-    """Converts a path to the format used by gyp."""
-    if os.sep == "\\" and os.altsep == "/":
-        return path.replace("\\", "/")
-    return path
-
-
-def _ResolveParent(path, base_path_components):
-    """Resolves |path|, which starts with at least one '../'. Returns an empty
-  string if the path shouldn't be considered. See _AddSources() for a
-  description of |base_path_components|."""
-    depth = 0
-    while path.startswith("../"):
-        depth += 1
-        path = path[3:]
-    # Relative includes may go outside the source tree. For example, an action may
-    # have inputs in /usr/include, which are not in the source tree.
-    if depth > len(base_path_components):
-        return ""
-    if depth == len(base_path_components):
-        return path
-    return (
-        "/".join(base_path_components[0 : len(base_path_components) - depth])
-        + "/"
-        + path
-    )
-
-
-def _AddSources(sources, base_path, base_path_components, result):
-    """Extracts valid sources from |sources| and adds them to |result|. Each
-  source file is relative to |base_path|, but may contain '..'. To make
-  resolving '..' easier |base_path_components| contains each of the
-  directories in |base_path|. Additionally each source may contain variables.
-  Such sources are ignored as it is assumed dependencies on them are expressed
-  and tracked in some other means."""
-    # NOTE: gyp paths are always posix style.
-    for source in sources:
-        if not len(source) or source.startswith("!!!") or source.startswith("$"):
-            continue
-        # variable expansion may lead to //.
-        org_source = source
-        source = source[0] + source[1:].replace("//", "/")
-        if source.startswith("../"):
-            source = _ResolveParent(source, base_path_components)
-            if len(source):
-                result.append(source)
-            continue
-        result.append(base_path + source)
-        if debug:
-            print("AddSource", org_source, result[len(result) - 1])
-
-
-def _ExtractSourcesFromAction(action, base_path, base_path_components, results):
-    if "inputs" in action:
-        _AddSources(action["inputs"], base_path, base_path_components, results)
-
-
-def _ToLocalPath(toplevel_dir, path):
-    """Converts |path| to a path relative to |toplevel_dir|."""
-    if path == toplevel_dir:
-        return ""
-    if path.startswith(toplevel_dir + "/"):
-        return path[len(toplevel_dir) + len("/") :]
-    return path
-
-
-def _ExtractSources(target, target_dict, toplevel_dir):
-    # |target| is either absolute or relative and in the format of the OS. Gyp
-    # source paths are always posix. Convert |target| to a posix path relative to
-    # |toplevel_dir_|. This is done to make it easy to build source paths.
-    base_path = posixpath.dirname(_ToLocalPath(toplevel_dir, _ToGypPath(target)))
-    base_path_components = base_path.split("/")
-
-    # Add a trailing '/' so that _AddSources() can easily build paths.
-    if len(base_path):
-        base_path += "/"
-
-    if debug:
-        print("ExtractSources", target, base_path)
-
-    results = []
-    if "sources" in target_dict:
-        _AddSources(target_dict["sources"], base_path, base_path_components, results)
-    # Include the inputs from any actions. Any changes to these affect the
-    # resulting output.
-    if "actions" in target_dict:
-        for action in target_dict["actions"]:
-            _ExtractSourcesFromAction(action, base_path, base_path_components, results)
-    if "rules" in target_dict:
-        for rule in target_dict["rules"]:
-            _ExtractSourcesFromAction(rule, base_path, base_path_components, results)
-
-    return results
-
-
-class Target:
-    """Holds information about a particular target:
-  deps: set of Targets this Target depends upon. This is not recursive, only the
-    direct dependent Targets.
-  match_status: one of the MatchStatus values.
-  back_deps: set of Targets that have a dependency on this Target.
-  visited: used during iteration to indicate whether we've visited this target.
-    This is used for two iterations, once in building the set of Targets and
-    again in _GetBuildTargets().
-  name: fully qualified name of the target.
-  requires_build: True if the target type is such that it needs to be built.
-    See _DoesTargetTypeRequireBuild for details.
-  added_to_compile_targets: used when determining if the target was added to the
-    set of targets that needs to be built.
-  in_roots: true if this target is a descendant of one of the root nodes.
-  is_executable: true if the type of target is executable.
-  is_static_library: true if the type of target is static_library.
-  is_or_has_linked_ancestor: true if the target does a link (eg executable), or
-    if there is a target in back_deps that does a link."""
-
-    def __init__(self, name):
-        self.deps = set()
-        self.match_status = MATCH_STATUS_TBD
-        self.back_deps = set()
-        self.name = name
-        # TODO(sky): I don't like hanging this off Target. This state is specific
-        # to certain functions and should be isolated there.
-        self.visited = False
-        self.requires_build = False
-        self.added_to_compile_targets = False
-        self.in_roots = False
-        self.is_executable = False
-        self.is_static_library = False
-        self.is_or_has_linked_ancestor = False
-
-
-class Config:
-    """Details what we're looking for
-  files: set of files to search for
-  targets: see file description for details."""
-
-    def __init__(self):
-        self.files = []
-        self.targets = set()
-        self.additional_compile_target_names = set()
-        self.test_target_names = set()
-
-    def Init(self, params):
-        """Initializes Config. This is a separate method as it raises an exception
-    if there is a parse error."""
-        generator_flags = params.get("generator_flags", {})
-        config_path = generator_flags.get("config_path", None)
-        if not config_path:
-            return
-        try:
-            f = open(config_path)
-            config = json.load(f)
-            f.close()
-        except OSError:
-            raise Exception("Unable to open file " + config_path)
-        except ValueError as e:
-            raise Exception("Unable to parse config file " + config_path + str(e))
-        if not isinstance(config, dict):
-            raise Exception("config_path must be a JSON file containing a dictionary")
-        self.files = config.get("files", [])
-        self.additional_compile_target_names = set(
-            config.get("additional_compile_targets", [])
-        )
-        self.test_target_names = set(config.get("test_targets", []))
-
-
-def _WasBuildFileModified(build_file, data, files, toplevel_dir):
-    """Returns true if the build file |build_file| is either in |files| or
-  one of the files included by |build_file| is in |files|. |toplevel_dir| is
-  the root of the source tree."""
-    if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files:
-        if debug:
-            print("gyp file modified", build_file)
-        return True
-
-    # First element of included_files is the file itself.
-    if len(data[build_file]["included_files"]) <= 1:
-        return False
-
-    for include_file in data[build_file]["included_files"][1:]:
-        # |included_files| are relative to the directory of the |build_file|.
-        rel_include_file = _ToGypPath(
-            gyp.common.UnrelativePath(include_file, build_file)
-        )
-        if _ToLocalPath(toplevel_dir, rel_include_file) in files:
-            if debug:
-                print(
-                    "included gyp file modified, gyp_file=",
-                    build_file,
-                    "included file=",
-                    rel_include_file,
-                )
-            return True
-    return False
-
-
-def _GetOrCreateTargetByName(targets, target_name):
-    """Creates or returns the Target at targets[target_name]. If there is no
-  Target for |target_name| one is created. Returns a tuple of whether a new
-  Target was created and the Target."""
-    if target_name in targets:
-        return False, targets[target_name]
-    target = Target(target_name)
-    targets[target_name] = target
-    return True, target
-
-
-def _DoesTargetTypeRequireBuild(target_dict):
-    """Returns true if the target type is such that it needs to be built."""
-    # If a 'none' target has rules or actions we assume it requires a build.
-    return bool(
-        target_dict["type"] != "none"
-        or target_dict.get("actions")
-        or target_dict.get("rules")
-    )
-
-
-def _GenerateTargets(data, target_list, target_dicts, toplevel_dir, files, build_files):
-    """Returns a tuple of the following:
-  . A dictionary mapping from fully qualified name to Target.
-  . A list of the targets that have a source file in |files|.
-  . Targets that constitute the 'all' target. See description at top of file
-    for details on the 'all' target.
-  This sets the |match_status| of the targets that contain any of the source
-  files in |files| to MATCH_STATUS_MATCHES.
-  |toplevel_dir| is the root of the source tree."""
-    # Maps from target name to Target.
-    name_to_target = {}
-
-    # Targets that matched.
-    matching_targets = []
-
-    # Queue of targets to visit.
-    targets_to_visit = target_list[:]
-
-    # Maps from build file to a boolean indicating whether the build file is in
-    # |files|.
-    build_file_in_files = {}
-
-    # Root targets across all files.
-    roots = set()
-
-    # Set of Targets in |build_files|.
-    build_file_targets = set()
-
-    while len(targets_to_visit) > 0:
-        target_name = targets_to_visit.pop()
-        created_target, target = _GetOrCreateTargetByName(name_to_target, target_name)
-        if created_target:
-            roots.add(target)
-        elif target.visited:
-            continue
-
-        target.visited = True
-        target.requires_build = _DoesTargetTypeRequireBuild(target_dicts[target_name])
-        target_type = target_dicts[target_name]["type"]
-        target.is_executable = target_type == "executable"
-        target.is_static_library = target_type == "static_library"
-        target.is_or_has_linked_ancestor = (
-            target_type in {"executable", "shared_library"}
-        )
-
-        build_file = gyp.common.ParseQualifiedTarget(target_name)[0]
-        if build_file not in build_file_in_files:
-            build_file_in_files[build_file] = _WasBuildFileModified(
-                build_file, data, files, toplevel_dir
-            )
-
-        if build_file in build_files:
-            build_file_targets.add(target)
-
-        # If a build file (or any of its included files) is modified we assume all
-        # targets in the file are modified.
-        if build_file_in_files[build_file]:
-            print("matching target from modified build file", target_name)
-            target.match_status = MATCH_STATUS_MATCHES
-            matching_targets.append(target)
-        else:
-            sources = _ExtractSources(
-                target_name, target_dicts[target_name], toplevel_dir
-            )
-            for source in sources:
-                if _ToGypPath(os.path.normpath(source)) in files:
-                    print("target", target_name, "matches", source)
-                    target.match_status = MATCH_STATUS_MATCHES
-                    matching_targets.append(target)
-                    break
-
-        # Add dependencies to visit as well as updating back pointers for deps.
-        for dep in target_dicts[target_name].get("dependencies", []):
-            targets_to_visit.append(dep)
-
-            created_dep_target, dep_target = _GetOrCreateTargetByName(
-                name_to_target, dep
-            )
-            if not created_dep_target:
-                roots.discard(dep_target)
-
-            target.deps.add(dep_target)
-            dep_target.back_deps.add(target)
-
-    return name_to_target, matching_targets, roots & build_file_targets
-
-
-def _GetUnqualifiedToTargetMapping(all_targets, to_find):
-    """Returns a tuple of the following:
-  . mapping (dictionary) from unqualified name to Target for all the
-    Targets in |to_find|.
-  . any target names not found. If this is empty all targets were found."""
-    result = {}
-    if not to_find:
-        return {}, []
-    to_find = set(to_find)
-    for target_name in all_targets:
-        extracted = gyp.common.ParseQualifiedTarget(target_name)
-        if len(extracted) > 1 and extracted[1] in to_find:
-            to_find.remove(extracted[1])
-            result[extracted[1]] = all_targets[target_name]
-            if not to_find:
-                return result, []
-    return result, list(to_find)
-
-
-def _DoesTargetDependOnMatchingTargets(target):
-    """Returns true if |target| or any of its dependencies is one of the
-  targets containing the files supplied as input to analyzer. This updates
-  |matches| of the Targets as it recurses.
-  target: the Target to look for."""
-    if target.match_status == MATCH_STATUS_DOESNT_MATCH:
-        return False
-    if (
-        target.match_status in {MATCH_STATUS_MATCHES,
-                                MATCH_STATUS_MATCHES_BY_DEPENDENCY}
-    ):
-        return True
-    for dep in target.deps:
-        if _DoesTargetDependOnMatchingTargets(dep):
-            target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY
-            print("\t", target.name, "matches by dep", dep.name)
-            return True
-    target.match_status = MATCH_STATUS_DOESNT_MATCH
-    return False
-
-
-def _GetTargetsDependingOnMatchingTargets(possible_targets):
-    """Returns the list of Targets in |possible_targets| that depend (either
-  directly on indirectly) on at least one of the targets containing the files
-  supplied as input to analyzer.
-  possible_targets: targets to search from."""
-    found = []
-    print("Targets that matched by dependency:")
-    for target in possible_targets:
-        if _DoesTargetDependOnMatchingTargets(target):
-            found.append(target)
-    return found
-
-
-def _AddCompileTargets(target, roots, add_if_no_ancestor, result):
-    """Recurses through all targets that depend on |target|, adding all targets
-  that need to be built (and are in |roots|) to |result|.
-  roots: set of root targets.
-  add_if_no_ancestor: If true and there are no ancestors of |target| then add
-  |target| to |result|. |target| must still be in |roots|.
-  result: targets that need to be built are added here."""
-    if target.visited:
-        return
-
-    target.visited = True
-    target.in_roots = target in roots
-
-    for back_dep_target in target.back_deps:
-        _AddCompileTargets(back_dep_target, roots, False, result)
-        target.added_to_compile_targets |= back_dep_target.added_to_compile_targets
-        target.in_roots |= back_dep_target.in_roots
-        target.is_or_has_linked_ancestor |= back_dep_target.is_or_has_linked_ancestor
-
-    # Always add 'executable' targets. Even though they may be built by other
-    # targets that depend upon them it makes detection of what is going to be
-    # built easier.
-    # And always add static_libraries that have no dependencies on them from
-    # linkables. This is necessary as the other dependencies on them may be
-    # static libraries themselves, which are not compile time dependencies.
-    if target.in_roots and (
-        target.is_executable
-        or (
-            not target.added_to_compile_targets
-            and (add_if_no_ancestor or target.requires_build)
-        )
-        or (
-            target.is_static_library
-            and add_if_no_ancestor
-            and not target.is_or_has_linked_ancestor
-        )
-    ):
-        print(
-            "\t\tadding to compile targets",
-            target.name,
-            "executable",
-            target.is_executable,
-            "added_to_compile_targets",
-            target.added_to_compile_targets,
-            "add_if_no_ancestor",
-            add_if_no_ancestor,
-            "requires_build",
-            target.requires_build,
-            "is_static_library",
-            target.is_static_library,
-            "is_or_has_linked_ancestor",
-            target.is_or_has_linked_ancestor,
-        )
-        result.add(target)
-        target.added_to_compile_targets = True
-
-
-def _GetCompileTargets(matching_targets, supplied_targets):
-    """Returns the set of Targets that require a build.
-  matching_targets: targets that changed and need to be built.
-  supplied_targets: set of targets supplied to analyzer to search from."""
-    result = set()
-    for target in matching_targets:
-        print("finding compile targets for match", target.name)
-        _AddCompileTargets(target, supplied_targets, True, result)
-    return result
-
-
-def _WriteOutput(params, **values):
-    """Writes the output, either to stdout or a file is specified."""
-    if "error" in values:
-        print("Error:", values["error"])
-    if "status" in values:
-        print(values["status"])
-    if "targets" in values:
-        values["targets"].sort()
-        print("Supplied targets that depend on changed files:")
-        for target in values["targets"]:
-            print("\t", target)
-    if "invalid_targets" in values:
-        values["invalid_targets"].sort()
-        print("The following targets were not found:")
-        for target in values["invalid_targets"]:
-            print("\t", target)
-    if "build_targets" in values:
-        values["build_targets"].sort()
-        print("Targets that require a build:")
-        for target in values["build_targets"]:
-            print("\t", target)
-    if "compile_targets" in values:
-        values["compile_targets"].sort()
-        print("Targets that need to be built:")
-        for target in values["compile_targets"]:
-            print("\t", target)
-    if "test_targets" in values:
-        values["test_targets"].sort()
-        print("Test targets:")
-        for target in values["test_targets"]:
-            print("\t", target)
-
-    output_path = params.get("generator_flags", {}).get("analyzer_output_path", None)
-    if not output_path:
-        print(json.dumps(values))
-        return
-    try:
-        f = open(output_path, "w")
-        f.write(json.dumps(values) + "\n")
-        f.close()
-    except OSError as e:
-        print("Error writing to output file", output_path, str(e))
-
-
-def _WasGypIncludeFileModified(params, files):
-    """Returns true if one of the files in |files| is in the set of included
-  files."""
-    if params["options"].includes:
-        for include in params["options"].includes:
-            if _ToGypPath(os.path.normpath(include)) in files:
-                print("Include file modified, assuming all changed", include)
-                return True
-    return False
-
-
-def _NamesNotIn(names, mapping):
-    """Returns a list of the values in |names| that are not in |mapping|."""
-    return [name for name in names if name not in mapping]
-
-
-def _LookupTargets(names, mapping):
-    """Returns a list of the mapping[name] for each value in |names| that is in
-  |mapping|."""
-    return [mapping[name] for name in names if name in mapping]
-
-
-def CalculateVariables(default_variables, params):
-    """Calculate additional variables for use in the build (called by gyp)."""
-    flavor = gyp.common.GetFlavor(params)
-    if flavor == "mac":
-        default_variables.setdefault("OS", "mac")
-    elif flavor == "win":
-        default_variables.setdefault("OS", "win")
-        gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
-    else:
-        operating_system = flavor
-        if flavor == "android":
-            operating_system = "linux"  # Keep this legacy behavior for now.
-        default_variables.setdefault("OS", operating_system)
-
-
-class TargetCalculator:
-    """Calculates the matching test_targets and matching compile_targets."""
-
-    def __init__(
-        self,
-        files,
-        additional_compile_target_names,
-        test_target_names,
-        data,
-        target_list,
-        target_dicts,
-        toplevel_dir,
-        build_files,
-    ):
-        self._additional_compile_target_names = set(additional_compile_target_names)
-        self._test_target_names = set(test_target_names)
-        (
-            self._name_to_target,
-            self._changed_targets,
-            self._root_targets,
-        ) = _GenerateTargets(
-            data, target_list, target_dicts, toplevel_dir, frozenset(files), build_files
-        )
-        (
-            self._unqualified_mapping,
-            self.invalid_targets,
-        ) = _GetUnqualifiedToTargetMapping(
-            self._name_to_target, self._supplied_target_names_no_all()
-        )
-
-    def _supplied_target_names(self):
-        return self._additional_compile_target_names | self._test_target_names
-
-    def _supplied_target_names_no_all(self):
-        """Returns the supplied test targets without 'all'."""
-        result = self._supplied_target_names()
-        result.discard("all")
-        return result
-
-    def is_build_impacted(self):
-        """Returns true if the supplied files impact the build at all."""
-        return self._changed_targets
-
-    def find_matching_test_target_names(self):
-        """Returns the set of output test targets."""
-        assert self.is_build_impacted()
-        # Find the test targets first. 'all' is special cased to mean all the
-        # root targets. To deal with all the supplied |test_targets| are expanded
-        # to include the root targets during lookup. If any of the root targets
-        # match, we remove it and replace it with 'all'.
-        test_target_names_no_all = set(self._test_target_names)
-        test_target_names_no_all.discard("all")
-        test_targets_no_all = _LookupTargets(
-            test_target_names_no_all, self._unqualified_mapping
-        )
-        test_target_names_contains_all = "all" in self._test_target_names
-        if test_target_names_contains_all:
-            test_targets = list(set(test_targets_no_all) | set(self._root_targets))
-        else:
-            test_targets = list(test_targets_no_all)
-        print("supplied test_targets")
-        for target_name in self._test_target_names:
-            print("\t", target_name)
-        print("found test_targets")
-        for target in test_targets:
-            print("\t", target.name)
-        print("searching for matching test targets")
-        matching_test_targets = _GetTargetsDependingOnMatchingTargets(test_targets)
-        matching_test_targets_contains_all = test_target_names_contains_all and set(
-            matching_test_targets
-        ) & set(self._root_targets)
-        if matching_test_targets_contains_all:
-            # Remove any of the targets for all that were not explicitly supplied,
-            # 'all' is subsequentely added to the matching names below.
-            matching_test_targets = list(
-                set(matching_test_targets) & set(test_targets_no_all)
-            )
-        print("matched test_targets")
-        for target in matching_test_targets:
-            print("\t", target.name)
-        matching_target_names = [
-            gyp.common.ParseQualifiedTarget(target.name)[1]
-            for target in matching_test_targets
-        ]
-        if matching_test_targets_contains_all:
-            matching_target_names.append("all")
-            print("\tall")
-        return matching_target_names
-
-    def find_matching_compile_target_names(self):
-        """Returns the set of output compile targets."""
-        assert self.is_build_impacted()
-        # Compile targets are found by searching up from changed targets.
-        # Reset the visited status for _GetBuildTargets.
-        for target in self._name_to_target.values():
-            target.visited = False
-
-        supplied_targets = _LookupTargets(
-            self._supplied_target_names_no_all(), self._unqualified_mapping
-        )
-        if "all" in self._supplied_target_names():
-            supplied_targets = list(set(supplied_targets) | set(self._root_targets))
-        print("Supplied test_targets & compile_targets")
-        for target in supplied_targets:
-            print("\t", target.name)
-        print("Finding compile targets")
-        compile_targets = _GetCompileTargets(self._changed_targets, supplied_targets)
-        return [
-            gyp.common.ParseQualifiedTarget(target.name)[1]
-            for target in compile_targets
-        ]
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
-    """Called by gyp as the final stage. Outputs results."""
-    config = Config()
-    try:
-        config.Init(params)
-
-        if not config.files:
-            raise Exception(
-                "Must specify files to analyze via config_path generator " "flag"
-            )
-
-        toplevel_dir = _ToGypPath(os.path.abspath(params["options"].toplevel_dir))
-        if debug:
-            print("toplevel_dir", toplevel_dir)
-
-        if _WasGypIncludeFileModified(params, config.files):
-            result_dict = {
-                "status": all_changed_string,
-                "test_targets": list(config.test_target_names),
-                "compile_targets": list(
-                    config.additional_compile_target_names | config.test_target_names
-                ),
-            }
-            _WriteOutput(params, **result_dict)
-            return
-
-        calculator = TargetCalculator(
-            config.files,
-            config.additional_compile_target_names,
-            config.test_target_names,
-            data,
-            target_list,
-            target_dicts,
-            toplevel_dir,
-            params["build_files"],
-        )
-        if not calculator.is_build_impacted():
-            result_dict = {
-                "status": no_dependency_string,
-                "test_targets": [],
-                "compile_targets": [],
-            }
-            if calculator.invalid_targets:
-                result_dict["invalid_targets"] = calculator.invalid_targets
-            _WriteOutput(params, **result_dict)
-            return
-
-        test_target_names = calculator.find_matching_test_target_names()
-        compile_target_names = calculator.find_matching_compile_target_names()
-        found_at_least_one_target = compile_target_names or test_target_names
-        result_dict = {
-            "test_targets": test_target_names,
-            "status": found_dependency_string
-            if found_at_least_one_target
-            else no_dependency_string,
-            "compile_targets": list(set(compile_target_names) | set(test_target_names)),
-        }
-        if calculator.invalid_targets:
-            result_dict["invalid_targets"] = calculator.invalid_targets
-        _WriteOutput(params, **result_dict)
-
-    except Exception as e:
-        _WriteOutput(params, error=str(e))
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
deleted file mode 100644
index d3c97c6..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
+++ /dev/null
@@ -1,1173 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# Notes:
-#
-# This generates makefiles suitable for inclusion into the Android build system
-# via an Android.mk file. It is based on make.py, the standard makefile
-# generator.
-#
-# The code below generates a separate .mk file for each target, but
-# all are sourced by the top-level GypAndroid.mk.  This means that all
-# variables in .mk-files clobber one another, and furthermore that any
-# variables set potentially clash with other Android build system variables.
-# Try to avoid setting global variables where possible.
-
-
-import gyp
-import gyp.common
-import gyp.generator.make as make  # Reuse global functions from make backend.
-import os
-import re
-import subprocess
-
-generator_default_variables = {
-    "OS": "android",
-    "EXECUTABLE_PREFIX": "",
-    "EXECUTABLE_SUFFIX": "",
-    "STATIC_LIB_PREFIX": "lib",
-    "SHARED_LIB_PREFIX": "lib",
-    "STATIC_LIB_SUFFIX": ".a",
-    "SHARED_LIB_SUFFIX": ".so",
-    "INTERMEDIATE_DIR": "$(gyp_intermediate_dir)",
-    "SHARED_INTERMEDIATE_DIR": "$(gyp_shared_intermediate_dir)",
-    "PRODUCT_DIR": "$(gyp_shared_intermediate_dir)",
-    "SHARED_LIB_DIR": "$(builddir)/lib.$(TOOLSET)",
-    "LIB_DIR": "$(obj).$(TOOLSET)",
-    "RULE_INPUT_ROOT": "%(INPUT_ROOT)s",  # This gets expanded by Python.
-    "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s",  # This gets expanded by Python.
-    "RULE_INPUT_PATH": "$(RULE_SOURCES)",
-    "RULE_INPUT_EXT": "$(suffix $<)",
-    "RULE_INPUT_NAME": "$(notdir $<)",
-    "CONFIGURATION_NAME": "$(GYP_CONFIGURATION)",
-}
-
-# Make supports multiple toolsets
-generator_supports_multiple_toolsets = True
-
-
-# Generator-specific gyp specs.
-generator_additional_non_configuration_keys = [
-    # Boolean to declare that this target does not want its name mangled.
-    "android_unmangled_name",
-    # Map of android build system variables to set.
-    "aosp_build_settings",
-]
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-
-
-ALL_MODULES_FOOTER = """\
-# "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from
-# all the included sub-makefiles. This is just here to clarify.
-gyp_all_modules:
-"""
-
-header = """\
-# This file is generated by gyp; do not edit.
-
-"""
-
-# Map gyp target types to Android module classes.
-MODULE_CLASSES = {
-    "static_library": "STATIC_LIBRARIES",
-    "shared_library": "SHARED_LIBRARIES",
-    "executable": "EXECUTABLES",
-}
-
-
-def IsCPPExtension(ext):
-    return make.COMPILABLE_EXTENSIONS.get(ext) == "cxx"
-
-
-def Sourceify(path):
-    """Convert a path to its source directory form. The Android backend does not
-    support options.generator_output, so this function is a noop."""
-    return path
-
-
-# Map from qualified target to path to output.
-# For Android, the target of these maps is a tuple ('static', 'modulename'),
-# ('dynamic', 'modulename'), or ('path', 'some/path') instead of a string,
-# since we link by module.
-target_outputs = {}
-# Map from qualified target to any linkable output.  A subset
-# of target_outputs.  E.g. when mybinary depends on liba, we want to
-# include liba in the linker line; when otherbinary depends on
-# mybinary, we just want to build mybinary first.
-target_link_deps = {}
-
-
-class AndroidMkWriter:
-    """AndroidMkWriter packages up the writing of one target-specific Android.mk.
-
-    Its only real entry point is Write(), and is mostly used for namespacing.
-    """
-
-    def __init__(self, android_top_dir):
-        self.android_top_dir = android_top_dir
-
-    def Write(
-        self,
-        qualified_target,
-        relative_target,
-        base_path,
-        output_filename,
-        spec,
-        configs,
-        part_of_all,
-        write_alias_target,
-        sdk_version,
-    ):
-        """The main entry point: writes a .mk file for a single target.
-
-        Arguments:
-          qualified_target: target we're generating
-          relative_target: qualified target name relative to the root
-          base_path: path relative to source root we're building in, used to resolve
-                     target-relative paths
-          output_filename: output .mk file name to write
-          spec, configs: gyp info
-          part_of_all: flag indicating this target is part of 'all'
-          write_alias_target: flag indicating whether to create short aliases for
-                              this target
-          sdk_version: what to emit for LOCAL_SDK_VERSION in output
-        """
-        gyp.common.EnsureDirExists(output_filename)
-
-        self.fp = open(output_filename, "w")
-
-        self.fp.write(header)
-
-        self.qualified_target = qualified_target
-        self.relative_target = relative_target
-        self.path = base_path
-        self.target = spec["target_name"]
-        self.type = spec["type"]
-        self.toolset = spec["toolset"]
-
-        deps, link_deps = self.ComputeDeps(spec)
-
-        # Some of the generation below can add extra output, sources, or
-        # link dependencies.  All of the out params of the functions that
-        # follow use names like extra_foo.
-        extra_outputs = []
-        extra_sources = []
-
-        self.android_class = MODULE_CLASSES.get(self.type, "GYP")
-        self.android_module = self.ComputeAndroidModule(spec)
-        (self.android_stem, self.android_suffix) = self.ComputeOutputParts(spec)
-        self.output = self.output_binary = self.ComputeOutput(spec)
-
-        # Standard header.
-        self.WriteLn("include $(CLEAR_VARS)\n")
-
-        # Module class and name.
-        self.WriteLn("LOCAL_MODULE_CLASS := " + self.android_class)
-        self.WriteLn("LOCAL_MODULE := " + self.android_module)
-        # Only emit LOCAL_MODULE_STEM if it's different to LOCAL_MODULE.
-        # The library module classes fail if the stem is set. ComputeOutputParts
-        # makes sure that stem == modulename in these cases.
-        if self.android_stem != self.android_module:
-            self.WriteLn("LOCAL_MODULE_STEM := " + self.android_stem)
-        self.WriteLn("LOCAL_MODULE_SUFFIX := " + self.android_suffix)
-        if self.toolset == "host":
-            self.WriteLn("LOCAL_IS_HOST_MODULE := true")
-            self.WriteLn("LOCAL_MULTILIB := $(GYP_HOST_MULTILIB)")
-        elif sdk_version > 0:
-            self.WriteLn(
-                "LOCAL_MODULE_TARGET_ARCH := " "$(TARGET_$(GYP_VAR_PREFIX)ARCH)"
-            )
-            self.WriteLn("LOCAL_SDK_VERSION := %s" % sdk_version)
-
-        # Grab output directories; needed for Actions and Rules.
-        if self.toolset == "host":
-            self.WriteLn(
-                "gyp_intermediate_dir := "
-                "$(call local-intermediates-dir,,$(GYP_HOST_VAR_PREFIX))"
-            )
-        else:
-            self.WriteLn(
-                "gyp_intermediate_dir := "
-                "$(call local-intermediates-dir,,$(GYP_VAR_PREFIX))"
-            )
-        self.WriteLn(
-            "gyp_shared_intermediate_dir := "
-            "$(call intermediates-dir-for,GYP,shared,,,$(GYP_VAR_PREFIX))"
-        )
-        self.WriteLn()
-
-        # List files this target depends on so that actions/rules/copies/sources
-        # can depend on the list.
-        # TODO: doesn't pull in things through transitive link deps; needed?
-        target_dependencies = [x[1] for x in deps if x[0] == "path"]
-        self.WriteLn("# Make sure our deps are built first.")
-        self.WriteList(
-            target_dependencies, "GYP_TARGET_DEPENDENCIES", local_pathify=True
-        )
-
-        # Actions must come first, since they can generate more OBJs for use below.
-        if "actions" in spec:
-            self.WriteActions(spec["actions"], extra_sources, extra_outputs)
-
-        # Rules must be early like actions.
-        if "rules" in spec:
-            self.WriteRules(spec["rules"], extra_sources, extra_outputs)
-
-        if "copies" in spec:
-            self.WriteCopies(spec["copies"], extra_outputs)
-
-        # GYP generated outputs.
-        self.WriteList(extra_outputs, "GYP_GENERATED_OUTPUTS", local_pathify=True)
-
-        # Set LOCAL_ADDITIONAL_DEPENDENCIES so that Android's build rules depend
-        # on both our dependency targets and our generated files.
-        self.WriteLn("# Make sure our deps and generated files are built first.")
-        self.WriteLn(
-            "LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) "
-            "$(GYP_GENERATED_OUTPUTS)"
-        )
-        self.WriteLn()
-
-        # Sources.
-        if spec.get("sources", []) or extra_sources:
-            self.WriteSources(spec, configs, extra_sources)
-
-        self.WriteTarget(
-            spec, configs, deps, link_deps, part_of_all, write_alias_target
-        )
-
-        # Update global list of target outputs, used in dependency tracking.
-        target_outputs[qualified_target] = ("path", self.output_binary)
-
-        # Update global list of link dependencies.
-        if self.type == "static_library":
-            target_link_deps[qualified_target] = ("static", self.android_module)
-        elif self.type == "shared_library":
-            target_link_deps[qualified_target] = ("shared", self.android_module)
-
-        self.fp.close()
-        return self.android_module
-
-    def WriteActions(self, actions, extra_sources, extra_outputs):
-        """Write Makefile code for any 'actions' from the gyp input.
-
-        extra_sources: a list that will be filled in with newly generated source
-                       files, if any
-        extra_outputs: a list that will be filled in with any outputs of these
-                       actions (used to make other pieces dependent on these
-                       actions)
-        """
-        for action in actions:
-            name = make.StringToMakefileVariable(
-                "{}_{}".format(self.relative_target, action["action_name"])
-            )
-            self.WriteLn('### Rules for action "%s":' % action["action_name"])
-            inputs = action["inputs"]
-            outputs = action["outputs"]
-
-            # Build up a list of outputs.
-            # Collect the output dirs we'll need.
-            dirs = set()
-            for out in outputs:
-                if not out.startswith("$"):
-                    print(
-                        'WARNING: Action for target "%s" writes output to local path '
-                        '"%s".' % (self.target, out)
-                    )
-                dir = os.path.split(out)[0]
-                if dir:
-                    dirs.add(dir)
-            if int(action.get("process_outputs_as_sources", False)):
-                extra_sources += outputs
-
-            # Prepare the actual command.
-            command = gyp.common.EncodePOSIXShellList(action["action"])
-            if "message" in action:
-                quiet_cmd = "Gyp action: %s ($@)" % action["message"]
-            else:
-                quiet_cmd = "Gyp action: %s ($@)" % name
-            if len(dirs) > 0:
-                command = "mkdir -p %s" % " ".join(dirs) + "; " + command
-
-            cd_action = "cd $(gyp_local_path)/%s; " % self.path
-            command = cd_action + command
-
-            # The makefile rules are all relative to the top dir, but the gyp actions
-            # are defined relative to their containing dir.  This replaces the gyp_*
-            # variables for the action rule with an absolute version so that the
-            # output goes in the right place.
-            # Only write the gyp_* rules for the "primary" output (:1);
-            # it's superfluous for the "extra outputs", and this avoids accidentally
-            # writing duplicate dummy rules for those outputs.
-            main_output = make.QuoteSpaces(self.LocalPathify(outputs[0]))
-            self.WriteLn("%s: gyp_local_path := $(LOCAL_PATH)" % main_output)
-            self.WriteLn("%s: gyp_var_prefix := $(GYP_VAR_PREFIX)" % main_output)
-            self.WriteLn(
-                "%s: gyp_intermediate_dir := "
-                "$(abspath $(gyp_intermediate_dir))" % main_output
-            )
-            self.WriteLn(
-                "%s: gyp_shared_intermediate_dir := "
-                "$(abspath $(gyp_shared_intermediate_dir))" % main_output
-            )
-
-            # Android's envsetup.sh adds a number of directories to the path including
-            # the built host binary directory. This causes actions/rules invoked by
-            # gyp to sometimes use these instead of system versions, e.g. bison.
-            # The built host binaries may not be suitable, and can cause errors.
-            # So, we remove them from the PATH using the ANDROID_BUILD_PATHS variable
-            # set by envsetup.
-            self.WriteLn(
-                "%s: export PATH := $(subst $(ANDROID_BUILD_PATHS),,$(PATH))"
-                % main_output
-            )
-
-            # Don't allow spaces in input/output filenames, but make an exception for
-            # filenames which start with '$(' since it's okay for there to be spaces
-            # inside of make function/macro invocations.
-            for input in inputs:
-                if not input.startswith("$(") and " " in input:
-                    raise gyp.common.GypError(
-                        'Action input filename "%s" in target %s contains a space'
-                        % (input, self.target)
-                    )
-            for output in outputs:
-                if not output.startswith("$(") and " " in output:
-                    raise gyp.common.GypError(
-                        'Action output filename "%s" in target %s contains a space'
-                        % (output, self.target)
-                    )
-
-            self.WriteLn(
-                "%s: %s $(GYP_TARGET_DEPENDENCIES)"
-                % (main_output, " ".join(map(self.LocalPathify, inputs)))
-            )
-            self.WriteLn('\t@echo "%s"' % quiet_cmd)
-            self.WriteLn("\t$(hide)%s\n" % command)
-            for output in outputs[1:]:
-                # Make each output depend on the main output, with an empty command
-                # to force make to notice that the mtime has changed.
-                self.WriteLn(f"{self.LocalPathify(output)}: {main_output} ;")
-
-            extra_outputs += outputs
-            self.WriteLn()
-
-        self.WriteLn()
-
-    def WriteRules(self, rules, extra_sources, extra_outputs):
-        """Write Makefile code for any 'rules' from the gyp input.
-
-        extra_sources: a list that will be filled in with newly generated source
-                       files, if any
-        extra_outputs: a list that will be filled in with any outputs of these
-                       rules (used to make other pieces dependent on these rules)
-        """
-        if len(rules) == 0:
-            return
-
-        for rule in rules:
-            if len(rule.get("rule_sources", [])) == 0:
-                continue
-            name = make.StringToMakefileVariable(
-                "{}_{}".format(self.relative_target, rule["rule_name"])
-            )
-            self.WriteLn('\n### Generated for rule "%s":' % name)
-            self.WriteLn('# "%s":' % rule)
-
-            inputs = rule.get("inputs")
-            for rule_source in rule.get("rule_sources", []):
-                (rule_source_dirname, rule_source_basename) = os.path.split(rule_source)
-                (rule_source_root, rule_source_ext) = os.path.splitext(
-                    rule_source_basename
-                )
-
-                outputs = [
-                    self.ExpandInputRoot(out, rule_source_root, rule_source_dirname)
-                    for out in rule["outputs"]
-                ]
-
-                dirs = set()
-                for out in outputs:
-                    if not out.startswith("$"):
-                        print(
-                            "WARNING: Rule for target %s writes output to local path %s"
-                            % (self.target, out)
-                        )
-                    dir = os.path.dirname(out)
-                    if dir:
-                        dirs.add(dir)
-                extra_outputs += outputs
-                if int(rule.get("process_outputs_as_sources", False)):
-                    extra_sources.extend(outputs)
-
-                components = []
-                for component in rule["action"]:
-                    component = self.ExpandInputRoot(
-                        component, rule_source_root, rule_source_dirname
-                    )
-                    if "$(RULE_SOURCES)" in component:
-                        component = component.replace("$(RULE_SOURCES)", rule_source)
-                    components.append(component)
-
-                command = gyp.common.EncodePOSIXShellList(components)
-                cd_action = "cd $(gyp_local_path)/%s; " % self.path
-                command = cd_action + command
-                if dirs:
-                    command = "mkdir -p %s" % " ".join(dirs) + "; " + command
-
-                # We set up a rule to build the first output, and then set up
-                # a rule for each additional output to depend on the first.
-                outputs = map(self.LocalPathify, outputs)
-                main_output = outputs[0]
-                self.WriteLn("%s: gyp_local_path := $(LOCAL_PATH)" % main_output)
-                self.WriteLn("%s: gyp_var_prefix := $(GYP_VAR_PREFIX)" % main_output)
-                self.WriteLn(
-                    "%s: gyp_intermediate_dir := "
-                    "$(abspath $(gyp_intermediate_dir))" % main_output
-                )
-                self.WriteLn(
-                    "%s: gyp_shared_intermediate_dir := "
-                    "$(abspath $(gyp_shared_intermediate_dir))" % main_output
-                )
-
-                # See explanation in WriteActions.
-                self.WriteLn(
-                    "%s: export PATH := "
-                    "$(subst $(ANDROID_BUILD_PATHS),,$(PATH))" % main_output
-                )
-
-                main_output_deps = self.LocalPathify(rule_source)
-                if inputs:
-                    main_output_deps += " "
-                    main_output_deps += " ".join([self.LocalPathify(f) for f in inputs])
-
-                self.WriteLn(
-                    "%s: %s $(GYP_TARGET_DEPENDENCIES)"
-                    % (main_output, main_output_deps)
-                )
-                self.WriteLn("\t%s\n" % command)
-                for output in outputs[1:]:
-                    # Make each output depend on the main output, with an empty command
-                    # to force make to notice that the mtime has changed.
-                    self.WriteLn(f"{output}: {main_output} ;")
-                self.WriteLn()
-
-        self.WriteLn()
-
-    def WriteCopies(self, copies, extra_outputs):
-        """Write Makefile code for any 'copies' from the gyp input.
-
-        extra_outputs: a list that will be filled in with any outputs of this action
-                       (used to make other pieces dependent on this action)
-        """
-        self.WriteLn("### Generated for copy rule.")
-
-        variable = make.StringToMakefileVariable(self.relative_target + "_copies")
-        outputs = []
-        for copy in copies:
-            for path in copy["files"]:
-                # The Android build system does not allow generation of files into the
-                # source tree. The destination should start with a variable, which will
-                # typically be $(gyp_intermediate_dir) or
-                # $(gyp_shared_intermediate_dir). Note that we can't use an assertion
-                # because some of the gyp tests depend on this.
-                if not copy["destination"].startswith("$"):
-                    print(
-                        "WARNING: Copy rule for target %s writes output to "
-                        "local path %s" % (self.target, copy["destination"])
-                    )
-
-                # LocalPathify() calls normpath, stripping trailing slashes.
-                path = Sourceify(self.LocalPathify(path))
-                filename = os.path.split(path)[1]
-                output = Sourceify(
-                    self.LocalPathify(os.path.join(copy["destination"], filename))
-                )
-
-                self.WriteLn(f"{output}: {path} $(GYP_TARGET_DEPENDENCIES) | $(ACP)")
-                self.WriteLn("\t@echo Copying: $@")
-                self.WriteLn("\t$(hide) mkdir -p $(dir $@)")
-                self.WriteLn("\t$(hide) $(ACP) -rpf $< $@")
-                self.WriteLn()
-                outputs.append(output)
-        self.WriteLn(
-            "{} = {}".format(variable, " ".join(map(make.QuoteSpaces, outputs)))
-        )
-        extra_outputs.append("$(%s)" % variable)
-        self.WriteLn()
-
-    def WriteSourceFlags(self, spec, configs):
-        """Write out the flags and include paths used to compile source files for
-        the current target.
-
-        Args:
-          spec, configs: input from gyp.
-        """
-        for configname, config in sorted(configs.items()):
-            extracted_includes = []
-
-            self.WriteLn("\n# Flags passed to both C and C++ files.")
-            cflags, includes_from_cflags = self.ExtractIncludesFromCFlags(
-                config.get("cflags", []) + config.get("cflags_c", [])
-            )
-            extracted_includes.extend(includes_from_cflags)
-            self.WriteList(cflags, "MY_CFLAGS_%s" % configname)
-
-            self.WriteList(
-                config.get("defines"),
-                "MY_DEFS_%s" % configname,
-                prefix="-D",
-                quoter=make.EscapeCppDefine,
-            )
-
-            self.WriteLn("\n# Include paths placed before CFLAGS/CPPFLAGS")
-            includes = list(config.get("include_dirs", []))
-            includes.extend(extracted_includes)
-            includes = map(Sourceify, map(self.LocalPathify, includes))
-            includes = self.NormalizeIncludePaths(includes)
-            self.WriteList(includes, "LOCAL_C_INCLUDES_%s" % configname)
-
-            self.WriteLn("\n# Flags passed to only C++ (and not C) files.")
-            self.WriteList(config.get("cflags_cc"), "LOCAL_CPPFLAGS_%s" % configname)
-
-        self.WriteLn(
-            "\nLOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) "
-            "$(MY_DEFS_$(GYP_CONFIGURATION))"
-        )
-        # Undefine ANDROID for host modules
-        # TODO: the source code should not use macro ANDROID to tell if it's host
-        # or target module.
-        if self.toolset == "host":
-            self.WriteLn("# Undefine ANDROID for host modules")
-            self.WriteLn("LOCAL_CFLAGS += -UANDROID")
-        self.WriteLn(
-            "LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) "
-            "$(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))"
-        )
-        self.WriteLn("LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))")
-        # Android uses separate flags for assembly file invocations, but gyp expects
-        # the same CFLAGS to be applied:
-        self.WriteLn("LOCAL_ASFLAGS := $(LOCAL_CFLAGS)")
-
-    def WriteSources(self, spec, configs, extra_sources):
-        """Write Makefile code for any 'sources' from the gyp input.
-        These are source files necessary to build the current target.
-        We need to handle shared_intermediate directory source files as
-        a special case by copying them to the intermediate directory and
-        treating them as a generated sources. Otherwise the Android build
-        rules won't pick them up.
-
-        Args:
-          spec, configs: input from gyp.
-          extra_sources: Sources generated from Actions or Rules.
-        """
-        sources = filter(make.Compilable, spec.get("sources", []))
-        generated_not_sources = [x for x in extra_sources if not make.Compilable(x)]
-        extra_sources = filter(make.Compilable, extra_sources)
-
-        # Determine and output the C++ extension used by these sources.
-        # We simply find the first C++ file and use that extension.
-        all_sources = sources + extra_sources
-        local_cpp_extension = ".cpp"
-        for source in all_sources:
-            (root, ext) = os.path.splitext(source)
-            if IsCPPExtension(ext):
-                local_cpp_extension = ext
-                break
-        if local_cpp_extension != ".cpp":
-            self.WriteLn("LOCAL_CPP_EXTENSION := %s" % local_cpp_extension)
-
-        # We need to move any non-generated sources that are coming from the
-        # shared intermediate directory out of LOCAL_SRC_FILES and put them
-        # into LOCAL_GENERATED_SOURCES. We also need to move over any C++ files
-        # that don't match our local_cpp_extension, since Android will only
-        # generate Makefile rules for a single LOCAL_CPP_EXTENSION.
-        local_files = []
-        for source in sources:
-            (root, ext) = os.path.splitext(source)
-            if "$(gyp_shared_intermediate_dir)" in source:
-                extra_sources.append(source)
-            elif "$(gyp_intermediate_dir)" in source:
-                extra_sources.append(source)
-            elif IsCPPExtension(ext) and ext != local_cpp_extension:
-                extra_sources.append(source)
-            else:
-                local_files.append(os.path.normpath(os.path.join(self.path, source)))
-
-        # For any generated source, if it is coming from the shared intermediate
-        # directory then we add a Make rule to copy them to the local intermediate
-        # directory first. This is because the Android LOCAL_GENERATED_SOURCES
-        # must be in the local module intermediate directory for the compile rules
-        # to work properly. If the file has the wrong C++ extension, then we add
-        # a rule to copy that to intermediates and use the new version.
-        final_generated_sources = []
-        # If a source file gets copied, we still need to add the original source
-        # directory as header search path, for GCC searches headers in the
-        # directory that contains the source file by default.
-        origin_src_dirs = []
-        for source in extra_sources:
-            local_file = source
-            if "$(gyp_intermediate_dir)/" not in local_file:
-                basename = os.path.basename(local_file)
-                local_file = "$(gyp_intermediate_dir)/" + basename
-            (root, ext) = os.path.splitext(local_file)
-            if IsCPPExtension(ext) and ext != local_cpp_extension:
-                local_file = root + local_cpp_extension
-            if local_file != source:
-                self.WriteLn(f"{local_file}: {self.LocalPathify(source)}")
-                self.WriteLn("\tmkdir -p $(@D); cp $< $@")
-                origin_src_dirs.append(os.path.dirname(source))
-            final_generated_sources.append(local_file)
-
-        # We add back in all of the non-compilable stuff to make sure that the
-        # make rules have dependencies on them.
-        final_generated_sources.extend(generated_not_sources)
-        self.WriteList(final_generated_sources, "LOCAL_GENERATED_SOURCES")
-
-        origin_src_dirs = gyp.common.uniquer(origin_src_dirs)
-        origin_src_dirs = map(Sourceify, map(self.LocalPathify, origin_src_dirs))
-        self.WriteList(origin_src_dirs, "GYP_COPIED_SOURCE_ORIGIN_DIRS")
-
-        self.WriteList(local_files, "LOCAL_SRC_FILES")
-
-        # Write out the flags used to compile the source; this must be done last
-        # so that GYP_COPIED_SOURCE_ORIGIN_DIRS can be used as an include path.
-        self.WriteSourceFlags(spec, configs)
-
-    def ComputeAndroidModule(self, spec):
-        """Return the Android module name used for a gyp spec.
-
-        We use the complete qualified target name to avoid collisions between
-        duplicate targets in different directories. We also add a suffix to
-        distinguish gyp-generated module names.
-        """
-
-        if int(spec.get("android_unmangled_name", 0)):
-            assert self.type != "shared_library" or self.target.startswith("lib")
-            return self.target
-
-        if self.type == "shared_library":
-            # For reasons of convention, the Android build system requires that all
-            # shared library modules are named 'libfoo' when generating -l flags.
-            prefix = "lib_"
-        else:
-            prefix = ""
-
-        if spec["toolset"] == "host":
-            suffix = "_$(TARGET_$(GYP_VAR_PREFIX)ARCH)_host_gyp"
-        else:
-            suffix = "_gyp"
-
-        if self.path:
-            middle = make.StringToMakefileVariable(f"{self.path}_{self.target}")
-        else:
-            middle = make.StringToMakefileVariable(self.target)
-
-        return "".join([prefix, middle, suffix])
-
-    def ComputeOutputParts(self, spec):
-        """Return the 'output basename' of a gyp spec, split into filename + ext.
-
-        Android libraries must be named the same thing as their module name,
-        otherwise the linker can't find them, so product_name and so on must be
-        ignored if we are building a library, and the "lib" prepending is
-        not done for Android.
-        """
-        assert self.type != "loadable_module"  # TODO: not supported?
-
-        target = spec["target_name"]
-        target_prefix = ""
-        target_ext = ""
-        if self.type == "static_library":
-            target = self.ComputeAndroidModule(spec)
-            target_ext = ".a"
-        elif self.type == "shared_library":
-            target = self.ComputeAndroidModule(spec)
-            target_ext = ".so"
-        elif self.type == "none":
-            target_ext = ".stamp"
-        elif self.type != "executable":
-            print(
-                "ERROR: What output file should be generated?",
-                "type",
-                self.type,
-                "target",
-                target,
-            )
-
-        if self.type not in {"static_library", "shared_library"}:
-            target_prefix = spec.get("product_prefix", target_prefix)
-            target = spec.get("product_name", target)
-            product_ext = spec.get("product_extension")
-            if product_ext:
-                target_ext = "." + product_ext
-
-        target_stem = target_prefix + target
-        return (target_stem, target_ext)
-
-    def ComputeOutputBasename(self, spec):
-        """Return the 'output basename' of a gyp spec.
-
-        E.g., the loadable module 'foobar' in directory 'baz' will produce
-          'libfoobar.so'
-        """
-        return "".join(self.ComputeOutputParts(spec))
-
-    def ComputeOutput(self, spec):
-        """Return the 'output' (full output path) of a gyp spec.
-
-        E.g., the loadable module 'foobar' in directory 'baz' will produce
-          '$(obj)/baz/libfoobar.so'
-        """
-        if self.type == "executable":
-            # We install host executables into shared_intermediate_dir so they can be
-            # run by gyp rules that refer to PRODUCT_DIR.
-            path = "$(gyp_shared_intermediate_dir)"
-        elif self.type == "shared_library":
-            if self.toolset == "host":
-                path = "$($(GYP_HOST_VAR_PREFIX)HOST_OUT_INTERMEDIATE_LIBRARIES)"
-            else:
-                path = "$($(GYP_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)"
-        else:
-            # Other targets just get built into their intermediate dir.
-            if self.toolset == "host":
-                path = (
-                    "$(call intermediates-dir-for,%s,%s,true,,"
-                    "$(GYP_HOST_VAR_PREFIX))"
-                    % (self.android_class, self.android_module)
-                )
-            else:
-                path = "$(call intermediates-dir-for,{},{},,,$(GYP_VAR_PREFIX))".format(
-                    self.android_class,
-                    self.android_module,
-                )
-
-        assert spec.get("product_dir") is None  # TODO: not supported?
-        return os.path.join(path, self.ComputeOutputBasename(spec))
-
-    def NormalizeIncludePaths(self, include_paths):
-        """Normalize include_paths.
-        Convert absolute paths to relative to the Android top directory.
-
-        Args:
-          include_paths: A list of unprocessed include paths.
-        Returns:
-          A list of normalized include paths.
-        """
-        normalized = []
-        for path in include_paths:
-            if path[0] == "/":
-                path = gyp.common.RelativePath(path, self.android_top_dir)
-            normalized.append(path)
-        return normalized
-
-    def ExtractIncludesFromCFlags(self, cflags):
-        """Extract includes "-I..." out from cflags
-
-        Args:
-          cflags: A list of compiler flags, which may be mixed with "-I.."
-        Returns:
-          A tuple of lists: (clean_clfags, include_paths). "-I.." is trimmed.
-        """
-        clean_cflags = []
-        include_paths = []
-        for flag in cflags:
-            if flag.startswith("-I"):
-                include_paths.append(flag[2:])
-            else:
-                clean_cflags.append(flag)
-
-        return (clean_cflags, include_paths)
-
-    def FilterLibraries(self, libraries):
-        """Filter the 'libraries' key to separate things that shouldn't be ldflags.
-
-        Library entries that look like filenames should be converted to android
-        module names instead of being passed to the linker as flags.
-
-        Args:
-          libraries: the value of spec.get('libraries')
-        Returns:
-          A tuple (static_lib_modules, dynamic_lib_modules, ldflags)
-        """
-        static_lib_modules = []
-        dynamic_lib_modules = []
-        ldflags = []
-        for libs in libraries:
-            # Libs can have multiple words.
-            for lib in libs.split():
-                # Filter the system libraries, which are added by default by the Android
-                # build system.
-                if (
-                    lib == "-lc"
-                    or lib == "-lstdc++"
-                    or lib == "-lm"
-                    or lib.endswith("libgcc.a")
-                ):
-                    continue
-                match = re.search(r"([^/]+)\.a$", lib)
-                if match:
-                    static_lib_modules.append(match.group(1))
-                    continue
-                match = re.search(r"([^/]+)\.so$", lib)
-                if match:
-                    dynamic_lib_modules.append(match.group(1))
-                    continue
-                if lib.startswith("-l"):
-                    ldflags.append(lib)
-        return (static_lib_modules, dynamic_lib_modules, ldflags)
-
-    def ComputeDeps(self, spec):
-        """Compute the dependencies of a gyp spec.
-
-        Returns a tuple (deps, link_deps), where each is a list of
-        filenames that will need to be put in front of make for either
-        building (deps) or linking (link_deps).
-        """
-        deps = []
-        link_deps = []
-        if "dependencies" in spec:
-            deps.extend(
-                [
-                    target_outputs[dep]
-                    for dep in spec["dependencies"]
-                    if target_outputs[dep]
-                ]
-            )
-            for dep in spec["dependencies"]:
-                if dep in target_link_deps:
-                    link_deps.append(target_link_deps[dep])
-            deps.extend(link_deps)
-        return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps))
-
-    def WriteTargetFlags(self, spec, configs, link_deps):
-        """Write Makefile code to specify the link flags and library dependencies.
-
-        spec, configs: input from gyp.
-        link_deps: link dependency list; see ComputeDeps()
-        """
-        # Libraries (i.e. -lfoo)
-        # These must be included even for static libraries as some of them provide
-        # implicit include paths through the build system.
-        libraries = gyp.common.uniquer(spec.get("libraries", []))
-        static_libs, dynamic_libs, ldflags_libs = self.FilterLibraries(libraries)
-
-        if self.type != "static_library":
-            for configname, config in sorted(configs.items()):
-                ldflags = list(config.get("ldflags", []))
-                self.WriteLn("")
-                self.WriteList(ldflags, "LOCAL_LDFLAGS_%s" % configname)
-            self.WriteList(ldflags_libs, "LOCAL_GYP_LIBS")
-            self.WriteLn(
-                "LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION)) "
-                "$(LOCAL_GYP_LIBS)"
-            )
-
-        # Link dependencies (i.e. other gyp targets this target depends on)
-        # These need not be included for static libraries as within the gyp build
-        # we do not use the implicit include path mechanism.
-        if self.type != "static_library":
-            static_link_deps = [x[1] for x in link_deps if x[0] == "static"]
-            shared_link_deps = [x[1] for x in link_deps if x[0] == "shared"]
-        else:
-            static_link_deps = []
-            shared_link_deps = []
-
-        # Only write the lists if they are non-empty.
-        if static_libs or static_link_deps:
-            self.WriteLn("")
-            self.WriteList(static_libs + static_link_deps, "LOCAL_STATIC_LIBRARIES")
-            self.WriteLn("# Enable grouping to fix circular references")
-            self.WriteLn("LOCAL_GROUP_STATIC_LIBRARIES := true")
-        if dynamic_libs or shared_link_deps:
-            self.WriteLn("")
-            self.WriteList(dynamic_libs + shared_link_deps, "LOCAL_SHARED_LIBRARIES")
-
-    def WriteTarget(
-        self, spec, configs, deps, link_deps, part_of_all, write_alias_target
-    ):
-        """Write Makefile code to produce the final target of the gyp spec.
-
-        spec, configs: input from gyp.
-        deps, link_deps: dependency lists; see ComputeDeps()
-        part_of_all: flag indicating this target is part of 'all'
-        write_alias_target: flag indicating whether to create short aliases for this
-                            target
-        """
-        self.WriteLn("### Rules for final target.")
-
-        if self.type != "none":
-            self.WriteTargetFlags(spec, configs, link_deps)
-
-        settings = spec.get("aosp_build_settings", {})
-        if settings:
-            self.WriteLn("### Set directly by aosp_build_settings.")
-            for k, v in settings.items():
-                if isinstance(v, list):
-                    self.WriteList(v, k)
-                else:
-                    self.WriteLn(f"{k} := {make.QuoteIfNecessary(v)}")
-            self.WriteLn("")
-
-        # Add to the set of targets which represent the gyp 'all' target. We use the
-        # name 'gyp_all_modules' as the Android build system doesn't allow the use
-        # of the Make target 'all' and because 'all_modules' is the equivalent of
-        # the Make target 'all' on Android.
-        if part_of_all and write_alias_target:
-            self.WriteLn('# Add target alias to "gyp_all_modules" target.')
-            self.WriteLn(".PHONY: gyp_all_modules")
-            self.WriteLn("gyp_all_modules: %s" % self.android_module)
-            self.WriteLn("")
-
-        # Add an alias from the gyp target name to the Android module name. This
-        # simplifies manual builds of the target, and is required by the test
-        # framework.
-        if self.target != self.android_module and write_alias_target:
-            self.WriteLn("# Alias gyp target name.")
-            self.WriteLn(".PHONY: %s" % self.target)
-            self.WriteLn(f"{self.target}: {self.android_module}")
-            self.WriteLn("")
-
-        # Add the command to trigger build of the target type depending
-        # on the toolset. Ex: BUILD_STATIC_LIBRARY vs. BUILD_HOST_STATIC_LIBRARY
-        # NOTE: This has to come last!
-        modifier = ""
-        if self.toolset == "host":
-            modifier = "HOST_"
-        if self.type == "static_library":
-            self.WriteLn("include $(BUILD_%sSTATIC_LIBRARY)" % modifier)
-        elif self.type == "shared_library":
-            self.WriteLn("LOCAL_PRELINK_MODULE := false")
-            self.WriteLn("include $(BUILD_%sSHARED_LIBRARY)" % modifier)
-        elif self.type == "executable":
-            self.WriteLn("LOCAL_CXX_STL := libc++_static")
-            # Executables are for build and test purposes only, so they're installed
-            # to a directory that doesn't get included in the system image.
-            self.WriteLn("LOCAL_MODULE_PATH := $(gyp_shared_intermediate_dir)")
-            self.WriteLn("include $(BUILD_%sEXECUTABLE)" % modifier)
-        else:
-            self.WriteLn("LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp")
-            self.WriteLn("LOCAL_UNINSTALLABLE_MODULE := true")
-            if self.toolset == "target":
-                self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_VAR_PREFIX)")
-            else:
-                self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX := $(GYP_HOST_VAR_PREFIX)")
-            self.WriteLn()
-            self.WriteLn("include $(BUILD_SYSTEM)/base_rules.mk")
-            self.WriteLn()
-            self.WriteLn("$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)")
-            self.WriteLn('\t$(hide) echo "Gyp timestamp: $@"')
-            self.WriteLn("\t$(hide) mkdir -p $(dir $@)")
-            self.WriteLn("\t$(hide) touch $@")
-            self.WriteLn()
-            self.WriteLn("LOCAL_2ND_ARCH_VAR_PREFIX :=")
-
-    def WriteList(
-        self,
-        value_list,
-        variable=None,
-        prefix="",
-        quoter=make.QuoteIfNecessary,
-        local_pathify=False,
-    ):
-        """Write a variable definition that is a list of values.
-
-        E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out
-             foo = blaha blahb
-        but in a pretty-printed style.
-        """
-        values = ""
-        if value_list:
-            value_list = [quoter(prefix + value) for value in value_list]
-            if local_pathify:
-                value_list = [self.LocalPathify(value) for value in value_list]
-            values = " \\\n\t" + " \\\n\t".join(value_list)
-        self.fp.write(f"{variable} :={values}\n\n")
-
-    def WriteLn(self, text=""):
-        self.fp.write(text + "\n")
-
-    def LocalPathify(self, path):
-        """Convert a subdirectory-relative path into a normalized path which starts
-        with the make variable $(LOCAL_PATH) (i.e. the top of the project tree).
-        Absolute paths, or paths that contain variables, are just normalized."""
-        if "$(" in path or os.path.isabs(path):
-            # path is not a file in the project tree in this case, but calling
-            # normpath is still important for trimming trailing slashes.
-            return os.path.normpath(path)
-        local_path = os.path.join("$(LOCAL_PATH)", self.path, path)
-        local_path = os.path.normpath(local_path)
-        # Check that normalizing the path didn't ../ itself out of $(LOCAL_PATH)
-        # - i.e. that the resulting path is still inside the project tree. The
-        # path may legitimately have ended up containing just $(LOCAL_PATH), though,
-        # so we don't look for a slash.
-        assert local_path.startswith(
-            "$(LOCAL_PATH)"
-        ), f"Path {path} attempts to escape from gyp path {self.path} !)"
-        return local_path
-
-    def ExpandInputRoot(self, template, expansion, dirname):
-        if "%(INPUT_ROOT)s" not in template and "%(INPUT_DIRNAME)s" not in template:
-            return template
-        path = template % {
-            "INPUT_ROOT": expansion,
-            "INPUT_DIRNAME": dirname,
-        }
-        return os.path.normpath(path)
-
-
-def PerformBuild(data, configurations, params):
-    # The android backend only supports the default configuration.
-    options = params["options"]
-    makefile = os.path.abspath(os.path.join(options.toplevel_dir, "GypAndroid.mk"))
-    env = dict(os.environ)
-    env["ONE_SHOT_MAKEFILE"] = makefile
-    arguments = ["make", "-C", os.environ["ANDROID_BUILD_TOP"], "gyp_all_modules"]
-    print("Building: %s" % arguments)
-    subprocess.check_call(arguments, env=env)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
-    options = params["options"]
-    generator_flags = params.get("generator_flags", {})
-    limit_to_target_all = generator_flags.get("limit_to_target_all", False)
-    write_alias_targets = generator_flags.get("write_alias_targets", True)
-    sdk_version = generator_flags.get("aosp_sdk_version", 0)
-    android_top_dir = os.environ.get("ANDROID_BUILD_TOP")
-    assert android_top_dir, "$ANDROID_BUILD_TOP not set; you need to run lunch."
-
-    def CalculateMakefilePath(build_file, base_name):
-        """Determine where to write a Makefile for a given gyp file."""
-        # Paths in gyp files are relative to the .gyp file, but we want
-        # paths relative to the source root for the master makefile.  Grab
-        # the path of the .gyp file as the base to relativize against.
-        # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp".
-        base_path = gyp.common.RelativePath(os.path.dirname(build_file), options.depth)
-        # We write the file in the base_path directory.
-        output_file = os.path.join(options.depth, base_path, base_name)
-        assert (
-            not options.generator_output
-        ), "The Android backend does not support options.generator_output."
-        base_path = gyp.common.RelativePath(
-            os.path.dirname(build_file), options.toplevel_dir
-        )
-        return base_path, output_file
-
-    # TODO:  search for the first non-'Default' target.  This can go
-    # away when we add verification that all targets have the
-    # necessary configurations.
-    default_configuration = None
-    for target in target_list:
-        spec = target_dicts[target]
-        if spec["default_configuration"] != "Default":
-            default_configuration = spec["default_configuration"]
-            break
-    if not default_configuration:
-        default_configuration = "Default"
-
-    makefile_name = "GypAndroid" + options.suffix + ".mk"
-    makefile_path = os.path.join(options.toplevel_dir, makefile_name)
-    assert (
-        not options.generator_output
-    ), "The Android backend does not support options.generator_output."
-    gyp.common.EnsureDirExists(makefile_path)
-    root_makefile = open(makefile_path, "w")
-
-    root_makefile.write(header)
-
-    # We set LOCAL_PATH just once, here, to the top of the project tree. This
-    # allows all the other paths we use to be relative to the Android.mk file,
-    # as the Android build system expects.
-    root_makefile.write("\nLOCAL_PATH := $(call my-dir)\n")
-
-    # Find the list of targets that derive from the gyp file(s) being built.
-    needed_targets = set()
-    for build_file in params["build_files"]:
-        for target in gyp.common.AllTargets(target_list, target_dicts, build_file):
-            needed_targets.add(target)
-
-    build_files = set()
-    include_list = set()
-    android_modules = {}
-    for qualified_target in target_list:
-        build_file, target, toolset = gyp.common.ParseQualifiedTarget(qualified_target)
-        relative_build_file = gyp.common.RelativePath(build_file, options.toplevel_dir)
-        build_files.add(relative_build_file)
-        included_files = data[build_file]["included_files"]
-        for included_file in included_files:
-            # The included_files entries are relative to the dir of the build file
-            # that included them, so we have to undo that and then make them relative
-            # to the root dir.
-            relative_include_file = gyp.common.RelativePath(
-                gyp.common.UnrelativePath(included_file, build_file),
-                options.toplevel_dir,
-            )
-            abs_include_file = os.path.abspath(relative_include_file)
-            # If the include file is from the ~/.gyp dir, we should use absolute path
-            # so that relocating the src dir doesn't break the path.
-            if params["home_dot_gyp"] and abs_include_file.startswith(
-                params["home_dot_gyp"]
-            ):
-                build_files.add(abs_include_file)
-            else:
-                build_files.add(relative_include_file)
-
-        base_path, output_file = CalculateMakefilePath(
-            build_file, target + "." + toolset + options.suffix + ".mk"
-        )
-
-        spec = target_dicts[qualified_target]
-        configs = spec["configurations"]
-
-        part_of_all = qualified_target in needed_targets
-        if limit_to_target_all and not part_of_all:
-            continue
-
-        relative_target = gyp.common.QualifiedTarget(
-            relative_build_file, target, toolset
-        )
-        writer = AndroidMkWriter(android_top_dir)
-        android_module = writer.Write(
-            qualified_target,
-            relative_target,
-            base_path,
-            output_file,
-            spec,
-            configs,
-            part_of_all=part_of_all,
-            write_alias_target=write_alias_targets,
-            sdk_version=sdk_version,
-        )
-        if android_module in android_modules:
-            print(
-                "ERROR: Android module names must be unique. The following "
-                "targets both generate Android module name %s.\n  %s\n  %s"
-                % (android_module, android_modules[android_module], qualified_target)
-            )
-            return
-        android_modules[android_module] = qualified_target
-
-        # Our root_makefile lives at the source root.  Compute the relative path
-        # from there to the output_file for including.
-        mkfile_rel_path = gyp.common.RelativePath(
-            output_file, os.path.dirname(makefile_path)
-        )
-        include_list.add(mkfile_rel_path)
-
-    root_makefile.write("GYP_CONFIGURATION ?= %s\n" % default_configuration)
-    root_makefile.write("GYP_VAR_PREFIX ?=\n")
-    root_makefile.write("GYP_HOST_VAR_PREFIX ?=\n")
-    root_makefile.write("GYP_HOST_MULTILIB ?= first\n")
-
-    # Write out the sorted list of includes.
-    root_makefile.write("\n")
-    for include_file in sorted(include_list):
-        root_makefile.write("include $(LOCAL_PATH)/" + include_file + "\n")
-    root_makefile.write("\n")
-
-    if write_alias_targets:
-        root_makefile.write(ALL_MODULES_FOOTER)
-
-    root_makefile.close()
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
deleted file mode 100644
index 320a891..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py
+++ /dev/null
@@ -1,1318 +0,0 @@
-# Copyright (c) 2013 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""cmake output module
-
-This module is under development and should be considered experimental.
-
-This module produces cmake (2.8.8+) input as its output. One CMakeLists.txt is
-created for each configuration.
-
-This module's original purpose was to support editing in IDEs like KDevelop
-which use CMake for project management. It is also possible to use CMake to
-generate projects for other IDEs such as eclipse cdt and code::blocks. QtCreator
-will convert the CMakeLists.txt to a code::blocks cbp for the editor to read,
-but build using CMake. As a result QtCreator editor is unaware of compiler
-defines. The generated CMakeLists.txt can also be used to build on Linux. There
-is currently no support for building on platforms other than Linux.
-
-The generated CMakeLists.txt should properly compile all projects. However,
-there is a mismatch between gyp and cmake with regard to linking. All attempts
-are made to work around this, but CMake sometimes sees -Wl,--start-group as a
-library and incorrectly repeats it. As a result the output of this generator
-should not be relied on for building.
-
-When using with kdevelop, use version 4.4+. Previous versions of kdevelop will
-not be able to find the header file directories described in the generated
-CMakeLists.txt file.
-"""
-
-
-import multiprocessing
-import os
-import signal
-import subprocess
-import gyp.common
-import gyp.xcode_emulation
-
-_maketrans = str.maketrans
-
-generator_default_variables = {
-    "EXECUTABLE_PREFIX": "",
-    "EXECUTABLE_SUFFIX": "",
-    "STATIC_LIB_PREFIX": "lib",
-    "STATIC_LIB_SUFFIX": ".a",
-    "SHARED_LIB_PREFIX": "lib",
-    "SHARED_LIB_SUFFIX": ".so",
-    "SHARED_LIB_DIR": "${builddir}/lib.${TOOLSET}",
-    "LIB_DIR": "${obj}.${TOOLSET}",
-    "INTERMEDIATE_DIR": "${obj}.${TOOLSET}/${TARGET}/geni",
-    "SHARED_INTERMEDIATE_DIR": "${obj}/gen",
-    "PRODUCT_DIR": "${builddir}",
-    "RULE_INPUT_PATH": "${RULE_INPUT_PATH}",
-    "RULE_INPUT_DIRNAME": "${RULE_INPUT_DIRNAME}",
-    "RULE_INPUT_NAME": "${RULE_INPUT_NAME}",
-    "RULE_INPUT_ROOT": "${RULE_INPUT_ROOT}",
-    "RULE_INPUT_EXT": "${RULE_INPUT_EXT}",
-    "CONFIGURATION_NAME": "${configuration}",
-}
-
-FULL_PATH_VARS = ("${CMAKE_CURRENT_LIST_DIR}", "${builddir}", "${obj}")
-
-generator_supports_multiple_toolsets = True
-generator_wants_static_library_dependencies_adjusted = True
-
-COMPILABLE_EXTENSIONS = {
-    ".c": "cc",
-    ".cc": "cxx",
-    ".cpp": "cxx",
-    ".cxx": "cxx",
-    ".s": "s",  # cc
-    ".S": "s",  # cc
-}
-
-
-def RemovePrefix(a, prefix):
-    """Returns 'a' without 'prefix' if it starts with 'prefix'."""
-    return a[len(prefix) :] if a.startswith(prefix) else a
-
-
-def CalculateVariables(default_variables, params):
-    """Calculate additional variables for use in the build (called by gyp)."""
-    default_variables.setdefault("OS", gyp.common.GetFlavor(params))
-
-
-def Compilable(filename):
-    """Return true if the file is compilable (should be in OBJS)."""
-    return any(filename.endswith(e) for e in COMPILABLE_EXTENSIONS)
-
-
-def Linkable(filename):
-    """Return true if the file is linkable (should be on the link line)."""
-    return filename.endswith(".o")
-
-
-def NormjoinPathForceCMakeSource(base_path, rel_path):
-    """Resolves rel_path against base_path and returns the result.
-
-  If rel_path is an absolute path it is returned unchanged.
-  Otherwise it is resolved against base_path and normalized.
-  If the result is a relative path, it is forced to be relative to the
-  CMakeLists.txt.
-  """
-    if os.path.isabs(rel_path):
-        return rel_path
-    if any(rel_path.startswith(var) for var in FULL_PATH_VARS):
-        return rel_path
-    # TODO: do we need to check base_path for absolute variables as well?
-    return os.path.join(
-        "${CMAKE_CURRENT_LIST_DIR}", os.path.normpath(os.path.join(base_path, rel_path))
-    )
-
-
-def NormjoinPath(base_path, rel_path):
-    """Resolves rel_path against base_path and returns the result.
-  TODO: what is this really used for?
-  If rel_path begins with '$' it is returned unchanged.
-  Otherwise it is resolved against base_path if relative, then normalized.
-  """
-    if rel_path.startswith("$") and not rel_path.startswith("${configuration}"):
-        return rel_path
-    return os.path.normpath(os.path.join(base_path, rel_path))
-
-
-def CMakeStringEscape(a):
-    """Escapes the string 'a' for use inside a CMake string.
-
-  This means escaping
-  '\' otherwise it may be seen as modifying the next character
-  '"' otherwise it will end the string
-  ';' otherwise the string becomes a list
-
-  The following do not need to be escaped
-  '#' when the lexer is in string state, this does not start a comment
-
-  The following are yet unknown
-  '$' generator variables (like ${obj}) must not be escaped,
-      but text $ should be escaped
-      what is wanted is to know which $ come from generator variables
-  """
-    return a.replace("\\", "\\\\").replace(";", "\\;").replace('"', '\\"')
-
-
-def SetFileProperty(output, source_name, property_name, values, sep):
-    """Given a set of source file, sets the given property on them."""
-    output.write("set_source_files_properties(")
-    output.write(source_name)
-    output.write(" PROPERTIES ")
-    output.write(property_name)
-    output.write(' "')
-    for value in values:
-        output.write(CMakeStringEscape(value))
-        output.write(sep)
-    output.write('")\n')
-
-
-def SetFilesProperty(output, variable, property_name, values, sep):
-    """Given a set of source files, sets the given property on them."""
-    output.write("set_source_files_properties(")
-    WriteVariable(output, variable)
-    output.write(" PROPERTIES ")
-    output.write(property_name)
-    output.write(' "')
-    for value in values:
-        output.write(CMakeStringEscape(value))
-        output.write(sep)
-    output.write('")\n')
-
-
-def SetTargetProperty(output, target_name, property_name, values, sep=""):
-    """Given a target, sets the given property."""
-    output.write("set_target_properties(")
-    output.write(target_name)
-    output.write(" PROPERTIES ")
-    output.write(property_name)
-    output.write(' "')
-    for value in values:
-        output.write(CMakeStringEscape(value))
-        output.write(sep)
-    output.write('")\n')
-
-
-def SetVariable(output, variable_name, value):
-    """Sets a CMake variable."""
-    output.write("set(")
-    output.write(variable_name)
-    output.write(' "')
-    output.write(CMakeStringEscape(value))
-    output.write('")\n')
-
-
-def SetVariableList(output, variable_name, values):
-    """Sets a CMake variable to a list."""
-    if not values:
-        return SetVariable(output, variable_name, "")
-    if len(values) == 1:
-        return SetVariable(output, variable_name, values[0])
-    output.write("list(APPEND ")
-    output.write(variable_name)
-    output.write('\n  "')
-    output.write('"\n  "'.join([CMakeStringEscape(value) for value in values]))
-    output.write('")\n')
-
-
-def UnsetVariable(output, variable_name):
-    """Unsets a CMake variable."""
-    output.write("unset(")
-    output.write(variable_name)
-    output.write(")\n")
-
-
-def WriteVariable(output, variable_name, prepend=None):
-    if prepend:
-        output.write(prepend)
-    output.write("${")
-    output.write(variable_name)
-    output.write("}")
-
-
-class CMakeTargetType:
-    def __init__(self, command, modifier, property_modifier):
-        self.command = command
-        self.modifier = modifier
-        self.property_modifier = property_modifier
-
-
-cmake_target_type_from_gyp_target_type = {
-    "executable": CMakeTargetType("add_executable", None, "RUNTIME"),
-    "static_library": CMakeTargetType("add_library", "STATIC", "ARCHIVE"),
-    "shared_library": CMakeTargetType("add_library", "SHARED", "LIBRARY"),
-    "loadable_module": CMakeTargetType("add_library", "MODULE", "LIBRARY"),
-    "none": CMakeTargetType("add_custom_target", "SOURCES", None),
-}
-
-
-def StringToCMakeTargetName(a):
-    """Converts the given string 'a' to a valid CMake target name.
-
-  All invalid characters are replaced by '_'.
-  Invalid for cmake: ' ', '/', '(', ')', '"'
-  Invalid for make: ':'
-  Invalid for unknown reasons but cause failures: '.'
-  """
-    return a.translate(_maketrans(' /():."', "_______"))
-
-
-def WriteActions(target_name, actions, extra_sources, extra_deps, path_to_gyp, output):
-    """Write CMake for the 'actions' in the target.
-
-  Args:
-    target_name: the name of the CMake target being generated.
-    actions: the Gyp 'actions' dict for this target.
-    extra_sources: [(, )] to append with generated source files.
-    extra_deps: [] to append with generated targets.
-    path_to_gyp: relative path from CMakeLists.txt being generated to
-        the Gyp file in which the target being generated is defined.
-  """
-    for action in actions:
-        action_name = StringToCMakeTargetName(action["action_name"])
-        action_target_name = f"{target_name}__{action_name}"
-
-        inputs = action["inputs"]
-        inputs_name = action_target_name + "__input"
-        SetVariableList(
-            output,
-            inputs_name,
-            [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs],
-        )
-
-        outputs = action["outputs"]
-        cmake_outputs = [
-            NormjoinPathForceCMakeSource(path_to_gyp, out) for out in outputs
-        ]
-        outputs_name = action_target_name + "__output"
-        SetVariableList(output, outputs_name, cmake_outputs)
-
-        # Build up a list of outputs.
-        # Collect the output dirs we'll need.
-        dirs = {dir for dir in (os.path.dirname(o) for o in outputs) if dir}
-
-        if int(action.get("process_outputs_as_sources", False)):
-            extra_sources.extend(zip(cmake_outputs, outputs))
-
-        # add_custom_command
-        output.write("add_custom_command(OUTPUT ")
-        WriteVariable(output, outputs_name)
-        output.write("\n")
-
-        if len(dirs) > 0:
-            for directory in dirs:
-                output.write("  COMMAND ${CMAKE_COMMAND} -E make_directory ")
-                output.write(directory)
-                output.write("\n")
-
-        output.write("  COMMAND ")
-        output.write(gyp.common.EncodePOSIXShellList(action["action"]))
-        output.write("\n")
-
-        output.write("  DEPENDS ")
-        WriteVariable(output, inputs_name)
-        output.write("\n")
-
-        output.write("  WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/")
-        output.write(path_to_gyp)
-        output.write("\n")
-
-        output.write("  COMMENT ")
-        if "message" in action:
-            output.write(action["message"])
-        else:
-            output.write(action_target_name)
-        output.write("\n")
-
-        output.write("  VERBATIM\n")
-        output.write(")\n")
-
-        # add_custom_target
-        output.write("add_custom_target(")
-        output.write(action_target_name)
-        output.write("\n  DEPENDS ")
-        WriteVariable(output, outputs_name)
-        output.write("\n  SOURCES ")
-        WriteVariable(output, inputs_name)
-        output.write("\n)\n")
-
-        extra_deps.append(action_target_name)
-
-
-def NormjoinRulePathForceCMakeSource(base_path, rel_path, rule_source):
-    if rel_path.startswith(("${RULE_INPUT_PATH}", "${RULE_INPUT_DIRNAME}")):
-        if any(rule_source.startswith(var) for var in FULL_PATH_VARS):
-            return rel_path
-    return NormjoinPathForceCMakeSource(base_path, rel_path)
-
-
-def WriteRules(target_name, rules, extra_sources, extra_deps, path_to_gyp, output):
-    """Write CMake for the 'rules' in the target.
-
-  Args:
-    target_name: the name of the CMake target being generated.
-    actions: the Gyp 'actions' dict for this target.
-    extra_sources: [(, )] to append with generated source files.
-    extra_deps: [] to append with generated targets.
-    path_to_gyp: relative path from CMakeLists.txt being generated to
-        the Gyp file in which the target being generated is defined.
-  """
-    for rule in rules:
-        rule_name = StringToCMakeTargetName(target_name + "__" + rule["rule_name"])
-
-        inputs = rule.get("inputs", [])
-        inputs_name = rule_name + "__input"
-        SetVariableList(
-            output,
-            inputs_name,
-            [NormjoinPathForceCMakeSource(path_to_gyp, dep) for dep in inputs],
-        )
-        outputs = rule["outputs"]
-        var_outputs = []
-
-        for count, rule_source in enumerate(rule.get("rule_sources", [])):
-            action_name = rule_name + "_" + str(count)
-
-            rule_source_dirname, rule_source_basename = os.path.split(rule_source)
-            rule_source_root, rule_source_ext = os.path.splitext(rule_source_basename)
-
-            SetVariable(output, "RULE_INPUT_PATH", rule_source)
-            SetVariable(output, "RULE_INPUT_DIRNAME", rule_source_dirname)
-            SetVariable(output, "RULE_INPUT_NAME", rule_source_basename)
-            SetVariable(output, "RULE_INPUT_ROOT", rule_source_root)
-            SetVariable(output, "RULE_INPUT_EXT", rule_source_ext)
-
-            # Build up a list of outputs.
-            # Collect the output dirs we'll need.
-            dirs = {dir for dir in (os.path.dirname(o) for o in outputs) if dir}
-
-            # Create variables for the output, as 'local' variable will be unset.
-            these_outputs = []
-            for output_index, out in enumerate(outputs):
-                output_name = action_name + "_" + str(output_index)
-                SetVariable(
-                    output,
-                    output_name,
-                    NormjoinRulePathForceCMakeSource(path_to_gyp, out, rule_source),
-                )
-                if int(rule.get("process_outputs_as_sources", False)):
-                    extra_sources.append(("${" + output_name + "}", out))
-                these_outputs.append("${" + output_name + "}")
-                var_outputs.append("${" + output_name + "}")
-
-            # add_custom_command
-            output.write("add_custom_command(OUTPUT\n")
-            for out in these_outputs:
-                output.write("  ")
-                output.write(out)
-                output.write("\n")
-
-            for directory in dirs:
-                output.write("  COMMAND ${CMAKE_COMMAND} -E make_directory ")
-                output.write(directory)
-                output.write("\n")
-
-            output.write("  COMMAND ")
-            output.write(gyp.common.EncodePOSIXShellList(rule["action"]))
-            output.write("\n")
-
-            output.write("  DEPENDS ")
-            WriteVariable(output, inputs_name)
-            output.write(" ")
-            output.write(NormjoinPath(path_to_gyp, rule_source))
-            output.write("\n")
-
-            # CMAKE_CURRENT_LIST_DIR is where the CMakeLists.txt lives.
-            # The cwd is the current build directory.
-            output.write("  WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/")
-            output.write(path_to_gyp)
-            output.write("\n")
-
-            output.write("  COMMENT ")
-            if "message" in rule:
-                output.write(rule["message"])
-            else:
-                output.write(action_name)
-            output.write("\n")
-
-            output.write("  VERBATIM\n")
-            output.write(")\n")
-
-            UnsetVariable(output, "RULE_INPUT_PATH")
-            UnsetVariable(output, "RULE_INPUT_DIRNAME")
-            UnsetVariable(output, "RULE_INPUT_NAME")
-            UnsetVariable(output, "RULE_INPUT_ROOT")
-            UnsetVariable(output, "RULE_INPUT_EXT")
-
-        # add_custom_target
-        output.write("add_custom_target(")
-        output.write(rule_name)
-        output.write(" DEPENDS\n")
-        for out in var_outputs:
-            output.write("  ")
-            output.write(out)
-            output.write("\n")
-        output.write("SOURCES ")
-        WriteVariable(output, inputs_name)
-        output.write("\n")
-        for rule_source in rule.get("rule_sources", []):
-            output.write("  ")
-            output.write(NormjoinPath(path_to_gyp, rule_source))
-            output.write("\n")
-        output.write(")\n")
-
-        extra_deps.append(rule_name)
-
-
-def WriteCopies(target_name, copies, extra_deps, path_to_gyp, output):
-    """Write CMake for the 'copies' in the target.
-
-  Args:
-    target_name: the name of the CMake target being generated.
-    actions: the Gyp 'actions' dict for this target.
-    extra_deps: [] to append with generated targets.
-    path_to_gyp: relative path from CMakeLists.txt being generated to
-        the Gyp file in which the target being generated is defined.
-  """
-    copy_name = target_name + "__copies"
-
-    # CMake gets upset with custom targets with OUTPUT which specify no output.
-    have_copies = any(copy["files"] for copy in copies)
-    if not have_copies:
-        output.write("add_custom_target(")
-        output.write(copy_name)
-        output.write(")\n")
-        extra_deps.append(copy_name)
-        return
-
-    class Copy:
-        def __init__(self, ext, command):
-            self.cmake_inputs = []
-            self.cmake_outputs = []
-            self.gyp_inputs = []
-            self.gyp_outputs = []
-            self.ext = ext
-            self.inputs_name = None
-            self.outputs_name = None
-            self.command = command
-
-    file_copy = Copy("", "copy")
-    dir_copy = Copy("_dirs", "copy_directory")
-
-    for copy in copies:
-        files = copy["files"]
-        destination = copy["destination"]
-        for src in files:
-            path = os.path.normpath(src)
-            basename = os.path.split(path)[1]
-            dst = os.path.join(destination, basename)
-
-            copy = file_copy if os.path.basename(src) else dir_copy
-
-            copy.cmake_inputs.append(NormjoinPathForceCMakeSource(path_to_gyp, src))
-            copy.cmake_outputs.append(NormjoinPathForceCMakeSource(path_to_gyp, dst))
-            copy.gyp_inputs.append(src)
-            copy.gyp_outputs.append(dst)
-
-    for copy in (file_copy, dir_copy):
-        if copy.cmake_inputs:
-            copy.inputs_name = copy_name + "__input" + copy.ext
-            SetVariableList(output, copy.inputs_name, copy.cmake_inputs)
-
-            copy.outputs_name = copy_name + "__output" + copy.ext
-            SetVariableList(output, copy.outputs_name, copy.cmake_outputs)
-
-    # add_custom_command
-    output.write("add_custom_command(\n")
-
-    output.write("OUTPUT")
-    for copy in (file_copy, dir_copy):
-        if copy.outputs_name:
-            WriteVariable(output, copy.outputs_name, " ")
-    output.write("\n")
-
-    for copy in (file_copy, dir_copy):
-        for src, dst in zip(copy.gyp_inputs, copy.gyp_outputs):
-            # 'cmake -E copy src dst' will create the 'dst' directory if needed.
-            output.write("COMMAND ${CMAKE_COMMAND} -E %s " % copy.command)
-            output.write(src)
-            output.write(" ")
-            output.write(dst)
-            output.write("\n")
-
-    output.write("DEPENDS")
-    for copy in (file_copy, dir_copy):
-        if copy.inputs_name:
-            WriteVariable(output, copy.inputs_name, " ")
-    output.write("\n")
-
-    output.write("WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/")
-    output.write(path_to_gyp)
-    output.write("\n")
-
-    output.write("COMMENT Copying for ")
-    output.write(target_name)
-    output.write("\n")
-
-    output.write("VERBATIM\n")
-    output.write(")\n")
-
-    # add_custom_target
-    output.write("add_custom_target(")
-    output.write(copy_name)
-    output.write("\n  DEPENDS")
-    for copy in (file_copy, dir_copy):
-        if copy.outputs_name:
-            WriteVariable(output, copy.outputs_name, " ")
-    output.write("\n  SOURCES")
-    if file_copy.inputs_name:
-        WriteVariable(output, file_copy.inputs_name, " ")
-    output.write("\n)\n")
-
-    extra_deps.append(copy_name)
-
-
-def CreateCMakeTargetBaseName(qualified_target):
-    """This is the name we would like the target to have."""
-    _, gyp_target_name, gyp_target_toolset = gyp.common.ParseQualifiedTarget(
-        qualified_target
-    )
-    cmake_target_base_name = gyp_target_name
-    if gyp_target_toolset and gyp_target_toolset != "target":
-        cmake_target_base_name += "_" + gyp_target_toolset
-    return StringToCMakeTargetName(cmake_target_base_name)
-
-
-def CreateCMakeTargetFullName(qualified_target):
-    """An unambiguous name for the target."""
-    gyp_file, gyp_target_name, gyp_target_toolset = gyp.common.ParseQualifiedTarget(
-        qualified_target
-    )
-    cmake_target_full_name = gyp_file + ":" + gyp_target_name
-    if gyp_target_toolset and gyp_target_toolset != "target":
-        cmake_target_full_name += "_" + gyp_target_toolset
-    return StringToCMakeTargetName(cmake_target_full_name)
-
-
-class CMakeNamer:
-    """Converts Gyp target names into CMake target names.
-
-  CMake requires that target names be globally unique. One way to ensure
-  this is to fully qualify the names of the targets. Unfortunately, this
-  ends up with all targets looking like "chrome_chrome_gyp_chrome" instead
-  of just "chrome". If this generator were only interested in building, it
-  would be possible to fully qualify all target names, then create
-  unqualified target names which depend on all qualified targets which
-  should have had that name. This is more or less what the 'make' generator
-  does with aliases. However, one goal of this generator is to create CMake
-  files for use with IDEs, and fully qualified names are not as user
-  friendly.
-
-  Since target name collision is rare, we do the above only when required.
-
-  Toolset variants are always qualified from the base, as this is required for
-  building. However, it also makes sense for an IDE, as it is possible for
-  defines to be different.
-  """
-
-    def __init__(self, target_list):
-        self.cmake_target_base_names_conficting = set()
-
-        cmake_target_base_names_seen = set()
-        for qualified_target in target_list:
-            cmake_target_base_name = CreateCMakeTargetBaseName(qualified_target)
-
-            if cmake_target_base_name not in cmake_target_base_names_seen:
-                cmake_target_base_names_seen.add(cmake_target_base_name)
-            else:
-                self.cmake_target_base_names_conficting.add(cmake_target_base_name)
-
-    def CreateCMakeTargetName(self, qualified_target):
-        base_name = CreateCMakeTargetBaseName(qualified_target)
-        if base_name in self.cmake_target_base_names_conficting:
-            return CreateCMakeTargetFullName(qualified_target)
-        return base_name
-
-
-def WriteTarget(
-    namer,
-    qualified_target,
-    target_dicts,
-    build_dir,
-    config_to_use,
-    options,
-    generator_flags,
-    all_qualified_targets,
-    flavor,
-    output,
-):
-    # The make generator does this always.
-    # TODO: It would be nice to be able to tell CMake all dependencies.
-    circular_libs = generator_flags.get("circular", True)
-
-    if not generator_flags.get("standalone", False):
-        output.write("\n#")
-        output.write(qualified_target)
-        output.write("\n")
-
-    gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target)
-    rel_gyp_file = gyp.common.RelativePath(gyp_file, options.toplevel_dir)
-    rel_gyp_dir = os.path.dirname(rel_gyp_file)
-
-    # Relative path from build dir to top dir.
-    build_to_top = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir)
-    # Relative path from build dir to gyp dir.
-    build_to_gyp = os.path.join(build_to_top, rel_gyp_dir)
-
-    path_from_cmakelists_to_gyp = build_to_gyp
-
-    spec = target_dicts.get(qualified_target, {})
-    config = spec.get("configurations", {}).get(config_to_use, {})
-
-    xcode_settings = None
-    if flavor == "mac":
-        xcode_settings = gyp.xcode_emulation.XcodeSettings(spec)
-
-    target_name = spec.get("target_name", "")
-    target_type = spec.get("type", "")
-    target_toolset = spec.get("toolset")
-
-    cmake_target_type = cmake_target_type_from_gyp_target_type.get(target_type)
-    if cmake_target_type is None:
-        print(
-            "Target %s has unknown target type %s, skipping."
-            % (target_name, target_type)
-        )
-        return
-
-    SetVariable(output, "TARGET", target_name)
-    SetVariable(output, "TOOLSET", target_toolset)
-
-    cmake_target_name = namer.CreateCMakeTargetName(qualified_target)
-
-    extra_sources = []
-    extra_deps = []
-
-    # Actions must come first, since they can generate more OBJs for use below.
-    if "actions" in spec:
-        WriteActions(
-            cmake_target_name,
-            spec["actions"],
-            extra_sources,
-            extra_deps,
-            path_from_cmakelists_to_gyp,
-            output,
-        )
-
-    # Rules must be early like actions.
-    if "rules" in spec:
-        WriteRules(
-            cmake_target_name,
-            spec["rules"],
-            extra_sources,
-            extra_deps,
-            path_from_cmakelists_to_gyp,
-            output,
-        )
-
-    # Copies
-    if "copies" in spec:
-        WriteCopies(
-            cmake_target_name,
-            spec["copies"],
-            extra_deps,
-            path_from_cmakelists_to_gyp,
-            output,
-        )
-
-    # Target and sources
-    srcs = spec.get("sources", [])
-
-    # Gyp separates the sheep from the goats based on file extensions.
-    # A full separation is done here because of flag handing (see below).
-    s_sources = []
-    c_sources = []
-    cxx_sources = []
-    linkable_sources = []
-    other_sources = []
-    for src in srcs:
-        _, ext = os.path.splitext(src)
-        src_type = COMPILABLE_EXTENSIONS.get(ext, None)
-        src_norm_path = NormjoinPath(path_from_cmakelists_to_gyp, src)
-
-        if src_type == "s":
-            s_sources.append(src_norm_path)
-        elif src_type == "cc":
-            c_sources.append(src_norm_path)
-        elif src_type == "cxx":
-            cxx_sources.append(src_norm_path)
-        elif Linkable(ext):
-            linkable_sources.append(src_norm_path)
-        else:
-            other_sources.append(src_norm_path)
-
-    for extra_source in extra_sources:
-        src, real_source = extra_source
-        _, ext = os.path.splitext(real_source)
-        src_type = COMPILABLE_EXTENSIONS.get(ext, None)
-
-        if src_type == "s":
-            s_sources.append(src)
-        elif src_type == "cc":
-            c_sources.append(src)
-        elif src_type == "cxx":
-            cxx_sources.append(src)
-        elif Linkable(ext):
-            linkable_sources.append(src)
-        else:
-            other_sources.append(src)
-
-    s_sources_name = None
-    if s_sources:
-        s_sources_name = cmake_target_name + "__asm_srcs"
-        SetVariableList(output, s_sources_name, s_sources)
-
-    c_sources_name = None
-    if c_sources:
-        c_sources_name = cmake_target_name + "__c_srcs"
-        SetVariableList(output, c_sources_name, c_sources)
-
-    cxx_sources_name = None
-    if cxx_sources:
-        cxx_sources_name = cmake_target_name + "__cxx_srcs"
-        SetVariableList(output, cxx_sources_name, cxx_sources)
-
-    linkable_sources_name = None
-    if linkable_sources:
-        linkable_sources_name = cmake_target_name + "__linkable_srcs"
-        SetVariableList(output, linkable_sources_name, linkable_sources)
-
-    other_sources_name = None
-    if other_sources:
-        other_sources_name = cmake_target_name + "__other_srcs"
-        SetVariableList(output, other_sources_name, other_sources)
-
-    # CMake gets upset when executable targets provide no sources.
-    # http://www.cmake.org/pipermail/cmake/2010-July/038461.html
-    dummy_sources_name = None
-    has_sources = (
-        s_sources_name
-        or c_sources_name
-        or cxx_sources_name
-        or linkable_sources_name
-        or other_sources_name
-    )
-    if target_type == "executable" and not has_sources:
-        dummy_sources_name = cmake_target_name + "__dummy_srcs"
-        SetVariable(
-            output, dummy_sources_name, "${obj}.${TOOLSET}/${TARGET}/genc/dummy.c"
-        )
-        output.write('if(NOT EXISTS "')
-        WriteVariable(output, dummy_sources_name)
-        output.write('")\n')
-        output.write('  file(WRITE "')
-        WriteVariable(output, dummy_sources_name)
-        output.write('" "")\n')
-        output.write("endif()\n")
-
-    # CMake is opposed to setting linker directories and considers the practice
-    # of setting linker directories dangerous. Instead, it favors the use of
-    # find_library and passing absolute paths to target_link_libraries.
-    # However, CMake does provide the command link_directories, which adds
-    # link directories to targets defined after it is called.
-    # As a result, link_directories must come before the target definition.
-    # CMake unfortunately has no means of removing entries from LINK_DIRECTORIES.
-    library_dirs = config.get("library_dirs")
-    if library_dirs is not None:
-        output.write("link_directories(")
-        for library_dir in library_dirs:
-            output.write(" ")
-            output.write(NormjoinPath(path_from_cmakelists_to_gyp, library_dir))
-            output.write("\n")
-        output.write(")\n")
-
-    output.write(cmake_target_type.command)
-    output.write("(")
-    output.write(cmake_target_name)
-
-    if cmake_target_type.modifier is not None:
-        output.write(" ")
-        output.write(cmake_target_type.modifier)
-
-    if s_sources_name:
-        WriteVariable(output, s_sources_name, " ")
-    if c_sources_name:
-        WriteVariable(output, c_sources_name, " ")
-    if cxx_sources_name:
-        WriteVariable(output, cxx_sources_name, " ")
-    if linkable_sources_name:
-        WriteVariable(output, linkable_sources_name, " ")
-    if other_sources_name:
-        WriteVariable(output, other_sources_name, " ")
-    if dummy_sources_name:
-        WriteVariable(output, dummy_sources_name, " ")
-
-    output.write(")\n")
-
-    # Let CMake know if the 'all' target should depend on this target.
-    exclude_from_all = (
-        "TRUE" if qualified_target not in all_qualified_targets else "FALSE"
-    )
-    SetTargetProperty(output, cmake_target_name, "EXCLUDE_FROM_ALL", exclude_from_all)
-    for extra_target_name in extra_deps:
-        SetTargetProperty(
-            output, extra_target_name, "EXCLUDE_FROM_ALL", exclude_from_all
-        )
-
-    # Output name and location.
-    if target_type != "none":
-        # Link as 'C' if there are no other files
-        if not c_sources and not cxx_sources:
-            SetTargetProperty(output, cmake_target_name, "LINKER_LANGUAGE", ["C"])
-
-        # Mark uncompiled sources as uncompiled.
-        if other_sources_name:
-            output.write("set_source_files_properties(")
-            WriteVariable(output, other_sources_name, "")
-            output.write(' PROPERTIES HEADER_FILE_ONLY "TRUE")\n')
-
-        # Mark object sources as linkable.
-        if linkable_sources_name:
-            output.write("set_source_files_properties(")
-            WriteVariable(output, other_sources_name, "")
-            output.write(' PROPERTIES EXTERNAL_OBJECT "TRUE")\n')
-
-        # Output directory
-        target_output_directory = spec.get("product_dir")
-        if target_output_directory is None:
-            if target_type in ("executable", "loadable_module"):
-                target_output_directory = generator_default_variables["PRODUCT_DIR"]
-            elif target_type == "shared_library":
-                target_output_directory = "${builddir}/lib.${TOOLSET}"
-            elif spec.get("standalone_static_library", False):
-                target_output_directory = generator_default_variables["PRODUCT_DIR"]
-            else:
-                base_path = gyp.common.RelativePath(
-                    os.path.dirname(gyp_file), options.toplevel_dir
-                )
-                target_output_directory = "${obj}.${TOOLSET}"
-                target_output_directory = os.path.join(
-                    target_output_directory, base_path
-                )
-
-        cmake_target_output_directory = NormjoinPathForceCMakeSource(
-            path_from_cmakelists_to_gyp, target_output_directory
-        )
-        SetTargetProperty(
-            output,
-            cmake_target_name,
-            cmake_target_type.property_modifier + "_OUTPUT_DIRECTORY",
-            cmake_target_output_directory,
-        )
-
-        # Output name
-        default_product_prefix = ""
-        default_product_name = target_name
-        default_product_ext = ""
-        if target_type == "static_library":
-            static_library_prefix = generator_default_variables["STATIC_LIB_PREFIX"]
-            default_product_name = RemovePrefix(
-                default_product_name, static_library_prefix
-            )
-            default_product_prefix = static_library_prefix
-            default_product_ext = generator_default_variables["STATIC_LIB_SUFFIX"]
-
-        elif target_type in ("loadable_module", "shared_library"):
-            shared_library_prefix = generator_default_variables["SHARED_LIB_PREFIX"]
-            default_product_name = RemovePrefix(
-                default_product_name, shared_library_prefix
-            )
-            default_product_prefix = shared_library_prefix
-            default_product_ext = generator_default_variables["SHARED_LIB_SUFFIX"]
-
-        elif target_type != "executable":
-            print(
-                "ERROR: What output file should be generated?",
-                "type",
-                target_type,
-                "target",
-                target_name,
-            )
-
-        product_prefix = spec.get("product_prefix", default_product_prefix)
-        product_name = spec.get("product_name", default_product_name)
-        product_ext = spec.get("product_extension")
-        product_ext = "." + product_ext if product_ext else default_product_ext
-
-        SetTargetProperty(output, cmake_target_name, "PREFIX", product_prefix)
-        SetTargetProperty(
-            output,
-            cmake_target_name,
-            cmake_target_type.property_modifier + "_OUTPUT_NAME",
-            product_name,
-        )
-        SetTargetProperty(output, cmake_target_name, "SUFFIX", product_ext)
-
-        # Make the output of this target referenceable as a source.
-        cmake_target_output_basename = product_prefix + product_name + product_ext
-        cmake_target_output = os.path.join(
-            cmake_target_output_directory, cmake_target_output_basename
-        )
-        SetFileProperty(output, cmake_target_output, "GENERATED", ["TRUE"], "")
-
-        # Includes
-        includes = config.get("include_dirs")
-        if includes:
-            # This (target include directories) is what requires CMake 2.8.8
-            includes_name = cmake_target_name + "__include_dirs"
-            SetVariableList(
-                output,
-                includes_name,
-                [
-                    NormjoinPathForceCMakeSource(path_from_cmakelists_to_gyp, include)
-                    for include in includes
-                ],
-            )
-            output.write("set_property(TARGET ")
-            output.write(cmake_target_name)
-            output.write(" APPEND PROPERTY INCLUDE_DIRECTORIES ")
-            WriteVariable(output, includes_name, "")
-            output.write(")\n")
-
-        # Defines
-        defines = config.get("defines")
-        if defines is not None:
-            SetTargetProperty(
-                output, cmake_target_name, "COMPILE_DEFINITIONS", defines, ";"
-            )
-
-        # Compile Flags - http://www.cmake.org/Bug/view.php?id=6493
-        # CMake currently does not have target C and CXX flags.
-        # So, instead of doing...
-
-        # cflags_c = config.get('cflags_c')
-        # if cflags_c is not None:
-        #   SetTargetProperty(output, cmake_target_name,
-        #                       'C_COMPILE_FLAGS', cflags_c, ' ')
-
-        # cflags_cc = config.get('cflags_cc')
-        # if cflags_cc is not None:
-        #   SetTargetProperty(output, cmake_target_name,
-        #                       'CXX_COMPILE_FLAGS', cflags_cc, ' ')
-
-        # Instead we must...
-        cflags = config.get("cflags", [])
-        cflags_c = config.get("cflags_c", [])
-        cflags_cxx = config.get("cflags_cc", [])
-        if xcode_settings:
-            cflags = xcode_settings.GetCflags(config_to_use)
-            cflags_c = xcode_settings.GetCflagsC(config_to_use)
-            cflags_cxx = xcode_settings.GetCflagsCC(config_to_use)
-            # cflags_objc = xcode_settings.GetCflagsObjC(config_to_use)
-            # cflags_objcc = xcode_settings.GetCflagsObjCC(config_to_use)
-
-        if (not cflags_c or not c_sources) and (not cflags_cxx or not cxx_sources):
-            SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", cflags, " ")
-
-        elif c_sources and not (s_sources or cxx_sources):
-            flags = []
-            flags.extend(cflags)
-            flags.extend(cflags_c)
-            SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", flags, " ")
-
-        elif cxx_sources and not (s_sources or c_sources):
-            flags = []
-            flags.extend(cflags)
-            flags.extend(cflags_cxx)
-            SetTargetProperty(output, cmake_target_name, "COMPILE_FLAGS", flags, " ")
-
-        else:
-            # TODO: This is broken, one cannot generally set properties on files,
-            # as other targets may require different properties on the same files.
-            if s_sources and cflags:
-                SetFilesProperty(output, s_sources_name, "COMPILE_FLAGS", cflags, " ")
-
-            if c_sources and (cflags or cflags_c):
-                flags = []
-                flags.extend(cflags)
-                flags.extend(cflags_c)
-                SetFilesProperty(output, c_sources_name, "COMPILE_FLAGS", flags, " ")
-
-            if cxx_sources and (cflags or cflags_cxx):
-                flags = []
-                flags.extend(cflags)
-                flags.extend(cflags_cxx)
-                SetFilesProperty(output, cxx_sources_name, "COMPILE_FLAGS", flags, " ")
-
-        # Linker flags
-        ldflags = config.get("ldflags")
-        if ldflags is not None:
-            SetTargetProperty(output, cmake_target_name, "LINK_FLAGS", ldflags, " ")
-
-        # XCode settings
-        xcode_settings = config.get("xcode_settings", {})
-        for xcode_setting, xcode_value in xcode_settings.items():
-            SetTargetProperty(
-                output,
-                cmake_target_name,
-                "XCODE_ATTRIBUTE_%s" % xcode_setting,
-                xcode_value,
-                "" if isinstance(xcode_value, str) else " ",
-            )
-
-    # Note on Dependencies and Libraries:
-    # CMake wants to handle link order, resolving the link line up front.
-    # Gyp does not retain or enforce specifying enough information to do so.
-    # So do as other gyp generators and use --start-group and --end-group.
-    # Give CMake as little information as possible so that it doesn't mess it up.
-
-    # Dependencies
-    rawDeps = spec.get("dependencies", [])
-
-    static_deps = []
-    shared_deps = []
-    other_deps = []
-    for rawDep in rawDeps:
-        dep_cmake_name = namer.CreateCMakeTargetName(rawDep)
-        dep_spec = target_dicts.get(rawDep, {})
-        dep_target_type = dep_spec.get("type", None)
-
-        if dep_target_type == "static_library":
-            static_deps.append(dep_cmake_name)
-        elif dep_target_type == "shared_library":
-            shared_deps.append(dep_cmake_name)
-        else:
-            other_deps.append(dep_cmake_name)
-
-    # ensure all external dependencies are complete before internal dependencies
-    # extra_deps currently only depend on their own deps, so otherwise run early
-    if static_deps or shared_deps or other_deps:
-        for extra_dep in extra_deps:
-            output.write("add_dependencies(")
-            output.write(extra_dep)
-            output.write("\n")
-            for deps in (static_deps, shared_deps, other_deps):
-                for dep in gyp.common.uniquer(deps):
-                    output.write("  ")
-                    output.write(dep)
-                    output.write("\n")
-            output.write(")\n")
-
-    linkable = target_type in ("executable", "loadable_module", "shared_library")
-    other_deps.extend(extra_deps)
-    if other_deps or (not linkable and (static_deps or shared_deps)):
-        output.write("add_dependencies(")
-        output.write(cmake_target_name)
-        output.write("\n")
-        for dep in gyp.common.uniquer(other_deps):
-            output.write("  ")
-            output.write(dep)
-            output.write("\n")
-        if not linkable:
-            for deps in (static_deps, shared_deps):
-                for lib_dep in gyp.common.uniquer(deps):
-                    output.write("  ")
-                    output.write(lib_dep)
-                    output.write("\n")
-        output.write(")\n")
-
-    # Libraries
-    if linkable:
-        external_libs = [lib for lib in spec.get("libraries", []) if len(lib) > 0]
-        if external_libs or static_deps or shared_deps:
-            output.write("target_link_libraries(")
-            output.write(cmake_target_name)
-            output.write("\n")
-            if static_deps:
-                write_group = circular_libs and len(static_deps) > 1 and flavor != "mac"
-                if write_group:
-                    output.write("-Wl,--start-group\n")
-                for dep in gyp.common.uniquer(static_deps):
-                    output.write("  ")
-                    output.write(dep)
-                    output.write("\n")
-                if write_group:
-                    output.write("-Wl,--end-group\n")
-            if shared_deps:
-                for dep in gyp.common.uniquer(shared_deps):
-                    output.write("  ")
-                    output.write(dep)
-                    output.write("\n")
-            if external_libs:
-                for lib in gyp.common.uniquer(external_libs):
-                    output.write('  "')
-                    output.write(RemovePrefix(lib, "$(SDKROOT)"))
-                    output.write('"\n')
-
-            output.write(")\n")
-
-    UnsetVariable(output, "TOOLSET")
-    UnsetVariable(output, "TARGET")
-
-
-def GenerateOutputForConfig(target_list, target_dicts, data, params, config_to_use):
-    options = params["options"]
-    generator_flags = params["generator_flags"]
-    flavor = gyp.common.GetFlavor(params)
-
-    # generator_dir: relative path from pwd to where make puts build files.
-    # Makes migrating from make to cmake easier, cmake doesn't put anything here.
-    # Each Gyp configuration creates a different CMakeLists.txt file
-    # to avoid incompatibilities between Gyp and CMake configurations.
-    generator_dir = os.path.relpath(options.generator_output or ".")
-
-    # output_dir: relative path from generator_dir to the build directory.
-    output_dir = generator_flags.get("output_dir", "out")
-
-    # build_dir: relative path from source root to our output files.
-    # e.g. "out/Debug"
-    build_dir = os.path.normpath(os.path.join(generator_dir, output_dir, config_to_use))
-
-    toplevel_build = os.path.join(options.toplevel_dir, build_dir)
-
-    output_file = os.path.join(toplevel_build, "CMakeLists.txt")
-    gyp.common.EnsureDirExists(output_file)
-
-    output = open(output_file, "w")
-    output.write("cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n")
-    output.write("cmake_policy(VERSION 2.8.8)\n")
-
-    gyp_file, project_target, _ = gyp.common.ParseQualifiedTarget(target_list[-1])
-    output.write("project(")
-    output.write(project_target)
-    output.write(")\n")
-
-    SetVariable(output, "configuration", config_to_use)
-
-    ar = None
-    cc = None
-    cxx = None
-
-    make_global_settings = data[gyp_file].get("make_global_settings", [])
-    build_to_top = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir)
-    for key, value in make_global_settings:
-        if key == "AR":
-            ar = os.path.join(build_to_top, value)
-        if key == "CC":
-            cc = os.path.join(build_to_top, value)
-        if key == "CXX":
-            cxx = os.path.join(build_to_top, value)
-
-    ar = gyp.common.GetEnvironFallback(["AR_target", "AR"], ar)
-    cc = gyp.common.GetEnvironFallback(["CC_target", "CC"], cc)
-    cxx = gyp.common.GetEnvironFallback(["CXX_target", "CXX"], cxx)
-
-    if ar:
-        SetVariable(output, "CMAKE_AR", ar)
-    if cc:
-        SetVariable(output, "CMAKE_C_COMPILER", cc)
-    if cxx:
-        SetVariable(output, "CMAKE_CXX_COMPILER", cxx)
-
-    # The following appears to be as-yet undocumented.
-    # http://public.kitware.com/Bug/view.php?id=8392
-    output.write("enable_language(ASM)\n")
-    # ASM-ATT does not support .S files.
-    # output.write('enable_language(ASM-ATT)\n')
-
-    if cc:
-        SetVariable(output, "CMAKE_ASM_COMPILER", cc)
-
-    SetVariable(output, "builddir", "${CMAKE_CURRENT_BINARY_DIR}")
-    SetVariable(output, "obj", "${builddir}/obj")
-    output.write("\n")
-
-    # TODO: Undocumented/unsupported (the CMake Java generator depends on it).
-    # CMake by default names the object resulting from foo.c to be foo.c.o.
-    # Gyp traditionally names the object resulting from foo.c foo.o.
-    # This should be irrelevant, but some targets extract .o files from .a
-    # and depend on the name of the extracted .o files.
-    output.write("set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)\n")
-    output.write("set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)\n")
-    output.write("\n")
-
-    # Force ninja to use rsp files. Otherwise link and ar lines can get too long,
-    # resulting in 'Argument list too long' errors.
-    # However, rsp files don't work correctly on Mac.
-    if flavor != "mac":
-        output.write("set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1)\n")
-    output.write("\n")
-
-    namer = CMakeNamer(target_list)
-
-    # The list of targets upon which the 'all' target should depend.
-    # CMake has it's own implicit 'all' target, one is not created explicitly.
-    all_qualified_targets = set()
-    for build_file in params["build_files"]:
-        for qualified_target in gyp.common.AllTargets(
-            target_list, target_dicts, os.path.normpath(build_file)
-        ):
-            all_qualified_targets.add(qualified_target)
-
-    for qualified_target in target_list:
-        if flavor == "mac":
-            gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target)
-            spec = target_dicts[qualified_target]
-            gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[gyp_file], spec)
-
-        WriteTarget(
-            namer,
-            qualified_target,
-            target_dicts,
-            build_dir,
-            config_to_use,
-            options,
-            generator_flags,
-            all_qualified_targets,
-            flavor,
-            output,
-        )
-
-    output.close()
-
-
-def PerformBuild(data, configurations, params):
-    options = params["options"]
-    generator_flags = params["generator_flags"]
-
-    # generator_dir: relative path from pwd to where make puts build files.
-    # Makes migrating from make to cmake easier, cmake doesn't put anything here.
-    generator_dir = os.path.relpath(options.generator_output or ".")
-
-    # output_dir: relative path from generator_dir to the build directory.
-    output_dir = generator_flags.get("output_dir", "out")
-
-    for config_name in configurations:
-        # build_dir: relative path from source root to our output files.
-        # e.g. "out/Debug"
-        build_dir = os.path.normpath(
-            os.path.join(generator_dir, output_dir, config_name)
-        )
-        arguments = ["cmake", "-G", "Ninja"]
-        print(f"Generating [{config_name}]: {arguments}")
-        subprocess.check_call(arguments, cwd=build_dir)
-
-        arguments = ["ninja", "-C", build_dir]
-        print(f"Building [{config_name}]: {arguments}")
-        subprocess.check_call(arguments)
-
-
-def CallGenerateOutputForConfig(arglist):
-    # Ignore the interrupt signal so that the parent process catches it and
-    # kills all multiprocessing children.
-    signal.signal(signal.SIGINT, signal.SIG_IGN)
-
-    target_list, target_dicts, data, params, config_name = arglist
-    GenerateOutputForConfig(target_list, target_dicts, data, params, config_name)
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
-    user_config = params.get("generator_flags", {}).get("config", None)
-    if user_config:
-        GenerateOutputForConfig(target_list, target_dicts, data, params, user_config)
-    else:
-        config_names = target_dicts[target_list[0]]["configurations"]
-        if params["parallel"]:
-            try:
-                pool = multiprocessing.Pool(len(config_names))
-                arglists = []
-                for config_name in config_names:
-                    arglists.append(
-                        (target_list, target_dicts, data, params, config_name)
-                    )
-                    pool.map(CallGenerateOutputForConfig, arglists)
-            except KeyboardInterrupt as e:
-                pool.terminate()
-                raise e
-        else:
-            for config_name in config_names:
-                GenerateOutputForConfig(
-                    target_list, target_dicts, data, params, config_name
-                )
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
deleted file mode 100644
index 0ffa3bb..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2016 Ben Noordhuis . All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import gyp.common
-import gyp.xcode_emulation
-import json
-import os
-
-generator_additional_non_configuration_keys = []
-generator_additional_path_sections = []
-generator_extra_sources_for_rules = []
-generator_filelist_paths = None
-generator_supports_multiple_toolsets = True
-generator_wants_sorted_dependencies = False
-
-# Lifted from make.py.  The actual values don't matter much.
-generator_default_variables = {
-    "CONFIGURATION_NAME": "$(BUILDTYPE)",
-    "EXECUTABLE_PREFIX": "",
-    "EXECUTABLE_SUFFIX": "",
-    "INTERMEDIATE_DIR": "$(obj).$(TOOLSET)/$(TARGET)/geni",
-    "PRODUCT_DIR": "$(builddir)",
-    "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s",
-    "RULE_INPUT_EXT": "$(suffix $<)",
-    "RULE_INPUT_NAME": "$(notdir $<)",
-    "RULE_INPUT_PATH": "$(abspath $<)",
-    "RULE_INPUT_ROOT": "%(INPUT_ROOT)s",
-    "SHARED_INTERMEDIATE_DIR": "$(obj)/gen",
-    "SHARED_LIB_PREFIX": "lib",
-    "STATIC_LIB_PREFIX": "lib",
-    "STATIC_LIB_SUFFIX": ".a",
-}
-
-
-def IsMac(params):
-    return gyp.common.GetFlavor(params) == "mac"
-
-
-def CalculateVariables(default_variables, params):
-    default_variables.setdefault("OS", gyp.common.GetFlavor(params))
-
-
-def AddCommandsForTarget(cwd, target, params, per_config_commands):
-    output_dir = params["generator_flags"].get("output_dir", "out")
-    for configuration_name, configuration in target["configurations"].items():
-        if IsMac(params):
-            xcode_settings = gyp.xcode_emulation.XcodeSettings(target)
-            cflags = xcode_settings.GetCflags(configuration_name)
-            cflags_c = xcode_settings.GetCflagsC(configuration_name)
-            cflags_cc = xcode_settings.GetCflagsCC(configuration_name)
-        else:
-            cflags = configuration.get("cflags", [])
-            cflags_c = configuration.get("cflags_c", [])
-            cflags_cc = configuration.get("cflags_cc", [])
-
-        cflags_c = cflags + cflags_c
-        cflags_cc = cflags + cflags_cc
-
-        defines = configuration.get("defines", [])
-        defines = ["-D" + s for s in defines]
-
-        # TODO(bnoordhuis) Handle generated source files.
-        extensions = (".c", ".cc", ".cpp", ".cxx")
-        sources = [s for s in target.get("sources", []) if s.endswith(extensions)]
-
-        def resolve(filename):
-            return os.path.abspath(os.path.join(cwd, filename))
-
-        # TODO(bnoordhuis) Handle generated header files.
-        include_dirs = configuration.get("include_dirs", [])
-        include_dirs = [s for s in include_dirs if not s.startswith("$(obj)")]
-        includes = ["-I" + resolve(s) for s in include_dirs]
-
-        defines = gyp.common.EncodePOSIXShellList(defines)
-        includes = gyp.common.EncodePOSIXShellList(includes)
-        cflags_c = gyp.common.EncodePOSIXShellList(cflags_c)
-        cflags_cc = gyp.common.EncodePOSIXShellList(cflags_cc)
-
-        commands = per_config_commands.setdefault(configuration_name, [])
-        for source in sources:
-            file = resolve(source)
-            isc = source.endswith(".c")
-            cc = "cc" if isc else "c++"
-            cflags = cflags_c if isc else cflags_cc
-            command = " ".join(
-                (
-                    cc,
-                    defines,
-                    includes,
-                    cflags,
-                    "-c",
-                    gyp.common.EncodePOSIXShellArgument(file),
-                )
-            )
-            commands.append({"command": command, "directory": output_dir, "file": file})
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
-    per_config_commands = {}
-    for qualified_target, target in target_dicts.items():
-        build_file, target_name, toolset = gyp.common.ParseQualifiedTarget(
-            qualified_target
-        )
-        if IsMac(params):
-            settings = data[build_file]
-            gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(settings, target)
-        cwd = os.path.dirname(build_file)
-        AddCommandsForTarget(cwd, target, params, per_config_commands)
-
-    try:
-        output_dir = params["options"].generator_output
-    except (AttributeError, KeyError):
-        output_dir = params["generator_flags"].get("output_dir", "out")
-    for configuration_name, commands in per_config_commands.items():
-        filename = os.path.join(output_dir, configuration_name, "compile_commands.json")
-        gyp.common.EnsureDirExists(filename)
-        fp = open(filename, "w")
-        json.dump(commands, fp=fp, indent=0, check_circular=False)
-
-
-def PerformBuild(data, configurations, params):
-    pass
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
deleted file mode 100644
index 99d5c1f..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-
-import os
-import gyp
-import gyp.common
-import gyp.msvs_emulation
-import json
-
-generator_supports_multiple_toolsets = True
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_filelist_paths = {}
-
-generator_default_variables = {}
-for dirname in [
-    "INTERMEDIATE_DIR",
-    "SHARED_INTERMEDIATE_DIR",
-    "PRODUCT_DIR",
-    "LIB_DIR",
-    "SHARED_LIB_DIR",
-]:
-    # Some gyp steps fail if these are empty(!).
-    generator_default_variables[dirname] = "dir"
-for unused in [
-    "RULE_INPUT_PATH",
-    "RULE_INPUT_ROOT",
-    "RULE_INPUT_NAME",
-    "RULE_INPUT_DIRNAME",
-    "RULE_INPUT_EXT",
-    "EXECUTABLE_PREFIX",
-    "EXECUTABLE_SUFFIX",
-    "STATIC_LIB_PREFIX",
-    "STATIC_LIB_SUFFIX",
-    "SHARED_LIB_PREFIX",
-    "SHARED_LIB_SUFFIX",
-    "CONFIGURATION_NAME",
-]:
-    generator_default_variables[unused] = ""
-
-
-def CalculateVariables(default_variables, params):
-    generator_flags = params.get("generator_flags", {})
-    for key, val in generator_flags.items():
-        default_variables.setdefault(key, val)
-    default_variables.setdefault("OS", gyp.common.GetFlavor(params))
-
-    flavor = gyp.common.GetFlavor(params)
-    if flavor == "win":
-        gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
-
-
-def CalculateGeneratorInputInfo(params):
-    """Calculate the generator specific info that gets fed to input (called by
-  gyp)."""
-    generator_flags = params.get("generator_flags", {})
-    if generator_flags.get("adjust_static_libraries", False):
-        global generator_wants_static_library_dependencies_adjusted
-        generator_wants_static_library_dependencies_adjusted = True
-
-    toplevel = params["options"].toplevel_dir
-    generator_dir = os.path.relpath(params["options"].generator_output or ".")
-    # output_dir: relative path from generator_dir to the build directory.
-    output_dir = generator_flags.get("output_dir", "out")
-    qualified_out_dir = os.path.normpath(
-        os.path.join(toplevel, generator_dir, output_dir, "gypfiles")
-    )
-    global generator_filelist_paths
-    generator_filelist_paths = {
-        "toplevel": toplevel,
-        "qualified_out_dir": qualified_out_dir,
-    }
-
-
-def GenerateOutput(target_list, target_dicts, data, params):
-    # Map of target -> list of targets it depends on.
-    edges = {}
-
-    # Queue of targets to visit.
-    targets_to_visit = target_list[:]
-
-    while len(targets_to_visit) > 0:
-        target = targets_to_visit.pop()
-        if target in edges:
-            continue
-        edges[target] = []
-
-        for dep in target_dicts[target].get("dependencies", []):
-            edges[target].append(dep)
-            targets_to_visit.append(dep)
-
-    try:
-        filepath = params["generator_flags"]["output_dir"]
-    except KeyError:
-        filepath = "."
-    filename = os.path.join(filepath, "dump.json")
-    f = open(filename, "w")
-    json.dump(edges, f)
-    f.close()
-    print("Wrote json to %s." % filename)
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
deleted file mode 100644
index 52aeae6..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py
+++ /dev/null
@@ -1,461 +0,0 @@
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""GYP backend that generates Eclipse CDT settings files.
-
-This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
-files that can be imported into an Eclipse CDT project. The XML file contains a
-list of include paths and symbols (i.e. defines).
-
-Because a full .cproject definition is not created by this generator, it's not
-possible to properly define the include dirs and symbols for each file
-individually.  Instead, one set of includes/symbols is generated for the entire
-project.  This works fairly well (and is a vast improvement in general), but may
-still result in a few indexer issues here and there.
-
-This generator has no automated tests, so expect it to be broken.
-"""
-
-from xml.sax.saxutils import escape
-import os.path
-import subprocess
-import gyp
-import gyp.common
-import gyp.msvs_emulation
-import shlex
-import xml.etree.ElementTree as ET
-
-generator_wants_static_library_dependencies_adjusted = False
-
-generator_default_variables = {}
-
-for dirname in ["INTERMEDIATE_DIR", "PRODUCT_DIR", "LIB_DIR", "SHARED_LIB_DIR"]:
-    # Some gyp steps fail if these are empty(!), so we convert them to variables
-    generator_default_variables[dirname] = "$" + dirname
-
-for unused in [
-    "RULE_INPUT_PATH",
-    "RULE_INPUT_ROOT",
-    "RULE_INPUT_NAME",
-    "RULE_INPUT_DIRNAME",
-    "RULE_INPUT_EXT",
-    "EXECUTABLE_PREFIX",
-    "EXECUTABLE_SUFFIX",
-    "STATIC_LIB_PREFIX",
-    "STATIC_LIB_SUFFIX",
-    "SHARED_LIB_PREFIX",
-    "SHARED_LIB_SUFFIX",
-    "CONFIGURATION_NAME",
-]:
-    generator_default_variables[unused] = ""
-
-# Include dirs will occasionally use the SHARED_INTERMEDIATE_DIR variable as
-# part of the path when dealing with generated headers.  This value will be
-# replaced dynamically for each configuration.
-generator_default_variables["SHARED_INTERMEDIATE_DIR"] = "$SHARED_INTERMEDIATE_DIR"
-
-
-def CalculateVariables(default_variables, params):
-    generator_flags = params.get("generator_flags", {})
-    for key, val in generator_flags.items():
-        default_variables.setdefault(key, val)
-    flavor = gyp.common.GetFlavor(params)
-    default_variables.setdefault("OS", flavor)
-    if flavor == "win":
-        gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
-
-
-def CalculateGeneratorInputInfo(params):
-    """Calculate the generator specific info that gets fed to input (called by
-  gyp)."""
-    generator_flags = params.get("generator_flags", {})
-    if generator_flags.get("adjust_static_libraries", False):
-        global generator_wants_static_library_dependencies_adjusted
-        generator_wants_static_library_dependencies_adjusted = True
-
-
-def GetAllIncludeDirectories(
-    target_list,
-    target_dicts,
-    shared_intermediate_dirs,
-    config_name,
-    params,
-    compiler_path,
-):
-    """Calculate the set of include directories to be used.
-
-  Returns:
-    A list including all the include_dir's specified for every target followed
-    by any include directories that were added as cflag compiler options.
-  """
-
-    gyp_includes_set = set()
-    compiler_includes_list = []
-
-    # Find compiler's default include dirs.
-    if compiler_path:
-        command = shlex.split(compiler_path)
-        command.extend(["-E", "-xc++", "-v", "-"])
-        proc = subprocess.Popen(
-            args=command,
-            stdin=subprocess.PIPE,
-            stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE,
-        )
-        output = proc.communicate()[1].decode("utf-8")
-        # Extract the list of include dirs from the output, which has this format:
-        #   ...
-        #   #include "..." search starts here:
-        #   #include <...> search starts here:
-        #    /usr/include/c++/4.6
-        #    /usr/local/include
-        #   End of search list.
-        #   ...
-        in_include_list = False
-        for line in output.splitlines():
-            if line.startswith("#include"):
-                in_include_list = True
-                continue
-            if line.startswith("End of search list."):
-                break
-            if in_include_list:
-                include_dir = line.strip()
-                if include_dir not in compiler_includes_list:
-                    compiler_includes_list.append(include_dir)
-
-    flavor = gyp.common.GetFlavor(params)
-    if flavor == "win":
-        generator_flags = params.get("generator_flags", {})
-    for target_name in target_list:
-        target = target_dicts[target_name]
-        if config_name in target["configurations"]:
-            config = target["configurations"][config_name]
-
-            # Look for any include dirs that were explicitly added via cflags. This
-            # may be done in gyp files to force certain includes to come at the end.
-            # TODO(jgreenwald): Change the gyp files to not abuse cflags for this, and
-            # remove this.
-            if flavor == "win":
-                msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
-                cflags = msvs_settings.GetCflags(config_name)
-            else:
-                cflags = config["cflags"]
-            for cflag in cflags:
-                if cflag.startswith("-I"):
-                    include_dir = cflag[2:]
-                    if include_dir not in compiler_includes_list:
-                        compiler_includes_list.append(include_dir)
-
-            # Find standard gyp include dirs.
-            if "include_dirs" in config:
-                include_dirs = config["include_dirs"]
-                for shared_intermediate_dir in shared_intermediate_dirs:
-                    for include_dir in include_dirs:
-                        include_dir = include_dir.replace(
-                            "$SHARED_INTERMEDIATE_DIR", shared_intermediate_dir
-                        )
-                        if not os.path.isabs(include_dir):
-                            base_dir = os.path.dirname(target_name)
-
-                            include_dir = base_dir + "/" + include_dir
-                            include_dir = os.path.abspath(include_dir)
-
-                        gyp_includes_set.add(include_dir)
-
-    # Generate a list that has all the include dirs.
-    all_includes_list = list(gyp_includes_set)
-    all_includes_list.sort()
-    for compiler_include in compiler_includes_list:
-        if compiler_include not in gyp_includes_set:
-            all_includes_list.append(compiler_include)
-
-    # All done.
-    return all_includes_list
-
-
-def GetCompilerPath(target_list, data, options):
-    """Determine a command that can be used to invoke the compiler.
-
-  Returns:
-    If this is a gyp project that has explicit make settings, try to determine
-    the compiler from that.  Otherwise, see if a compiler was specified via the
-    CC_target environment variable.
-  """
-    # First, see if the compiler is configured in make's settings.
-    build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
-    make_global_settings_dict = data[build_file].get("make_global_settings", {})
-    for key, value in make_global_settings_dict:
-        if key in ["CC", "CXX"]:
-            return os.path.join(options.toplevel_dir, value)
-
-    # Check to see if the compiler was specified as an environment variable.
-    for key in ["CC_target", "CC", "CXX"]:
-        compiler = os.environ.get(key)
-        if compiler:
-            return compiler
-
-    return "gcc"
-
-
-def GetAllDefines(target_list, target_dicts, data, config_name, params, compiler_path):
-    """Calculate the defines for a project.
-
-  Returns:
-    A dict that includes explicit defines declared in gyp files along with all
-    of the default defines that the compiler uses.
-  """
-
-    # Get defines declared in the gyp files.
-    all_defines = {}
-    flavor = gyp.common.GetFlavor(params)
-    if flavor == "win":
-        generator_flags = params.get("generator_flags", {})
-    for target_name in target_list:
-        target = target_dicts[target_name]
-
-        if flavor == "win":
-            msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
-            extra_defines = msvs_settings.GetComputedDefines(config_name)
-        else:
-            extra_defines = []
-        if config_name in target["configurations"]:
-            config = target["configurations"][config_name]
-            target_defines = config["defines"]
-        else:
-            target_defines = []
-        for define in target_defines + extra_defines:
-            split_define = define.split("=", 1)
-            if len(split_define) == 1:
-                split_define.append("1")
-            if split_define[0].strip() in all_defines:
-                # Already defined
-                continue
-            all_defines[split_define[0].strip()] = split_define[1].strip()
-    # Get default compiler defines (if possible).
-    if flavor == "win":
-        return all_defines  # Default defines already processed in the loop above.
-    if compiler_path:
-        command = shlex.split(compiler_path)
-        command.extend(["-E", "-dM", "-"])
-        cpp_proc = subprocess.Popen(
-            args=command, cwd=".", stdin=subprocess.PIPE, stdout=subprocess.PIPE
-        )
-        cpp_output = cpp_proc.communicate()[0].decode("utf-8")
-        cpp_lines = cpp_output.split("\n")
-        for cpp_line in cpp_lines:
-            if not cpp_line.strip():
-                continue
-            cpp_line_parts = cpp_line.split(" ", 2)
-            key = cpp_line_parts[1]
-            val = cpp_line_parts[2] if len(cpp_line_parts) >= 3 else "1"
-            all_defines[key] = val
-
-    return all_defines
-
-
-def WriteIncludePaths(out, eclipse_langs, include_dirs):
-    """Write the includes section of a CDT settings export file."""
-
-    out.write(
-        '  
\n' - ) - out.write(' \n') - for lang in eclipse_langs: - out.write(' \n' % lang) - for include_dir in include_dirs: - out.write( - ' %s\n' - % include_dir - ) - out.write(" \n") - out.write("
\n") - - -def WriteMacros(out, eclipse_langs, defines): - """Write the macros section of a CDT settings export file.""" - - out.write( - '
\n' - ) - out.write(' \n') - for lang in eclipse_langs: - out.write(' \n' % lang) - for key in sorted(defines): - out.write( - " %s%s\n" - % (escape(key), escape(defines[key])) - ) - out.write(" \n") - out.write("
\n") - - -def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name): - options = params["options"] - generator_flags = params.get("generator_flags", {}) - - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.join(generator_flags.get("output_dir", "out"), config_name) - - toplevel_build = os.path.join(options.toplevel_dir, build_dir) - # Ninja uses out/Debug/gen while make uses out/Debug/obj/gen as the - # SHARED_INTERMEDIATE_DIR. Include both possible locations. - shared_intermediate_dirs = [ - os.path.join(toplevel_build, "obj", "gen"), - os.path.join(toplevel_build, "gen"), - ] - - GenerateCdtSettingsFile( - target_list, - target_dicts, - data, - params, - config_name, - os.path.join(toplevel_build, "eclipse-cdt-settings.xml"), - options, - shared_intermediate_dirs, - ) - GenerateClasspathFile( - target_list, - target_dicts, - options.toplevel_dir, - toplevel_build, - os.path.join(toplevel_build, "eclipse-classpath.xml"), - ) - - -def GenerateCdtSettingsFile( - target_list, - target_dicts, - data, - params, - config_name, - out_name, - options, - shared_intermediate_dirs, -): - gyp.common.EnsureDirExists(out_name) - with open(out_name, "w") as out: - out.write('\n') - out.write("\n") - - eclipse_langs = [ - "C++ Source File", - "C Source File", - "Assembly Source File", - "GNU C++", - "GNU C", - "Assembly", - ] - compiler_path = GetCompilerPath(target_list, data, options) - include_dirs = GetAllIncludeDirectories( - target_list, - target_dicts, - shared_intermediate_dirs, - config_name, - params, - compiler_path, - ) - WriteIncludePaths(out, eclipse_langs, include_dirs) - defines = GetAllDefines( - target_list, target_dicts, data, config_name, params, compiler_path - ) - WriteMacros(out, eclipse_langs, defines) - - out.write("\n") - - -def GenerateClasspathFile( - target_list, target_dicts, toplevel_dir, toplevel_build, out_name -): - """Generates a classpath file suitable for symbol navigation and code - completion of Java code (such as in Android projects) by finding all - .java and .jar files used as action inputs.""" - gyp.common.EnsureDirExists(out_name) - result = ET.Element("classpath") - - def AddElements(kind, paths): - # First, we need to normalize the paths so they are all relative to the - # toplevel dir. - rel_paths = set() - for path in paths: - if os.path.isabs(path): - rel_paths.add(os.path.relpath(path, toplevel_dir)) - else: - rel_paths.add(path) - - for path in sorted(rel_paths): - entry_element = ET.SubElement(result, "classpathentry") - entry_element.set("kind", kind) - entry_element.set("path", path) - - AddElements("lib", GetJavaJars(target_list, target_dicts, toplevel_dir)) - AddElements("src", GetJavaSourceDirs(target_list, target_dicts, toplevel_dir)) - # Include the standard JRE container and a dummy out folder - AddElements("con", ["org.eclipse.jdt.launching.JRE_CONTAINER"]) - # Include a dummy out folder so that Eclipse doesn't use the default /bin - # folder in the root of the project. - AddElements("output", [os.path.join(toplevel_build, ".eclipse-java-build")]) - - ET.ElementTree(result).write(out_name) - - -def GetJavaJars(target_list, target_dicts, toplevel_dir): - """Generates a sequence of all .jars used as inputs.""" - for target_name in target_list: - target = target_dicts[target_name] - for action in target.get("actions", []): - for input_ in action["inputs"]: - if os.path.splitext(input_)[1] == ".jar" and not input_.startswith("$"): - if os.path.isabs(input_): - yield input_ - else: - yield os.path.join(os.path.dirname(target_name), input_) - - -def GetJavaSourceDirs(target_list, target_dicts, toplevel_dir): - """Generates a sequence of all likely java package root directories.""" - for target_name in target_list: - target = target_dicts[target_name] - for action in target.get("actions", []): - for input_ in action["inputs"]: - if os.path.splitext(input_)[1] == ".java" and not input_.startswith( - "$" - ): - dir_ = os.path.dirname( - os.path.join(os.path.dirname(target_name), input_) - ) - # If there is a parent 'src' or 'java' folder, navigate up to it - - # these are canonical package root names in Chromium. This will - # break if 'src' or 'java' exists in the package structure. This - # could be further improved by inspecting the java file for the - # package name if this proves to be too fragile in practice. - parent_search = dir_ - while os.path.basename(parent_search) not in ["src", "java"]: - parent_search, _ = os.path.split(parent_search) - if not parent_search or parent_search == toplevel_dir: - # Didn't find a known root, just return the original path - yield dir_ - break - else: - yield parent_search - - -def GenerateOutput(target_list, target_dicts, data, params): - """Generate an XML settings file that can be imported into a CDT project.""" - - if params["options"].generator_output: - raise NotImplementedError("--generator_output not implemented for eclipse") - - user_config = params.get("generator_flags", {}).get("config", None) - if user_config: - GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) - else: - config_names = target_dicts[target_list[0]]["configurations"] - for config_name in config_names: - GenerateOutputForConfig( - target_list, target_dicts, data, params, config_name - ) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py deleted file mode 100644 index 4171704..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypd output module - -This module produces gyp input as its output. Output files are given the -.gypd extension to avoid overwriting the .gyp files that they are generated -from. Internal references to .gyp files (such as those found in -"dependencies" sections) are not adjusted to point to .gypd files instead; -unlike other paths, which are relative to the .gyp or .gypd file, such paths -are relative to the directory from which gyp was run to create the .gypd file. - -This generator module is intended to be a sample and a debugging aid, hence -the "d" for "debug" in .gypd. It is useful to inspect the results of the -various merges, expansions, and conditional evaluations performed by gyp -and to see a representation of what would be fed to a generator module. - -It's not advisable to rename .gypd files produced by this module to .gyp, -because they will have all merges, expansions, and evaluations already -performed and the relevant constructs not present in the output; paths to -dependencies may be wrong; and various sections that do not belong in .gyp -files such as such as "included_files" and "*_excluded" will be present. -Output will also be stripped of comments. This is not intended to be a -general-purpose gyp pretty-printer; for that, you probably just want to -run "pprint.pprint(eval(open('source.gyp').read()))", which will still strip -comments but won't do all of the other things done to this module's output. - -The specific formatting of the output generated by this module is subject -to change. -""" - - -import gyp.common -import pprint - - -# These variables should just be spit back out as variable references. -_generator_identity_variables = [ - "CONFIGURATION_NAME", - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "INTERMEDIATE_DIR", - "LIB_DIR", - "PRODUCT_DIR", - "RULE_INPUT_ROOT", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "RULE_INPUT_NAME", - "RULE_INPUT_PATH", - "SHARED_INTERMEDIATE_DIR", - "SHARED_LIB_DIR", - "SHARED_LIB_PREFIX", - "SHARED_LIB_SUFFIX", - "STATIC_LIB_PREFIX", - "STATIC_LIB_SUFFIX", -] - -# gypd doesn't define a default value for OS like many other generator -# modules. Specify "-D OS=whatever" on the command line to provide a value. -generator_default_variables = {} - -# gypd supports multiple toolsets -generator_supports_multiple_toolsets = True - -# TODO(mark): This always uses <, which isn't right. The input module should -# notify the generator to tell it which phase it is operating in, and this -# module should use < for the early phase and then switch to > for the late -# phase. Bonus points for carrying @ back into the output too. -for v in _generator_identity_variables: - generator_default_variables[v] = "<(%s)" % v - - -def GenerateOutput(target_list, target_dicts, data, params): - output_files = {} - for qualified_target in target_list: - [input_file, target] = gyp.common.ParseQualifiedTarget(qualified_target)[0:2] - - if input_file[-4:] != ".gyp": - continue - input_file_stem = input_file[:-4] - output_file = input_file_stem + params["options"].suffix + ".gypd" - - output_files[output_file] = output_files.get(output_file, input_file) - - for output_file, input_file in output_files.items(): - output = open(output_file, "w") - pprint.pprint(data[input_file], output) - output.close() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py deleted file mode 100644 index 82a07dd..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""gypsh output module - -gypsh is a GYP shell. It's not really a generator per se. All it does is -fire up an interactive Python session with a few local variables set to the -variables passed to the generator. Like gypd, it's intended as a debugging -aid, to facilitate the exploration of .gyp structures after being processed -by the input module. - -The expected usage is "gyp -f gypsh -D OS=desired_os". -""" - - -import code -import sys - - -# All of this stuff about generator variables was lovingly ripped from gypd.py. -# That module has a much better description of what's going on and why. -_generator_identity_variables = [ - "EXECUTABLE_PREFIX", - "EXECUTABLE_SUFFIX", - "INTERMEDIATE_DIR", - "PRODUCT_DIR", - "RULE_INPUT_ROOT", - "RULE_INPUT_DIRNAME", - "RULE_INPUT_EXT", - "RULE_INPUT_NAME", - "RULE_INPUT_PATH", - "SHARED_INTERMEDIATE_DIR", -] - -generator_default_variables = {} - -for v in _generator_identity_variables: - generator_default_variables[v] = "<(%s)" % v - - -def GenerateOutput(target_list, target_dicts, data, params): - locals = { - "target_list": target_list, - "target_dicts": target_dicts, - "data": data, - } - - # Use a banner that looks like the stock Python one and like what - # code.interact uses by default, but tack on something to indicate what - # locals are available, and identify gypsh. - banner = "Python {} on {}\nlocals.keys() = {}\ngypsh".format( - sys.version, - sys.platform, - repr(sorted(locals.keys())), - ) - - code.interact(banner, local=locals) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py deleted file mode 100644 index 1b99749..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +++ /dev/null @@ -1,2711 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Notes: -# -# This is all roughly based on the Makefile system used by the Linux -# kernel, but is a non-recursive make -- we put the entire dependency -# graph in front of make and let it figure it out. -# -# The code below generates a separate .mk file for each target, but -# all are sourced by the top-level Makefile. This means that all -# variables in .mk-files clobber one another. Be careful to use := -# where appropriate for immediate evaluation, and similarly to watch -# that you're not relying on a variable value to last between different -# .mk files. -# -# TODOs: -# -# Global settings and utility functions are currently stuffed in the -# toplevel Makefile. It may make sense to generate some .mk files on -# the side to keep the files readable. - - -import os -import re -import subprocess -import gyp -import gyp.common -import gyp.xcode_emulation -from gyp.common import GetEnvironFallback - -import hashlib - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "INTERMEDIATE_DIR": "$(obj).$(TOOLSET)/$(TARGET)/geni", - "SHARED_INTERMEDIATE_DIR": "$(obj)/gen", - "PRODUCT_DIR": "$(builddir)", - "RULE_INPUT_ROOT": "%(INPUT_ROOT)s", # This gets expanded by Python. - "RULE_INPUT_DIRNAME": "%(INPUT_DIRNAME)s", # This gets expanded by Python. - "RULE_INPUT_PATH": "$(abspath $<)", - "RULE_INPUT_EXT": "$(suffix $<)", - "RULE_INPUT_NAME": "$(notdir $<)", - "CONFIGURATION_NAME": "$(BUILDTYPE)", -} - -# Make supports multiple toolsets -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - -# Request sorted dependencies in the order from dependents to dependencies. -generator_wants_sorted_dependencies = False - -# Placates pylint. -generator_additional_non_configuration_keys = [] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] -generator_filelist_paths = None - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - flavor = gyp.common.GetFlavor(params) - if flavor == "mac": - default_variables.setdefault("OS", "mac") - default_variables.setdefault("SHARED_LIB_SUFFIX", ".dylib") - default_variables.setdefault( - "SHARED_LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - default_variables.setdefault( - "LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - - # Copy additional generator configuration data from Xcode, which is shared - # by the Mac Make generator. - import gyp.generator.xcode as xcode_generator - - global generator_additional_non_configuration_keys - generator_additional_non_configuration_keys = getattr( - xcode_generator, "generator_additional_non_configuration_keys", [] - ) - global generator_additional_path_sections - generator_additional_path_sections = getattr( - xcode_generator, "generator_additional_path_sections", [] - ) - global generator_extra_sources_for_rules - generator_extra_sources_for_rules = getattr( - xcode_generator, "generator_extra_sources_for_rules", [] - ) - COMPILABLE_EXTENSIONS.update({".m": "objc", ".mm": "objcxx"}) - else: - operating_system = flavor - if flavor == "android": - operating_system = "linux" # Keep this legacy behavior for now. - default_variables.setdefault("OS", operating_system) - if flavor == "aix": - default_variables.setdefault("SHARED_LIB_SUFFIX", ".a") - elif flavor == "zos": - default_variables.setdefault("SHARED_LIB_SUFFIX", ".x") - COMPILABLE_EXTENSIONS.update({".pli": "pli"}) - else: - default_variables.setdefault("SHARED_LIB_SUFFIX", ".so") - default_variables.setdefault("SHARED_LIB_DIR", "$(builddir)/lib.$(TOOLSET)") - default_variables.setdefault("LIB_DIR", "$(obj).$(TOOLSET)") - - -def CalculateGeneratorInputInfo(params): - """Calculate the generator specific info that gets fed to input (called by - gyp).""" - generator_flags = params.get("generator_flags", {}) - android_ndk_version = generator_flags.get("android_ndk_version", None) - # Android NDK requires a strict link order. - if android_ndk_version: - global generator_wants_sorted_dependencies - generator_wants_sorted_dependencies = True - - output_dir = params["options"].generator_output or params["options"].toplevel_dir - builddir_name = generator_flags.get("output_dir", "out") - qualified_out_dir = os.path.normpath( - os.path.join(output_dir, builddir_name, "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": params["options"].toplevel_dir, - "qualified_out_dir": qualified_out_dir, - } - - -# The .d checking code below uses these functions: -# wildcard, sort, foreach, shell, wordlist -# wildcard can handle spaces, the rest can't. -# Since I could find no way to make foreach work with spaces in filenames -# correctly, the .d files have spaces replaced with another character. The .d -# file for -# Chromium\ Framework.framework/foo -# is for example -# out/Release/.deps/out/Release/Chromium?Framework.framework/foo -# This is the replacement character. -SPACE_REPLACEMENT = "?" - - -LINK_COMMANDS_LINUX = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group - -# Note: this does not handle spaces in paths -define xargs - $(1) $(word 1,$(2)) -$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2)))) -endef - -define write-to-file - @: >$(1) -$(call xargs,@printf "%s\\n" >>$(1),$(2)) -endef - -OBJ_FILE_LIST := ar-file-list - -define create_archive - rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` - $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) - $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -endef - -define create_thin_archive - rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` - $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) - $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -endef - -# We support two kinds of shared objects (.so): -# 1) shared_library, which is just bundling together many dependent libraries -# into a link line. -# 2) loadable_module, which is generating a module intended for dlopen(). -# -# They differ only slightly: -# In the former case, we want to package all dependent code into the .so. -# In the latter case, we want to package just the API exposed by the -# outermost module. -# This means shared_library uses --whole-archive, while loadable_module doesn't. -# (Note that --whole-archive is incompatible with the --start-group used in -# normal linking.) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) -""" # noqa: E501 - -LINK_COMMANDS_MAC = """\ -quiet_cmd_alink = LIBTOOL-STATIC $@ -cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - -LINK_COMMANDS_ANDROID = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -# Note: this does not handle spaces in paths -define xargs - $(1) $(word 1,$(2)) -$(if $(word 2,$(2)),$(call xargs,$(1),$(wordlist 2,$(words $(2)),$(2)))) -endef - -define write-to-file - @: >$(1) -$(call xargs,@printf "%s\\n" >>$(1),$(2)) -endef - -OBJ_FILE_LIST := ar-file-list - -define create_archive - rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` - $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) - $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -endef - -define create_thin_archive - rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` - $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) - $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -endef - -# Due to circular dependencies between libraries :(, we wrap the -# special "figure out circular dependencies" flags around the entire -# input list during linking. -quiet_cmd_link = LINK($(TOOLSET)) $@ -quiet_cmd_link_host = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) -cmd_link_host = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) - -# Other shared-object link notes: -# - Set SONAME to the library filename so our binaries don't reference -# the local, absolute paths used on the link command-line. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) -quiet_cmd_solink_module_host = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module_host = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -LINK_COMMANDS_AIX = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -X32_64 crs $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -LINK_COMMANDS_OS400 = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) -X64 crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) -X64 crs $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -LINK_COMMANDS_OS390 = """\ -quiet_cmd_alink = AR($(TOOLSET)) $@ -cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) - -quiet_cmd_alink_thin = AR($(TOOLSET)) $@ -cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(LD_INPUTS) $(LIBS) - -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) -""" # noqa: E501 - - -# Header of toplevel Makefile. -# This should go into the build tree, but it's easier to keep it here for now. -SHARED_HEADER = ( - """\ -# We borrow heavily from the kernel build setup, though we are simpler since -# we don't have Kconfig tweaking settings on us. - -# The implicit make rules have it looking for RCS files, among other things. -# We instead explicitly write all the rules we care about. -# It's even quicker (saves ~200ms) to pass -r on the command line. -MAKEFLAGS=-r - -# The source directory tree. -srcdir := %(srcdir)s -abs_srcdir := $(abspath $(srcdir)) - -# The name of the builddir. -builddir_name ?= %(builddir)s - -# The V=1 flag on command line makes us verbosely print command lines. -ifdef V - quiet= -else - quiet=quiet_ -endif - -# Specify BUILDTYPE=Release on the command line for a release build. -BUILDTYPE ?= %(default_configuration)s - -# Directory all our build output goes into. -# Note that this must be two directories beneath src/ for unit tests to pass, -# as they reach into the src/ directory for data with relative paths. -builddir ?= $(builddir_name)/$(BUILDTYPE) -abs_builddir := $(abspath $(builddir)) -depsdir := $(builddir)/.deps - -# Object output directory. -obj := $(builddir)/obj -abs_obj := $(abspath $(obj)) - -# We build up a list of every single one of the targets so we can slurp in the -# generated dependency rule Makefiles in one pass. -all_deps := - -%(make_global_settings)s - -CC.target ?= %(CC.target)s -CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS) -CXX.target ?= %(CXX.target)s -CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS) -LINK.target ?= %(LINK.target)s -LDFLAGS.target ?= $(LDFLAGS) -AR.target ?= $(AR) -PLI.target ?= %(PLI.target)s - -# C++ apps need to be linked with g++. -LINK ?= $(CXX.target) - -# TODO(evan): move all cross-compilation logic to gyp-time so we don't need -# to replicate this environment fallback in make as well. -CC.host ?= %(CC.host)s -CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host) -CXX.host ?= %(CXX.host)s -CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host) -LINK.host ?= %(LINK.host)s -LDFLAGS.host ?= $(LDFLAGS_host) -AR.host ?= %(AR.host)s -PLI.host ?= %(PLI.host)s - -# Define a dir function that can handle spaces. -# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions -# "leading spaces cannot appear in the text of the first argument as written. -# These characters can be put into the argument value by variable substitution." -empty := -space := $(empty) $(empty) - -# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces -replace_spaces = $(subst $(space),""" - + SPACE_REPLACEMENT - + """,$1) -unreplace_spaces = $(subst """ - + SPACE_REPLACEMENT - + """,$(space),$1) -dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) - -# Flags to make gcc output dependency info. Note that you need to be -# careful here to use the flags that ccache and distcc can understand. -# We write to a dep file on the side first and then rename at the end -# so we can't end up with a broken dep file. -depfile = $(depsdir)/$(call replace_spaces,$@).d -DEPFLAGS = %(makedep_args)s -MF $(depfile).raw - -# We have to fixup the deps output in a few ways. -# (1) the file output should mention the proper .o file. -# ccache or distcc lose the path to the target, so we convert a rule of -# the form: -# foobar.o: DEP1 DEP2 -# into -# path/to/foobar.o: DEP1 DEP2 -# (2) we want missing files not to cause us to fail to build. -# We want to rewrite -# foobar.o: DEP1 DEP2 \\ -# DEP3 -# to -# DEP1: -# DEP2: -# DEP3: -# so if the files are missing, they're just considered phony rules. -# We have to do some pretty insane escaping to get those backslashes -# and dollar signs past make, the shell, and sed at the same time. -# Doesn't work with spaces, but that's fine: .d files have spaces in -# their names replaced with other characters.""" - r""" -define fixup_dep -# The depfile may not exist if the input file didn't have any #includes. -touch $(depfile).raw -# Fixup path as in (1). -sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef -""" - """ -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -%(extra_commands)s -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp %(copy_archive_args)s "$<" "$@") - -quiet_cmd_symlink = SYMLINK $@ -cmd_symlink = ln -sf "$<" "$@" - -%(link_commands)s -""" # noqa: E501 - r""" -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%%s\n' '$(call escape_quotes,$(1))' -""" - """ -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \\ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain """ - + SPACE_REPLACEMENT - + """ instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\\ - for p in $(POSTBUILDS); do\\ - eval $$p;\\ - E=$$?;\\ - if [ $$E -ne 0 ]; then\\ - break;\\ - fi;\\ - done;\\ - if [ $$E -ne 0 ]; then\\ - rm -rf "$@";\\ - exit $$E;\\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains """ - + SPACE_REPLACEMENT - + """ for -# spaces already and dirx strips the """ - + SPACE_REPLACEMENT - + """ characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word %(flock_index)d,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "%(default_target)s" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: %(default_target)s -%(default_target)s: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -""" # noqa: E501 -) - -SHARED_HEADER_MAC_COMMANDS = """ -quiet_cmd_objc = CXX($(TOOLSET)) $@ -cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_objcxx = CXX($(TOOLSET)) $@ -cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# Commands for precompiled header files. -quiet_cmd_pch_c = CXX($(TOOLSET)) $@ -cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ -cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_m = CXX($(TOOLSET)) $@ -cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< -quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ -cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# gyp-mac-tool is written next to the root Makefile by gyp. -# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd -# already. -quiet_cmd_mac_tool = MACTOOL $(4) $< -cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" - -quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ -cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) - -quiet_cmd_infoplist = INFOPLIST $@ -cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" -""" # noqa: E501 - - -def WriteRootHeaderSuffixRules(writer): - extensions = sorted(COMPILABLE_EXTENSIONS.keys(), key=str.lower) - - writer.write("# Suffix rules, putting all outputs into $(obj).\n") - for ext in extensions: - writer.write("$(obj).$(TOOLSET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD\n" % ext) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - - writer.write("\n# Try building from generated source, too.\n") - for ext in extensions: - writer.write( - "$(obj).$(TOOLSET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD\n" % ext - ) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - writer.write("\n") - for ext in extensions: - writer.write("$(obj).$(TOOLSET)/%%.o: $(obj)/%%%s FORCE_DO_CMD\n" % ext) - writer.write("\t@$(call do_cmd,%s,1)\n" % COMPILABLE_EXTENSIONS[ext]) - writer.write("\n") - - -SHARED_HEADER_OS390_COMMANDS = """ -PLIFLAGS.target ?= -qlp=64 -qlimits=extname=31 $(PLIFLAGS) -PLIFLAGS.host ?= -qlp=64 -qlimits=extname=31 $(PLIFLAGS) - -quiet_cmd_pli = PLI($(TOOLSET)) $@ -cmd_pli = $(PLI.$(TOOLSET)) $(GYP_PLIFLAGS) $(PLIFLAGS.$(TOOLSET)) -c $< && \ - if [ -f $(notdir $@) ]; then /bin/cp $(notdir $@) $@; else true; fi -""" - -SHARED_HEADER_SUFFIX_RULES_COMMENT1 = """\ -# Suffix rules, putting all outputs into $(obj). -""" - - -SHARED_HEADER_SUFFIX_RULES_COMMENT2 = """\ -# Try building from generated source, too. -""" - - -SHARED_FOOTER = """\ -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif -""" - -header = """\ -# This file is generated by gyp; do not edit. - -""" - -# Maps every compilable file extension to the do_cmd that compiles it. -COMPILABLE_EXTENSIONS = { - ".c": "cc", - ".cc": "cxx", - ".cpp": "cxx", - ".cxx": "cxx", - ".s": "cc", - ".S": "cc", -} - - -def Compilable(filename): - """Return true if the file is compilable (should be in OBJS).""" - return any(res for res in (filename.endswith(e) for e in COMPILABLE_EXTENSIONS)) - - -def Linkable(filename): - """Return true if the file is linkable (should be on the link line).""" - return filename.endswith(".o") - - -def Target(filename): - """Translate a compilable filename to its .o target.""" - return os.path.splitext(filename)[0] + ".o" - - -def EscapeShellArgument(s): - """Quotes an argument so that it will be interpreted literally by a POSIX - shell. Taken from - http://stackoverflow.com/questions/35817/whats-the-best-way-to-escape-ossystem-calls-in-python - """ - return "'" + s.replace("'", "'\\''") + "'" - - -def EscapeMakeVariableExpansion(s): - """Make has its own variable expansion syntax using $. We must escape it for - string to be interpreted literally.""" - return s.replace("$", "$$") - - -def EscapeCppDefine(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = EscapeShellArgument(s) - s = EscapeMakeVariableExpansion(s) - # '#' characters must be escaped even embedded in a string, else Make will - # treat it as the start of a comment. - return s.replace("#", r"\#") - - -def QuoteIfNecessary(string): - """TODO: Should this ideally be replaced with one or more of the above - functions?""" - if '"' in string: - string = '"' + string.replace('"', '\\"') + '"' - return string - - -def StringToMakefileVariable(string): - """Convert a string to a value that is acceptable as a make variable name.""" - return re.sub("[^a-zA-Z0-9_]", "_", string) - - -srcdir_prefix = "" - - -def Sourceify(path): - """Convert a path to its source directory form.""" - if "$(" in path: - return path - if os.path.isabs(path): - return path - return srcdir_prefix + path - - -def QuoteSpaces(s, quote=r"\ "): - return s.replace(" ", quote) - - -def SourceifyAndQuoteSpaces(path): - """Convert a path to its source directory form and quote spaces.""" - return QuoteSpaces(Sourceify(path)) - - -# Map from qualified target to path to output. -target_outputs = {} -# Map from qualified target to any linkable output. A subset -# of target_outputs. E.g. when mybinary depends on liba, we want to -# include liba in the linker line; when otherbinary depends on -# mybinary, we just want to build mybinary first. -target_link_deps = {} - - -class MakefileWriter: - """MakefileWriter packages up the writing of one target-specific foobar.mk. - - Its only real entry point is Write(), and is mostly used for namespacing. - """ - - def __init__(self, generator_flags, flavor): - self.generator_flags = generator_flags - self.flavor = flavor - - self.suffix_rules_srcdir = {} - self.suffix_rules_objdir1 = {} - self.suffix_rules_objdir2 = {} - - # Generate suffix rules for all compilable extensions. - for ext in COMPILABLE_EXTENSIONS: - # Suffix rules for source folder. - self.suffix_rules_srcdir.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(srcdir)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - - # Suffix rules for generated source files. - self.suffix_rules_objdir1.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj).$(TOOLSET)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - self.suffix_rules_objdir2.update( - { - ext: ( - """\ -$(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD -\t@$(call do_cmd,%s,1) -""" - % (ext, COMPILABLE_EXTENSIONS[ext]) - ) - } - ) - - def Write( - self, qualified_target, base_path, output_filename, spec, configs, part_of_all - ): - """The main entry point: writes a .mk file for a single target. - - Arguments: - qualified_target: target we're generating - base_path: path relative to source root we're building in, used to resolve - target-relative paths - output_filename: output .mk file name to write - spec, configs: gyp info - part_of_all: flag indicating this target is part of 'all' - """ - gyp.common.EnsureDirExists(output_filename) - - self.fp = open(output_filename, "w") - - self.fp.write(header) - - self.qualified_target = qualified_target - self.path = base_path - self.target = spec["target_name"] - self.type = spec["type"] - self.toolset = spec["toolset"] - - self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec) - if self.flavor == "mac": - self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec) - else: - self.xcode_settings = None - - deps, link_deps = self.ComputeDeps(spec) - - # Some of the generation below can add extra output, sources, or - # link dependencies. All of the out params of the functions that - # follow use names like extra_foo. - extra_outputs = [] - extra_sources = [] - extra_link_deps = [] - extra_mac_bundle_resources = [] - mac_bundle_deps = [] - - if self.is_mac_bundle: - self.output = self.ComputeMacBundleOutput(spec) - self.output_binary = self.ComputeMacBundleBinaryOutput(spec) - else: - self.output = self.output_binary = self.ComputeOutput(spec) - - self.is_standalone_static_library = bool( - spec.get("standalone_static_library", 0) - ) - self._INSTALLABLE_TARGETS = ("executable", "loadable_module", "shared_library") - if self.is_standalone_static_library or self.type in self._INSTALLABLE_TARGETS: - self.alias = os.path.basename(self.output) - install_path = self._InstallableTargetInstallPath() - else: - self.alias = self.output - install_path = self.output - - self.WriteLn("TOOLSET := " + self.toolset) - self.WriteLn("TARGET := " + self.target) - - # Actions must come first, since they can generate more OBJs for use below. - if "actions" in spec: - self.WriteActions( - spec["actions"], - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ) - - # Rules must be early like actions. - if "rules" in spec: - self.WriteRules( - spec["rules"], - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ) - - if "copies" in spec: - self.WriteCopies(spec["copies"], extra_outputs, part_of_all) - - # Bundle resources. - if self.is_mac_bundle: - all_mac_bundle_resources = ( - spec.get("mac_bundle_resources", []) + extra_mac_bundle_resources - ) - self.WriteMacBundleResources(all_mac_bundle_resources, mac_bundle_deps) - self.WriteMacInfoPlist(mac_bundle_deps) - - # Sources. - all_sources = spec.get("sources", []) + extra_sources - if all_sources: - self.WriteSources( - configs, - deps, - all_sources, - extra_outputs, - extra_link_deps, - part_of_all, - gyp.xcode_emulation.MacPrefixHeader( - self.xcode_settings, - lambda p: Sourceify(self.Absolutify(p)), - self.Pchify, - ), - ) - sources = [x for x in all_sources if Compilable(x)] - if sources: - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT1) - extensions = {os.path.splitext(s)[1] for s in sources} - for ext in extensions: - if ext in self.suffix_rules_srcdir: - self.WriteLn(self.suffix_rules_srcdir[ext]) - self.WriteLn(SHARED_HEADER_SUFFIX_RULES_COMMENT2) - for ext in extensions: - if ext in self.suffix_rules_objdir1: - self.WriteLn(self.suffix_rules_objdir1[ext]) - for ext in extensions: - if ext in self.suffix_rules_objdir2: - self.WriteLn(self.suffix_rules_objdir2[ext]) - self.WriteLn("# End of this set of suffix rules") - - # Add dependency from bundle to bundle binary. - if self.is_mac_bundle: - mac_bundle_deps.append(self.output_binary) - - self.WriteTarget( - spec, - configs, - deps, - extra_link_deps + link_deps, - mac_bundle_deps, - extra_outputs, - part_of_all, - ) - - # Update global list of target outputs, used in dependency tracking. - target_outputs[qualified_target] = install_path - - # Update global list of link dependencies. - if self.type in ("static_library", "shared_library"): - target_link_deps[qualified_target] = self.output_binary - - # Currently any versions have the same effect, but in future the behavior - # could be different. - if self.generator_flags.get("android_ndk_version", None): - self.WriteAndroidNdkModuleRule(self.target, all_sources, link_deps) - - self.fp.close() - - def WriteSubMake(self, output_filename, makefile_path, targets, build_dir): - """Write a "sub-project" Makefile. - - This is a small, wrapper Makefile that calls the top-level Makefile to build - the targets from a single gyp file (i.e. a sub-project). - - Arguments: - output_filename: sub-project Makefile name to write - makefile_path: path to the top-level Makefile - targets: list of "all" targets for this sub-project - build_dir: build output directory, relative to the sub-project - """ - gyp.common.EnsureDirExists(output_filename) - self.fp = open(output_filename, "w") - self.fp.write(header) - # For consistency with other builders, put sub-project build output in the - # sub-project dir (see test/subdirectory/gyptest-subdir-all.py). - self.WriteLn( - "export builddir_name ?= %s" - % os.path.join(os.path.dirname(output_filename), build_dir) - ) - self.WriteLn(".PHONY: all") - self.WriteLn("all:") - if makefile_path: - makefile_path = " -C " + makefile_path - self.WriteLn("\t$(MAKE){} {}".format(makefile_path, " ".join(targets))) - self.fp.close() - - def WriteActions( - self, - actions, - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ): - """Write Makefile code for any 'actions' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - actions (used to make other pieces dependent on these - actions) - part_of_all: flag indicating this target is part of 'all' - """ - env = self.GetSortedXcodeEnv() - for action in actions: - name = StringToMakefileVariable( - "{}_{}".format(self.qualified_target, action["action_name"]) - ) - self.WriteLn('### Rules for action "%s":' % action["action_name"]) - inputs = action["inputs"] - outputs = action["outputs"] - - # Build up a list of outputs. - # Collect the output dirs we'll need. - dirs = set() - for out in outputs: - dir = os.path.split(out)[0] - if dir: - dirs.add(dir) - if int(action.get("process_outputs_as_sources", False)): - extra_sources += outputs - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += outputs - - # Write the actual command. - action_commands = action["action"] - if self.flavor == "mac": - action_commands = [ - gyp.xcode_emulation.ExpandEnvVars(command, env) - for command in action_commands - ] - command = gyp.common.EncodePOSIXShellList(action_commands) - if "message" in action: - self.WriteLn( - "quiet_cmd_{} = ACTION {} $@".format(name, action["message"]) - ) - else: - self.WriteLn(f"quiet_cmd_{name} = ACTION {name} $@") - if len(dirs) > 0: - command = "mkdir -p %s" % " ".join(dirs) + "; " + command - - cd_action = "cd %s; " % Sourceify(self.path or ".") - - # command and cd_action get written to a toplevel variable called - # cmd_foo. Toplevel variables can't handle things that change per - # makefile like $(TARGET), so hardcode the target. - command = command.replace("$(TARGET)", self.target) - cd_action = cd_action.replace("$(TARGET)", self.target) - - # Set LD_LIBRARY_PATH in case the action runs an executable from this - # build which links to shared libs from this build. - # actions run on the host, so they should in theory only use host - # libraries, but until everything is made cross-compile safe, also use - # target libraries. - # TODO(piman): when everything is cross-compile safe, remove lib.target - if self.flavor in {"zos", "aix"}: - self.WriteLn( - "cmd_%s = LIBPATH=$(builddir)/lib.host:" - "$(builddir)/lib.target:$$LIBPATH; " - "export LIBPATH; " - "%s%s" % (name, cd_action, command) - ) - else: - self.WriteLn( - "cmd_%s = LD_LIBRARY_PATH=$(builddir)/lib.host:" - "$(builddir)/lib.target:$$LD_LIBRARY_PATH; " - "export LD_LIBRARY_PATH; " - "%s%s" % (name, cd_action, command) - ) - self.WriteLn() - outputs = [self.Absolutify(o) for o in outputs] - # The makefile rules are all relative to the top dir, but the gyp actions - # are defined relative to their containing dir. This replaces the obj - # variable for the action rule with an absolute version so that the output - # goes in the right place. - # Only write the 'obj' and 'builddir' rules for the "primary" output (:1); - # it's superfluous for the "extra outputs", and this avoids accidentally - # writing duplicate dummy rules for those outputs. - # Same for environment. - self.WriteLn("%s: obj := $(abs_obj)" % QuoteSpaces(outputs[0])) - self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(outputs[0])) - self.WriteSortedXcodeEnv(outputs[0], self.GetSortedXcodeEnv()) - - for input in inputs: - assert " " not in input, ( - "Spaces in action input filenames not supported (%s)" % input - ) - for output in outputs: - assert " " not in output, ( - "Spaces in action output filenames not supported (%s)" % output - ) - - # See the comment in WriteCopies about expanding env vars. - outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs] - inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs] - - self.WriteDoCmd( - outputs, - [Sourceify(self.Absolutify(i)) for i in inputs], - part_of_all=part_of_all, - command=name, - ) - - # Stuff the outputs in a variable so we can refer to them later. - outputs_variable = "action_%s_outputs" % name - self.WriteLn("{} := {}".format(outputs_variable, " ".join(outputs))) - extra_outputs.append("$(%s)" % outputs_variable) - self.WriteLn() - - self.WriteLn() - - def WriteRules( - self, - rules, - extra_sources, - extra_outputs, - extra_mac_bundle_resources, - part_of_all, - ): - """Write Makefile code for any 'rules' from the gyp input. - - extra_sources: a list that will be filled in with newly generated source - files, if any - extra_outputs: a list that will be filled in with any outputs of these - rules (used to make other pieces dependent on these rules) - part_of_all: flag indicating this target is part of 'all' - """ - env = self.GetSortedXcodeEnv() - for rule in rules: - name = StringToMakefileVariable( - "{}_{}".format(self.qualified_target, rule["rule_name"]) - ) - count = 0 - self.WriteLn("### Generated for rule %s:" % name) - - all_outputs = [] - - for rule_source in rule.get("rule_sources", []): - dirs = set() - (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) - (rule_source_root, rule_source_ext) = os.path.splitext( - rule_source_basename - ) - - outputs = [ - self.ExpandInputRoot(out, rule_source_root, rule_source_dirname) - for out in rule["outputs"] - ] - - for out in outputs: - dir = os.path.dirname(out) - if dir: - dirs.add(dir) - if int(rule.get("process_outputs_as_sources", False)): - extra_sources += outputs - if int(rule.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += outputs - inputs = [ - Sourceify(self.Absolutify(i)) - for i in [rule_source] + rule.get("inputs", []) - ] - actions = ["$(call do_cmd,%s_%d)" % (name, count)] - - if name == "resources_grit": - # HACK: This is ugly. Grit intentionally doesn't touch the - # timestamp of its output file when the file doesn't change, - # which is fine in hash-based dependency systems like scons - # and forge, but not kosher in the make world. After some - # discussion, hacking around it here seems like the least - # amount of pain. - actions += ["@touch --no-create $@"] - - # See the comment in WriteCopies about expanding env vars. - outputs = [gyp.xcode_emulation.ExpandEnvVars(o, env) for o in outputs] - inputs = [gyp.xcode_emulation.ExpandEnvVars(i, env) for i in inputs] - - outputs = [self.Absolutify(o) for o in outputs] - all_outputs += outputs - # Only write the 'obj' and 'builddir' rules for the "primary" output - # (:1); it's superfluous for the "extra outputs", and this avoids - # accidentally writing duplicate dummy rules for those outputs. - self.WriteLn("%s: obj := $(abs_obj)" % outputs[0]) - self.WriteLn("%s: builddir := $(abs_builddir)" % outputs[0]) - self.WriteMakeRule( - outputs, inputs, actions, command="%s_%d" % (name, count) - ) - # Spaces in rule filenames are not supported, but rule variables have - # spaces in them (e.g. RULE_INPUT_PATH expands to '$(abspath $<)'). - # The spaces within the variables are valid, so remove the variables - # before checking. - variables_with_spaces = re.compile(r"\$\([^ ]* \$<\)") - for output in outputs: - output = re.sub(variables_with_spaces, "", output) - assert " " not in output, ( - "Spaces in rule filenames not yet supported (%s)" % output - ) - self.WriteLn("all_deps += %s" % " ".join(outputs)) - - action = [ - self.ExpandInputRoot(ac, rule_source_root, rule_source_dirname) - for ac in rule["action"] - ] - mkdirs = "" - if len(dirs) > 0: - mkdirs = "mkdir -p %s; " % " ".join(dirs) - cd_action = "cd %s; " % Sourceify(self.path or ".") - - # action, cd_action, and mkdirs get written to a toplevel variable - # called cmd_foo. Toplevel variables can't handle things that change - # per makefile like $(TARGET), so hardcode the target. - if self.flavor == "mac": - action = [ - gyp.xcode_emulation.ExpandEnvVars(command, env) - for command in action - ] - action = gyp.common.EncodePOSIXShellList(action) - action = action.replace("$(TARGET)", self.target) - cd_action = cd_action.replace("$(TARGET)", self.target) - mkdirs = mkdirs.replace("$(TARGET)", self.target) - - # Set LD_LIBRARY_PATH in case the rule runs an executable from this - # build which links to shared libs from this build. - # rules run on the host, so they should in theory only use host - # libraries, but until everything is made cross-compile safe, also use - # target libraries. - # TODO(piman): when everything is cross-compile safe, remove lib.target - self.WriteLn( - "cmd_%(name)s_%(count)d = LD_LIBRARY_PATH=" - "$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; " - "export LD_LIBRARY_PATH; " - "%(cd_action)s%(mkdirs)s%(action)s" - % { - "action": action, - "cd_action": cd_action, - "count": count, - "mkdirs": mkdirs, - "name": name, - } - ) - self.WriteLn( - "quiet_cmd_%(name)s_%(count)d = RULE %(name)s_%(count)d $@" - % {"count": count, "name": name} - ) - self.WriteLn() - count += 1 - - outputs_variable = "rule_%s_outputs" % name - self.WriteList(all_outputs, outputs_variable) - extra_outputs.append("$(%s)" % outputs_variable) - - self.WriteLn("### Finished generating for rule: %s" % name) - self.WriteLn() - self.WriteLn("### Finished generating for all rules") - self.WriteLn("") - - def WriteCopies(self, copies, extra_outputs, part_of_all): - """Write Makefile code for any 'copies' from the gyp input. - - extra_outputs: a list that will be filled in with any outputs of this action - (used to make other pieces dependent on this action) - part_of_all: flag indicating this target is part of 'all' - """ - self.WriteLn("### Generated for copy rule.") - - variable = StringToMakefileVariable(self.qualified_target + "_copies") - outputs = [] - for copy in copies: - for path in copy["files"]: - # Absolutify() may call normpath, and will strip trailing slashes. - path = Sourceify(self.Absolutify(path)) - filename = os.path.split(path)[1] - output = Sourceify( - self.Absolutify(os.path.join(copy["destination"], filename)) - ) - - # If the output path has variables in it, which happens in practice for - # 'copies', writing the environment as target-local doesn't work, - # because the variables are already needed for the target name. - # Copying the environment variables into global make variables doesn't - # work either, because then the .d files will potentially contain spaces - # after variable expansion, and .d file handling cannot handle spaces. - # As a workaround, manually expand variables at gyp time. Since 'copies' - # can't run scripts, there's no need to write the env then. - # WriteDoCmd() will escape spaces for .d files. - env = self.GetSortedXcodeEnv() - output = gyp.xcode_emulation.ExpandEnvVars(output, env) - path = gyp.xcode_emulation.ExpandEnvVars(path, env) - self.WriteDoCmd([output], [path], "copy", part_of_all) - outputs.append(output) - self.WriteLn( - "{} = {}".format(variable, " ".join(QuoteSpaces(o) for o in outputs)) - ) - extra_outputs.append("$(%s)" % variable) - self.WriteLn() - - def WriteMacBundleResources(self, resources, bundle_deps): - """Writes Makefile code for 'mac_bundle_resources'.""" - self.WriteLn("### Generated for mac_bundle_resources") - - for output, res in gyp.xcode_emulation.GetMacBundleResources( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - [Sourceify(self.Absolutify(r)) for r in resources], - ): - _, ext = os.path.splitext(output) - if ext != ".xcassets": - # Make does not supports '.xcassets' emulation. - self.WriteDoCmd( - [output], [res], "mac_tool,,,copy-bundle-resource", part_of_all=True - ) - bundle_deps.append(output) - - def WriteMacInfoPlist(self, bundle_deps): - """Write Makefile code for bundle Info.plist files.""" - info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - lambda p: Sourceify(self.Absolutify(p)), - ) - if not info_plist: - return - if defines: - # Create an intermediate file to store preprocessed results. - intermediate_plist = "$(obj).$(TOOLSET)/$(TARGET)/" + os.path.basename( - info_plist - ) - self.WriteList( - defines, - intermediate_plist + ": INFOPLIST_DEFINES", - "-D", - quoter=EscapeCppDefine, - ) - self.WriteMakeRule( - [intermediate_plist], - [info_plist], - [ - "$(call do_cmd,infoplist)", - # "Convert" the plist so that any weird whitespace changes from the - # preprocessor do not affect the XML parser in mac_tool. - "@plutil -convert xml1 $@ $@", - ], - ) - info_plist = intermediate_plist - # plists can contain envvars and substitute them into the file. - self.WriteSortedXcodeEnv( - out, self.GetSortedXcodeEnv(additional_settings=extra_env) - ) - self.WriteDoCmd( - [out], [info_plist], "mac_tool,,,copy-info-plist", part_of_all=True - ) - bundle_deps.append(out) - - def WriteSources( - self, - configs, - deps, - sources, - extra_outputs, - extra_link_deps, - part_of_all, - precompiled_header, - ): - """Write Makefile code for any 'sources' from the gyp input. - These are source files necessary to build the current target. - - configs, deps, sources: input from gyp. - extra_outputs: a list of extra outputs this action should be dependent on; - used to serialize action/rules before compilation - extra_link_deps: a list that will be filled in with any outputs of - compilation (to be used in link lines) - part_of_all: flag indicating this target is part of 'all' - """ - - # Write configuration-specific variables for CFLAGS, etc. - for configname in sorted(configs.keys()): - config = configs[configname] - self.WriteList( - config.get("defines"), - "DEFS_%s" % configname, - prefix="-D", - quoter=EscapeCppDefine, - ) - - if self.flavor == "mac": - cflags = self.xcode_settings.GetCflags( - configname, arch=config.get("xcode_configuration_platform") - ) - cflags_c = self.xcode_settings.GetCflagsC(configname) - cflags_cc = self.xcode_settings.GetCflagsCC(configname) - cflags_objc = self.xcode_settings.GetCflagsObjC(configname) - cflags_objcc = self.xcode_settings.GetCflagsObjCC(configname) - else: - cflags = config.get("cflags") - cflags_c = config.get("cflags_c") - cflags_cc = config.get("cflags_cc") - - self.WriteLn("# Flags passed to all source files.") - self.WriteList(cflags, "CFLAGS_%s" % configname) - self.WriteLn("# Flags passed to only C files.") - self.WriteList(cflags_c, "CFLAGS_C_%s" % configname) - self.WriteLn("# Flags passed to only C++ files.") - self.WriteList(cflags_cc, "CFLAGS_CC_%s" % configname) - if self.flavor == "mac": - self.WriteLn("# Flags passed to only ObjC files.") - self.WriteList(cflags_objc, "CFLAGS_OBJC_%s" % configname) - self.WriteLn("# Flags passed to only ObjC++ files.") - self.WriteList(cflags_objcc, "CFLAGS_OBJCC_%s" % configname) - includes = config.get("include_dirs") - if includes: - includes = [Sourceify(self.Absolutify(i)) for i in includes] - self.WriteList(includes, "INCS_%s" % configname, prefix="-I") - - compilable = list(filter(Compilable, sources)) - objs = [self.Objectify(self.Absolutify(Target(c))) for c in compilable] - self.WriteList(objs, "OBJS") - - for obj in objs: - assert " " not in obj, "Spaces in object filenames not supported (%s)" % obj - self.WriteLn( - "# Add to the list of files we specially track " "dependencies for." - ) - self.WriteLn("all_deps += $(OBJS)") - self.WriteLn() - - # Make sure our dependencies are built first. - if deps: - self.WriteMakeRule( - ["$(OBJS)"], - deps, - comment="Make sure our dependencies are built " "before any of us.", - order_only=True, - ) - - # Make sure the actions and rules run first. - # If they generate any extra headers etc., the per-.o file dep tracking - # will catch the proper rebuilds, so order only is still ok here. - if extra_outputs: - self.WriteMakeRule( - ["$(OBJS)"], - extra_outputs, - comment="Make sure our actions/rules run " "before any of us.", - order_only=True, - ) - - pchdeps = precompiled_header.GetObjDependencies(compilable, objs) - if pchdeps: - self.WriteLn("# Dependencies from obj files to their precompiled headers") - for source, obj, gch in pchdeps: - self.WriteLn(f"{obj}: {gch}") - self.WriteLn("# End precompiled header dependencies") - - if objs: - extra_link_deps.append("$(OBJS)") - self.WriteLn( - """\ -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual.""" - ) - self.WriteLn("$(OBJS): TOOLSET := $(TOOLSET)") - self.WriteLn( - "$(OBJS): GYP_CFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("c") + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_C_$(BUILDTYPE))" - ) - self.WriteLn( - "$(OBJS): GYP_CXXFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("cc") + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_CC_$(BUILDTYPE))" - ) - if self.flavor == "mac": - self.WriteLn( - "$(OBJS): GYP_OBJCFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("m") - + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_C_$(BUILDTYPE)) " - "$(CFLAGS_OBJC_$(BUILDTYPE))" - ) - self.WriteLn( - "$(OBJS): GYP_OBJCXXFLAGS := " - "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "%s " % precompiled_header.GetInclude("mm") - + "$(CFLAGS_$(BUILDTYPE)) " - "$(CFLAGS_CC_$(BUILDTYPE)) " - "$(CFLAGS_OBJCC_$(BUILDTYPE))" - ) - - self.WritePchTargets(precompiled_header.GetPchBuildCommands()) - - # If there are any object files in our input file list, link them into our - # output. - extra_link_deps += [source for source in sources if Linkable(source)] - - self.WriteLn() - - def WritePchTargets(self, pch_commands): - """Writes make rules to compile prefix headers.""" - if not pch_commands: - return - - for gch, lang_flag, lang, input in pch_commands: - extra_flags = { - "c": "$(CFLAGS_C_$(BUILDTYPE))", - "cc": "$(CFLAGS_CC_$(BUILDTYPE))", - "m": "$(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE))", - "mm": "$(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE))", - }[lang] - var_name = { - "c": "GYP_PCH_CFLAGS", - "cc": "GYP_PCH_CXXFLAGS", - "m": "GYP_PCH_OBJCFLAGS", - "mm": "GYP_PCH_OBJCXXFLAGS", - }[lang] - self.WriteLn( - f"{gch}: {var_name} := {lang_flag} " + "$(DEFS_$(BUILDTYPE)) " - "$(INCS_$(BUILDTYPE)) " - "$(CFLAGS_$(BUILDTYPE)) " + extra_flags - ) - - self.WriteLn(f"{gch}: {input} FORCE_DO_CMD") - self.WriteLn("\t@$(call do_cmd,pch_%s,1)" % lang) - self.WriteLn("") - assert " " not in gch, "Spaces in gch filenames not supported (%s)" % gch - self.WriteLn("all_deps += %s" % gch) - self.WriteLn("") - - def ComputeOutputBasename(self, spec): - """Return the 'output basename' of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - 'libfoobar.so' - """ - assert not self.is_mac_bundle - - if self.flavor == "mac" and self.type in ( - "static_library", - "executable", - "shared_library", - "loadable_module", - ): - return self.xcode_settings.GetExecutablePath() - - target = spec["target_name"] - target_prefix = "" - target_ext = "" - if self.type == "static_library": - if target[:3] == "lib": - target = target[3:] - target_prefix = "lib" - target_ext = ".a" - elif self.type in ("loadable_module", "shared_library"): - if target[:3] == "lib": - target = target[3:] - target_prefix = "lib" - if self.flavor == "aix": - target_ext = ".a" - elif self.flavor == "zos": - target_ext = ".x" - else: - target_ext = ".so" - elif self.type == "none": - target = "%s.stamp" % target - elif self.type != "executable": - print( - "ERROR: What output file should be generated?", - "type", - self.type, - "target", - target, - ) - - target_prefix = spec.get("product_prefix", target_prefix) - target = spec.get("product_name", target) - product_ext = spec.get("product_extension") - if product_ext: - target_ext = "." + product_ext - - return target_prefix + target + target_ext - - def _InstallImmediately(self): - return ( - self.toolset == "target" - and self.flavor == "mac" - and self.type - in ("static_library", "executable", "shared_library", "loadable_module") - ) - - def ComputeOutput(self, spec): - """Return the 'output' (full output path) of a gyp spec. - - E.g., the loadable module 'foobar' in directory 'baz' will produce - '$(obj)/baz/libfoobar.so' - """ - assert not self.is_mac_bundle - - path = os.path.join("$(obj)." + self.toolset, self.path) - if self.type == "executable" or self._InstallImmediately(): - path = "$(builddir)" - path = spec.get("product_dir", path) - return os.path.join(path, self.ComputeOutputBasename(spec)) - - def ComputeMacBundleOutput(self, spec): - """Return the 'output' (full output path) to a bundle output directory.""" - assert self.is_mac_bundle - path = generator_default_variables["PRODUCT_DIR"] - return os.path.join(path, self.xcode_settings.GetWrapperName()) - - def ComputeMacBundleBinaryOutput(self, spec): - """Return the 'output' (full output path) to the binary in a bundle.""" - path = generator_default_variables["PRODUCT_DIR"] - return os.path.join(path, self.xcode_settings.GetExecutablePath()) - - def ComputeDeps(self, spec): - """Compute the dependencies of a gyp spec. - - Returns a tuple (deps, link_deps), where each is a list of - filenames that will need to be put in front of make for either - building (deps) or linking (link_deps). - """ - deps = [] - link_deps = [] - if "dependencies" in spec: - deps.extend( - [ - target_outputs[dep] - for dep in spec["dependencies"] - if target_outputs[dep] - ] - ) - for dep in spec["dependencies"]: - if dep in target_link_deps: - link_deps.append(target_link_deps[dep]) - deps.extend(link_deps) - # TODO: It seems we need to transitively link in libraries (e.g. -lfoo)? - # This hack makes it work: - # link_deps.extend(spec.get('libraries', [])) - return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps)) - - def GetSharedObjectFromSidedeck(self, sidedeck): - """Return the shared object files based on sidedeck""" - return re.sub(r"\.x$", ".so", sidedeck) - - def GetUnversionedSidedeckFromSidedeck(self, sidedeck): - """Return the shared object files based on sidedeck""" - return re.sub(r"\.\d+\.x$", ".x", sidedeck) - - def WriteDependencyOnExtraOutputs(self, target, extra_outputs): - self.WriteMakeRule( - [self.output_binary], - extra_outputs, - comment="Build our special outputs first.", - order_only=True, - ) - - def WriteTarget( - self, spec, configs, deps, link_deps, bundle_deps, extra_outputs, part_of_all - ): - """Write Makefile code to produce the final target of the gyp spec. - - spec, configs: input from gyp. - deps, link_deps: dependency lists; see ComputeDeps() - extra_outputs: any extra outputs that our target should depend on - part_of_all: flag indicating this target is part of 'all' - """ - - self.WriteLn("### Rules for final target.") - - if extra_outputs: - self.WriteDependencyOnExtraOutputs(self.output_binary, extra_outputs) - self.WriteMakeRule( - extra_outputs, - deps, - comment=("Preserve order dependency of " "special output on deps."), - order_only=True, - ) - - target_postbuilds = {} - if self.type != "none": - for configname in sorted(configs.keys()): - config = configs[configname] - if self.flavor == "mac": - ldflags = self.xcode_settings.GetLdflags( - configname, - generator_default_variables["PRODUCT_DIR"], - lambda p: Sourceify(self.Absolutify(p)), - arch=config.get("xcode_configuration_platform"), - ) - - # TARGET_POSTBUILDS_$(BUILDTYPE) is added to postbuilds later on. - gyp_to_build = gyp.common.InvertRelativePath(self.path) - target_postbuild = self.xcode_settings.AddImplicitPostbuilds( - configname, - QuoteSpaces( - os.path.normpath(os.path.join(gyp_to_build, self.output)) - ), - QuoteSpaces( - os.path.normpath( - os.path.join(gyp_to_build, self.output_binary) - ) - ), - ) - if target_postbuild: - target_postbuilds[configname] = target_postbuild - else: - ldflags = config.get("ldflags", []) - # Compute an rpath for this output if needed. - if any(dep.endswith(".so") or ".so." in dep for dep in deps): - # We want to get the literal string "$ORIGIN" - # into the link command, so we need lots of escaping. - ldflags.append(r"-Wl,-rpath=\$$ORIGIN/") - ldflags.append(r"-Wl,-rpath-link=\$(builddir)/") - library_dirs = config.get("library_dirs", []) - ldflags += [("-L%s" % library_dir) for library_dir in library_dirs] - self.WriteList(ldflags, "LDFLAGS_%s" % configname) - if self.flavor == "mac": - self.WriteList( - self.xcode_settings.GetLibtoolflags(configname), - "LIBTOOLFLAGS_%s" % configname, - ) - libraries = spec.get("libraries") - if libraries: - # Remove duplicate entries - libraries = gyp.common.uniquer(libraries) - if self.flavor == "mac": - libraries = self.xcode_settings.AdjustLibraries(libraries) - self.WriteList(libraries, "LIBS") - self.WriteLn( - "%s: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))" - % QuoteSpaces(self.output_binary) - ) - self.WriteLn("%s: LIBS := $(LIBS)" % QuoteSpaces(self.output_binary)) - - if self.flavor == "mac": - self.WriteLn( - "%s: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE))" - % QuoteSpaces(self.output_binary) - ) - - # Postbuild actions. Like actions, but implicitly depend on the target's - # output. - postbuilds = [] - if self.flavor == "mac": - if target_postbuilds: - postbuilds.append("$(TARGET_POSTBUILDS_$(BUILDTYPE))") - postbuilds.extend(gyp.xcode_emulation.GetSpecPostbuildCommands(spec)) - - if postbuilds: - # Envvars may be referenced by TARGET_POSTBUILDS_$(BUILDTYPE), - # so we must output its definition first, since we declare variables - # using ":=". - self.WriteSortedXcodeEnv(self.output, self.GetSortedXcodePostbuildEnv()) - - for configname in target_postbuilds: - self.WriteLn( - "%s: TARGET_POSTBUILDS_%s := %s" - % ( - QuoteSpaces(self.output), - configname, - gyp.common.EncodePOSIXShellList(target_postbuilds[configname]), - ) - ) - - # Postbuilds expect to be run in the gyp file's directory, so insert an - # implicit postbuild to cd to there. - postbuilds.insert(0, gyp.common.EncodePOSIXShellList(["cd", self.path])) - for i, postbuild in enumerate(postbuilds): - if not postbuild.startswith("$"): - postbuilds[i] = EscapeShellArgument(postbuild) - self.WriteLn("%s: builddir := $(abs_builddir)" % QuoteSpaces(self.output)) - self.WriteLn( - "%s: POSTBUILDS := %s" - % (QuoteSpaces(self.output), " ".join(postbuilds)) - ) - - # A bundle directory depends on its dependencies such as bundle resources - # and bundle binary. When all dependencies have been built, the bundle - # needs to be packaged. - if self.is_mac_bundle: - # If the framework doesn't contain a binary, then nothing depends - # on the actions -- make the framework depend on them directly too. - self.WriteDependencyOnExtraOutputs(self.output, extra_outputs) - - # Bundle dependencies. Note that the code below adds actions to this - # target, so if you move these two lines, move the lines below as well. - self.WriteList([QuoteSpaces(dep) for dep in bundle_deps], "BUNDLE_DEPS") - self.WriteLn("%s: $(BUNDLE_DEPS)" % QuoteSpaces(self.output)) - - # After the framework is built, package it. Needs to happen before - # postbuilds, since postbuilds depend on this. - if self.type in ("shared_library", "loadable_module"): - self.WriteLn( - "\t@$(call do_cmd,mac_package_framework,,,%s)" - % self.xcode_settings.GetFrameworkVersion() - ) - - # Bundle postbuilds can depend on the whole bundle, so run them after - # the bundle is packaged, not already after the bundle binary is done. - if postbuilds: - self.WriteLn("\t@$(call do_postbuilds)") - postbuilds = [] # Don't write postbuilds for target's output. - - # Needed by test/mac/gyptest-rebuild.py. - self.WriteLn("\t@true # No-op, used by tests") - - # Since this target depends on binary and resources which are in - # nested subfolders, the framework directory will be older than - # its dependencies usually. To prevent this rule from executing - # on every build (expensive, especially with postbuilds), expliclity - # update the time on the framework directory. - self.WriteLn("\t@touch -c %s" % QuoteSpaces(self.output)) - - if postbuilds: - assert not self.is_mac_bundle, ( - "Postbuilds for bundles should be done " - "on the bundle, not the binary (target '%s')" % self.target - ) - assert "product_dir" not in spec, ( - "Postbuilds do not work with " "custom product_dir" - ) - - if self.type == "executable": - self.WriteLn( - "%s: LD_INPUTS := %s" - % ( - QuoteSpaces(self.output_binary), - " ".join(QuoteSpaces(dep) for dep in link_deps), - ) - ) - if self.toolset == "host" and self.flavor == "android": - self.WriteDoCmd( - [self.output_binary], - link_deps, - "link_host", - part_of_all, - postbuilds=postbuilds, - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "link", - part_of_all, - postbuilds=postbuilds, - ) - - elif self.type == "static_library": - for link_dep in link_deps: - assert " " not in link_dep, ( - "Spaces in alink input filenames not supported (%s)" % link_dep - ) - if ( - self.flavor not in ("mac", "openbsd", "netbsd", "win") - and not self.is_standalone_static_library - ): - if self.flavor in ("linux", "android"): - self.WriteMakeRule( - [self.output_binary], - link_deps, - actions=["$(call create_thin_archive,$@,$^)"], - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "alink_thin", - part_of_all, - postbuilds=postbuilds, - ) - else: - if self.flavor in ("linux", "android"): - self.WriteMakeRule( - [self.output_binary], - link_deps, - actions=["$(call create_archive,$@,$^)"], - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "alink", - part_of_all, - postbuilds=postbuilds, - ) - elif self.type == "shared_library": - self.WriteLn( - "%s: LD_INPUTS := %s" - % ( - QuoteSpaces(self.output_binary), - " ".join(QuoteSpaces(dep) for dep in link_deps), - ) - ) - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink", - part_of_all, - postbuilds=postbuilds, - ) - # z/OS has a .so target as well as a sidedeck .x target - if self.flavor == "zos": - self.WriteLn( - "%s: %s" - % ( - QuoteSpaces( - self.GetSharedObjectFromSidedeck(self.output_binary) - ), - QuoteSpaces(self.output_binary), - ) - ) - elif self.type == "loadable_module": - for link_dep in link_deps: - assert " " not in link_dep, ( - "Spaces in module input filenames not supported (%s)" % link_dep - ) - if self.toolset == "host" and self.flavor == "android": - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink_module_host", - part_of_all, - postbuilds=postbuilds, - ) - else: - self.WriteDoCmd( - [self.output_binary], - link_deps, - "solink_module", - part_of_all, - postbuilds=postbuilds, - ) - elif self.type == "none": - # Write a stamp line. - self.WriteDoCmd( - [self.output_binary], deps, "touch", part_of_all, postbuilds=postbuilds - ) - else: - print("WARNING: no output for", self.type, self.target) - - # Add an alias for each target (if there are any outputs). - # Installable target aliases are created below. - if (self.output and self.output != self.target) and ( - self.type not in self._INSTALLABLE_TARGETS - ): - self.WriteMakeRule( - [self.target], [self.output], comment="Add target alias", phony=True - ) - if part_of_all: - self.WriteMakeRule( - ["all"], - [self.target], - comment='Add target alias to "all" target.', - phony=True, - ) - - # Add special-case rules for our installable targets. - # 1) They need to install to the build dir or "product" dir. - # 2) They get shortcuts for building (e.g. "make chrome"). - # 3) They are part of "make all". - if self.type in self._INSTALLABLE_TARGETS or self.is_standalone_static_library: - if self.type == "shared_library": - file_desc = "shared library" - elif self.type == "static_library": - file_desc = "static library" - else: - file_desc = "executable" - install_path = self._InstallableTargetInstallPath() - installable_deps = [] - if self.flavor != "zos": - installable_deps.append(self.output) - if ( - self.flavor == "mac" - and "product_dir" not in spec - and self.toolset == "target" - ): - # On mac, products are created in install_path immediately. - assert install_path == self.output, f"{install_path} != {self.output}" - - # Point the target alias to the final binary output. - self.WriteMakeRule( - [self.target], [install_path], comment="Add target alias", phony=True - ) - if install_path != self.output: - assert not self.is_mac_bundle # See comment a few lines above. - self.WriteDoCmd( - [install_path], - [self.output], - "copy", - comment="Copy this to the %s output path." % file_desc, - part_of_all=part_of_all, - ) - if self.flavor != "zos": - installable_deps.append(install_path) - if self.flavor == "zos" and self.type == "shared_library": - # lib.target/libnode.so has a dependency on $(obj).target/libnode.so - self.WriteDoCmd( - [self.GetSharedObjectFromSidedeck(install_path)], - [self.GetSharedObjectFromSidedeck(self.output)], - "copy", - comment="Copy this to the %s output path." % file_desc, - part_of_all=part_of_all, - ) - # Create a symlink of libnode.x to libnode.version.x - self.WriteDoCmd( - [self.GetUnversionedSidedeckFromSidedeck(install_path)], - [install_path], - "symlink", - comment="Symlnk this to the %s output path." % file_desc, - part_of_all=part_of_all, - ) - # Place libnode.version.so and libnode.x symlink in lib.target dir - installable_deps.append(self.GetSharedObjectFromSidedeck(install_path)) - installable_deps.append( - self.GetUnversionedSidedeckFromSidedeck(install_path) - ) - if self.alias not in (self.output, self.target): - self.WriteMakeRule( - [self.alias], - installable_deps, - comment="Short alias for building this %s." % file_desc, - phony=True, - ) - if self.flavor == "zos" and self.type == "shared_library": - # Make sure that .x symlink target is run - self.WriteMakeRule( - ["all"], - [ - self.GetUnversionedSidedeckFromSidedeck(install_path), - self.GetSharedObjectFromSidedeck(install_path), - ], - comment='Add %s to "all" target.' % file_desc, - phony=True, - ) - elif part_of_all: - self.WriteMakeRule( - ["all"], - [install_path], - comment='Add %s to "all" target.' % file_desc, - phony=True, - ) - - def WriteList(self, value_list, variable=None, prefix="", quoter=QuoteIfNecessary): - """Write a variable definition that is a list of values. - - E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out - foo = blaha blahb - but in a pretty-printed style. - """ - values = "" - if value_list: - value_list = [quoter(prefix + value) for value in value_list] - values = " \\\n\t" + " \\\n\t".join(value_list) - self.fp.write(f"{variable} :={values}\n\n") - - def WriteDoCmd( - self, outputs, inputs, command, part_of_all, comment=None, postbuilds=False - ): - """Write a Makefile rule that uses do_cmd. - - This makes the outputs dependent on the command line that was run, - as well as support the V= make command line flag. - """ - suffix = "" - if postbuilds: - assert "," not in command - suffix = ",,1" # Tell do_cmd to honor $POSTBUILDS - self.WriteMakeRule( - outputs, - inputs, - actions=[f"$(call do_cmd,{command}{suffix})"], - comment=comment, - command=command, - force=True, - ) - # Add our outputs to the list of targets we read depfiles from. - # all_deps is only used for deps file reading, and for deps files we replace - # spaces with ? because escaping doesn't work with make's $(sort) and - # other functions. - outputs = [QuoteSpaces(o, SPACE_REPLACEMENT) for o in outputs] - self.WriteLn("all_deps += %s" % " ".join(outputs)) - - def WriteMakeRule( - self, - outputs, - inputs, - actions=None, - comment=None, - order_only=False, - force=False, - phony=False, - command=None, - ): - """Write a Makefile rule, with some extra tricks. - - outputs: a list of outputs for the rule (note: this is not directly - supported by make; see comments below) - inputs: a list of inputs for the rule - actions: a list of shell commands to run for the rule - comment: a comment to put in the Makefile above the rule (also useful - for making this Python script's code self-documenting) - order_only: if true, makes the dependency order-only - force: if true, include FORCE_DO_CMD as an order-only dep - phony: if true, the rule does not actually generate the named output, the - output is just a name to run the rule - command: (optional) command name to generate unambiguous labels - """ - outputs = [QuoteSpaces(o) for o in outputs] - inputs = [QuoteSpaces(i) for i in inputs] - - if comment: - self.WriteLn("# " + comment) - if phony: - self.WriteLn(".PHONY: " + " ".join(outputs)) - if actions: - self.WriteLn("%s: TOOLSET := $(TOOLSET)" % outputs[0]) - force_append = " FORCE_DO_CMD" if force else "" - - if order_only: - # Order only rule: Just write a simple rule. - # TODO(evanm): just make order_only a list of deps instead of this hack. - self.WriteLn( - "{}: | {}{}".format(" ".join(outputs), " ".join(inputs), force_append) - ) - elif len(outputs) == 1: - # Regular rule, one output: Just write a simple rule. - self.WriteLn("{}: {}{}".format(outputs[0], " ".join(inputs), force_append)) - else: - # Regular rule, more than one output: Multiple outputs are tricky in - # make. We will write three rules: - # - All outputs depend on an intermediate file. - # - Make .INTERMEDIATE depend on the intermediate. - # - The intermediate file depends on the inputs and executes the - # actual command. - # - The intermediate recipe will 'touch' the intermediate file. - # - The multi-output rule will have an do-nothing recipe. - - # Hash the target name to avoid generating overlong filenames. - cmddigest = hashlib.sha1( - (command or self.target).encode("utf-8") - ).hexdigest() - intermediate = "%s.intermediate" % cmddigest - self.WriteLn("{}: {}".format(" ".join(outputs), intermediate)) - self.WriteLn("\t%s" % "@:") - self.WriteLn("{}: {}".format(".INTERMEDIATE", intermediate)) - self.WriteLn( - "{}: {}{}".format(intermediate, " ".join(inputs), force_append) - ) - actions.insert(0, "$(call do_cmd,touch)") - - if actions: - for action in actions: - self.WriteLn("\t%s" % action) - self.WriteLn() - - def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps): - """Write a set of LOCAL_XXX definitions for Android NDK. - - These variable definitions will be used by Android NDK but do nothing for - non-Android applications. - - Arguments: - module_name: Android NDK module name, which must be unique among all - module names. - all_sources: A list of source files (will be filtered by Compilable). - link_deps: A list of link dependencies, which must be sorted in - the order from dependencies to dependents. - """ - if self.type not in ("executable", "shared_library", "static_library"): - return - - self.WriteLn("# Variable definitions for Android applications") - self.WriteLn("include $(CLEAR_VARS)") - self.WriteLn("LOCAL_MODULE := " + module_name) - self.WriteLn( - "LOCAL_CFLAGS := $(CFLAGS_$(BUILDTYPE)) " - "$(DEFS_$(BUILDTYPE)) " - # LOCAL_CFLAGS is applied to both of C and C++. There is - # no way to specify $(CFLAGS_C_$(BUILDTYPE)) only for C - # sources. - "$(CFLAGS_C_$(BUILDTYPE)) " - # $(INCS_$(BUILDTYPE)) includes the prefix '-I' while - # LOCAL_C_INCLUDES does not expect it. So put it in - # LOCAL_CFLAGS. - "$(INCS_$(BUILDTYPE))" - ) - # LOCAL_CXXFLAGS is obsolete and LOCAL_CPPFLAGS is preferred. - self.WriteLn("LOCAL_CPPFLAGS := $(CFLAGS_CC_$(BUILDTYPE))") - self.WriteLn("LOCAL_C_INCLUDES :=") - self.WriteLn("LOCAL_LDLIBS := $(LDFLAGS_$(BUILDTYPE)) $(LIBS)") - - # Detect the C++ extension. - cpp_ext = {".cc": 0, ".cpp": 0, ".cxx": 0} - default_cpp_ext = ".cpp" - for filename in all_sources: - ext = os.path.splitext(filename)[1] - if ext in cpp_ext: - cpp_ext[ext] += 1 - if cpp_ext[ext] > cpp_ext[default_cpp_ext]: - default_cpp_ext = ext - self.WriteLn("LOCAL_CPP_EXTENSION := " + default_cpp_ext) - - self.WriteList( - list(map(self.Absolutify, filter(Compilable, all_sources))), - "LOCAL_SRC_FILES", - ) - - # Filter out those which do not match prefix and suffix and produce - # the resulting list without prefix and suffix. - def DepsToModules(deps, prefix, suffix): - modules = [] - for filepath in deps: - filename = os.path.basename(filepath) - if filename.startswith(prefix) and filename.endswith(suffix): - modules.append(filename[len(prefix) : -len(suffix)]) - return modules - - # Retrieve the default value of 'SHARED_LIB_SUFFIX' - params = {"flavor": "linux"} - default_variables = {} - CalculateVariables(default_variables, params) - - self.WriteList( - DepsToModules( - link_deps, - generator_default_variables["SHARED_LIB_PREFIX"], - default_variables["SHARED_LIB_SUFFIX"], - ), - "LOCAL_SHARED_LIBRARIES", - ) - self.WriteList( - DepsToModules( - link_deps, - generator_default_variables["STATIC_LIB_PREFIX"], - generator_default_variables["STATIC_LIB_SUFFIX"], - ), - "LOCAL_STATIC_LIBRARIES", - ) - - if self.type == "executable": - self.WriteLn("include $(BUILD_EXECUTABLE)") - elif self.type == "shared_library": - self.WriteLn("include $(BUILD_SHARED_LIBRARY)") - elif self.type == "static_library": - self.WriteLn("include $(BUILD_STATIC_LIBRARY)") - self.WriteLn() - - def WriteLn(self, text=""): - self.fp.write(text + "\n") - - def GetSortedXcodeEnv(self, additional_settings=None): - return gyp.xcode_emulation.GetSortedXcodeEnv( - self.xcode_settings, - "$(abs_builddir)", - os.path.join("$(abs_srcdir)", self.path), - "$(BUILDTYPE)", - additional_settings, - ) - - def GetSortedXcodePostbuildEnv(self): - # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack. - # TODO(thakis): It would be nice to have some general mechanism instead. - strip_save_file = self.xcode_settings.GetPerTargetSetting( - "CHROMIUM_STRIP_SAVE_FILE", "" - ) - # Even if strip_save_file is empty, explicitly write it. Else a postbuild - # might pick up an export from an earlier target. - return self.GetSortedXcodeEnv( - additional_settings={"CHROMIUM_STRIP_SAVE_FILE": strip_save_file} - ) - - def WriteSortedXcodeEnv(self, target, env): - for k, v in env: - # For - # foo := a\ b - # the escaped space does the right thing. For - # export foo := a\ b - # it does not -- the backslash is written to the env as literal character. - # So don't escape spaces in |env[k]|. - self.WriteLn(f"{QuoteSpaces(target)}: export {k} := {v}") - - def Objectify(self, path): - """Convert a path to its output directory form.""" - if "$(" in path: - path = path.replace("$(obj)/", "$(obj).%s/$(TARGET)/" % self.toolset) - if "$(obj)" not in path: - path = f"$(obj).{self.toolset}/$(TARGET)/{path}" - return path - - def Pchify(self, path, lang): - """Convert a prefix header path to its output directory form.""" - path = self.Absolutify(path) - if "$(" in path: - path = path.replace( - "$(obj)/", f"$(obj).{self.toolset}/$(TARGET)/pch-{lang}" - ) - return path - return f"$(obj).{self.toolset}/$(TARGET)/pch-{lang}/{path}" - - def Absolutify(self, path): - """Convert a subdirectory-relative path into a base-relative path. - Skips over paths that contain variables.""" - if "$(" in path: - # Don't call normpath in this case, as it might collapse the - # path too aggressively if it features '..'. However it's still - # important to strip trailing slashes. - return path.rstrip("/") - return os.path.normpath(os.path.join(self.path, path)) - - def ExpandInputRoot(self, template, expansion, dirname): - if "%(INPUT_ROOT)s" not in template and "%(INPUT_DIRNAME)s" not in template: - return template - path = template % { - "INPUT_ROOT": expansion, - "INPUT_DIRNAME": dirname, - } - return path - - def _InstallableTargetInstallPath(self): - """Returns the location of the final output for an installable target.""" - # Functionality removed for all platforms to match Xcode and hoist - # shared libraries into PRODUCT_DIR for users: - # Xcode puts shared_library results into PRODUCT_DIR, and some gyp files - # rely on this. Emulate this behavior for mac. - # if self.type == "shared_library" and ( - # self.flavor != "mac" or self.toolset != "target" - # ): - # # Install all shared libs into a common directory (per toolset) for - # # convenient access with LD_LIBRARY_PATH. - # return "$(builddir)/lib.%s/%s" % (self.toolset, self.alias) - if self.flavor == "zos" and self.type == "shared_library": - return "$(builddir)/lib.%s/%s" % (self.toolset, self.alias) - - return "$(builddir)/" + self.alias - - -def WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files): - """Write the target to regenerate the Makefile.""" - options = params["options"] - build_files_args = [ - gyp.common.RelativePath(filename, options.toplevel_dir) - for filename in params["build_files_arg"] - ] - - gyp_binary = gyp.common.FixIfRelativePath( - params["gyp_binary"], options.toplevel_dir - ) - if not gyp_binary.startswith(os.sep): - gyp_binary = os.path.join(".", gyp_binary) - - root_makefile.write( - "quiet_cmd_regen_makefile = ACTION Regenerating $@\n" - "cmd_regen_makefile = cd $(srcdir); %(cmd)s\n" - "%(makefile_name)s: %(deps)s\n" - "\t$(call do_cmd,regen_makefile)\n\n" - % { - "makefile_name": makefile_name, - "deps": " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files), - "cmd": gyp.common.EncodePOSIXShellList( - [gyp_binary, "-fmake"] + gyp.RegenerateFlags(options) + build_files_args - ), - } - ) - - -def PerformBuild(data, configurations, params): - options = params["options"] - for config in configurations: - arguments = ["make"] - if options.toplevel_dir and options.toplevel_dir != ".": - arguments += "-C", options.toplevel_dir - arguments.append("BUILDTYPE=" + config) - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def GenerateOutput(target_list, target_dicts, data, params): - options = params["options"] - flavor = gyp.common.GetFlavor(params) - generator_flags = params.get("generator_flags", {}) - builddir_name = generator_flags.get("output_dir", "out") - android_ndk_version = generator_flags.get("android_ndk_version", None) - default_target = generator_flags.get("default_target", "all") - - def CalculateMakefilePath(build_file, base_name): - """Determine where to write a Makefile for a given gyp file.""" - # Paths in gyp files are relative to the .gyp file, but we want - # paths relative to the source root for the master makefile. Grab - # the path of the .gyp file as the base to relativize against. - # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp". - base_path = gyp.common.RelativePath(os.path.dirname(build_file), options.depth) - # We write the file in the base_path directory. - output_file = os.path.join(options.depth, base_path, base_name) - if options.generator_output: - output_file = os.path.join( - options.depth, options.generator_output, base_path, base_name - ) - base_path = gyp.common.RelativePath( - os.path.dirname(build_file), options.toplevel_dir - ) - return base_path, output_file - - # TODO: search for the first non-'Default' target. This can go - # away when we add verification that all targets have the - # necessary configurations. - default_configuration = None - toolsets = {target_dicts[target]["toolset"] for target in target_list} - for target in target_list: - spec = target_dicts[target] - if spec["default_configuration"] != "Default": - default_configuration = spec["default_configuration"] - break - if not default_configuration: - default_configuration = "Default" - - srcdir = "." - makefile_name = "Makefile" + options.suffix - makefile_path = os.path.join(options.toplevel_dir, makefile_name) - if options.generator_output: - global srcdir_prefix - makefile_path = os.path.join( - options.toplevel_dir, options.generator_output, makefile_name - ) - srcdir = gyp.common.RelativePath(srcdir, options.generator_output) - srcdir_prefix = "$(srcdir)/" - - flock_command = "flock" - copy_archive_arguments = "-af" - makedep_arguments = "-MMD" - header_params = { - "default_target": default_target, - "builddir": builddir_name, - "default_configuration": default_configuration, - "flock": flock_command, - "flock_index": 1, - "link_commands": LINK_COMMANDS_LINUX, - "extra_commands": "", - "srcdir": srcdir, - "copy_archive_args": copy_archive_arguments, - "makedep_args": makedep_arguments, - "CC.target": GetEnvironFallback(("CC_target", "CC"), "$(CC)"), - "AR.target": GetEnvironFallback(("AR_target", "AR"), "$(AR)"), - "CXX.target": GetEnvironFallback(("CXX_target", "CXX"), "$(CXX)"), - "LINK.target": GetEnvironFallback(("LINK_target", "LINK"), "$(LINK)"), - "PLI.target": GetEnvironFallback(("PLI_target", "PLI"), "pli"), - "CC.host": GetEnvironFallback(("CC_host", "CC"), "gcc"), - "AR.host": GetEnvironFallback(("AR_host", "AR"), "ar"), - "CXX.host": GetEnvironFallback(("CXX_host", "CXX"), "g++"), - "LINK.host": GetEnvironFallback(("LINK_host", "LINK"), "$(CXX.host)"), - "PLI.host": GetEnvironFallback(("PLI_host", "PLI"), "pli"), - } - if flavor == "mac": - flock_command = "./gyp-mac-tool flock" - header_params.update( - { - "flock": flock_command, - "flock_index": 2, - "link_commands": LINK_COMMANDS_MAC, - "extra_commands": SHARED_HEADER_MAC_COMMANDS, - } - ) - elif flavor == "android": - header_params.update({"link_commands": LINK_COMMANDS_ANDROID}) - elif flavor == "zos": - copy_archive_arguments = "-fPR" - CC_target = GetEnvironFallback(("CC_target", "CC"), "njsc") - makedep_arguments = "-MMD" - if CC_target == "clang": - CC_host = GetEnvironFallback(("CC_host", "CC"), "clang") - CXX_target = GetEnvironFallback(("CXX_target", "CXX"), "clang++") - CXX_host = GetEnvironFallback(("CXX_host", "CXX"), "clang++") - elif CC_target == "ibm-clang64": - CC_host = GetEnvironFallback(("CC_host", "CC"), "ibm-clang64") - CXX_target = GetEnvironFallback(("CXX_target", "CXX"), "ibm-clang++64") - CXX_host = GetEnvironFallback(("CXX_host", "CXX"), "ibm-clang++64") - elif CC_target == "ibm-clang": - CC_host = GetEnvironFallback(("CC_host", "CC"), "ibm-clang") - CXX_target = GetEnvironFallback(("CXX_target", "CXX"), "ibm-clang++") - CXX_host = GetEnvironFallback(("CXX_host", "CXX"), "ibm-clang++") - else: - # Node.js versions prior to v18: - makedep_arguments = "-qmakedep=gcc" - CC_host = GetEnvironFallback(("CC_host", "CC"), "njsc") - CXX_target = GetEnvironFallback(("CXX_target", "CXX"), "njsc++") - CXX_host = GetEnvironFallback(("CXX_host", "CXX"), "njsc++") - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "makedep_args": makedep_arguments, - "link_commands": LINK_COMMANDS_OS390, - "extra_commands": SHARED_HEADER_OS390_COMMANDS, - "CC.target": CC_target, - "CXX.target": CXX_target, - "CC.host": CC_host, - "CXX.host": CXX_host, - } - ) - elif flavor == "solaris": - copy_archive_arguments = "-pPRf@" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "flock": "./gyp-flock-tool flock", - "flock_index": 2, - } - ) - elif flavor == "freebsd": - # Note: OpenBSD has sysutils/flock. lockf seems to be FreeBSD specific. - header_params.update({"flock": "lockf"}) - elif flavor == "openbsd": - copy_archive_arguments = "-pPRf" - header_params.update({"copy_archive_args": copy_archive_arguments}) - elif flavor == "aix": - copy_archive_arguments = "-pPRf" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "link_commands": LINK_COMMANDS_AIX, - "flock": "./gyp-flock-tool flock", - "flock_index": 2, - } - ) - elif flavor == "os400": - copy_archive_arguments = "-pPRf" - header_params.update( - { - "copy_archive_args": copy_archive_arguments, - "link_commands": LINK_COMMANDS_OS400, - "flock": "./gyp-flock-tool flock", - "flock_index": 2, - } - ) - - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings_array = data[build_file].get("make_global_settings", []) - wrappers = {} - for key, value in make_global_settings_array: - if key.endswith("_wrapper"): - wrappers[key[: -len("_wrapper")]] = "$(abspath %s)" % value - make_global_settings = "" - for key, value in make_global_settings_array: - if re.match(".*_wrapper", key): - continue - if value[0] != "$": - value = "$(abspath %s)" % value - wrapper = wrappers.get(key) - if wrapper: - value = f"{wrapper} {value}" - del wrappers[key] - if key in ("CC", "CC.host", "CXX", "CXX.host"): - make_global_settings += ( - "ifneq (,$(filter $(origin %s), undefined default))\n" % key - ) - # Let gyp-time envvars win over global settings. - env_key = key.replace(".", "_") # CC.host -> CC_host - if env_key in os.environ: - value = os.environ[env_key] - make_global_settings += f" {key} = {value}\n" - make_global_settings += "endif\n" - else: - make_global_settings += f"{key} ?= {value}\n" - # TODO(ukai): define cmd when only wrapper is specified in - # make_global_settings. - - header_params["make_global_settings"] = make_global_settings - - gyp.common.EnsureDirExists(makefile_path) - root_makefile = open(makefile_path, "w") - root_makefile.write(SHARED_HEADER % header_params) - # Currently any versions have the same effect, but in future the behavior - # could be different. - if android_ndk_version: - root_makefile.write( - "# Define LOCAL_PATH for build of Android applications.\n" - "LOCAL_PATH := $(call my-dir)\n" - "\n" - ) - for toolset in toolsets: - root_makefile.write("TOOLSET := %s\n" % toolset) - WriteRootHeaderSuffixRules(root_makefile) - - # Put build-time support tools next to the root Makefile. - dest_path = os.path.dirname(makefile_path) - gyp.common.CopyTool(flavor, dest_path) - - # Find the list of targets that derive from the gyp file(s) being built. - needed_targets = set() - for build_file in params["build_files"]: - for target in gyp.common.AllTargets(target_list, target_dicts, build_file): - needed_targets.add(target) - - build_files = set() - include_list = set() - for qualified_target in target_list: - build_file, target, toolset = gyp.common.ParseQualifiedTarget(qualified_target) - - this_make_global_settings = data[build_file].get("make_global_settings", []) - assert make_global_settings_array == this_make_global_settings, ( - "make_global_settings needs to be the same for all targets " - f"{this_make_global_settings} vs. {make_global_settings}" - ) - - build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir)) - included_files = data[build_file]["included_files"] - for included_file in included_files: - # The included_files entries are relative to the dir of the build file - # that included them, so we have to undo that and then make them relative - # to the root dir. - relative_include_file = gyp.common.RelativePath( - gyp.common.UnrelativePath(included_file, build_file), - options.toplevel_dir, - ) - abs_include_file = os.path.abspath(relative_include_file) - # If the include file is from the ~/.gyp dir, we should use absolute path - # so that relocating the src dir doesn't break the path. - if params["home_dot_gyp"] and abs_include_file.startswith( - params["home_dot_gyp"] - ): - build_files.add(abs_include_file) - else: - build_files.add(relative_include_file) - - base_path, output_file = CalculateMakefilePath( - build_file, target + "." + toolset + options.suffix + ".mk" - ) - - spec = target_dicts[qualified_target] - configs = spec["configurations"] - - if flavor == "mac": - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) - - writer = MakefileWriter(generator_flags, flavor) - writer.Write( - qualified_target, - base_path, - output_file, - spec, - configs, - part_of_all=qualified_target in needed_targets, - ) - - # Our root_makefile lives at the source root. Compute the relative path - # from there to the output_file for including. - mkfile_rel_path = gyp.common.RelativePath( - output_file, os.path.dirname(makefile_path) - ) - include_list.add(mkfile_rel_path) - - # Write out per-gyp (sub-project) Makefiles. - depth_rel_path = gyp.common.RelativePath(options.depth, os.getcwd()) - for build_file in build_files: - # The paths in build_files were relativized above, so undo that before - # testing against the non-relativized items in target_list and before - # calculating the Makefile path. - build_file = os.path.join(depth_rel_path, build_file) - gyp_targets = [ - target_dicts[qualified_target]["target_name"] - for qualified_target in target_list - if qualified_target.startswith(build_file) - and qualified_target in needed_targets - ] - # Only generate Makefiles for gyp files with targets. - if not gyp_targets: - continue - base_path, output_file = CalculateMakefilePath( - build_file, os.path.splitext(os.path.basename(build_file))[0] + ".Makefile" - ) - makefile_rel_path = gyp.common.RelativePath( - os.path.dirname(makefile_path), os.path.dirname(output_file) - ) - writer.WriteSubMake(output_file, makefile_rel_path, gyp_targets, builddir_name) - - # Write out the sorted list of includes. - root_makefile.write("\n") - for include_file in sorted(include_list): - # We wrap each .mk include in an if statement so users can tell make to - # not load a file by setting NO_LOAD. The below make code says, only - # load the .mk file if the .mk filename doesn't start with a token in - # NO_LOAD. - root_makefile.write( - "ifeq ($(strip $(foreach prefix,$(NO_LOAD),\\\n" - " $(findstring $(join ^,$(prefix)),\\\n" - " $(join ^," + include_file + ")))),)\n" - ) - root_makefile.write(" include " + include_file + "\n") - root_makefile.write("endif\n") - root_makefile.write("\n") - - if not generator_flags.get("standalone") and generator_flags.get( - "auto_regeneration", True - ): - WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) - - root_makefile.write(SHARED_FOOTER) - - root_makefile.close() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py deleted file mode 100644 index 13b0794..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +++ /dev/null @@ -1,3981 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import ntpath -import os -import posixpath -import re -import subprocess -import sys - -from collections import OrderedDict - -import gyp.common -import gyp.easy_xml as easy_xml -import gyp.generator.ninja as ninja_generator -import gyp.MSVSNew as MSVSNew -import gyp.MSVSProject as MSVSProject -import gyp.MSVSSettings as MSVSSettings -import gyp.MSVSToolFile as MSVSToolFile -import gyp.MSVSUserFile as MSVSUserFile -import gyp.MSVSUtil as MSVSUtil -import gyp.MSVSVersion as MSVSVersion -from gyp.common import GypError -from gyp.common import OrderedSet - - -# Regular expression for validating Visual Studio GUIDs. If the GUID -# contains lowercase hex letters, MSVS will be fine. However, -# IncrediBuild BuildConsole will parse the solution file, but then -# silently skip building the target causing hard to track down errors. -# Note that this only happens with the BuildConsole, and does not occur -# if IncrediBuild is executed from inside Visual Studio. This regex -# validates that the string looks like a GUID with all uppercase hex -# letters. -VALID_MSVS_GUID_CHARS = re.compile(r"^[A-F0-9\-]+$") - -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - -generator_default_variables = { - "DRIVER_PREFIX": "", - "DRIVER_SUFFIX": ".sys", - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": ".exe", - "STATIC_LIB_PREFIX": "", - "SHARED_LIB_PREFIX": "", - "STATIC_LIB_SUFFIX": ".lib", - "SHARED_LIB_SUFFIX": ".dll", - "INTERMEDIATE_DIR": "$(IntDir)", - "SHARED_INTERMEDIATE_DIR": "$(OutDir)/obj/global_intermediate", - "OS": "win", - "PRODUCT_DIR": "$(OutDir)", - "LIB_DIR": "$(OutDir)lib", - "RULE_INPUT_ROOT": "$(InputName)", - "RULE_INPUT_DIRNAME": "$(InputDir)", - "RULE_INPUT_EXT": "$(InputExt)", - "RULE_INPUT_NAME": "$(InputFileName)", - "RULE_INPUT_PATH": "$(InputPath)", - "CONFIGURATION_NAME": "$(ConfigurationName)", -} - - -# The msvs specific sections that hold paths -generator_additional_path_sections = [ - "msvs_cygwin_dirs", - "msvs_props", -] - - -generator_additional_non_configuration_keys = [ - "msvs_cygwin_dirs", - "msvs_cygwin_shell", - "msvs_large_pdb", - "msvs_shard", - "msvs_external_builder", - "msvs_external_builder_out_dir", - "msvs_external_builder_build_cmd", - "msvs_external_builder_clean_cmd", - "msvs_external_builder_clcompile_cmd", - "msvs_enable_winrt", - "msvs_requires_importlibrary", - "msvs_enable_winphone", - "msvs_application_type_revision", - "msvs_target_platform_version", - "msvs_target_platform_minversion", -] - -generator_filelist_paths = None - -# List of precompiled header related keys. -precomp_keys = [ - "msvs_precompiled_header", - "msvs_precompiled_source", -] - - -cached_username = None - - -cached_domain = None - - -# TODO(gspencer): Switch the os.environ calls to be -# win32api.GetDomainName() and win32api.GetUserName() once the -# python version in depot_tools has been updated to work on Vista -# 64-bit. -def _GetDomainAndUserName(): - if sys.platform not in ("win32", "cygwin"): - return ("DOMAIN", "USERNAME") - global cached_username - global cached_domain - if not cached_domain or not cached_username: - domain = os.environ.get("USERDOMAIN") - username = os.environ.get("USERNAME") - if not domain or not username: - call = subprocess.Popen( - ["net", "config", "Workstation"], stdout=subprocess.PIPE - ) - config = call.communicate()[0].decode("utf-8") - username_re = re.compile(r"^User name\s+(\S+)", re.MULTILINE) - username_match = username_re.search(config) - if username_match: - username = username_match.group(1) - domain_re = re.compile(r"^Logon domain\s+(\S+)", re.MULTILINE) - domain_match = domain_re.search(config) - if domain_match: - domain = domain_match.group(1) - cached_domain = domain - cached_username = username - return (cached_domain, cached_username) - - -fixpath_prefix = None - - -def _NormalizedSource(source): - """Normalize the path. - - But not if that gets rid of a variable, as this may expand to something - larger than one directory. - - Arguments: - source: The path to be normalize.d - - Returns: - The normalized path. - """ - normalized = os.path.normpath(source) - if source.count("$") == normalized.count("$"): - source = normalized - return source - - -def _FixPath(path, separator="\\"): - """Convert paths to a form that will make sense in a vcproj file. - - Arguments: - path: The path to convert, may contain / etc. - Returns: - The path with all slashes made into backslashes. - """ - if ( - fixpath_prefix - and path - and not os.path.isabs(path) - and path[0] != "$" - and not _IsWindowsAbsPath(path) - ): - path = os.path.join(fixpath_prefix, path) - if separator == "\\": - path = path.replace("/", "\\") - path = _NormalizedSource(path) - if separator == "/": - path = path.replace("\\", "/") - if path and path[-1] == separator: - path = path[:-1] - return path - - -def _IsWindowsAbsPath(path): - """ - On Cygwin systems Python needs a little help determining if a path - is an absolute Windows path or not, so that - it does not treat those as relative, which results in bad paths like: - '..\\C:\\\\some_source_code_file.cc' - """ - return path.startswith("c:") or path.startswith("C:") - - -def _FixPaths(paths, separator="\\"): - """Fix each of the paths of the list.""" - return [_FixPath(i, separator) for i in paths] - - -def _ConvertSourcesToFilterHierarchy( - sources, prefix=None, excluded=None, list_excluded=True, msvs_version=None -): - """Converts a list split source file paths into a vcproj folder hierarchy. - - Arguments: - sources: A list of source file paths split. - prefix: A list of source file path layers meant to apply to each of sources. - excluded: A set of excluded files. - msvs_version: A MSVSVersion object. - - Returns: - A hierarchy of filenames and MSVSProject.Filter objects that matches the - layout of the source tree. - For example: - _ConvertSourcesToFilterHierarchy([['a', 'bob1.c'], ['b', 'bob2.c']], - prefix=['joe']) - --> - [MSVSProject.Filter('a', contents=['joe\\a\\bob1.c']), - MSVSProject.Filter('b', contents=['joe\\b\\bob2.c'])] - """ - if not prefix: - prefix = [] - result = [] - excluded_result = [] - folders = OrderedDict() - # Gather files into the final result, excluded, or folders. - for s in sources: - if len(s) == 1: - filename = _NormalizedSource("\\".join(prefix + s)) - if filename in excluded: - excluded_result.append(filename) - else: - result.append(filename) - elif msvs_version and not msvs_version.UsesVcxproj(): - # For MSVS 2008 and earlier, we need to process all files before walking - # the sub folders. - if not folders.get(s[0]): - folders[s[0]] = [] - folders[s[0]].append(s[1:]) - else: - contents = _ConvertSourcesToFilterHierarchy( - [s[1:]], - prefix + [s[0]], - excluded=excluded, - list_excluded=list_excluded, - msvs_version=msvs_version, - ) - contents = MSVSProject.Filter(s[0], contents=contents) - result.append(contents) - # Add a folder for excluded files. - if excluded_result and list_excluded: - excluded_folder = MSVSProject.Filter( - "_excluded_files", contents=excluded_result - ) - result.append(excluded_folder) - - if msvs_version and msvs_version.UsesVcxproj(): - return result - - # Populate all the folders. - for f in folders: - contents = _ConvertSourcesToFilterHierarchy( - folders[f], - prefix=prefix + [f], - excluded=excluded, - list_excluded=list_excluded, - msvs_version=msvs_version, - ) - contents = MSVSProject.Filter(f, contents=contents) - result.append(contents) - return result - - -def _ToolAppend(tools, tool_name, setting, value, only_if_unset=False): - if not value: - return - _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset) - - -def _ToolSetOrAppend(tools, tool_name, setting, value, only_if_unset=False): - # TODO(bradnelson): ugly hack, fix this more generally!!! - if "Directories" in setting or "Dependencies" in setting: - if type(value) == str: - value = value.replace("/", "\\") - else: - value = [i.replace("/", "\\") for i in value] - if not tools.get(tool_name): - tools[tool_name] = {} - tool = tools[tool_name] - if setting == "CompileAsWinRT": - return - if tool.get(setting): - if only_if_unset: - return - if type(tool[setting]) == list and type(value) == list: - tool[setting] += value - else: - raise TypeError( - 'Appending "%s" to a non-list setting "%s" for tool "%s" is ' - "not allowed, previous value: %s" - % (value, setting, tool_name, str(tool[setting])) - ) - else: - tool[setting] = value - - -def _ConfigTargetVersion(config_data): - return config_data.get("msvs_target_version", "Windows7") - - -def _ConfigPlatform(config_data): - return config_data.get("msvs_configuration_platform", "Win32") - - -def _ConfigBaseName(config_name, platform_name): - if config_name.endswith("_" + platform_name): - return config_name[0 : -len(platform_name) - 1] - else: - return config_name - - -def _ConfigFullName(config_name, config_data): - platform_name = _ConfigPlatform(config_data) - return f"{_ConfigBaseName(config_name, platform_name)}|{platform_name}" - - -def _ConfigWindowsTargetPlatformVersion(config_data, version): - target_ver = config_data.get("msvs_windows_target_platform_version") - if target_ver and re.match(r"^\d+", target_ver): - return target_ver - config_ver = config_data.get("msvs_windows_sdk_version") - vers = [config_ver] if config_ver else version.compatible_sdks - for ver in vers: - for key in [ - r"HKLM\Software\Microsoft\Microsoft SDKs\Windows\%s", - r"HKLM\Software\Wow6432Node\Microsoft\Microsoft SDKs\Windows\%s", - ]: - sdk_dir = MSVSVersion._RegistryGetValue(key % ver, "InstallationFolder") - if not sdk_dir: - continue - version = MSVSVersion._RegistryGetValue(key % ver, "ProductVersion") or "" - # Find a matching entry in sdk_dir\include. - expected_sdk_dir = r"%s\include" % sdk_dir - names = sorted( - ( - x - for x in ( - os.listdir(expected_sdk_dir) - if os.path.isdir(expected_sdk_dir) - else [] - ) - if x.startswith(version) - ), - reverse=True, - ) - if names: - return names[0] - else: - print( - "Warning: No include files found for detected " - "Windows SDK version %s" % (version), - file=sys.stdout, - ) - - -def _BuildCommandLineForRuleRaw( - spec, cmd, cygwin_shell, has_input_path, quote_cmd, do_setup_env -): - - if [x for x in cmd if "$(InputDir)" in x]: - input_dir_preamble = ( - "set INPUTDIR=$(InputDir)\n" - "if NOT DEFINED INPUTDIR set INPUTDIR=.\\\n" - "set INPUTDIR=%INPUTDIR:~0,-1%\n" - ) - else: - input_dir_preamble = "" - - if cygwin_shell: - # Find path to cygwin. - cygwin_dir = _FixPath(spec.get("msvs_cygwin_dirs", ["."])[0]) - # Prepare command. - direct_cmd = cmd - direct_cmd = [ - i.replace("$(IntDir)", '`cygpath -m "${INTDIR}"`') for i in direct_cmd - ] - direct_cmd = [ - i.replace("$(OutDir)", '`cygpath -m "${OUTDIR}"`') for i in direct_cmd - ] - direct_cmd = [ - i.replace("$(InputDir)", '`cygpath -m "${INPUTDIR}"`') for i in direct_cmd - ] - if has_input_path: - direct_cmd = [ - i.replace("$(InputPath)", '`cygpath -m "${INPUTPATH}"`') - for i in direct_cmd - ] - direct_cmd = ['\\"%s\\"' % i.replace('"', '\\\\\\"') for i in direct_cmd] - # direct_cmd = gyp.common.EncodePOSIXShellList(direct_cmd) - direct_cmd = " ".join(direct_cmd) - # TODO(quote): regularize quoting path names throughout the module - cmd = "" - if do_setup_env: - cmd += 'call "$(ProjectDir)%(cygwin_dir)s\\setup_env.bat" && ' - cmd += "set CYGWIN=nontsec&& " - if direct_cmd.find("NUMBER_OF_PROCESSORS") >= 0: - cmd += "set /a NUMBER_OF_PROCESSORS_PLUS_1=%%NUMBER_OF_PROCESSORS%%+1&& " - if direct_cmd.find("INTDIR") >= 0: - cmd += "set INTDIR=$(IntDir)&& " - if direct_cmd.find("OUTDIR") >= 0: - cmd += "set OUTDIR=$(OutDir)&& " - if has_input_path and direct_cmd.find("INPUTPATH") >= 0: - cmd += "set INPUTPATH=$(InputPath) && " - cmd += 'bash -c "%(cmd)s"' - cmd = cmd % {"cygwin_dir": cygwin_dir, "cmd": direct_cmd} - return input_dir_preamble + cmd - else: - # Convert cat --> type to mimic unix. - command = ["type"] if cmd[0] == "cat" else [cmd[0].replace("/", "\\")] - # Add call before command to ensure that commands can be tied together one - # after the other without aborting in Incredibuild, since IB makes a bat - # file out of the raw command string, and some commands (like python) are - # actually batch files themselves. - command.insert(0, "call") - # Fix the paths - # TODO(quote): This is a really ugly heuristic, and will miss path fixing - # for arguments like "--arg=path", arg=path, or "/opt:path". - # If the argument starts with a slash or dash, or contains an equal sign, - # it's probably a command line switch. - # Return the path with forward slashes because the command using it might - # not support backslashes. - arguments = [ - i if (i[:1] in "/-" or "=" in i) else _FixPath(i, "/") - for i in cmd[1:] - ] - arguments = [i.replace("$(InputDir)", "%INPUTDIR%") for i in arguments] - arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments] - if quote_cmd: - # Support a mode for using cmd directly. - # Convert any paths to native form (first element is used directly). - # TODO(quote): regularize quoting path names throughout the module - command[1] = '"%s"' % command[1] - arguments = ['"%s"' % i for i in arguments] - # Collapse into a single command. - return input_dir_preamble + " ".join(command + arguments) - - -def _BuildCommandLineForRule(spec, rule, has_input_path, do_setup_env): - # Currently this weird argument munging is used to duplicate the way a - # python script would need to be run as part of the chrome tree. - # Eventually we should add some sort of rule_default option to set this - # per project. For now the behavior chrome needs is the default. - mcs = rule.get("msvs_cygwin_shell") - if mcs is None: - mcs = int(spec.get("msvs_cygwin_shell", 1)) - elif isinstance(mcs, str): - mcs = int(mcs) - quote_cmd = int(rule.get("msvs_quote_cmd", 1)) - return _BuildCommandLineForRuleRaw( - spec, rule["action"], mcs, has_input_path, quote_cmd, do_setup_env=do_setup_env - ) - - -def _AddActionStep(actions_dict, inputs, outputs, description, command): - """Merge action into an existing list of actions. - - Care must be taken so that actions which have overlapping inputs either don't - get assigned to the same input, or get collapsed into one. - - Arguments: - actions_dict: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - inputs: list of inputs - outputs: list of outputs - description: description of the action - command: command line to execute - """ - # Require there to be at least one input (call sites will ensure this). - assert inputs - - action = { - "inputs": inputs, - "outputs": outputs, - "description": description, - "command": command, - } - - # Pick where to stick this action. - # While less than optimal in terms of build time, attach them to the first - # input for now. - chosen_input = inputs[0] - - # Add it there. - if chosen_input not in actions_dict: - actions_dict[chosen_input] = [] - actions_dict[chosen_input].append(action) - - -def _AddCustomBuildToolForMSVS( - p, spec, primary_input, inputs, outputs, description, cmd -): - """Add a custom build tool to execute something. - - Arguments: - p: the target project - spec: the target project dict - primary_input: input file to attach the build tool to - inputs: list of inputs - outputs: list of outputs - description: description of the action - cmd: command line to execute - """ - inputs = _FixPaths(inputs) - outputs = _FixPaths(outputs) - tool = MSVSProject.Tool( - "VCCustomBuildTool", - { - "Description": description, - "AdditionalDependencies": ";".join(inputs), - "Outputs": ";".join(outputs), - "CommandLine": cmd, - }, - ) - # Add to the properties of primary input for each config. - for config_name, c_data in spec["configurations"].items(): - p.AddFileConfig( - _FixPath(primary_input), _ConfigFullName(config_name, c_data), tools=[tool] - ) - - -def _AddAccumulatedActionsToMSVS(p, spec, actions_dict): - """Add actions accumulated into an actions_dict, merging as needed. - - Arguments: - p: the target project - spec: the target project dict - actions_dict: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - """ - for primary_input in actions_dict: - inputs = OrderedSet() - outputs = OrderedSet() - descriptions = [] - commands = [] - for action in actions_dict[primary_input]: - inputs.update(OrderedSet(action["inputs"])) - outputs.update(OrderedSet(action["outputs"])) - descriptions.append(action["description"]) - commands.append(action["command"]) - # Add the custom build step for one input file. - description = ", and also ".join(descriptions) - command = "\r\n".join(commands) - _AddCustomBuildToolForMSVS( - p, - spec, - primary_input=primary_input, - inputs=inputs, - outputs=outputs, - description=description, - cmd=command, - ) - - -def _RuleExpandPath(path, input_file): - """Given the input file to which a rule applied, string substitute a path. - - Arguments: - path: a path to string expand - input_file: the file to which the rule applied. - Returns: - The string substituted path. - """ - path = path.replace( - "$(InputName)", os.path.splitext(os.path.split(input_file)[1])[0] - ) - path = path.replace("$(InputDir)", os.path.dirname(input_file)) - path = path.replace( - "$(InputExt)", os.path.splitext(os.path.split(input_file)[1])[1] - ) - path = path.replace("$(InputFileName)", os.path.split(input_file)[1]) - path = path.replace("$(InputPath)", input_file) - return path - - -def _FindRuleTriggerFiles(rule, sources): - """Find the list of files which a particular rule applies to. - - Arguments: - rule: the rule in question - sources: the set of all known source files for this project - Returns: - The list of sources that trigger a particular rule. - """ - return rule.get("rule_sources", []) - - -def _RuleInputsAndOutputs(rule, trigger_file): - """Find the inputs and outputs generated by a rule. - - Arguments: - rule: the rule in question. - trigger_file: the main trigger for this rule. - Returns: - The pair of (inputs, outputs) involved in this rule. - """ - raw_inputs = _FixPaths(rule.get("inputs", [])) - raw_outputs = _FixPaths(rule.get("outputs", [])) - inputs = OrderedSet() - outputs = OrderedSet() - inputs.add(trigger_file) - for i in raw_inputs: - inputs.add(_RuleExpandPath(i, trigger_file)) - for o in raw_outputs: - outputs.add(_RuleExpandPath(o, trigger_file)) - return (inputs, outputs) - - -def _GenerateNativeRulesForMSVS(p, rules, output_dir, spec, options): - """Generate a native rules file. - - Arguments: - p: the target project - rules: the set of rules to include - output_dir: the directory in which the project/gyp resides - spec: the project dict - options: global generator options - """ - rules_filename = "{}{}.rules".format(spec["target_name"], options.suffix) - rules_file = MSVSToolFile.Writer( - os.path.join(output_dir, rules_filename), spec["target_name"] - ) - # Add each rule. - for r in rules: - rule_name = r["rule_name"] - rule_ext = r["extension"] - inputs = _FixPaths(r.get("inputs", [])) - outputs = _FixPaths(r.get("outputs", [])) - # Skip a rule with no action and no inputs. - if "action" not in r and not r.get("rule_sources", []): - continue - cmd = _BuildCommandLineForRule(spec, r, has_input_path=True, do_setup_env=True) - rules_file.AddCustomBuildRule( - name=rule_name, - description=r.get("message", rule_name), - extensions=[rule_ext], - additional_dependencies=inputs, - outputs=outputs, - cmd=cmd, - ) - # Write out rules file. - rules_file.WriteIfChanged() - - # Add rules file to project. - p.AddToolFile(rules_filename) - - -def _Cygwinify(path): - path = path.replace("$(OutDir)", "$(OutDirCygwin)") - path = path.replace("$(IntDir)", "$(IntDirCygwin)") - return path - - -def _GenerateExternalRules(rules, output_dir, spec, sources, options, actions_to_add): - """Generate an external makefile to do a set of rules. - - Arguments: - rules: the list of rules to include - output_dir: path containing project and gyp files - spec: project specification data - sources: set of sources known - options: global generator options - actions_to_add: The list of actions we will add to. - """ - filename = "{}_rules{}.mk".format(spec["target_name"], options.suffix) - mk_file = gyp.common.WriteOnDiff(os.path.join(output_dir, filename)) - # Find cygwin style versions of some paths. - mk_file.write('OutDirCygwin:=$(shell cygpath -u "$(OutDir)")\n') - mk_file.write('IntDirCygwin:=$(shell cygpath -u "$(IntDir)")\n') - # Gather stuff needed to emit all: target. - all_inputs = OrderedSet() - all_outputs = OrderedSet() - all_output_dirs = OrderedSet() - first_outputs = [] - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - all_inputs.update(OrderedSet(inputs)) - all_outputs.update(OrderedSet(outputs)) - # Only use one target from each rule as the dependency for - # 'all' so we don't try to build each rule multiple times. - first_outputs.append(next(iter(outputs))) - # Get the unique output directories for this rule. - output_dirs = [os.path.split(i)[0] for i in outputs] - for od in output_dirs: - all_output_dirs.add(od) - first_outputs_cyg = [_Cygwinify(i) for i in first_outputs] - # Write out all: target, including mkdir for each output directory. - mk_file.write("all: %s\n" % " ".join(first_outputs_cyg)) - for od in all_output_dirs: - if od: - mk_file.write('\tmkdir -p `cygpath -u "%s"`\n' % od) - mk_file.write("\n") - # Define how each output is generated. - for rule in rules: - trigger_files = _FindRuleTriggerFiles(rule, sources) - for tf in trigger_files: - # Get all the inputs and outputs for this rule for this trigger file. - inputs, outputs = _RuleInputsAndOutputs(rule, tf) - inputs = [_Cygwinify(i) for i in inputs] - outputs = [_Cygwinify(i) for i in outputs] - # Prepare the command line for this rule. - cmd = [_RuleExpandPath(c, tf) for c in rule["action"]] - cmd = ['"%s"' % i for i in cmd] - cmd = " ".join(cmd) - # Add it to the makefile. - mk_file.write("{}: {}\n".format(" ".join(outputs), " ".join(inputs))) - mk_file.write("\t%s\n\n" % cmd) - # Close up the file. - mk_file.close() - - # Add makefile to list of sources. - sources.add(filename) - # Add a build action to call makefile. - cmd = [ - "make", - "OutDir=$(OutDir)", - "IntDir=$(IntDir)", - "-j", - "${NUMBER_OF_PROCESSORS_PLUS_1}", - "-f", - filename, - ] - cmd = _BuildCommandLineForRuleRaw(spec, cmd, True, False, True, True) - # Insert makefile as 0'th input, so it gets the action attached there, - # as this is easier to understand from in the IDE. - all_inputs = list(all_inputs) - all_inputs.insert(0, filename) - _AddActionStep( - actions_to_add, - inputs=_FixPaths(all_inputs), - outputs=_FixPaths(all_outputs), - description="Running external rules for %s" % spec["target_name"], - command=cmd, - ) - - -def _EscapeEnvironmentVariableExpansion(s): - """Escapes % characters. - - Escapes any % characters so that Windows-style environment variable - expansions will leave them alone. - See http://connect.microsoft.com/VisualStudio/feedback/details/106127/cl-d-name-text-containing-percentage-characters-doesnt-compile - to understand why we have to do this. - - Args: - s: The string to be escaped. - - Returns: - The escaped string. - """ - s = s.replace("%", "%%") - return s - - -quote_replacer_regex = re.compile(r'(\\*)"') - - -def _EscapeCommandLineArgumentForMSVS(s): - """Escapes a Windows command-line argument. - - So that the Win32 CommandLineToArgv function will turn the escaped result back - into the original string. - See http://msdn.microsoft.com/en-us/library/17w5ykft.aspx - ("Parsing C++ Command-Line Arguments") to understand why we have to do - this. - - Args: - s: the string to be escaped. - Returns: - the escaped string. - """ - - def _Replace(match): - # For a literal quote, CommandLineToArgv requires an odd number of - # backslashes preceding it, and it produces half as many literal backslashes - # (rounded down). So we need to produce 2n+1 backslashes. - return 2 * match.group(1) + '\\"' - - # Escape all quotes so that they are interpreted literally. - s = quote_replacer_regex.sub(_Replace, s) - # Now add unescaped quotes so that any whitespace is interpreted literally. - s = '"' + s + '"' - return s - - -delimiters_replacer_regex = re.compile(r"(\\*)([,;]+)") - - -def _EscapeVCProjCommandLineArgListItem(s): - """Escapes command line arguments for MSVS. - - The VCProj format stores string lists in a single string using commas and - semi-colons as separators, which must be quoted if they are to be - interpreted literally. However, command-line arguments may already have - quotes, and the VCProj parser is ignorant of the backslash escaping - convention used by CommandLineToArgv, so the command-line quotes and the - VCProj quotes may not be the same quotes. So to store a general - command-line argument in a VCProj list, we need to parse the existing - quoting according to VCProj's convention and quote any delimiters that are - not already quoted by that convention. The quotes that we add will also be - seen by CommandLineToArgv, so if backslashes precede them then we also have - to escape those backslashes according to the CommandLineToArgv - convention. - - Args: - s: the string to be escaped. - Returns: - the escaped string. - """ - - def _Replace(match): - # For a non-literal quote, CommandLineToArgv requires an even number of - # backslashes preceding it, and it produces half as many literal - # backslashes. So we need to produce 2n backslashes. - return 2 * match.group(1) + '"' + match.group(2) + '"' - - segments = s.split('"') - # The unquoted segments are at the even-numbered indices. - for i in range(0, len(segments), 2): - segments[i] = delimiters_replacer_regex.sub(_Replace, segments[i]) - # Concatenate back into a single string - s = '"'.join(segments) - if len(segments) % 2 == 0: - # String ends while still quoted according to VCProj's convention. This - # means the delimiter and the next list item that follow this one in the - # .vcproj file will be misinterpreted as part of this item. There is nothing - # we can do about this. Adding an extra quote would correct the problem in - # the VCProj but cause the same problem on the final command-line. Moving - # the item to the end of the list does works, but that's only possible if - # there's only one such item. Let's just warn the user. - print( - "Warning: MSVS may misinterpret the odd number of " + "quotes in " + s, - file=sys.stderr, - ) - return s - - -def _EscapeCppDefineForMSVS(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = _EscapeEnvironmentVariableExpansion(s) - s = _EscapeCommandLineArgumentForMSVS(s) - s = _EscapeVCProjCommandLineArgListItem(s) - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - s = s.replace("#", "\\%03o" % ord("#")) - return s - - -quote_replacer_regex2 = re.compile(r'(\\+)"') - - -def _EscapeCommandLineArgumentForMSBuild(s): - """Escapes a Windows command-line argument for use by MSBuild.""" - - def _Replace(match): - return (len(match.group(1)) / 2 * 4) * "\\" + '\\"' - - # Escape all quotes so that they are interpreted literally. - s = quote_replacer_regex2.sub(_Replace, s) - return s - - -def _EscapeMSBuildSpecialCharacters(s): - escape_dictionary = { - "%": "%25", - "$": "%24", - "@": "%40", - "'": "%27", - ";": "%3B", - "?": "%3F", - "*": "%2A", - } - result = "".join([escape_dictionary.get(c, c) for c in s]) - return result - - -def _EscapeCppDefineForMSBuild(s): - """Escapes a CPP define so that it will reach the compiler unaltered.""" - s = _EscapeEnvironmentVariableExpansion(s) - s = _EscapeCommandLineArgumentForMSBuild(s) - s = _EscapeMSBuildSpecialCharacters(s) - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - s = s.replace("#", "\\%03o" % ord("#")) - return s - - -def _GenerateRulesForMSVS( - p, output_dir, options, spec, sources, excluded_sources, actions_to_add -): - """Generate all the rules for a particular project. - - Arguments: - p: the project - output_dir: directory to emit rules to - options: global options passed to the generator - spec: the specification for this project - sources: the set of all known source files in this project - excluded_sources: the set of sources excluded from normal processing - actions_to_add: deferred list of actions to add in - """ - rules = spec.get("rules", []) - rules_native = [r for r in rules if not int(r.get("msvs_external_rule", 0))] - rules_external = [r for r in rules if int(r.get("msvs_external_rule", 0))] - - # Handle rules that use a native rules file. - if rules_native: - _GenerateNativeRulesForMSVS(p, rules_native, output_dir, spec, options) - - # Handle external rules (non-native rules). - if rules_external: - _GenerateExternalRules( - rules_external, output_dir, spec, sources, options, actions_to_add - ) - _AdjustSourcesForRules(rules, sources, excluded_sources, False) - - -def _AdjustSourcesForRules(rules, sources, excluded_sources, is_msbuild): - # Add outputs generated by each rule (if applicable). - for rule in rules: - # Add in the outputs from this rule. - trigger_files = _FindRuleTriggerFiles(rule, sources) - for trigger_file in trigger_files: - # Remove trigger_file from excluded_sources to let the rule be triggered - # (e.g. rule trigger ax_enums.idl is added to excluded_sources - # because it's also in an action's inputs in the same project) - excluded_sources.discard(_FixPath(trigger_file)) - # Done if not processing outputs as sources. - if int(rule.get("process_outputs_as_sources", False)): - inputs, outputs = _RuleInputsAndOutputs(rule, trigger_file) - inputs = OrderedSet(_FixPaths(inputs)) - outputs = OrderedSet(_FixPaths(outputs)) - inputs.remove(_FixPath(trigger_file)) - sources.update(inputs) - if not is_msbuild: - excluded_sources.update(inputs) - sources.update(outputs) - - -def _FilterActionsFromExcluded(excluded_sources, actions_to_add): - """Take inputs with actions attached out of the list of exclusions. - - Arguments: - excluded_sources: list of source files not to be built. - actions_to_add: dict of actions keyed on source file they're attached to. - Returns: - excluded_sources with files that have actions attached removed. - """ - must_keep = OrderedSet(_FixPaths(actions_to_add.keys())) - return [s for s in excluded_sources if s not in must_keep] - - -def _GetDefaultConfiguration(spec): - return spec["configurations"][spec["default_configuration"]] - - -def _GetGuidOfProject(proj_path, spec): - """Get the guid for the project. - - Arguments: - proj_path: Path of the vcproj or vcxproj file to generate. - spec: The target dictionary containing the properties of the target. - Returns: - the guid. - Raises: - ValueError: if the specified GUID is invalid. - """ - # Pluck out the default configuration. - default_config = _GetDefaultConfiguration(spec) - # Decide the guid of the project. - guid = default_config.get("msvs_guid") - if guid: - if VALID_MSVS_GUID_CHARS.match(guid) is None: - raise ValueError( - 'Invalid MSVS guid: "%s". Must match regex: "%s".' - % (guid, VALID_MSVS_GUID_CHARS.pattern) - ) - guid = "{%s}" % guid - guid = guid or MSVSNew.MakeGuid(proj_path) - return guid - - -def _GetMsbuildToolsetOfProject(proj_path, spec, version): - """Get the platform toolset for the project. - - Arguments: - proj_path: Path of the vcproj or vcxproj file to generate. - spec: The target dictionary containing the properties of the target. - version: The MSVSVersion object. - Returns: - the platform toolset string or None. - """ - # Pluck out the default configuration. - default_config = _GetDefaultConfiguration(spec) - toolset = default_config.get("msbuild_toolset") - if not toolset and version.DefaultToolset(): - toolset = version.DefaultToolset() - if spec["type"] == "windows_driver": - toolset = "WindowsKernelModeDriver10.0" - return toolset - - -def _GenerateProject(project, options, version, generator_flags, spec): - """Generates a vcproj file. - - Arguments: - project: the MSVSProject object. - options: global generator options. - version: the MSVSVersion object. - generator_flags: dict of generator-specific flags. - Returns: - A list of source files that cannot be found on disk. - """ - default_config = _GetDefaultConfiguration(project.spec) - - # Skip emitting anything if told to with msvs_existing_vcproj option. - if default_config.get("msvs_existing_vcproj"): - return [] - - if version.UsesVcxproj(): - return _GenerateMSBuildProject(project, options, version, generator_flags, spec) - else: - return _GenerateMSVSProject(project, options, version, generator_flags) - - -def _GenerateMSVSProject(project, options, version, generator_flags): - """Generates a .vcproj file. It may create .rules and .user files too. - - Arguments: - project: The project object we will generate the file for. - options: Global options passed to the generator. - version: The VisualStudioVersion object. - generator_flags: dict of generator-specific flags. - """ - spec = project.spec - gyp.common.EnsureDirExists(project.path) - - platforms = _GetUniquePlatforms(spec) - p = MSVSProject.Writer( - project.path, version, spec["target_name"], project.guid, platforms - ) - - # Get directory project file is in. - project_dir = os.path.split(project.path)[0] - gyp_path = _NormalizedSource(project.build_file) - relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir) - - config_type = _GetMSVSConfigurationType(spec, project.build_file) - for config_name, config in spec["configurations"].items(): - _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config) - - # Prepare list of sources and excluded sources. - gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, gyp_file) - - # Add rules. - actions_to_add = {} - _GenerateRulesForMSVS( - p, project_dir, options, spec, sources, excluded_sources, actions_to_add - ) - list_excluded = generator_flags.get("msvs_list_excluded_files", True) - sources, excluded_sources, excluded_idl = _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, project_dir, sources, excluded_sources, list_excluded, version - ) - - # Add in files. - missing_sources = _VerifySourcesExist(sources, project_dir) - p.AddFiles(sources) - - _AddToolFilesToMSVS(p, spec) - _HandlePreCompiledHeaders(p, sources, spec) - _AddActions(actions_to_add, spec, relative_path_of_gyp_file) - _AddCopies(actions_to_add, spec) - _WriteMSVSUserFile(project.path, version, spec) - - # NOTE: this stanza must appear after all actions have been decided. - # Don't excluded sources with actions attached, or they won't run. - excluded_sources = _FilterActionsFromExcluded(excluded_sources, actions_to_add) - _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded) - _AddAccumulatedActionsToMSVS(p, spec, actions_to_add) - - # Write it out. - p.WriteIfChanged() - - return missing_sources - - -def _GetUniquePlatforms(spec): - """Returns the list of unique platforms for this spec, e.g ['win32', ...]. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - The MSVSUserFile object created. - """ - # Gather list of unique platforms. - platforms = OrderedSet() - for configuration in spec["configurations"]: - platforms.add(_ConfigPlatform(spec["configurations"][configuration])) - platforms = list(platforms) - return platforms - - -def _CreateMSVSUserFile(proj_path, version, spec): - """Generates a .user file for the user running this Gyp program. - - Arguments: - proj_path: The path of the project file being created. The .user file - shares the same path (with an appropriate suffix). - version: The VisualStudioVersion object. - spec: The target dictionary containing the properties of the target. - Returns: - The MSVSUserFile object created. - """ - (domain, username) = _GetDomainAndUserName() - vcuser_filename = ".".join([proj_path, domain, username, "user"]) - user_file = MSVSUserFile.Writer(vcuser_filename, version, spec["target_name"]) - return user_file - - -def _GetMSVSConfigurationType(spec, build_file): - """Returns the configuration type for this project. - - It's a number defined by Microsoft. May raise an exception. - - Args: - spec: The target dictionary containing the properties of the target. - build_file: The path of the gyp file. - Returns: - An integer, the configuration type. - """ - try: - config_type = { - "executable": "1", # .exe - "shared_library": "2", # .dll - "loadable_module": "2", # .dll - "static_library": "4", # .lib - "windows_driver": "5", # .sys - "none": "10", # Utility type - }[spec["type"]] - except KeyError: - if spec.get("type"): - raise GypError( - "Target type %s is not a valid target type for " - "target %s in %s." % (spec["type"], spec["target_name"], build_file) - ) - else: - raise GypError( - "Missing type field for target %s in %s." - % (spec["target_name"], build_file) - ) - return config_type - - -def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config): - """Adds a configuration to the MSVS project. - - Many settings in a vcproj file are specific to a configuration. This - function the main part of the vcproj file that's configuration specific. - - Arguments: - p: The target project being generated. - spec: The target dictionary containing the properties of the target. - config_type: The configuration type, a number as defined by Microsoft. - config_name: The name of the configuration. - config: The dictionary that defines the special processing to be done - for this configuration. - """ - # Get the information for this configuration - include_dirs, midl_include_dirs, resource_include_dirs = _GetIncludeDirs(config) - libraries = _GetLibraries(spec) - library_dirs = _GetLibraryDirs(config) - out_file, vc_tool, _ = _GetOutputFilePathAndTool(spec, msbuild=False) - defines = _GetDefines(config) - defines = [_EscapeCppDefineForMSVS(d) for d in defines] - disabled_warnings = _GetDisabledWarnings(config) - prebuild = config.get("msvs_prebuild") - postbuild = config.get("msvs_postbuild") - def_file = _GetModuleDefinition(spec) - precompiled_header = config.get("msvs_precompiled_header") - - # Prepare the list of tools as a dictionary. - tools = {} - # Add in user specified msvs_settings. - msvs_settings = config.get("msvs_settings", {}) - MSVSSettings.ValidateMSVSSettings(msvs_settings) - - # Prevent default library inheritance from the environment. - _ToolAppend(tools, "VCLinkerTool", "AdditionalDependencies", ["$(NOINHERIT)"]) - - for tool in msvs_settings: - settings = config["msvs_settings"][tool] - for setting in settings: - _ToolAppend(tools, tool, setting, settings[setting]) - # Add the information to the appropriate tool - _ToolAppend(tools, "VCCLCompilerTool", "AdditionalIncludeDirectories", include_dirs) - _ToolAppend(tools, "VCMIDLTool", "AdditionalIncludeDirectories", midl_include_dirs) - _ToolAppend( - tools, - "VCResourceCompilerTool", - "AdditionalIncludeDirectories", - resource_include_dirs, - ) - # Add in libraries. - _ToolAppend(tools, "VCLinkerTool", "AdditionalDependencies", libraries) - _ToolAppend(tools, "VCLinkerTool", "AdditionalLibraryDirectories", library_dirs) - if out_file: - _ToolAppend(tools, vc_tool, "OutputFile", out_file, only_if_unset=True) - # Add defines. - _ToolAppend(tools, "VCCLCompilerTool", "PreprocessorDefinitions", defines) - _ToolAppend(tools, "VCResourceCompilerTool", "PreprocessorDefinitions", defines) - # Change program database directory to prevent collisions. - _ToolAppend( - tools, - "VCCLCompilerTool", - "ProgramDataBaseFileName", - "$(IntDir)$(ProjectName)\\vc80.pdb", - only_if_unset=True, - ) - # Add disabled warnings. - _ToolAppend(tools, "VCCLCompilerTool", "DisableSpecificWarnings", disabled_warnings) - # Add Pre-build. - _ToolAppend(tools, "VCPreBuildEventTool", "CommandLine", prebuild) - # Add Post-build. - _ToolAppend(tools, "VCPostBuildEventTool", "CommandLine", postbuild) - # Turn on precompiled headers if appropriate. - if precompiled_header: - precompiled_header = os.path.split(precompiled_header)[1] - _ToolAppend(tools, "VCCLCompilerTool", "UsePrecompiledHeader", "2") - _ToolAppend( - tools, "VCCLCompilerTool", "PrecompiledHeaderThrough", precompiled_header - ) - _ToolAppend(tools, "VCCLCompilerTool", "ForcedIncludeFiles", precompiled_header) - # Loadable modules don't generate import libraries; - # tell dependent projects to not expect one. - if spec["type"] == "loadable_module": - _ToolAppend(tools, "VCLinkerTool", "IgnoreImportLibrary", "true") - # Set the module definition file if any. - if def_file: - _ToolAppend(tools, "VCLinkerTool", "ModuleDefinitionFile", def_file) - - _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name) - - -def _GetIncludeDirs(config): - """Returns the list of directories to be used for #include directives. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of directory paths. - """ - # TODO(bradnelson): include_dirs should really be flexible enough not to - # require this sort of thing. - include_dirs = config.get("include_dirs", []) + config.get( - "msvs_system_include_dirs", [] - ) - midl_include_dirs = config.get("midl_include_dirs", []) + config.get( - "msvs_system_include_dirs", [] - ) - resource_include_dirs = config.get("resource_include_dirs", include_dirs) - include_dirs = _FixPaths(include_dirs) - midl_include_dirs = _FixPaths(midl_include_dirs) - resource_include_dirs = _FixPaths(resource_include_dirs) - return include_dirs, midl_include_dirs, resource_include_dirs - - -def _GetLibraryDirs(config): - """Returns the list of directories to be used for library search paths. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of directory paths. - """ - - library_dirs = config.get("library_dirs", []) - library_dirs = _FixPaths(library_dirs) - return library_dirs - - -def _GetLibraries(spec): - """Returns the list of libraries for this configuration. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - The list of directory paths. - """ - libraries = spec.get("libraries", []) - # Strip out -l, as it is not used on windows (but is needed so we can pass - # in libraries that are assumed to be in the default library path). - # Also remove duplicate entries, leaving only the last duplicate, while - # preserving order. - found = OrderedSet() - unique_libraries_list = [] - for entry in reversed(libraries): - library = re.sub(r"^\-l", "", entry) - if not os.path.splitext(library)[1]: - library += ".lib" - if library not in found: - found.add(library) - unique_libraries_list.append(library) - unique_libraries_list.reverse() - return unique_libraries_list - - -def _GetOutputFilePathAndTool(spec, msbuild): - """Returns the path and tool to use for this target. - - Figures out the path of the file this spec will create and the name of - the VC tool that will create it. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - A triple of (file path, name of the vc tool, name of the msbuild tool) - """ - # Select a name for the output file. - out_file = "" - vc_tool = "" - msbuild_tool = "" - output_file_map = { - "executable": ("VCLinkerTool", "Link", "$(OutDir)", ".exe"), - "shared_library": ("VCLinkerTool", "Link", "$(OutDir)", ".dll"), - "loadable_module": ("VCLinkerTool", "Link", "$(OutDir)", ".dll"), - "windows_driver": ("VCLinkerTool", "Link", "$(OutDir)", ".sys"), - "static_library": ("VCLibrarianTool", "Lib", "$(OutDir)lib\\", ".lib"), - } - output_file_props = output_file_map.get(spec["type"]) - if output_file_props and int(spec.get("msvs_auto_output_file", 1)): - vc_tool, msbuild_tool, out_dir, suffix = output_file_props - if spec.get("standalone_static_library", 0): - out_dir = "$(OutDir)" - out_dir = spec.get("product_dir", out_dir) - product_extension = spec.get("product_extension") - if product_extension: - suffix = "." + product_extension - elif msbuild: - suffix = "$(TargetExt)" - prefix = spec.get("product_prefix", "") - product_name = spec.get("product_name", "$(ProjectName)") - out_file = ntpath.join(out_dir, prefix + product_name + suffix) - return out_file, vc_tool, msbuild_tool - - -def _GetOutputTargetExt(spec): - """Returns the extension for this target, including the dot - - If product_extension is specified, set target_extension to this to avoid - MSB8012, returns None otherwise. Ignores any target_extension settings in - the input files. - - Arguments: - spec: The target dictionary containing the properties of the target. - Returns: - A string with the extension, or None - """ - target_extension = spec.get("product_extension") - if target_extension: - return "." + target_extension - return None - - -def _GetDefines(config): - """Returns the list of preprocessor definitions for this configuration. - - Arguments: - config: The dictionary that defines the special processing to be done - for this configuration. - Returns: - The list of preprocessor definitions. - """ - defines = [] - for d in config.get("defines", []): - fd = "=".join([str(dpart) for dpart in d]) if isinstance(d, list) else str(d) - defines.append(fd) - return defines - - -def _GetDisabledWarnings(config): - return [str(i) for i in config.get("msvs_disabled_warnings", [])] - - -def _GetModuleDefinition(spec): - def_file = "" - if spec["type"] in [ - "shared_library", - "loadable_module", - "executable", - "windows_driver", - ]: - def_files = [s for s in spec.get("sources", []) if s.endswith(".def")] - if len(def_files) == 1: - def_file = _FixPath(def_files[0]) - elif def_files: - raise ValueError( - "Multiple module definition files in one target, target %s lists " - "multiple .def files: %s" % (spec["target_name"], " ".join(def_files)) - ) - return def_file - - -def _ConvertToolsToExpectedForm(tools): - """Convert tools to a form expected by Visual Studio. - - Arguments: - tools: A dictionary of settings; the tool name is the key. - Returns: - A list of Tool objects. - """ - tool_list = [] - for tool, settings in tools.items(): - # Collapse settings with lists. - settings_fixed = {} - for setting, value in settings.items(): - if type(value) == list: - if ( - tool == "VCLinkerTool" and setting == "AdditionalDependencies" - ) or setting == "AdditionalOptions": - settings_fixed[setting] = " ".join(value) - else: - settings_fixed[setting] = ";".join(value) - else: - settings_fixed[setting] = value - # Add in this tool. - tool_list.append(MSVSProject.Tool(tool, settings_fixed)) - return tool_list - - -def _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name): - """Add to the project file the configuration specified by config. - - Arguments: - p: The target project being generated. - spec: the target project dict. - tools: A dictionary of settings; the tool name is the key. - config: The dictionary that defines the special processing to be done - for this configuration. - config_type: The configuration type, a number as defined by Microsoft. - config_name: The name of the configuration. - """ - attributes = _GetMSVSAttributes(spec, config, config_type) - # Add in this configuration. - tool_list = _ConvertToolsToExpectedForm(tools) - p.AddConfig(_ConfigFullName(config_name, config), attrs=attributes, tools=tool_list) - - -def _GetMSVSAttributes(spec, config, config_type): - # Prepare configuration attributes. - prepared_attrs = {} - source_attrs = config.get("msvs_configuration_attributes", {}) - for a in source_attrs: - prepared_attrs[a] = source_attrs[a] - # Add props files. - vsprops_dirs = config.get("msvs_props", []) - vsprops_dirs = _FixPaths(vsprops_dirs) - if vsprops_dirs: - prepared_attrs["InheritedPropertySheets"] = ";".join(vsprops_dirs) - # Set configuration type. - prepared_attrs["ConfigurationType"] = config_type - output_dir = prepared_attrs.get( - "OutputDirectory", "$(SolutionDir)$(ConfigurationName)" - ) - prepared_attrs["OutputDirectory"] = _FixPath(output_dir) + "\\" - if "IntermediateDirectory" not in prepared_attrs: - intermediate = "$(ConfigurationName)\\obj\\$(ProjectName)" - prepared_attrs["IntermediateDirectory"] = _FixPath(intermediate) + "\\" - else: - intermediate = _FixPath(prepared_attrs["IntermediateDirectory"]) + "\\" - intermediate = MSVSSettings.FixVCMacroSlashes(intermediate) - prepared_attrs["IntermediateDirectory"] = intermediate - return prepared_attrs - - -def _AddNormalizedSources(sources_set, sources_array): - sources_set.update(_NormalizedSource(s) for s in sources_array) - - -def _PrepareListOfSources(spec, generator_flags, gyp_file): - """Prepare list of sources and excluded sources. - - Besides the sources specified directly in the spec, adds the gyp file so - that a change to it will cause a re-compile. Also adds appropriate sources - for actions and copies. Assumes later stage will un-exclude files which - have custom build steps attached. - - Arguments: - spec: The target dictionary containing the properties of the target. - gyp_file: The name of the gyp file. - Returns: - A pair of (list of sources, list of excluded sources). - The sources will be relative to the gyp file. - """ - sources = OrderedSet() - _AddNormalizedSources(sources, spec.get("sources", [])) - excluded_sources = OrderedSet() - # Add in the gyp file. - if not generator_flags.get("standalone"): - sources.add(gyp_file) - - # Add in 'action' inputs and outputs. - for a in spec.get("actions", []): - inputs = a["inputs"] - inputs = [_NormalizedSource(i) for i in inputs] - # Add all inputs to sources and excluded sources. - inputs = OrderedSet(inputs) - sources.update(inputs) - if not spec.get("msvs_external_builder"): - excluded_sources.update(inputs) - if int(a.get("process_outputs_as_sources", False)): - _AddNormalizedSources(sources, a.get("outputs", [])) - # Add in 'copies' inputs and outputs. - for cpy in spec.get("copies", []): - _AddNormalizedSources(sources, cpy.get("files", [])) - return (sources, excluded_sources) - - -def _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, gyp_dir, sources, excluded_sources, list_excluded, version -): - """Adjusts the list of sources and excluded sources. - - Also converts the sets to lists. - - Arguments: - spec: The target dictionary containing the properties of the target. - options: Global generator options. - gyp_dir: The path to the gyp file being processed. - sources: A set of sources to be included for this project. - excluded_sources: A set of sources to be excluded for this project. - version: A MSVSVersion object. - Returns: - A trio of (list of sources, list of excluded sources, - path of excluded IDL file) - """ - # Exclude excluded sources coming into the generator. - excluded_sources.update(OrderedSet(spec.get("sources_excluded", []))) - # Add excluded sources into sources for good measure. - sources.update(excluded_sources) - # Convert to proper windows form. - # NOTE: sources goes from being a set to a list here. - # NOTE: excluded_sources goes from being a set to a list here. - sources = _FixPaths(sources) - # Convert to proper windows form. - excluded_sources = _FixPaths(excluded_sources) - - excluded_idl = _IdlFilesHandledNonNatively(spec, sources) - - precompiled_related = _GetPrecompileRelatedFiles(spec) - # Find the excluded ones, minus the precompiled header related ones. - fully_excluded = [i for i in excluded_sources if i not in precompiled_related] - - # Convert to folders and the right slashes. - sources = [i.split("\\") for i in sources] - sources = _ConvertSourcesToFilterHierarchy( - sources, - excluded=fully_excluded, - list_excluded=list_excluded, - msvs_version=version, - ) - - # Prune filters with a single child to flatten ugly directory structures - # such as ../../src/modules/module1 etc. - if version.UsesVcxproj(): - while ( - all(isinstance(s, MSVSProject.Filter) for s in sources) - and len({s.name for s in sources}) == 1 - ): - assert all(len(s.contents) == 1 for s in sources) - sources = [s.contents[0] for s in sources] - else: - while len(sources) == 1 and isinstance(sources[0], MSVSProject.Filter): - sources = sources[0].contents - - return sources, excluded_sources, excluded_idl - - -def _IdlFilesHandledNonNatively(spec, sources): - # If any non-native rules use 'idl' as an extension exclude idl files. - # Gather a list here to use later. - using_idl = False - for rule in spec.get("rules", []): - if rule["extension"] == "idl" and int(rule.get("msvs_external_rule", 0)): - using_idl = True - break - excluded_idl = [i for i in sources if i.endswith(".idl")] if using_idl else [] - return excluded_idl - - -def _GetPrecompileRelatedFiles(spec): - # Gather a list of precompiled header related sources. - precompiled_related = [] - for _, config in spec["configurations"].items(): - for k in precomp_keys: - f = config.get(k) - if f: - precompiled_related.append(_FixPath(f)) - return precompiled_related - - -def _ExcludeFilesFromBeingBuilt(p, spec, excluded_sources, excluded_idl, list_excluded): - exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - for file_name, excluded_configs in exclusions.items(): - if not list_excluded and len(excluded_configs) == len(spec["configurations"]): - # If we're not listing excluded files, then they won't appear in the - # project, so don't try to configure them to be excluded. - pass - else: - for config_name, config in excluded_configs: - p.AddFileConfig( - file_name, - _ConfigFullName(config_name, config), - {"ExcludedFromBuild": "true"}, - ) - - -def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl): - exclusions = {} - # Exclude excluded sources from being built. - for f in excluded_sources: - excluded_configs = [] - for config_name, config in spec["configurations"].items(): - precomped = [_FixPath(config.get(i, "")) for i in precomp_keys] - # Don't do this for ones that are precompiled header related. - if f not in precomped: - excluded_configs.append((config_name, config)) - exclusions[f] = excluded_configs - # If any non-native rules use 'idl' as an extension exclude idl files. - # Exclude them now. - for f in excluded_idl: - excluded_configs = [] - for config_name, config in spec["configurations"].items(): - excluded_configs.append((config_name, config)) - exclusions[f] = excluded_configs - return exclusions - - -def _AddToolFilesToMSVS(p, spec): - # Add in tool files (rules). - tool_files = OrderedSet() - for _, config in spec["configurations"].items(): - for f in config.get("msvs_tool_files", []): - tool_files.add(f) - for f in tool_files: - p.AddToolFile(f) - - -def _HandlePreCompiledHeaders(p, sources, spec): - # Pre-compiled header source stubs need a different compiler flag - # (generate precompiled header) and any source file not of the same - # kind (i.e. C vs. C++) as the precompiled header source stub needs - # to have use of precompiled headers disabled. - extensions_excluded_from_precompile = [] - for config_name, config in spec["configurations"].items(): - source = config.get("msvs_precompiled_source") - if source: - source = _FixPath(source) - # UsePrecompiledHeader=1 for if using precompiled headers. - tool = MSVSProject.Tool("VCCLCompilerTool", {"UsePrecompiledHeader": "1"}) - p.AddFileConfig( - source, _ConfigFullName(config_name, config), {}, tools=[tool] - ) - basename, extension = os.path.splitext(source) - if extension == ".c": - extensions_excluded_from_precompile = [".cc", ".cpp", ".cxx"] - else: - extensions_excluded_from_precompile = [".c"] - - def DisableForSourceTree(source_tree): - for source in source_tree: - if isinstance(source, MSVSProject.Filter): - DisableForSourceTree(source.contents) - else: - basename, extension = os.path.splitext(source) - if extension in extensions_excluded_from_precompile: - for config_name, config in spec["configurations"].items(): - tool = MSVSProject.Tool( - "VCCLCompilerTool", - { - "UsePrecompiledHeader": "0", - "ForcedIncludeFiles": "$(NOINHERIT)", - }, - ) - p.AddFileConfig( - _FixPath(source), - _ConfigFullName(config_name, config), - {}, - tools=[tool], - ) - - # Do nothing if there was no precompiled source. - if extensions_excluded_from_precompile: - DisableForSourceTree(sources) - - -def _AddActions(actions_to_add, spec, relative_path_of_gyp_file): - # Add actions. - actions = spec.get("actions", []) - # Don't setup_env every time. When all the actions are run together in one - # batch file in VS, the PATH will grow too long. - # Membership in this set means that the cygwin environment has been set up, - # and does not need to be set up again. - have_setup_env = set() - for a in actions: - # Attach actions to the gyp file if nothing else is there. - inputs = a.get("inputs") or [relative_path_of_gyp_file] - attached_to = inputs[0] - need_setup_env = attached_to not in have_setup_env - cmd = _BuildCommandLineForRule( - spec, a, has_input_path=False, do_setup_env=need_setup_env - ) - have_setup_env.add(attached_to) - # Add the action. - _AddActionStep( - actions_to_add, - inputs=inputs, - outputs=a.get("outputs", []), - description=a.get("message", a["action_name"]), - command=cmd, - ) - - -def _WriteMSVSUserFile(project_path, version, spec): - # Add run_as and test targets. - if "run_as" in spec: - run_as = spec["run_as"] - action = run_as.get("action", []) - environment = run_as.get("environment", []) - working_directory = run_as.get("working_directory", ".") - elif int(spec.get("test", 0)): - action = ["$(TargetPath)", "--gtest_print_time"] - environment = [] - working_directory = "." - else: - return # Nothing to add - # Write out the user file. - user_file = _CreateMSVSUserFile(project_path, version, spec) - for config_name, c_data in spec["configurations"].items(): - user_file.AddDebugSettings( - _ConfigFullName(config_name, c_data), action, environment, working_directory - ) - user_file.WriteIfChanged() - - -def _AddCopies(actions_to_add, spec): - copies = _GetCopies(spec) - for inputs, outputs, cmd, description in copies: - _AddActionStep( - actions_to_add, - inputs=inputs, - outputs=outputs, - description=description, - command=cmd, - ) - - -def _GetCopies(spec): - copies = [] - # Add copies. - for cpy in spec.get("copies", []): - for src in cpy.get("files", []): - dst = os.path.join(cpy["destination"], os.path.basename(src)) - # _AddCustomBuildToolForMSVS() will call _FixPath() on the inputs and - # outputs, so do the same for our generated command line. - if src.endswith("/"): - src_bare = src[:-1] - base_dir = posixpath.split(src_bare)[0] - outer_dir = posixpath.split(src_bare)[1] - fixed_dst = _FixPath(dst) - full_dst = f'"{fixed_dst}\\{outer_dir}\\"' - cmd = 'mkdir {} 2>nul & cd "{}" && xcopy /e /f /y "{}" {}'.format( - full_dst, - _FixPath(base_dir), - outer_dir, - full_dst, - ) - copies.append( - ( - [src], - ["dummy_copies", dst], - cmd, - f"Copying {src} to {fixed_dst}", - ) - ) - else: - fix_dst = _FixPath(cpy["destination"]) - cmd = 'mkdir "{}" 2>nul & set ERRORLEVEL=0 & copy /Y "{}" "{}"'.format( - fix_dst, - _FixPath(src), - _FixPath(dst), - ) - copies.append(([src], [dst], cmd, f"Copying {src} to {fix_dst}")) - return copies - - -def _GetPathDict(root, path): - # |path| will eventually be empty (in the recursive calls) if it was initially - # relative; otherwise it will eventually end up as '\', 'D:\', etc. - if not path or path.endswith(os.sep): - return root - parent, folder = os.path.split(path) - parent_dict = _GetPathDict(root, parent) - if folder not in parent_dict: - parent_dict[folder] = {} - return parent_dict[folder] - - -def _DictsToFolders(base_path, bucket, flat): - # Convert to folders recursively. - children = [] - for folder, contents in bucket.items(): - if type(contents) == dict: - folder_children = _DictsToFolders( - os.path.join(base_path, folder), contents, flat - ) - if flat: - children += folder_children - else: - folder_children = MSVSNew.MSVSFolder( - os.path.join(base_path, folder), - name="(" + folder + ")", - entries=folder_children, - ) - children.append(folder_children) - else: - children.append(contents) - return children - - -def _CollapseSingles(parent, node): - # Recursively explorer the tree of dicts looking for projects which are - # the sole item in a folder which has the same name as the project. Bring - # such projects up one level. - if type(node) == dict and len(node) == 1 and next(iter(node)) == parent + ".vcproj": - return node[next(iter(node))] - if type(node) != dict: - return node - for child in node: - node[child] = _CollapseSingles(child, node[child]) - return node - - -def _GatherSolutionFolders(sln_projects, project_objects, flat): - root = {} - # Convert into a tree of dicts on path. - for p in sln_projects: - gyp_file, target = gyp.common.ParseQualifiedTarget(p)[0:2] - if p.endswith("#host"): - target += "_host" - gyp_dir = os.path.dirname(gyp_file) - path_dict = _GetPathDict(root, gyp_dir) - path_dict[target + ".vcproj"] = project_objects[p] - # Walk down from the top until we hit a folder that has more than one entry. - # In practice, this strips the top-level "src/" dir from the hierarchy in - # the solution. - while len(root) == 1 and type(root[next(iter(root))]) == dict: - root = root[next(iter(root))] - # Collapse singles. - root = _CollapseSingles("", root) - # Merge buckets until everything is a root entry. - return _DictsToFolders("", root, flat) - - -def _GetPathOfProject(qualified_target, spec, options, msvs_version): - default_config = _GetDefaultConfiguration(spec) - proj_filename = default_config.get("msvs_existing_vcproj") - if not proj_filename: - proj_filename = spec["target_name"] - if spec["toolset"] == "host": - proj_filename += "_host" - proj_filename = proj_filename + options.suffix + msvs_version.ProjectExtension() - - build_file = gyp.common.BuildFile(qualified_target) - proj_path = os.path.join(os.path.dirname(build_file), proj_filename) - fix_prefix = None - if options.generator_output: - project_dir_path = os.path.dirname(os.path.abspath(proj_path)) - proj_path = os.path.join(options.generator_output, proj_path) - fix_prefix = gyp.common.RelativePath( - project_dir_path, os.path.dirname(proj_path) - ) - return proj_path, fix_prefix - - -def _GetPlatformOverridesOfProject(spec): - # Prepare a dict indicating which project configurations are used for which - # solution configurations for this target. - config_platform_overrides = {} - for config_name, c in spec["configurations"].items(): - config_fullname = _ConfigFullName(config_name, c) - platform = c.get("msvs_target_platform", _ConfigPlatform(c)) - fixed_config_fullname = "{}|{}".format( - _ConfigBaseName(config_name, _ConfigPlatform(c)), - platform, - ) - if spec["toolset"] == "host" and generator_supports_multiple_toolsets: - fixed_config_fullname = f"{config_name}|x64" - config_platform_overrides[config_fullname] = fixed_config_fullname - return config_platform_overrides - - -def _CreateProjectObjects(target_list, target_dicts, options, msvs_version): - """Create a MSVSProject object for the targets found in target list. - - Arguments: - target_list: the list of targets to generate project objects for. - target_dicts: the dictionary of specifications. - options: global generator options. - msvs_version: the MSVSVersion object. - Returns: - A set of created projects, keyed by target. - """ - global fixpath_prefix - # Generate each project. - projects = {} - for qualified_target in target_list: - spec = target_dicts[qualified_target] - proj_path, fixpath_prefix = _GetPathOfProject( - qualified_target, spec, options, msvs_version - ) - guid = _GetGuidOfProject(proj_path, spec) - overrides = _GetPlatformOverridesOfProject(spec) - build_file = gyp.common.BuildFile(qualified_target) - # Create object for this project. - target_name = spec["target_name"] - if spec["toolset"] == "host": - target_name += "_host" - obj = MSVSNew.MSVSProject( - proj_path, - name=target_name, - guid=guid, - spec=spec, - build_file=build_file, - config_platform_overrides=overrides, - fixpath_prefix=fixpath_prefix, - ) - # Set project toolset if any (MS build only) - if msvs_version.UsesVcxproj(): - obj.set_msbuild_toolset( - _GetMsbuildToolsetOfProject(proj_path, spec, msvs_version) - ) - projects[qualified_target] = obj - # Set all the dependencies, but not if we are using an external builder like - # ninja - for project in projects.values(): - if not project.spec.get("msvs_external_builder"): - deps = project.spec.get("dependencies", []) - deps = [projects[d] for d in deps] - project.set_dependencies(deps) - return projects - - -def _InitNinjaFlavor(params, target_list, target_dicts): - """Initialize targets for the ninja flavor. - - This sets up the necessary variables in the targets to generate msvs projects - that use ninja as an external builder. The variables in the spec are only set - if they have not been set. This allows individual specs to override the - default values initialized here. - Arguments: - params: Params provided to the generator. - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - """ - for qualified_target in target_list: - spec = target_dicts[qualified_target] - if spec.get("msvs_external_builder"): - # The spec explicitly defined an external builder, so don't change it. - continue - - path_to_ninja = spec.get("msvs_path_to_ninja", "ninja.exe") - - spec["msvs_external_builder"] = "ninja" - if not spec.get("msvs_external_builder_out_dir"): - gyp_file, _, _ = gyp.common.ParseQualifiedTarget(qualified_target) - gyp_dir = os.path.dirname(gyp_file) - configuration = "$(Configuration)" - if params.get("target_arch") == "x64": - configuration += "_x64" - if params.get("target_arch") == "arm64": - configuration += "_arm64" - spec["msvs_external_builder_out_dir"] = os.path.join( - gyp.common.RelativePath(params["options"].toplevel_dir, gyp_dir), - ninja_generator.ComputeOutputDir(params), - configuration, - ) - if not spec.get("msvs_external_builder_build_cmd"): - spec["msvs_external_builder_build_cmd"] = [ - path_to_ninja, - "-C", - "$(OutDir)", - "$(ProjectName)", - ] - if not spec.get("msvs_external_builder_clean_cmd"): - spec["msvs_external_builder_clean_cmd"] = [ - path_to_ninja, - "-C", - "$(OutDir)", - "-tclean", - "$(ProjectName)", - ] - - -def CalculateVariables(default_variables, params): - """Generated variables that require params to be known.""" - - generator_flags = params.get("generator_flags", {}) - - # Select project file format version (if unset, default to auto detecting). - msvs_version = MSVSVersion.SelectVisualStudioVersion( - generator_flags.get("msvs_version", "auto") - ) - # Stash msvs_version for later (so we don't have to probe the system twice). - params["msvs_version"] = msvs_version - - # Set a variable so conditions can be based on msvs_version. - default_variables["MSVS_VERSION"] = msvs_version.ShortName() - - # To determine processor word size on Windows, in addition to checking - # PROCESSOR_ARCHITECTURE (which reflects the word size of the current - # process), it is also necessary to check PROCESSOR_ARCITEW6432 (which - # contains the actual word size of the system when running thru WOW64). - if ( - os.environ.get("PROCESSOR_ARCHITECTURE", "").find("64") >= 0 - or os.environ.get("PROCESSOR_ARCHITEW6432", "").find("64") >= 0 - ): - default_variables["MSVS_OS_BITS"] = 64 - else: - default_variables["MSVS_OS_BITS"] = 32 - - if gyp.common.GetFlavor(params) == "ninja": - default_variables["SHARED_INTERMEDIATE_DIR"] = "$(OutDir)gen" - - -def PerformBuild(data, configurations, params): - options = params["options"] - msvs_version = params["msvs_version"] - devenv = os.path.join(msvs_version.path, "Common7", "IDE", "devenv.com") - - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - sln_path = build_file_root + options.suffix + ".sln" - if options.generator_output: - sln_path = os.path.join(options.generator_output, sln_path) - - for config in configurations: - arguments = [devenv, sln_path, "/Build", config] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CalculateGeneratorInputInfo(params): - if params.get("flavor") == "ninja": - toplevel = params["options"].toplevel_dir - qualified_out_dir = os.path.normpath( - os.path.join( - toplevel, - ninja_generator.ComputeOutputDir(params), - "gypfiles-msvs-ninja", - ) - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def GenerateOutput(target_list, target_dicts, data, params): - """Generate .sln and .vcproj files. - - This is the entry point for this generator. - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - data: Dictionary containing per .gyp data. - """ - global fixpath_prefix - - options = params["options"] - - # Get the project file format version back out of where we stashed it in - # GeneratorCalculatedVariables. - msvs_version = params["msvs_version"] - - generator_flags = params.get("generator_flags", {}) - - # Optionally shard targets marked with 'msvs_shard': SHARD_COUNT. - (target_list, target_dicts) = MSVSUtil.ShardTargets(target_list, target_dicts) - - # Optionally use the large PDB workaround for targets marked with - # 'msvs_large_pdb': 1. - (target_list, target_dicts) = MSVSUtil.InsertLargePdbShims( - target_list, target_dicts, generator_default_variables - ) - - # Optionally configure each spec to use ninja as the external builder. - if params.get("flavor") == "ninja": - _InitNinjaFlavor(params, target_list, target_dicts) - - # Prepare the set of configurations. - configs = set() - for qualified_target in target_list: - spec = target_dicts[qualified_target] - for config_name, config in spec["configurations"].items(): - config_name = _ConfigFullName(config_name, config) - configs.add(config_name) - if config_name == "Release|arm64": - configs.add("Release|x64") - configs = list(configs) - - # Figure out all the projects that will be generated and their guids - project_objects = _CreateProjectObjects( - target_list, target_dicts, options, msvs_version - ) - - # Generate each project. - missing_sources = [] - for project in project_objects.values(): - fixpath_prefix = project.fixpath_prefix - missing_sources.extend( - _GenerateProject(project, options, msvs_version, generator_flags, spec) - ) - fixpath_prefix = None - - for build_file in data: - # Validate build_file extension - target_only_configs = configs - if generator_supports_multiple_toolsets: - target_only_configs = [i for i in configs if i.endswith("arm64")] - if not build_file.endswith(".gyp"): - continue - sln_path = os.path.splitext(build_file)[0] + options.suffix + ".sln" - if options.generator_output: - sln_path = os.path.join(options.generator_output, sln_path) - # Get projects in the solution, and their dependents. - sln_projects = gyp.common.BuildFileTargets(target_list, build_file) - sln_projects += gyp.common.DeepDependencyTargets(target_dicts, sln_projects) - # Create folder hierarchy. - root_entries = _GatherSolutionFolders( - sln_projects, project_objects, flat=msvs_version.FlatSolution() - ) - # Create solution. - sln = MSVSNew.MSVSSolution( - sln_path, - entries=root_entries, - variants=target_only_configs, - websiteProperties=False, - version=msvs_version, - ) - sln.Write() - - if missing_sources: - error_message = "Missing input files:\n" + "\n".join(set(missing_sources)) - if generator_flags.get("msvs_error_on_missing_sources", False): - raise GypError(error_message) - else: - print("Warning: " + error_message, file=sys.stdout) - - -def _GenerateMSBuildFiltersFile( - filters_path, - source_files, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, -): - """Generate the filters file. - - This file is used by Visual Studio to organize the presentation of source - files into folders. - - Arguments: - filters_path: The path of the file to be created. - source_files: The hierarchical structure of all the sources. - extension_to_rule_name: A dictionary mapping file extensions to rules. - """ - filter_group = [] - source_group = [] - _AppendFiltersForMSBuild( - "", - source_files, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, - ) - if filter_group: - content = [ - "Project", - { - "ToolsVersion": "4.0", - "xmlns": "http://schemas.microsoft.com/developer/msbuild/2003", - }, - ["ItemGroup"] + filter_group, - ["ItemGroup"] + source_group, - ] - easy_xml.WriteXmlIfChanged(content, filters_path, pretty=True, win32=True) - elif os.path.exists(filters_path): - # We don't need this filter anymore. Delete the old filter file. - os.unlink(filters_path) - - -def _AppendFiltersForMSBuild( - parent_filter_name, - sources, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, -): - """Creates the list of filters and sources to be added in the filter file. - - Args: - parent_filter_name: The name of the filter under which the sources are - found. - sources: The hierarchy of filters and sources to process. - extension_to_rule_name: A dictionary mapping file extensions to rules. - filter_group: The list to which filter entries will be appended. - source_group: The list to which source entries will be appended. - """ - for source in sources: - if isinstance(source, MSVSProject.Filter): - # We have a sub-filter. Create the name of that sub-filter. - if not parent_filter_name: - filter_name = source.name - else: - filter_name = f"{parent_filter_name}\\{source.name}" - # Add the filter to the group. - filter_group.append( - [ - "Filter", - {"Include": filter_name}, - ["UniqueIdentifier", MSVSNew.MakeGuid(source.name)], - ] - ) - # Recurse and add its dependents. - _AppendFiltersForMSBuild( - filter_name, - source.contents, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - filter_group, - source_group, - ) - else: - # It's a source. Create a source entry. - _, element = _MapFileToMsBuildSourceType( - source, rule_dependencies, extension_to_rule_name, platforms, toolset - ) - source_entry = [element, {"Include": source}] - # Specify the filter it is part of, if any. - if parent_filter_name: - source_entry.append(["Filter", parent_filter_name]) - source_group.append(source_entry) - - -def _MapFileToMsBuildSourceType( - source, rule_dependencies, extension_to_rule_name, platforms, toolset -): - """Returns the group and element type of the source file. - - Arguments: - source: The source file name. - extension_to_rule_name: A dictionary mapping file extensions to rules. - - Returns: - A pair of (group this file should be part of, the label of element) - """ - _, ext = os.path.splitext(source) - ext = ext.lower() - if ext in extension_to_rule_name: - group = "rule" - element = extension_to_rule_name[ext] - elif ext in [".cc", ".cpp", ".c", ".cxx", ".mm"]: - group = "compile" - element = "ClCompile" - elif ext in [".h", ".hxx"]: - group = "include" - element = "ClInclude" - elif ext == ".rc": - group = "resource" - element = "ResourceCompile" - elif ext in [".s", ".asm"]: - group = "masm" - element = "MASM" - if "arm64" in platforms and toolset == "target": - element = "MARMASM" - elif ext == ".idl": - group = "midl" - element = "Midl" - elif source in rule_dependencies: - group = "rule_dependency" - element = "CustomBuild" - else: - group = "none" - element = "None" - return (group, element) - - -def _GenerateRulesForMSBuild( - output_dir, - options, - spec, - sources, - excluded_sources, - props_files_of_rules, - targets_files_of_rules, - actions_to_add, - rule_dependencies, - extension_to_rule_name, -): - # MSBuild rules are implemented using three files: an XML file, a .targets - # file and a .props file. - # For more details see: - # https://devblogs.microsoft.com/cppblog/quick-help-on-vs2010-custom-build-rule/ - rules = spec.get("rules", []) - rules_native = [r for r in rules if not int(r.get("msvs_external_rule", 0))] - rules_external = [r for r in rules if int(r.get("msvs_external_rule", 0))] - - msbuild_rules = [] - for rule in rules_native: - # Skip a rule with no action and no inputs. - if "action" not in rule and not rule.get("rule_sources", []): - continue - msbuild_rule = MSBuildRule(rule, spec) - msbuild_rules.append(msbuild_rule) - rule_dependencies.update(msbuild_rule.additional_dependencies.split(";")) - extension_to_rule_name[msbuild_rule.extension] = msbuild_rule.rule_name - if msbuild_rules: - base = spec["target_name"] + options.suffix - props_name = base + ".props" - targets_name = base + ".targets" - xml_name = base + ".xml" - - props_files_of_rules.add(props_name) - targets_files_of_rules.add(targets_name) - - props_path = os.path.join(output_dir, props_name) - targets_path = os.path.join(output_dir, targets_name) - xml_path = os.path.join(output_dir, xml_name) - - _GenerateMSBuildRulePropsFile(props_path, msbuild_rules) - _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules) - _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules) - - if rules_external: - _GenerateExternalRules( - rules_external, output_dir, spec, sources, options, actions_to_add - ) - _AdjustSourcesForRules(rules, sources, excluded_sources, True) - - -class MSBuildRule: - """Used to store information used to generate an MSBuild rule. - - Attributes: - rule_name: The rule name, sanitized to use in XML. - target_name: The name of the target. - after_targets: The name of the AfterTargets element. - before_targets: The name of the BeforeTargets element. - depends_on: The name of the DependsOn element. - compute_output: The name of the ComputeOutput element. - dirs_to_make: The name of the DirsToMake element. - inputs: The name of the _inputs element. - tlog: The name of the _tlog element. - extension: The extension this rule applies to. - description: The message displayed when this rule is invoked. - additional_dependencies: A string listing additional dependencies. - outputs: The outputs of this rule. - command: The command used to run the rule. - """ - - def __init__(self, rule, spec): - self.display_name = rule["rule_name"] - # Assure that the rule name is only characters and numbers - self.rule_name = re.sub(r"\W", "_", self.display_name) - # Create the various element names, following the example set by the - # Visual Studio 2008 to 2010 conversion. I don't know if VS2010 - # is sensitive to the exact names. - self.target_name = "_" + self.rule_name - self.after_targets = self.rule_name + "AfterTargets" - self.before_targets = self.rule_name + "BeforeTargets" - self.depends_on = self.rule_name + "DependsOn" - self.compute_output = "Compute%sOutput" % self.rule_name - self.dirs_to_make = self.rule_name + "DirsToMake" - self.inputs = self.rule_name + "_inputs" - self.tlog = self.rule_name + "_tlog" - self.extension = rule["extension"] - if not self.extension.startswith("."): - self.extension = "." + self.extension - - self.description = MSVSSettings.ConvertVCMacrosToMSBuild( - rule.get("message", self.rule_name) - ) - old_additional_dependencies = _FixPaths(rule.get("inputs", [])) - self.additional_dependencies = ";".join( - [ - MSVSSettings.ConvertVCMacrosToMSBuild(i) - for i in old_additional_dependencies - ] - ) - old_outputs = _FixPaths(rule.get("outputs", [])) - self.outputs = ";".join( - [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in old_outputs] - ) - old_command = _BuildCommandLineForRule( - spec, rule, has_input_path=True, do_setup_env=True - ) - self.command = MSVSSettings.ConvertVCMacrosToMSBuild(old_command) - - -def _GenerateMSBuildRulePropsFile(props_path, msbuild_rules): - """Generate the .props file.""" - content = [ - "Project", - {"xmlns": "http://schemas.microsoft.com/developer/msbuild/2003"}, - ] - for rule in msbuild_rules: - content.extend( - [ - [ - "PropertyGroup", - { - "Condition": "'$(%s)' == '' and '$(%s)' == '' and " - "'$(ConfigurationType)' != 'Makefile'" - % (rule.before_targets, rule.after_targets) - }, - [rule.before_targets, "Midl"], - [rule.after_targets, "CustomBuild"], - ], - [ - "PropertyGroup", - [ - rule.depends_on, - {"Condition": "'$(ConfigurationType)' != 'Makefile'"}, - "_SelectedFiles;$(%s)" % rule.depends_on, - ], - ], - [ - "ItemDefinitionGroup", - [ - rule.rule_name, - ["CommandLineTemplate", rule.command], - ["Outputs", rule.outputs], - ["ExecutionDescription", rule.description], - ["AdditionalDependencies", rule.additional_dependencies], - ], - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, props_path, pretty=True, win32=True) - - -def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules): - """Generate the .targets file.""" - content = [ - "Project", - {"xmlns": "http://schemas.microsoft.com/developer/msbuild/2003"}, - ] - item_group = [ - "ItemGroup", - [ - "PropertyPageSchema", - {"Include": "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml"}, - ], - ] - for rule in msbuild_rules: - item_group.append( - [ - "AvailableItemName", - {"Include": rule.rule_name}, - ["Targets", rule.target_name], - ] - ) - content.append(item_group) - - for rule in msbuild_rules: - content.append( - [ - "UsingTask", - { - "TaskName": rule.rule_name, - "TaskFactory": "XamlTaskFactory", - "AssemblyName": "Microsoft.Build.Tasks.v4.0", - }, - ["Task", "$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml"], - ] - ) - for rule in msbuild_rules: - rule_name = rule.rule_name - target_outputs = "%%(%s.Outputs)" % rule_name - target_inputs = ( - "%%(%s.Identity);%%(%s.AdditionalDependencies);" "$(MSBuildProjectFile)" - ) % (rule_name, rule_name) - rule_inputs = "%%(%s.Identity)" % rule_name - extension_condition = ( - "'%(Extension)'=='.obj' or " - "'%(Extension)'=='.res' or " - "'%(Extension)'=='.rsc' or " - "'%(Extension)'=='.lib'" - ) - remove_section = [ - "ItemGroup", - {"Condition": "'@(SelectedFiles)' != ''"}, - [ - rule_name, - { - "Remove": "@(%s)" % rule_name, - "Condition": "'%(Identity)' != '@(SelectedFiles)'", - }, - ], - ] - inputs_section = [ - "ItemGroup", - [rule.inputs, {"Include": "%%(%s.AdditionalDependencies)" % rule_name}], - ] - logging_section = [ - "ItemGroup", - [ - rule.tlog, - { - "Include": "%%(%s.Outputs)" % rule_name, - "Condition": ( - "'%%(%s.Outputs)' != '' and " - "'%%(%s.ExcludedFromBuild)' != 'true'" % (rule_name, rule_name) - ), - }, - ["Source", "@(%s, '|')" % rule_name], - ["Inputs", "@(%s -> '%%(Fullpath)', ';')" % rule.inputs], - ], - ] - message_section = [ - "Message", - {"Importance": "High", "Text": "%%(%s.ExecutionDescription)" % rule_name}, - ] - write_tlog_section = [ - "WriteLinesToFile", - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule.tlog, rule.tlog), - "File": "$(IntDir)$(ProjectName).write.1.tlog", - "Lines": "^%%(%s.Source);@(%s->'%%(Fullpath)')" - % (rule.tlog, rule.tlog), - }, - ] - read_tlog_section = [ - "WriteLinesToFile", - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule.tlog, rule.tlog), - "File": "$(IntDir)$(ProjectName).read.1.tlog", - "Lines": f"^%({rule.tlog}.Source);%({rule.tlog}.Inputs)", - }, - ] - command_and_input_section = [ - rule_name, - { - "Condition": "'@(%s)' != '' and '%%(%s.ExcludedFromBuild)' != " - "'true'" % (rule_name, rule_name), - "EchoOff": "true", - "StandardOutputImportance": "High", - "StandardErrorImportance": "High", - "CommandLineTemplate": "%%(%s.CommandLineTemplate)" % rule_name, - "AdditionalOptions": "%%(%s.AdditionalOptions)" % rule_name, - "Inputs": rule_inputs, - }, - ] - content.extend( - [ - [ - "Target", - { - "Name": rule.target_name, - "BeforeTargets": "$(%s)" % rule.before_targets, - "AfterTargets": "$(%s)" % rule.after_targets, - "Condition": "'@(%s)' != ''" % rule_name, - "DependsOnTargets": "$(%s);%s" - % (rule.depends_on, rule.compute_output), - "Outputs": target_outputs, - "Inputs": target_inputs, - }, - remove_section, - inputs_section, - logging_section, - message_section, - write_tlog_section, - read_tlog_section, - command_and_input_section, - ], - [ - "PropertyGroup", - [ - "ComputeLinkInputsTargets", - "$(ComputeLinkInputsTargets);", - "%s;" % rule.compute_output, - ], - [ - "ComputeLibInputsTargets", - "$(ComputeLibInputsTargets);", - "%s;" % rule.compute_output, - ], - ], - [ - "Target", - { - "Name": rule.compute_output, - "Condition": "'@(%s)' != ''" % rule_name, - }, - [ - "ItemGroup", - [ - rule.dirs_to_make, - { - "Condition": "'@(%s)' != '' and " - "'%%(%s.ExcludedFromBuild)' != 'true'" - % (rule_name, rule_name), - "Include": "%%(%s.Outputs)" % rule_name, - }, - ], - [ - "Link", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - [ - "Lib", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - [ - "ImpLib", - { - "Include": "%%(%s.Identity)" % rule.dirs_to_make, - "Condition": extension_condition, - }, - ], - ], - [ - "MakeDir", - { - "Directories": ( - "@(%s->'%%(RootDir)%%(Directory)')" % rule.dirs_to_make - ) - }, - ], - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, targets_path, pretty=True, win32=True) - - -def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules): - # Generate the .xml file - content = [ - "ProjectSchemaDefinitions", - { - "xmlns": ( - "clr-namespace:Microsoft.Build.Framework.XamlTypes;" - "assembly=Microsoft.Build.Framework" - ), - "xmlns:x": "http://schemas.microsoft.com/winfx/2006/xaml", - "xmlns:sys": "clr-namespace:System;assembly=mscorlib", - "xmlns:transformCallback": "Microsoft.Cpp.Dev10.ConvertPropertyCallback", - }, - ] - for rule in msbuild_rules: - content.extend( - [ - [ - "Rule", - { - "Name": rule.rule_name, - "PageTemplate": "tool", - "DisplayName": rule.display_name, - "Order": "200", - }, - [ - "Rule.DataSource", - [ - "DataSource", - {"Persistence": "ProjectFile", "ItemType": rule.rule_name}, - ], - ], - [ - "Rule.Categories", - [ - "Category", - {"Name": "General"}, - ["Category.DisplayName", ["sys:String", "General"]], - ], - [ - "Category", - {"Name": "Command Line", "Subtype": "CommandLine"}, - ["Category.DisplayName", ["sys:String", "Command Line"]], - ], - ], - [ - "StringListProperty", - { - "Name": "Inputs", - "Category": "Command Line", - "IsRequired": "true", - "Switch": " ", - }, - [ - "StringListProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "ItemType": rule.rule_name, - "SourceType": "Item", - }, - ], - ], - ], - [ - "StringProperty", - { - "Name": "CommandLineTemplate", - "DisplayName": "Command Line", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "DynamicEnumProperty", - { - "Name": rule.before_targets, - "Category": "General", - "EnumProvider": "Targets", - "IncludeInCommandLine": "False", - }, - [ - "DynamicEnumProperty.DisplayName", - ["sys:String", "Execute Before"], - ], - [ - "DynamicEnumProperty.Description", - [ - "sys:String", - "Specifies the targets for the build customization" - " to run before.", - ], - ], - [ - "DynamicEnumProperty.ProviderSettings", - [ - "NameValuePair", - { - "Name": "Exclude", - "Value": "^%s|^Compute" % rule.before_targets, - }, - ], - ], - [ - "DynamicEnumProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "HasConfigurationCondition": "true", - }, - ], - ], - ], - [ - "DynamicEnumProperty", - { - "Name": rule.after_targets, - "Category": "General", - "EnumProvider": "Targets", - "IncludeInCommandLine": "False", - }, - [ - "DynamicEnumProperty.DisplayName", - ["sys:String", "Execute After"], - ], - [ - "DynamicEnumProperty.Description", - [ - "sys:String", - ( - "Specifies the targets for the build customization" - " to run after." - ), - ], - ], - [ - "DynamicEnumProperty.ProviderSettings", - [ - "NameValuePair", - { - "Name": "Exclude", - "Value": "^%s|^Compute" % rule.after_targets, - }, - ], - ], - [ - "DynamicEnumProperty.DataSource", - [ - "DataSource", - { - "Persistence": "ProjectFile", - "ItemType": "", - "HasConfigurationCondition": "true", - }, - ], - ], - ], - [ - "StringListProperty", - { - "Name": "Outputs", - "DisplayName": "Outputs", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "StringProperty", - { - "Name": "ExecutionDescription", - "DisplayName": "Execution Description", - "Visible": "False", - "IncludeInCommandLine": "False", - }, - ], - [ - "StringListProperty", - { - "Name": "AdditionalDependencies", - "DisplayName": "Additional Dependencies", - "IncludeInCommandLine": "False", - "Visible": "false", - }, - ], - [ - "StringProperty", - { - "Subtype": "AdditionalOptions", - "Name": "AdditionalOptions", - "Category": "Command Line", - }, - [ - "StringProperty.DisplayName", - ["sys:String", "Additional Options"], - ], - [ - "StringProperty.Description", - ["sys:String", "Additional Options"], - ], - ], - ], - [ - "ItemType", - {"Name": rule.rule_name, "DisplayName": rule.display_name}, - ], - [ - "FileExtension", - {"Name": "*" + rule.extension, "ContentType": rule.rule_name}, - ], - [ - "ContentType", - { - "Name": rule.rule_name, - "DisplayName": "", - "ItemType": rule.rule_name, - }, - ], - ] - ) - easy_xml.WriteXmlIfChanged(content, xml_path, pretty=True, win32=True) - - -def _GetConfigurationAndPlatform(name, settings, spec): - configuration = name.rsplit("_", 1)[0] - platform = settings.get("msvs_configuration_platform", "Win32") - if spec["toolset"] == "host" and platform == "arm64": - platform = "x64" # Host-only tools are always built for x64 - return (configuration, platform) - - -def _GetConfigurationCondition(name, settings, spec): - return r"'$(Configuration)|$(Platform)'=='%s|%s'" % _GetConfigurationAndPlatform( - name, settings, spec - ) - - -def _GetMSBuildProjectConfigurations(configurations, spec): - group = ["ItemGroup", {"Label": "ProjectConfigurations"}] - for (name, settings) in sorted(configurations.items()): - configuration, platform = _GetConfigurationAndPlatform(name, settings, spec) - designation = f"{configuration}|{platform}" - group.append( - [ - "ProjectConfiguration", - {"Include": designation}, - ["Configuration", configuration], - ["Platform", platform], - ] - ) - return [group] - - -def _GetMSBuildGlobalProperties(spec, version, guid, gyp_file_name): - namespace = os.path.splitext(gyp_file_name)[0] - properties = [ - [ - "PropertyGroup", - {"Label": "Globals"}, - ["ProjectGuid", guid], - ["Keyword", "Win32Proj"], - ["RootNamespace", namespace], - ["IgnoreWarnCompileDuplicatedFilename", "true"], - ] - ] - - if ( - os.environ.get("PROCESSOR_ARCHITECTURE") == "AMD64" - or os.environ.get("PROCESSOR_ARCHITEW6432") == "AMD64" - ): - properties[0].append(["PreferredToolArchitecture", "x64"]) - - if spec.get("msvs_target_platform_version"): - target_platform_version = spec.get("msvs_target_platform_version") - properties[0].append(["WindowsTargetPlatformVersion", target_platform_version]) - if spec.get("msvs_target_platform_minversion"): - target_platform_minversion = spec.get("msvs_target_platform_minversion") - properties[0].append( - ["WindowsTargetPlatformMinVersion", target_platform_minversion] - ) - else: - properties[0].append( - ["WindowsTargetPlatformMinVersion", target_platform_version] - ) - - if spec.get("msvs_enable_winrt"): - properties[0].append(["DefaultLanguage", "en-US"]) - properties[0].append(["AppContainerApplication", "true"]) - if spec.get("msvs_application_type_revision"): - app_type_revision = spec.get("msvs_application_type_revision") - properties[0].append(["ApplicationTypeRevision", app_type_revision]) - else: - properties[0].append(["ApplicationTypeRevision", "8.1"]) - if spec.get("msvs_enable_winphone"): - properties[0].append(["ApplicationType", "Windows Phone"]) - else: - properties[0].append(["ApplicationType", "Windows Store"]) - - platform_name = None - msvs_windows_sdk_version = None - for configuration in spec["configurations"].values(): - platform_name = platform_name or _ConfigPlatform(configuration) - msvs_windows_sdk_version = ( - msvs_windows_sdk_version - or _ConfigWindowsTargetPlatformVersion(configuration, version) - ) - if platform_name and msvs_windows_sdk_version: - break - if msvs_windows_sdk_version: - properties[0].append( - ["WindowsTargetPlatformVersion", str(msvs_windows_sdk_version)] - ) - elif version.compatible_sdks: - raise GypError( - "%s requires any SDK of %s version, but none were found" - % (version.description, version.compatible_sdks) - ) - - if platform_name == "ARM": - properties[0].append(["WindowsSDKDesktopARMSupport", "true"]) - - return properties - - -def _GetMSBuildConfigurationDetails(spec, build_file): - properties = {} - for name, settings in spec["configurations"].items(): - msbuild_attributes = _GetMSBuildAttributes(spec, settings, build_file) - condition = _GetConfigurationCondition(name, settings, spec) - character_set = msbuild_attributes.get("CharacterSet") - vctools_version = msbuild_attributes.get("VCToolsVersion") - config_type = msbuild_attributes.get("ConfigurationType") - _AddConditionalProperty(properties, condition, "ConfigurationType", config_type) - spectre_mitigation = msbuild_attributes.get('SpectreMitigation') - if spectre_mitigation: - _AddConditionalProperty(properties, condition, "SpectreMitigation", - spectre_mitigation) - if config_type == "Driver": - _AddConditionalProperty(properties, condition, "DriverType", "WDM") - _AddConditionalProperty( - properties, condition, "TargetVersion", _ConfigTargetVersion(settings) - ) - if character_set and "msvs_enable_winrt" not in spec: - _AddConditionalProperty( - properties, condition, "CharacterSet", character_set - ) - if vctools_version and "msvs_enable_winrt" not in spec: - _AddConditionalProperty( - properties, condition, "VCToolsVersion", vctools_version - ) - return _GetMSBuildPropertyGroup(spec, "Configuration", properties) - - -def _GetMSBuildLocalProperties(msbuild_toolset): - # Currently the only local property we support is PlatformToolset - properties = {} - if msbuild_toolset: - properties = [ - [ - "PropertyGroup", - {"Label": "Locals"}, - ["PlatformToolset", msbuild_toolset], - ] - ] - return properties - - -def _GetMSBuildPropertySheets(configurations, spec): - user_props = r"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" - additional_props = {} - props_specified = False - for name, settings in sorted(configurations.items()): - configuration = _GetConfigurationCondition(name, settings, spec) - if "msbuild_props" in settings: - additional_props[configuration] = _FixPaths(settings["msbuild_props"]) - props_specified = True - else: - additional_props[configuration] = "" - - if not props_specified: - return [ - [ - "ImportGroup", - {"Label": "PropertySheets"}, - [ - "Import", - { - "Project": user_props, - "Condition": "exists('%s')" % user_props, - "Label": "LocalAppDataPlatform", - }, - ], - ] - ] - else: - sheets = [] - for condition, props in additional_props.items(): - import_group = [ - "ImportGroup", - {"Label": "PropertySheets", "Condition": condition}, - [ - "Import", - { - "Project": user_props, - "Condition": "exists('%s')" % user_props, - "Label": "LocalAppDataPlatform", - }, - ], - ] - for props_file in props: - import_group.append(["Import", {"Project": props_file}]) - sheets.append(import_group) - return sheets - - -def _ConvertMSVSBuildAttributes(spec, config, build_file): - config_type = _GetMSVSConfigurationType(spec, build_file) - msvs_attributes = _GetMSVSAttributes(spec, config, config_type) - msbuild_attributes = {} - for a in msvs_attributes: - if a in ["IntermediateDirectory", "OutputDirectory"]: - directory = MSVSSettings.ConvertVCMacrosToMSBuild(msvs_attributes[a]) - if not directory.endswith("\\"): - directory += "\\" - msbuild_attributes[a] = directory - elif a == "CharacterSet": - msbuild_attributes[a] = _ConvertMSVSCharacterSet(msvs_attributes[a]) - elif a == "ConfigurationType": - msbuild_attributes[a] = _ConvertMSVSConfigurationType(msvs_attributes[a]) - elif a == "SpectreMitigation": - msbuild_attributes[a] = msvs_attributes[a] - elif a == "VCToolsVersion": - msbuild_attributes[a] = msvs_attributes[a] - else: - print("Warning: Do not know how to convert MSVS attribute " + a) - return msbuild_attributes - - -def _ConvertMSVSCharacterSet(char_set): - if char_set.isdigit(): - char_set = {"0": "MultiByte", "1": "Unicode", "2": "MultiByte"}[char_set] - return char_set - - -def _ConvertMSVSConfigurationType(config_type): - if config_type.isdigit(): - config_type = { - "1": "Application", - "2": "DynamicLibrary", - "4": "StaticLibrary", - "5": "Driver", - "10": "Utility", - }[config_type] - return config_type - - -def _GetMSBuildAttributes(spec, config, build_file): - if "msbuild_configuration_attributes" not in config: - msbuild_attributes = _ConvertMSVSBuildAttributes(spec, config, build_file) - - else: - config_type = _GetMSVSConfigurationType(spec, build_file) - config_type = _ConvertMSVSConfigurationType(config_type) - msbuild_attributes = config.get("msbuild_configuration_attributes", {}) - msbuild_attributes.setdefault("ConfigurationType", config_type) - output_dir = msbuild_attributes.get( - "OutputDirectory", "$(SolutionDir)$(Configuration)" - ) - msbuild_attributes["OutputDirectory"] = _FixPath(output_dir) + "\\" - if "IntermediateDirectory" not in msbuild_attributes: - intermediate = _FixPath("$(Configuration)") + "\\" - msbuild_attributes["IntermediateDirectory"] = intermediate - if "CharacterSet" in msbuild_attributes: - msbuild_attributes["CharacterSet"] = _ConvertMSVSCharacterSet( - msbuild_attributes["CharacterSet"] - ) - if "TargetName" not in msbuild_attributes: - prefix = spec.get("product_prefix", "") - product_name = spec.get("product_name", "$(ProjectName)") - target_name = prefix + product_name - msbuild_attributes["TargetName"] = target_name - if "TargetExt" not in msbuild_attributes and "product_extension" in spec: - ext = spec.get("product_extension") - msbuild_attributes["TargetExt"] = "." + ext - - if spec.get("msvs_external_builder"): - external_out_dir = spec.get("msvs_external_builder_out_dir", ".") - msbuild_attributes["OutputDirectory"] = _FixPath(external_out_dir) + "\\" - - # Make sure that 'TargetPath' matches 'Lib.OutputFile' or 'Link.OutputFile' - # (depending on the tool used) to avoid MSB8012 warning. - msbuild_tool_map = { - "executable": "Link", - "shared_library": "Link", - "loadable_module": "Link", - "windows_driver": "Link", - "static_library": "Lib", - } - msbuild_tool = msbuild_tool_map.get(spec["type"]) - if msbuild_tool: - msbuild_settings = config["finalized_msbuild_settings"] - out_file = msbuild_settings[msbuild_tool].get("OutputFile") - if out_file: - msbuild_attributes["TargetPath"] = _FixPath(out_file) - target_ext = msbuild_settings[msbuild_tool].get("TargetExt") - if target_ext: - msbuild_attributes["TargetExt"] = target_ext - - return msbuild_attributes - - -def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): - # TODO(jeanluc) We could optimize out the following and do it only if - # there are actions. - # TODO(jeanluc) Handle the equivalent of setting 'CYGWIN=nontsec'. - new_paths = [] - cygwin_dirs = spec.get("msvs_cygwin_dirs", ["."])[0] - if cygwin_dirs: - cyg_path = "$(MSBuildProjectDirectory)\\%s\\bin\\" % _FixPath(cygwin_dirs) - new_paths.append(cyg_path) - # TODO(jeanluc) Change the convention to have both a cygwin_dir and a - # python_dir. - python_path = cyg_path.replace("cygwin\\bin", "python_26") - new_paths.append(python_path) - if new_paths: - new_paths = "$(ExecutablePath);" + ";".join(new_paths) - - properties = {} - for (name, configuration) in sorted(configurations.items()): - condition = _GetConfigurationCondition(name, configuration, spec) - attributes = _GetMSBuildAttributes(spec, configuration, build_file) - msbuild_settings = configuration["finalized_msbuild_settings"] - _AddConditionalProperty( - properties, condition, "IntDir", attributes["IntermediateDirectory"] - ) - _AddConditionalProperty( - properties, condition, "OutDir", attributes["OutputDirectory"] - ) - _AddConditionalProperty( - properties, condition, "TargetName", attributes["TargetName"] - ) - if "TargetExt" in attributes: - _AddConditionalProperty( - properties, condition, "TargetExt", attributes["TargetExt"] - ) - - if attributes.get("TargetPath"): - _AddConditionalProperty( - properties, condition, "TargetPath", attributes["TargetPath"] - ) - if attributes.get("TargetExt"): - _AddConditionalProperty( - properties, condition, "TargetExt", attributes["TargetExt"] - ) - - if new_paths: - _AddConditionalProperty(properties, condition, "ExecutablePath", new_paths) - tool_settings = msbuild_settings.get("", {}) - for name, value in sorted(tool_settings.items()): - formatted_value = _GetValueFormattedForMSBuild("", name, value) - _AddConditionalProperty(properties, condition, name, formatted_value) - return _GetMSBuildPropertyGroup(spec, None, properties) - - -def _AddConditionalProperty(properties, condition, name, value): - """Adds a property / conditional value pair to a dictionary. - - Arguments: - properties: The dictionary to be modified. The key is the name of the - property. The value is itself a dictionary; its key is the value and - the value a list of condition for which this value is true. - condition: The condition under which the named property has the value. - name: The name of the property. - value: The value of the property. - """ - if name not in properties: - properties[name] = {} - values = properties[name] - if value not in values: - values[value] = [] - conditions = values[value] - conditions.append(condition) - - -# Regex for msvs variable references ( i.e. $(FOO) ). -MSVS_VARIABLE_REFERENCE = re.compile(r"\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)") - - -def _GetMSBuildPropertyGroup(spec, label, properties): - """Returns a PropertyGroup definition for the specified properties. - - Arguments: - spec: The target project dict. - label: An optional label for the PropertyGroup. - properties: The dictionary to be converted. The key is the name of the - property. The value is itself a dictionary; its key is the value and - the value a list of condition for which this value is true. - """ - group = ["PropertyGroup"] - if label: - group.append({"Label": label}) - num_configurations = len(spec["configurations"]) - - def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. - # This happens to be easier in this case, since a variable's - # definition contains all variables it references in a single string. - edges = set() - for value in sorted(properties[node].keys()): - # Add to edges all $(...) references to variables. - # - # Variable references that refer to names not in properties are excluded - # These can exist for instance to refer built in definitions like - # $(SolutionDir). - # - # Self references are ignored. Self reference is used in a few places to - # append to the default value. I.e. PATH=$(PATH);other_path - edges.update( - { - v - for v in MSVS_VARIABLE_REFERENCE.findall(value) - if v in properties and v != node - } - ) - return edges - - properties_ordered = gyp.common.TopologicallySorted(properties.keys(), GetEdges) - # Walk properties in the reverse of a topological sort on - # user_of_variable -> used_variable as this ensures variables are - # defined before they are used. - # NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) - for name in reversed(properties_ordered): - values = properties[name] - for value, conditions in sorted(values.items()): - if len(conditions) == num_configurations: - # If the value is the same all configurations, - # just add one unconditional entry. - group.append([name, value]) - else: - for condition in conditions: - group.append([name, {"Condition": condition}, value]) - return [group] - - -def _GetMSBuildToolSettingsSections(spec, configurations): - groups = [] - for (name, configuration) in sorted(configurations.items()): - msbuild_settings = configuration["finalized_msbuild_settings"] - group = [ - "ItemDefinitionGroup", - {"Condition": _GetConfigurationCondition(name, configuration, spec)}, - ] - for tool_name, tool_settings in sorted(msbuild_settings.items()): - # Skip the tool named '' which is a holder of global settings handled - # by _GetMSBuildConfigurationGlobalProperties. - if tool_name and tool_settings: - tool = [tool_name] - for name, value in sorted(tool_settings.items()): - formatted_value = _GetValueFormattedForMSBuild( - tool_name, name, value - ) - tool.append([name, formatted_value]) - group.append(tool) - groups.append(group) - return groups - - -def _FinalizeMSBuildSettings(spec, configuration): - if "msbuild_settings" in configuration: - converted = False - msbuild_settings = configuration["msbuild_settings"] - MSVSSettings.ValidateMSBuildSettings(msbuild_settings) - else: - converted = True - msvs_settings = configuration.get("msvs_settings", {}) - msbuild_settings = MSVSSettings.ConvertToMSBuildSettings(msvs_settings) - include_dirs, midl_include_dirs, resource_include_dirs = _GetIncludeDirs( - configuration - ) - libraries = _GetLibraries(spec) - library_dirs = _GetLibraryDirs(configuration) - out_file, _, msbuild_tool = _GetOutputFilePathAndTool(spec, msbuild=True) - target_ext = _GetOutputTargetExt(spec) - defines = _GetDefines(configuration) - if converted: - # Visual Studio 2010 has TR1 - defines = [d for d in defines if d != "_HAS_TR1=0"] - # Warn of ignored settings - ignored_settings = ["msvs_tool_files"] - for ignored_setting in ignored_settings: - value = configuration.get(ignored_setting) - if value: - print( - "Warning: The automatic conversion to MSBuild does not handle " - "%s. Ignoring setting of %s" % (ignored_setting, str(value)) - ) - - defines = [_EscapeCppDefineForMSBuild(d) for d in defines] - disabled_warnings = _GetDisabledWarnings(configuration) - prebuild = configuration.get("msvs_prebuild") - postbuild = configuration.get("msvs_postbuild") - def_file = _GetModuleDefinition(spec) - precompiled_header = configuration.get("msvs_precompiled_header") - - # Add the information to the appropriate tool - # TODO(jeanluc) We could optimize and generate these settings only if - # the corresponding files are found, e.g. don't generate ResourceCompile - # if you don't have any resources. - _ToolAppend( - msbuild_settings, "ClCompile", "AdditionalIncludeDirectories", include_dirs - ) - _ToolAppend( - msbuild_settings, "Midl", "AdditionalIncludeDirectories", midl_include_dirs - ) - _ToolAppend( - msbuild_settings, - "ResourceCompile", - "AdditionalIncludeDirectories", - resource_include_dirs, - ) - # Add in libraries, note that even for empty libraries, we want this - # set, to prevent inheriting default libraries from the environment. - _ToolSetOrAppend(msbuild_settings, "Link", "AdditionalDependencies", libraries) - _ToolAppend(msbuild_settings, "Link", "AdditionalLibraryDirectories", library_dirs) - if out_file: - _ToolAppend( - msbuild_settings, msbuild_tool, "OutputFile", out_file, only_if_unset=True - ) - if target_ext: - _ToolAppend( - msbuild_settings, msbuild_tool, "TargetExt", target_ext, only_if_unset=True - ) - # Add defines. - _ToolAppend(msbuild_settings, "ClCompile", "PreprocessorDefinitions", defines) - _ToolAppend(msbuild_settings, "ResourceCompile", "PreprocessorDefinitions", defines) - # Add disabled warnings. - _ToolAppend( - msbuild_settings, "ClCompile", "DisableSpecificWarnings", disabled_warnings - ) - # Turn on precompiled headers if appropriate. - if precompiled_header: - precompiled_header = os.path.split(precompiled_header)[1] - _ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "Use") - _ToolAppend( - msbuild_settings, "ClCompile", "PrecompiledHeaderFile", precompiled_header - ) - _ToolAppend( - msbuild_settings, "ClCompile", "ForcedIncludeFiles", [precompiled_header] - ) - else: - _ToolAppend(msbuild_settings, "ClCompile", "PrecompiledHeader", "NotUsing") - # Turn off WinRT compilation - _ToolAppend(msbuild_settings, "ClCompile", "CompileAsWinRT", "false") - # Turn on import libraries if appropriate - if spec.get("msvs_requires_importlibrary"): - _ToolAppend(msbuild_settings, "", "IgnoreImportLibrary", "false") - # Loadable modules don't generate import libraries; - # tell dependent projects to not expect one. - if spec["type"] == "loadable_module": - _ToolAppend(msbuild_settings, "", "IgnoreImportLibrary", "true") - # Set the module definition file if any. - if def_file: - _ToolAppend(msbuild_settings, "Link", "ModuleDefinitionFile", def_file) - configuration["finalized_msbuild_settings"] = msbuild_settings - if prebuild: - _ToolAppend(msbuild_settings, "PreBuildEvent", "Command", prebuild) - if postbuild: - _ToolAppend(msbuild_settings, "PostBuildEvent", "Command", postbuild) - - -def _GetValueFormattedForMSBuild(tool_name, name, value): - if type(value) == list: - # For some settings, VS2010 does not automatically extends the settings - # TODO(jeanluc) Is this what we want? - if name in [ - "AdditionalIncludeDirectories", - "AdditionalLibraryDirectories", - "AdditionalOptions", - "DelayLoadDLLs", - "DisableSpecificWarnings", - "PreprocessorDefinitions", - ]: - value.append("%%(%s)" % name) - # For most tools, entries in a list should be separated with ';' but some - # settings use a space. Check for those first. - exceptions = { - "ClCompile": ["AdditionalOptions"], - "Link": ["AdditionalOptions"], - "Lib": ["AdditionalOptions"], - } - char = " " if name in exceptions.get(tool_name, []) else ";" - formatted_value = char.join( - [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value] - ) - else: - formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value) - return formatted_value - - -def _VerifySourcesExist(sources, root_dir): - """Verifies that all source files exist on disk. - - Checks that all regular source files, i.e. not created at run time, - exist on disk. Missing files cause needless recompilation but no otherwise - visible errors. - - Arguments: - sources: A recursive list of Filter/file names. - root_dir: The root directory for the relative path names. - Returns: - A list of source files that cannot be found on disk. - """ - missing_sources = [] - for source in sources: - if isinstance(source, MSVSProject.Filter): - missing_sources.extend(_VerifySourcesExist(source.contents, root_dir)) - else: - if "$" not in source: - full_path = os.path.join(root_dir, source) - if not os.path.exists(full_path): - missing_sources.append(full_path) - return missing_sources - - -def _GetMSBuildSources( - spec, - sources, - exclusions, - rule_dependencies, - extension_to_rule_name, - actions_spec, - sources_handled_by_action, - list_excluded, -): - groups = [ - "none", - "masm", - "midl", - "include", - "compile", - "resource", - "rule", - "rule_dependency", - ] - grouped_sources = {} - for g in groups: - grouped_sources[g] = [] - - _AddSources2( - spec, - sources, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, - ) - sources = [] - for g in groups: - if grouped_sources[g]: - sources.append(["ItemGroup"] + grouped_sources[g]) - if actions_spec: - sources.append(["ItemGroup"] + actions_spec) - return sources - - -def _AddSources2( - spec, - sources, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, -): - extensions_excluded_from_precompile = [] - for source in sources: - if isinstance(source, MSVSProject.Filter): - _AddSources2( - spec, - source.contents, - exclusions, - grouped_sources, - rule_dependencies, - extension_to_rule_name, - sources_handled_by_action, - list_excluded, - ) - else: - if source not in sources_handled_by_action: - detail = [] - excluded_configurations = exclusions.get(source, []) - if len(excluded_configurations) == len(spec["configurations"]): - detail.append(["ExcludedFromBuild", "true"]) - else: - for config_name, configuration in sorted(excluded_configurations): - condition = _GetConfigurationCondition( - config_name, configuration - ) - detail.append( - ["ExcludedFromBuild", {"Condition": condition}, "true"] - ) - # Add precompile if needed - for config_name, configuration in spec["configurations"].items(): - precompiled_source = configuration.get( - "msvs_precompiled_source", "" - ) - if precompiled_source != "": - precompiled_source = _FixPath(precompiled_source) - if not extensions_excluded_from_precompile: - # If the precompiled header is generated by a C source, - # we must not try to use it for C++ sources, - # and vice versa. - basename, extension = os.path.splitext(precompiled_source) - if extension == ".c": - extensions_excluded_from_precompile = [ - ".cc", - ".cpp", - ".cxx", - ] - else: - extensions_excluded_from_precompile = [".c"] - - if precompiled_source == source: - condition = _GetConfigurationCondition( - config_name, configuration, spec - ) - detail.append( - ["PrecompiledHeader", {"Condition": condition}, "Create"] - ) - else: - # Turn off precompiled header usage for source files of a - # different type than the file that generated the - # precompiled header. - for extension in extensions_excluded_from_precompile: - if source.endswith(extension): - detail.append(["PrecompiledHeader", ""]) - detail.append(["ForcedIncludeFiles", ""]) - - group, element = _MapFileToMsBuildSourceType( - source, - rule_dependencies, - extension_to_rule_name, - _GetUniquePlatforms(spec), - spec["toolset"], - ) - if group == "compile" and not os.path.isabs(source): - # Add an value to support duplicate source - # file basenames, except for absolute paths to avoid paths - # with more than 260 characters. - file_name = os.path.splitext(source)[0] + ".obj" - if file_name.startswith("..\\"): - file_name = re.sub(r"^(\.\.\\)+", "", file_name) - elif file_name.startswith("$("): - file_name = re.sub(r"^\$\([^)]+\)\\", "", file_name) - detail.append(["ObjectFileName", "$(IntDir)\\" + file_name]) - grouped_sources[group].append([element, {"Include": source}] + detail) - - -def _GetMSBuildProjectReferences(project): - references = [] - if project.dependencies: - group = ["ItemGroup"] - added_dependency_set = set() - for dependency in project.dependencies: - dependency_spec = dependency.spec - should_skip_dep = False - if project.spec["toolset"] == "target": - if dependency_spec["toolset"] == "host": - if dependency_spec["type"] == "static_library": - should_skip_dep = True - if dependency.name.startswith("run_"): - should_skip_dep = False - if should_skip_dep: - continue - - canonical_name = dependency.name.replace("_host", "") - added_dependency_set.add(canonical_name) - guid = dependency.guid - project_dir = os.path.split(project.path)[0] - relative_path = gyp.common.RelativePath(dependency.path, project_dir) - project_ref = [ - "ProjectReference", - {"Include": relative_path}, - ["Project", guid], - ["ReferenceOutputAssembly", "false"], - ] - for config in dependency.spec.get("configurations", {}).values(): - if config.get("msvs_use_library_dependency_inputs", 0): - project_ref.append(["UseLibraryDependencyInputs", "true"]) - break - # If it's disabled in any config, turn it off in the reference. - if config.get("msvs_2010_disable_uldi_when_referenced", 0): - project_ref.append(["UseLibraryDependencyInputs", "false"]) - break - group.append(project_ref) - references.append(group) - return references - - -def _GenerateMSBuildProject(project, options, version, generator_flags, spec): - spec = project.spec - configurations = spec["configurations"] - toolset = spec["toolset"] - project_dir, project_file_name = os.path.split(project.path) - gyp.common.EnsureDirExists(project.path) - # Prepare list of sources and excluded sources. - - gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, gyp_file) - # Add rules. - actions_to_add = {} - props_files_of_rules = set() - targets_files_of_rules = set() - rule_dependencies = set() - extension_to_rule_name = {} - list_excluded = generator_flags.get("msvs_list_excluded_files", True) - platforms = _GetUniquePlatforms(spec) - - # Don't generate rules if we are using an external builder like ninja. - if not spec.get("msvs_external_builder"): - _GenerateRulesForMSBuild( - project_dir, - options, - spec, - sources, - excluded_sources, - props_files_of_rules, - targets_files_of_rules, - actions_to_add, - rule_dependencies, - extension_to_rule_name, - ) - else: - rules = spec.get("rules", []) - _AdjustSourcesForRules(rules, sources, excluded_sources, True) - - sources, excluded_sources, excluded_idl = _AdjustSourcesAndConvertToFilterHierarchy( - spec, options, project_dir, sources, excluded_sources, list_excluded, version - ) - - # Don't add actions if we are using an external builder like ninja. - if not spec.get("msvs_external_builder"): - _AddActions(actions_to_add, spec, project.build_file) - _AddCopies(actions_to_add, spec) - - # NOTE: this stanza must appear after all actions have been decided. - # Don't excluded sources with actions attached, or they won't run. - excluded_sources = _FilterActionsFromExcluded(excluded_sources, actions_to_add) - - exclusions = _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl) - actions_spec, sources_handled_by_action = _GenerateActionsForMSBuild( - spec, actions_to_add - ) - - _GenerateMSBuildFiltersFile( - project.path + ".filters", - sources, - rule_dependencies, - extension_to_rule_name, - platforms, - toolset, - ) - missing_sources = _VerifySourcesExist(sources, project_dir) - - for configuration in configurations.values(): - _FinalizeMSBuildSettings(spec, configuration) - - # Add attributes to root element - - import_default_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.Default.props"}] - ] - import_cpp_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.props"}] - ] - import_cpp_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\Microsoft.Cpp.targets"}] - ] - import_masm_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\masm.props"}] - ] - import_masm_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\masm.targets"}] - ] - import_marmasm_props_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\marmasm.props"}] - ] - import_marmasm_targets_section = [ - ["Import", {"Project": r"$(VCTargetsPath)\BuildCustomizations\marmasm.targets"}] - ] - macro_section = [["PropertyGroup", {"Label": "UserMacros"}]] - - content = [ - "Project", - { - "xmlns": "http://schemas.microsoft.com/developer/msbuild/2003", - "ToolsVersion": version.ProjectVersion(), - "DefaultTargets": "Build", - }, - ] - - content += _GetMSBuildProjectConfigurations(configurations, spec) - content += _GetMSBuildGlobalProperties( - spec, version, project.guid, project_file_name - ) - content += import_default_section - content += _GetMSBuildConfigurationDetails(spec, project.build_file) - if spec.get("msvs_enable_winphone"): - content += _GetMSBuildLocalProperties("v120_wp81") - else: - content += _GetMSBuildLocalProperties(project.msbuild_toolset) - content += import_cpp_props_section - content += import_masm_props_section - if "arm64" in platforms and toolset == "target": - content += import_marmasm_props_section - content += _GetMSBuildExtensions(props_files_of_rules) - content += _GetMSBuildPropertySheets(configurations, spec) - content += macro_section - content += _GetMSBuildConfigurationGlobalProperties( - spec, configurations, project.build_file - ) - content += _GetMSBuildToolSettingsSections(spec, configurations) - content += _GetMSBuildSources( - spec, - sources, - exclusions, - rule_dependencies, - extension_to_rule_name, - actions_spec, - sources_handled_by_action, - list_excluded, - ) - content += _GetMSBuildProjectReferences(project) - content += import_cpp_targets_section - content += import_masm_targets_section - if "arm64" in platforms and toolset == "target": - content += import_marmasm_targets_section - content += _GetMSBuildExtensionTargets(targets_files_of_rules) - - if spec.get("msvs_external_builder"): - content += _GetMSBuildExternalBuilderTargets(spec) - - # TODO(jeanluc) File a bug to get rid of runas. We had in MSVS: - # has_run_as = _WriteMSVSUserFile(project.path, version, spec) - - easy_xml.WriteXmlIfChanged(content, project.path, pretty=True, win32=True) - - return missing_sources - - -def _GetMSBuildExternalBuilderTargets(spec): - """Return a list of MSBuild targets for external builders. - - The "Build" and "Clean" targets are always generated. If the spec contains - 'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also - be generated, to support building selected C/C++ files. - - Arguments: - spec: The gyp target spec. - Returns: - List of MSBuild 'Target' specs. - """ - build_cmd = _BuildCommandLineForRuleRaw( - spec, spec["msvs_external_builder_build_cmd"], False, False, False, False - ) - build_target = ["Target", {"Name": "Build"}] - build_target.append(["Exec", {"Command": build_cmd}]) - - clean_cmd = _BuildCommandLineForRuleRaw( - spec, spec["msvs_external_builder_clean_cmd"], False, False, False, False - ) - clean_target = ["Target", {"Name": "Clean"}] - clean_target.append(["Exec", {"Command": clean_cmd}]) - - targets = [build_target, clean_target] - - if spec.get("msvs_external_builder_clcompile_cmd"): - clcompile_cmd = _BuildCommandLineForRuleRaw( - spec, - spec["msvs_external_builder_clcompile_cmd"], - False, - False, - False, - False, - ) - clcompile_target = ["Target", {"Name": "ClCompile"}] - clcompile_target.append(["Exec", {"Command": clcompile_cmd}]) - targets.append(clcompile_target) - - return targets - - -def _GetMSBuildExtensions(props_files_of_rules): - extensions = ["ImportGroup", {"Label": "ExtensionSettings"}] - for props_file in props_files_of_rules: - extensions.append(["Import", {"Project": props_file}]) - return [extensions] - - -def _GetMSBuildExtensionTargets(targets_files_of_rules): - targets_node = ["ImportGroup", {"Label": "ExtensionTargets"}] - for targets_file in sorted(targets_files_of_rules): - targets_node.append(["Import", {"Project": targets_file}]) - return [targets_node] - - -def _GenerateActionsForMSBuild(spec, actions_to_add): - """Add actions accumulated into an actions_to_add, merging as needed. - - Arguments: - spec: the target project dict - actions_to_add: dictionary keyed on input name, which maps to a list of - dicts describing the actions attached to that input file. - - Returns: - A pair of (action specification, the sources handled by this action). - """ - sources_handled_by_action = OrderedSet() - actions_spec = [] - for primary_input, actions in actions_to_add.items(): - if generator_supports_multiple_toolsets: - primary_input = primary_input.replace(".exe", "_host.exe") - inputs = OrderedSet() - outputs = OrderedSet() - descriptions = [] - commands = [] - for action in actions: - - def fixup_host_exe(i): - if "$(OutDir)" in i: - i = i.replace(".exe", "_host.exe") - return i - - if generator_supports_multiple_toolsets: - action["inputs"] = [fixup_host_exe(i) for i in action["inputs"]] - inputs.update(OrderedSet(action["inputs"])) - outputs.update(OrderedSet(action["outputs"])) - descriptions.append(action["description"]) - cmd = action["command"] - if generator_supports_multiple_toolsets: - cmd = cmd.replace(".exe", "_host.exe") - # For most actions, add 'call' so that actions that invoke batch files - # return and continue executing. msbuild_use_call provides a way to - # disable this but I have not seen any adverse effect from doing that - # for everything. - if action.get("msbuild_use_call", True): - cmd = "call " + cmd - commands.append(cmd) - # Add the custom build action for one input file. - description = ", and also ".join(descriptions) - - # We can't join the commands simply with && because the command line will - # get too long. See also _AddActions: cygwin's setup_env mustn't be called - # for every invocation or the command that sets the PATH will grow too - # long. - command = "\r\n".join( - [c + "\r\nif %errorlevel% neq 0 exit /b %errorlevel%" for c in commands] - ) - _AddMSBuildAction( - spec, - primary_input, - inputs, - outputs, - command, - description, - sources_handled_by_action, - actions_spec, - ) - return actions_spec, sources_handled_by_action - - -def _AddMSBuildAction( - spec, - primary_input, - inputs, - outputs, - cmd, - description, - sources_handled_by_action, - actions_spec, -): - command = MSVSSettings.ConvertVCMacrosToMSBuild(cmd) - primary_input = _FixPath(primary_input) - inputs_array = _FixPaths(inputs) - outputs_array = _FixPaths(outputs) - additional_inputs = ";".join([i for i in inputs_array if i != primary_input]) - outputs = ";".join(outputs_array) - sources_handled_by_action.add(primary_input) - action_spec = ["CustomBuild", {"Include": primary_input}] - action_spec.extend( - # TODO(jeanluc) 'Document' for all or just if as_sources? - [ - ["FileType", "Document"], - ["Command", command], - ["Message", description], - ["Outputs", outputs], - ] - ) - if additional_inputs: - action_spec.append(["AdditionalInputs", additional_inputs]) - actions_spec.append(action_spec) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py deleted file mode 100755 index e80b57f..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the msvs.py file. """ - -import gyp.generator.msvs as msvs -import unittest - -from io import StringIO - - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.stderr = StringIO() - - def test_GetLibraries(self): - self.assertEqual(msvs._GetLibraries({}), []) - self.assertEqual(msvs._GetLibraries({"libraries": []}), []) - self.assertEqual( - msvs._GetLibraries({"other": "foo", "libraries": ["a.lib"]}), ["a.lib"] - ) - self.assertEqual(msvs._GetLibraries({"libraries": ["-la"]}), ["a.lib"]) - self.assertEqual( - msvs._GetLibraries( - { - "libraries": [ - "a.lib", - "b.lib", - "c.lib", - "-lb.lib", - "-lb.lib", - "d.lib", - "a.lib", - ] - } - ), - ["c.lib", "b.lib", "d.lib", "a.lib"], - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py deleted file mode 100644 index 8ba341e..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +++ /dev/null @@ -1,2933 +0,0 @@ -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import collections -import copy -import hashlib -import json -import multiprocessing -import os.path -import re -import signal -import subprocess -import sys -import gyp -import gyp.common -import gyp.msvs_emulation -import gyp.MSVSUtil as MSVSUtil -import gyp.xcode_emulation - -from io import StringIO - -from gyp.common import GetEnvironFallback -import gyp.ninja_syntax as ninja_syntax - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_PREFIX": "lib", - # Gyp expects the following variables to be expandable by the build - # system to the appropriate locations. Ninja prefers paths to be - # known at gyp time. To resolve this, introduce special - # variables starting with $! and $| (which begin with a $ so gyp knows it - # should be treated specially, but is otherwise an invalid - # ninja/shell variable) that are passed to gyp here but expanded - # before writing out into the target .ninja files; see - # ExpandSpecial. - # $! is used for variables that represent a path and that can only appear at - # the start of a string, while $| is used for variables that can appear - # anywhere in a string. - "INTERMEDIATE_DIR": "$!INTERMEDIATE_DIR", - "SHARED_INTERMEDIATE_DIR": "$!PRODUCT_DIR/gen", - "PRODUCT_DIR": "$!PRODUCT_DIR", - "CONFIGURATION_NAME": "$|CONFIGURATION_NAME", - # Special variables that may be used by gyp 'rule' targets. - # We generate definitions for these variables on the fly when processing a - # rule. - "RULE_INPUT_ROOT": "${root}", - "RULE_INPUT_DIRNAME": "${dirname}", - "RULE_INPUT_PATH": "${source}", - "RULE_INPUT_EXT": "${ext}", - "RULE_INPUT_NAME": "${name}", -} - -# Placates pylint. -generator_additional_non_configuration_keys = [] -generator_additional_path_sections = [] -generator_extra_sources_for_rules = [] -generator_filelist_paths = None - -generator_supports_multiple_toolsets = gyp.common.CrossCompileRequested() - - -def StripPrefix(arg, prefix): - if arg.startswith(prefix): - return arg[len(prefix) :] - return arg - - -def QuoteShellArgument(arg, flavor): - """Quote a string such that it will be interpreted as a single argument - by the shell.""" - # Rather than attempting to enumerate the bad shell characters, just - # allow common OK ones and quote anything else. - if re.match(r"^[a-zA-Z0-9_=.\\/-]+$", arg): - return arg # No quoting necessary. - if flavor == "win": - return gyp.msvs_emulation.QuoteForRspFile(arg) - return "'" + arg.replace("'", "'" + '"\'"' + "'") + "'" - - -def Define(d, flavor): - """Takes a preprocessor define and returns a -D parameter that's ninja- and - shell-escaped.""" - if flavor == "win": - # cl.exe replaces literal # characters with = in preprocessor definitions for - # some reason. Octal-encode to work around that. - d = d.replace("#", "\\%03o" % ord("#")) - return QuoteShellArgument(ninja_syntax.escape("-D" + d), flavor) - - -def AddArch(output, arch): - """Adds an arch string to an output path.""" - output, extension = os.path.splitext(output) - return f"{output}.{arch}{extension}" - - -class Target: - """Target represents the paths used within a single gyp target. - - Conceptually, building a single target A is a series of steps: - - 1) actions/rules/copies generates source/resources/etc. - 2) compiles generates .o files - 3) link generates a binary (library/executable) - 4) bundle merges the above in a mac bundle - - (Any of these steps can be optional.) - - From a build ordering perspective, a dependent target B could just - depend on the last output of this series of steps. - - But some dependent commands sometimes need to reach inside the box. - For example, when linking B it needs to get the path to the static - library generated by A. - - This object stores those paths. To keep things simple, member - variables only store concrete paths to single files, while methods - compute derived values like "the last output of the target". - """ - - def __init__(self, type): - # Gyp type ("static_library", etc.) of this target. - self.type = type - # File representing whether any input dependencies necessary for - # dependent actions have completed. - self.preaction_stamp = None - # File representing whether any input dependencies necessary for - # dependent compiles have completed. - self.precompile_stamp = None - # File representing the completion of actions/rules/copies, if any. - self.actions_stamp = None - # Path to the output of the link step, if any. - self.binary = None - # Path to the file representing the completion of building the bundle, - # if any. - self.bundle = None - # On Windows, incremental linking requires linking against all the .objs - # that compose a .lib (rather than the .lib itself). That list is stored - # here. In this case, we also need to save the compile_deps for the target, - # so that the target that directly depends on the .objs can also depend - # on those. - self.component_objs = None - self.compile_deps = None - # Windows only. The import .lib is the output of a build step, but - # because dependents only link against the lib (not both the lib and the - # dll) we keep track of the import library here. - self.import_lib = None - # Track if this target contains any C++ files, to decide if gcc or g++ - # should be used for linking. - self.uses_cpp = False - - def Linkable(self): - """Return true if this is a target that can be linked against.""" - return self.type in ("static_library", "shared_library") - - def UsesToc(self, flavor): - """Return true if the target should produce a restat rule based on a TOC - file.""" - # For bundles, the .TOC should be produced for the binary, not for - # FinalOutput(). But the naive approach would put the TOC file into the - # bundle, so don't do this for bundles for now. - if flavor == "win" or self.bundle: - return False - return self.type in ("shared_library", "loadable_module") - - def PreActionInput(self, flavor): - """Return the path, if any, that should be used as a dependency of - any dependent action step.""" - if self.UsesToc(flavor): - return self.FinalOutput() + ".TOC" - return self.FinalOutput() or self.preaction_stamp - - def PreCompileInput(self): - """Return the path, if any, that should be used as a dependency of - any dependent compile step.""" - return self.actions_stamp or self.precompile_stamp - - def FinalOutput(self): - """Return the last output of the target, which depends on all prior - steps.""" - return self.bundle or self.binary or self.actions_stamp - - -# A small discourse on paths as used within the Ninja build: -# All files we produce (both at gyp and at build time) appear in the -# build directory (e.g. out/Debug). -# -# Paths within a given .gyp file are always relative to the directory -# containing the .gyp file. Call these "gyp paths". This includes -# sources as well as the starting directory a given gyp rule/action -# expects to be run from. We call the path from the source root to -# the gyp file the "base directory" within the per-.gyp-file -# NinjaWriter code. -# -# All paths as written into the .ninja files are relative to the build -# directory. Call these paths "ninja paths". -# -# We translate between these two notions of paths with two helper -# functions: -# -# - GypPathToNinja translates a gyp path (i.e. relative to the .gyp file) -# into the equivalent ninja path. -# -# - GypPathToUniqueOutput translates a gyp path into a ninja path to write -# an output file; the result can be namespaced such that it is unique -# to the input file name as well as the output target name. - - -class NinjaWriter: - def __init__( - self, - hash_for_rules, - target_outputs, - base_dir, - build_dir, - output_file, - toplevel_build, - output_file_name, - flavor, - toplevel_dir=None, - ): - """ - base_dir: path from source root to directory containing this gyp file, - by gyp semantics, all input paths are relative to this - build_dir: path from source root to build output - toplevel_dir: path to the toplevel directory - """ - - self.hash_for_rules = hash_for_rules - self.target_outputs = target_outputs - self.base_dir = base_dir - self.build_dir = build_dir - self.ninja = ninja_syntax.Writer(output_file) - self.toplevel_build = toplevel_build - self.output_file_name = output_file_name - - self.flavor = flavor - self.abs_build_dir = None - if toplevel_dir is not None: - self.abs_build_dir = os.path.abspath(os.path.join(toplevel_dir, build_dir)) - self.obj_ext = ".obj" if flavor == "win" else ".o" - if flavor == "win": - # See docstring of msvs_emulation.GenerateEnvironmentFiles(). - self.win_env = {} - for arch in ("x86", "x64"): - self.win_env[arch] = "environment." + arch - - # Relative path from build output dir to base dir. - build_to_top = gyp.common.InvertRelativePath(build_dir, toplevel_dir) - self.build_to_base = os.path.join(build_to_top, base_dir) - # Relative path from base dir to build dir. - base_to_top = gyp.common.InvertRelativePath(base_dir, toplevel_dir) - self.base_to_build = os.path.join(base_to_top, build_dir) - - def ExpandSpecial(self, path, product_dir=None): - """Expand specials like $!PRODUCT_DIR in |path|. - - If |product_dir| is None, assumes the cwd is already the product - dir. Otherwise, |product_dir| is the relative path to the product - dir. - """ - - PRODUCT_DIR = "$!PRODUCT_DIR" - if PRODUCT_DIR in path: - if product_dir: - path = path.replace(PRODUCT_DIR, product_dir) - else: - path = path.replace(PRODUCT_DIR + "/", "") - path = path.replace(PRODUCT_DIR + "\\", "") - path = path.replace(PRODUCT_DIR, ".") - - INTERMEDIATE_DIR = "$!INTERMEDIATE_DIR" - if INTERMEDIATE_DIR in path: - int_dir = self.GypPathToUniqueOutput("gen") - # GypPathToUniqueOutput generates a path relative to the product dir, - # so insert product_dir in front if it is provided. - path = path.replace( - INTERMEDIATE_DIR, os.path.join(product_dir or "", int_dir) - ) - - CONFIGURATION_NAME = "$|CONFIGURATION_NAME" - path = path.replace(CONFIGURATION_NAME, self.config_name) - - return path - - def ExpandRuleVariables(self, path, root, dirname, source, ext, name): - if self.flavor == "win": - path = self.msvs_settings.ConvertVSMacros(path, config=self.config_name) - path = path.replace(generator_default_variables["RULE_INPUT_ROOT"], root) - path = path.replace(generator_default_variables["RULE_INPUT_DIRNAME"], dirname) - path = path.replace(generator_default_variables["RULE_INPUT_PATH"], source) - path = path.replace(generator_default_variables["RULE_INPUT_EXT"], ext) - path = path.replace(generator_default_variables["RULE_INPUT_NAME"], name) - return path - - def GypPathToNinja(self, path, env=None): - """Translate a gyp path to a ninja path, optionally expanding environment - variable references in |path| with |env|. - - See the above discourse on path conversions.""" - if env: - if self.flavor == "mac": - path = gyp.xcode_emulation.ExpandEnvVars(path, env) - elif self.flavor == "win": - path = gyp.msvs_emulation.ExpandMacros(path, env) - if path.startswith("$!"): - expanded = self.ExpandSpecial(path) - if self.flavor == "win": - expanded = os.path.normpath(expanded) - return expanded - if "$|" in path: - path = self.ExpandSpecial(path) - assert "$" not in path, path - return os.path.normpath(os.path.join(self.build_to_base, path)) - - def GypPathToUniqueOutput(self, path, qualified=True): - """Translate a gyp path to a ninja path for writing output. - - If qualified is True, qualify the resulting filename with the name - of the target. This is necessary when e.g. compiling the same - path twice for two separate output targets. - - See the above discourse on path conversions.""" - - path = self.ExpandSpecial(path) - assert not path.startswith("$"), path - - # Translate the path following this scheme: - # Input: foo/bar.gyp, target targ, references baz/out.o - # Output: obj/foo/baz/targ.out.o (if qualified) - # obj/foo/baz/out.o (otherwise) - # (and obj.host instead of obj for cross-compiles) - # - # Why this scheme and not some other one? - # 1) for a given input, you can compute all derived outputs by matching - # its path, even if the input is brought via a gyp file with '..'. - # 2) simple files like libraries and stamps have a simple filename. - - obj = "obj" - if self.toolset != "target": - obj += "." + self.toolset - - path_dir, path_basename = os.path.split(path) - assert not os.path.isabs(path_dir), ( - "'%s' can not be absolute path (see crbug.com/462153)." % path_dir - ) - - if qualified: - path_basename = self.name + "." + path_basename - return os.path.normpath( - os.path.join(obj, self.base_dir, path_dir, path_basename) - ) - - def WriteCollapsedDependencies(self, name, targets, order_only=None): - """Given a list of targets, return a path for a single file - representing the result of building all the targets or None. - - Uses a stamp file if necessary.""" - - assert targets == [item for item in targets if item], targets - if len(targets) == 0: - assert not order_only - return None - if len(targets) > 1 or order_only: - stamp = self.GypPathToUniqueOutput(name + ".stamp") - targets = self.ninja.build(stamp, "stamp", targets, order_only=order_only) - self.ninja.newline() - return targets[0] - - def _SubninjaNameForArch(self, arch): - output_file_base = os.path.splitext(self.output_file_name)[0] - return f"{output_file_base}.{arch}.ninja" - - def WriteSpec(self, spec, config_name, generator_flags): - """The main entry point for NinjaWriter: write the build rules for a spec. - - Returns a Target object, which represents the output paths for this spec. - Returns None if there are no outputs (e.g. a settings-only 'none' type - target).""" - - self.config_name = config_name - self.name = spec["target_name"] - self.toolset = spec["toolset"] - config = spec["configurations"][config_name] - self.target = Target(spec["type"]) - self.is_standalone_static_library = bool( - spec.get("standalone_static_library", 0) - ) - - self.target_rpath = generator_flags.get("target_rpath", r"\$$ORIGIN/lib/") - - self.is_mac_bundle = gyp.xcode_emulation.IsMacBundle(self.flavor, spec) - self.xcode_settings = self.msvs_settings = None - if self.flavor == "mac": - self.xcode_settings = gyp.xcode_emulation.XcodeSettings(spec) - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if mac_toolchain_dir: - self.xcode_settings.mac_toolchain_dir = mac_toolchain_dir - - if self.flavor == "win": - self.msvs_settings = gyp.msvs_emulation.MsvsSettings(spec, generator_flags) - arch = self.msvs_settings.GetArch(config_name) - self.ninja.variable("arch", self.win_env[arch]) - self.ninja.variable("cc", "$cl_" + arch) - self.ninja.variable("cxx", "$cl_" + arch) - self.ninja.variable("cc_host", "$cl_" + arch) - self.ninja.variable("cxx_host", "$cl_" + arch) - self.ninja.variable("asm", "$ml_" + arch) - - if self.flavor == "mac": - self.archs = self.xcode_settings.GetActiveArchs(config_name) - if len(self.archs) > 1: - self.arch_subninjas = { - arch: ninja_syntax.Writer( - OpenOutput( - os.path.join( - self.toplevel_build, self._SubninjaNameForArch(arch) - ), - "w", - ) - ) - for arch in self.archs - } - - # Compute predepends for all rules. - # actions_depends is the dependencies this target depends on before running - # any of its action/rule/copy steps. - # compile_depends is the dependencies this target depends on before running - # any of its compile steps. - actions_depends = [] - compile_depends = [] - # TODO(evan): it is rather confusing which things are lists and which - # are strings. Fix these. - if "dependencies" in spec: - for dep in spec["dependencies"]: - if dep in self.target_outputs: - target = self.target_outputs[dep] - actions_depends.append(target.PreActionInput(self.flavor)) - compile_depends.append(target.PreCompileInput()) - if target.uses_cpp: - self.target.uses_cpp = True - actions_depends = [item for item in actions_depends if item] - compile_depends = [item for item in compile_depends if item] - actions_depends = self.WriteCollapsedDependencies( - "actions_depends", actions_depends - ) - compile_depends = self.WriteCollapsedDependencies( - "compile_depends", compile_depends - ) - self.target.preaction_stamp = actions_depends - self.target.precompile_stamp = compile_depends - - # Write out actions, rules, and copies. These must happen before we - # compile any sources, so compute a list of predependencies for sources - # while we do it. - extra_sources = [] - mac_bundle_depends = [] - self.target.actions_stamp = self.WriteActionsRulesCopies( - spec, extra_sources, actions_depends, mac_bundle_depends - ) - - # If we have actions/rules/copies, we depend directly on those, but - # otherwise we depend on dependent target's actions/rules/copies etc. - # We never need to explicitly depend on previous target's link steps, - # because no compile ever depends on them. - compile_depends_stamp = self.target.actions_stamp or compile_depends - - # Write out the compilation steps, if any. - link_deps = [] - try: - sources = extra_sources + spec.get("sources", []) - except TypeError: - print("extra_sources: ", str(extra_sources)) - print('spec.get("sources"): ', str(spec.get("sources"))) - raise - if sources: - if self.flavor == "mac" and len(self.archs) > 1: - # Write subninja file containing compile and link commands scoped to - # a single arch if a fat binary is being built. - for arch in self.archs: - self.ninja.subninja(self._SubninjaNameForArch(arch)) - - pch = None - if self.flavor == "win": - gyp.msvs_emulation.VerifyMissingSources( - sources, self.abs_build_dir, generator_flags, self.GypPathToNinja - ) - pch = gyp.msvs_emulation.PrecompiledHeader( - self.msvs_settings, - config_name, - self.GypPathToNinja, - self.GypPathToUniqueOutput, - self.obj_ext, - ) - else: - pch = gyp.xcode_emulation.MacPrefixHeader( - self.xcode_settings, - self.GypPathToNinja, - lambda path, lang: self.GypPathToUniqueOutput(path + "-" + lang), - ) - link_deps = self.WriteSources( - self.ninja, - config_name, - config, - sources, - compile_depends_stamp, - pch, - spec, - ) - # Some actions/rules output 'sources' that are already object files. - obj_outputs = [f for f in sources if f.endswith(self.obj_ext)] - if obj_outputs: - if self.flavor != "mac" or len(self.archs) == 1: - link_deps += [self.GypPathToNinja(o) for o in obj_outputs] - else: - print( - "Warning: Actions/rules writing object files don't work with " - "multiarch targets, dropping. (target %s)" % spec["target_name"] - ) - elif self.flavor == "mac" and len(self.archs) > 1: - link_deps = collections.defaultdict(list) - - compile_deps = self.target.actions_stamp or actions_depends - if self.flavor == "win" and self.target.type == "static_library": - self.target.component_objs = link_deps - self.target.compile_deps = compile_deps - - # Write out a link step, if needed. - output = None - is_empty_bundle = not link_deps and not mac_bundle_depends - if link_deps or self.target.actions_stamp or actions_depends: - output = self.WriteTarget( - spec, config_name, config, link_deps, compile_deps - ) - if self.is_mac_bundle: - mac_bundle_depends.append(output) - - # Bundle all of the above together, if needed. - if self.is_mac_bundle: - output = self.WriteMacBundle(spec, mac_bundle_depends, is_empty_bundle) - - if not output: - return None - - assert self.target.FinalOutput(), output - return self.target - - def _WinIdlRule(self, source, prebuild, outputs): - """Handle the implicit VS .idl rule for one source file. Fills |outputs| - with files that are generated.""" - outdir, output, vars, flags = self.msvs_settings.GetIdlBuildData( - source, self.config_name - ) - outdir = self.GypPathToNinja(outdir) - - def fix_path(path, rel=None): - path = os.path.join(outdir, path) - dirname, basename = os.path.split(source) - root, ext = os.path.splitext(basename) - path = self.ExpandRuleVariables(path, root, dirname, source, ext, basename) - if rel: - path = os.path.relpath(path, rel) - return path - - vars = [(name, fix_path(value, outdir)) for name, value in vars] - output = [fix_path(p) for p in output] - vars.append(("outdir", outdir)) - vars.append(("idlflags", flags)) - input = self.GypPathToNinja(source) - self.ninja.build(output, "idl", input, variables=vars, order_only=prebuild) - outputs.extend(output) - - def WriteWinIdlFiles(self, spec, prebuild): - """Writes rules to match MSVS's implicit idl handling.""" - assert self.flavor == "win" - if self.msvs_settings.HasExplicitIdlRulesOrActions(spec): - return [] - outputs = [] - for source in filter(lambda x: x.endswith(".idl"), spec["sources"]): - self._WinIdlRule(source, prebuild, outputs) - return outputs - - def WriteActionsRulesCopies( - self, spec, extra_sources, prebuild, mac_bundle_depends - ): - """Write out the Actions, Rules, and Copies steps. Return a path - representing the outputs of these steps.""" - outputs = [] - if self.is_mac_bundle: - mac_bundle_resources = spec.get("mac_bundle_resources", [])[:] - else: - mac_bundle_resources = [] - extra_mac_bundle_resources = [] - - if "actions" in spec: - outputs += self.WriteActions( - spec["actions"], extra_sources, prebuild, extra_mac_bundle_resources - ) - if "rules" in spec: - outputs += self.WriteRules( - spec["rules"], - extra_sources, - prebuild, - mac_bundle_resources, - extra_mac_bundle_resources, - ) - if "copies" in spec: - outputs += self.WriteCopies(spec["copies"], prebuild, mac_bundle_depends) - - if "sources" in spec and self.flavor == "win": - outputs += self.WriteWinIdlFiles(spec, prebuild) - - if self.xcode_settings and self.xcode_settings.IsIosFramework(): - self.WriteiOSFrameworkHeaders(spec, outputs, prebuild) - - stamp = self.WriteCollapsedDependencies("actions_rules_copies", outputs) - - if self.is_mac_bundle: - xcassets = self.WriteMacBundleResources( - extra_mac_bundle_resources + mac_bundle_resources, mac_bundle_depends - ) - partial_info_plist = self.WriteMacXCassets(xcassets, mac_bundle_depends) - self.WriteMacInfoPlist(partial_info_plist, mac_bundle_depends) - - return stamp - - def GenerateDescription(self, verb, message, fallback): - """Generate and return a description of a build step. - - |verb| is the short summary, e.g. ACTION or RULE. - |message| is a hand-written description, or None if not available. - |fallback| is the gyp-level name of the step, usable as a fallback. - """ - if self.toolset != "target": - verb += "(%s)" % self.toolset - if message: - return f"{verb} {self.ExpandSpecial(message)}" - else: - return f"{verb} {self.name}: {fallback}" - - def WriteActions( - self, actions, extra_sources, prebuild, extra_mac_bundle_resources - ): - # Actions cd into the base directory. - env = self.GetToolchainEnv() - all_outputs = [] - for action in actions: - # First write out a rule for the action. - name = "{}_{}".format(action["action_name"], self.hash_for_rules) - description = self.GenerateDescription( - "ACTION", action.get("message", None), name - ) - win_shell_flags = ( - self.msvs_settings.GetRuleShellFlags(action) - if self.flavor == "win" - else None - ) - args = action["action"] - depfile = action.get("depfile", None) - if depfile: - depfile = self.ExpandSpecial(depfile, self.base_to_build) - pool = "console" if int(action.get("ninja_use_console", 0)) else None - rule_name, _ = self.WriteNewNinjaRule( - name, args, description, win_shell_flags, env, pool, depfile=depfile - ) - - inputs = [self.GypPathToNinja(i, env) for i in action["inputs"]] - if int(action.get("process_outputs_as_sources", False)): - extra_sources += action["outputs"] - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - extra_mac_bundle_resources += action["outputs"] - outputs = [self.GypPathToNinja(o, env) for o in action["outputs"]] - - # Then write out an edge using the rule. - self.ninja.build(outputs, rule_name, inputs, order_only=prebuild) - all_outputs += outputs - - self.ninja.newline() - - return all_outputs - - def WriteRules( - self, - rules, - extra_sources, - prebuild, - mac_bundle_resources, - extra_mac_bundle_resources, - ): - env = self.GetToolchainEnv() - all_outputs = [] - for rule in rules: - # Skip a rule with no action and no inputs. - if "action" not in rule and not rule.get("rule_sources", []): - continue - - # First write out a rule for the rule action. - name = "{}_{}".format(rule["rule_name"], self.hash_for_rules) - - args = rule["action"] - description = self.GenerateDescription( - "RULE", - rule.get("message", None), - ("%s " + generator_default_variables["RULE_INPUT_PATH"]) % name, - ) - win_shell_flags = ( - self.msvs_settings.GetRuleShellFlags(rule) - if self.flavor == "win" - else None - ) - pool = "console" if int(rule.get("ninja_use_console", 0)) else None - rule_name, args = self.WriteNewNinjaRule( - name, args, description, win_shell_flags, env, pool - ) - - # TODO: if the command references the outputs directly, we should - # simplify it to just use $out. - - # Rules can potentially make use of some special variables which - # must vary per source file. - # Compute the list of variables we'll need to provide. - special_locals = ("source", "root", "dirname", "ext", "name") - needed_variables = {"source"} - for argument in args: - for var in special_locals: - if "${%s}" % var in argument: - needed_variables.add(var) - needed_variables = sorted(needed_variables) - - def cygwin_munge(path): - # pylint: disable=cell-var-from-loop - if win_shell_flags and win_shell_flags.cygwin: - return path.replace("\\", "/") - return path - - inputs = [self.GypPathToNinja(i, env) for i in rule.get("inputs", [])] - - # If there are n source files matching the rule, and m additional rule - # inputs, then adding 'inputs' to each build edge written below will - # write m * n inputs. Collapsing reduces this to m + n. - sources = rule.get("rule_sources", []) - num_inputs = len(inputs) - if prebuild: - num_inputs += 1 - if num_inputs > 2 and len(sources) > 2: - inputs = [ - self.WriteCollapsedDependencies( - rule["rule_name"], inputs, order_only=prebuild - ) - ] - prebuild = [] - - # For each source file, write an edge that generates all the outputs. - for source in sources: - source = os.path.normpath(source) - dirname, basename = os.path.split(source) - root, ext = os.path.splitext(basename) - - # Gather the list of inputs and outputs, expanding $vars if possible. - outputs = [ - self.ExpandRuleVariables(o, root, dirname, source, ext, basename) - for o in rule["outputs"] - ] - - if int(rule.get("process_outputs_as_sources", False)): - extra_sources += outputs - - was_mac_bundle_resource = source in mac_bundle_resources - if was_mac_bundle_resource or int( - rule.get("process_outputs_as_mac_bundle_resources", False) - ): - extra_mac_bundle_resources += outputs - # Note: This is n_resources * n_outputs_in_rule. - # Put to-be-removed items in a set and - # remove them all in a single pass - # if this becomes a performance issue. - if was_mac_bundle_resource: - mac_bundle_resources.remove(source) - - extra_bindings = [] - for var in needed_variables: - if var == "root": - extra_bindings.append(("root", cygwin_munge(root))) - elif var == "dirname": - # '$dirname' is a parameter to the rule action, which means - # it shouldn't be converted to a Ninja path. But we don't - # want $!PRODUCT_DIR in there either. - dirname_expanded = self.ExpandSpecial( - dirname, self.base_to_build - ) - extra_bindings.append( - ("dirname", cygwin_munge(dirname_expanded)) - ) - elif var == "source": - # '$source' is a parameter to the rule action, which means - # it shouldn't be converted to a Ninja path. But we don't - # want $!PRODUCT_DIR in there either. - source_expanded = self.ExpandSpecial(source, self.base_to_build) - extra_bindings.append(("source", cygwin_munge(source_expanded))) - elif var == "ext": - extra_bindings.append(("ext", ext)) - elif var == "name": - extra_bindings.append(("name", cygwin_munge(basename))) - else: - assert var is None, repr(var) - - outputs = [self.GypPathToNinja(o, env) for o in outputs] - if self.flavor == "win": - # WriteNewNinjaRule uses unique_name to create a rsp file on win. - extra_bindings.append( - ("unique_name", hashlib.md5(outputs[0]).hexdigest()) - ) - - self.ninja.build( - outputs, - rule_name, - self.GypPathToNinja(source), - implicit=inputs, - order_only=prebuild, - variables=extra_bindings, - ) - - all_outputs.extend(outputs) - - return all_outputs - - def WriteCopies(self, copies, prebuild, mac_bundle_depends): - outputs = [] - if self.xcode_settings: - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetToolchainEnv(additional_settings=extra_env) - else: - env = self.GetToolchainEnv() - for to_copy in copies: - for path in to_copy["files"]: - # Normalize the path so trailing slashes don't confuse us. - path = os.path.normpath(path) - basename = os.path.split(path)[1] - src = self.GypPathToNinja(path, env) - dst = self.GypPathToNinja( - os.path.join(to_copy["destination"], basename), env - ) - outputs += self.ninja.build(dst, "copy", src, order_only=prebuild) - if self.is_mac_bundle: - # gyp has mac_bundle_resources to copy things into a bundle's - # Resources folder, but there's no built-in way to copy files - # to other places in the bundle. - # Hence, some targets use copies for this. - # Check if this file is copied into the current bundle, - # and if so add it to the bundle depends so - # that dependent targets get rebuilt if the copy input changes. - if dst.startswith( - self.xcode_settings.GetBundleContentsFolderPath() - ): - mac_bundle_depends.append(dst) - - return outputs - - def WriteiOSFrameworkHeaders(self, spec, outputs, prebuild): - """Prebuild steps to generate hmap files and copy headers to destination.""" - framework = self.ComputeMacBundleOutput() - all_sources = spec["sources"] - copy_headers = spec["mac_framework_headers"] - output = self.GypPathToUniqueOutput("headers.hmap") - self.xcode_settings.header_map_path = output - all_headers = map( - self.GypPathToNinja, filter(lambda x: x.endswith(".h"), all_sources) - ) - variables = [ - ("framework", framework), - ("copy_headers", map(self.GypPathToNinja, copy_headers)), - ] - outputs.extend( - self.ninja.build( - output, - "compile_ios_framework_headers", - all_headers, - variables=variables, - order_only=prebuild, - ) - ) - - def WriteMacBundleResources(self, resources, bundle_depends): - """Writes ninja edges for 'mac_bundle_resources'.""" - xcassets = [] - - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name) - - for output, res in gyp.xcode_emulation.GetMacBundleResources( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - map(self.GypPathToNinja, resources), - ): - output = self.ExpandSpecial(output) - if os.path.splitext(output)[-1] != ".xcassets": - self.ninja.build( - output, - "mac_tool", - res, - variables=[ - ("mactool_cmd", "copy-bundle-resource"), - ("env", env), - ("binary", isBinary), - ], - ) - bundle_depends.append(output) - else: - xcassets.append(res) - return xcassets - - def WriteMacXCassets(self, xcassets, bundle_depends): - """Writes ninja edges for 'mac_bundle_resources' .xcassets files. - - This add an invocation of 'actool' via the 'mac_tool.py' helper script. - It assumes that the assets catalogs define at least one imageset and - thus an Assets.car file will be generated in the application resources - directory. If this is not the case, then the build will probably be done - at each invocation of ninja.""" - if not xcassets: - return - - extra_arguments = {} - settings_to_arg = { - "XCASSETS_APP_ICON": "app-icon", - "XCASSETS_LAUNCH_IMAGE": "launch-image", - } - settings = self.xcode_settings.xcode_settings[self.config_name] - for settings_key, arg_name in settings_to_arg.items(): - value = settings.get(settings_key) - if value: - extra_arguments[arg_name] = value - - partial_info_plist = None - if extra_arguments: - partial_info_plist = self.GypPathToUniqueOutput( - "assetcatalog_generated_info.plist" - ) - extra_arguments["output-partial-info-plist"] = partial_info_plist - - outputs = [] - outputs.append( - os.path.join(self.xcode_settings.GetBundleResourceFolder(), "Assets.car") - ) - if partial_info_plist: - outputs.append(partial_info_plist) - - keys = QuoteShellArgument(json.dumps(extra_arguments), self.flavor) - extra_env = self.xcode_settings.GetPerTargetSettings() - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - - bundle_depends.extend( - self.ninja.build( - outputs, - "compile_xcassets", - xcassets, - variables=[("env", env), ("keys", keys)], - ) - ) - return partial_info_plist - - def WriteMacInfoPlist(self, partial_info_plist, bundle_depends): - """Write build rules for bundle Info.plist files.""" - info_plist, out, defines, extra_env = gyp.xcode_emulation.GetMacInfoPlist( - generator_default_variables["PRODUCT_DIR"], - self.xcode_settings, - self.GypPathToNinja, - ) - if not info_plist: - return - out = self.ExpandSpecial(out) - if defines: - # Create an intermediate file to store preprocessed results. - intermediate_plist = self.GypPathToUniqueOutput( - os.path.basename(info_plist) - ) - defines = " ".join([Define(d, self.flavor) for d in defines]) - info_plist = self.ninja.build( - intermediate_plist, - "preprocess_infoplist", - info_plist, - variables=[("defines", defines)], - ) - - env = self.GetSortedXcodeEnv(additional_settings=extra_env) - env = self.ComputeExportEnvString(env) - - if partial_info_plist: - intermediate_plist = self.GypPathToUniqueOutput("merged_info.plist") - info_plist = self.ninja.build( - intermediate_plist, "merge_infoplist", [partial_info_plist, info_plist] - ) - - keys = self.xcode_settings.GetExtraPlistItems(self.config_name) - keys = QuoteShellArgument(json.dumps(keys), self.flavor) - isBinary = self.xcode_settings.IsBinaryOutputFormat(self.config_name) - self.ninja.build( - out, - "copy_infoplist", - info_plist, - variables=[("env", env), ("keys", keys), ("binary", isBinary)], - ) - bundle_depends.append(out) - - def WriteSources( - self, - ninja_file, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - ): - """Write build rules to compile all of |sources|.""" - if self.toolset == "host": - self.ninja.variable("ar", "$ar_host") - self.ninja.variable("cc", "$cc_host") - self.ninja.variable("cxx", "$cxx_host") - self.ninja.variable("ld", "$ld_host") - self.ninja.variable("ldxx", "$ldxx_host") - self.ninja.variable("nm", "$nm_host") - self.ninja.variable("readelf", "$readelf_host") - - if self.flavor != "mac" or len(self.archs) == 1: - return self.WriteSourcesForArch( - self.ninja, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - ) - else: - return { - arch: self.WriteSourcesForArch( - self.arch_subninjas[arch], - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - arch=arch, - ) - for arch in self.archs - } - - def WriteSourcesForArch( - self, - ninja_file, - config_name, - config, - sources, - predepends, - precompiled_header, - spec, - arch=None, - ): - """Write build rules to compile all of |sources|.""" - - extra_defines = [] - if self.flavor == "mac": - cflags = self.xcode_settings.GetCflags(config_name, arch=arch) - cflags_c = self.xcode_settings.GetCflagsC(config_name) - cflags_cc = self.xcode_settings.GetCflagsCC(config_name) - cflags_objc = ["$cflags_c"] + self.xcode_settings.GetCflagsObjC(config_name) - cflags_objcc = ["$cflags_cc"] + self.xcode_settings.GetCflagsObjCC( - config_name - ) - elif self.flavor == "win": - asmflags = self.msvs_settings.GetAsmflags(config_name) - cflags = self.msvs_settings.GetCflags(config_name) - cflags_c = self.msvs_settings.GetCflagsC(config_name) - cflags_cc = self.msvs_settings.GetCflagsCC(config_name) - extra_defines = self.msvs_settings.GetComputedDefines(config_name) - # See comment at cc_command for why there's two .pdb files. - pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName( - config_name, self.ExpandSpecial - ) - if not pdbpath_c: - obj = "obj" - if self.toolset != "target": - obj += "." + self.toolset - pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, self.name)) - pdbpath_c = pdbpath + ".c.pdb" - pdbpath_cc = pdbpath + ".cc.pdb" - self.WriteVariableList(ninja_file, "pdbname_c", [pdbpath_c]) - self.WriteVariableList(ninja_file, "pdbname_cc", [pdbpath_cc]) - self.WriteVariableList(ninja_file, "pchprefix", [self.name]) - else: - cflags = config.get("cflags", []) - cflags_c = config.get("cflags_c", []) - cflags_cc = config.get("cflags_cc", []) - - # Respect environment variables related to build, but target-specific - # flags can still override them. - if self.toolset == "target": - cflags_c = ( - os.environ.get("CPPFLAGS", "").split() - + os.environ.get("CFLAGS", "").split() - + cflags_c - ) - cflags_cc = ( - os.environ.get("CPPFLAGS", "").split() - + os.environ.get("CXXFLAGS", "").split() - + cflags_cc - ) - elif self.toolset == "host": - cflags_c = ( - os.environ.get("CPPFLAGS_host", "").split() - + os.environ.get("CFLAGS_host", "").split() - + cflags_c - ) - cflags_cc = ( - os.environ.get("CPPFLAGS_host", "").split() - + os.environ.get("CXXFLAGS_host", "").split() - + cflags_cc - ) - - defines = config.get("defines", []) + extra_defines - self.WriteVariableList( - ninja_file, "defines", [Define(d, self.flavor) for d in defines] - ) - if self.flavor == "win": - self.WriteVariableList( - ninja_file, "asmflags", map(self.ExpandSpecial, asmflags) - ) - self.WriteVariableList( - ninja_file, - "rcflags", - [ - QuoteShellArgument(self.ExpandSpecial(f), self.flavor) - for f in self.msvs_settings.GetRcflags( - config_name, self.GypPathToNinja - ) - ], - ) - - include_dirs = config.get("include_dirs", []) - - env = self.GetToolchainEnv() - if self.flavor == "win": - include_dirs = self.msvs_settings.AdjustIncludeDirs( - include_dirs, config_name - ) - self.WriteVariableList( - ninja_file, - "includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in include_dirs - ], - ) - - if self.flavor == "win": - midl_include_dirs = config.get("midl_include_dirs", []) - midl_include_dirs = self.msvs_settings.AdjustMidlIncludeDirs( - midl_include_dirs, config_name - ) - self.WriteVariableList( - ninja_file, - "midl_includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in midl_include_dirs - ], - ) - - pch_commands = precompiled_header.GetPchBuildCommands(arch) - if self.flavor == "mac": - # Most targets use no precompiled headers, so only write these if needed. - for ext, var in [ - ("c", "cflags_pch_c"), - ("cc", "cflags_pch_cc"), - ("m", "cflags_pch_objc"), - ("mm", "cflags_pch_objcc"), - ]: - include = precompiled_header.GetInclude(ext, arch) - if include: - ninja_file.variable(var, include) - - arflags = config.get("arflags", []) - - self.WriteVariableList(ninja_file, "cflags", map(self.ExpandSpecial, cflags)) - self.WriteVariableList( - ninja_file, "cflags_c", map(self.ExpandSpecial, cflags_c) - ) - self.WriteVariableList( - ninja_file, "cflags_cc", map(self.ExpandSpecial, cflags_cc) - ) - if self.flavor == "mac": - self.WriteVariableList( - ninja_file, "cflags_objc", map(self.ExpandSpecial, cflags_objc) - ) - self.WriteVariableList( - ninja_file, "cflags_objcc", map(self.ExpandSpecial, cflags_objcc) - ) - self.WriteVariableList(ninja_file, "arflags", map(self.ExpandSpecial, arflags)) - ninja_file.newline() - outputs = [] - has_rc_source = False - for source in sources: - filename, ext = os.path.splitext(source) - ext = ext[1:] - obj_ext = self.obj_ext - if ext in ("cc", "cpp", "cxx"): - command = "cxx" - self.target.uses_cpp = True - elif ext == "c" or (ext == "S" and self.flavor != "win"): - command = "cc" - elif ext == "s" and self.flavor != "win": # Doesn't generate .o.d files. - command = "cc_s" - elif ( - self.flavor == "win" - and ext in ("asm", "S") - and not self.msvs_settings.HasExplicitAsmRules(spec) - ): - command = "asm" - # Add the _asm suffix as msvs is capable of handling .cc and - # .asm files of the same name without collision. - obj_ext = "_asm.obj" - elif self.flavor == "mac" and ext == "m": - command = "objc" - elif self.flavor == "mac" and ext == "mm": - command = "objcxx" - self.target.uses_cpp = True - elif self.flavor == "win" and ext == "rc": - command = "rc" - obj_ext = ".res" - has_rc_source = True - else: - # Ignore unhandled extensions. - continue - input = self.GypPathToNinja(source) - output = self.GypPathToUniqueOutput(filename + obj_ext) - if arch is not None: - output = AddArch(output, arch) - implicit = precompiled_header.GetObjDependencies([input], [output], arch) - variables = [] - if self.flavor == "win": - variables, output, implicit = precompiled_header.GetFlagsModifications( - input, - output, - implicit, - command, - cflags_c, - cflags_cc, - self.ExpandSpecial, - ) - ninja_file.build( - output, - command, - input, - implicit=[gch for _, _, gch in implicit], - order_only=predepends, - variables=variables, - ) - outputs.append(output) - - if has_rc_source: - resource_include_dirs = config.get("resource_include_dirs", include_dirs) - self.WriteVariableList( - ninja_file, - "resource_includes", - [ - QuoteShellArgument("-I" + self.GypPathToNinja(i, env), self.flavor) - for i in resource_include_dirs - ], - ) - - self.WritePchTargets(ninja_file, pch_commands) - - ninja_file.newline() - return outputs - - def WritePchTargets(self, ninja_file, pch_commands): - """Writes ninja rules to compile prefix headers.""" - if not pch_commands: - return - - for gch, lang_flag, lang, input in pch_commands: - var_name = { - "c": "cflags_pch_c", - "cc": "cflags_pch_cc", - "m": "cflags_pch_objc", - "mm": "cflags_pch_objcc", - }[lang] - - map = { - "c": "cc", - "cc": "cxx", - "m": "objc", - "mm": "objcxx", - } - cmd = map.get(lang) - ninja_file.build(gch, cmd, input, variables=[(var_name, lang_flag)]) - - def WriteLink(self, spec, config_name, config, link_deps, compile_deps): - """Write out a link step. Fills out target.binary. """ - if self.flavor != "mac" or len(self.archs) == 1: - return self.WriteLinkForArch( - self.ninja, spec, config_name, config, link_deps, compile_deps - ) - else: - output = self.ComputeOutput(spec) - inputs = [ - self.WriteLinkForArch( - self.arch_subninjas[arch], - spec, - config_name, - config, - link_deps[arch], - compile_deps, - arch=arch, - ) - for arch in self.archs - ] - extra_bindings = [] - build_output = output - if not self.is_mac_bundle: - self.AppendPostbuildVariable(extra_bindings, spec, output, output) - - # TODO(yyanagisawa): more work needed to fix: - # https://code.google.com/p/gyp/issues/detail?id=411 - if ( - spec["type"] in ("shared_library", "loadable_module") - and not self.is_mac_bundle - ): - extra_bindings.append(("lib", output)) - self.ninja.build( - [output, output + ".TOC"], - "solipo", - inputs, - variables=extra_bindings, - ) - else: - self.ninja.build(build_output, "lipo", inputs, variables=extra_bindings) - return output - - def WriteLinkForArch( - self, ninja_file, spec, config_name, config, link_deps, compile_deps, arch=None - ): - """Write out a link step. Fills out target.binary. """ - command = { - "executable": "link", - "loadable_module": "solink_module", - "shared_library": "solink", - }[spec["type"]] - command_suffix = "" - - implicit_deps = set() - solibs = set() - order_deps = set() - - if compile_deps: - # Normally, the compiles of the target already depend on compile_deps, - # but a shared_library target might have no sources and only link together - # a few static_library deps, so the link step also needs to depend - # on compile_deps to make sure actions in the shared_library target - # get run before the link. - order_deps.add(compile_deps) - - if "dependencies" in spec: - # Two kinds of dependencies: - # - Linkable dependencies (like a .a or a .so): add them to the link line. - # - Non-linkable dependencies (like a rule that generates a file - # and writes a stamp file): add them to implicit_deps - extra_link_deps = set() - for dep in spec["dependencies"]: - target = self.target_outputs.get(dep) - if not target: - continue - linkable = target.Linkable() - if linkable: - new_deps = [] - if ( - self.flavor == "win" - and target.component_objs - and self.msvs_settings.IsUseLibraryDependencyInputs(config_name) - ): - new_deps = target.component_objs - if target.compile_deps: - order_deps.add(target.compile_deps) - elif self.flavor == "win" and target.import_lib: - new_deps = [target.import_lib] - elif target.UsesToc(self.flavor): - solibs.add(target.binary) - implicit_deps.add(target.binary + ".TOC") - else: - new_deps = [target.binary] - for new_dep in new_deps: - if new_dep not in extra_link_deps: - extra_link_deps.add(new_dep) - link_deps.append(new_dep) - - final_output = target.FinalOutput() - if not linkable or final_output != target.binary: - implicit_deps.add(final_output) - - extra_bindings = [] - if self.target.uses_cpp and self.flavor != "win": - extra_bindings.append(("ld", "$ldxx")) - - output = self.ComputeOutput(spec, arch) - if arch is None and not self.is_mac_bundle: - self.AppendPostbuildVariable(extra_bindings, spec, output, output) - - is_executable = spec["type"] == "executable" - # The ldflags config key is not used on mac or win. On those platforms - # linker flags are set via xcode_settings and msvs_settings, respectively. - if self.toolset == "target": - env_ldflags = os.environ.get("LDFLAGS", "").split() - elif self.toolset == "host": - env_ldflags = os.environ.get("LDFLAGS_host", "").split() - - if self.flavor == "mac": - ldflags = self.xcode_settings.GetLdflags( - config_name, - self.ExpandSpecial(generator_default_variables["PRODUCT_DIR"]), - self.GypPathToNinja, - arch, - ) - ldflags = env_ldflags + ldflags - elif self.flavor == "win": - manifest_base_name = self.GypPathToUniqueOutput( - self.ComputeOutputFileName(spec) - ) - ( - ldflags, - intermediate_manifest, - manifest_files, - ) = self.msvs_settings.GetLdflags( - config_name, - self.GypPathToNinja, - self.ExpandSpecial, - manifest_base_name, - output, - is_executable, - self.toplevel_build, - ) - ldflags = env_ldflags + ldflags - self.WriteVariableList(ninja_file, "manifests", manifest_files) - implicit_deps = implicit_deps.union(manifest_files) - if intermediate_manifest: - self.WriteVariableList( - ninja_file, "intermediatemanifest", [intermediate_manifest] - ) - command_suffix = _GetWinLinkRuleNameSuffix( - self.msvs_settings.IsEmbedManifest(config_name) - ) - def_file = self.msvs_settings.GetDefFile(self.GypPathToNinja) - if def_file: - implicit_deps.add(def_file) - else: - # Respect environment variables related to build, but target-specific - # flags can still override them. - ldflags = env_ldflags + config.get("ldflags", []) - if is_executable and len(solibs): - rpath = "lib/" - if self.toolset != "target": - rpath += self.toolset - ldflags.append(r"-Wl,-rpath=\$$ORIGIN/%s" % rpath) - else: - ldflags.append("-Wl,-rpath=%s" % self.target_rpath) - ldflags.append("-Wl,-rpath-link=%s" % rpath) - self.WriteVariableList(ninja_file, "ldflags", map(self.ExpandSpecial, ldflags)) - - library_dirs = config.get("library_dirs", []) - if self.flavor == "win": - library_dirs = [ - self.msvs_settings.ConvertVSMacros(library_dir, config_name) - for library_dir in library_dirs - ] - library_dirs = [ - "/LIBPATH:" - + QuoteShellArgument(self.GypPathToNinja(library_dir), self.flavor) - for library_dir in library_dirs - ] - else: - library_dirs = [ - QuoteShellArgument("-L" + self.GypPathToNinja(library_dir), self.flavor) - for library_dir in library_dirs - ] - - libraries = gyp.common.uniquer( - map(self.ExpandSpecial, spec.get("libraries", [])) - ) - if self.flavor == "mac": - libraries = self.xcode_settings.AdjustLibraries(libraries, config_name) - elif self.flavor == "win": - libraries = self.msvs_settings.AdjustLibraries(libraries) - - self.WriteVariableList(ninja_file, "libs", library_dirs + libraries) - - linked_binary = output - - if command in ("solink", "solink_module"): - extra_bindings.append(("soname", os.path.split(output)[1])) - extra_bindings.append(("lib", gyp.common.EncodePOSIXShellArgument(output))) - if self.flavor != "win": - link_file_list = output - if self.is_mac_bundle: - # 'Dependency Framework.framework/Versions/A/Dependency Framework' - # -> 'Dependency Framework.framework.rsp' - link_file_list = self.xcode_settings.GetWrapperName() - if arch: - link_file_list += "." + arch - link_file_list += ".rsp" - # If an rspfile contains spaces, ninja surrounds the filename with - # quotes around it and then passes it to open(), creating a file with - # quotes in its name (and when looking for the rsp file, the name - # makes it through bash which strips the quotes) :-/ - link_file_list = link_file_list.replace(" ", "_") - extra_bindings.append( - ( - "link_file_list", - gyp.common.EncodePOSIXShellArgument(link_file_list), - ) - ) - if self.flavor == "win": - extra_bindings.append(("binary", output)) - if ( - "/NOENTRY" not in ldflags - and not self.msvs_settings.GetNoImportLibrary(config_name) - ): - self.target.import_lib = output + ".lib" - extra_bindings.append( - ("implibflag", "/IMPLIB:%s" % self.target.import_lib) - ) - pdbname = self.msvs_settings.GetPDBName( - config_name, self.ExpandSpecial, output + ".pdb" - ) - output = [output, self.target.import_lib] - if pdbname: - output.append(pdbname) - elif not self.is_mac_bundle: - output = [output, output + ".TOC"] - else: - command = command + "_notoc" - elif self.flavor == "win": - extra_bindings.append(("binary", output)) - pdbname = self.msvs_settings.GetPDBName( - config_name, self.ExpandSpecial, output + ".pdb" - ) - if pdbname: - output = [output, pdbname] - - if len(solibs): - extra_bindings.append( - ("solibs", gyp.common.EncodePOSIXShellList(sorted(solibs))) - ) - - ninja_file.build( - output, - command + command_suffix, - link_deps, - implicit=sorted(implicit_deps), - order_only=list(order_deps), - variables=extra_bindings, - ) - return linked_binary - - def WriteTarget(self, spec, config_name, config, link_deps, compile_deps): - extra_link_deps = any( - self.target_outputs.get(dep).Linkable() - for dep in spec.get("dependencies", []) - if dep in self.target_outputs - ) - if spec["type"] == "none" or (not link_deps and not extra_link_deps): - # TODO(evan): don't call this function for 'none' target types, as - # it doesn't do anything, and we fake out a 'binary' with a stamp file. - self.target.binary = compile_deps - self.target.type = "none" - elif spec["type"] == "static_library": - self.target.binary = self.ComputeOutput(spec) - if ( - self.flavor not in ("ios", "mac", "netbsd", "openbsd", "win") - and not self.is_standalone_static_library - ): - self.ninja.build( - self.target.binary, "alink_thin", link_deps, order_only=compile_deps - ) - else: - variables = [] - if self.xcode_settings: - libtool_flags = self.xcode_settings.GetLibtoolflags(config_name) - if libtool_flags: - variables.append(("libtool_flags", libtool_flags)) - if self.msvs_settings: - libflags = self.msvs_settings.GetLibFlags( - config_name, self.GypPathToNinja - ) - variables.append(("libflags", libflags)) - - if self.flavor != "mac" or len(self.archs) == 1: - self.AppendPostbuildVariable( - variables, spec, self.target.binary, self.target.binary - ) - self.ninja.build( - self.target.binary, - "alink", - link_deps, - order_only=compile_deps, - variables=variables, - ) - else: - inputs = [] - for arch in self.archs: - output = self.ComputeOutput(spec, arch) - self.arch_subninjas[arch].build( - output, - "alink", - link_deps[arch], - order_only=compile_deps, - variables=variables, - ) - inputs.append(output) - # TODO: It's not clear if - # libtool_flags should be passed to the alink - # call that combines single-arch .a files into a fat .a file. - self.AppendPostbuildVariable( - variables, spec, self.target.binary, self.target.binary - ) - self.ninja.build( - self.target.binary, - "alink", - inputs, - # FIXME: test proving order_only=compile_deps isn't - # needed. - variables=variables, - ) - else: - self.target.binary = self.WriteLink( - spec, config_name, config, link_deps, compile_deps - ) - return self.target.binary - - def WriteMacBundle(self, spec, mac_bundle_depends, is_empty): - assert self.is_mac_bundle - package_framework = spec["type"] in ("shared_library", "loadable_module") - output = self.ComputeMacBundleOutput() - if is_empty: - output += ".stamp" - variables = [] - self.AppendPostbuildVariable( - variables, - spec, - output, - self.target.binary, - is_command_start=not package_framework, - ) - if package_framework and not is_empty: - if spec["type"] == "shared_library" and self.xcode_settings.isIOS: - self.ninja.build( - output, - "package_ios_framework", - mac_bundle_depends, - variables=variables, - ) - else: - variables.append(("version", self.xcode_settings.GetFrameworkVersion())) - self.ninja.build( - output, "package_framework", mac_bundle_depends, variables=variables - ) - else: - self.ninja.build(output, "stamp", mac_bundle_depends, variables=variables) - self.target.bundle = output - return output - - def GetToolchainEnv(self, additional_settings=None): - """Returns the variables toolchain would set for build steps.""" - env = self.GetSortedXcodeEnv(additional_settings=additional_settings) - if self.flavor == "win": - env = self.GetMsvsToolchainEnv(additional_settings=additional_settings) - return env - - def GetMsvsToolchainEnv(self, additional_settings=None): - """Returns the variables Visual Studio would set for build steps.""" - return self.msvs_settings.GetVSMacroEnv( - "$!PRODUCT_DIR", config=self.config_name - ) - - def GetSortedXcodeEnv(self, additional_settings=None): - """Returns the variables Xcode would set for build steps.""" - assert self.abs_build_dir - abs_build_dir = self.abs_build_dir - return gyp.xcode_emulation.GetSortedXcodeEnv( - self.xcode_settings, - abs_build_dir, - os.path.join(abs_build_dir, self.build_to_base), - self.config_name, - additional_settings, - ) - - def GetSortedXcodePostbuildEnv(self): - """Returns the variables Xcode would set for postbuild steps.""" - postbuild_settings = {} - # CHROMIUM_STRIP_SAVE_FILE is a chromium-specific hack. - # TODO(thakis): It would be nice to have some general mechanism instead. - strip_save_file = self.xcode_settings.GetPerTargetSetting( - "CHROMIUM_STRIP_SAVE_FILE" - ) - if strip_save_file: - postbuild_settings["CHROMIUM_STRIP_SAVE_FILE"] = strip_save_file - return self.GetSortedXcodeEnv(additional_settings=postbuild_settings) - - def AppendPostbuildVariable( - self, variables, spec, output, binary, is_command_start=False - ): - """Adds a 'postbuild' variable if there is a postbuild for |output|.""" - postbuild = self.GetPostbuildCommand(spec, output, binary, is_command_start) - if postbuild: - variables.append(("postbuilds", postbuild)) - - def GetPostbuildCommand(self, spec, output, output_binary, is_command_start): - """Returns a shell command that runs all the postbuilds, and removes - |output| if any of them fails. If |is_command_start| is False, then the - returned string will start with ' && '.""" - if not self.xcode_settings or spec["type"] == "none" or not output: - return "" - output = QuoteShellArgument(output, self.flavor) - postbuilds = gyp.xcode_emulation.GetSpecPostbuildCommands(spec, quiet=True) - if output_binary is not None: - postbuilds = self.xcode_settings.AddImplicitPostbuilds( - self.config_name, - os.path.normpath(os.path.join(self.base_to_build, output)), - QuoteShellArgument( - os.path.normpath(os.path.join(self.base_to_build, output_binary)), - self.flavor, - ), - postbuilds, - quiet=True, - ) - - if not postbuilds: - return "" - # Postbuilds expect to be run in the gyp file's directory, so insert an - # implicit postbuild to cd to there. - postbuilds.insert( - 0, gyp.common.EncodePOSIXShellList(["cd", self.build_to_base]) - ) - env = self.ComputeExportEnvString(self.GetSortedXcodePostbuildEnv()) - # G will be non-null if any postbuild fails. Run all postbuilds in a - # subshell. - commands = ( - env - + " (" - + " && ".join([ninja_syntax.escape(command) for command in postbuilds]) - ) - command_string = ( - commands - + "); G=$$?; " - # Remove the final output if any postbuild failed. - "((exit $$G) || rm -rf %s) " % output - + "&& exit $$G)" - ) - if is_command_start: - return "(" + command_string + " && " - else: - return "$ && (" + command_string - - def ComputeExportEnvString(self, env): - """Given an environment, returns a string looking like - 'export FOO=foo; export BAR="${FOO} bar;' - that exports |env| to the shell.""" - export_str = [] - for k, v in env: - export_str.append( - "export %s=%s;" - % (k, ninja_syntax.escape(gyp.common.EncodePOSIXShellArgument(v))) - ) - return " ".join(export_str) - - def ComputeMacBundleOutput(self): - """Return the 'output' (full output path) to a bundle output directory.""" - assert self.is_mac_bundle - path = generator_default_variables["PRODUCT_DIR"] - return self.ExpandSpecial( - os.path.join(path, self.xcode_settings.GetWrapperName()) - ) - - def ComputeOutputFileName(self, spec, type=None): - """Compute the filename of the final output for the current target.""" - if not type: - type = spec["type"] - - default_variables = copy.copy(generator_default_variables) - CalculateVariables(default_variables, {"flavor": self.flavor}) - - # Compute filename prefix: the product prefix, or a default for - # the product type. - DEFAULT_PREFIX = { - "loadable_module": default_variables["SHARED_LIB_PREFIX"], - "shared_library": default_variables["SHARED_LIB_PREFIX"], - "static_library": default_variables["STATIC_LIB_PREFIX"], - "executable": default_variables["EXECUTABLE_PREFIX"], - } - prefix = spec.get("product_prefix", DEFAULT_PREFIX.get(type, "")) - - # Compute filename extension: the product extension, or a default - # for the product type. - DEFAULT_EXTENSION = { - "loadable_module": default_variables["SHARED_LIB_SUFFIX"], - "shared_library": default_variables["SHARED_LIB_SUFFIX"], - "static_library": default_variables["STATIC_LIB_SUFFIX"], - "executable": default_variables["EXECUTABLE_SUFFIX"], - } - extension = spec.get("product_extension") - extension = "." + extension if extension else DEFAULT_EXTENSION.get(type, "") - - if "product_name" in spec: - # If we were given an explicit name, use that. - target = spec["product_name"] - else: - # Otherwise, derive a name from the target name. - target = spec["target_name"] - if prefix == "lib": - # Snip out an extra 'lib' from libs if appropriate. - target = StripPrefix(target, "lib") - - if type in ( - "static_library", - "loadable_module", - "shared_library", - "executable", - ): - return f"{prefix}{target}{extension}" - elif type == "none": - return "%s.stamp" % target - else: - raise Exception("Unhandled output type %s" % type) - - def ComputeOutput(self, spec, arch=None): - """Compute the path for the final output of the spec.""" - type = spec["type"] - - if self.flavor == "win": - override = self.msvs_settings.GetOutputName( - self.config_name, self.ExpandSpecial - ) - if override: - return override - - if ( - arch is None - and self.flavor == "mac" - and type - in ("static_library", "executable", "shared_library", "loadable_module") - ): - filename = self.xcode_settings.GetExecutablePath() - else: - filename = self.ComputeOutputFileName(spec, type) - - if arch is None and "product_dir" in spec: - path = os.path.join(spec["product_dir"], filename) - return self.ExpandSpecial(path) - - # Some products go into the output root, libraries go into shared library - # dir, and everything else goes into the normal place. - type_in_output_root = ["executable", "loadable_module"] - if self.flavor == "mac" and self.toolset == "target": - type_in_output_root += ["shared_library", "static_library"] - elif self.flavor == "win" and self.toolset == "target": - type_in_output_root += ["shared_library"] - - if arch is not None: - # Make sure partial executables don't end up in a bundle or the regular - # output directory. - archdir = "arch" - if self.toolset != "target": - archdir = os.path.join("arch", "%s" % self.toolset) - return os.path.join(archdir, AddArch(filename, arch)) - elif type in type_in_output_root or self.is_standalone_static_library: - return filename - elif type == "shared_library": - libdir = "lib" - if self.toolset != "target": - libdir = os.path.join("lib", "%s" % self.toolset) - return os.path.join(libdir, filename) - else: - return self.GypPathToUniqueOutput(filename, qualified=False) - - def WriteVariableList(self, ninja_file, var, values): - assert not isinstance(values, str) - if values is None: - values = [] - ninja_file.variable(var, " ".join(values)) - - def WriteNewNinjaRule( - self, name, args, description, win_shell_flags, env, pool, depfile=None - ): - """Write out a new ninja "rule" statement for a given command. - - Returns the name of the new rule, and a copy of |args| with variables - expanded.""" - - if self.flavor == "win": - args = [ - self.msvs_settings.ConvertVSMacros( - arg, self.base_to_build, config=self.config_name - ) - for arg in args - ] - description = self.msvs_settings.ConvertVSMacros( - description, config=self.config_name - ) - elif self.flavor == "mac": - # |env| is an empty list on non-mac. - args = [gyp.xcode_emulation.ExpandEnvVars(arg, env) for arg in args] - description = gyp.xcode_emulation.ExpandEnvVars(description, env) - - # TODO: we shouldn't need to qualify names; we do it because - # currently the ninja rule namespace is global, but it really - # should be scoped to the subninja. - rule_name = self.name - if self.toolset == "target": - rule_name += "." + self.toolset - rule_name += "." + name - rule_name = re.sub("[^a-zA-Z0-9_]", "_", rule_name) - - # Remove variable references, but not if they refer to the magic rule - # variables. This is not quite right, as it also protects these for - # actions, not just for rules where they are valid. Good enough. - protect = ["${root}", "${dirname}", "${source}", "${ext}", "${name}"] - protect = "(?!" + "|".join(map(re.escape, protect)) + ")" - description = re.sub(protect + r"\$", "_", description) - - # gyp dictates that commands are run from the base directory. - # cd into the directory before running, and adjust paths in - # the arguments to point to the proper locations. - rspfile = None - rspfile_content = None - args = [self.ExpandSpecial(arg, self.base_to_build) for arg in args] - if self.flavor == "win": - rspfile = rule_name + ".$unique_name.rsp" - # The cygwin case handles this inside the bash sub-shell. - run_in = "" if win_shell_flags.cygwin else " " + self.build_to_base - if win_shell_flags.cygwin: - rspfile_content = self.msvs_settings.BuildCygwinBashCommandLine( - args, self.build_to_base - ) - else: - rspfile_content = gyp.msvs_emulation.EncodeRspFileList( - args, win_shell_flags.quote) - command = ( - "%s gyp-win-tool action-wrapper $arch " % sys.executable - + rspfile - + run_in - ) - else: - env = self.ComputeExportEnvString(env) - command = gyp.common.EncodePOSIXShellList(args) - command = "cd %s; " % self.build_to_base + env + command - - # GYP rules/actions express being no-ops by not touching their outputs. - # Avoid executing downstream dependencies in this case by specifying - # restat=1 to ninja. - self.ninja.rule( - rule_name, - command, - description, - depfile=depfile, - restat=True, - pool=pool, - rspfile=rspfile, - rspfile_content=rspfile_content, - ) - self.ninja.newline() - - return rule_name, args - - -def CalculateVariables(default_variables, params): - """Calculate additional variables for use in the build (called by gyp).""" - global generator_additional_non_configuration_keys - global generator_additional_path_sections - flavor = gyp.common.GetFlavor(params) - if flavor == "mac": - default_variables.setdefault("OS", "mac") - default_variables.setdefault("SHARED_LIB_SUFFIX", ".dylib") - default_variables.setdefault( - "SHARED_LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - default_variables.setdefault( - "LIB_DIR", generator_default_variables["PRODUCT_DIR"] - ) - - # Copy additional generator configuration data from Xcode, which is shared - # by the Mac Ninja generator. - import gyp.generator.xcode as xcode_generator - - generator_additional_non_configuration_keys = getattr( - xcode_generator, "generator_additional_non_configuration_keys", [] - ) - generator_additional_path_sections = getattr( - xcode_generator, "generator_additional_path_sections", [] - ) - global generator_extra_sources_for_rules - generator_extra_sources_for_rules = getattr( - xcode_generator, "generator_extra_sources_for_rules", [] - ) - elif flavor == "win": - exts = gyp.MSVSUtil.TARGET_TYPE_EXT - default_variables.setdefault("OS", "win") - default_variables["EXECUTABLE_SUFFIX"] = "." + exts["executable"] - default_variables["STATIC_LIB_PREFIX"] = "" - default_variables["STATIC_LIB_SUFFIX"] = "." + exts["static_library"] - default_variables["SHARED_LIB_PREFIX"] = "" - default_variables["SHARED_LIB_SUFFIX"] = "." + exts["shared_library"] - - # Copy additional generator configuration data from VS, which is shared - # by the Windows Ninja generator. - import gyp.generator.msvs as msvs_generator - - generator_additional_non_configuration_keys = getattr( - msvs_generator, "generator_additional_non_configuration_keys", [] - ) - generator_additional_path_sections = getattr( - msvs_generator, "generator_additional_path_sections", [] - ) - - gyp.msvs_emulation.CalculateCommonVariables(default_variables, params) - else: - operating_system = flavor - if flavor == "android": - operating_system = "linux" # Keep this legacy behavior for now. - default_variables.setdefault("OS", operating_system) - default_variables.setdefault("SHARED_LIB_SUFFIX", ".so") - default_variables.setdefault( - "SHARED_LIB_DIR", os.path.join("$!PRODUCT_DIR", "lib") - ) - default_variables.setdefault("LIB_DIR", os.path.join("$!PRODUCT_DIR", "obj")) - - -def ComputeOutputDir(params): - """Returns the path from the toplevel_dir to the build output directory.""" - # generator_dir: relative path from pwd to where make puts build files. - # Makes migrating from make to ninja easier, ninja doesn't put anything here. - generator_dir = os.path.relpath(params["options"].generator_output or ".") - - # output_dir: relative path from generator_dir to the build directory. - output_dir = params.get("generator_flags", {}).get("output_dir", "out") - - # Relative path from source root to our output files. e.g. "out" - return os.path.normpath(os.path.join(generator_dir, output_dir)) - - -def CalculateGeneratorInputInfo(params): - """Called by __init__ to initialize generator values based on params.""" - # E.g. "out/gypfiles" - toplevel = params["options"].toplevel_dir - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, ComputeOutputDir(params), "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def OpenOutput(path, mode="w"): - """Open |path| for writing, creating directories if necessary.""" - gyp.common.EnsureDirExists(path) - return open(path, mode) - - -def CommandWithWrapper(cmd, wrappers, prog): - wrapper = wrappers.get(cmd, "") - if wrapper: - return wrapper + " " + prog - return prog - - -def GetDefaultConcurrentLinks(): - """Returns a best-guess for a number of concurrent links.""" - pool_size = int(os.environ.get("GYP_LINK_CONCURRENCY", 0)) - if pool_size: - return pool_size - - if sys.platform in ("win32", "cygwin"): - import ctypes - - class MEMORYSTATUSEX(ctypes.Structure): - _fields_ = [ - ("dwLength", ctypes.c_ulong), - ("dwMemoryLoad", ctypes.c_ulong), - ("ullTotalPhys", ctypes.c_ulonglong), - ("ullAvailPhys", ctypes.c_ulonglong), - ("ullTotalPageFile", ctypes.c_ulonglong), - ("ullAvailPageFile", ctypes.c_ulonglong), - ("ullTotalVirtual", ctypes.c_ulonglong), - ("ullAvailVirtual", ctypes.c_ulonglong), - ("sullAvailExtendedVirtual", ctypes.c_ulonglong), - ] - - stat = MEMORYSTATUSEX() - stat.dwLength = ctypes.sizeof(stat) - ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)) - - # VS 2015 uses 20% more working set than VS 2013 and can consume all RAM - # on a 64 GiB machine. - mem_limit = max(1, stat.ullTotalPhys // (5 * (2 ** 30))) # total / 5GiB - hard_cap = max(1, int(os.environ.get("GYP_LINK_CONCURRENCY_MAX", 2 ** 32))) - return min(mem_limit, hard_cap) - elif sys.platform.startswith("linux"): - if os.path.exists("/proc/meminfo"): - with open("/proc/meminfo") as meminfo: - memtotal_re = re.compile(r"^MemTotal:\s*(\d*)\s*kB") - for line in meminfo: - match = memtotal_re.match(line) - if not match: - continue - # Allow 8Gb per link on Linux because Gold is quite memory hungry - return max(1, int(match.group(1)) // (8 * (2 ** 20))) - return 1 - elif sys.platform == "darwin": - try: - avail_bytes = int(subprocess.check_output(["sysctl", "-n", "hw.memsize"])) - # A static library debug build of Chromium's unit_tests takes ~2.7GB, so - # 4GB per ld process allows for some more bloat. - return max(1, avail_bytes // (4 * (2 ** 30))) # total / 4GB - except subprocess.CalledProcessError: - return 1 - else: - # TODO(scottmg): Implement this for other platforms. - return 1 - - -def _GetWinLinkRuleNameSuffix(embed_manifest): - """Returns the suffix used to select an appropriate linking rule depending on - whether the manifest embedding is enabled.""" - return "_embed" if embed_manifest else "" - - -def _AddWinLinkRules(master_ninja, embed_manifest): - """Adds link rules for Windows platform to |master_ninja|.""" - - def FullLinkCommand(ldcmd, out, binary_type): - resource_name = {"exe": "1", "dll": "2"}[binary_type] - return ( - "%(python)s gyp-win-tool link-with-manifests $arch %(embed)s " - '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' - "$manifests" - % { - "python": sys.executable, - "out": out, - "ldcmd": ldcmd, - "resname": resource_name, - "embed": embed_manifest, - } - ) - - rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest) - use_separate_mspdbsrv = int(os.environ.get("GYP_USE_SEPARATE_MSPDBSRV", "0")) != 0 - dlldesc = "LINK%s(DLL) $binary" % rule_name_suffix.upper() - dllcmd = ( - "%s gyp-win-tool link-wrapper $arch %s " - "$ld /nologo $implibflag /DLL /OUT:$binary " - "@$binary.rsp" % (sys.executable, use_separate_mspdbsrv) - ) - dllcmd = FullLinkCommand(dllcmd, "$binary", "dll") - master_ninja.rule( - "solink" + rule_name_suffix, - description=dlldesc, - command=dllcmd, - rspfile="$binary.rsp", - rspfile_content="$libs $in_newline $ldflags", - restat=True, - pool="link_pool", - ) - master_ninja.rule( - "solink_module" + rule_name_suffix, - description=dlldesc, - command=dllcmd, - rspfile="$binary.rsp", - rspfile_content="$libs $in_newline $ldflags", - restat=True, - pool="link_pool", - ) - # Note that ldflags goes at the end so that it has the option of - # overriding default settings earlier in the command line. - exe_cmd = ( - "%s gyp-win-tool link-wrapper $arch %s " - "$ld /nologo /OUT:$binary @$binary.rsp" - % (sys.executable, use_separate_mspdbsrv) - ) - exe_cmd = FullLinkCommand(exe_cmd, "$binary", "exe") - master_ninja.rule( - "link" + rule_name_suffix, - description="LINK%s $binary" % rule_name_suffix.upper(), - command=exe_cmd, - rspfile="$binary.rsp", - rspfile_content="$in_newline $libs $ldflags", - pool="link_pool", - ) - - -def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name): - options = params["options"] - flavor = gyp.common.GetFlavor(params) - generator_flags = params.get("generator_flags", {}) - - # build_dir: relative path from source root to our output files. - # e.g. "out/Debug" - build_dir = os.path.normpath(os.path.join(ComputeOutputDir(params), config_name)) - - toplevel_build = os.path.join(options.toplevel_dir, build_dir) - - master_ninja_file = OpenOutput(os.path.join(toplevel_build, "build.ninja")) - master_ninja = ninja_syntax.Writer(master_ninja_file, width=120) - - # Put build-time support tools in out/{config_name}. - gyp.common.CopyTool(flavor, toplevel_build, generator_flags) - - # Grab make settings for CC/CXX. - # The rules are - # - The priority from low to high is gcc/g++, the 'make_global_settings' in - # gyp, the environment variable. - # - If there is no 'make_global_settings' for CC.host/CXX.host or - # 'CC_host'/'CXX_host' environment variable, cc_host/cxx_host should be set - # to cc/cxx. - if flavor == "win": - ar = "lib.exe" - # cc and cxx must be set to the correct architecture by overriding with one - # of cl_x86 or cl_x64 below. - cc = "UNSET" - cxx = "UNSET" - ld = "link.exe" - ld_host = "$ld" - else: - ar = "ar" - cc = "cc" - cxx = "c++" - ld = "$cc" - ldxx = "$cxx" - ld_host = "$cc_host" - ldxx_host = "$cxx_host" - - ar_host = ar - cc_host = None - cxx_host = None - cc_host_global_setting = None - cxx_host_global_setting = None - clang_cl = None - nm = "nm" - nm_host = "nm" - readelf = "readelf" - readelf_host = "readelf" - - build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings = data[build_file].get("make_global_settings", []) - build_to_root = gyp.common.InvertRelativePath(build_dir, options.toplevel_dir) - wrappers = {} - for key, value in make_global_settings: - if key == "AR": - ar = os.path.join(build_to_root, value) - if key == "AR.host": - ar_host = os.path.join(build_to_root, value) - if key == "CC": - cc = os.path.join(build_to_root, value) - if cc.endswith("clang-cl"): - clang_cl = cc - if key == "CXX": - cxx = os.path.join(build_to_root, value) - if key == "CC.host": - cc_host = os.path.join(build_to_root, value) - cc_host_global_setting = value - if key == "CXX.host": - cxx_host = os.path.join(build_to_root, value) - cxx_host_global_setting = value - if key == "LD": - ld = os.path.join(build_to_root, value) - if key == "LD.host": - ld_host = os.path.join(build_to_root, value) - if key == "LDXX": - ldxx = os.path.join(build_to_root, value) - if key == "LDXX.host": - ldxx_host = os.path.join(build_to_root, value) - if key == "NM": - nm = os.path.join(build_to_root, value) - if key == "NM.host": - nm_host = os.path.join(build_to_root, value) - if key == "READELF": - readelf = os.path.join(build_to_root, value) - if key == "READELF.host": - readelf_host = os.path.join(build_to_root, value) - if key.endswith("_wrapper"): - wrappers[key[: -len("_wrapper")]] = os.path.join(build_to_root, value) - - # Support wrappers from environment variables too. - for key, value in os.environ.items(): - if key.lower().endswith("_wrapper"): - key_prefix = key[: -len("_wrapper")] - key_prefix = re.sub(r"\.HOST$", ".host", key_prefix) - wrappers[key_prefix] = os.path.join(build_to_root, value) - - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if mac_toolchain_dir: - wrappers["LINK"] = "export DEVELOPER_DIR='%s' &&" % mac_toolchain_dir - - if flavor == "win": - configs = [ - target_dicts[qualified_target]["configurations"][config_name] - for qualified_target in target_list - ] - shared_system_includes = None - if not generator_flags.get("ninja_use_custom_environment_files", 0): - shared_system_includes = gyp.msvs_emulation.ExtractSharedMSVSSystemIncludes( - configs, generator_flags - ) - cl_paths = gyp.msvs_emulation.GenerateEnvironmentFiles( - toplevel_build, generator_flags, shared_system_includes, OpenOutput - ) - for arch, path in sorted(cl_paths.items()): - if clang_cl: - # If we have selected clang-cl, use that instead. - path = clang_cl - command = CommandWithWrapper( - "CC", wrappers, QuoteShellArgument(path, "win") - ) - if clang_cl: - # Use clang-cl to cross-compile for x86 or x86_64. - command += " -m32" if arch == "x86" else " -m64" - master_ninja.variable("cl_" + arch, command) - - cc = GetEnvironFallback(["CC_target", "CC"], cc) - master_ninja.variable("cc", CommandWithWrapper("CC", wrappers, cc)) - cxx = GetEnvironFallback(["CXX_target", "CXX"], cxx) - master_ninja.variable("cxx", CommandWithWrapper("CXX", wrappers, cxx)) - - if flavor == "win": - master_ninja.variable("ld", ld) - master_ninja.variable("idl", "midl.exe") - master_ninja.variable("ar", ar) - master_ninja.variable("rc", "rc.exe") - master_ninja.variable("ml_x86", "ml.exe") - master_ninja.variable("ml_x64", "ml64.exe") - master_ninja.variable("mt", "mt.exe") - else: - master_ninja.variable("ld", CommandWithWrapper("LINK", wrappers, ld)) - master_ninja.variable("ldxx", CommandWithWrapper("LINK", wrappers, ldxx)) - master_ninja.variable("ar", GetEnvironFallback(["AR_target", "AR"], ar)) - if flavor != "mac": - # Mac does not use readelf/nm for .TOC generation, so avoiding polluting - # the master ninja with extra unused variables. - master_ninja.variable("nm", GetEnvironFallback(["NM_target", "NM"], nm)) - master_ninja.variable( - "readelf", GetEnvironFallback(["READELF_target", "READELF"], readelf) - ) - - if generator_supports_multiple_toolsets: - if not cc_host: - cc_host = cc - if not cxx_host: - cxx_host = cxx - - master_ninja.variable("ar_host", GetEnvironFallback(["AR_host"], ar_host)) - master_ninja.variable("nm_host", GetEnvironFallback(["NM_host"], nm_host)) - master_ninja.variable( - "readelf_host", GetEnvironFallback(["READELF_host"], readelf_host) - ) - cc_host = GetEnvironFallback(["CC_host"], cc_host) - cxx_host = GetEnvironFallback(["CXX_host"], cxx_host) - - # The environment variable could be used in 'make_global_settings', like - # ['CC.host', '$(CC)'] or ['CXX.host', '$(CXX)'], transform them here. - if "$(CC)" in cc_host and cc_host_global_setting: - cc_host = cc_host_global_setting.replace("$(CC)", cc) - if "$(CXX)" in cxx_host and cxx_host_global_setting: - cxx_host = cxx_host_global_setting.replace("$(CXX)", cxx) - master_ninja.variable( - "cc_host", CommandWithWrapper("CC.host", wrappers, cc_host) - ) - master_ninja.variable( - "cxx_host", CommandWithWrapper("CXX.host", wrappers, cxx_host) - ) - if flavor == "win": - master_ninja.variable("ld_host", ld_host) - else: - master_ninja.variable( - "ld_host", CommandWithWrapper("LINK", wrappers, ld_host) - ) - master_ninja.variable( - "ldxx_host", CommandWithWrapper("LINK", wrappers, ldxx_host) - ) - - master_ninja.newline() - - master_ninja.pool("link_pool", depth=GetDefaultConcurrentLinks()) - master_ninja.newline() - - deps = "msvc" if flavor == "win" else "gcc" - - if flavor != "win": - master_ninja.rule( - "cc", - description="CC $out", - command=( - "$cc -MMD -MF $out.d $defines $includes $cflags $cflags_c " - "$cflags_pch_c -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "cc_s", - description="CC $out", - command=( - "$cc $defines $includes $cflags $cflags_c " - "$cflags_pch_c -c $in -o $out" - ), - ) - master_ninja.rule( - "cxx", - description="CXX $out", - command=( - "$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc " - "$cflags_pch_cc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - else: - # TODO(scottmg) Separate pdb names is a test to see if it works around - # http://crbug.com/142362. It seems there's a race between the creation of - # the .pdb by the precompiled header step for .cc and the compilation of - # .c files. This should be handled by mspdbsrv, but rarely errors out with - # c1xx : fatal error C1033: cannot open program database - # By making the rules target separate pdb files this might be avoided. - cc_command = ( - "ninja -t msvc -e $arch " + "-- " - "$cc /nologo /showIncludes /FC " - "@$out.rsp /c $in /Fo$out /Fd$pdbname_c " - ) - cxx_command = ( - "ninja -t msvc -e $arch " + "-- " - "$cxx /nologo /showIncludes /FC " - "@$out.rsp /c $in /Fo$out /Fd$pdbname_cc " - ) - master_ninja.rule( - "cc", - description="CC $out", - command=cc_command, - rspfile="$out.rsp", - rspfile_content="$defines $includes $cflags $cflags_c", - deps=deps, - ) - master_ninja.rule( - "cxx", - description="CXX $out", - command=cxx_command, - rspfile="$out.rsp", - rspfile_content="$defines $includes $cflags $cflags_cc", - deps=deps, - ) - master_ninja.rule( - "idl", - description="IDL $in", - command=( - "%s gyp-win-tool midl-wrapper $arch $outdir " - "$tlb $h $dlldata $iid $proxy $in " - "$midl_includes $idlflags" % sys.executable - ), - ) - master_ninja.rule( - "rc", - description="RC $in", - # Note: $in must be last otherwise rc.exe complains. - command=( - "%s gyp-win-tool rc-wrapper " - "$arch $rc $defines $resource_includes $rcflags /fo$out $in" - % sys.executable - ), - ) - master_ninja.rule( - "asm", - description="ASM $out", - command=( - "%s gyp-win-tool asm-wrapper " - "$arch $asm $defines $includes $asmflags /c /Fo $out $in" - % sys.executable - ), - ) - - if flavor not in ("ios", "mac", "win"): - master_ninja.rule( - "alink", - description="AR $out", - command="rm -f $out && $ar rcs $arflags $out $in", - ) - master_ninja.rule( - "alink_thin", - description="AR $out", - command="rm -f $out && $ar rcsT $arflags $out $in", - ) - - # This allows targets that only need to depend on $lib's API to declare an - # order-only dependency on $lib.TOC and avoid relinking such downstream - # dependencies when $lib changes only in non-public ways. - # The resulting string leaves an uninterpolated %{suffix} which - # is used in the final substitution below. - mtime_preserving_solink_base = ( - "if [ ! -e $lib -o ! -e $lib.TOC ]; then " - "%(solink)s && %(extract_toc)s > $lib.TOC; else " - "%(solink)s && %(extract_toc)s > $lib.tmp && " - "if ! cmp -s $lib.tmp $lib.TOC; then mv $lib.tmp $lib.TOC ; " - "fi; fi" - % { - "solink": "$ld -shared $ldflags -o $lib -Wl,-soname=$soname %(suffix)s", - "extract_toc": ( - "{ $readelf -d $lib | grep SONAME ; " - "$nm -gD -f p $lib | cut -f1-2 -d' '; }" - ), - } - ) - - master_ninja.rule( - "solink", - description="SOLINK $lib", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": "@$link_file_list"}, - rspfile="$link_file_list", - rspfile_content=( - "-Wl,--whole-archive $in $solibs -Wl," "--no-whole-archive $libs" - ), - pool="link_pool", - ) - master_ninja.rule( - "solink_module", - description="SOLINK(module) $lib", - restat=True, - command=mtime_preserving_solink_base % {"suffix": "@$link_file_list"}, - rspfile="$link_file_list", - rspfile_content="-Wl,--start-group $in $solibs $libs -Wl,--end-group", - pool="link_pool", - ) - master_ninja.rule( - "link", - description="LINK $out", - command=( - "$ld $ldflags -o $out " - "-Wl,--start-group $in $solibs $libs -Wl,--end-group" - ), - pool="link_pool", - ) - elif flavor == "win": - master_ninja.rule( - "alink", - description="LIB $out", - command=( - "%s gyp-win-tool link-wrapper $arch False " - "$ar /nologo /ignore:4221 /OUT:$out @$out.rsp" % sys.executable - ), - rspfile="$out.rsp", - rspfile_content="$in_newline $libflags", - ) - _AddWinLinkRules(master_ninja, embed_manifest=True) - _AddWinLinkRules(master_ninja, embed_manifest=False) - else: - master_ninja.rule( - "objc", - description="OBJC $out", - command=( - "$cc -MMD -MF $out.d $defines $includes $cflags $cflags_objc " - "$cflags_pch_objc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "objcxx", - description="OBJCXX $out", - command=( - "$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_objcc " - "$cflags_pch_objcc -c $in -o $out" - ), - depfile="$out.d", - deps=deps, - ) - master_ninja.rule( - "alink", - description="LIBTOOL-STATIC $out, POSTBUILDS", - command="rm -f $out && " - "./gyp-mac-tool filter-libtool libtool $libtool_flags " - "-static -o $out $in" - "$postbuilds", - ) - master_ninja.rule( - "lipo", - description="LIPO $out, POSTBUILDS", - command="rm -f $out && lipo -create $in -output $out$postbuilds", - ) - master_ninja.rule( - "solipo", - description="SOLIPO $out, POSTBUILDS", - command=( - "rm -f $lib $lib.TOC && lipo -create $in -output $lib$postbuilds &&" - "%(extract_toc)s > $lib.TOC" - % { - "extract_toc": "{ otool -l $lib | grep LC_ID_DYLIB -A 5; " - "nm -gP $lib | cut -f1-2 -d' ' | grep -v U$$; true; }" - } - ), - ) - - # Record the public interface of $lib in $lib.TOC. See the corresponding - # comment in the posix section above for details. - solink_base = "$ld %(type)s $ldflags -o $lib %(suffix)s" - mtime_preserving_solink_base = ( - "if [ ! -e $lib -o ! -e $lib.TOC ] || " - # Always force dependent targets to relink if this library - # reexports something. Handling this correctly would require - # recursive TOC dumping but this is rare in practice, so punt. - "otool -l $lib | grep -q LC_REEXPORT_DYLIB ; then " - "%(solink)s && %(extract_toc)s > $lib.TOC; " - "else " - "%(solink)s && %(extract_toc)s > $lib.tmp && " - "if ! cmp -s $lib.tmp $lib.TOC; then " - "mv $lib.tmp $lib.TOC ; " - "fi; " - "fi" - % { - "solink": solink_base, - "extract_toc": "{ otool -l $lib | grep LC_ID_DYLIB -A 5; " - "nm -gP $lib | cut -f1-2 -d' ' | grep -v U$$; true; }", - } - ) - - solink_suffix = "@$link_file_list$postbuilds" - master_ninja.rule( - "solink", - description="SOLINK $lib, POSTBUILDS", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": solink_suffix, "type": "-shared"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - master_ninja.rule( - "solink_notoc", - description="SOLINK $lib, POSTBUILDS", - restat=True, - command=solink_base % {"suffix": solink_suffix, "type": "-shared"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - - master_ninja.rule( - "solink_module", - description="SOLINK(module) $lib, POSTBUILDS", - restat=True, - command=mtime_preserving_solink_base - % {"suffix": solink_suffix, "type": "-bundle"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - master_ninja.rule( - "solink_module_notoc", - description="SOLINK(module) $lib, POSTBUILDS", - restat=True, - command=solink_base % {"suffix": solink_suffix, "type": "-bundle"}, - rspfile="$link_file_list", - rspfile_content="$in $solibs $libs", - pool="link_pool", - ) - - master_ninja.rule( - "link", - description="LINK $out, POSTBUILDS", - command=("$ld $ldflags -o $out " "$in $solibs $libs$postbuilds"), - pool="link_pool", - ) - master_ninja.rule( - "preprocess_infoplist", - description="PREPROCESS INFOPLIST $out", - command=( - "$cc -E -P -Wno-trigraphs -x c $defines $in -o $out && " - "plutil -convert xml1 $out $out" - ), - ) - master_ninja.rule( - "copy_infoplist", - description="COPY INFOPLIST $in", - command="$env ./gyp-mac-tool copy-info-plist $in $out $binary $keys", - ) - master_ninja.rule( - "merge_infoplist", - description="MERGE INFOPLISTS $in", - command="$env ./gyp-mac-tool merge-info-plist $out $in", - ) - master_ninja.rule( - "compile_xcassets", - description="COMPILE XCASSETS $in", - command="$env ./gyp-mac-tool compile-xcassets $keys $in", - ) - master_ninja.rule( - "compile_ios_framework_headers", - description="COMPILE HEADER MAPS AND COPY FRAMEWORK HEADERS $in", - command="$env ./gyp-mac-tool compile-ios-framework-header-map $out " - "$framework $in && $env ./gyp-mac-tool " - "copy-ios-framework-headers $framework $copy_headers", - ) - master_ninja.rule( - "mac_tool", - description="MACTOOL $mactool_cmd $in", - command="$env ./gyp-mac-tool $mactool_cmd $in $out $binary", - ) - master_ninja.rule( - "package_framework", - description="PACKAGE FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-framework $out $version$postbuilds " - "&& touch $out", - ) - master_ninja.rule( - "package_ios_framework", - description="PACKAGE IOS FRAMEWORK $out, POSTBUILDS", - command="./gyp-mac-tool package-ios-framework $out $postbuilds " - "&& touch $out", - ) - if flavor == "win": - master_ninja.rule( - "stamp", - description="STAMP $out", - command="%s gyp-win-tool stamp $out" % sys.executable, - ) - else: - master_ninja.rule( - "stamp", description="STAMP $out", command="${postbuilds}touch $out" - ) - if flavor == "win": - master_ninja.rule( - "copy", - description="COPY $in $out", - command="%s gyp-win-tool recursive-mirror $in $out" % sys.executable, - ) - elif flavor == "zos": - master_ninja.rule( - "copy", - description="COPY $in $out", - command="rm -rf $out && cp -fRP $in $out", - ) - else: - master_ninja.rule( - "copy", - description="COPY $in $out", - command="ln -f $in $out 2>/dev/null || (rm -rf $out && cp -af $in $out)", - ) - master_ninja.newline() - - all_targets = set() - for build_file in params["build_files"]: - for target in gyp.common.AllTargets( - target_list, target_dicts, os.path.normpath(build_file) - ): - all_targets.add(target) - all_outputs = set() - - # target_outputs is a map from qualified target name to a Target object. - target_outputs = {} - # target_short_names is a map from target short name to a list of Target - # objects. - target_short_names = {} - - # short name of targets that were skipped because they didn't contain anything - # interesting. - # NOTE: there may be overlap between this an non_empty_target_names. - empty_target_names = set() - - # Set of non-empty short target names. - # NOTE: there may be overlap between this an empty_target_names. - non_empty_target_names = set() - - for qualified_target in target_list: - # qualified_target is like: third_party/icu/icu.gyp:icui18n#target - build_file, name, toolset = gyp.common.ParseQualifiedTarget(qualified_target) - - this_make_global_settings = data[build_file].get("make_global_settings", []) - assert make_global_settings == this_make_global_settings, ( - "make_global_settings needs to be the same for all targets. " - f"{this_make_global_settings} vs. {make_global_settings}" - ) - - spec = target_dicts[qualified_target] - if flavor == "mac": - gyp.xcode_emulation.MergeGlobalXcodeSettingsToSpec(data[build_file], spec) - - # If build_file is a symlink, we must not follow it because there's a chance - # it could point to a path above toplevel_dir, and we cannot correctly deal - # with that case at the moment. - build_file = gyp.common.RelativePath(build_file, options.toplevel_dir, False) - - qualified_target_for_hash = gyp.common.QualifiedTarget( - build_file, name, toolset - ) - qualified_target_for_hash = qualified_target_for_hash.encode("utf-8") - hash_for_rules = hashlib.md5(qualified_target_for_hash).hexdigest() - - base_path = os.path.dirname(build_file) - obj = "obj" - if toolset != "target": - obj += "." + toolset - output_file = os.path.join(obj, base_path, name + ".ninja") - - ninja_output = StringIO() - writer = NinjaWriter( - hash_for_rules, - target_outputs, - base_path, - build_dir, - ninja_output, - toplevel_build, - output_file, - flavor, - toplevel_dir=options.toplevel_dir, - ) - - target = writer.WriteSpec(spec, config_name, generator_flags) - - if ninja_output.tell() > 0: - # Only create files for ninja files that actually have contents. - with OpenOutput(os.path.join(toplevel_build, output_file)) as ninja_file: - ninja_file.write(ninja_output.getvalue()) - ninja_output.close() - master_ninja.subninja(output_file) - - if target: - if name != target.FinalOutput() and spec["toolset"] == "target": - target_short_names.setdefault(name, []).append(target) - target_outputs[qualified_target] = target - if qualified_target in all_targets: - all_outputs.add(target.FinalOutput()) - non_empty_target_names.add(name) - else: - empty_target_names.add(name) - - if target_short_names: - # Write a short name to build this target. This benefits both the - # "build chrome" case as well as the gyp tests, which expect to be - # able to run actions and build libraries by their short name. - master_ninja.newline() - master_ninja.comment("Short names for targets.") - for short_name in sorted(target_short_names): - master_ninja.build( - short_name, - "phony", - [x.FinalOutput() for x in target_short_names[short_name]], - ) - - # Write phony targets for any empty targets that weren't written yet. As - # short names are not necessarily unique only do this for short names that - # haven't already been output for another target. - empty_target_names = empty_target_names - non_empty_target_names - if empty_target_names: - master_ninja.newline() - master_ninja.comment("Empty targets (output for completeness).") - for name in sorted(empty_target_names): - master_ninja.build(name, "phony") - - if all_outputs: - master_ninja.newline() - master_ninja.build("all", "phony", sorted(all_outputs)) - master_ninja.default(generator_flags.get("default_target", "all")) - - master_ninja_file.close() - - -def PerformBuild(data, configurations, params): - options = params["options"] - for config in configurations: - builddir = os.path.join(options.toplevel_dir, "out", config) - arguments = ["ninja", "-C", builddir] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CallGenerateOutputForConfig(arglist): - # Ignore the interrupt signal so that the parent process catches it and - # kills all multiprocessing children. - signal.signal(signal.SIGINT, signal.SIG_IGN) - - (target_list, target_dicts, data, params, config_name) = arglist - GenerateOutputForConfig(target_list, target_dicts, data, params, config_name) - - -def GenerateOutput(target_list, target_dicts, data, params): - # Update target_dicts for iOS device builds. - target_dicts = gyp.xcode_emulation.CloneConfigurationForDeviceAndEmulator( - target_dicts - ) - - user_config = params.get("generator_flags", {}).get("config", None) - if gyp.common.GetFlavor(params) == "win": - target_list, target_dicts = MSVSUtil.ShardTargets(target_list, target_dicts) - target_list, target_dicts = MSVSUtil.InsertLargePdbShims( - target_list, target_dicts, generator_default_variables - ) - - if user_config: - GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) - else: - config_names = target_dicts[target_list[0]]["configurations"] - if params["parallel"]: - try: - pool = multiprocessing.Pool(len(config_names)) - arglists = [] - for config_name in config_names: - arglists.append( - (target_list, target_dicts, data, params, config_name) - ) - pool.map(CallGenerateOutputForConfig, arglists) - except KeyboardInterrupt as e: - pool.terminate() - raise e - else: - for config_name in config_names: - GenerateOutputForConfig( - target_list, target_dicts, data, params, config_name - ) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py deleted file mode 100644 index 7d18068..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the ninja.py file. """ - -import sys -import unittest - -import gyp.generator.ninja as ninja - - -class TestPrefixesAndSuffixes(unittest.TestCase): - def test_BinaryNamesWindows(self): - # These cannot run on non-Windows as they require a VS installation to - # correctly handle variable expansion. - if sys.platform.startswith("win"): - writer = ninja.NinjaWriter( - "foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "win" - ) - spec = {"target_name": "wee"} - self.assertTrue( - writer.ComputeOutputFileName(spec, "executable").endswith(".exe") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").endswith(".dll") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").endswith(".lib") - ) - - def test_BinaryNamesLinux(self): - writer = ninja.NinjaWriter( - "foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "linux" - ) - spec = {"target_name": "wee"} - self.assertTrue("." not in writer.ComputeOutputFileName(spec, "executable")) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").startswith("lib") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").startswith("lib") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "shared_library").endswith(".so") - ) - self.assertTrue( - writer.ComputeOutputFileName(spec, "static_library").endswith(".a") - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py deleted file mode 100644 index 1ac672c..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +++ /dev/null @@ -1,1391 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import filecmp -import gyp.common -import gyp.xcodeproj_file -import gyp.xcode_ninja -import errno -import os -import sys -import posixpath -import re -import shutil -import subprocess -import tempfile - - -# Project files generated by this module will use _intermediate_var as a -# custom Xcode setting whose value is a DerivedSources-like directory that's -# project-specific and configuration-specific. The normal choice, -# DERIVED_FILE_DIR, is target-specific, which is thought to be too restrictive -# as it is likely that multiple targets within a single project file will want -# to access the same set of generated files. The other option, -# PROJECT_DERIVED_FILE_DIR, is unsuitable because while it is project-specific, -# it is not configuration-specific. INTERMEDIATE_DIR is defined as -# $(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION). -_intermediate_var = "INTERMEDIATE_DIR" - -# SHARED_INTERMEDIATE_DIR is the same, except that it is shared among all -# targets that share the same BUILT_PRODUCTS_DIR. -_shared_intermediate_var = "SHARED_INTERMEDIATE_DIR" - -_library_search_paths_var = "LIBRARY_SEARCH_PATHS" - -generator_default_variables = { - "EXECUTABLE_PREFIX": "", - "EXECUTABLE_SUFFIX": "", - "STATIC_LIB_PREFIX": "lib", - "SHARED_LIB_PREFIX": "lib", - "STATIC_LIB_SUFFIX": ".a", - "SHARED_LIB_SUFFIX": ".dylib", - # INTERMEDIATE_DIR is a place for targets to build up intermediate products. - # It is specific to each build environment. It is only guaranteed to exist - # and be constant within the context of a project, corresponding to a single - # input file. Some build environments may allow their intermediate directory - # to be shared on a wider scale, but this is not guaranteed. - "INTERMEDIATE_DIR": "$(%s)" % _intermediate_var, - "OS": "mac", - "PRODUCT_DIR": "$(BUILT_PRODUCTS_DIR)", - "LIB_DIR": "$(BUILT_PRODUCTS_DIR)", - "RULE_INPUT_ROOT": "$(INPUT_FILE_BASE)", - "RULE_INPUT_EXT": "$(INPUT_FILE_SUFFIX)", - "RULE_INPUT_NAME": "$(INPUT_FILE_NAME)", - "RULE_INPUT_PATH": "$(INPUT_FILE_PATH)", - "RULE_INPUT_DIRNAME": "$(INPUT_FILE_DIRNAME)", - "SHARED_INTERMEDIATE_DIR": "$(%s)" % _shared_intermediate_var, - "CONFIGURATION_NAME": "$(CONFIGURATION)", -} - -# The Xcode-specific sections that hold paths. -generator_additional_path_sections = [ - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - # 'mac_framework_dirs', input already handles _dirs endings. -] - -# The Xcode-specific keys that exist on targets and aren't moved down to -# configurations. -generator_additional_non_configuration_keys = [ - "ios_app_extension", - "ios_watch_app", - "ios_watchkit_extension", - "mac_bundle", - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - "mac_xctest_bundle", - "mac_xcuitest_bundle", - "xcode_create_dependents_test_runner", -] - -# We want to let any rules apply to files that are resources also. -generator_extra_sources_for_rules = [ - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", -] - -generator_filelist_paths = None - -# Xcode's standard set of library directories, which don't need to be duplicated -# in LIBRARY_SEARCH_PATHS. This list is not exhaustive, but that's okay. -xcode_standard_library_dirs = frozenset( - ["$(SDKROOT)/usr/lib", "$(SDKROOT)/usr/local/lib"] -) - - -def CreateXCConfigurationList(configuration_names): - xccl = gyp.xcodeproj_file.XCConfigurationList({"buildConfigurations": []}) - if len(configuration_names) == 0: - configuration_names = ["Default"] - for configuration_name in configuration_names: - xcbc = gyp.xcodeproj_file.XCBuildConfiguration({"name": configuration_name}) - xccl.AppendProperty("buildConfigurations", xcbc) - xccl.SetProperty("defaultConfigurationName", configuration_names[0]) - return xccl - - -class XcodeProject: - def __init__(self, gyp_path, path, build_file_dict): - self.gyp_path = gyp_path - self.path = path - self.project = gyp.xcodeproj_file.PBXProject(path=path) - projectDirPath = gyp.common.RelativePath( - os.path.dirname(os.path.abspath(self.gyp_path)), - os.path.dirname(path) or ".", - ) - self.project.SetProperty("projectDirPath", projectDirPath) - self.project_file = gyp.xcodeproj_file.XCProjectFile( - {"rootObject": self.project} - ) - self.build_file_dict = build_file_dict - - # TODO(mark): add destructor that cleans up self.path if created_dir is - # True and things didn't complete successfully. Or do something even - # better with "try"? - self.created_dir = False - try: - os.makedirs(self.path) - self.created_dir = True - except OSError as e: - if e.errno != errno.EEXIST: - raise - - def Finalize1(self, xcode_targets, serialize_all_tests): - # Collect a list of all of the build configuration names used by the - # various targets in the file. It is very heavily advised to keep each - # target in an entire project (even across multiple project files) using - # the same set of configuration names. - configurations = [] - for xct in self.project.GetProperty("targets"): - xccl = xct.GetProperty("buildConfigurationList") - xcbcs = xccl.GetProperty("buildConfigurations") - for xcbc in xcbcs: - name = xcbc.GetProperty("name") - if name not in configurations: - configurations.append(name) - - # Replace the XCConfigurationList attached to the PBXProject object with - # a new one specifying all of the configuration names used by the various - # targets. - try: - xccl = CreateXCConfigurationList(configurations) - self.project.SetProperty("buildConfigurationList", xccl) - except Exception: - sys.stderr.write("Problem with gyp file %s\n" % self.gyp_path) - raise - - # The need for this setting is explained above where _intermediate_var is - # defined. The comments below about wanting to avoid project-wide build - # settings apply here too, but this needs to be set on a project-wide basis - # so that files relative to the _intermediate_var setting can be displayed - # properly in the Xcode UI. - # - # Note that for configuration-relative files such as anything relative to - # _intermediate_var, for the purposes of UI tree view display, Xcode will - # only resolve the configuration name once, when the project file is - # opened. If the active build configuration is changed, the project file - # must be closed and reopened if it is desired for the tree view to update. - # This is filed as Apple radar 6588391. - xccl.SetBuildSetting( - _intermediate_var, "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)" - ) - xccl.SetBuildSetting( - _shared_intermediate_var, "$(SYMROOT)/DerivedSources/$(CONFIGURATION)" - ) - - # Set user-specified project-wide build settings and config files. This - # is intended to be used very sparingly. Really, almost everything should - # go into target-specific build settings sections. The project-wide - # settings are only intended to be used in cases where Xcode attempts to - # resolve variable references in a project context as opposed to a target - # context, such as when resolving sourceTree references while building up - # the tree tree view for UI display. - # Any values set globally are applied to all configurations, then any - # per-configuration values are applied. - for xck, xcv in self.build_file_dict.get("xcode_settings", {}).items(): - xccl.SetBuildSetting(xck, xcv) - if "xcode_config_file" in self.build_file_dict: - config_ref = self.project.AddOrGetFileInRootGroup( - self.build_file_dict["xcode_config_file"] - ) - xccl.SetBaseConfiguration(config_ref) - build_file_configurations = self.build_file_dict.get("configurations", {}) - if build_file_configurations: - for config_name in configurations: - build_file_configuration_named = build_file_configurations.get( - config_name, {} - ) - if build_file_configuration_named: - xcc = xccl.ConfigurationNamed(config_name) - for xck, xcv in build_file_configuration_named.get( - "xcode_settings", {} - ).items(): - xcc.SetBuildSetting(xck, xcv) - if "xcode_config_file" in build_file_configuration_named: - config_ref = self.project.AddOrGetFileInRootGroup( - build_file_configurations[config_name]["xcode_config_file"] - ) - xcc.SetBaseConfiguration(config_ref) - - # Sort the targets based on how they appeared in the input. - # TODO(mark): Like a lot of other things here, this assumes internal - # knowledge of PBXProject - in this case, of its "targets" property. - - # ordinary_targets are ordinary targets that are already in the project - # file. run_test_targets are the targets that run unittests and should be - # used for the Run All Tests target. support_targets are the action/rule - # targets used by GYP file targets, just kept for the assert check. - ordinary_targets = [] - run_test_targets = [] - support_targets = [] - - # targets is full list of targets in the project. - targets = [] - - # does the it define it's own "all"? - has_custom_all = False - - # targets_for_all is the list of ordinary_targets that should be listed - # in this project's "All" target. It includes each non_runtest_target - # that does not have suppress_wildcard set. - targets_for_all = [] - - for target in self.build_file_dict["targets"]: - target_name = target["target_name"] - toolset = target["toolset"] - qualified_target = gyp.common.QualifiedTarget( - self.gyp_path, target_name, toolset - ) - xcode_target = xcode_targets[qualified_target] - # Make sure that the target being added to the sorted list is already in - # the unsorted list. - assert xcode_target in self.project._properties["targets"] - targets.append(xcode_target) - ordinary_targets.append(xcode_target) - if xcode_target.support_target: - support_targets.append(xcode_target.support_target) - targets.append(xcode_target.support_target) - - if not int(target.get("suppress_wildcard", False)): - targets_for_all.append(xcode_target) - - if target_name.lower() == "all": - has_custom_all = True - - # If this target has a 'run_as' attribute, add its target to the - # targets, and add it to the test targets. - if target.get("run_as"): - # Make a target to run something. It should have one - # dependency, the parent xcode target. - xccl = CreateXCConfigurationList(configurations) - run_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - "name": "Run " + target_name, - "productName": xcode_target.GetProperty("productName"), - "buildConfigurationList": xccl, - }, - parent=self.project, - ) - run_target.AddDependency(xcode_target) - - command = target["run_as"] - script = "" - if command.get("working_directory"): - script = ( - script - + 'cd "%s"\n' - % gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - command.get("working_directory") - ) - ) - - if command.get("environment"): - script = ( - script - + "\n".join( - [ - 'export %s="%s"' - % ( - key, - gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - val - ), - ) - for (key, val) in command.get("environment").items() - ] - ) - + "\n" - ) - - # Some test end up using sockets, files on disk, etc. and can get - # confused if more then one test runs at a time. The generator - # flag 'xcode_serialize_all_test_runs' controls the forcing of all - # tests serially. It defaults to True. To get serial runs this - # little bit of python does the same as the linux flock utility to - # make sure only one runs at a time. - command_prefix = "" - if serialize_all_tests: - command_prefix = """python -c "import fcntl, subprocess, sys -file = open('$TMPDIR/GYP_serialize_test_runs', 'a') -fcntl.flock(file.fileno(), fcntl.LOCK_EX) -sys.exit(subprocess.call(sys.argv[1:]))" """ - - # If we were unable to exec for some reason, we want to exit - # with an error, and fixup variable references to be shell - # syntax instead of xcode syntax. - script = ( - script - + "exec " - + command_prefix - + "%s\nexit 1\n" - % gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - gyp.common.EncodePOSIXShellList(command.get("action")) - ) - ) - - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - {"shellScript": script, "showEnvVarsInLog": 0} - ) - run_target.AppendProperty("buildPhases", ssbp) - - # Add the run target to the project file. - targets.append(run_target) - run_test_targets.append(run_target) - xcode_target.test_runner = run_target - - # Make sure that the list of targets being replaced is the same length as - # the one replacing it, but allow for the added test runner targets. - assert len(self.project._properties["targets"]) == len(ordinary_targets) + len( - support_targets - ) - - self.project._properties["targets"] = targets - - # Get rid of unnecessary levels of depth in groups like the Source group. - self.project.RootGroupsTakeOverOnlyChildren(True) - - # Sort the groups nicely. Do this after sorting the targets, because the - # Products group is sorted based on the order of the targets. - self.project.SortGroups() - - # Create an "All" target if there's more than one target in this project - # file and the project didn't define its own "All" target. Put a generated - # "All" target first so that people opening up the project for the first - # time will build everything by default. - if len(targets_for_all) > 1 and not has_custom_all: - xccl = CreateXCConfigurationList(configurations) - all_target = gyp.xcodeproj_file.PBXAggregateTarget( - {"buildConfigurationList": xccl, "name": "All"}, parent=self.project - ) - - for target in targets_for_all: - all_target.AddDependency(target) - - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._properties. It's important to get the "All" target first, - # though. - self.project._properties["targets"].insert(0, all_target) - - # The same, but for run_test_targets. - if len(run_test_targets) > 1: - xccl = CreateXCConfigurationList(configurations) - run_all_tests_target = gyp.xcodeproj_file.PBXAggregateTarget( - {"buildConfigurationList": xccl, "name": "Run All Tests"}, - parent=self.project, - ) - for run_test_target in run_test_targets: - run_all_tests_target.AddDependency(run_test_target) - - # Insert after the "All" target, which must exist if there is more than - # one run_test_target. - self.project._properties["targets"].insert(1, run_all_tests_target) - - def Finalize2(self, xcode_targets, xcode_target_to_target_dict): - # Finalize2 needs to happen in a separate step because the process of - # updating references to other projects depends on the ordering of targets - # within remote project files. Finalize1 is responsible for sorting duty, - # and once all project files are sorted, Finalize2 can come in and update - # these references. - - # To support making a "test runner" target that will run all the tests - # that are direct dependents of any given target, we look for - # xcode_create_dependents_test_runner being set on an Aggregate target, - # and generate a second target that will run the tests runners found under - # the marked target. - for bf_tgt in self.build_file_dict["targets"]: - if int(bf_tgt.get("xcode_create_dependents_test_runner", 0)): - tgt_name = bf_tgt["target_name"] - toolset = bf_tgt["toolset"] - qualified_target = gyp.common.QualifiedTarget( - self.gyp_path, tgt_name, toolset - ) - xcode_target = xcode_targets[qualified_target] - if isinstance(xcode_target, gyp.xcodeproj_file.PBXAggregateTarget): - # Collect all the run test targets. - all_run_tests = [] - pbxtds = xcode_target.GetProperty("dependencies") - for pbxtd in pbxtds: - pbxcip = pbxtd.GetProperty("targetProxy") - dependency_xct = pbxcip.GetProperty("remoteGlobalIDString") - if hasattr(dependency_xct, "test_runner"): - all_run_tests.append(dependency_xct.test_runner) - - # Directly depend on all the runners as they depend on the target - # that builds them. - if len(all_run_tests) > 0: - run_all_target = gyp.xcodeproj_file.PBXAggregateTarget( - { - "name": "Run %s Tests" % tgt_name, - "productName": tgt_name, - }, - parent=self.project, - ) - for run_test_target in all_run_tests: - run_all_target.AddDependency(run_test_target) - - # Insert the test runner after the related target. - idx = self.project._properties["targets"].index(xcode_target) - self.project._properties["targets"].insert( - idx + 1, run_all_target - ) - - # Update all references to other projects, to make sure that the lists of - # remote products are complete. Otherwise, Xcode will fill them in when - # it opens the project file, which will result in unnecessary diffs. - # TODO(mark): This is evil because it relies on internal knowledge of - # PBXProject._other_pbxprojects. - for other_pbxproject in self.project._other_pbxprojects: - self.project.AddOrGetProjectReference(other_pbxproject) - - self.project.SortRemoteProductReferences() - - # Give everything an ID. - self.project_file.ComputeIDs() - - # Make sure that no two objects in the project file have the same ID. If - # multiple objects wind up with the same ID, upon loading the file, Xcode - # will only recognize one object (the last one in the file?) and the - # results are unpredictable. - self.project_file.EnsureNoIDCollisions() - - def Write(self): - # Write the project file to a temporary location first. Xcode watches for - # changes to the project file and presents a UI sheet offering to reload - # the project when it does change. However, in some cases, especially when - # multiple projects are open or when Xcode is busy, things don't work so - # seamlessly. Sometimes, Xcode is able to detect that a project file has - # changed but can't unload it because something else is referencing it. - # To mitigate this problem, and to avoid even having Xcode present the UI - # sheet when an open project is rewritten for inconsequential changes, the - # project file is written to a temporary file in the xcodeproj directory - # first. The new temporary file is then compared to the existing project - # file, if any. If they differ, the new file replaces the old; otherwise, - # the new project file is simply deleted. Xcode properly detects a file - # being renamed over an open project file as a change and so it remains - # able to present the "project file changed" sheet under this system. - # Writing to a temporary file first also avoids the possible problem of - # Xcode rereading an incomplete project file. - (output_fd, new_pbxproj_path) = tempfile.mkstemp( - suffix=".tmp", prefix="project.pbxproj.gyp.", dir=self.path - ) - - try: - output_file = os.fdopen(output_fd, "w") - - self.project_file.Print(output_file) - output_file.close() - - pbxproj_path = os.path.join(self.path, "project.pbxproj") - - same = False - try: - same = filecmp.cmp(pbxproj_path, new_pbxproj_path, False) - except OSError as e: - if e.errno != errno.ENOENT: - raise - - if same: - # The new file is identical to the old one, just get rid of the new - # one. - os.unlink(new_pbxproj_path) - else: - # The new file is different from the old one, or there is no old one. - # Rename the new file to the permanent name. - # - # tempfile.mkstemp uses an overly restrictive mode, resulting in a - # file that can only be read by the owner, regardless of the umask. - # There's no reason to not respect the umask here, which means that - # an extra hoop is required to fetch it and reset the new file's mode. - # - # No way to get the umask without setting a new one? Set a safe one - # and then set it back to the old value. - umask = os.umask(0o77) - os.umask(umask) - - os.chmod(new_pbxproj_path, 0o666 & ~umask) - os.rename(new_pbxproj_path, pbxproj_path) - - except Exception: - # Don't leave turds behind. In fact, if this code was responsible for - # creating the xcodeproj directory, get rid of that too. - os.unlink(new_pbxproj_path) - if self.created_dir: - shutil.rmtree(self.path, True) - raise - - -def AddSourceToTarget(source, type, pbxp, xct): - # TODO(mark): Perhaps source_extensions and library_extensions can be made a - # little bit fancier. - source_extensions = ["c", "cc", "cpp", "cxx", "m", "mm", "s", "swift"] - - # .o is conceptually more of a "source" than a "library," but Xcode thinks - # of "sources" as things to compile and "libraries" (or "frameworks") as - # things to link with. Adding an object file to an Xcode target's frameworks - # phase works properly. - library_extensions = ["a", "dylib", "framework", "o"] - - basename = posixpath.basename(source) - (root, ext) = posixpath.splitext(basename) - if ext: - ext = ext[1:].lower() - - if ext in source_extensions and type != "none": - xct.SourcesPhase().AddFile(source) - elif ext in library_extensions and type != "none": - xct.FrameworksPhase().AddFile(source) - else: - # Files that aren't added to a sources or frameworks build phase can still - # go into the project file, just not as part of a build phase. - pbxp.AddOrGetFileInRootGroup(source) - - -def AddResourceToTarget(resource, pbxp, xct): - # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call - # where it's used. - xct.ResourcesPhase().AddFile(resource) - - -def AddHeaderToTarget(header, pbxp, xct, is_public): - # TODO(mark): Combine with AddSourceToTarget above? Or just inline this call - # where it's used. - settings = "{ATTRIBUTES = (%s, ); }" % ("Private", "Public")[is_public] - xct.HeadersPhase().AddFile(header, settings) - - -_xcode_variable_re = re.compile(r"(\$\((.*?)\))") - - -def ExpandXcodeVariables(string, expansions): - """Expands Xcode-style $(VARIABLES) in string per the expansions dict. - - In some rare cases, it is appropriate to expand Xcode variables when a - project file is generated. For any substring $(VAR) in string, if VAR is a - key in the expansions dict, $(VAR) will be replaced with expansions[VAR]. - Any $(VAR) substring in string for which VAR is not a key in the expansions - dict will remain in the returned string. - """ - - matches = _xcode_variable_re.findall(string) - if matches is None: - return string - - matches.reverse() - for match in matches: - (to_replace, variable) = match - if variable not in expansions: - continue - - replacement = expansions[variable] - string = re.sub(re.escape(to_replace), replacement, string) - - return string - - -_xcode_define_re = re.compile(r"([\\\"\' ])") - - -def EscapeXcodeDefine(s): - """We must escape the defines that we give to XCode so that it knows not to - split on spaces and to respect backslash and quote literals. However, we - must not quote the define, or Xcode will incorrectly interpret variables - especially $(inherited).""" - return re.sub(_xcode_define_re, r"\\\1", s) - - -def PerformBuild(data, configurations, params): - options = params["options"] - - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - xcodeproj_path = build_file_root + options.suffix + ".xcodeproj" - if options.generator_output: - xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) - - for config in configurations: - arguments = ["xcodebuild", "-project", xcodeproj_path] - arguments += ["-configuration", config] - print(f"Building [{config}]: {arguments}") - subprocess.check_call(arguments) - - -def CalculateGeneratorInputInfo(params): - toplevel = params["options"].toplevel_dir - if params.get("flavor") == "ninja": - generator_dir = os.path.relpath(params["options"].generator_output or ".") - output_dir = params.get("generator_flags", {}).get("output_dir", "out") - output_dir = os.path.normpath(os.path.join(generator_dir, output_dir)) - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, output_dir, "gypfiles-xcode-ninja") - ) - else: - output_dir = os.path.normpath(os.path.join(toplevel, "xcodebuild")) - qualified_out_dir = os.path.normpath( - os.path.join(toplevel, output_dir, "gypfiles") - ) - - global generator_filelist_paths - generator_filelist_paths = { - "toplevel": toplevel, - "qualified_out_dir": qualified_out_dir, - } - - -def GenerateOutput(target_list, target_dicts, data, params): - # Optionally configure each spec to use ninja as the external builder. - ninja_wrapper = params.get("flavor") == "ninja" - if ninja_wrapper: - (target_list, target_dicts, data) = gyp.xcode_ninja.CreateWrapper( - target_list, target_dicts, data, params - ) - - options = params["options"] - generator_flags = params.get("generator_flags", {}) - parallel_builds = generator_flags.get("xcode_parallel_builds", True) - serialize_all_tests = generator_flags.get("xcode_serialize_all_test_runs", True) - upgrade_check_project_version = generator_flags.get( - "xcode_upgrade_check_project_version", None - ) - - # Format upgrade_check_project_version with leading zeros as needed. - if upgrade_check_project_version: - upgrade_check_project_version = str(upgrade_check_project_version) - while len(upgrade_check_project_version) < 4: - upgrade_check_project_version = "0" + upgrade_check_project_version - - skip_excluded_files = not generator_flags.get("xcode_list_excluded_files", True) - xcode_projects = {} - for build_file, build_file_dict in data.items(): - (build_file_root, build_file_ext) = os.path.splitext(build_file) - if build_file_ext != ".gyp": - continue - xcodeproj_path = build_file_root + options.suffix + ".xcodeproj" - if options.generator_output: - xcodeproj_path = os.path.join(options.generator_output, xcodeproj_path) - xcp = XcodeProject(build_file, xcodeproj_path, build_file_dict) - xcode_projects[build_file] = xcp - pbxp = xcp.project - - # Set project-level attributes from multiple options - project_attributes = {} - if parallel_builds: - project_attributes["BuildIndependentTargetsInParallel"] = "YES" - if upgrade_check_project_version: - project_attributes["LastUpgradeCheck"] = upgrade_check_project_version - project_attributes[ - "LastTestingUpgradeCheck" - ] = upgrade_check_project_version - project_attributes["LastSwiftUpdateCheck"] = upgrade_check_project_version - pbxp.SetProperty("attributes", project_attributes) - - # Add gyp/gypi files to project - if not generator_flags.get("standalone"): - main_group = pbxp.GetProperty("mainGroup") - build_group = gyp.xcodeproj_file.PBXGroup({"name": "Build"}) - main_group.AppendChild(build_group) - for included_file in build_file_dict["included_files"]: - build_group.AddOrGetFileByPath(included_file, False) - - xcode_targets = {} - xcode_target_to_target_dict = {} - for qualified_target in target_list: - [build_file, target_name, toolset] = gyp.common.ParseQualifiedTarget( - qualified_target - ) - - spec = target_dicts[qualified_target] - if spec["toolset"] != "target": - raise Exception( - "Multiple toolsets not supported in xcode build (target %s)" - % qualified_target - ) - configuration_names = [spec["default_configuration"]] - for configuration_name in sorted(spec["configurations"].keys()): - if configuration_name not in configuration_names: - configuration_names.append(configuration_name) - xcp = xcode_projects[build_file] - pbxp = xcp.project - - # Set up the configurations for the target according to the list of names - # supplied. - xccl = CreateXCConfigurationList(configuration_names) - - # Create an XCTarget subclass object for the target. The type with - # "+bundle" appended will be used if the target has "mac_bundle" set. - # loadable_modules not in a mac_bundle are mapped to - # com.googlecode.gyp.xcode.bundle, a pseudo-type that xcode.py interprets - # to create a single-file mh_bundle. - _types = { - "executable": "com.apple.product-type.tool", - "loadable_module": "com.googlecode.gyp.xcode.bundle", - "shared_library": "com.apple.product-type.library.dynamic", - "static_library": "com.apple.product-type.library.static", - "mac_kernel_extension": "com.apple.product-type.kernel-extension", - "executable+bundle": "com.apple.product-type.application", - "loadable_module+bundle": "com.apple.product-type.bundle", - "loadable_module+xctest": "com.apple.product-type.bundle.unit-test", - "loadable_module+xcuitest": "com.apple.product-type.bundle.ui-testing", - "shared_library+bundle": "com.apple.product-type.framework", - "executable+extension+bundle": "com.apple.product-type.app-extension", - "executable+watch+extension+bundle": - "com.apple.product-type.watchkit-extension", - "executable+watch+bundle": "com.apple.product-type.application.watchapp", - "mac_kernel_extension+bundle": "com.apple.product-type.kernel-extension", - } - - target_properties = { - "buildConfigurationList": xccl, - "name": target_name, - } - - type = spec["type"] - is_xctest = int(spec.get("mac_xctest_bundle", 0)) - is_xcuitest = int(spec.get("mac_xcuitest_bundle", 0)) - is_bundle = int(spec.get("mac_bundle", 0)) or is_xctest - is_app_extension = int(spec.get("ios_app_extension", 0)) - is_watchkit_extension = int(spec.get("ios_watchkit_extension", 0)) - is_watch_app = int(spec.get("ios_watch_app", 0)) - if type != "none": - type_bundle_key = type - if is_xcuitest: - type_bundle_key += "+xcuitest" - assert type == "loadable_module", ( - "mac_xcuitest_bundle targets must have type loadable_module " - "(target %s)" % target_name - ) - elif is_xctest: - type_bundle_key += "+xctest" - assert type == "loadable_module", ( - "mac_xctest_bundle targets must have type loadable_module " - "(target %s)" % target_name - ) - elif is_app_extension: - assert is_bundle, ( - "ios_app_extension flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+extension+bundle" - elif is_watchkit_extension: - assert is_bundle, ( - "ios_watchkit_extension flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+watch+extension+bundle" - elif is_watch_app: - assert is_bundle, ( - "ios_watch_app flag requires mac_bundle " - "(target %s)" % target_name - ) - type_bundle_key += "+watch+bundle" - elif is_bundle: - type_bundle_key += "+bundle" - - xctarget_type = gyp.xcodeproj_file.PBXNativeTarget - try: - target_properties["productType"] = _types[type_bundle_key] - except KeyError as e: - gyp.common.ExceptionAppend( - e, - "-- unknown product type while " "writing target %s" % target_name, - ) - raise - else: - xctarget_type = gyp.xcodeproj_file.PBXAggregateTarget - assert not is_bundle, ( - 'mac_bundle targets cannot have type none (target "%s")' % target_name - ) - assert not is_xcuitest, ( - 'mac_xcuitest_bundle targets cannot have type none (target "%s")' - % target_name - ) - assert not is_xctest, ( - 'mac_xctest_bundle targets cannot have type none (target "%s")' - % target_name - ) - - target_product_name = spec.get("product_name") - if target_product_name is not None: - target_properties["productName"] = target_product_name - - xct = xctarget_type( - target_properties, - parent=pbxp, - force_outdir=spec.get("product_dir"), - force_prefix=spec.get("product_prefix"), - force_extension=spec.get("product_extension"), - ) - pbxp.AppendProperty("targets", xct) - xcode_targets[qualified_target] = xct - xcode_target_to_target_dict[xct] = spec - - spec_actions = spec.get("actions", []) - spec_rules = spec.get("rules", []) - - # Xcode has some "issues" with checking dependencies for the "Compile - # sources" step with any source files/headers generated by actions/rules. - # To work around this, if a target is building anything directly (not - # type "none"), then a second target is used to run the GYP actions/rules - # and is made a dependency of this target. This way the work is done - # before the dependency checks for what should be recompiled. - support_xct = None - # The Xcode "issues" don't affect xcode-ninja builds, since the dependency - # logic all happens in ninja. Don't bother creating the extra targets in - # that case. - if type != "none" and (spec_actions or spec_rules) and not ninja_wrapper: - support_xccl = CreateXCConfigurationList(configuration_names) - support_target_suffix = generator_flags.get( - "support_target_suffix", " Support" - ) - support_target_properties = { - "buildConfigurationList": support_xccl, - "name": target_name + support_target_suffix, - } - if target_product_name: - support_target_properties["productName"] = ( - target_product_name + " Support" - ) - support_xct = gyp.xcodeproj_file.PBXAggregateTarget( - support_target_properties, parent=pbxp - ) - pbxp.AppendProperty("targets", support_xct) - xct.AddDependency(support_xct) - # Hang the support target off the main target so it can be tested/found - # by the generator during Finalize. - xct.support_target = support_xct - - prebuild_index = 0 - - # Add custom shell script phases for "actions" sections. - for action in spec_actions: - # There's no need to write anything into the script to ensure that the - # output directories already exist, because Xcode will look at the - # declared outputs and automatically ensure that they exist for us. - - # Do we have a message to print when this action runs? - message = action.get("message") - if message: - message = "echo note: " + gyp.common.EncodePOSIXShellArgument(message) - else: - message = "" - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(action["action"]) - - # Convert Xcode-type variable references to sh-compatible environment - # variable references. - message_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax(message) - action_string_sh = gyp.xcodeproj_file.ConvertVariablesToShellSyntax( - action_string - ) - - script = "" - # Include the optional message - if message_sh: - script += message_sh + "\n" - # Be sure the script runs in exec, and that if exec fails, the script - # exits signalling an error. - script += "exec " + action_string_sh + "\nexit 1\n" - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "inputPaths": action["inputs"], - "name": 'Action "' + action["action_name"] + '"', - "outputPaths": action["outputs"], - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - - if support_xct: - support_xct.AppendProperty("buildPhases", ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move into xcodeproj_file - # itself. - xct._properties["buildPhases"].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # TODO(mark): Should verify that at most one of these is specified. - if int(action.get("process_outputs_as_sources", False)): - for output in action["outputs"]: - AddSourceToTarget(output, type, pbxp, xct) - - if int(action.get("process_outputs_as_mac_bundle_resources", False)): - for output in action["outputs"]: - AddResourceToTarget(output, pbxp, xct) - - # tgt_mac_bundle_resources holds the list of bundle resources so - # the rule processing can check against it. - if is_bundle: - tgt_mac_bundle_resources = spec.get("mac_bundle_resources", []) - else: - tgt_mac_bundle_resources = [] - - # Add custom shell script phases driving "make" for "rules" sections. - # - # Xcode's built-in rule support is almost powerful enough to use directly, - # but there are a few significant deficiencies that render them unusable. - # There are workarounds for some of its inadequacies, but in aggregate, - # the workarounds added complexity to the generator, and some workarounds - # actually require input files to be crafted more carefully than I'd like. - # Consequently, until Xcode rules are made more capable, "rules" input - # sections will be handled in Xcode output by shell script build phases - # performed prior to the compilation phase. - # - # The following problems with Xcode rules were found. The numbers are - # Apple radar IDs. I hope that these shortcomings are addressed, I really - # liked having the rules handled directly in Xcode during the period that - # I was prototyping this. - # - # 6588600 Xcode compiles custom script rule outputs too soon, compilation - # fails. This occurs when rule outputs from distinct inputs are - # interdependent. The only workaround is to put rules and their - # inputs in a separate target from the one that compiles the rule - # outputs. This requires input file cooperation and it means that - # process_outputs_as_sources is unusable. - # 6584932 Need to declare that custom rule outputs should be excluded from - # compilation. A possible workaround is to lie to Xcode about a - # rule's output, giving it a dummy file it doesn't know how to - # compile. The rule action script would need to touch the dummy. - # 6584839 I need a way to declare additional inputs to a custom rule. - # A possible workaround is a shell script phase prior to - # compilation that touches a rule's primary input files if any - # would-be additional inputs are newer than the output. Modifying - # the source tree - even just modification times - feels dirty. - # 6564240 Xcode "custom script" build rules always dump all environment - # variables. This is a low-prioroty problem and is not a - # show-stopper. - rules_by_ext = {} - for rule in spec_rules: - rules_by_ext[rule["extension"]] = rule - - # First, some definitions: - # - # A "rule source" is a file that was listed in a target's "sources" - # list and will have a rule applied to it on the basis of matching the - # rule's "extensions" attribute. Rule sources are direct inputs to - # rules. - # - # Rule definitions may specify additional inputs in their "inputs" - # attribute. These additional inputs are used for dependency tracking - # purposes. - # - # A "concrete output" is a rule output with input-dependent variables - # resolved. For example, given a rule with: - # 'extension': 'ext', 'outputs': ['$(INPUT_FILE_BASE).cc'], - # if the target's "sources" list contained "one.ext" and "two.ext", - # the "concrete output" for rule input "two.ext" would be "two.cc". If - # a rule specifies multiple outputs, each input file that the rule is - # applied to will have the same number of concrete outputs. - # - # If any concrete outputs are outdated or missing relative to their - # corresponding rule_source or to any specified additional input, the - # rule action must be performed to generate the concrete outputs. - - # concrete_outputs_by_rule_source will have an item at the same index - # as the rule['rule_sources'] that it corresponds to. Each item is a - # list of all of the concrete outputs for the rule_source. - concrete_outputs_by_rule_source = [] - - # concrete_outputs_all is a flat list of all concrete outputs that this - # rule is able to produce, given the known set of input files - # (rule_sources) that apply to it. - concrete_outputs_all = [] - - # messages & actions are keyed by the same indices as rule['rule_sources'] - # and concrete_outputs_by_rule_source. They contain the message and - # action to perform after resolving input-dependent variables. The - # message is optional, in which case None is stored for each rule source. - messages = [] - actions = [] - - for rule_source in rule.get("rule_sources", []): - rule_source_dirname, rule_source_basename = posixpath.split(rule_source) - (rule_source_root, rule_source_ext) = posixpath.splitext( - rule_source_basename - ) - - # These are the same variable names that Xcode uses for its own native - # rule support. Because Xcode's rule engine is not being used, they - # need to be expanded as they are written to the makefile. - rule_input_dict = { - "INPUT_FILE_BASE": rule_source_root, - "INPUT_FILE_SUFFIX": rule_source_ext, - "INPUT_FILE_NAME": rule_source_basename, - "INPUT_FILE_PATH": rule_source, - "INPUT_FILE_DIRNAME": rule_source_dirname, - } - - concrete_outputs_for_this_rule_source = [] - for output in rule.get("outputs", []): - # Fortunately, Xcode and make both use $(VAR) format for their - # variables, so the expansion is the only transformation necessary. - # Any remaining $(VAR)-type variables in the string can be given - # directly to make, which will pick up the correct settings from - # what Xcode puts into the environment. - concrete_output = ExpandXcodeVariables(output, rule_input_dict) - concrete_outputs_for_this_rule_source.append(concrete_output) - - # Add all concrete outputs to the project. - pbxp.AddOrGetFileInRootGroup(concrete_output) - - concrete_outputs_by_rule_source.append( - concrete_outputs_for_this_rule_source - ) - concrete_outputs_all.extend(concrete_outputs_for_this_rule_source) - - # TODO(mark): Should verify that at most one of these is specified. - if int(rule.get("process_outputs_as_sources", False)): - for output in concrete_outputs_for_this_rule_source: - AddSourceToTarget(output, type, pbxp, xct) - - # If the file came from the mac_bundle_resources list or if the rule - # is marked to process outputs as bundle resource, do so. - was_mac_bundle_resource = rule_source in tgt_mac_bundle_resources - if was_mac_bundle_resource or int( - rule.get("process_outputs_as_mac_bundle_resources", False) - ): - for output in concrete_outputs_for_this_rule_source: - AddResourceToTarget(output, pbxp, xct) - - # Do we have a message to print when this rule runs? - message = rule.get("message") - if message: - message = gyp.common.EncodePOSIXShellArgument(message) - message = ExpandXcodeVariables(message, rule_input_dict) - messages.append(message) - - # Turn the list into a string that can be passed to a shell. - action_string = gyp.common.EncodePOSIXShellList(rule["action"]) - - action = ExpandXcodeVariables(action_string, rule_input_dict) - actions.append(action) - - if len(concrete_outputs_all) > 0: - # TODO(mark): There's a possibility for collision here. Consider - # target "t" rule "A_r" and target "t_A" rule "r". - makefile_name = "%s.make" % re.sub( - "[^a-zA-Z0-9_]", "_", "{}_{}".format(target_name, rule["rule_name"]) - ) - makefile_path = os.path.join( - xcode_projects[build_file].path, makefile_name - ) - # TODO(mark): try/close? Write to a temporary file and swap it only - # if it's got changes? - makefile = open(makefile_path, "w") - - # make will build the first target in the makefile by default. By - # convention, it's called "all". List all (or at least one) - # concrete output for each rule source as a prerequisite of the "all" - # target. - makefile.write("all: \\\n") - for concrete_output_index, concrete_output_by_rule_source in enumerate( - concrete_outputs_by_rule_source - ): - # Only list the first (index [0]) concrete output of each input - # in the "all" target. Otherwise, a parallel make (-j > 1) would - # attempt to process each input multiple times simultaneously. - # Otherwise, "all" could just contain the entire list of - # concrete_outputs_all. - concrete_output = concrete_output_by_rule_source[0] - if ( - concrete_output_index - == len(concrete_outputs_by_rule_source) - 1 - ): - eol = "" - else: - eol = " \\" - makefile.write(f" {concrete_output}{eol}\n") - - for (rule_source, concrete_outputs, message, action) in zip( - rule["rule_sources"], - concrete_outputs_by_rule_source, - messages, - actions, - ): - makefile.write("\n") - - # Add a rule that declares it can build each concrete output of a - # rule source. Collect the names of the directories that are - # required. - concrete_output_dirs = [] - for concrete_output_index, concrete_output in enumerate( - concrete_outputs - ): - bol = "" if concrete_output_index == 0 else " " - makefile.write(f"{bol}{concrete_output} \\\n") - - concrete_output_dir = posixpath.dirname(concrete_output) - if ( - concrete_output_dir - and concrete_output_dir not in concrete_output_dirs - ): - concrete_output_dirs.append(concrete_output_dir) - - makefile.write(" : \\\n") - - # The prerequisites for this rule are the rule source itself and - # the set of additional rule inputs, if any. - prerequisites = [rule_source] - prerequisites.extend(rule.get("inputs", [])) - for prerequisite_index, prerequisite in enumerate(prerequisites): - if prerequisite_index == len(prerequisites) - 1: - eol = "" - else: - eol = " \\" - makefile.write(f" {prerequisite}{eol}\n") - - # Make sure that output directories exist before executing the rule - # action. - if len(concrete_output_dirs) > 0: - makefile.write( - '\t@mkdir -p "%s"\n' % '" "'.join(concrete_output_dirs) - ) - - # The rule message and action have already had - # the necessary variable substitutions performed. - if message: - # Mark it with note: so Xcode picks it up in build output. - makefile.write("\t@echo note: %s\n" % message) - makefile.write("\t%s\n" % action) - - makefile.close() - - # It might be nice to ensure that needed output directories exist - # here rather than in each target in the Makefile, but that wouldn't - # work if there ever was a concrete output that had an input-dependent - # variable anywhere other than in the leaf position. - - # Don't declare any inputPaths or outputPaths. If they're present, - # Xcode will provide a slight optimization by only running the script - # phase if any output is missing or outdated relative to any input. - # Unfortunately, it will also assume that all outputs are touched by - # the script, and if the outputs serve as files in a compilation - # phase, they will be unconditionally rebuilt. Since make might not - # rebuild everything that could be declared here as an output, this - # extra compilation activity is unnecessary. With inputPaths and - # outputPaths not supplied, make will always be called, but it knows - # enough to not do anything when everything is up-to-date. - - # To help speed things up, pass -j COUNT to make so it does some work - # in parallel. Don't use ncpus because Xcode will build ncpus targets - # in parallel and if each target happens to have a rules step, there - # would be ncpus^2 things going. With a machine that has 2 quad-core - # Xeons, a build can quickly run out of processes based on - # scheduling/other tasks, and randomly failing builds are no good. - script = ( - """JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)" -if [ "${JOB_COUNT}" -gt 4 ]; then - JOB_COUNT=4 -fi -exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" -exit 1 -""" - % makefile_name - ) - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "name": 'Rule "' + rule["rule_name"] + '"', - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - - if support_xct: - support_xct.AppendProperty("buildPhases", ssbp) - else: - # TODO(mark): this assumes too much knowledge of the internals of - # xcodeproj_file; some of these smarts should move - # into xcodeproj_file itself. - xct._properties["buildPhases"].insert(prebuild_index, ssbp) - prebuild_index = prebuild_index + 1 - - # Extra rule inputs also go into the project file. Concrete outputs were - # already added when they were computed. - groups = ["inputs", "inputs_excluded"] - if skip_excluded_files: - groups = [x for x in groups if not x.endswith("_excluded")] - for group in groups: - for item in rule.get(group, []): - pbxp.AddOrGetFileInRootGroup(item) - - # Add "sources". - for source in spec.get("sources", []): - (source_root, source_extension) = posixpath.splitext(source) - if source_extension[1:] not in rules_by_ext: - # AddSourceToTarget will add the file to a root group if it's not - # already there. - AddSourceToTarget(source, type, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(source) - - # Add "mac_bundle_resources" and "mac_framework_private_headers" if - # it's a bundle of any type. - if is_bundle: - for resource in tgt_mac_bundle_resources: - (resource_root, resource_extension) = posixpath.splitext(resource) - if resource_extension[1:] not in rules_by_ext: - AddResourceToTarget(resource, pbxp, xct) - else: - pbxp.AddOrGetFileInRootGroup(resource) - - for header in spec.get("mac_framework_private_headers", []): - AddHeaderToTarget(header, pbxp, xct, False) - - # Add "mac_framework_headers". These can be valid for both frameworks - # and static libraries. - if is_bundle or type == "static_library": - for header in spec.get("mac_framework_headers", []): - AddHeaderToTarget(header, pbxp, xct, True) - - # Add "copies". - pbxcp_dict = {} - for copy_group in spec.get("copies", []): - dest = copy_group["destination"] - if dest[0] not in ("/", "$"): - # Relative paths are relative to $(SRCROOT). - dest = "$(SRCROOT)/" + dest - - code_sign = int(copy_group.get("xcode_code_sign", 0)) - settings = (None, "{ATTRIBUTES = (CodeSignOnCopy, ); }")[code_sign] - - # Coalesce multiple "copies" sections in the same target with the same - # "destination" property into the same PBXCopyFilesBuildPhase, otherwise - # they'll wind up with ID collisions. - pbxcp = pbxcp_dict.get(dest, None) - if pbxcp is None: - pbxcp = gyp.xcodeproj_file.PBXCopyFilesBuildPhase( - {"name": "Copy to " + copy_group["destination"]}, parent=xct - ) - pbxcp.SetDestination(dest) - - # TODO(mark): The usual comment about this knowing too much about - # gyp.xcodeproj_file internals applies. - xct._properties["buildPhases"].insert(prebuild_index, pbxcp) - - pbxcp_dict[dest] = pbxcp - - for file in copy_group["files"]: - pbxcp.AddFile(file, settings) - - # Excluded files can also go into the project file. - if not skip_excluded_files: - for key in [ - "sources", - "mac_bundle_resources", - "mac_framework_headers", - "mac_framework_private_headers", - ]: - excluded_key = key + "_excluded" - for item in spec.get(excluded_key, []): - pbxp.AddOrGetFileInRootGroup(item) - - # So can "inputs" and "outputs" sections of "actions" groups. - groups = ["inputs", "inputs_excluded", "outputs", "outputs_excluded"] - if skip_excluded_files: - groups = [x for x in groups if not x.endswith("_excluded")] - for action in spec.get("actions", []): - for group in groups: - for item in action.get(group, []): - # Exclude anything in BUILT_PRODUCTS_DIR. They're products, not - # sources. - if not item.startswith("$(BUILT_PRODUCTS_DIR)/"): - pbxp.AddOrGetFileInRootGroup(item) - - for postbuild in spec.get("postbuilds", []): - action_string_sh = gyp.common.EncodePOSIXShellList(postbuild["action"]) - script = "exec " + action_string_sh + "\nexit 1\n" - - # Make the postbuild step depend on the output of ld or ar from this - # target. Apparently putting the script step after the link step isn't - # sufficient to ensure proper ordering in all cases. With an input - # declared but no outputs, the script step should run every time, as - # desired. - ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase( - { - "inputPaths": ["$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)"], - "name": 'Postbuild "' + postbuild["postbuild_name"] + '"', - "shellScript": script, - "showEnvVarsInLog": 0, - } - ) - xct.AppendProperty("buildPhases", ssbp) - - # Add dependencies before libraries, because adding a dependency may imply - # adding a library. It's preferable to keep dependencies listed first - # during a link phase so that they can override symbols that would - # otherwise be provided by libraries, which will usually include system - # libraries. On some systems, ld is finicky and even requires the - # libraries to be ordered in such a way that unresolved symbols in - # earlier-listed libraries may only be resolved by later-listed libraries. - # The Mac linker doesn't work that way, but other platforms do, and so - # their linker invocations need to be constructed in this way. There's - # no compelling reason for Xcode's linker invocations to differ. - - if "dependencies" in spec: - for dependency in spec["dependencies"]: - xct.AddDependency(xcode_targets[dependency]) - # The support project also gets the dependencies (in case they are - # needed for the actions/rules to work). - if support_xct: - support_xct.AddDependency(xcode_targets[dependency]) - - if "libraries" in spec: - for library in spec["libraries"]: - xct.FrameworksPhase().AddFile(library) - # Add the library's directory to LIBRARY_SEARCH_PATHS if necessary. - # I wish Xcode handled this automatically. - library_dir = posixpath.dirname(library) - if library_dir not in xcode_standard_library_dirs and ( - not xct.HasBuildSetting(_library_search_paths_var) - or library_dir not in xct.GetBuildSetting(_library_search_paths_var) - ): - xct.AppendBuildSetting(_library_search_paths_var, library_dir) - - for configuration_name in configuration_names: - configuration = spec["configurations"][configuration_name] - xcbc = xct.ConfigurationNamed(configuration_name) - for include_dir in configuration.get("mac_framework_dirs", []): - xcbc.AppendBuildSetting("FRAMEWORK_SEARCH_PATHS", include_dir) - for include_dir in configuration.get("include_dirs", []): - xcbc.AppendBuildSetting("HEADER_SEARCH_PATHS", include_dir) - for library_dir in configuration.get("library_dirs", []): - if library_dir not in xcode_standard_library_dirs and ( - not xcbc.HasBuildSetting(_library_search_paths_var) - or library_dir - not in xcbc.GetBuildSetting(_library_search_paths_var) - ): - xcbc.AppendBuildSetting(_library_search_paths_var, library_dir) - - if "defines" in configuration: - for define in configuration["defines"]: - set_define = EscapeXcodeDefine(define) - xcbc.AppendBuildSetting("GCC_PREPROCESSOR_DEFINITIONS", set_define) - if "xcode_settings" in configuration: - for xck, xcv in configuration["xcode_settings"].items(): - xcbc.SetBuildSetting(xck, xcv) - if "xcode_config_file" in configuration: - config_ref = pbxp.AddOrGetFileInRootGroup( - configuration["xcode_config_file"] - ) - xcbc.SetBaseConfiguration(config_ref) - - build_files = [] - for build_file, build_file_dict in data.items(): - if build_file.endswith(".gyp"): - build_files.append(build_file) - - for build_file in build_files: - xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) - - for build_file in build_files: - xcode_projects[build_file].Finalize2(xcode_targets, xcode_target_to_target_dict) - - for build_file in build_files: - xcode_projects[build_file].Write() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py deleted file mode 100644 index 49772d1..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" Unit tests for the xcode.py file. """ - -import gyp.generator.xcode as xcode -import unittest -import sys - - -class TestEscapeXcodeDefine(unittest.TestCase): - if sys.platform == "darwin": - - def test_InheritedRemainsUnescaped(self): - self.assertEqual(xcode.EscapeXcodeDefine("$(inherited)"), "$(inherited)") - - def test_Escaping(self): - self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\') - - -if __name__ == "__main__": - unittest.main() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py deleted file mode 100644 index 8f39519..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +++ /dev/null @@ -1,3115 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -import ast - -import gyp.common -import gyp.simple_copy -import multiprocessing -import os.path -import re -import shlex -import signal -import subprocess -import sys -import threading -import traceback -from gyp.common import GypError -from gyp.common import OrderedSet -from packaging.version import Version - -# A list of types that are treated as linkable. -linkable_types = [ - "executable", - "shared_library", - "loadable_module", - "mac_kernel_extension", - "windows_driver", -] - -# A list of sections that contain links to other targets. -dependency_sections = ["dependencies", "export_dependent_settings"] - -# base_path_sections is a list of sections defined by GYP that contain -# pathnames. The generators can provide more keys, the two lists are merged -# into path_sections, but you should call IsPathSection instead of using either -# list directly. -base_path_sections = [ - "destination", - "files", - "include_dirs", - "inputs", - "libraries", - "outputs", - "sources", -] -path_sections = set() - -# These per-process dictionaries are used to cache build file data when loading -# in parallel mode. -per_process_data = {} -per_process_aux_data = {} - - -def IsPathSection(section): - # If section ends in one of the '=+?!' characters, it's applied to a section - # without the trailing characters. '/' is notably absent from this list, - # because there's no way for a regular expression to be treated as a path. - while section and section[-1:] in "=+?!": - section = section[:-1] - - if section in path_sections: - return True - - # Sections matching the regexp '_(dir|file|path)s?$' are also - # considered PathSections. Using manual string matching since that - # is much faster than the regexp and this can be called hundreds of - # thousands of times so micro performance matters. - if "_" in section: - tail = section[-6:] - if tail[-1] == "s": - tail = tail[:-1] - if tail[-5:] in ("_file", "_path"): - return True - return tail[-4:] == "_dir" - - return False - - -# base_non_configuration_keys is a list of key names that belong in the target -# itself and should not be propagated into its configurations. It is merged -# with a list that can come from the generator to -# create non_configuration_keys. -base_non_configuration_keys = [ - # Sections that must exist inside targets and not configurations. - "actions", - "configurations", - "copies", - "default_configuration", - "dependencies", - "dependencies_original", - "libraries", - "postbuilds", - "product_dir", - "product_extension", - "product_name", - "product_prefix", - "rules", - "run_as", - "sources", - "standalone_static_library", - "suppress_wildcard", - "target_name", - "toolset", - "toolsets", - "type", - # Sections that can be found inside targets or configurations, but that - # should not be propagated from targets into their configurations. - "variables", -] -non_configuration_keys = [] - -# Keys that do not belong inside a configuration dictionary. -invalid_configuration_keys = [ - "actions", - "all_dependent_settings", - "configurations", - "dependencies", - "direct_dependent_settings", - "libraries", - "link_settings", - "sources", - "standalone_static_library", - "target_name", - "type", -] - -# Controls whether or not the generator supports multiple toolsets. -multiple_toolsets = False - -# Paths for converting filelist paths to output paths: { -# toplevel, -# qualified_output_dir, -# } -generator_filelist_paths = None - - -def GetIncludedBuildFiles(build_file_path, aux_data, included=None): - """Return a list of all build files included into build_file_path. - - The returned list will contain build_file_path as well as all other files - that it included, either directly or indirectly. Note that the list may - contain files that were included into a conditional section that evaluated - to false and was not merged into build_file_path's dict. - - aux_data is a dict containing a key for each build file or included build - file. Those keys provide access to dicts whose "included" keys contain - lists of all other files included by the build file. - - included should be left at its default None value by external callers. It - is used for recursion. - - The returned list will not contain any duplicate entries. Each build file - in the list will be relative to the current directory. - """ - - if included is None: - included = [] - - if build_file_path in included: - return included - - included.append(build_file_path) - - for included_build_file in aux_data[build_file_path].get("included", []): - GetIncludedBuildFiles(included_build_file, aux_data, included) - - return included - - -def CheckedEval(file_contents): - """Return the eval of a gyp file. - The gyp file is restricted to dictionaries and lists only, and - repeated keys are not allowed. - Note that this is slower than eval() is. - """ - - syntax_tree = ast.parse(file_contents) - assert isinstance(syntax_tree, ast.Module) - c1 = syntax_tree.body - assert len(c1) == 1 - c2 = c1[0] - assert isinstance(c2, ast.Expr) - return CheckNode(c2.value, []) - - -def CheckNode(node, keypath): - if isinstance(node, ast.Dict): - dict = {} - for key, value in zip(node.keys, node.values): - assert isinstance(key, ast.Str) - key = key.s - if key in dict: - raise GypError( - "Key '" - + key - + "' repeated at level " - + repr(len(keypath) + 1) - + " with key path '" - + ".".join(keypath) - + "'" - ) - kp = list(keypath) # Make a copy of the list for descending this node. - kp.append(key) - dict[key] = CheckNode(value, kp) - return dict - elif isinstance(node, ast.List): - children = [] - for index, child in enumerate(node.elts): - kp = list(keypath) # Copy list. - kp.append(repr(index)) - children.append(CheckNode(child, kp)) - return children - elif isinstance(node, ast.Str): - return node.s - else: - raise TypeError( - "Unknown AST node at key path '" + ".".join(keypath) + "': " + repr(node) - ) - - -def LoadOneBuildFile(build_file_path, data, aux_data, includes, is_target, check): - if build_file_path in data: - return data[build_file_path] - - if os.path.exists(build_file_path): - build_file_contents = open(build_file_path, encoding="utf-8").read() - else: - raise GypError(f"{build_file_path} not found (cwd: {os.getcwd()})") - - build_file_data = None - try: - if check: - build_file_data = CheckedEval(build_file_contents) - else: - build_file_data = eval(build_file_contents, {"__builtins__": {}}, None) - except SyntaxError as e: - e.filename = build_file_path - raise - except Exception as e: - gyp.common.ExceptionAppend(e, "while reading " + build_file_path) - raise - - if type(build_file_data) is not dict: - raise GypError("%s does not evaluate to a dictionary." % build_file_path) - - data[build_file_path] = build_file_data - aux_data[build_file_path] = {} - - # Scan for includes and merge them in. - if "skip_includes" not in build_file_data or not build_file_data["skip_includes"]: - try: - if is_target: - LoadBuildFileIncludesIntoDict( - build_file_data, build_file_path, data, aux_data, includes, check - ) - else: - LoadBuildFileIncludesIntoDict( - build_file_data, build_file_path, data, aux_data, None, check - ) - except Exception as e: - gyp.common.ExceptionAppend( - e, "while reading includes of " + build_file_path - ) - raise - - return build_file_data - - -def LoadBuildFileIncludesIntoDict( - subdict, subdict_path, data, aux_data, includes, check -): - includes_list = [] - if includes is not None: - includes_list.extend(includes) - if "includes" in subdict: - for include in subdict["includes"]: - # "include" is specified relative to subdict_path, so compute the real - # path to include by appending the provided "include" to the directory - # in which subdict_path resides. - relative_include = os.path.normpath( - os.path.join(os.path.dirname(subdict_path), include) - ) - includes_list.append(relative_include) - # Unhook the includes list, it's no longer needed. - del subdict["includes"] - - # Merge in the included files. - for include in includes_list: - if "included" not in aux_data[subdict_path]: - aux_data[subdict_path]["included"] = [] - aux_data[subdict_path]["included"].append(include) - - gyp.DebugOutput(gyp.DEBUG_INCLUDES, "Loading Included File: '%s'", include) - - MergeDicts( - subdict, - LoadOneBuildFile(include, data, aux_data, None, False, check), - subdict_path, - include, - ) - - # Recurse into subdictionaries. - for k, v in subdict.items(): - if type(v) is dict: - LoadBuildFileIncludesIntoDict(v, subdict_path, data, aux_data, None, check) - elif type(v) is list: - LoadBuildFileIncludesIntoList(v, subdict_path, data, aux_data, check) - - -# This recurses into lists so that it can look for dicts. -def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data, check): - for item in sublist: - if type(item) is dict: - LoadBuildFileIncludesIntoDict( - item, sublist_path, data, aux_data, None, check - ) - elif type(item) is list: - LoadBuildFileIncludesIntoList(item, sublist_path, data, aux_data, check) - - -# Processes toolsets in all the targets. This recurses into condition entries -# since they can contain toolsets as well. -def ProcessToolsetsInDict(data): - if "targets" in data: - target_list = data["targets"] - new_target_list = [] - for target in target_list: - # If this target already has an explicit 'toolset', and no 'toolsets' - # list, don't modify it further. - if "toolset" in target and "toolsets" not in target: - new_target_list.append(target) - continue - if multiple_toolsets: - toolsets = target.get("toolsets", ["target"]) - else: - toolsets = ["target"] - # Make sure this 'toolsets' definition is only processed once. - if "toolsets" in target: - del target["toolsets"] - if len(toolsets) > 0: - # Optimization: only do copies if more than one toolset is specified. - for build in toolsets[1:]: - new_target = gyp.simple_copy.deepcopy(target) - new_target["toolset"] = build - new_target_list.append(new_target) - target["toolset"] = toolsets[0] - new_target_list.append(target) - data["targets"] = new_target_list - if "conditions" in data: - for condition in data["conditions"]: - if type(condition) is list: - for condition_dict in condition[1:]: - if type(condition_dict) is dict: - ProcessToolsetsInDict(condition_dict) - - -# TODO(mark): I don't love this name. It just means that it's going to load -# a build file that contains targets and is expected to provide a targets dict -# that contains the targets... -def LoadTargetBuildFile( - build_file_path, - data, - aux_data, - variables, - includes, - depth, - check, - load_dependencies, -): - # If depth is set, predefine the DEPTH variable to be a relative path from - # this build file's directory to the directory identified by depth. - if depth: - # TODO(dglazkov) The backslash/forward-slash replacement at the end is a - # temporary measure. This should really be addressed by keeping all paths - # in POSIX until actual project generation. - d = gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) - if d == "": - variables["DEPTH"] = "." - else: - variables["DEPTH"] = d.replace("\\", "/") - - # The 'target_build_files' key is only set when loading target build files in - # the non-parallel code path, where LoadTargetBuildFile is called - # recursively. In the parallel code path, we don't need to check whether the - # |build_file_path| has already been loaded, because the 'scheduled' set in - # ParallelState guarantees that we never load the same |build_file_path| - # twice. - if "target_build_files" in data: - if build_file_path in data["target_build_files"]: - # Already loaded. - return False - data["target_build_files"].add(build_file_path) - - gyp.DebugOutput( - gyp.DEBUG_INCLUDES, "Loading Target Build File '%s'", build_file_path - ) - - build_file_data = LoadOneBuildFile( - build_file_path, data, aux_data, includes, True, check - ) - - # Store DEPTH for later use in generators. - build_file_data["_DEPTH"] = depth - - # Set up the included_files key indicating which .gyp files contributed to - # this target dict. - if "included_files" in build_file_data: - raise GypError(build_file_path + " must not contain included_files key") - - included = GetIncludedBuildFiles(build_file_path, aux_data) - build_file_data["included_files"] = [] - for included_file in included: - # included_file is relative to the current directory, but it needs to - # be made relative to build_file_path's directory. - included_relative = gyp.common.RelativePath( - included_file, os.path.dirname(build_file_path) - ) - build_file_data["included_files"].append(included_relative) - - # Do a first round of toolsets expansion so that conditions can be defined - # per toolset. - ProcessToolsetsInDict(build_file_data) - - # Apply "pre"/"early" variable expansions and condition evaluations. - ProcessVariablesAndConditionsInDict( - build_file_data, PHASE_EARLY, variables, build_file_path - ) - - # Since some toolsets might have been defined conditionally, perform - # a second round of toolsets expansion now. - ProcessToolsetsInDict(build_file_data) - - # Look at each project's target_defaults dict, and merge settings into - # targets. - if "target_defaults" in build_file_data: - if "targets" not in build_file_data: - raise GypError("Unable to find targets in build file %s" % build_file_path) - - index = 0 - while index < len(build_file_data["targets"]): - # This procedure needs to give the impression that target_defaults is - # used as defaults, and the individual targets inherit from that. - # The individual targets need to be merged into the defaults. Make - # a deep copy of the defaults for each target, merge the target dict - # as found in the input file into that copy, and then hook up the - # copy with the target-specific data merged into it as the replacement - # target dict. - old_target_dict = build_file_data["targets"][index] - new_target_dict = gyp.simple_copy.deepcopy( - build_file_data["target_defaults"] - ) - MergeDicts( - new_target_dict, old_target_dict, build_file_path, build_file_path - ) - build_file_data["targets"][index] = new_target_dict - index += 1 - - # No longer needed. - del build_file_data["target_defaults"] - - # Look for dependencies. This means that dependency resolution occurs - # after "pre" conditionals and variable expansion, but before "post" - - # in other words, you can't put a "dependencies" section inside a "post" - # conditional within a target. - - dependencies = [] - if "targets" in build_file_data: - for target_dict in build_file_data["targets"]: - if "dependencies" not in target_dict: - continue - for dependency in target_dict["dependencies"]: - dependencies.append( - gyp.common.ResolveTarget(build_file_path, dependency, None)[0] - ) - - if load_dependencies: - for dependency in dependencies: - try: - LoadTargetBuildFile( - dependency, - data, - aux_data, - variables, - includes, - depth, - check, - load_dependencies, - ) - except Exception as e: - gyp.common.ExceptionAppend( - e, "while loading dependencies of %s" % build_file_path - ) - raise - else: - return (build_file_path, dependencies) - - -def CallLoadTargetBuildFile( - global_flags, - build_file_path, - variables, - includes, - depth, - check, - generator_input_info, -): - """Wrapper around LoadTargetBuildFile for parallel processing. - - This wrapper is used when LoadTargetBuildFile is executed in - a worker process. - """ - - try: - signal.signal(signal.SIGINT, signal.SIG_IGN) - - # Apply globals so that the worker process behaves the same. - for key, value in global_flags.items(): - globals()[key] = value - - SetGeneratorGlobals(generator_input_info) - result = LoadTargetBuildFile( - build_file_path, - per_process_data, - per_process_aux_data, - variables, - includes, - depth, - check, - False, - ) - if not result: - return result - - (build_file_path, dependencies) = result - - # We can safely pop the build_file_data from per_process_data because it - # will never be referenced by this process again, so we don't need to keep - # it in the cache. - build_file_data = per_process_data.pop(build_file_path) - - # This gets serialized and sent back to the main process via a pipe. - # It's handled in LoadTargetBuildFileCallback. - return (build_file_path, build_file_data, dependencies) - except GypError as e: - sys.stderr.write("gyp: %s\n" % e) - return None - except Exception as e: - print("Exception:", e, file=sys.stderr) - print(traceback.format_exc(), file=sys.stderr) - return None - - -class ParallelProcessingError(Exception): - pass - - -class ParallelState: - """Class to keep track of state when processing input files in parallel. - - If build files are loaded in parallel, use this to keep track of - state during farming out and processing parallel jobs. It's stored - in a global so that the callback function can have access to it. - """ - - def __init__(self): - # The multiprocessing pool. - self.pool = None - # The condition variable used to protect this object and notify - # the main loop when there might be more data to process. - self.condition = None - # The "data" dict that was passed to LoadTargetBuildFileParallel - self.data = None - # The number of parallel calls outstanding; decremented when a response - # was received. - self.pending = 0 - # The set of all build files that have been scheduled, so we don't - # schedule the same one twice. - self.scheduled = set() - # A list of dependency build file paths that haven't been scheduled yet. - self.dependencies = [] - # Flag to indicate if there was an error in a child process. - self.error = False - - def LoadTargetBuildFileCallback(self, result): - """Handle the results of running LoadTargetBuildFile in another process. - """ - self.condition.acquire() - if not result: - self.error = True - self.condition.notify() - self.condition.release() - return - (build_file_path0, build_file_data0, dependencies0) = result - self.data[build_file_path0] = build_file_data0 - self.data["target_build_files"].add(build_file_path0) - for new_dependency in dependencies0: - if new_dependency not in self.scheduled: - self.scheduled.add(new_dependency) - self.dependencies.append(new_dependency) - self.pending -= 1 - self.condition.notify() - self.condition.release() - - -def LoadTargetBuildFilesParallel( - build_files, data, variables, includes, depth, check, generator_input_info -): - parallel_state = ParallelState() - parallel_state.condition = threading.Condition() - # Make copies of the build_files argument that we can modify while working. - parallel_state.dependencies = list(build_files) - parallel_state.scheduled = set(build_files) - parallel_state.pending = 0 - parallel_state.data = data - - try: - parallel_state.condition.acquire() - while parallel_state.dependencies or parallel_state.pending: - if parallel_state.error: - break - if not parallel_state.dependencies: - parallel_state.condition.wait() - continue - - dependency = parallel_state.dependencies.pop() - - parallel_state.pending += 1 - global_flags = { - "path_sections": globals()["path_sections"], - "non_configuration_keys": globals()["non_configuration_keys"], - "multiple_toolsets": globals()["multiple_toolsets"], - } - - if not parallel_state.pool: - parallel_state.pool = multiprocessing.Pool(multiprocessing.cpu_count()) - parallel_state.pool.apply_async( - CallLoadTargetBuildFile, - args=( - global_flags, - dependency, - variables, - includes, - depth, - check, - generator_input_info, - ), - callback=parallel_state.LoadTargetBuildFileCallback, - ) - except KeyboardInterrupt as e: - parallel_state.pool.terminate() - raise e - - parallel_state.condition.release() - - parallel_state.pool.close() - parallel_state.pool.join() - parallel_state.pool = None - - if parallel_state.error: - sys.exit(1) - - -# Look for the bracket that matches the first bracket seen in a -# string, and return the start and end as a tuple. For example, if -# the input is something like "<(foo <(bar)) blah", then it would -# return (1, 13), indicating the entire string except for the leading -# "<" and trailing " blah". -LBRACKETS = set("{[(") -BRACKETS = {"}": "{", "]": "[", ")": "("} - - -def FindEnclosingBracketGroup(input_str): - stack = [] - start = -1 - for index, char in enumerate(input_str): - if char in LBRACKETS: - stack.append(char) - if start == -1: - start = index - elif char in BRACKETS: - if not stack: - return (-1, -1) - if stack.pop() != BRACKETS[char]: - return (-1, -1) - if not stack: - return (start, index + 1) - return (-1, -1) - - -def IsStrCanonicalInt(string): - """Returns True if |string| is in its canonical integer form. - - The canonical form is such that str(int(string)) == string. - """ - if type(string) is str: - # This function is called a lot so for maximum performance, avoid - # involving regexps which would otherwise make the code much - # shorter. Regexps would need twice the time of this function. - if string: - if string == "0": - return True - if string[0] == "-": - string = string[1:] - if not string: - return False - if "1" <= string[0] <= "9": - return string.isdigit() - - return False - - -# This matches things like "<(asdf)", "(?P<(?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# This matches the same as early_variable_re, but with '>' instead of '<'. -late_variable_re = re.compile( - r"(?P(?P>(?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# This matches the same as early_variable_re, but with '^' instead of '<'. -latelate_variable_re = re.compile( - r"(?P(?P[\^](?:(?:!?@?)|\|)?)" - r"(?P[-a-zA-Z0-9_.]+)?" - r"\((?P\s*\[?)" - r"(?P.*?)(\]?)\))" -) - -# Global cache of results from running commands so they don't have to be run -# more then once. -cached_command_results = {} - - -def FixupPlatformCommand(cmd): - if sys.platform == "win32": - if type(cmd) is list: - cmd = [re.sub("^cat ", "type ", cmd[0])] + cmd[1:] - else: - cmd = re.sub("^cat ", "type ", cmd) - return cmd - - -PHASE_EARLY = 0 -PHASE_LATE = 1 -PHASE_LATELATE = 2 - - -def ExpandVariables(input, phase, variables, build_file): - # Look for the pattern that gets expanded into variables - if phase == PHASE_EARLY: - variable_re = early_variable_re - expansion_symbol = "<" - elif phase == PHASE_LATE: - variable_re = late_variable_re - expansion_symbol = ">" - elif phase == PHASE_LATELATE: - variable_re = latelate_variable_re - expansion_symbol = "^" - else: - assert False - - input_str = str(input) - if IsStrCanonicalInt(input_str): - return int(input_str) - - # Do a quick scan to determine if an expensive regex search is warranted. - if expansion_symbol not in input_str: - return input_str - - # Get the entire list of matches as a list of MatchObject instances. - # (using findall here would return strings instead of MatchObjects). - matches = list(variable_re.finditer(input_str)) - if not matches: - return input_str - - output = input_str - # Reverse the list of matches so that replacements are done right-to-left. - # That ensures that earlier replacements won't mess up the string in a - # way that causes later calls to find the earlier substituted text instead - # of what's intended for replacement. - matches.reverse() - for match_group in matches: - match = match_group.groupdict() - gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Matches: %r", match) - # match['replace'] is the substring to look for, match['type'] - # is the character code for the replacement type (< > ! <| >| <@ - # >@ !@), match['is_array'] contains a '[' for command - # arrays, and match['content'] is the name of the variable (< >) - # or command to run (!). match['command_string'] is an optional - # command string. Currently, only 'pymod_do_main' is supported. - - # run_command is true if a ! variant is used. - run_command = "!" in match["type"] - command_string = match["command_string"] - - # file_list is true if a | variant is used. - file_list = "|" in match["type"] - - # Capture these now so we can adjust them later. - replace_start = match_group.start("replace") - replace_end = match_group.end("replace") - - # Find the ending paren, and re-evaluate the contained string. - (c_start, c_end) = FindEnclosingBracketGroup(input_str[replace_start:]) - - # Adjust the replacement range to match the entire command - # found by FindEnclosingBracketGroup (since the variable_re - # probably doesn't match the entire command if it contained - # nested variables). - replace_end = replace_start + c_end - - # Find the "real" replacement, matching the appropriate closing - # paren, and adjust the replacement start and end. - replacement = input_str[replace_start:replace_end] - - # Figure out what the contents of the variable parens are. - contents_start = replace_start + c_start + 1 - contents_end = replace_end - 1 - contents = input_str[contents_start:contents_end] - - # Do filter substitution now for <|(). - # Admittedly, this is different than the evaluation order in other - # contexts. However, since filtration has no chance to run on <|(), - # this seems like the only obvious way to give them access to filters. - if file_list: - processed_variables = gyp.simple_copy.deepcopy(variables) - ProcessListFiltersInDict(contents, processed_variables) - # Recurse to expand variables in the contents - contents = ExpandVariables(contents, phase, processed_variables, build_file) - else: - # Recurse to expand variables in the contents - contents = ExpandVariables(contents, phase, variables, build_file) - - # Strip off leading/trailing whitespace so that variable matches are - # simpler below (and because they are rarely needed). - contents = contents.strip() - - # expand_to_list is true if an @ variant is used. In that case, - # the expansion should result in a list. Note that the caller - # is to be expecting a list in return, and not all callers do - # because not all are working in list context. Also, for list - # expansions, there can be no other text besides the variable - # expansion in the input string. - expand_to_list = "@" in match["type"] and input_str == replacement - - if run_command or file_list: - # Find the build file's directory, so commands can be run or file lists - # generated relative to it. - build_file_dir = os.path.dirname(build_file) - if build_file_dir == "" and not file_list: - # If build_file is just a leaf filename indicating a file in the - # current directory, build_file_dir might be an empty string. Set - # it to None to signal to subprocess.Popen that it should run the - # command in the current directory. - build_file_dir = None - - # Support <|(listfile.txt ...) which generates a file - # containing items from a gyp list, generated at gyp time. - # This works around actions/rules which have more inputs than will - # fit on the command line. - if file_list: - contents_list = contents if type(contents) is list else contents.split(" ") - replacement = contents_list[0] - if os.path.isabs(replacement): - raise GypError('| cannot handle absolute paths, got "%s"' % replacement) - - if not generator_filelist_paths: - path = os.path.join(build_file_dir, replacement) - else: - if os.path.isabs(build_file_dir): - toplevel = generator_filelist_paths["toplevel"] - rel_build_file_dir = gyp.common.RelativePath( - build_file_dir, toplevel - ) - else: - rel_build_file_dir = build_file_dir - qualified_out_dir = generator_filelist_paths["qualified_out_dir"] - path = os.path.join(qualified_out_dir, rel_build_file_dir, replacement) - gyp.common.EnsureDirExists(path) - - replacement = gyp.common.RelativePath(path, build_file_dir) - f = gyp.common.WriteOnDiff(path) - for i in contents_list[1:]: - f.write("%s\n" % i) - f.close() - - elif run_command: - use_shell = True - if match["is_array"]: - contents = eval(contents) - use_shell = False - - # Check for a cached value to avoid executing commands, or generating - # file lists more than once. The cache key contains the command to be - # run as well as the directory to run it from, to account for commands - # that depend on their current directory. - # TODO(http://code.google.com/p/gyp/issues/detail?id=111): In theory, - # someone could author a set of GYP files where each time the command - # is invoked it produces different output by design. When the need - # arises, the syntax should be extended to support no caching off a - # command's output so it is run every time. - cache_key = (str(contents), build_file_dir) - cached_value = cached_command_results.get(cache_key, None) - if cached_value is None: - gyp.DebugOutput( - gyp.DEBUG_VARIABLES, - "Executing command '%s' in directory '%s'", - contents, - build_file_dir, - ) - - replacement = "" - - if command_string == "pymod_do_main": - # 0: - raise GypError( - "Call to '%s' returned exit status %d while in %s." - % (contents, result.returncode, build_file) - ) - replacement = result.stdout.decode("utf-8").rstrip() - - cached_command_results[cache_key] = replacement - else: - gyp.DebugOutput( - gyp.DEBUG_VARIABLES, - "Had cache value for command '%s' in directory '%s'", - contents, - build_file_dir, - ) - replacement = cached_value - - else: - if contents not in variables: - if contents[-1] in ["!", "/"]: - # In order to allow cross-compiles (nacl) to happen more naturally, - # we will allow references to >(sources/) etc. to resolve to - # and empty list if undefined. This allows actions to: - # 'action!': [ - # '>@(_sources!)', - # ], - # 'action/': [ - # '>@(_sources/)', - # ], - replacement = [] - else: - raise GypError( - "Undefined variable " + contents + " in " + build_file - ) - else: - replacement = variables[contents] - - if isinstance(replacement, bytes) and not isinstance(replacement, str): - replacement = replacement.decode("utf-8") # done on Python 3 only - if type(replacement) is list: - for item in replacement: - if isinstance(item, bytes) and not isinstance(item, str): - item = item.decode("utf-8") # done on Python 3 only - if not contents[-1] == "/" and type(item) not in (str, int): - raise GypError( - "Variable " - + contents - + " must expand to a string or list of strings; " - + "list contains a " - + item.__class__.__name__ - ) - # Run through the list and handle variable expansions in it. Since - # the list is guaranteed not to contain dicts, this won't do anything - # with conditions sections. - ProcessVariablesAndConditionsInList( - replacement, phase, variables, build_file - ) - elif type(replacement) not in (str, int): - raise GypError( - "Variable " - + contents - + " must expand to a string or list of strings; " - + "found a " - + replacement.__class__.__name__ - ) - - if expand_to_list: - # Expanding in list context. It's guaranteed that there's only one - # replacement to do in |input_str| and that it's this replacement. See - # above. - if type(replacement) is list: - # If it's already a list, make a copy. - output = replacement[:] - else: - # Split it the same way sh would split arguments. - output = shlex.split(str(replacement)) - else: - # Expanding in string context. - encoded_replacement = "" - if type(replacement) is list: - # When expanding a list into string context, turn the list items - # into a string in a way that will work with a subprocess call. - # - # TODO(mark): This isn't completely correct. This should - # call a generator-provided function that observes the - # proper list-to-argument quoting rules on a specific - # platform instead of just calling the POSIX encoding - # routine. - encoded_replacement = gyp.common.EncodePOSIXShellList(replacement) - else: - encoded_replacement = replacement - - output = ( - output[:replace_start] + str(encoded_replacement) + output[replace_end:] - ) - # Prepare for the next match iteration. - input_str = output - - if output == input: - gyp.DebugOutput( - gyp.DEBUG_VARIABLES, - "Found only identity matches on %r, avoiding infinite " "recursion.", - output, - ) - else: - # Look for more matches now that we've replaced some, to deal with - # expanding local variables (variables defined in the same - # variables block as this one). - gyp.DebugOutput(gyp.DEBUG_VARIABLES, "Found output %r, recursing.", output) - if type(output) is list: - if output and type(output[0]) is list: - # Leave output alone if it's a list of lists. - # We don't want such lists to be stringified. - pass - else: - new_output = [] - for item in output: - new_output.append( - ExpandVariables(item, phase, variables, build_file) - ) - output = new_output - else: - output = ExpandVariables(output, phase, variables, build_file) - - # Convert all strings that are canonically-represented integers into integers. - if type(output) is list: - for index, outstr in enumerate(output): - if IsStrCanonicalInt(outstr): - output[index] = int(outstr) - elif IsStrCanonicalInt(output): - output = int(output) - - return output - - -# The same condition is often evaluated over and over again so it -# makes sense to cache as much as possible between evaluations. -cached_conditions_asts = {} - - -def EvalCondition(condition, conditions_key, phase, variables, build_file): - """Returns the dict that should be used or None if the result was - that nothing should be used.""" - if type(condition) is not list: - raise GypError(conditions_key + " must be a list") - if len(condition) < 2: - # It's possible that condition[0] won't work in which case this - # attempt will raise its own IndexError. That's probably fine. - raise GypError( - conditions_key - + " " - + condition[0] - + " must be at least length 2, not " - + str(len(condition)) - ) - - i = 0 - result = None - while i < len(condition): - cond_expr = condition[i] - true_dict = condition[i + 1] - if type(true_dict) is not dict: - raise GypError( - "{} {} must be followed by a dictionary, not {}".format( - conditions_key, cond_expr, type(true_dict) - ) - ) - if len(condition) > i + 2 and type(condition[i + 2]) is dict: - false_dict = condition[i + 2] - i = i + 3 - if i != len(condition): - raise GypError( - "{} {} has {} unexpected trailing items".format( - conditions_key, cond_expr, len(condition) - i - ) - ) - else: - false_dict = None - i = i + 2 - if result is None: - result = EvalSingleCondition( - cond_expr, true_dict, false_dict, phase, variables, build_file - ) - - return result - - -def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, build_file): - """Returns true_dict if cond_expr evaluates to true, and false_dict - otherwise.""" - # Do expansions on the condition itself. Since the condition can naturally - # contain variable references without needing to resort to GYP expansion - # syntax, this is of dubious value for variables, but someone might want to - # use a command expansion directly inside a condition. - cond_expr_expanded = ExpandVariables(cond_expr, phase, variables, build_file) - if type(cond_expr_expanded) not in (str, int): - raise ValueError( - "Variable expansion in this context permits str and int " - + "only, found " - + cond_expr_expanded.__class__.__name__ - ) - - try: - if cond_expr_expanded in cached_conditions_asts: - ast_code = cached_conditions_asts[cond_expr_expanded] - else: - ast_code = compile(cond_expr_expanded, "", "eval") - cached_conditions_asts[cond_expr_expanded] = ast_code - env = {"__builtins__": {}, "v": Version} - if eval(ast_code, env, variables): - return true_dict - return false_dict - except SyntaxError as e: - syntax_error = SyntaxError( - "%s while evaluating condition '%s' in %s " - "at character %d." % (str(e.args[0]), e.text, build_file, e.offset), - e.filename, - e.lineno, - e.offset, - e.text, - ) - raise syntax_error - except NameError as e: - gyp.common.ExceptionAppend( - e, - f"while evaluating condition '{cond_expr_expanded}' in {build_file}", - ) - raise GypError(e) - - -def ProcessConditionsInDict(the_dict, phase, variables, build_file): - # Process a 'conditions' or 'target_conditions' section in the_dict, - # depending on phase. - # early -> conditions - # late -> target_conditions - # latelate -> no conditions - # - # Each item in a conditions list consists of cond_expr, a string expression - # evaluated as the condition, and true_dict, a dict that will be merged into - # the_dict if cond_expr evaluates to true. Optionally, a third item, - # false_dict, may be present. false_dict is merged into the_dict if - # cond_expr evaluates to false. - # - # Any dict merged into the_dict will be recursively processed for nested - # conditionals and other expansions, also according to phase, immediately - # prior to being merged. - - if phase == PHASE_EARLY: - conditions_key = "conditions" - elif phase == PHASE_LATE: - conditions_key = "target_conditions" - elif phase == PHASE_LATELATE: - return - else: - assert False - - if conditions_key not in the_dict: - return - - conditions_list = the_dict[conditions_key] - # Unhook the conditions list, it's no longer needed. - del the_dict[conditions_key] - - for condition in conditions_list: - merge_dict = EvalCondition( - condition, conditions_key, phase, variables, build_file - ) - - if merge_dict is not None: - # Expand variables and nested conditinals in the merge_dict before - # merging it. - ProcessVariablesAndConditionsInDict( - merge_dict, phase, variables, build_file - ) - - MergeDicts(the_dict, merge_dict, build_file, build_file) - - -def LoadAutomaticVariablesFromDict(variables, the_dict): - # Any keys with plain string values in the_dict become automatic variables. - # The variable name is the key name with a "_" character prepended. - for key, value in the_dict.items(): - if type(value) in (str, int, list): - variables["_" + key] = value - - -def LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key): - # Any keys in the_dict's "variables" dict, if it has one, becomes a - # variable. The variable name is the key name in the "variables" dict. - # Variables that end with the % character are set only if they are unset in - # the variables dict. the_dict_key is the name of the key that accesses - # the_dict in the_dict's parent dict. If the_dict's parent is not a dict - # (it could be a list or it could be parentless because it is a root dict), - # the_dict_key will be None. - for key, value in the_dict.get("variables", {}).items(): - if type(value) not in (str, int, list): - continue - - if key.endswith("%"): - variable_name = key[:-1] - if variable_name in variables: - # If the variable is already set, don't set it. - continue - if the_dict_key == "variables" and variable_name in the_dict: - # If the variable is set without a % in the_dict, and the_dict is a - # variables dict (making |variables| a variables sub-dict of a - # variables dict), use the_dict's definition. - value = the_dict[variable_name] - else: - variable_name = key - - variables[variable_name] = value - - -def ProcessVariablesAndConditionsInDict( - the_dict, phase, variables_in, build_file, the_dict_key=None -): - """Handle all variable and command expansion and conditional evaluation. - - This function is the public entry point for all variable expansions and - conditional evaluations. The variables_in dictionary will not be modified - by this function. - """ - - # Make a copy of the variables_in dict that can be modified during the - # loading of automatics and the loading of the variables dict. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - - if "variables" in the_dict: - # Make sure all the local variables are added to the variables - # list before we process them so that you can reference one - # variable from another. They will be fully expanded by recursion - # in ExpandVariables. - for key, value in the_dict["variables"].items(): - variables[key] = value - - # Handle the associated variables dict first, so that any variable - # references within can be resolved prior to using them as variables. - # Pass a copy of the variables dict to avoid having it be tainted. - # Otherwise, it would have extra automatics added for everything that - # should just be an ordinary variable in this scope. - ProcessVariablesAndConditionsInDict( - the_dict["variables"], phase, variables, build_file, "variables" - ) - - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - for key, value in the_dict.items(): - # Skip "variables", which was already processed if present. - if key != "variables" and type(value) is str: - expanded = ExpandVariables(value, phase, variables, build_file) - if type(expanded) not in (str, int): - raise ValueError( - "Variable expansion in this context permits str and int " - + "only, found " - + expanded.__class__.__name__ - + " for " - + key - ) - the_dict[key] = expanded - - # Variable expansion may have resulted in changes to automatics. Reload. - # TODO(mark): Optimization: only reload if no changes were made. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Process conditions in this dict. This is done after variable expansion - # so that conditions may take advantage of expanded variables. For example, - # if the_dict contains: - # {'type': '<(library_type)', - # 'conditions': [['_type=="static_library"', { ... }]]}, - # _type, as used in the condition, will only be set to the value of - # library_type if variable expansion is performed before condition - # processing. However, condition processing should occur prior to recursion - # so that variables (both automatic and "variables" dict type) may be - # adjusted by conditions sections, merged into the_dict, and have the - # intended impact on contained dicts. - # - # This arrangement means that a "conditions" section containing a "variables" - # section will only have those variables effective in subdicts, not in - # the_dict. The workaround is to put a "conditions" section within a - # "variables" section. For example: - # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]], - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will not result in "IS_MAC" being appended to the "defines" list in the - # current scope but would result in it being appended to the "defines" list - # within "my_subdict". By comparison: - # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]}, - # 'defines': ['<(define)'], - # 'my_subdict': {'defines': ['<(define)']}}, - # will append "IS_MAC" to both "defines" lists. - - # Evaluate conditions sections, allowing variable expansions within them - # as well as nested conditionals. This will process a 'conditions' or - # 'target_conditions' section, perform appropriate merging and recursive - # conditional and variable processing, and then remove the conditions section - # from the_dict if it is present. - ProcessConditionsInDict(the_dict, phase, variables, build_file) - - # Conditional processing may have resulted in changes to automatics or the - # variables dict. Reload. - variables = variables_in.copy() - LoadAutomaticVariablesFromDict(variables, the_dict) - LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) - - # Recurse into child dicts, or process child lists which may result in - # further recursion into descendant dicts. - for key, value in the_dict.items(): - # Skip "variables" and string values, which were already processed if - # present. - if key == "variables" or type(value) is str: - continue - if type(value) is dict: - # Pass a copy of the variables dict so that subdicts can't influence - # parents. - ProcessVariablesAndConditionsInDict( - value, phase, variables, build_file, key - ) - elif type(value) is list: - # The list itself can't influence the variables dict, and - # ProcessVariablesAndConditionsInList will make copies of the variables - # dict if it needs to pass it to something that can influence it. No - # copy is necessary here. - ProcessVariablesAndConditionsInList(value, phase, variables, build_file) - elif type(value) is not int: - raise TypeError("Unknown type " + value.__class__.__name__ + " for " + key) - - -def ProcessVariablesAndConditionsInList(the_list, phase, variables, build_file): - # Iterate using an index so that new values can be assigned into the_list. - index = 0 - while index < len(the_list): - item = the_list[index] - if type(item) is dict: - # Make a copy of the variables dict so that it won't influence anything - # outside of its own scope. - ProcessVariablesAndConditionsInDict(item, phase, variables, build_file) - elif type(item) is list: - ProcessVariablesAndConditionsInList(item, phase, variables, build_file) - elif type(item) is str: - expanded = ExpandVariables(item, phase, variables, build_file) - if type(expanded) in (str, int): - the_list[index] = expanded - elif type(expanded) is list: - the_list[index : index + 1] = expanded - index += len(expanded) - - # index now identifies the next item to examine. Continue right now - # without falling into the index increment below. - continue - else: - raise ValueError( - "Variable expansion in this context permits strings and " - + "lists only, found " - + expanded.__class__.__name__ - + " at " - + index - ) - elif type(item) is not int: - raise TypeError( - "Unknown type " + item.__class__.__name__ + " at index " + index - ) - index = index + 1 - - -def BuildTargetsDict(data): - """Builds a dict mapping fully-qualified target names to their target dicts. - - |data| is a dict mapping loaded build files by pathname relative to the - current directory. Values in |data| are build file contents. For each - |data| value with a "targets" key, the value of the "targets" key is taken - as a list containing target dicts. Each target's fully-qualified name is - constructed from the pathname of the build file (|data| key) and its - "target_name" property. These fully-qualified names are used as the keys - in the returned dict. These keys provide access to the target dicts, - the dicts in the "targets" lists. - """ - - targets = {} - for build_file in data["target_build_files"]: - for target in data[build_file].get("targets", []): - target_name = gyp.common.QualifiedTarget( - build_file, target["target_name"], target["toolset"] - ) - if target_name in targets: - raise GypError("Duplicate target definitions for " + target_name) - targets[target_name] = target - - return targets - - -def QualifyDependencies(targets): - """Make dependency links fully-qualified relative to the current directory. - - |targets| is a dict mapping fully-qualified target names to their target - dicts. For each target in this dict, keys known to contain dependency - links are examined, and any dependencies referenced will be rewritten - so that they are fully-qualified and relative to the current directory. - All rewritten dependencies are suitable for use as keys to |targets| or a - similar dict. - """ - - all_dependency_sections = [ - dep + op for dep in dependency_sections for op in ("", "!", "/") - ] - - for target, target_dict in targets.items(): - target_build_file = gyp.common.BuildFile(target) - toolset = target_dict["toolset"] - for dependency_key in all_dependency_sections: - dependencies = target_dict.get(dependency_key, []) - for index, dep in enumerate(dependencies): - dep_file, dep_target, dep_toolset = gyp.common.ResolveTarget( - target_build_file, dep, toolset - ) - if not multiple_toolsets: - # Ignore toolset specification in the dependency if it is specified. - dep_toolset = toolset - dependency = gyp.common.QualifiedTarget( - dep_file, dep_target, dep_toolset - ) - dependencies[index] = dependency - - # Make sure anything appearing in a list other than "dependencies" also - # appears in the "dependencies" list. - if ( - dependency_key != "dependencies" - and dependency not in target_dict["dependencies"] - ): - raise GypError( - "Found " - + dependency - + " in " - + dependency_key - + " of " - + target - + ", but not in dependencies" - ) - - -def ExpandWildcardDependencies(targets, data): - """Expands dependencies specified as build_file:*. - - For each target in |targets|, examines sections containing links to other - targets. If any such section contains a link of the form build_file:*, it - is taken as a wildcard link, and is expanded to list each target in - build_file. The |data| dict provides access to build file dicts. - - Any target that does not wish to be included by wildcard can provide an - optional "suppress_wildcard" key in its target dict. When present and - true, a wildcard dependency link will not include such targets. - - All dependency names, including the keys to |targets| and the values in each - dependency list, must be qualified when this function is called. - """ - - for target, target_dict in targets.items(): - target_build_file = gyp.common.BuildFile(target) - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - - # Loop this way instead of "for dependency in" or "for index in range" - # because the dependencies list will be modified within the loop body. - index = 0 - while index < len(dependencies): - ( - dependency_build_file, - dependency_target, - dependency_toolset, - ) = gyp.common.ParseQualifiedTarget(dependencies[index]) - if dependency_target != "*" and dependency_toolset != "*": - # Not a wildcard. Keep it moving. - index = index + 1 - continue - - if dependency_build_file == target_build_file: - # It's an error for a target to depend on all other targets in - # the same file, because a target cannot depend on itself. - raise GypError( - "Found wildcard in " - + dependency_key - + " of " - + target - + " referring to same build file" - ) - - # Take the wildcard out and adjust the index so that the next - # dependency in the list will be processed the next time through the - # loop. - del dependencies[index] - index = index - 1 - - # Loop through the targets in the other build file, adding them to - # this target's list of dependencies in place of the removed - # wildcard. - dependency_target_dicts = data[dependency_build_file]["targets"] - for dependency_target_dict in dependency_target_dicts: - if int(dependency_target_dict.get("suppress_wildcard", False)): - continue - dependency_target_name = dependency_target_dict["target_name"] - if ( - dependency_target not in {"*", dependency_target_name} - ): - continue - dependency_target_toolset = dependency_target_dict["toolset"] - if ( - dependency_toolset not in {"*", dependency_target_toolset} - ): - continue - dependency = gyp.common.QualifiedTarget( - dependency_build_file, - dependency_target_name, - dependency_target_toolset, - ) - index = index + 1 - dependencies.insert(index, dependency) - - index = index + 1 - - -def Unify(items): - """Removes duplicate elements from items, keeping the first element.""" - seen = {} - return [seen.setdefault(e, e) for e in items if e not in seen] - - -def RemoveDuplicateDependencies(targets): - """Makes sure every dependency appears only once in all targets's dependency - lists.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - target_dict[dependency_key] = Unify(dependencies) - - -def Filter(items, item): - """Removes item from items.""" - res = {} - return [res.setdefault(e, e) for e in items if e != item] - - -def RemoveSelfDependencies(targets): - """Remove self dependencies from targets that have the prune_self_dependency - variable set.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - for t in dependencies: - if t == target_name and ( - targets[t] - .get("variables", {}) - .get("prune_self_dependency", 0) - ): - target_dict[dependency_key] = Filter( - dependencies, target_name - ) - - -def RemoveLinkDependenciesFromNoneTargets(targets): - """Remove dependencies having the 'link_dependency' attribute from the 'none' - targets.""" - for target_name, target_dict in targets.items(): - for dependency_key in dependency_sections: - dependencies = target_dict.get(dependency_key, []) - if dependencies: - for t in dependencies: - if target_dict.get("type", None) == "none": - if targets[t].get("variables", {}).get("link_dependency", 0): - target_dict[dependency_key] = Filter( - target_dict[dependency_key], t - ) - - -class DependencyGraphNode: - """ - - Attributes: - ref: A reference to an object that this DependencyGraphNode represents. - dependencies: List of DependencyGraphNodes on which this one depends. - dependents: List of DependencyGraphNodes that depend on this one. - """ - - class CircularException(GypError): - pass - - def __init__(self, ref): - self.ref = ref - self.dependencies = [] - self.dependents = [] - - def __repr__(self): - return "" % self.ref - - def FlattenToList(self): - # flat_list is the sorted list of dependencies - actually, the list items - # are the "ref" attributes of DependencyGraphNodes. Every target will - # appear in flat_list after all of its dependencies, and before all of its - # dependents. - flat_list = OrderedSet() - - def ExtractNodeRef(node): - """Extracts the object that the node represents from the given node.""" - return node.ref - - # in_degree_zeros is the list of DependencyGraphNodes that have no - # dependencies not in flat_list. Initially, it is a copy of the children - # of this node, because when the graph was built, nodes with no - # dependencies were made implicit dependents of the root node. - in_degree_zeros = sorted(self.dependents[:], key=ExtractNodeRef) - - while in_degree_zeros: - # Nodes in in_degree_zeros have no dependencies not in flat_list, so they - # can be appended to flat_list. Take these nodes out of in_degree_zeros - # as work progresses, so that the next node to process from the list can - # always be accessed at a consistent position. - node = in_degree_zeros.pop() - flat_list.add(node.ref) - - # Look at dependents of the node just added to flat_list. Some of them - # may now belong in in_degree_zeros. - for node_dependent in sorted(node.dependents, key=ExtractNodeRef): - is_in_degree_zero = True - # TODO: We want to check through the - # node_dependent.dependencies list but if it's long and we - # always start at the beginning, then we get O(n^2) behaviour. - for node_dependent_dependency in sorted( - node_dependent.dependencies, key=ExtractNodeRef - ): - if node_dependent_dependency.ref not in flat_list: - # The dependent one or more dependencies not in flat_list. - # There will be more chances to add it to flat_list - # when examining it again as a dependent of those other - # dependencies, provided that there are no cycles. - is_in_degree_zero = False - break - - if is_in_degree_zero: - # All of the dependent's dependencies are already in flat_list. Add - # it to in_degree_zeros where it will be processed in a future - # iteration of the outer loop. - in_degree_zeros += [node_dependent] - - return list(flat_list) - - def FindCycles(self): - """ - Returns a list of cycles in the graph, where each cycle is its own list. - """ - results = [] - visited = set() - - def Visit(node, path): - for child in node.dependents: - if child in path: - results.append([child] + path[: path.index(child) + 1]) - elif child not in visited: - visited.add(child) - Visit(child, [child] + path) - - visited.add(self) - Visit(self, [self]) - - return results - - def DirectDependencies(self, dependencies=None): - """Returns a list of just direct dependencies.""" - if dependencies is None: - dependencies = [] - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref and dependency.ref not in dependencies: - dependencies.append(dependency.ref) - - return dependencies - - def _AddImportedDependencies(self, targets, dependencies=None): - """Given a list of direct dependencies, adds indirect dependencies that - other dependencies have declared to export their settings. - - This method does not operate on self. Rather, it operates on the list - of dependencies in the |dependencies| argument. For each dependency in - that list, if any declares that it exports the settings of one of its - own dependencies, those dependencies whose settings are "passed through" - are added to the list. As new items are added to the list, they too will - be processed, so it is possible to import settings through multiple levels - of dependencies. - - This method is not terribly useful on its own, it depends on being - "primed" with a list of direct dependencies such as one provided by - DirectDependencies. DirectAndImportedDependencies is intended to be the - public entry point. - """ - - if dependencies is None: - dependencies = [] - - index = 0 - while index < len(dependencies): - dependency = dependencies[index] - dependency_dict = targets[dependency] - # Add any dependencies whose settings should be imported to the list - # if not already present. Newly-added items will be checked for - # their own imports when the list iteration reaches them. - # Rather than simply appending new items, insert them after the - # dependency that exported them. This is done to more closely match - # the depth-first method used by DeepDependencies. - add_index = 1 - for imported_dependency in dependency_dict.get( - "export_dependent_settings", [] - ): - if imported_dependency not in dependencies: - dependencies.insert(index + add_index, imported_dependency) - add_index = add_index + 1 - index = index + 1 - - return dependencies - - def DirectAndImportedDependencies(self, targets, dependencies=None): - """Returns a list of a target's direct dependencies and all indirect - dependencies that a dependency has advertised settings should be exported - through the dependency for. - """ - - dependencies = self.DirectDependencies(dependencies) - return self._AddImportedDependencies(targets, dependencies) - - def DeepDependencies(self, dependencies=None): - """Returns an OrderedSet of all of a target's dependencies, recursively.""" - if dependencies is None: - # Using a list to get ordered output and a set to do fast "is it - # already added" checks. - dependencies = OrderedSet() - - for dependency in self.dependencies: - # Check for None, corresponding to the root node. - if dependency.ref is None: - continue - if dependency.ref not in dependencies: - dependency.DeepDependencies(dependencies) - dependencies.add(dependency.ref) - - return dependencies - - def _LinkDependenciesInternal( - self, targets, include_shared_libraries, dependencies=None, initial=True - ): - """Returns an OrderedSet of dependency targets that are linked - into this target. - - This function has a split personality, depending on the setting of - |initial|. Outside callers should always leave |initial| at its default - setting. - - When adding a target to the list of dependencies, this function will - recurse into itself with |initial| set to False, to collect dependencies - that are linked into the linkable target for which the list is being built. - - If |include_shared_libraries| is False, the resulting dependencies will not - include shared_library targets that are linked into this target. - """ - if dependencies is None: - # Using a list to get ordered output and a set to do fast "is it - # already added" checks. - dependencies = OrderedSet() - - # Check for None, corresponding to the root node. - if self.ref is None: - return dependencies - - # It's kind of sucky that |targets| has to be passed into this function, - # but that's presently the easiest way to access the target dicts so that - # this function can find target types. - - if "target_name" not in targets[self.ref]: - raise GypError("Missing 'target_name' field in target.") - - if "type" not in targets[self.ref]: - raise GypError( - "Missing 'type' field in target %s" % targets[self.ref]["target_name"] - ) - - target_type = targets[self.ref]["type"] - - is_linkable = target_type in linkable_types - - if initial and not is_linkable: - # If this is the first target being examined and it's not linkable, - # return an empty list of link dependencies, because the link - # dependencies are intended to apply to the target itself (initial is - # True) and this target won't be linked. - return dependencies - - # Don't traverse 'none' targets if explicitly excluded. - if target_type == "none" and not targets[self.ref].get( - "dependencies_traverse", True - ): - dependencies.add(self.ref) - return dependencies - - # Executables, mac kernel extensions, windows drivers and loadable modules - # are already fully and finally linked. Nothing else can be a link - # dependency of them, there can only be dependencies in the sense that a - # dependent target might run an executable or load the loadable_module. - if not initial and target_type in ( - "executable", - "loadable_module", - "mac_kernel_extension", - "windows_driver", - ): - return dependencies - - # Shared libraries are already fully linked. They should only be included - # in |dependencies| when adjusting static library dependencies (in order to - # link against the shared_library's import lib), but should not be included - # in |dependencies| when propagating link_settings. - # The |include_shared_libraries| flag controls which of these two cases we - # are handling. - if ( - not initial - and target_type == "shared_library" - and not include_shared_libraries - ): - return dependencies - - # The target is linkable, add it to the list of link dependencies. - if self.ref not in dependencies: - dependencies.add(self.ref) - if initial or not is_linkable: - # If this is a subsequent target and it's linkable, don't look any - # further for linkable dependencies, as they'll already be linked into - # this target linkable. Always look at dependencies of the initial - # target, and always look at dependencies of non-linkables. - for dependency in self.dependencies: - dependency._LinkDependenciesInternal( - targets, include_shared_libraries, dependencies, False - ) - - return dependencies - - def DependenciesForLinkSettings(self, targets): - """ - Returns a list of dependency targets whose link_settings should be merged - into this target. - """ - - # TODO(sbaig) Currently, chrome depends on the bug that shared libraries' - # link_settings are propagated. So for now, we will allow it, unless the - # 'allow_sharedlib_linksettings_propagation' flag is explicitly set to - # False. Once chrome is fixed, we can remove this flag. - include_shared_libraries = targets[self.ref].get( - "allow_sharedlib_linksettings_propagation", True - ) - return self._LinkDependenciesInternal(targets, include_shared_libraries) - - def DependenciesToLinkAgainst(self, targets): - """ - Returns a list of dependency targets that are linked into this target. - """ - return self._LinkDependenciesInternal(targets, True) - - -def BuildDependencyList(targets): - # Create a DependencyGraphNode for each target. Put it into a dict for easy - # access. - dependency_nodes = {} - for target, spec in targets.items(): - if target not in dependency_nodes: - dependency_nodes[target] = DependencyGraphNode(target) - - # Set up the dependency links. Targets that have no dependencies are treated - # as dependent on root_node. - root_node = DependencyGraphNode(None) - for target, spec in targets.items(): - target_node = dependency_nodes[target] - dependencies = spec.get("dependencies") - if not dependencies: - target_node.dependencies = [root_node] - root_node.dependents.append(target_node) - else: - for dependency in dependencies: - dependency_node = dependency_nodes.get(dependency) - if not dependency_node: - raise GypError( - "Dependency '%s' not found while " - "trying to load target %s" % (dependency, target) - ) - target_node.dependencies.append(dependency_node) - dependency_node.dependents.append(target_node) - - flat_list = root_node.FlattenToList() - - # If there's anything left unvisited, there must be a circular dependency - # (cycle). - if len(flat_list) != len(targets): - if not root_node.dependents: - # If all targets have dependencies, add the first target as a dependent - # of root_node so that the cycle can be discovered from root_node. - target = next(iter(targets)) - target_node = dependency_nodes[target] - target_node.dependencies.append(root_node) - root_node.dependents.append(target_node) - - cycles = [] - for cycle in root_node.FindCycles(): - paths = [node.ref for node in cycle] - cycles.append("Cycle: %s" % " -> ".join(paths)) - raise DependencyGraphNode.CircularException( - "Cycles in dependency graph detected:\n" + "\n".join(cycles) - ) - - return [dependency_nodes, flat_list] - - -def VerifyNoGYPFileCircularDependencies(targets): - # Create a DependencyGraphNode for each gyp file containing a target. Put - # it into a dict for easy access. - dependency_nodes = {} - for target in targets: - build_file = gyp.common.BuildFile(target) - if build_file not in dependency_nodes: - dependency_nodes[build_file] = DependencyGraphNode(build_file) - - # Set up the dependency links. - for target, spec in targets.items(): - build_file = gyp.common.BuildFile(target) - build_file_node = dependency_nodes[build_file] - target_dependencies = spec.get("dependencies", []) - for dependency in target_dependencies: - try: - dependency_build_file = gyp.common.BuildFile(dependency) - except GypError as e: - gyp.common.ExceptionAppend( - e, "while computing dependencies of .gyp file %s" % build_file - ) - raise - - if dependency_build_file == build_file: - # A .gyp file is allowed to refer back to itself. - continue - dependency_node = dependency_nodes.get(dependency_build_file) - if not dependency_node: - raise GypError("Dependency '%s' not found" % dependency_build_file) - if dependency_node not in build_file_node.dependencies: - build_file_node.dependencies.append(dependency_node) - dependency_node.dependents.append(build_file_node) - - # Files that have no dependencies are treated as dependent on root_node. - root_node = DependencyGraphNode(None) - for build_file_node in dependency_nodes.values(): - if len(build_file_node.dependencies) == 0: - build_file_node.dependencies.append(root_node) - root_node.dependents.append(build_file_node) - - flat_list = root_node.FlattenToList() - - # If there's anything left unvisited, there must be a circular dependency - # (cycle). - if len(flat_list) != len(dependency_nodes): - if not root_node.dependents: - # If all files have dependencies, add the first file as a dependent - # of root_node so that the cycle can be discovered from root_node. - file_node = next(iter(dependency_nodes.values())) - file_node.dependencies.append(root_node) - root_node.dependents.append(file_node) - cycles = [] - for cycle in root_node.FindCycles(): - paths = [node.ref for node in cycle] - cycles.append("Cycle: %s" % " -> ".join(paths)) - raise DependencyGraphNode.CircularException( - "Cycles in .gyp file dependency graph detected:\n" + "\n".join(cycles) - ) - - -def DoDependentSettings(key, flat_list, targets, dependency_nodes): - # key should be one of all_dependent_settings, direct_dependent_settings, - # or link_settings. - - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - - if key == "all_dependent_settings": - dependencies = dependency_nodes[target].DeepDependencies() - elif key == "direct_dependent_settings": - dependencies = dependency_nodes[target].DirectAndImportedDependencies( - targets - ) - elif key == "link_settings": - dependencies = dependency_nodes[target].DependenciesForLinkSettings(targets) - else: - raise GypError( - "DoDependentSettings doesn't know how to determine " - "dependencies for " + key - ) - - for dependency in dependencies: - dependency_dict = targets[dependency] - if key not in dependency_dict: - continue - dependency_build_file = gyp.common.BuildFile(dependency) - MergeDicts( - target_dict, dependency_dict[key], build_file, dependency_build_file - ) - - -def AdjustStaticLibraryDependencies( - flat_list, targets, dependency_nodes, sort_dependencies -): - # Recompute target "dependencies" properties. For each static library - # target, remove "dependencies" entries referring to other static libraries, - # unless the dependency has the "hard_dependency" attribute set. For each - # linkable target, add a "dependencies" entry referring to all of the - # target's computed list of link dependencies (including static libraries - # if no such entry is already present. - for target in flat_list: - target_dict = targets[target] - target_type = target_dict["type"] - - if target_type == "static_library": - if "dependencies" not in target_dict: - continue - - target_dict["dependencies_original"] = target_dict.get("dependencies", [])[ - : - ] - - # A static library should not depend on another static library unless - # the dependency relationship is "hard," which should only be done when - # a dependent relies on some side effect other than just the build - # product, like a rule or action output. Further, if a target has a - # non-hard dependency, but that dependency exports a hard dependency, - # the non-hard dependency can safely be removed, but the exported hard - # dependency must be added to the target to keep the same dependency - # ordering. - dependencies = dependency_nodes[target].DirectAndImportedDependencies( - targets - ) - index = 0 - while index < len(dependencies): - dependency = dependencies[index] - dependency_dict = targets[dependency] - - # Remove every non-hard static library dependency and remove every - # non-static library dependency that isn't a direct dependency. - if ( - dependency_dict["type"] == "static_library" - and not dependency_dict.get("hard_dependency", False) - ) or ( - dependency_dict["type"] != "static_library" - and dependency not in target_dict["dependencies"] - ): - # Take the dependency out of the list, and don't increment index - # because the next dependency to analyze will shift into the index - # formerly occupied by the one being removed. - del dependencies[index] - else: - index = index + 1 - - # Update the dependencies. If the dependencies list is empty, it's not - # needed, so unhook it. - if len(dependencies) > 0: - target_dict["dependencies"] = dependencies - else: - del target_dict["dependencies"] - - elif target_type in linkable_types: - # Get a list of dependency targets that should be linked into this - # target. Add them to the dependencies list if they're not already - # present. - - link_dependencies = dependency_nodes[target].DependenciesToLinkAgainst( - targets - ) - for dependency in link_dependencies: - if dependency == target: - continue - if "dependencies" not in target_dict: - target_dict["dependencies"] = [] - if dependency not in target_dict["dependencies"]: - target_dict["dependencies"].append(dependency) - # Sort the dependencies list in the order from dependents to dependencies. - # e.g. If A and B depend on C and C depends on D, sort them in A, B, C, D. - # Note: flat_list is already sorted in the order from dependencies to - # dependents. - if sort_dependencies and "dependencies" in target_dict: - target_dict["dependencies"] = [ - dep - for dep in reversed(flat_list) - if dep in target_dict["dependencies"] - ] - - -# Initialize this here to speed up MakePathRelative. -exception_re = re.compile(r"""["']?[-/$<>^]""") - - -def MakePathRelative(to_file, fro_file, item): - # If item is a relative path, it's relative to the build file dict that it's - # coming from. Fix it up to make it relative to the build file dict that - # it's going into. - # Exception: any |item| that begins with these special characters is - # returned without modification. - # / Used when a path is already absolute (shortcut optimization; - # such paths would be returned as absolute anyway) - # $ Used for build environment variables - # - Used for some build environment flags (such as -lapr-1 in a - # "libraries" section) - # < Used for our own variable and command expansions (see ExpandVariables) - # > Used for our own variable and command expansions (see ExpandVariables) - # ^ Used for our own variable and command expansions (see ExpandVariables) - # - # "/' Used when a value is quoted. If these are present, then we - # check the second character instead. - # - if to_file == fro_file or exception_re.match(item): - return item - else: - # TODO(dglazkov) The backslash/forward-slash replacement at the end is a - # temporary measure. This should really be addressed by keeping all paths - # in POSIX until actual project generation. - ret = os.path.normpath( - os.path.join( - gyp.common.RelativePath( - os.path.dirname(fro_file), os.path.dirname(to_file) - ), - item, - ) - ).replace("\\", "/") - if item.endswith("/"): - ret += "/" - return ret - - -def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True): - # Python documentation recommends objects which do not support hash - # set this value to None. Python library objects follow this rule. - def is_hashable(val): - return val.__hash__ - - # If x is hashable, returns whether x is in s. Else returns whether x is in items. - def is_in_set_or_list(x, s, items): - if is_hashable(x): - return x in s - return x in items - - prepend_index = 0 - - # Make membership testing of hashables in |to| (in particular, strings) - # faster. - hashable_to_set = {x for x in to if is_hashable(x)} - for item in fro: - singleton = False - if type(item) in (str, int): - # The cheap and easy case. - to_item = MakePathRelative(to_file, fro_file, item) if is_paths else item - - if not (type(item) is str and item.startswith("-")): - # Any string that doesn't begin with a "-" is a singleton - it can - # only appear once in a list, to be enforced by the list merge append - # or prepend. - singleton = True - elif type(item) is dict: - # Make a copy of the dictionary, continuing to look for paths to fix. - # The other intelligent aspects of merge processing won't apply because - # item is being merged into an empty dict. - to_item = {} - MergeDicts(to_item, item, to_file, fro_file) - elif type(item) is list: - # Recurse, making a copy of the list. If the list contains any - # descendant dicts, path fixing will occur. Note that here, custom - # values for is_paths and append are dropped; those are only to be - # applied to |to| and |fro|, not sublists of |fro|. append shouldn't - # matter anyway because the new |to_item| list is empty. - to_item = [] - MergeLists(to_item, item, to_file, fro_file) - else: - raise TypeError( - "Attempt to merge list item of unsupported type " - + item.__class__.__name__ - ) - - if append: - # If appending a singleton that's already in the list, don't append. - # This ensures that the earliest occurrence of the item will stay put. - if not singleton or not is_in_set_or_list(to_item, hashable_to_set, to): - to.append(to_item) - if is_hashable(to_item): - hashable_to_set.add(to_item) - else: - # If prepending a singleton that's already in the list, remove the - # existing instance and proceed with the prepend. This ensures that the - # item appears at the earliest possible position in the list. - while singleton and to_item in to: - to.remove(to_item) - - # Don't just insert everything at index 0. That would prepend the new - # items to the list in reverse order, which would be an unwelcome - # surprise. - to.insert(prepend_index, to_item) - if is_hashable(to_item): - hashable_to_set.add(to_item) - prepend_index = prepend_index + 1 - - -def MergeDicts(to, fro, to_file, fro_file): - # I wanted to name the parameter "from" but it's a Python keyword... - for k, v in fro.items(): - # It would be nice to do "if not k in to: to[k] = v" but that wouldn't give - # copy semantics. Something else may want to merge from the |fro| dict - # later, and having the same dict ref pointed to twice in the tree isn't - # what anyone wants considering that the dicts may subsequently be - # modified. - if k in to: - bad_merge = False - if type(v) in (str, int): - if type(to[k]) not in (str, int): - bad_merge = True - elif not isinstance(v, type(to[k])): - bad_merge = True - - if bad_merge: - raise TypeError( - "Attempt to merge dict value of type " - + v.__class__.__name__ - + " into incompatible type " - + to[k].__class__.__name__ - + " for key " - + k - ) - if type(v) in (str, int): - # Overwrite the existing value, if any. Cheap and easy. - is_path = IsPathSection(k) - if is_path: - to[k] = MakePathRelative(to_file, fro_file, v) - else: - to[k] = v - elif type(v) is dict: - # Recurse, guaranteeing copies will be made of objects that require it. - if k not in to: - to[k] = {} - MergeDicts(to[k], v, to_file, fro_file) - elif type(v) is list: - # Lists in dicts can be merged with different policies, depending on - # how the key in the "from" dict (k, the from-key) is written. - # - # If the from-key has ...the to-list will have this action - # this character appended:... applied when receiving the from-list: - # = replace - # + prepend - # ? set, only if to-list does not yet exist - # (none) append - # - # This logic is list-specific, but since it relies on the associated - # dict key, it's checked in this dict-oriented function. - ext = k[-1] - append = True - if ext == "=": - list_base = k[:-1] - lists_incompatible = [list_base, list_base + "?"] - to[list_base] = [] - elif ext == "+": - list_base = k[:-1] - lists_incompatible = [list_base + "=", list_base + "?"] - append = False - elif ext == "?": - list_base = k[:-1] - lists_incompatible = [list_base, list_base + "=", list_base + "+"] - else: - list_base = k - lists_incompatible = [list_base + "=", list_base + "?"] - - # Some combinations of merge policies appearing together are meaningless. - # It's stupid to replace and append simultaneously, for example. Append - # and prepend are the only policies that can coexist. - for list_incompatible in lists_incompatible: - if list_incompatible in fro: - raise GypError( - "Incompatible list policies " + k + " and " + list_incompatible - ) - - if list_base in to: - if ext == "?": - # If the key ends in "?", the list will only be merged if it doesn't - # already exist. - continue - elif type(to[list_base]) is not list: - # This may not have been checked above if merging in a list with an - # extension character. - raise TypeError( - "Attempt to merge dict value of type " - + v.__class__.__name__ - + " into incompatible type " - + to[list_base].__class__.__name__ - + " for key " - + list_base - + "(" - + k - + ")" - ) - else: - to[list_base] = [] - - # Call MergeLists, which will make copies of objects that require it. - # MergeLists can recurse back into MergeDicts, although this will be - # to make copies of dicts (with paths fixed), there will be no - # subsequent dict "merging" once entering a list because lists are - # always replaced, appended to, or prepended to. - is_paths = IsPathSection(list_base) - MergeLists(to[list_base], v, to_file, fro_file, is_paths, append) - else: - raise TypeError( - "Attempt to merge dict value of unsupported type " - + v.__class__.__name__ - + " for key " - + k - ) - - -def MergeConfigWithInheritance( - new_configuration_dict, build_file, target_dict, configuration, visited -): - # Skip if previously visited. - if configuration in visited: - return - - # Look at this configuration. - configuration_dict = target_dict["configurations"][configuration] - - # Merge in parents. - for parent in configuration_dict.get("inherit_from", []): - MergeConfigWithInheritance( - new_configuration_dict, - build_file, - target_dict, - parent, - visited + [configuration], - ) - - # Merge it into the new config. - MergeDicts(new_configuration_dict, configuration_dict, build_file, build_file) - - # Drop abstract. - if "abstract" in new_configuration_dict: - del new_configuration_dict["abstract"] - - -def SetUpConfigurations(target, target_dict): - # key_suffixes is a list of key suffixes that might appear on key names. - # These suffixes are handled in conditional evaluations (for =, +, and ?) - # and rules/exclude processing (for ! and /). Keys with these suffixes - # should be treated the same as keys without. - key_suffixes = ["=", "+", "?", "!", "/"] - - build_file = gyp.common.BuildFile(target) - - # Provide a single configuration by default if none exists. - # TODO(mark): Signal an error if default_configurations exists but - # configurations does not. - if "configurations" not in target_dict: - target_dict["configurations"] = {"Default": {}} - if "default_configuration" not in target_dict: - concrete = [ - i - for (i, config) in target_dict["configurations"].items() - if not config.get("abstract") - ] - target_dict["default_configuration"] = sorted(concrete)[0] - - merged_configurations = {} - configs = target_dict["configurations"] - for (configuration, old_configuration_dict) in configs.items(): - # Skip abstract configurations (saves work only). - if old_configuration_dict.get("abstract"): - continue - # Configurations inherit (most) settings from the enclosing target scope. - # Get the inheritance relationship right by making a copy of the target - # dict. - new_configuration_dict = {} - for (key, target_val) in target_dict.items(): - key_ext = key[-1:] - key_base = key[:-1] if key_ext in key_suffixes else key - if key_base not in non_configuration_keys: - new_configuration_dict[key] = gyp.simple_copy.deepcopy(target_val) - - # Merge in configuration (with all its parents first). - MergeConfigWithInheritance( - new_configuration_dict, build_file, target_dict, configuration, [] - ) - - merged_configurations[configuration] = new_configuration_dict - - # Put the new configurations back into the target dict as a configuration. - for configuration in merged_configurations: - target_dict["configurations"][configuration] = merged_configurations[ - configuration - ] - - # Now drop all the abstract ones. - configs = target_dict["configurations"] - target_dict["configurations"] = { - k: v for k, v in configs.items() if not v.get("abstract") - } - - # Now that all of the target's configurations have been built, go through - # the target dict's keys and remove everything that's been moved into a - # "configurations" section. - delete_keys = [] - for key in target_dict: - key_ext = key[-1:] - key_base = key[:-1] if key_ext in key_suffixes else key - if key_base not in non_configuration_keys: - delete_keys.append(key) - for key in delete_keys: - del target_dict[key] - - # Check the configurations to see if they contain invalid keys. - for configuration in target_dict["configurations"]: - configuration_dict = target_dict["configurations"][configuration] - for key in configuration_dict: - if key in invalid_configuration_keys: - raise GypError( - "%s not allowed in the %s configuration, found in " - "target %s" % (key, configuration, target) - ) - - -def ProcessListFiltersInDict(name, the_dict): - """Process regular expression and exclusion-based filters on lists. - - An exclusion list is in a dict key named with a trailing "!", like - "sources!". Every item in such a list is removed from the associated - main list, which in this example, would be "sources". Removed items are - placed into a "sources_excluded" list in the dict. - - Regular expression (regex) filters are contained in dict keys named with a - trailing "/", such as "sources/" to operate on the "sources" list. Regex - filters in a dict take the form: - 'sources/': [ ['exclude', '_(linux|mac|win)\\.cc$'], - ['include', '_mac\\.cc$'] ], - The first filter says to exclude all files ending in _linux.cc, _mac.cc, and - _win.cc. The second filter then includes all files ending in _mac.cc that - are now or were once in the "sources" list. Items matching an "exclude" - filter are subject to the same processing as would occur if they were listed - by name in an exclusion list (ending in "!"). Items matching an "include" - filter are brought back into the main list if previously excluded by an - exclusion list or exclusion regex filter. Subsequent matching "exclude" - patterns can still cause items to be excluded after matching an "include". - """ - - # Look through the dictionary for any lists whose keys end in "!" or "/". - # These are lists that will be treated as exclude lists and regular - # expression-based exclude/include lists. Collect the lists that are - # needed first, looking for the lists that they operate on, and assemble - # then into |lists|. This is done in a separate loop up front, because - # the _included and _excluded keys need to be added to the_dict, and that - # can't be done while iterating through it. - - lists = [] - del_lists = [] - for key, value in the_dict.items(): - operation = key[-1] - if operation not in {"!", "/"}: - continue - - if type(value) is not list: - raise ValueError( - name + " key " + key + " must be list, not " + value.__class__.__name__ - ) - - list_key = key[:-1] - if list_key not in the_dict: - # This happens when there's a list like "sources!" but no corresponding - # "sources" list. Since there's nothing for it to operate on, queue up - # the "sources!" list for deletion now. - del_lists.append(key) - continue - - if type(the_dict[list_key]) is not list: - value = the_dict[list_key] - raise ValueError( - name - + " key " - + list_key - + " must be list, not " - + value.__class__.__name__ - + " when applying " - + {"!": "exclusion", "/": "regex"}[operation] - ) - - if list_key not in lists: - lists.append(list_key) - - # Delete the lists that are known to be unneeded at this point. - for del_list in del_lists: - del the_dict[del_list] - - for list_key in lists: - the_list = the_dict[list_key] - - # Initialize the list_actions list, which is parallel to the_list. Each - # item in list_actions identifies whether the corresponding item in - # the_list should be excluded, unconditionally preserved (included), or - # whether no exclusion or inclusion has been applied. Items for which - # no exclusion or inclusion has been applied (yet) have value -1, items - # excluded have value 0, and items included have value 1. Includes and - # excludes override previous actions. All items in list_actions are - # initialized to -1 because no excludes or includes have been processed - # yet. - list_actions = list((-1,) * len(the_list)) - - exclude_key = list_key + "!" - if exclude_key in the_dict: - for exclude_item in the_dict[exclude_key]: - for index, list_item in enumerate(the_list): - if exclude_item == list_item: - # This item matches the exclude_item, so set its action to 0 - # (exclude). - list_actions[index] = 0 - - # The "whatever!" list is no longer needed, dump it. - del the_dict[exclude_key] - - regex_key = list_key + "/" - if regex_key in the_dict: - for regex_item in the_dict[regex_key]: - [action, pattern] = regex_item - pattern_re = re.compile(pattern) - - if action == "exclude": - # This item matches an exclude regex, set its value to 0 (exclude). - action_value = 0 - elif action == "include": - # This item matches an include regex, set its value to 1 (include). - action_value = 1 - else: - # This is an action that doesn't make any sense. - raise ValueError( - "Unrecognized action " - + action - + " in " - + name - + " key " - + regex_key - ) - - for index, list_item in enumerate(the_list): - if list_actions[index] == action_value: - # Even if the regex matches, nothing will change so continue - # (regex searches are expensive). - continue - if pattern_re.search(list_item): - # Regular expression match. - list_actions[index] = action_value - - # The "whatever/" list is no longer needed, dump it. - del the_dict[regex_key] - - # Add excluded items to the excluded list. - # - # Note that exclude_key ("sources!") is different from excluded_key - # ("sources_excluded"). The exclude_key list is input and it was already - # processed and deleted; the excluded_key list is output and it's about - # to be created. - excluded_key = list_key + "_excluded" - if excluded_key in the_dict: - raise GypError( - name + " key " + excluded_key + " must not be present prior " - " to applying exclusion/regex filters for " + list_key - ) - - excluded_list = [] - - # Go backwards through the list_actions list so that as items are deleted, - # the indices of items that haven't been seen yet don't shift. That means - # that things need to be prepended to excluded_list to maintain them in the - # same order that they existed in the_list. - for index in range(len(list_actions) - 1, -1, -1): - if list_actions[index] == 0: - # Dump anything with action 0 (exclude). Keep anything with action 1 - # (include) or -1 (no include or exclude seen for the item). - excluded_list.insert(0, the_list[index]) - del the_list[index] - - # If anything was excluded, put the excluded list into the_dict at - # excluded_key. - if len(excluded_list) > 0: - the_dict[excluded_key] = excluded_list - - # Now recurse into subdicts and lists that may contain dicts. - for key, value in the_dict.items(): - if type(value) is dict: - ProcessListFiltersInDict(key, value) - elif type(value) is list: - ProcessListFiltersInList(key, value) - - -def ProcessListFiltersInList(name, the_list): - for item in the_list: - if type(item) is dict: - ProcessListFiltersInDict(name, item) - elif type(item) is list: - ProcessListFiltersInList(name, item) - - -def ValidateTargetType(target, target_dict): - """Ensures the 'type' field on the target is one of the known types. - - Arguments: - target: string, name of target. - target_dict: dict, target spec. - - Raises an exception on error. - """ - VALID_TARGET_TYPES = ( - "executable", - "loadable_module", - "static_library", - "shared_library", - "mac_kernel_extension", - "none", - "windows_driver", - ) - target_type = target_dict.get("type", None) - if target_type not in VALID_TARGET_TYPES: - raise GypError( - "Target %s has an invalid target type '%s'. " - "Must be one of %s." % (target, target_type, "/".join(VALID_TARGET_TYPES)) - ) - if ( - target_dict.get("standalone_static_library", 0) - and not target_type == "static_library" - ): - raise GypError( - "Target %s has type %s but standalone_static_library flag is" - " only valid for static_library type." % (target, target_type) - ) - - -def ValidateRulesInTarget(target, target_dict, extra_sources_for_rules): - """Ensures that the rules sections in target_dict are valid and consistent, - and determines which sources they apply to. - - Arguments: - target: string, name of target. - target_dict: dict, target spec containing "rules" and "sources" lists. - extra_sources_for_rules: a list of keys to scan for rule matches in - addition to 'sources'. - """ - - # Dicts to map between values found in rules' 'rule_name' and 'extension' - # keys and the rule dicts themselves. - rule_names = {} - rule_extensions = {} - - rules = target_dict.get("rules", []) - for rule in rules: - # Make sure that there's no conflict among rule names and extensions. - rule_name = rule["rule_name"] - if rule_name in rule_names: - raise GypError( - f"rule {rule_name} exists in duplicate, target {target}" - ) - rule_names[rule_name] = rule - - rule_extension = rule["extension"] - if rule_extension.startswith("."): - rule_extension = rule_extension[1:] - if rule_extension in rule_extensions: - raise GypError( - ( - "extension %s associated with multiple rules, " - + "target %s rules %s and %s" - ) - % ( - rule_extension, - target, - rule_extensions[rule_extension]["rule_name"], - rule_name, - ) - ) - rule_extensions[rule_extension] = rule - - # Make sure rule_sources isn't already there. It's going to be - # created below if needed. - if "rule_sources" in rule: - raise GypError( - "rule_sources must not exist in input, target %s rule %s" - % (target, rule_name) - ) - - rule_sources = [] - source_keys = ["sources"] - source_keys.extend(extra_sources_for_rules) - for source_key in source_keys: - for source in target_dict.get(source_key, []): - (source_root, source_extension) = os.path.splitext(source) - if source_extension.startswith("."): - source_extension = source_extension[1:] - if source_extension == rule_extension: - rule_sources.append(source) - - if len(rule_sources) > 0: - rule["rule_sources"] = rule_sources - - -def ValidateRunAsInTarget(target, target_dict, build_file): - target_name = target_dict.get("target_name") - run_as = target_dict.get("run_as") - if not run_as: - return - if type(run_as) is not dict: - raise GypError( - "The 'run_as' in target %s from file %s should be a " - "dictionary." % (target_name, build_file) - ) - action = run_as.get("action") - if not action: - raise GypError( - "The 'run_as' in target %s from file %s must have an " - "'action' section." % (target_name, build_file) - ) - if type(action) is not list: - raise GypError( - "The 'action' for 'run_as' in target %s from file %s " - "must be a list." % (target_name, build_file) - ) - working_directory = run_as.get("working_directory") - if working_directory and type(working_directory) is not str: - raise GypError( - "The 'working_directory' for 'run_as' in target %s " - "in file %s should be a string." % (target_name, build_file) - ) - environment = run_as.get("environment") - if environment and type(environment) is not dict: - raise GypError( - "The 'environment' for 'run_as' in target %s " - "in file %s should be a dictionary." % (target_name, build_file) - ) - - -def ValidateActionsInTarget(target, target_dict, build_file): - """Validates the inputs to the actions in a target.""" - target_name = target_dict.get("target_name") - actions = target_dict.get("actions", []) - for action in actions: - action_name = action.get("action_name") - if not action_name: - raise GypError( - "Anonymous action in target %s. " - "An action must have an 'action_name' field." % target_name - ) - inputs = action.get("inputs", None) - if inputs is None: - raise GypError("Action in target %s has no inputs." % target_name) - action_command = action.get("action") - if action_command and not action_command[0]: - raise GypError("Empty action as command in target %s." % target_name) - - -def TurnIntIntoStrInDict(the_dict): - """Given dict the_dict, recursively converts all integers into strings. - """ - # Use items instead of iteritems because there's no need to try to look at - # reinserted keys and their associated values. - for k, v in the_dict.items(): - if type(v) is int: - v = str(v) - the_dict[k] = v - elif type(v) is dict: - TurnIntIntoStrInDict(v) - elif type(v) is list: - TurnIntIntoStrInList(v) - - if type(k) is int: - del the_dict[k] - the_dict[str(k)] = v - - -def TurnIntIntoStrInList(the_list): - """Given list the_list, recursively converts all integers into strings. - """ - for index, item in enumerate(the_list): - if type(item) is int: - the_list[index] = str(item) - elif type(item) is dict: - TurnIntIntoStrInDict(item) - elif type(item) is list: - TurnIntIntoStrInList(item) - - -def PruneUnwantedTargets(targets, flat_list, dependency_nodes, root_targets, data): - """Return only the targets that are deep dependencies of |root_targets|.""" - qualified_root_targets = [] - for target in root_targets: - target = target.strip() - qualified_targets = gyp.common.FindQualifiedTargets(target, flat_list) - if not qualified_targets: - raise GypError("Could not find target %s" % target) - qualified_root_targets.extend(qualified_targets) - - wanted_targets = {} - for target in qualified_root_targets: - wanted_targets[target] = targets[target] - for dependency in dependency_nodes[target].DeepDependencies(): - wanted_targets[dependency] = targets[dependency] - - wanted_flat_list = [t for t in flat_list if t in wanted_targets] - - # Prune unwanted targets from each build_file's data dict. - for build_file in data["target_build_files"]: - if "targets" not in data[build_file]: - continue - new_targets = [] - for target in data[build_file]["targets"]: - qualified_name = gyp.common.QualifiedTarget( - build_file, target["target_name"], target["toolset"] - ) - if qualified_name in wanted_targets: - new_targets.append(target) - data[build_file]["targets"] = new_targets - - return wanted_targets, wanted_flat_list - - -def VerifyNoCollidingTargets(targets): - """Verify that no two targets in the same directory share the same name. - - Arguments: - targets: A list of targets in the form 'path/to/file.gyp:target_name'. - """ - # Keep a dict going from 'subdirectory:target_name' to 'foo.gyp'. - used = {} - for target in targets: - # Separate out 'path/to/file.gyp, 'target_name' from - # 'path/to/file.gyp:target_name'. - path, name = target.rsplit(":", 1) - # Separate out 'path/to', 'file.gyp' from 'path/to/file.gyp'. - subdir, gyp = os.path.split(path) - # Use '.' for the current directory '', so that the error messages make - # more sense. - if not subdir: - subdir = "." - # Prepare a key like 'path/to:target_name'. - key = subdir + ":" + name - if key in used: - # Complain if this target is already used. - raise GypError( - 'Duplicate target name "%s" in directory "%s" used both ' - 'in "%s" and "%s".' % (name, subdir, gyp, used[key]) - ) - used[key] = gyp - - -def SetGeneratorGlobals(generator_input_info): - # Set up path_sections and non_configuration_keys with the default data plus - # the generator-specific data. - global path_sections - path_sections = set(base_path_sections) - path_sections.update(generator_input_info["path_sections"]) - - global non_configuration_keys - non_configuration_keys = base_non_configuration_keys[:] - non_configuration_keys.extend(generator_input_info["non_configuration_keys"]) - - global multiple_toolsets - multiple_toolsets = generator_input_info["generator_supports_multiple_toolsets"] - - global generator_filelist_paths - generator_filelist_paths = generator_input_info["generator_filelist_paths"] - - -def Load( - build_files, - variables, - includes, - depth, - generator_input_info, - check, - circular_check, - parallel, - root_targets, -): - SetGeneratorGlobals(generator_input_info) - # A generator can have other lists (in addition to sources) be processed - # for rules. - extra_sources_for_rules = generator_input_info["extra_sources_for_rules"] - - # Load build files. This loads every target-containing build file into - # the |data| dictionary such that the keys to |data| are build file names, - # and the values are the entire build file contents after "early" or "pre" - # processing has been done and includes have been resolved. - # NOTE: data contains both "target" files (.gyp) and "includes" (.gypi), as - # well as meta-data (e.g. 'included_files' key). 'target_build_files' keeps - # track of the keys corresponding to "target" files. - data = {"target_build_files": set()} - # Normalize paths everywhere. This is important because paths will be - # used as keys to the data dict and for references between input files. - build_files = set(map(os.path.normpath, build_files)) - if parallel: - LoadTargetBuildFilesParallel( - build_files, data, variables, includes, depth, check, generator_input_info - ) - else: - aux_data = {} - for build_file in build_files: - try: - LoadTargetBuildFile( - build_file, data, aux_data, variables, includes, depth, check, True - ) - except Exception as e: - gyp.common.ExceptionAppend(e, "while trying to load %s" % build_file) - raise - - # Build a dict to access each target's subdict by qualified name. - targets = BuildTargetsDict(data) - - # Fully qualify all dependency links. - QualifyDependencies(targets) - - # Remove self-dependencies from targets that have 'prune_self_dependencies' - # set to 1. - RemoveSelfDependencies(targets) - - # Expand dependencies specified as build_file:*. - ExpandWildcardDependencies(targets, data) - - # Remove all dependencies marked as 'link_dependency' from the targets of - # type 'none'. - RemoveLinkDependenciesFromNoneTargets(targets) - - # Apply exclude (!) and regex (/) list filters only for dependency_sections. - for target_name, target_dict in targets.items(): - tmp_dict = {} - for key_base in dependency_sections: - for op in ("", "!", "/"): - key = key_base + op - if key in target_dict: - tmp_dict[key] = target_dict[key] - del target_dict[key] - ProcessListFiltersInDict(target_name, tmp_dict) - # Write the results back to |target_dict|. - for key in tmp_dict: - target_dict[key] = tmp_dict[key] - - # Make sure every dependency appears at most once. - RemoveDuplicateDependencies(targets) - - if circular_check: - # Make sure that any targets in a.gyp don't contain dependencies in other - # .gyp files that further depend on a.gyp. - VerifyNoGYPFileCircularDependencies(targets) - - [dependency_nodes, flat_list] = BuildDependencyList(targets) - - if root_targets: - # Remove, from |targets| and |flat_list|, the targets that are not deep - # dependencies of the targets specified in |root_targets|. - targets, flat_list = PruneUnwantedTargets( - targets, flat_list, dependency_nodes, root_targets, data - ) - - # Check that no two targets in the same directory have the same name. - VerifyNoCollidingTargets(flat_list) - - # Handle dependent settings of various types. - for settings_type in [ - "all_dependent_settings", - "direct_dependent_settings", - "link_settings", - ]: - DoDependentSettings(settings_type, flat_list, targets, dependency_nodes) - - # Take out the dependent settings now that they've been published to all - # of the targets that require them. - for target in flat_list: - if settings_type in targets[target]: - del targets[target][settings_type] - - # Make sure static libraries don't declare dependencies on other static - # libraries, but that linkables depend on all unlinked static libraries - # that they need so that their link steps will be correct. - gii = generator_input_info - if gii["generator_wants_static_library_dependencies_adjusted"]: - AdjustStaticLibraryDependencies( - flat_list, - targets, - dependency_nodes, - gii["generator_wants_sorted_dependencies"], - ) - - # Apply "post"/"late"/"target" variable expansions and condition evaluations. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ProcessVariablesAndConditionsInDict( - target_dict, PHASE_LATE, variables, build_file - ) - - # Move everything that can go into a "configurations" section into one. - for target in flat_list: - target_dict = targets[target] - SetUpConfigurations(target, target_dict) - - # Apply exclude (!) and regex (/) list filters. - for target in flat_list: - target_dict = targets[target] - ProcessListFiltersInDict(target, target_dict) - - # Apply "latelate" variable expansions and condition evaluations. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ProcessVariablesAndConditionsInDict( - target_dict, PHASE_LATELATE, variables, build_file - ) - - # Make sure that the rules make sense, and build up rule_sources lists as - # needed. Not all generators will need to use the rule_sources lists, but - # some may, and it seems best to build the list in a common spot. - # Also validate actions and run_as elements in targets. - for target in flat_list: - target_dict = targets[target] - build_file = gyp.common.BuildFile(target) - ValidateTargetType(target, target_dict) - ValidateRulesInTarget(target, target_dict, extra_sources_for_rules) - ValidateRunAsInTarget(target, target_dict, build_file) - ValidateActionsInTarget(target, target_dict, build_file) - - # Generators might not expect ints. Turn them into strs. - TurnIntIntoStrInDict(data) - - # TODO(mark): Return |data| for now because the generator needs a list of - # build files that came in. In the future, maybe it should just accept - # a list, and not the whole data dict. - return [flat_list, targets, data] diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py deleted file mode 100755 index a18f72e..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright 2013 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Unit tests for the input.py file.""" - -import gyp.input -import unittest - - -class TestFindCycles(unittest.TestCase): - def setUp(self): - self.nodes = {} - for x in ("a", "b", "c", "d", "e"): - self.nodes[x] = gyp.input.DependencyGraphNode(x) - - def _create_dependency(self, dependent, dependency): - dependent.dependencies.append(dependency) - dependency.dependents.append(dependent) - - def test_no_cycle_empty_graph(self): - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_no_cycle_line(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["d"]) - - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_no_cycle_dag(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["a"], self.nodes["c"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - - for label, node in self.nodes.items(): - self.assertEqual([], node.FindCycles()) - - def test_cycle_self_reference(self): - self._create_dependency(self.nodes["a"], self.nodes["a"]) - - self.assertEqual( - [[self.nodes["a"], self.nodes["a"]]], self.nodes["a"].FindCycles() - ) - - def test_cycle_two_nodes(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["a"]) - - self.assertEqual( - [[self.nodes["a"], self.nodes["b"], self.nodes["a"]]], - self.nodes["a"].FindCycles(), - ) - self.assertEqual( - [[self.nodes["b"], self.nodes["a"], self.nodes["b"]]], - self.nodes["b"].FindCycles(), - ) - - def test_two_cycles(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["a"]) - - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["b"]) - - cycles = self.nodes["a"].FindCycles() - self.assertTrue([self.nodes["a"], self.nodes["b"], self.nodes["a"]] in cycles) - self.assertTrue([self.nodes["b"], self.nodes["c"], self.nodes["b"]] in cycles) - self.assertEqual(2, len(cycles)) - - def test_big_cycle(self): - self._create_dependency(self.nodes["a"], self.nodes["b"]) - self._create_dependency(self.nodes["b"], self.nodes["c"]) - self._create_dependency(self.nodes["c"], self.nodes["d"]) - self._create_dependency(self.nodes["d"], self.nodes["e"]) - self._create_dependency(self.nodes["e"], self.nodes["a"]) - - self.assertEqual( - [ - [ - self.nodes["a"], - self.nodes["b"], - self.nodes["c"], - self.nodes["d"], - self.nodes["e"], - self.nodes["a"], - ] - ], - self.nodes["a"].FindCycles(), - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py deleted file mode 100755 index 59647c9..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +++ /dev/null @@ -1,771 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions to perform Xcode-style build steps. - -These functions are executed via gyp-mac-tool when using the Makefile generator. -""" - - -import fcntl -import fnmatch -import glob -import json -import os -import plistlib -import re -import shutil -import struct -import subprocess -import sys -import tempfile - - -def main(args): - executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class MacTool: - """This class performs all the Mac tooling steps. The methods can either be - executed directly, or dispatched from an argument list.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace("-", "") - - def ExecCopyBundleResource(self, source, dest, convert_to_binary): - """Copies a resource file to the bundle/Resources directory, performing any - necessary compilation on each resource.""" - convert_to_binary = convert_to_binary == "True" - extension = os.path.splitext(source)[1].lower() - if os.path.isdir(source): - # Copy tree. - # TODO(thakis): This copies file attributes like mtime, while the - # single-file branch below doesn't. This should probably be changed to - # be consistent with the single-file branch. - if os.path.exists(dest): - shutil.rmtree(dest) - shutil.copytree(source, dest) - elif extension == ".xib": - return self._CopyXIBFile(source, dest) - elif extension == ".storyboard": - return self._CopyXIBFile(source, dest) - elif extension == ".strings" and not convert_to_binary: - self._CopyStringsFile(source, dest) - else: - if os.path.exists(dest): - os.unlink(dest) - shutil.copy(source, dest) - - if convert_to_binary and extension in (".plist", ".strings"): - self._ConvertToBinary(dest) - - def _CopyXIBFile(self, source, dest): - """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - - # ibtool sometimes crashes with relative paths. See crbug.com/314728. - base = os.path.dirname(os.path.realpath(__file__)) - if os.path.relpath(source): - source = os.path.join(base, source) - if os.path.relpath(dest): - dest = os.path.join(base, dest) - - args = ["xcrun", "ibtool", "--errors", "--warnings", "--notices"] - - if os.environ["XCODE_VERSION_ACTUAL"] > "0700": - args.extend(["--auto-activate-custom-fonts"]) - if "IPHONEOS_DEPLOYMENT_TARGET" in os.environ: - args.extend( - [ - "--target-device", - "iphone", - "--target-device", - "ipad", - "--minimum-deployment-target", - os.environ["IPHONEOS_DEPLOYMENT_TARGET"], - ] - ) - else: - args.extend( - [ - "--target-device", - "mac", - "--minimum-deployment-target", - os.environ["MACOSX_DEPLOYMENT_TARGET"], - ] - ) - - args.extend( - ["--output-format", "human-readable-text", "--compile", dest, source] - ) - - ibtool_section_re = re.compile(r"/\*.*\*/") - ibtool_re = re.compile(r".*note:.*is clipping its content") - try: - stdout = subprocess.check_output(args) - except subprocess.CalledProcessError as e: - print(e.output) - raise - current_section_header = None - for line in stdout.splitlines(): - if ibtool_section_re.match(line): - current_section_header = line - elif not ibtool_re.match(line): - if current_section_header: - print(current_section_header) - current_section_header = None - print(line) - return 0 - - def _ConvertToBinary(self, dest): - subprocess.check_call( - ["xcrun", "plutil", "-convert", "binary1", "-o", dest, dest] - ) - - def _CopyStringsFile(self, source, dest): - """Copies a .strings file using iconv to reconvert the input into UTF-16.""" - input_code = self._DetectInputEncoding(source) or "UTF-8" - - # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call - # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints - # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing - # semicolon in dictionary. - # on invalid files. Do the same kind of validation. - import CoreFoundation - - with open(source, "rb") as in_file: - s = in_file.read() - d = CoreFoundation.CFDataCreate(None, s, len(s)) - _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) - if error: - return - - with open(dest, "wb") as fp: - fp.write(s.decode(input_code).encode("UTF-16")) - - def _DetectInputEncoding(self, file_name): - """Reads the first few bytes from file_name and tries to guess the text - encoding. Returns None as a guess if it can't detect it.""" - with open(file_name, "rb") as fp: - try: - header = fp.read(3) - except Exception: - return None - if header.startswith(b"\xFE\xFF"): - return "UTF-16" - elif header.startswith(b"\xFF\xFE"): - return "UTF-16" - elif header.startswith(b"\xEF\xBB\xBF"): - return "UTF-8" - else: - return None - - def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys): - """Copies the |source| Info.plist to the destination directory |dest|.""" - # Read the source Info.plist into memory. - with open(source) as fd: - lines = fd.read() - - # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). - plist = plistlib.readPlistFromString(lines) - if keys: - plist.update(json.loads(keys[0])) - lines = plistlib.writePlistToString(plist) - - # Go through all the environment variables and replace them as variables in - # the file. - IDENT_RE = re.compile(r"[_/\s]") - for key in os.environ: - if key.startswith("_"): - continue - evar = "${%s}" % key - evalue = os.environ[key] - lines = lines.replace(lines, evar, evalue) - - # Xcode supports various suffices on environment variables, which are - # all undocumented. :rfc1034identifier is used in the standard project - # template these days, and :identifier was used earlier. They are used to - # convert non-url characters into things that look like valid urls -- - # except that the replacement character for :identifier, '_' isn't valid - # in a URL either -- oops, hence :rfc1034identifier was born. - evar = "${%s:identifier}" % key - evalue = IDENT_RE.sub("_", os.environ[key]) - lines = lines.replace(lines, evar, evalue) - - evar = "${%s:rfc1034identifier}" % key - evalue = IDENT_RE.sub("-", os.environ[key]) - lines = lines.replace(lines, evar, evalue) - - # Remove any keys with values that haven't been replaced. - lines = lines.splitlines() - for i in range(len(lines)): - if lines[i].strip().startswith("${"): - lines[i] = None - lines[i - 1] = None - lines = "\n".join(line for line in lines if line is not None) - - # Write out the file with variables replaced. - with open(dest, "w") as fd: - fd.write(lines) - - # Now write out PkgInfo file now that the Info.plist file has been - # "compiled". - self._WritePkgInfo(dest) - - if convert_to_binary == "True": - self._ConvertToBinary(dest) - - def _WritePkgInfo(self, info_plist): - """This writes the PkgInfo file from the data stored in Info.plist.""" - plist = plistlib.readPlist(info_plist) - if not plist: - return - - # Only create PkgInfo for executable types. - package_type = plist["CFBundlePackageType"] - if package_type != "APPL": - return - - # The format of PkgInfo is eight characters, representing the bundle type - # and bundle signature, each four characters. If that is missing, four - # '?' characters are used instead. - signature_code = plist.get("CFBundleSignature", "????") - if len(signature_code) != 4: # Wrong length resets everything, too. - signature_code = "?" * 4 - - dest = os.path.join(os.path.dirname(info_plist), "PkgInfo") - with open(dest, "w") as fp: - fp.write(f"{package_type}{signature_code}") - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - fd = os.open(lockfile, os.O_RDONLY | os.O_NOCTTY | os.O_CREAT, 0o666) - fcntl.flock(fd, fcntl.LOCK_EX) - return subprocess.call(cmd_list) - - def ExecFilterLibtool(self, *cmd_list): - """Calls libtool and filters out '/path/to/libtool: file: foo.o has no - symbols'.""" - libtool_re = re.compile( - r"^.*libtool: (?:for architecture: \S* )?" r"file: .* has no symbols$" - ) - libtool_re5 = re.compile( - r"^.*libtool: warning for library: " - + r".* the table of contents is empty " - + r"\(no object file members in the library define global symbols\)$" - ) - env = os.environ.copy() - # Ref: - # http://www.opensource.apple.com/source/cctools/cctools-809/misc/libtool.c - # The problem with this flag is that it resets the file mtime on the file to - # epoch=0, e.g. 1970-1-1 or 1969-12-31 depending on timezone. - env["ZERO_AR_DATE"] = "1" - libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE, env=env) - err = libtoolout.communicate()[1].decode("utf-8") - for line in err.splitlines(): - if not libtool_re.match(line) and not libtool_re5.match(line): - print(line, file=sys.stderr) - # Unconditionally touch the output .a file on the command line if present - # and the command succeeded. A bit hacky. - if not libtoolout.returncode: - for i in range(len(cmd_list) - 1): - if cmd_list[i] == "-o" and cmd_list[i + 1].endswith(".a"): - os.utime(cmd_list[i + 1], None) - break - return libtoolout.returncode - - def ExecPackageIosFramework(self, framework): - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split(".")[0] - module_path = os.path.join(framework, "Modules") - if not os.path.exists(module_path): - os.mkdir(module_path) - module_template = ( - "framework module %s {\n" - ' umbrella header "%s.h"\n' - "\n" - " export *\n" - " module * { export * }\n" - "}\n" % (binary, binary) - ) - - with open(os.path.join(module_path, "module.modulemap"), "w") as module_file: - module_file.write(module_template) - - def ExecPackageFramework(self, framework, version): - """Takes a path to Something.framework and the Current version of that and - sets up all the symlinks.""" - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split(".")[0] - - CURRENT = "Current" - RESOURCES = "Resources" - VERSIONS = "Versions" - - if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): - # Binary-less frameworks don't seem to contain symlinks (see e.g. - # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). - return - - # Move into the framework directory to set the symlinks correctly. - pwd = os.getcwd() - os.chdir(framework) - - # Set up the Current version. - self._Relink(version, os.path.join(VERSIONS, CURRENT)) - - # Set up the root symlinks. - self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) - self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) - - # Back to where we were before! - os.chdir(pwd) - - def _Relink(self, dest, link): - """Creates a symlink to |dest| named |link|. If |link| already exists, - it is overwritten.""" - if os.path.lexists(link): - os.remove(link) - os.symlink(dest, link) - - def ExecCompileIosFrameworkHeaderMap(self, out, framework, *all_headers): - framework_name = os.path.basename(framework).split(".")[0] - all_headers = [os.path.abspath(header) for header in all_headers] - filelist = {} - for header in all_headers: - filename = os.path.basename(header) - filelist[filename] = header - filelist[os.path.join(framework_name, filename)] = header - WriteHmap(out, filelist) - - def ExecCopyIosFrameworkHeaders(self, framework, *copy_headers): - header_path = os.path.join(framework, "Headers") - if not os.path.exists(header_path): - os.makedirs(header_path) - for header in copy_headers: - shutil.copy(header, os.path.join(header_path, os.path.basename(header))) - - def ExecCompileXcassets(self, keys, *inputs): - """Compiles multiple .xcassets files into a single .car file. - - This invokes 'actool' to compile all the inputs .xcassets files. The - |keys| arguments is a json-encoded dictionary of extra arguments to - pass to 'actool' when the asset catalogs contains an application icon - or a launch image. - - Note that 'actool' does not create the Assets.car file if the asset - catalogs does not contains imageset. - """ - command_line = [ - "xcrun", - "actool", - "--output-format", - "human-readable-text", - "--compress-pngs", - "--notices", - "--warnings", - "--errors", - ] - is_iphone_target = "IPHONEOS_DEPLOYMENT_TARGET" in os.environ - if is_iphone_target: - platform = os.environ["CONFIGURATION"].split("-")[-1] - if platform not in ("iphoneos", "iphonesimulator"): - platform = "iphonesimulator" - command_line.extend( - [ - "--platform", - platform, - "--target-device", - "iphone", - "--target-device", - "ipad", - "--minimum-deployment-target", - os.environ["IPHONEOS_DEPLOYMENT_TARGET"], - "--compile", - os.path.abspath(os.environ["CONTENTS_FOLDER_PATH"]), - ] - ) - else: - command_line.extend( - [ - "--platform", - "macosx", - "--target-device", - "mac", - "--minimum-deployment-target", - os.environ["MACOSX_DEPLOYMENT_TARGET"], - "--compile", - os.path.abspath(os.environ["UNLOCALIZED_RESOURCES_FOLDER_PATH"]), - ] - ) - if keys: - keys = json.loads(keys) - for key, value in keys.items(): - arg_name = "--" + key - if isinstance(value, bool): - if value: - command_line.append(arg_name) - elif isinstance(value, list): - for v in value: - command_line.append(arg_name) - command_line.append(str(v)) - else: - command_line.append(arg_name) - command_line.append(str(value)) - # Note: actool crashes if inputs path are relative, so use os.path.abspath - # to get absolute path name for inputs. - command_line.extend(map(os.path.abspath, inputs)) - subprocess.check_call(command_line) - - def ExecMergeInfoPlist(self, output, *inputs): - """Merge multiple .plist files into a single .plist file.""" - merged_plist = {} - for path in inputs: - plist = self._LoadPlistMaybeBinary(path) - self._MergePlist(merged_plist, plist) - plistlib.writePlist(merged_plist, output) - - def ExecCodeSignBundle(self, key, entitlements, provisioning, path, preserve): - """Code sign a bundle. - - This function tries to code sign an iOS bundle, following the same - algorithm as Xcode: - 1. pick the provisioning profile that best match the bundle identifier, - and copy it into the bundle as embedded.mobileprovision, - 2. copy Entitlements.plist from user or SDK next to the bundle, - 3. code sign the bundle. - """ - substitutions, overrides = self._InstallProvisioningProfile( - provisioning, self._GetCFBundleIdentifier() - ) - entitlements_path = self._InstallEntitlements( - entitlements, substitutions, overrides - ) - - args = ["codesign", "--force", "--sign", key] - if preserve == "True": - args.extend(["--deep", "--preserve-metadata=identifier,entitlements"]) - else: - args.extend(["--entitlements", entitlements_path]) - args.extend(["--timestamp=none", path]) - subprocess.check_call(args) - - def _InstallProvisioningProfile(self, profile, bundle_identifier): - """Installs embedded.mobileprovision into the bundle. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple containing two dictionary: variables substitutions and values - to overrides when generating the entitlements file. - """ - source_path, provisioning_data, team_id = self._FindProvisioningProfile( - profile, bundle_identifier - ) - target_path = os.path.join( - os.environ["BUILT_PRODUCTS_DIR"], - os.environ["CONTENTS_FOLDER_PATH"], - "embedded.mobileprovision", - ) - shutil.copy2(source_path, target_path) - substitutions = self._GetSubstitutions(bundle_identifier, team_id + ".") - return substitutions, provisioning_data["Entitlements"] - - def _FindProvisioningProfile(self, profile, bundle_identifier): - """Finds the .mobileprovision file to use for signing the bundle. - - Checks all the installed provisioning profiles (or if the user specified - the PROVISIONING_PROFILE variable, only consult it) and select the most - specific that correspond to the bundle identifier. - - Args: - profile: string, optional, short name of the .mobileprovision file - to use, if empty or the file is missing, the best file installed - will be used - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - - Returns: - A tuple of the path to the selected provisioning profile, the data of - the embedded plist in the provisioning profile and the team identifier - to use for code signing. - - Raises: - SystemExit: if no .mobileprovision can be used to sign the bundle. - """ - profiles_dir = os.path.join( - os.environ["HOME"], "Library", "MobileDevice", "Provisioning Profiles" - ) - if not os.path.isdir(profiles_dir): - print( - "cannot find mobile provisioning for %s" % (bundle_identifier), - file=sys.stderr, - ) - sys.exit(1) - provisioning_profiles = None - if profile: - profile_path = os.path.join(profiles_dir, profile + ".mobileprovision") - if os.path.exists(profile_path): - provisioning_profiles = [profile_path] - if not provisioning_profiles: - provisioning_profiles = glob.glob( - os.path.join(profiles_dir, "*.mobileprovision") - ) - valid_provisioning_profiles = {} - for profile_path in provisioning_profiles: - profile_data = self._LoadProvisioningProfile(profile_path) - app_id_pattern = profile_data.get("Entitlements", {}).get( - "application-identifier", "" - ) - for team_identifier in profile_data.get("TeamIdentifier", []): - app_id = f"{team_identifier}.{bundle_identifier}" - if fnmatch.fnmatch(app_id, app_id_pattern): - valid_provisioning_profiles[app_id_pattern] = ( - profile_path, - profile_data, - team_identifier, - ) - if not valid_provisioning_profiles: - print( - "cannot find mobile provisioning for %s" % (bundle_identifier), - file=sys.stderr, - ) - sys.exit(1) - # If the user has multiple provisioning profiles installed that can be - # used for ${bundle_identifier}, pick the most specific one (ie. the - # provisioning profile whose pattern is the longest). - selected_key = max(valid_provisioning_profiles, key=lambda v: len(v)) - return valid_provisioning_profiles[selected_key] - - def _LoadProvisioningProfile(self, profile_path): - """Extracts the plist embedded in a provisioning profile. - - Args: - profile_path: string, path to the .mobileprovision file - - Returns: - Content of the plist embedded in the provisioning profile as a dictionary. - """ - with tempfile.NamedTemporaryFile() as temp: - subprocess.check_call( - ["security", "cms", "-D", "-i", profile_path, "-o", temp.name] - ) - return self._LoadPlistMaybeBinary(temp.name) - - def _MergePlist(self, merged_plist, plist): - """Merge |plist| into |merged_plist|.""" - for key, value in plist.items(): - if isinstance(value, dict): - merged_value = merged_plist.get(key, {}) - if isinstance(merged_value, dict): - self._MergePlist(merged_value, value) - merged_plist[key] = merged_value - else: - merged_plist[key] = value - else: - merged_plist[key] = value - - def _LoadPlistMaybeBinary(self, plist_path): - """Loads into a memory a plist possibly encoded in binary format. - - This is a wrapper around plistlib.readPlist that tries to convert the - plist to the XML format if it can't be parsed (assuming that it is in - the binary format). - - Args: - plist_path: string, path to a plist file, in XML or binary format - - Returns: - Content of the plist as a dictionary. - """ - try: - # First, try to read the file using plistlib that only supports XML, - # and if an exception is raised, convert a temporary copy to XML and - # load that copy. - return plistlib.readPlist(plist_path) - except Exception: - pass - with tempfile.NamedTemporaryFile() as temp: - shutil.copy2(plist_path, temp.name) - subprocess.check_call(["plutil", "-convert", "xml1", temp.name]) - return plistlib.readPlist(temp.name) - - def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix): - """Constructs a dictionary of variable substitutions for Entitlements.plist. - - Args: - bundle_identifier: string, value of CFBundleIdentifier from Info.plist - app_identifier_prefix: string, value for AppIdentifierPrefix - - Returns: - Dictionary of substitutions to apply when generating Entitlements.plist. - """ - return { - "CFBundleIdentifier": bundle_identifier, - "AppIdentifierPrefix": app_identifier_prefix, - } - - def _GetCFBundleIdentifier(self): - """Extracts CFBundleIdentifier value from Info.plist in the bundle. - - Returns: - Value of CFBundleIdentifier in the Info.plist located in the bundle. - """ - info_plist_path = os.path.join( - os.environ["TARGET_BUILD_DIR"], os.environ["INFOPLIST_PATH"] - ) - info_plist_data = self._LoadPlistMaybeBinary(info_plist_path) - return info_plist_data["CFBundleIdentifier"] - - def _InstallEntitlements(self, entitlements, substitutions, overrides): - """Generates and install the ${BundleName}.xcent entitlements file. - - Expands variables "$(variable)" pattern in the source entitlements file, - add extra entitlements defined in the .mobileprovision file and the copy - the generated plist to "${BundlePath}.xcent". - - Args: - entitlements: string, optional, path to the Entitlements.plist template - to use, defaults to "${SDKROOT}/Entitlements.plist" - substitutions: dictionary, variable substitutions - overrides: dictionary, values to add to the entitlements - - Returns: - Path to the generated entitlements file. - """ - source_path = entitlements - target_path = os.path.join( - os.environ["BUILT_PRODUCTS_DIR"], os.environ["PRODUCT_NAME"] + ".xcent" - ) - if not source_path: - source_path = os.path.join(os.environ["SDKROOT"], "Entitlements.plist") - shutil.copy2(source_path, target_path) - data = self._LoadPlistMaybeBinary(target_path) - data = self._ExpandVariables(data, substitutions) - if overrides: - for key in overrides: - if key not in data: - data[key] = overrides[key] - plistlib.writePlist(data, target_path) - return target_path - - def _ExpandVariables(self, data, substitutions): - """Expands variables "$(variable)" in data. - - Args: - data: object, can be either string, list or dictionary - substitutions: dictionary, variable substitutions to perform - - Returns: - Copy of data where each references to "$(variable)" has been replaced - by the corresponding value found in substitutions, or left intact if - the key was not found. - """ - if isinstance(data, str): - for key, value in substitutions.items(): - data = data.replace("$(%s)" % key, value) - return data - if isinstance(data, list): - return [self._ExpandVariables(v, substitutions) for v in data] - if isinstance(data, dict): - return {k: self._ExpandVariables(data[k], substitutions) for k in data} - return data - - -def NextGreaterPowerOf2(x): - return 2 ** (x).bit_length() - - -def WriteHmap(output_name, filelist): - """Generates a header map based on |filelist|. - - Per Mark Mentovai: - A header map is structured essentially as a hash table, keyed by names used - in #includes, and providing pathnames to the actual files. - - The implementation below and the comment above comes from inspecting: - http://www.opensource.apple.com/source/distcc/distcc-2503/distcc_dist/include_server/headermap.py?txt - while also looking at the implementation in clang in: - https://llvm.org/svn/llvm-project/cfe/trunk/lib/Lex/HeaderMap.cpp - """ - magic = 1751998832 - version = 1 - _reserved = 0 - count = len(filelist) - capacity = NextGreaterPowerOf2(count) - strings_offset = 24 + (12 * capacity) - max_value_length = max(len(value) for value in filelist.values()) - - out = open(output_name, "wb") - out.write( - struct.pack( - " 0 or arg.count("/") > 1: - arg = os.path.normpath(arg) - - # For a literal quote, CommandLineToArgvW requires 2n+1 backslashes - # preceding it, and results in n backslashes + the quote. So we substitute - # in 2* what we match, +1 more, plus the quote. - if quote_cmd: - arg = windows_quoter_regex.sub(lambda mo: 2 * mo.group(1) + '\\"', arg) - - # %'s also need to be doubled otherwise they're interpreted as batch - # positional arguments. Also make sure to escape the % so that they're - # passed literally through escaping so they can be singled to just the - # original %. Otherwise, trying to pass the literal representation that - # looks like an environment variable to the shell (e.g. %PATH%) would fail. - arg = arg.replace("%", "%%") - - # These commands are used in rsp files, so no escaping for the shell (via ^) - # is necessary. - - # As a workaround for programs that don't use CommandLineToArgvW, gyp - # supports msvs_quote_cmd=0, which simply disables all quoting. - if quote_cmd: - # Finally, wrap the whole thing in quotes so that the above quote rule - # applies and whitespace isn't a word break. - return f'"{arg}"' - - return arg - - -def EncodeRspFileList(args, quote_cmd): - """Process a list of arguments using QuoteCmdExeArgument.""" - # Note that the first argument is assumed to be the command. Don't add - # quotes around it because then built-ins like 'echo', etc. won't work. - # Take care to normpath only the path in the case of 'call ../x.bat' because - # otherwise the whole thing is incorrectly interpreted as a path and not - # normalized correctly. - if not args: - return "" - if args[0].startswith("call "): - call, program = args[0].split(" ", 1) - program = call + " " + os.path.normpath(program) - else: - program = os.path.normpath(args[0]) - return (program + " " - + " ".join(QuoteForRspFile(arg, quote_cmd) for arg in args[1:])) - - -def _GenericRetrieve(root, default, path): - """Given a list of dictionary keys |path| and a tree of dicts |root|, find - value at path, or return |default| if any of the path doesn't exist.""" - if not root: - return default - if not path: - return root - return _GenericRetrieve(root.get(path[0]), default, path[1:]) - - -def _AddPrefix(element, prefix): - """Add |prefix| to |element| or each subelement if element is iterable.""" - if element is None: - return element - # Note, not Iterable because we don't want to handle strings like that. - if isinstance(element, (list, tuple)): - return [prefix + e for e in element] - else: - return prefix + element - - -def _DoRemapping(element, map): - """If |element| then remap it through |map|. If |element| is iterable then - each item will be remapped. Any elements not found will be removed.""" - if map is not None and element is not None: - if not callable(map): - map = map.get # Assume it's a dict, otherwise a callable to do the remap. - if isinstance(element, (list, tuple)): - element = filter(None, [map(elem) for elem in element]) - else: - element = map(element) - return element - - -def _AppendOrReturn(append, element): - """If |append| is None, simply return |element|. If |append| is not None, - then add |element| to it, adding each item in |element| if it's a list or - tuple.""" - if append is not None and element is not None: - if isinstance(element, (list, tuple)): - append.extend(element) - else: - append.append(element) - else: - return element - - -def _FindDirectXInstallation(): - """Try to find an installation location for the DirectX SDK. Check for the - standard environment variable, and if that doesn't exist, try to find - via the registry. May return None if not found in either location.""" - # Return previously calculated value, if there is one - if hasattr(_FindDirectXInstallation, "dxsdk_dir"): - return _FindDirectXInstallation.dxsdk_dir - - dxsdk_dir = os.environ.get("DXSDK_DIR") - if not dxsdk_dir: - # Setup params to pass to and attempt to launch reg.exe. - cmd = ["reg.exe", "query", r"HKLM\Software\Microsoft\DirectX", "/s"] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout = p.communicate()[0].decode("utf-8") - for line in stdout.splitlines(): - if "InstallPath" in line: - dxsdk_dir = line.split(" ")[3] + "\\" - - # Cache return value - _FindDirectXInstallation.dxsdk_dir = dxsdk_dir - return dxsdk_dir - - -def GetGlobalVSMacroEnv(vs_version): - """Get a dict of variables mapping internal VS macro names to their gyp - equivalents. Returns all variables that are independent of the target.""" - env = {} - # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when - # Visual Studio is actually installed. - if vs_version.Path(): - env["$(VSInstallDir)"] = vs_version.Path() - env["$(VCInstallDir)"] = os.path.join(vs_version.Path(), "VC") + "\\" - # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be - # set. This happens when the SDK is sync'd via src-internal, rather than - # by typical end-user installation of the SDK. If it's not set, we don't - # want to leave the unexpanded variable in the path, so simply strip it. - dxsdk_dir = _FindDirectXInstallation() - env["$(DXSDK_DIR)"] = dxsdk_dir if dxsdk_dir else "" - # Try to find an installation location for the Windows DDK by checking - # the WDK_DIR environment variable, may be None. - env["$(WDK_DIR)"] = os.environ.get("WDK_DIR", "") - return env - - -def ExtractSharedMSVSSystemIncludes(configs, generator_flags): - """Finds msvs_system_include_dirs that are common to all targets, removes - them from all targets, and returns an OrderedSet containing them.""" - all_system_includes = OrderedSet(configs[0].get("msvs_system_include_dirs", [])) - for config in configs[1:]: - system_includes = config.get("msvs_system_include_dirs", []) - all_system_includes = all_system_includes & OrderedSet(system_includes) - if not all_system_includes: - return None - # Expand macros in all_system_includes. - env = GetGlobalVSMacroEnv(GetVSVersion(generator_flags)) - expanded_system_includes = OrderedSet( - [ExpandMacros(include, env) for include in all_system_includes] - ) - if any("$" in include for include in expanded_system_includes): - # Some path relies on target-specific variables, bail. - return None - - # Remove system includes shared by all targets from the targets. - for config in configs: - includes = config.get("msvs_system_include_dirs", []) - if includes: # Don't insert a msvs_system_include_dirs key if not needed. - # This must check the unexpanded includes list: - new_includes = [i for i in includes if i not in all_system_includes] - config["msvs_system_include_dirs"] = new_includes - return expanded_system_includes - - -class MsvsSettings: - """A class that understands the gyp 'msvs_...' values (especially the - msvs_settings field). They largely correpond to the VS2008 IDE DOM. This - class helps map those settings to command line options.""" - - def __init__(self, spec, generator_flags): - self.spec = spec - self.vs_version = GetVSVersion(generator_flags) - - supported_fields = [ - ("msvs_configuration_attributes", dict), - ("msvs_settings", dict), - ("msvs_system_include_dirs", list), - ("msvs_disabled_warnings", list), - ("msvs_precompiled_header", str), - ("msvs_precompiled_source", str), - ("msvs_configuration_platform", str), - ("msvs_target_platform", str), - ] - configs = spec["configurations"] - for field, default in supported_fields: - setattr(self, field, {}) - for configname, config in configs.items(): - getattr(self, field)[configname] = config.get(field, default()) - - self.msvs_cygwin_dirs = spec.get("msvs_cygwin_dirs", ["."]) - - unsupported_fields = [ - "msvs_prebuild", - "msvs_postbuild", - ] - unsupported = [] - for field in unsupported_fields: - for config in configs.values(): - if field in config: - unsupported += [ - "{} not supported (target {}).".format( - field, spec["target_name"] - ) - ] - if unsupported: - raise Exception("\n".join(unsupported)) - - def GetExtension(self): - """Returns the extension for the target, with no leading dot. - - Uses 'product_extension' if specified, otherwise uses MSVS defaults based on - the target type. - """ - ext = self.spec.get("product_extension", None) - if ext: - return ext - return gyp.MSVSUtil.TARGET_TYPE_EXT.get(self.spec["type"], "") - - def GetVSMacroEnv(self, base_to_build=None, config=None): - """Get a dict of variables mapping internal VS macro names to their gyp - equivalents.""" - target_arch = self.GetArch(config) - target_platform = "Win32" if target_arch == "x86" else target_arch - target_name = self.spec.get("product_prefix", "") + self.spec.get( - "product_name", self.spec["target_name"] - ) - target_dir = base_to_build + "\\" if base_to_build else "" - target_ext = "." + self.GetExtension() - target_file_name = target_name + target_ext - - replacements = { - "$(InputName)": "${root}", - "$(InputPath)": "${source}", - "$(IntDir)": "$!INTERMEDIATE_DIR", - "$(OutDir)\\": target_dir, - "$(PlatformName)": target_platform, - "$(ProjectDir)\\": "", - "$(ProjectName)": self.spec["target_name"], - "$(TargetDir)\\": target_dir, - "$(TargetExt)": target_ext, - "$(TargetFileName)": target_file_name, - "$(TargetName)": target_name, - "$(TargetPath)": os.path.join(target_dir, target_file_name), - } - replacements.update(GetGlobalVSMacroEnv(self.vs_version)) - return replacements - - def ConvertVSMacros(self, s, base_to_build=None, config=None): - """Convert from VS macro names to something equivalent.""" - env = self.GetVSMacroEnv(base_to_build, config=config) - return ExpandMacros(s, env) - - def AdjustLibraries(self, libraries): - """Strip -l from library if it's specified with that.""" - libs = [lib[2:] if lib.startswith("-l") else lib for lib in libraries] - return [ - lib + ".lib" - if not lib.lower().endswith(".lib") and not lib.lower().endswith(".obj") - else lib - for lib in libs - ] - - def _GetAndMunge(self, field, path, default, prefix, append, map): - """Retrieve a value from |field| at |path| or return |default|. If - |append| is specified, and the item is found, it will be appended to that - object instead of returned. If |map| is specified, results will be - remapped through |map| before being returned or appended.""" - result = _GenericRetrieve(field, default, path) - result = _DoRemapping(result, map) - result = _AddPrefix(result, prefix) - return _AppendOrReturn(append, result) - - class _GetWrapper: - def __init__(self, parent, field, base_path, append=None): - self.parent = parent - self.field = field - self.base_path = [base_path] - self.append = append - - def __call__(self, name, map=None, prefix="", default=None): - return self.parent._GetAndMunge( - self.field, - self.base_path + [name], - default=default, - prefix=prefix, - append=self.append, - map=map, - ) - - def GetArch(self, config): - """Get architecture based on msvs_configuration_platform and - msvs_target_platform. Returns either 'x86' or 'x64'.""" - configuration_platform = self.msvs_configuration_platform.get(config, "") - platform = self.msvs_target_platform.get(config, "") - if not platform: # If no specific override, use the configuration's. - platform = configuration_platform - # Map from platform to architecture. - return {"Win32": "x86", "x64": "x64", "ARM64": "arm64"}.get(platform, "x86") - - def _TargetConfig(self, config): - """Returns the target-specific configuration.""" - # There's two levels of architecture/platform specification in VS. The - # first level is globally for the configuration (this is what we consider - # "the" config at the gyp level, which will be something like 'Debug' or - # 'Release'), VS2015 and later only use this level - if int(self.vs_version.short_name) >= 2015: - return config - # and a second target-specific configuration, which is an - # override for the global one. |config| is remapped here to take into - # account the local target-specific overrides to the global configuration. - arch = self.GetArch(config) - if arch == "x64" and not config.endswith("_x64"): - config += "_x64" - if arch == "x86" and config.endswith("_x64"): - config = config.rsplit("_", 1)[0] - return config - - def _Setting(self, path, config, default=None, prefix="", append=None, map=None): - """_GetAndMunge for msvs_settings.""" - return self._GetAndMunge( - self.msvs_settings[config], path, default, prefix, append, map - ) - - def _ConfigAttrib( - self, path, config, default=None, prefix="", append=None, map=None - ): - """_GetAndMunge for msvs_configuration_attributes.""" - return self._GetAndMunge( - self.msvs_configuration_attributes[config], - path, - default, - prefix, - append, - map, - ) - - def AdjustIncludeDirs(self, include_dirs, config): - """Updates include_dirs to expand VS specific paths, and adds the system - include dirs used for platform SDK and similar.""" - config = self._TargetConfig(config) - includes = include_dirs + self.msvs_system_include_dirs[config] - includes.extend( - self._Setting( - ("VCCLCompilerTool", "AdditionalIncludeDirectories"), config, default=[] - ) - ) - return [self.ConvertVSMacros(p, config=config) for p in includes] - - def AdjustMidlIncludeDirs(self, midl_include_dirs, config): - """Updates midl_include_dirs to expand VS specific paths, and adds the - system include dirs used for platform SDK and similar.""" - config = self._TargetConfig(config) - includes = midl_include_dirs + self.msvs_system_include_dirs[config] - includes.extend( - self._Setting( - ("VCMIDLTool", "AdditionalIncludeDirectories"), config, default=[] - ) - ) - return [self.ConvertVSMacros(p, config=config) for p in includes] - - def GetComputedDefines(self, config): - """Returns the set of defines that are injected to the defines list based - on other VS settings.""" - config = self._TargetConfig(config) - defines = [] - if self._ConfigAttrib(["CharacterSet"], config) == "1": - defines.extend(("_UNICODE", "UNICODE")) - if self._ConfigAttrib(["CharacterSet"], config) == "2": - defines.append("_MBCS") - defines.extend( - self._Setting( - ("VCCLCompilerTool", "PreprocessorDefinitions"), config, default=[] - ) - ) - return defines - - def GetCompilerPdbName(self, config, expand_special): - """Get the pdb file name that should be used for compiler invocations, or - None if there's no explicit name specified.""" - config = self._TargetConfig(config) - pdbname = self._Setting(("VCCLCompilerTool", "ProgramDataBaseFileName"), config) - if pdbname: - pdbname = expand_special(self.ConvertVSMacros(pdbname)) - return pdbname - - def GetMapFileName(self, config, expand_special): - """Gets the explicitly overridden map file name for a target or returns None - if it's not set.""" - config = self._TargetConfig(config) - map_file = self._Setting(("VCLinkerTool", "MapFileName"), config) - if map_file: - map_file = expand_special(self.ConvertVSMacros(map_file, config=config)) - return map_file - - def GetOutputName(self, config, expand_special): - """Gets the explicitly overridden output name for a target or returns None - if it's not overridden.""" - config = self._TargetConfig(config) - type = self.spec["type"] - root = "VCLibrarianTool" if type == "static_library" else "VCLinkerTool" - # TODO(scottmg): Handle OutputDirectory without OutputFile. - output_file = self._Setting((root, "OutputFile"), config) - if output_file: - output_file = expand_special( - self.ConvertVSMacros(output_file, config=config) - ) - return output_file - - def GetPDBName(self, config, expand_special, default): - """Gets the explicitly overridden pdb name for a target or returns - default if it's not overridden, or if no pdb will be generated.""" - config = self._TargetConfig(config) - output_file = self._Setting(("VCLinkerTool", "ProgramDatabaseFile"), config) - generate_debug_info = self._Setting( - ("VCLinkerTool", "GenerateDebugInformation"), config - ) - if generate_debug_info == "true": - if output_file: - return expand_special(self.ConvertVSMacros(output_file, config=config)) - else: - return default - else: - return None - - def GetNoImportLibrary(self, config): - """If NoImportLibrary: true, ninja will not expect the output to include - an import library.""" - config = self._TargetConfig(config) - noimplib = self._Setting(("NoImportLibrary",), config) - return noimplib == "true" - - def GetAsmflags(self, config): - """Returns the flags that need to be added to ml invocations.""" - config = self._TargetConfig(config) - asmflags = [] - safeseh = self._Setting(("MASM", "UseSafeExceptionHandlers"), config) - if safeseh == "true": - asmflags.append("/safeseh") - return asmflags - - def GetCflags(self, config): - """Returns the flags that need to be added to .c and .cc compilations.""" - config = self._TargetConfig(config) - cflags = [] - cflags.extend(["/wd" + w for w in self.msvs_disabled_warnings[config]]) - cl = self._GetWrapper( - self, self.msvs_settings[config], "VCCLCompilerTool", append=cflags - ) - cl( - "Optimization", - map={"0": "d", "1": "1", "2": "2", "3": "x"}, - prefix="/O", - default="2", - ) - cl("InlineFunctionExpansion", prefix="/Ob") - cl("DisableSpecificWarnings", prefix="/wd") - cl("StringPooling", map={"true": "/GF"}) - cl("EnableFiberSafeOptimizations", map={"true": "/GT"}) - cl("OmitFramePointers", map={"false": "-", "true": ""}, prefix="/Oy") - cl("EnableIntrinsicFunctions", map={"false": "-", "true": ""}, prefix="/Oi") - cl("FavorSizeOrSpeed", map={"1": "t", "2": "s"}, prefix="/O") - cl( - "FloatingPointModel", - map={"0": "precise", "1": "strict", "2": "fast"}, - prefix="/fp:", - default="0", - ) - cl("CompileAsManaged", map={"false": "", "true": "/clr"}) - cl("WholeProgramOptimization", map={"true": "/GL"}) - cl("WarningLevel", prefix="/W") - cl("WarnAsError", map={"true": "/WX"}) - cl( - "CallingConvention", - map={"0": "d", "1": "r", "2": "z", "3": "v"}, - prefix="/G", - ) - cl("DebugInformationFormat", map={"1": "7", "3": "i", "4": "I"}, prefix="/Z") - cl("RuntimeTypeInfo", map={"true": "/GR", "false": "/GR-"}) - cl("EnableFunctionLevelLinking", map={"true": "/Gy", "false": "/Gy-"}) - cl("MinimalRebuild", map={"true": "/Gm"}) - cl("BufferSecurityCheck", map={"true": "/GS", "false": "/GS-"}) - cl("BasicRuntimeChecks", map={"1": "s", "2": "u", "3": "1"}, prefix="/RTC") - cl( - "RuntimeLibrary", - map={"0": "T", "1": "Td", "2": "D", "3": "Dd"}, - prefix="/M", - ) - cl("ExceptionHandling", map={"1": "sc", "2": "a"}, prefix="/EH") - cl("DefaultCharIsUnsigned", map={"true": "/J"}) - cl( - "TreatWChar_tAsBuiltInType", - map={"false": "-", "true": ""}, - prefix="/Zc:wchar_t", - ) - cl("EnablePREfast", map={"true": "/analyze"}) - cl("AdditionalOptions", prefix="") - cl( - "EnableEnhancedInstructionSet", - map={"1": "SSE", "2": "SSE2", "3": "AVX", "4": "IA32", "5": "AVX2"}, - prefix="/arch:", - ) - cflags.extend( - [ - "/FI" + f - for f in self._Setting( - ("VCCLCompilerTool", "ForcedIncludeFiles"), config, default=[] - ) - ] - ) - if float(self.vs_version.project_version) >= 12.0: - # New flag introduced in VS2013 (project version 12.0) Forces writes to - # the program database (PDB) to be serialized through MSPDBSRV.EXE. - # https://msdn.microsoft.com/en-us/library/dn502518.aspx - cflags.append("/FS") - # ninja handles parallelism by itself, don't have the compiler do it too. - cflags = [x for x in cflags if not x.startswith("/MP")] - return cflags - - def _GetPchFlags(self, config, extension): - """Get the flags to be added to the cflags for precompiled header support.""" - config = self._TargetConfig(config) - # The PCH is only built once by a particular source file. Usage of PCH must - # only be for the same language (i.e. C vs. C++), so only include the pch - # flags when the language matches. - if self.msvs_precompiled_header[config]: - source_ext = os.path.splitext(self.msvs_precompiled_source[config])[1] - if _LanguageMatchesForPch(source_ext, extension): - pch = self.msvs_precompiled_header[config] - pchbase = os.path.split(pch)[1] - return ["/Yu" + pch, "/FI" + pch, "/Fp${pchprefix}." + pchbase + ".pch"] - return [] - - def GetCflagsC(self, config): - """Returns the flags that need to be added to .c compilations.""" - config = self._TargetConfig(config) - return self._GetPchFlags(config, ".c") - - def GetCflagsCC(self, config): - """Returns the flags that need to be added to .cc compilations.""" - config = self._TargetConfig(config) - return ["/TP"] + self._GetPchFlags(config, ".cc") - - def _GetAdditionalLibraryDirectories(self, root, config, gyp_to_build_path): - """Get and normalize the list of paths in AdditionalLibraryDirectories - setting.""" - config = self._TargetConfig(config) - libpaths = self._Setting( - (root, "AdditionalLibraryDirectories"), config, default=[] - ) - libpaths = [ - os.path.normpath(gyp_to_build_path(self.ConvertVSMacros(p, config=config))) - for p in libpaths - ] - return ['/LIBPATH:"' + p + '"' for p in libpaths] - - def GetLibFlags(self, config, gyp_to_build_path): - """Returns the flags that need to be added to lib commands.""" - config = self._TargetConfig(config) - libflags = [] - lib = self._GetWrapper( - self, self.msvs_settings[config], "VCLibrarianTool", append=libflags - ) - libflags.extend( - self._GetAdditionalLibraryDirectories( - "VCLibrarianTool", config, gyp_to_build_path - ) - ) - lib("LinkTimeCodeGeneration", map={"true": "/LTCG"}) - lib( - "TargetMachine", - map={"1": "X86", "17": "X64", "3": "ARM"}, - prefix="/MACHINE:", - ) - lib("AdditionalOptions") - return libflags - - def GetDefFile(self, gyp_to_build_path): - """Returns the .def file from sources, if any. Otherwise returns None.""" - spec = self.spec - if spec["type"] in ("shared_library", "loadable_module", "executable"): - def_files = [ - s for s in spec.get("sources", []) if s.lower().endswith(".def") - ] - if len(def_files) == 1: - return gyp_to_build_path(def_files[0]) - elif len(def_files) > 1: - raise Exception("Multiple .def files") - return None - - def _GetDefFileAsLdflags(self, ldflags, gyp_to_build_path): - """.def files get implicitly converted to a ModuleDefinitionFile for the - linker in the VS generator. Emulate that behaviour here.""" - def_file = self.GetDefFile(gyp_to_build_path) - if def_file: - ldflags.append('/DEF:"%s"' % def_file) - - def GetPGDName(self, config, expand_special): - """Gets the explicitly overridden pgd name for a target or returns None - if it's not overridden.""" - config = self._TargetConfig(config) - output_file = self._Setting(("VCLinkerTool", "ProfileGuidedDatabase"), config) - if output_file: - output_file = expand_special( - self.ConvertVSMacros(output_file, config=config) - ) - return output_file - - def GetLdflags( - self, - config, - gyp_to_build_path, - expand_special, - manifest_base_name, - output_name, - is_executable, - build_dir, - ): - """Returns the flags that need to be added to link commands, and the - manifest files.""" - config = self._TargetConfig(config) - ldflags = [] - ld = self._GetWrapper( - self, self.msvs_settings[config], "VCLinkerTool", append=ldflags - ) - self._GetDefFileAsLdflags(ldflags, gyp_to_build_path) - ld("GenerateDebugInformation", map={"true": "/DEBUG"}) - # TODO: These 'map' values come from machineTypeOption enum, - # and does not have an official value for ARM64 in VS2017 (yet). - # It needs to verify the ARM64 value when machineTypeOption is updated. - ld( - "TargetMachine", - map={"1": "X86", "17": "X64", "3": "ARM", "18": "ARM64"}, - prefix="/MACHINE:", - ) - ldflags.extend( - self._GetAdditionalLibraryDirectories( - "VCLinkerTool", config, gyp_to_build_path - ) - ) - ld("DelayLoadDLLs", prefix="/DELAYLOAD:") - ld("TreatLinkerWarningAsErrors", prefix="/WX", map={"true": "", "false": ":NO"}) - out = self.GetOutputName(config, expand_special) - if out: - ldflags.append("/OUT:" + out) - pdb = self.GetPDBName(config, expand_special, output_name + ".pdb") - if pdb: - ldflags.append("/PDB:" + pdb) - pgd = self.GetPGDName(config, expand_special) - if pgd: - ldflags.append("/PGD:" + pgd) - map_file = self.GetMapFileName(config, expand_special) - ld("GenerateMapFile", map={"true": "/MAP:" + map_file if map_file else "/MAP"}) - ld("MapExports", map={"true": "/MAPINFO:EXPORTS"}) - ld("AdditionalOptions", prefix="") - - minimum_required_version = self._Setting( - ("VCLinkerTool", "MinimumRequiredVersion"), config, default="" - ) - if minimum_required_version: - minimum_required_version = "," + minimum_required_version - ld( - "SubSystem", - map={ - "1": "CONSOLE%s" % minimum_required_version, - "2": "WINDOWS%s" % minimum_required_version, - }, - prefix="/SUBSYSTEM:", - ) - - stack_reserve_size = self._Setting( - ("VCLinkerTool", "StackReserveSize"), config, default="" - ) - if stack_reserve_size: - stack_commit_size = self._Setting( - ("VCLinkerTool", "StackCommitSize"), config, default="" - ) - if stack_commit_size: - stack_commit_size = "," + stack_commit_size - ldflags.append(f"/STACK:{stack_reserve_size}{stack_commit_size}") - - ld("TerminalServerAware", map={"1": ":NO", "2": ""}, prefix="/TSAWARE") - ld("LinkIncremental", map={"1": ":NO", "2": ""}, prefix="/INCREMENTAL") - ld("BaseAddress", prefix="/BASE:") - ld("FixedBaseAddress", map={"1": ":NO", "2": ""}, prefix="/FIXED") - ld("RandomizedBaseAddress", map={"1": ":NO", "2": ""}, prefix="/DYNAMICBASE") - ld("DataExecutionPrevention", map={"1": ":NO", "2": ""}, prefix="/NXCOMPAT") - ld("OptimizeReferences", map={"1": "NOREF", "2": "REF"}, prefix="/OPT:") - ld("ForceSymbolReferences", prefix="/INCLUDE:") - ld("EnableCOMDATFolding", map={"1": "NOICF", "2": "ICF"}, prefix="/OPT:") - ld( - "LinkTimeCodeGeneration", - map={"1": "", "2": ":PGINSTRUMENT", "3": ":PGOPTIMIZE", "4": ":PGUPDATE"}, - prefix="/LTCG", - ) - ld("IgnoreDefaultLibraryNames", prefix="/NODEFAULTLIB:") - ld("ResourceOnlyDLL", map={"true": "/NOENTRY"}) - ld("EntryPointSymbol", prefix="/ENTRY:") - ld("Profile", map={"true": "/PROFILE"}) - ld("LargeAddressAware", map={"1": ":NO", "2": ""}, prefix="/LARGEADDRESSAWARE") - # TODO(scottmg): This should sort of be somewhere else (not really a flag). - ld("AdditionalDependencies", prefix="") - - safeseh_default = "true" if self.GetArch(config) == "x86" else None - ld( - "ImageHasSafeExceptionHandlers", - map={"false": ":NO", "true": ""}, - prefix="/SAFESEH", - default=safeseh_default, - ) - - # If the base address is not specifically controlled, DYNAMICBASE should - # be on by default. - if not any("DYNAMICBASE" in flag or flag == "/FIXED" for flag in ldflags): - ldflags.append("/DYNAMICBASE") - - # If the NXCOMPAT flag has not been specified, default to on. Despite the - # documentation that says this only defaults to on when the subsystem is - # Vista or greater (which applies to the linker), the IDE defaults it on - # unless it's explicitly off. - if not any("NXCOMPAT" in flag for flag in ldflags): - ldflags.append("/NXCOMPAT") - - have_def_file = any(flag.startswith("/DEF:") for flag in ldflags) - ( - manifest_flags, - intermediate_manifest, - manifest_files, - ) = self._GetLdManifestFlags( - config, - manifest_base_name, - gyp_to_build_path, - is_executable and not have_def_file, - build_dir, - ) - ldflags.extend(manifest_flags) - return ldflags, intermediate_manifest, manifest_files - - def _GetLdManifestFlags( - self, config, name, gyp_to_build_path, allow_isolation, build_dir - ): - """Returns a 3-tuple: - - the set of flags that need to be added to the link to generate - a default manifest - - the intermediate manifest that the linker will generate that should be - used to assert it doesn't add anything to the merged one. - - the list of all the manifest files to be merged by the manifest tool and - included into the link.""" - generate_manifest = self._Setting( - ("VCLinkerTool", "GenerateManifest"), config, default="true" - ) - if generate_manifest != "true": - # This means not only that the linker should not generate the intermediate - # manifest but also that the manifest tool should do nothing even when - # additional manifests are specified. - return ["/MANIFEST:NO"], [], [] - - output_name = name + ".intermediate.manifest" - flags = [ - "/MANIFEST", - "/ManifestFile:" + output_name, - ] - - # Instead of using the MANIFESTUAC flags, we generate a .manifest to - # include into the list of manifests. This allows us to avoid the need to - # do two passes during linking. The /MANIFEST flag and /ManifestFile are - # still used, and the intermediate manifest is used to assert that the - # final manifest we get from merging all the additional manifest files - # (plus the one we generate here) isn't modified by merging the - # intermediate into it. - - # Always NO, because we generate a manifest file that has what we want. - flags.append("/MANIFESTUAC:NO") - - config = self._TargetConfig(config) - enable_uac = self._Setting( - ("VCLinkerTool", "EnableUAC"), config, default="true" - ) - manifest_files = [] - generated_manifest_outer = ( - "" - "" - "%s" - ) - if enable_uac == "true": - execution_level = self._Setting( - ("VCLinkerTool", "UACExecutionLevel"), config, default="0" - ) - execution_level_map = { - "0": "asInvoker", - "1": "highestAvailable", - "2": "requireAdministrator", - } - - ui_access = self._Setting( - ("VCLinkerTool", "UACUIAccess"), config, default="false" - ) - - inner = """ - - - - - - -""".format( - execution_level_map[execution_level], - ui_access, - ) - else: - inner = "" - - generated_manifest_contents = generated_manifest_outer % inner - generated_name = name + ".generated.manifest" - # Need to join with the build_dir here as we're writing it during - # generation time, but we return the un-joined version because the build - # will occur in that directory. We only write the file if the contents - # have changed so that simply regenerating the project files doesn't - # cause a relink. - build_dir_generated_name = os.path.join(build_dir, generated_name) - gyp.common.EnsureDirExists(build_dir_generated_name) - f = gyp.common.WriteOnDiff(build_dir_generated_name) - f.write(generated_manifest_contents) - f.close() - manifest_files = [generated_name] - - if allow_isolation: - flags.append("/ALLOWISOLATION") - - manifest_files += self._GetAdditionalManifestFiles(config, gyp_to_build_path) - return flags, output_name, manifest_files - - def _GetAdditionalManifestFiles(self, config, gyp_to_build_path): - """Gets additional manifest files that are added to the default one - generated by the linker.""" - files = self._Setting( - ("VCManifestTool", "AdditionalManifestFiles"), config, default=[] - ) - if isinstance(files, str): - files = files.split(";") - return [ - os.path.normpath(gyp_to_build_path(self.ConvertVSMacros(f, config=config))) - for f in files - ] - - def IsUseLibraryDependencyInputs(self, config): - """Returns whether the target should be linked via Use Library Dependency - Inputs (using component .objs of a given .lib).""" - config = self._TargetConfig(config) - uldi = self._Setting(("VCLinkerTool", "UseLibraryDependencyInputs"), config) - return uldi == "true" - - def IsEmbedManifest(self, config): - """Returns whether manifest should be linked into binary.""" - config = self._TargetConfig(config) - embed = self._Setting( - ("VCManifestTool", "EmbedManifest"), config, default="true" - ) - return embed == "true" - - def IsLinkIncremental(self, config): - """Returns whether the target should be linked incrementally.""" - config = self._TargetConfig(config) - link_inc = self._Setting(("VCLinkerTool", "LinkIncremental"), config) - return link_inc != "1" - - def GetRcflags(self, config, gyp_to_ninja_path): - """Returns the flags that need to be added to invocations of the resource - compiler.""" - config = self._TargetConfig(config) - rcflags = [] - rc = self._GetWrapper( - self, self.msvs_settings[config], "VCResourceCompilerTool", append=rcflags - ) - rc("AdditionalIncludeDirectories", map=gyp_to_ninja_path, prefix="/I") - rcflags.append("/I" + gyp_to_ninja_path(".")) - rc("PreprocessorDefinitions", prefix="/d") - # /l arg must be in hex without leading '0x' - rc("Culture", prefix="/l", map=lambda x: hex(int(x))[2:]) - return rcflags - - def BuildCygwinBashCommandLine(self, args, path_to_base): - """Build a command line that runs args via cygwin bash. We assume that all - incoming paths are in Windows normpath'd form, so they need to be - converted to posix style for the part of the command line that's passed to - bash. We also have to do some Visual Studio macro emulation here because - various rules use magic VS names for things. Also note that rules that - contain ninja variables cannot be fixed here (for example ${source}), so - the outer generator needs to make sure that the paths that are written out - are in posix style, if the command line will be used here.""" - cygwin_dir = os.path.normpath( - os.path.join(path_to_base, self.msvs_cygwin_dirs[0]) - ) - cd = ("cd %s" % path_to_base).replace("\\", "/") - args = [a.replace("\\", "/").replace('"', '\\"') for a in args] - args = ["'%s'" % a.replace("'", "'\\''") for a in args] - bash_cmd = " ".join(args) - cmd = ( - 'call "%s\\setup_env.bat" && set CYGWIN=nontsec && ' % cygwin_dir - + f'bash -c "{cd} ; {bash_cmd}"' - ) - return cmd - - RuleShellFlags = collections.namedtuple("RuleShellFlags", ["cygwin", "quote"]) - - def GetRuleShellFlags(self, rule): - """Return RuleShellFlags about how the given rule should be run. This - includes whether it should run under cygwin (msvs_cygwin_shell), and - whether the commands should be quoted (msvs_quote_cmd).""" - # If the variable is unset, or set to 1 we use cygwin - cygwin = int(rule.get("msvs_cygwin_shell", - self.spec.get("msvs_cygwin_shell", 1))) != 0 - # Default to quoting. There's only a few special instances where the - # target command uses non-standard command line parsing and handle quotes - # and quote escaping differently. - quote_cmd = int(rule.get("msvs_quote_cmd", 1)) - assert quote_cmd != 0 or cygwin != 1, \ - "msvs_quote_cmd=0 only applicable for msvs_cygwin_shell=0" - return MsvsSettings.RuleShellFlags(cygwin, quote_cmd) - - def _HasExplicitRuleForExtension(self, spec, extension): - """Determine if there's an explicit rule for a particular extension.""" - return any(rule["extension"] == extension for rule in spec.get("rules", [])) - - def _HasExplicitIdlActions(self, spec): - """Determine if an action should not run midl for .idl files.""" - return any( - action.get("explicit_idl_action", 0) for action in spec.get("actions", []) - ) - - def HasExplicitIdlRulesOrActions(self, spec): - """Determine if there's an explicit rule or action for idl files. When - there isn't we need to generate implicit rules to build MIDL .idl files.""" - return self._HasExplicitRuleForExtension( - spec, "idl" - ) or self._HasExplicitIdlActions(spec) - - def HasExplicitAsmRules(self, spec): - """Determine if there's an explicit rule for asm files. When there isn't we - need to generate implicit rules to assemble .asm files.""" - return self._HasExplicitRuleForExtension(spec, "asm") - - def GetIdlBuildData(self, source, config): - """Determine the implicit outputs for an idl file. Returns output - directory, outputs, and variables and flags that are required.""" - config = self._TargetConfig(config) - midl_get = self._GetWrapper(self, self.msvs_settings[config], "VCMIDLTool") - - def midl(name, default=None): - return self.ConvertVSMacros(midl_get(name, default=default), config=config) - - tlb = midl("TypeLibraryName", default="${root}.tlb") - header = midl("HeaderFileName", default="${root}.h") - dlldata = midl("DLLDataFileName", default="dlldata.c") - iid = midl("InterfaceIdentifierFileName", default="${root}_i.c") - proxy = midl("ProxyFileName", default="${root}_p.c") - # Note that .tlb is not included in the outputs as it is not always - # generated depending on the content of the input idl file. - outdir = midl("OutputDirectory", default="") - output = [header, dlldata, iid, proxy] - variables = [ - ("tlb", tlb), - ("h", header), - ("dlldata", dlldata), - ("iid", iid), - ("proxy", proxy), - ] - # TODO(scottmg): Are there configuration settings to set these flags? - target_platform = self.GetArch(config) - if target_platform == "x86": - target_platform = "win32" - flags = ["/char", "signed", "/env", target_platform, "/Oicf"] - return outdir, output, variables, flags - - -def _LanguageMatchesForPch(source_ext, pch_source_ext): - c_exts = (".c",) - cc_exts = (".cc", ".cxx", ".cpp") - return (source_ext in c_exts and pch_source_ext in c_exts) or ( - source_ext in cc_exts and pch_source_ext in cc_exts - ) - - -class PrecompiledHeader: - """Helper to generate dependencies and build rules to handle generation of - precompiled headers. Interface matches the GCH handler in xcode_emulation.py. - """ - - def __init__( - self, settings, config, gyp_to_build_path, gyp_to_unique_output, obj_ext - ): - self.settings = settings - self.config = config - pch_source = self.settings.msvs_precompiled_source[self.config] - self.pch_source = gyp_to_build_path(pch_source) - filename, _ = os.path.splitext(pch_source) - self.output_obj = gyp_to_unique_output(filename + obj_ext).lower() - - def _PchHeader(self): - """Get the header that will appear in an #include line for all source - files.""" - return self.settings.msvs_precompiled_header[self.config] - - def GetObjDependencies(self, sources, objs, arch): - """Given a list of sources files and the corresponding object files, - returns a list of the pch files that should be depended upon. The - additional wrapping in the return value is for interface compatibility - with make.py on Mac, and xcode_emulation.py.""" - assert arch is None - if not self._PchHeader(): - return [] - pch_ext = os.path.splitext(self.pch_source)[1] - for source in sources: - if _LanguageMatchesForPch(os.path.splitext(source)[1], pch_ext): - return [(None, None, self.output_obj)] - return [] - - def GetPchBuildCommands(self, arch): - """Not used on Windows as there are no additional build steps required - (instead, existing steps are modified in GetFlagsModifications below).""" - return [] - - def GetFlagsModifications( - self, input, output, implicit, command, cflags_c, cflags_cc, expand_special - ): - """Get the modified cflags and implicit dependencies that should be used - for the pch compilation step.""" - if input == self.pch_source: - pch_output = ["/Yc" + self._PchHeader()] - if command == "cxx": - return ( - [("cflags_cc", map(expand_special, cflags_cc + pch_output))], - self.output_obj, - [], - ) - elif command == "cc": - return ( - [("cflags_c", map(expand_special, cflags_c + pch_output))], - self.output_obj, - [], - ) - return [], output, implicit - - -vs_version = None - - -def GetVSVersion(generator_flags): - global vs_version - if not vs_version: - vs_version = gyp.MSVSVersion.SelectVisualStudioVersion( - generator_flags.get("msvs_version", "auto"), allow_fallback=False - ) - return vs_version - - -def _GetVsvarsSetupArgs(generator_flags, arch): - vs = GetVSVersion(generator_flags) - return vs.SetupScript() - - -def ExpandMacros(string, expansions): - """Expand $(Variable) per expansions dict. See MsvsSettings.GetVSMacroEnv - for the canonical way to retrieve a suitable dict.""" - if "$" in string: - for old, new in expansions.items(): - assert "$(" not in new, new - string = string.replace(old, new) - return string - - -def _ExtractImportantEnvironment(output_of_set): - """Extracts environment variables required for the toolchain to run from - a textual dump output by the cmd.exe 'set' command.""" - envvars_to_save = ( - "goma_.*", # TODO(scottmg): This is ugly, but needed for goma. - "include", - "lib", - "libpath", - "path", - "pathext", - "systemroot", - "temp", - "tmp", - ) - env = {} - # This occasionally happens and leads to misleading SYSTEMROOT error messages - # if not caught here. - if output_of_set.count("=") == 0: - raise Exception("Invalid output_of_set. Value is:\n%s" % output_of_set) - for line in output_of_set.splitlines(): - for envvar in envvars_to_save: - if re.match(envvar + "=", line.lower()): - var, setting = line.split("=", 1) - if envvar == "path": - # Our own rules (for running gyp-win-tool) and other actions in - # Chromium rely on python being in the path. Add the path to this - # python here so that if it's not in the path when ninja is run - # later, python will still be found. - setting = os.path.dirname(sys.executable) + os.pathsep + setting - env[var.upper()] = setting - break - for required in ("SYSTEMROOT", "TEMP", "TMP"): - if required not in env: - raise Exception( - 'Environment variable "%s" ' - "required to be set to valid path" % required - ) - return env - - -def _FormatAsEnvironmentBlock(envvar_dict): - """Format as an 'environment block' directly suitable for CreateProcess. - Briefly this is a list of key=value\0, terminated by an additional \0. See - CreateProcess documentation for more details.""" - block = "" - nul = "\0" - for key, value in envvar_dict.items(): - block += key + "=" + value + nul - block += nul - return block - - -def _ExtractCLPath(output_of_where): - """Gets the path to cl.exe based on the output of calling the environment - setup batch file, followed by the equivalent of `where`.""" - # Take the first line, as that's the first found in the PATH. - for line in output_of_where.strip().splitlines(): - if line.startswith("LOC:"): - return line[len("LOC:") :].strip() - - -def GenerateEnvironmentFiles( - toplevel_build_dir, generator_flags, system_includes, open_out -): - """It's not sufficient to have the absolute path to the compiler, linker, - etc. on Windows, as those tools rely on .dlls being in the PATH. We also - need to support both x86 and x64 compilers within the same build (to support - msvs_target_platform hackery). Different architectures require a different - compiler binary, and different supporting environment variables (INCLUDE, - LIB, LIBPATH). So, we extract the environment here, wrap all invocations - of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which - sets up the environment, and then we do not prefix the compiler with - an absolute path, instead preferring something like "cl.exe" in the rule - which will then run whichever the environment setup has put in the path. - When the following procedure to generate environment files does not - meet your requirement (e.g. for custom toolchains), you can pass - "-G ninja_use_custom_environment_files" to the gyp to suppress file - generation and use custom environment files prepared by yourself.""" - archs = ("x86", "x64") - if generator_flags.get("ninja_use_custom_environment_files", 0): - cl_paths = {} - for arch in archs: - cl_paths[arch] = "cl.exe" - return cl_paths - vs = GetVSVersion(generator_flags) - cl_paths = {} - for arch in archs: - # Extract environment variables for subprocesses. - args = vs.SetupScript(arch) - args.extend(("&&", "set")) - popen = subprocess.Popen( - args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - variables = popen.communicate()[0].decode("utf-8") - if popen.returncode != 0: - raise Exception('"%s" failed with error %d' % (args, popen.returncode)) - env = _ExtractImportantEnvironment(variables) - - # Inject system includes from gyp files into INCLUDE. - if system_includes: - system_includes = system_includes | OrderedSet( - env.get("INCLUDE", "").split(";") - ) - env["INCLUDE"] = ";".join(system_includes) - - env_block = _FormatAsEnvironmentBlock(env) - f = open_out(os.path.join(toplevel_build_dir, "environment." + arch), "w") - f.write(env_block) - f.close() - - # Find cl.exe location for this architecture. - args = vs.SetupScript(arch) - args.extend( - ("&&", "for", "%i", "in", "(cl.exe)", "do", "@echo", "LOC:%~$PATH:i") - ) - popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE) - output = popen.communicate()[0].decode("utf-8") - cl_paths[arch] = _ExtractCLPath(output) - return cl_paths - - -def VerifyMissingSources(sources, build_dir, generator_flags, gyp_to_ninja): - """Emulate behavior of msvs_error_on_missing_sources present in the msvs - generator: Check that all regular source files, i.e. not created at run time, - exist on disk. Missing files cause needless recompilation when building via - VS, and we want this check to match for people/bots that build using ninja, - so they're not surprised when the VS build fails.""" - if int(generator_flags.get("msvs_error_on_missing_sources", 0)): - no_specials = filter(lambda x: "$" not in x, sources) - relative = [os.path.join(build_dir, gyp_to_ninja(s)) for s in no_specials] - missing = [x for x in relative if not os.path.exists(x)] - if missing: - # They'll look like out\Release\..\..\stuff\things.cc, so normalize the - # path for a slightly less crazy looking output. - cleaned_up = [os.path.normpath(x) for x in missing] - raise Exception("Missing input files:\n%s" % "\n".join(cleaned_up)) - - -# Sets some values in default_variables, which are required for many -# generators, run on Windows. -def CalculateCommonVariables(default_variables, params): - generator_flags = params.get("generator_flags", {}) - - # Set a variable so conditions can be based on msvs_version. - msvs_version = gyp.msvs_emulation.GetVSVersion(generator_flags) - default_variables["MSVS_VERSION"] = msvs_version.ShortName() - - # To determine processor word size on Windows, in addition to checking - # PROCESSOR_ARCHITECTURE (which reflects the word size of the current - # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which - # contains the actual word size of the system when running thru WOW64). - if "64" in os.environ.get("PROCESSOR_ARCHITECTURE", "") or "64" in os.environ.get( - "PROCESSOR_ARCHITEW6432", "" - ): - default_variables["MSVS_OS_BITS"] = 64 - else: - default_variables["MSVS_OS_BITS"] = 32 diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py deleted file mode 100644 index 0e3e86c..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +++ /dev/null @@ -1,174 +0,0 @@ -# This file comes from -# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py -# Do not edit! Edit the upstream one instead. - -"""Python module for generating .ninja files. - -Note that this is emphatically not a required piece of Ninja; it's -just a helpful utility for build-file-generation systems that already -use Python. -""" - -import textwrap - - -def escape_path(word): - return word.replace("$ ", "$$ ").replace(" ", "$ ").replace(":", "$:") - - -class Writer: - def __init__(self, output, width=78): - self.output = output - self.width = width - - def newline(self): - self.output.write("\n") - - def comment(self, text): - for line in textwrap.wrap(text, self.width - 2): - self.output.write("# " + line + "\n") - - def variable(self, key, value, indent=0): - if value is None: - return - if isinstance(value, list): - value = " ".join(filter(None, value)) # Filter out empty strings. - self._line(f"{key} = {value}", indent) - - def pool(self, name, depth): - self._line("pool %s" % name) - self.variable("depth", depth, indent=1) - - def rule( - self, - name, - command, - description=None, - depfile=None, - generator=False, - pool=None, - restat=False, - rspfile=None, - rspfile_content=None, - deps=None, - ): - self._line("rule %s" % name) - self.variable("command", command, indent=1) - if description: - self.variable("description", description, indent=1) - if depfile: - self.variable("depfile", depfile, indent=1) - if generator: - self.variable("generator", "1", indent=1) - if pool: - self.variable("pool", pool, indent=1) - if restat: - self.variable("restat", "1", indent=1) - if rspfile: - self.variable("rspfile", rspfile, indent=1) - if rspfile_content: - self.variable("rspfile_content", rspfile_content, indent=1) - if deps: - self.variable("deps", deps, indent=1) - - def build( - self, outputs, rule, inputs=None, implicit=None, order_only=None, variables=None - ): - outputs = self._as_list(outputs) - all_inputs = self._as_list(inputs)[:] - out_outputs = list(map(escape_path, outputs)) - all_inputs = list(map(escape_path, all_inputs)) - - if implicit: - implicit = map(escape_path, self._as_list(implicit)) - all_inputs.append("|") - all_inputs.extend(implicit) - if order_only: - order_only = map(escape_path, self._as_list(order_only)) - all_inputs.append("||") - all_inputs.extend(order_only) - - self._line( - "build {}: {}".format(" ".join(out_outputs), " ".join([rule] + all_inputs)) - ) - - if variables: - if isinstance(variables, dict): - iterator = iter(variables.items()) - else: - iterator = iter(variables) - - for key, val in iterator: - self.variable(key, val, indent=1) - - return outputs - - def include(self, path): - self._line("include %s" % path) - - def subninja(self, path): - self._line("subninja %s" % path) - - def default(self, paths): - self._line("default %s" % " ".join(self._as_list(paths))) - - def _count_dollars_before_index(self, s, i): - """Returns the number of '$' characters right in front of s[i].""" - dollar_count = 0 - dollar_index = i - 1 - while dollar_index > 0 and s[dollar_index] == "$": - dollar_count += 1 - dollar_index -= 1 - return dollar_count - - def _line(self, text, indent=0): - """Write 'text' word-wrapped at self.width characters.""" - leading_space = " " * indent - while len(leading_space) + len(text) > self.width: - # The text is too wide; wrap if possible. - - # Find the rightmost space that would obey our width constraint and - # that's not an escaped space. - available_space = self.width - len(leading_space) - len(" $") - space = available_space - while True: - space = text.rfind(" ", 0, space) - if space < 0 or self._count_dollars_before_index(text, space) % 2 == 0: - break - - if space < 0: - # No such space; just use the first unescaped space we can find. - space = available_space - 1 - while True: - space = text.find(" ", space + 1) - if ( - space < 0 - or self._count_dollars_before_index(text, space) % 2 == 0 - ): - break - if space < 0: - # Give up on breaking. - break - - self.output.write(leading_space + text[0:space] + " $\n") - text = text[space + 1 :] - - # Subsequent lines are continuations, so indent them. - leading_space = " " * (indent + 2) - - self.output.write(leading_space + text + "\n") - - def _as_list(self, input): - if input is None: - return [] - if isinstance(input, list): - return input - return [input] - - -def escape(string): - """Escape a string such that it can be embedded into a Ninja file without - further interpretation.""" - assert "\n" not in string, "Ninja syntax does not allow newlines" - # We only have one special metacharacter: '$'. - return string.replace("$", "$$") diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py deleted file mode 100644 index 729cec0..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2014 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""A clone of the default copy.deepcopy that doesn't handle cyclic -structures or complex types except for dicts and lists. This is -because gyp copies so large structure that small copy overhead ends up -taking seconds in a project the size of Chromium.""" - - -class Error(Exception): - pass - - -__all__ = ["Error", "deepcopy"] - - -def deepcopy(x): - """Deep copy operation on gyp objects such as strings, ints, dicts - and lists. More than twice as fast as copy.deepcopy but much less - generic.""" - - try: - return _deepcopy_dispatch[type(x)](x) - except KeyError: - raise Error( - "Unsupported type %s for deepcopy. Use copy.deepcopy " - + "or expand simple_copy support." % type(x) - ) - - -_deepcopy_dispatch = d = {} - - -def _deepcopy_atomic(x): - return x - - -types = bool, float, int, str, type, type(None) - -for x in types: - d[x] = _deepcopy_atomic - - -def _deepcopy_list(x): - return [deepcopy(a) for a in x] - - -d[list] = _deepcopy_list - - -def _deepcopy_dict(x): - y = {} - for key, value in x.items(): - y[deepcopy(key)] = deepcopy(value) - return y - - -d[dict] = _deepcopy_dict - -del d diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py deleted file mode 100755 index 171d729..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +++ /dev/null @@ -1,373 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions for Windows builds. - -These functions are executed via gyp-win-tool when using the ninja generator. -""" - - -import os -import re -import shutil -import subprocess -import stat -import string -import sys - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) - -# A regex matching an argument corresponding to the output filename passed to -# link.exe. -_LINK_EXE_OUT_ARG = re.compile("/OUT:(?P.+)$", re.IGNORECASE) - - -def main(args): - executor = WinTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class WinTool: - """This class performs all the Windows tooling steps. The methods can either - be executed directly, or dispatched from an argument list.""" - - def _UseSeparateMspdbsrv(self, env, args): - """Allows to use a unique instance of mspdbsrv.exe per linker instead of a - shared one.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - if args[0] != "link.exe": - return - - # Use the output filename passed to the linker to generate an endpoint name - # for mspdbsrv.exe. - endpoint_name = None - for arg in args: - m = _LINK_EXE_OUT_ARG.match(arg) - if m: - endpoint_name = re.sub( - r"\W+", "", "%s_%d" % (m.group("out"), os.getpid()) - ) - break - - if endpoint_name is None: - return - - # Adds the appropriate environment variable. This will be read by link.exe - # to know which instance of mspdbsrv.exe it should connect to (if it's - # not set then the default endpoint is used). - env["_MSPDBSRV_ENDPOINT_"] = endpoint_name - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like recursive-mirror to RecursiveMirror.""" - return name_string.title().replace("-", "") - - def _GetEnv(self, arch): - """Gets the saved environment from a file for a given architecture.""" - # The environment is saved as an "environment block" (see CreateProcess - # and msvs_emulation for details). We convert to a dict here. - # Drop last 2 NULs, one for list terminator, one for trailing vs. separator. - pairs = open(arch).read()[:-2].split("\0") - kvs = [item.split("=", 1) for item in pairs] - return dict(kvs) - - def ExecStamp(self, path): - """Simple stamp command.""" - open(path, "w").close() - - def ExecRecursiveMirror(self, source, dest): - """Emulation of rm -rf out && cp -af in out.""" - if os.path.exists(dest): - if os.path.isdir(dest): - - def _on_error(fn, path, excinfo): - # The operation failed, possibly because the file is set to - # read-only. If that's why, make it writable and try the op again. - if not os.access(path, os.W_OK): - os.chmod(path, stat.S_IWRITE) - fn(path) - - shutil.rmtree(dest, onerror=_on_error) - else: - if not os.access(dest, os.W_OK): - # Attempt to make the file writable before deleting it. - os.chmod(dest, stat.S_IWRITE) - os.unlink(dest) - - if os.path.isdir(source): - shutil.copytree(source, dest) - else: - shutil.copy2(source, dest) - - def ExecLinkWrapper(self, arch, use_separate_mspdbsrv, *args): - """Filter diagnostic output from link that looks like: - ' Creating library ui.dll.lib and object ui.dll.exp' - This happens when there are exports from the dll or exe. - """ - env = self._GetEnv(arch) - if use_separate_mspdbsrv == "True": - self._UseSeparateMspdbsrv(env, args) - if sys.platform == "win32": - args = list(args) # *args is a tuple by default, which is read-only. - args[0] = args[0].replace("/", "\\") - # https://docs.python.org/2/library/subprocess.html: - # "On Unix with shell=True [...] if args is a sequence, the first item - # specifies the command string, and any additional items will be treated as - # additional arguments to the shell itself. That is to say, Popen does the - # equivalent of: - # Popen(['/bin/sh', '-c', args[0], args[1], ...])" - # For that reason, since going through the shell doesn't seem necessary on - # non-Windows don't do that there. - link = subprocess.Popen( - args, - shell=sys.platform == "win32", - env=env, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - out = link.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith(" Creating library ") - and not line.startswith("Generating code") - and not line.startswith("Finished generating code") - ): - print(line) - return link.returncode - - def ExecLinkWithManifests( - self, - arch, - embed_manifest, - out, - ldcmd, - resname, - mt, - rc, - intermediate_manifest, - *manifests - ): - """A wrapper for handling creating a manifest resource and then executing - a link command.""" - # The 'normal' way to do manifests is to have link generate a manifest - # based on gathering dependencies from the object files, then merge that - # manifest with other manifests supplied as sources, convert the merged - # manifest to a resource, and then *relink*, including the compiled - # version of the manifest resource. This breaks incremental linking, and - # is generally overly complicated. Instead, we merge all the manifests - # provided (along with one that includes what would normally be in the - # linker-generated one, see msvs_emulation.py), and include that into the - # first and only link. We still tell link to generate a manifest, but we - # only use that to assert that our simpler process did not miss anything. - variables = { - "python": sys.executable, - "arch": arch, - "out": out, - "ldcmd": ldcmd, - "resname": resname, - "mt": mt, - "rc": rc, - "intermediate_manifest": intermediate_manifest, - "manifests": " ".join(manifests), - } - add_to_ld = "" - if manifests: - subprocess.check_call( - "%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo " - "-manifest %(manifests)s -out:%(out)s.manifest" % variables - ) - if embed_manifest == "True": - subprocess.check_call( - "%(python)s gyp-win-tool manifest-to-rc %(arch)s %(out)s.manifest" - " %(out)s.manifest.rc %(resname)s" % variables - ) - subprocess.check_call( - "%(python)s gyp-win-tool rc-wrapper %(arch)s %(rc)s " - "%(out)s.manifest.rc" % variables - ) - add_to_ld = " %(out)s.manifest.res" % variables - subprocess.check_call(ldcmd + add_to_ld) - - # Run mt.exe on the theoretically complete manifest we generated, merging - # it with the one the linker generated to confirm that the linker - # generated one does not add anything. This is strictly unnecessary for - # correctness, it's only to verify that e.g. /MANIFESTDEPENDENCY was not - # used in a #pragma comment. - if manifests: - # Merge the intermediate one with ours to .assert.manifest, then check - # that .assert.manifest is identical to ours. - subprocess.check_call( - "%(python)s gyp-win-tool manifest-wrapper %(arch)s %(mt)s -nologo " - "-manifest %(out)s.manifest %(intermediate_manifest)s " - "-out:%(out)s.assert.manifest" % variables - ) - assert_manifest = "%(out)s.assert.manifest" % variables - our_manifest = "%(out)s.manifest" % variables - # Load and normalize the manifests. mt.exe sometimes removes whitespace, - # and sometimes doesn't unfortunately. - with open(our_manifest) as our_f, open(assert_manifest) as assert_f: - translator = str.maketrans("", "", string.whitespace) - our_data = our_f.read().translate(translator) - assert_data = assert_f.read().translate(translator) - if our_data != assert_data: - os.unlink(out) - - def dump(filename): - print(filename, file=sys.stderr) - print("-----", file=sys.stderr) - with open(filename) as f: - print(f.read(), file=sys.stderr) - print("-----", file=sys.stderr) - - dump(intermediate_manifest) - dump(our_manifest) - dump(assert_manifest) - sys.stderr.write( - 'Linker generated manifest "%s" added to final manifest "%s" ' - '(result in "%s"). ' - "Were /MANIFEST switches used in #pragma statements? " - % (intermediate_manifest, our_manifest, assert_manifest) - ) - return 1 - - def ExecManifestWrapper(self, arch, *args): - """Run manifest tool with environment set. Strip out undesirable warning - (some XML blocks are recognized by the OS loader, but not the manifest - tool).""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if line and "manifest authoring warning 81010002" not in line: - print(line) - return popen.returncode - - def ExecManifestToRc(self, arch, *args): - """Creates a resource file pointing a SxS assembly manifest. - |args| is tuple containing path to resource file, path to manifest file - and resource name which can be "1" (for executables) or "2" (for DLLs).""" - manifest_path, resource_path, resource_name = args - with open(resource_path, "w") as output: - output.write( - '#include \n%s RT_MANIFEST "%s"' - % (resource_name, os.path.abspath(manifest_path).replace("\\", "/")) - ) - - def ExecMidlWrapper(self, arch, outdir, tlb, h, dlldata, iid, proxy, idl, *flags): - """Filter noisy filenames output from MIDL compile step that isn't - quietable via command line flags. - """ - args = ( - ["midl", "/nologo"] - + list(flags) - + [ - "/out", - outdir, - "/tlb", - tlb, - "/h", - h, - "/dlldata", - dlldata, - "/iid", - iid, - "/proxy", - proxy, - idl, - ] - ) - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - # Filter junk out of stdout, and write filtered versions. Output we want - # to filter is pairs of lines that look like this: - # Processing C:\Program Files (x86)\Microsoft SDKs\...\include\objidl.idl - # objidl.idl - lines = out.splitlines() - prefixes = ("Processing ", "64 bit Processing ") - processing = {os.path.basename(x) for x in lines if x.startswith(prefixes)} - for line in lines: - if not line.startswith(prefixes) and line not in processing: - print(line) - return popen.returncode - - def ExecAsmWrapper(self, arch, *args): - """Filter logo banner from invocations of asm.exe.""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith("Copyright (C) Microsoft Corporation") - and not line.startswith("Microsoft (R) Macro Assembler") - and not line.startswith(" Assembling: ") - and line - ): - print(line) - return popen.returncode - - def ExecRcWrapper(self, arch, *args): - """Filter logo banner from invocations of rc.exe. Older versions of RC - don't support the /nologo flag.""" - env = self._GetEnv(arch) - popen = subprocess.Popen( - args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT - ) - out = popen.communicate()[0].decode("utf-8") - for line in out.splitlines(): - if ( - not line.startswith("Microsoft (R) Windows (R) Resource Compiler") - and not line.startswith("Copyright (C) Microsoft Corporation") - and line - ): - print(line) - return popen.returncode - - def ExecActionWrapper(self, arch, rspfile, *dir): - """Runs an action command line from a response file using the environment - for |arch|. If |dir| is supplied, use that as the working directory.""" - env = self._GetEnv(arch) - # TODO(scottmg): This is a temporary hack to get some specific variables - # through to actions that are set after gyp-time. http://crbug.com/333738. - for k, v in os.environ.items(): - if k not in env: - env[k] = v - args = open(rspfile).read() - dir = dir[0] if dir else None - return subprocess.call(args, shell=True, env=env, cwd=dir) - - def ExecClCompile(self, project_dir, selected_files): - """Executed by msvs-ninja projects when the 'ClCompile' target is used to - build selected C/C++ files.""" - project_dir = os.path.relpath(project_dir, BASE_DIR) - selected_files = selected_files.split(";") - ninja_targets = [ - os.path.join(project_dir, filename) + "^^" for filename in selected_files - ] - cmd = ["ninja.exe"] - cmd.extend(ninja_targets) - return subprocess.call(cmd, shell=True, cwd=BASE_DIR) - - -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py deleted file mode 100644 index 29caf1c..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +++ /dev/null @@ -1,1933 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -This module contains classes that help to emulate xcodebuild behavior on top of -other build systems, such as make and ninja. -""" - - -import copy -import gyp.common -import os -import os.path -import re -import shlex -import subprocess -import sys -from gyp.common import GypError - -# Populated lazily by XcodeVersion, for efficiency, and to fix an issue when -# "xcodebuild" is called too quickly (it has been found to return incorrect -# version number). -XCODE_VERSION_CACHE = None - -# Populated lazily by GetXcodeArchsDefault, to an |XcodeArchsDefault| instance -# corresponding to the installed version of Xcode. -XCODE_ARCHS_DEFAULT_CACHE = None - - -def XcodeArchsVariableMapping(archs, archs_including_64_bit=None): - """Constructs a dictionary with expansion for $(ARCHS_STANDARD) variable, - and optionally for $(ARCHS_STANDARD_INCLUDING_64_BIT).""" - mapping = {"$(ARCHS_STANDARD)": archs} - if archs_including_64_bit: - mapping["$(ARCHS_STANDARD_INCLUDING_64_BIT)"] = archs_including_64_bit - return mapping - - -class XcodeArchsDefault: - """A class to resolve ARCHS variable from xcode_settings, resolving Xcode - macros and implementing filtering by VALID_ARCHS. The expansion of macros - depends on the SDKROOT used ("macosx", "iphoneos", "iphonesimulator") and - on the version of Xcode. - """ - - # Match variable like $(ARCHS_STANDARD). - variable_pattern = re.compile(r"\$\([a-zA-Z_][a-zA-Z0-9_]*\)$") - - def __init__(self, default, mac, iphonesimulator, iphoneos): - self._default = (default,) - self._archs = {"mac": mac, "ios": iphoneos, "iossim": iphonesimulator} - - def _VariableMapping(self, sdkroot): - """Returns the dictionary of variable mapping depending on the SDKROOT.""" - sdkroot = sdkroot.lower() - if "iphoneos" in sdkroot: - return self._archs["ios"] - elif "iphonesimulator" in sdkroot: - return self._archs["iossim"] - else: - return self._archs["mac"] - - def _ExpandArchs(self, archs, sdkroot): - """Expands variables references in ARCHS, and remove duplicates.""" - variable_mapping = self._VariableMapping(sdkroot) - expanded_archs = [] - for arch in archs: - if self.variable_pattern.match(arch): - variable = arch - try: - variable_expansion = variable_mapping[variable] - for arch in variable_expansion: - if arch not in expanded_archs: - expanded_archs.append(arch) - except KeyError: - print('Warning: Ignoring unsupported variable "%s".' % variable) - elif arch not in expanded_archs: - expanded_archs.append(arch) - return expanded_archs - - def ActiveArchs(self, archs, valid_archs, sdkroot): - """Expands variables references in ARCHS, and filter by VALID_ARCHS if it - is defined (if not set, Xcode accept any value in ARCHS, otherwise, only - values present in VALID_ARCHS are kept).""" - expanded_archs = self._ExpandArchs(archs or self._default, sdkroot or "") - if valid_archs: - filtered_archs = [] - for arch in expanded_archs: - if arch in valid_archs: - filtered_archs.append(arch) - expanded_archs = filtered_archs - return expanded_archs - - -def GetXcodeArchsDefault(): - """Returns the |XcodeArchsDefault| object to use to expand ARCHS for the - installed version of Xcode. The default values used by Xcode for ARCHS - and the expansion of the variables depends on the version of Xcode used. - - For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included - uses $(ARCHS_STANDARD) if ARCHS is unset, while Xcode 5.0 to 5.0.2 uses - $(ARCHS_STANDARD_INCLUDING_64_BIT). This variable was added to Xcode 5.0 - and deprecated with Xcode 5.1. - - For "macosx" SDKROOT, all version starting with Xcode 5.0 includes 64-bit - architecture as part of $(ARCHS_STANDARD) and default to only building it. - - For "iphoneos" and "iphonesimulator" SDKROOT, 64-bit architectures are part - of $(ARCHS_STANDARD_INCLUDING_64_BIT) from Xcode 5.0. From Xcode 5.1, they - are also part of $(ARCHS_STANDARD). - - All these rules are coded in the construction of the |XcodeArchsDefault| - object to use depending on the version of Xcode detected. The object is - for performance reason.""" - global XCODE_ARCHS_DEFAULT_CACHE - if XCODE_ARCHS_DEFAULT_CACHE: - return XCODE_ARCHS_DEFAULT_CACHE - xcode_version, _ = XcodeVersion() - if xcode_version < "0500": - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD)", - XcodeArchsVariableMapping(["i386"]), - XcodeArchsVariableMapping(["i386"]), - XcodeArchsVariableMapping(["armv7"]), - ) - elif xcode_version < "0510": - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD_INCLUDING_64_BIT)", - XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), - XcodeArchsVariableMapping(["i386"], ["i386", "x86_64"]), - XcodeArchsVariableMapping( - ["armv7", "armv7s"], ["armv7", "armv7s", "arm64"] - ), - ) - else: - XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( - "$(ARCHS_STANDARD)", - XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), - XcodeArchsVariableMapping(["i386", "x86_64"], ["i386", "x86_64"]), - XcodeArchsVariableMapping( - ["armv7", "armv7s", "arm64"], ["armv7", "armv7s", "arm64"] - ), - ) - return XCODE_ARCHS_DEFAULT_CACHE - - -class XcodeSettings: - """A class that understands the gyp 'xcode_settings' object.""" - - # Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached - # at class-level for efficiency. - _sdk_path_cache = {} - _platform_path_cache = {} - _sdk_root_cache = {} - - # Populated lazily by GetExtraPlistItems(). Shared by all XcodeSettings, so - # cached at class-level for efficiency. - _plist_cache = {} - - # Populated lazily by GetIOSPostbuilds. Shared by all XcodeSettings, so - # cached at class-level for efficiency. - _codesigning_key_cache = {} - - def __init__(self, spec): - self.spec = spec - - self.isIOS = False - self.mac_toolchain_dir = None - self.header_map_path = None - - # Per-target 'xcode_settings' are pushed down into configs earlier by gyp. - # This means self.xcode_settings[config] always contains all settings - # for that config -- the per-target settings as well. Settings that are - # the same for all configs are implicitly per-target settings. - self.xcode_settings = {} - configs = spec["configurations"] - for configname, config in configs.items(): - self.xcode_settings[configname] = config.get("xcode_settings", {}) - self._ConvertConditionalKeys(configname) - if self.xcode_settings[configname].get("IPHONEOS_DEPLOYMENT_TARGET", None): - self.isIOS = True - - # This is only non-None temporarily during the execution of some methods. - self.configname = None - - # Used by _AdjustLibrary to match .a and .dylib entries in libraries. - self.library_re = re.compile(r"^lib([^/]+)\.(a|dylib)$") - - def _ConvertConditionalKeys(self, configname): - """Converts or warns on conditional keys. Xcode supports conditional keys, - such as CODE_SIGN_IDENTITY[sdk=iphoneos*]. This is a partial implementation - with some keys converted while the rest force a warning.""" - settings = self.xcode_settings[configname] - conditional_keys = [key for key in settings if key.endswith("]")] - for key in conditional_keys: - # If you need more, speak up at http://crbug.com/122592 - if key.endswith("[sdk=iphoneos*]"): - if configname.endswith("iphoneos"): - new_key = key.split("[")[0] - settings[new_key] = settings[key] - else: - print( - "Warning: Conditional keys not implemented, ignoring:", - " ".join(conditional_keys), - ) - del settings[key] - - def _Settings(self): - assert self.configname - return self.xcode_settings[self.configname] - - def _Test(self, test_key, cond_key, default): - return self._Settings().get(test_key, default) == cond_key - - def _Appendf(self, lst, test_key, format_str, default=None): - if test_key in self._Settings(): - lst.append(format_str % str(self._Settings()[test_key])) - elif default: - lst.append(format_str % str(default)) - - def _WarnUnimplemented(self, test_key): - if test_key in self._Settings(): - print('Warning: Ignoring not yet implemented key "%s".' % test_key) - - def IsBinaryOutputFormat(self, configname): - default = "binary" if self.isIOS else "xml" - format = self.xcode_settings[configname].get("INFOPLIST_OUTPUT_FORMAT", default) - return format == "binary" - - def IsIosFramework(self): - return self.spec["type"] == "shared_library" and self._IsBundle() and self.isIOS - - def _IsBundle(self): - return ( - int(self.spec.get("mac_bundle", 0)) != 0 - or self._IsXCTest() - or self._IsXCUiTest() - ) - - def _IsXCTest(self): - return int(self.spec.get("mac_xctest_bundle", 0)) != 0 - - def _IsXCUiTest(self): - return int(self.spec.get("mac_xcuitest_bundle", 0)) != 0 - - def _IsIosAppExtension(self): - return int(self.spec.get("ios_app_extension", 0)) != 0 - - def _IsIosWatchKitExtension(self): - return int(self.spec.get("ios_watchkit_extension", 0)) != 0 - - def _IsIosWatchApp(self): - return int(self.spec.get("ios_watch_app", 0)) != 0 - - def GetFrameworkVersion(self): - """Returns the framework version of the current target. Only valid for - bundles.""" - assert self._IsBundle() - return self.GetPerTargetSetting("FRAMEWORK_VERSION", default="A") - - def GetWrapperExtension(self): - """Returns the bundle extension (.app, .framework, .plugin, etc). Only - valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] in ("loadable_module", "shared_library"): - default_wrapper_extension = { - "loadable_module": "bundle", - "shared_library": "framework", - }[self.spec["type"]] - wrapper_extension = self.GetPerTargetSetting( - "WRAPPER_EXTENSION", default=default_wrapper_extension - ) - return "." + self.spec.get("product_extension", wrapper_extension) - elif self.spec["type"] == "executable": - if self._IsIosAppExtension() or self._IsIosWatchKitExtension(): - return "." + self.spec.get("product_extension", "appex") - else: - return "." + self.spec.get("product_extension", "app") - else: - assert False, "Don't know extension for '{}', target '{}'".format( - self.spec["type"], - self.spec["target_name"], - ) - - def GetProductName(self): - """Returns PRODUCT_NAME.""" - return self.spec.get("product_name", self.spec["target_name"]) - - def GetFullProductName(self): - """Returns FULL_PRODUCT_NAME.""" - if self._IsBundle(): - return self.GetWrapperName() - else: - return self._GetStandaloneBinaryPath() - - def GetWrapperName(self): - """Returns the directory name of the bundle represented by this target. - Only valid for bundles.""" - assert self._IsBundle() - return self.GetProductName() + self.GetWrapperExtension() - - def GetBundleContentsFolderPath(self): - """Returns the qualified path to the bundle's contents folder. E.g. - Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles.""" - if self.isIOS: - return self.GetWrapperName() - assert self._IsBundle() - if self.spec["type"] == "shared_library": - return os.path.join( - self.GetWrapperName(), "Versions", self.GetFrameworkVersion() - ) - else: - # loadable_modules have a 'Contents' folder like executables. - return os.path.join(self.GetWrapperName(), "Contents") - - def GetBundleResourceFolder(self): - """Returns the qualified path to the bundle's resource folder. E.g. - Chromium.app/Contents/Resources. Only valid for bundles.""" - assert self._IsBundle() - if self.isIOS: - return self.GetBundleContentsFolderPath() - return os.path.join(self.GetBundleContentsFolderPath(), "Resources") - - def GetBundleExecutableFolderPath(self): - """Returns the qualified path to the bundle's executables folder. E.g. - Chromium.app/Contents/MacOS. Only valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] in ("shared_library") or self.isIOS: - return self.GetBundleContentsFolderPath() - elif self.spec["type"] in ("executable", "loadable_module"): - return os.path.join(self.GetBundleContentsFolderPath(), "MacOS") - - def GetBundleJavaFolderPath(self): - """Returns the qualified path to the bundle's Java resource folder. - E.g. Chromium.app/Contents/Resources/Java. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleResourceFolder(), "Java") - - def GetBundleFrameworksFolderPath(self): - """Returns the qualified path to the bundle's frameworks folder. E.g, - Chromium.app/Contents/Frameworks. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "Frameworks") - - def GetBundleSharedFrameworksFolderPath(self): - """Returns the qualified path to the bundle's frameworks folder. E.g, - Chromium.app/Contents/SharedFrameworks. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "SharedFrameworks") - - def GetBundleSharedSupportFolderPath(self): - """Returns the qualified path to the bundle's shared support folder. E.g, - Chromium.app/Contents/SharedSupport. Only valid for bundles.""" - assert self._IsBundle() - if self.spec["type"] == "shared_library": - return self.GetBundleResourceFolder() - else: - return os.path.join(self.GetBundleContentsFolderPath(), "SharedSupport") - - def GetBundlePlugInsFolderPath(self): - """Returns the qualified path to the bundle's plugins folder. E.g, - Chromium.app/Contents/PlugIns. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "PlugIns") - - def GetBundleXPCServicesFolderPath(self): - """Returns the qualified path to the bundle's XPC services folder. E.g, - Chromium.app/Contents/XPCServices. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join(self.GetBundleContentsFolderPath(), "XPCServices") - - def GetBundlePlistPath(self): - """Returns the qualified path to the bundle's plist file. E.g. - Chromium.app/Contents/Info.plist. Only valid for bundles.""" - assert self._IsBundle() - if ( - self.spec["type"] in ("executable", "loadable_module") - or self.IsIosFramework() - ): - return os.path.join(self.GetBundleContentsFolderPath(), "Info.plist") - else: - return os.path.join( - self.GetBundleContentsFolderPath(), "Resources", "Info.plist" - ) - - def GetProductType(self): - """Returns the PRODUCT_TYPE of this target.""" - if self._IsIosAppExtension(): - assert self._IsBundle(), ( - "ios_app_extension flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.app-extension" - if self._IsIosWatchKitExtension(): - assert self._IsBundle(), ( - "ios_watchkit_extension flag requires " - "mac_bundle (target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.watchkit-extension" - if self._IsIosWatchApp(): - assert self._IsBundle(), ( - "ios_watch_app flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.application.watchapp" - if self._IsXCUiTest(): - assert self._IsBundle(), ( - "mac_xcuitest_bundle flag requires mac_bundle " - "(target %s)" % self.spec["target_name"] - ) - return "com.apple.product-type.bundle.ui-testing" - if self._IsBundle(): - return { - "executable": "com.apple.product-type.application", - "loadable_module": "com.apple.product-type.bundle", - "shared_library": "com.apple.product-type.framework", - }[self.spec["type"]] - else: - return { - "executable": "com.apple.product-type.tool", - "loadable_module": "com.apple.product-type.library.dynamic", - "shared_library": "com.apple.product-type.library.dynamic", - "static_library": "com.apple.product-type.library.static", - }[self.spec["type"]] - - def GetMachOType(self): - """Returns the MACH_O_TYPE of this target.""" - # Weird, but matches Xcode. - if not self._IsBundle() and self.spec["type"] == "executable": - return "" - return { - "executable": "mh_execute", - "static_library": "staticlib", - "shared_library": "mh_dylib", - "loadable_module": "mh_bundle", - }[self.spec["type"]] - - def _GetBundleBinaryPath(self): - """Returns the name of the bundle binary of by this target. - E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles.""" - assert self._IsBundle() - return os.path.join( - self.GetBundleExecutableFolderPath(), self.GetExecutableName() - ) - - def _GetStandaloneExecutableSuffix(self): - if "product_extension" in self.spec: - return "." + self.spec["product_extension"] - return { - "executable": "", - "static_library": ".a", - "shared_library": ".dylib", - "loadable_module": ".so", - }[self.spec["type"]] - - def _GetStandaloneExecutablePrefix(self): - return self.spec.get( - "product_prefix", - { - "executable": "", - "static_library": "lib", - "shared_library": "lib", - # Non-bundled loadable_modules are called foo.so for some reason - # (that is, .so and no prefix) with the xcode build -- match that. - "loadable_module": "", - }[self.spec["type"]], - ) - - def _GetStandaloneBinaryPath(self): - """Returns the name of the non-bundle binary represented by this target. - E.g. hello_world. Only valid for non-bundles.""" - assert not self._IsBundle() - assert self.spec["type"] in ( - "executable", - "shared_library", - "static_library", - "loadable_module", - ), ("Unexpected type %s" % self.spec["type"]) - target = self.spec["target_name"] - if self.spec["type"] == "static_library": - if target[:3] == "lib": - target = target[3:] - elif self.spec["type"] in ("loadable_module", "shared_library"): - if target[:3] == "lib": - target = target[3:] - - target_prefix = self._GetStandaloneExecutablePrefix() - target = self.spec.get("product_name", target) - target_ext = self._GetStandaloneExecutableSuffix() - return target_prefix + target + target_ext - - def GetExecutableName(self): - """Returns the executable name of the bundle represented by this target. - E.g. Chromium.""" - if self._IsBundle(): - return self.spec.get("product_name", self.spec["target_name"]) - else: - return self._GetStandaloneBinaryPath() - - def GetExecutablePath(self): - """Returns the qualified path to the primary executable of the bundle - represented by this target. E.g. Chromium.app/Contents/MacOS/Chromium.""" - if self._IsBundle(): - return self._GetBundleBinaryPath() - else: - return self._GetStandaloneBinaryPath() - - def GetActiveArchs(self, configname): - """Returns the architectures this target should be built for.""" - config_settings = self.xcode_settings[configname] - xcode_archs_default = GetXcodeArchsDefault() - return xcode_archs_default.ActiveArchs( - config_settings.get("ARCHS"), - config_settings.get("VALID_ARCHS"), - config_settings.get("SDKROOT"), - ) - - def _GetSdkVersionInfoItem(self, sdk, infoitem): - # xcodebuild requires Xcode and can't run on Command Line Tools-only - # systems from 10.7 onward. - # Since the CLT has no SDK paths anyway, returning None is the - # most sensible route and should still do the right thing. - try: - return GetStdoutQuiet(["xcrun", "--sdk", sdk, infoitem]) - except GypError: - pass - - def _SdkRoot(self, configname): - if configname is None: - configname = self.configname - return self.GetPerConfigSetting("SDKROOT", configname, default="") - - def _XcodePlatformPath(self, configname=None): - sdk_root = self._SdkRoot(configname) - if sdk_root not in XcodeSettings._platform_path_cache: - platform_path = self._GetSdkVersionInfoItem( - sdk_root, "--show-sdk-platform-path" - ) - XcodeSettings._platform_path_cache[sdk_root] = platform_path - return XcodeSettings._platform_path_cache[sdk_root] - - def _SdkPath(self, configname=None): - sdk_root = self._SdkRoot(configname) - if sdk_root.startswith("/"): - return sdk_root - return self._XcodeSdkPath(sdk_root) - - def _XcodeSdkPath(self, sdk_root): - if sdk_root not in XcodeSettings._sdk_path_cache: - sdk_path = self._GetSdkVersionInfoItem(sdk_root, "--show-sdk-path") - XcodeSettings._sdk_path_cache[sdk_root] = sdk_path - if sdk_root: - XcodeSettings._sdk_root_cache[sdk_path] = sdk_root - return XcodeSettings._sdk_path_cache[sdk_root] - - def _AppendPlatformVersionMinFlags(self, lst): - self._Appendf(lst, "MACOSX_DEPLOYMENT_TARGET", "-mmacosx-version-min=%s") - if "IPHONEOS_DEPLOYMENT_TARGET" in self._Settings(): - # TODO: Implement this better? - sdk_path_basename = os.path.basename(self._SdkPath()) - if sdk_path_basename.lower().startswith("iphonesimulator"): - self._Appendf( - lst, "IPHONEOS_DEPLOYMENT_TARGET", "-mios-simulator-version-min=%s" - ) - else: - self._Appendf( - lst, "IPHONEOS_DEPLOYMENT_TARGET", "-miphoneos-version-min=%s" - ) - - def GetCflags(self, configname, arch=None): - """Returns flags that need to be added to .c, .cc, .m, and .mm - compilations.""" - # This functions (and the similar ones below) do not offer complete - # emulation of all xcode_settings keys. They're implemented on demand. - - self.configname = configname - cflags = [] - - sdk_root = self._SdkPath() - if "SDKROOT" in self._Settings() and sdk_root: - cflags.append("-isysroot %s" % sdk_root) - - if self.header_map_path: - cflags.append("-I%s" % self.header_map_path) - - if self._Test("CLANG_WARN_CONSTANT_CONVERSION", "YES", default="NO"): - cflags.append("-Wconstant-conversion") - - if self._Test("GCC_CHAR_IS_UNSIGNED_CHAR", "YES", default="NO"): - cflags.append("-funsigned-char") - - if self._Test("GCC_CW_ASM_SYNTAX", "YES", default="YES"): - cflags.append("-fasm-blocks") - - if "GCC_DYNAMIC_NO_PIC" in self._Settings(): - if self._Settings()["GCC_DYNAMIC_NO_PIC"] == "YES": - cflags.append("-mdynamic-no-pic") - else: - pass - # TODO: In this case, it depends on the target. xcode passes - # mdynamic-no-pic by default for executable and possibly static lib - # according to mento - - if self._Test("GCC_ENABLE_PASCAL_STRINGS", "YES", default="YES"): - cflags.append("-mpascal-strings") - - self._Appendf(cflags, "GCC_OPTIMIZATION_LEVEL", "-O%s", default="s") - - if self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES"): - dbg_format = self._Settings().get("DEBUG_INFORMATION_FORMAT", "dwarf") - if dbg_format == "dwarf": - cflags.append("-gdwarf-2") - elif dbg_format == "stabs": - raise NotImplementedError("stabs debug format is not supported yet.") - elif dbg_format == "dwarf-with-dsym": - cflags.append("-gdwarf-2") - else: - raise NotImplementedError("Unknown debug format %s" % dbg_format) - - if self._Settings().get("GCC_STRICT_ALIASING") == "YES": - cflags.append("-fstrict-aliasing") - elif self._Settings().get("GCC_STRICT_ALIASING") == "NO": - cflags.append("-fno-strict-aliasing") - - if self._Test("GCC_SYMBOLS_PRIVATE_EXTERN", "YES", default="NO"): - cflags.append("-fvisibility=hidden") - - if self._Test("GCC_TREAT_WARNINGS_AS_ERRORS", "YES", default="NO"): - cflags.append("-Werror") - - if self._Test("GCC_WARN_ABOUT_MISSING_NEWLINE", "YES", default="NO"): - cflags.append("-Wnewline-eof") - - # In Xcode, this is only activated when GCC_COMPILER_VERSION is clang or - # llvm-gcc. It also requires a fairly recent libtool, and - # if the system clang isn't used, DYLD_LIBRARY_PATH needs to contain the - # path to the libLTO.dylib that matches the used clang. - if self._Test("LLVM_LTO", "YES", default="NO"): - cflags.append("-flto") - - self._AppendPlatformVersionMinFlags(cflags) - - # TODO: - if self._Test("COPY_PHASE_STRIP", "YES", default="NO"): - self._WarnUnimplemented("COPY_PHASE_STRIP") - self._WarnUnimplemented("GCC_DEBUGGING_SYMBOLS") - self._WarnUnimplemented("GCC_ENABLE_OBJC_EXCEPTIONS") - - # TODO: This is exported correctly, but assigning to it is not supported. - self._WarnUnimplemented("MACH_O_TYPE") - self._WarnUnimplemented("PRODUCT_TYPE") - - # If GYP_CROSSCOMPILE (--cross-compiling), disable architecture-specific - # additions and assume these will be provided as required via CC_host, - # CXX_host, CC_target and CXX_target. - if not gyp.common.CrossCompileRequested(): - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - cflags.append("-arch " + archs[0]) - - if archs[0] in ("i386", "x86_64"): - if self._Test("GCC_ENABLE_SSE3_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse3") - if self._Test( - "GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS", "YES", default="NO" - ): - cflags.append("-mssse3") # Note 3rd 's'. - if self._Test("GCC_ENABLE_SSE41_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.1") - if self._Test("GCC_ENABLE_SSE42_EXTENSIONS", "YES", default="NO"): - cflags.append("-msse4.2") - - cflags += self._Settings().get("WARNING_CFLAGS", []) - - if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if platform_root: - cflags.append("-F" + platform_root + "/Developer/Library/Frameworks/") - - framework_root = sdk_root if sdk_root else "" - config = self.spec["configurations"][self.configname] - framework_dirs = config.get("mac_framework_dirs", []) - for directory in framework_dirs: - cflags.append("-F" + directory.replace("$(SDKROOT)", framework_root)) - - self.configname = None - return cflags - - def GetCflagsC(self, configname): - """Returns flags that need to be added to .c, and .m compilations.""" - self.configname = configname - cflags_c = [] - if self._Settings().get("GCC_C_LANGUAGE_STANDARD", "") == "ansi": - cflags_c.append("-ansi") - else: - self._Appendf(cflags_c, "GCC_C_LANGUAGE_STANDARD", "-std=%s") - cflags_c += self._Settings().get("OTHER_CFLAGS", []) - self.configname = None - return cflags_c - - def GetCflagsCC(self, configname): - """Returns flags that need to be added to .cc, and .mm compilations.""" - self.configname = configname - cflags_cc = [] - - clang_cxx_language_standard = self._Settings().get( - "CLANG_CXX_LANGUAGE_STANDARD" - ) - # Note: Don't make c++0x to c++11 so that c++0x can be used with older - # clangs that don't understand c++11 yet (like Xcode 4.2's). - if clang_cxx_language_standard: - cflags_cc.append("-std=%s" % clang_cxx_language_standard) - - self._Appendf(cflags_cc, "CLANG_CXX_LIBRARY", "-stdlib=%s") - - if self._Test("GCC_ENABLE_CPP_RTTI", "NO", default="YES"): - cflags_cc.append("-fno-rtti") - if self._Test("GCC_ENABLE_CPP_EXCEPTIONS", "NO", default="YES"): - cflags_cc.append("-fno-exceptions") - if self._Test("GCC_INLINES_ARE_PRIVATE_EXTERN", "YES", default="NO"): - cflags_cc.append("-fvisibility-inlines-hidden") - if self._Test("GCC_THREADSAFE_STATICS", "NO", default="YES"): - cflags_cc.append("-fno-threadsafe-statics") - # Note: This flag is a no-op for clang, it only has an effect for gcc. - if self._Test("GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO", "NO", default="YES"): - cflags_cc.append("-Wno-invalid-offsetof") - - other_ccflags = [] - - for flag in self._Settings().get("OTHER_CPLUSPLUSFLAGS", ["$(inherited)"]): - # TODO: More general variable expansion. Missing in many other places too. - if flag in ("$inherited", "$(inherited)", "${inherited}"): - flag = "$OTHER_CFLAGS" - if flag in ("$OTHER_CFLAGS", "$(OTHER_CFLAGS)", "${OTHER_CFLAGS}"): - other_ccflags += self._Settings().get("OTHER_CFLAGS", []) - else: - other_ccflags.append(flag) - cflags_cc += other_ccflags - - self.configname = None - return cflags_cc - - def _AddObjectiveCGarbageCollectionFlags(self, flags): - gc_policy = self._Settings().get("GCC_ENABLE_OBJC_GC", "unsupported") - if gc_policy == "supported": - flags.append("-fobjc-gc") - elif gc_policy == "required": - flags.append("-fobjc-gc-only") - - def _AddObjectiveCARCFlags(self, flags): - if self._Test("CLANG_ENABLE_OBJC_ARC", "YES", default="NO"): - flags.append("-fobjc-arc") - - def _AddObjectiveCMissingPropertySynthesisFlags(self, flags): - if self._Test( - "CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS", "YES", default="NO" - ): - flags.append("-Wobjc-missing-property-synthesis") - - def GetCflagsObjC(self, configname): - """Returns flags that need to be added to .m compilations.""" - self.configname = configname - cflags_objc = [] - self._AddObjectiveCGarbageCollectionFlags(cflags_objc) - self._AddObjectiveCARCFlags(cflags_objc) - self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objc) - self.configname = None - return cflags_objc - - def GetCflagsObjCC(self, configname): - """Returns flags that need to be added to .mm compilations.""" - self.configname = configname - cflags_objcc = [] - self._AddObjectiveCGarbageCollectionFlags(cflags_objcc) - self._AddObjectiveCARCFlags(cflags_objcc) - self._AddObjectiveCMissingPropertySynthesisFlags(cflags_objcc) - if self._Test("GCC_OBJC_CALL_CXX_CDTORS", "YES", default="NO"): - cflags_objcc.append("-fobjc-call-cxx-cdtors") - self.configname = None - return cflags_objcc - - def GetInstallNameBase(self): - """Return DYLIB_INSTALL_NAME_BASE for this target.""" - # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. - if self.spec["type"] != "shared_library" and ( - self.spec["type"] != "loadable_module" or self._IsBundle() - ): - return None - install_base = self.GetPerTargetSetting( - "DYLIB_INSTALL_NAME_BASE", - default="/Library/Frameworks" if self._IsBundle() else "/usr/local/lib", - ) - return install_base - - def _StandardizePath(self, path): - """Do :standardizepath processing for path.""" - # I'm not quite sure what :standardizepath does. Just call normpath(), - # but don't let @executable_path/../foo collapse to foo. - if "/" in path: - prefix, rest = "", path - if path.startswith("@"): - prefix, rest = path.split("/", 1) - rest = os.path.normpath(rest) # :standardizepath - path = os.path.join(prefix, rest) - return path - - def GetInstallName(self): - """Return LD_DYLIB_INSTALL_NAME for this target.""" - # Xcode sets this for shared_libraries, and for nonbundled loadable_modules. - if self.spec["type"] != "shared_library" and ( - self.spec["type"] != "loadable_module" or self._IsBundle() - ): - return None - - default_install_name = ( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)" - ) - install_name = self.GetPerTargetSetting( - "LD_DYLIB_INSTALL_NAME", default=default_install_name - ) - - # Hardcode support for the variables used in chromium for now, to - # unblock people using the make build. - if "$" in install_name: - assert install_name in ( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/" - "$(WRAPPER_NAME)/$(PRODUCT_NAME)", - default_install_name, - ), ( - "Variables in LD_DYLIB_INSTALL_NAME are not generally supported " - "yet in target '%s' (got '%s')" - % (self.spec["target_name"], install_name) - ) - - install_name = install_name.replace( - "$(DYLIB_INSTALL_NAME_BASE:standardizepath)", - self._StandardizePath(self.GetInstallNameBase()), - ) - if self._IsBundle(): - # These are only valid for bundles, hence the |if|. - install_name = install_name.replace( - "$(WRAPPER_NAME)", self.GetWrapperName() - ) - install_name = install_name.replace( - "$(PRODUCT_NAME)", self.GetProductName() - ) - else: - assert "$(WRAPPER_NAME)" not in install_name - assert "$(PRODUCT_NAME)" not in install_name - - install_name = install_name.replace( - "$(EXECUTABLE_PATH)", self.GetExecutablePath() - ) - return install_name - - def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path): - """Checks if ldflag contains a filename and if so remaps it from - gyp-directory-relative to build-directory-relative.""" - # This list is expanded on demand. - # They get matched as: - # -exported_symbols_list file - # -Wl,exported_symbols_list file - # -Wl,exported_symbols_list,file - LINKER_FILE = r"(\S+)" - WORD = r"\S+" - linker_flags = [ - ["-exported_symbols_list", LINKER_FILE], # Needed for NaCl. - ["-unexported_symbols_list", LINKER_FILE], - ["-reexported_symbols_list", LINKER_FILE], - ["-sectcreate", WORD, WORD, LINKER_FILE], # Needed for remoting. - ] - for flag_pattern in linker_flags: - regex = re.compile("(?:-Wl,)?" + "[ ,]".join(flag_pattern)) - m = regex.match(ldflag) - if m: - ldflag = ( - ldflag[: m.start(1)] - + gyp_to_build_path(m.group(1)) - + ldflag[m.end(1) :] - ) - # Required for ffmpeg (no idea why they don't use LIBRARY_SEARCH_PATHS, - # TODO(thakis): Update ffmpeg.gyp): - if ldflag.startswith("-L"): - ldflag = "-L" + gyp_to_build_path(ldflag[len("-L") :]) - return ldflag - - def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None): - """Returns flags that need to be passed to the linker. - - Args: - configname: The name of the configuration to get ld flags for. - product_dir: The directory where products such static and dynamic - libraries are placed. This is added to the library search path. - gyp_to_build_path: A function that converts paths relative to the - current gyp file to paths relative to the build directory. - """ - self.configname = configname - ldflags = [] - - # The xcode build is relative to a gyp file's directory, and OTHER_LDFLAGS - # can contain entries that depend on this. Explicitly absolutify these. - for ldflag in self._Settings().get("OTHER_LDFLAGS", []): - ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path)) - - if self._Test("DEAD_CODE_STRIPPING", "YES", default="NO"): - ldflags.append("-Wl,-dead_strip") - - if self._Test("PREBINDING", "YES", default="NO"): - ldflags.append("-Wl,-prebind") - - self._Appendf( - ldflags, "DYLIB_COMPATIBILITY_VERSION", "-compatibility_version %s" - ) - self._Appendf(ldflags, "DYLIB_CURRENT_VERSION", "-current_version %s") - - self._AppendPlatformVersionMinFlags(ldflags) - - if "SDKROOT" in self._Settings() and self._SdkPath(): - ldflags.append("-isysroot " + self._SdkPath()) - - for library_path in self._Settings().get("LIBRARY_SEARCH_PATHS", []): - ldflags.append("-L" + gyp_to_build_path(library_path)) - - if "ORDER_FILE" in self._Settings(): - ldflags.append( - "-Wl,-order_file " - + "-Wl," - + gyp_to_build_path(self._Settings()["ORDER_FILE"]) - ) - - if not gyp.common.CrossCompileRequested(): - if arch is not None: - archs = [arch] - else: - assert self.configname - archs = self.GetActiveArchs(self.configname) - if len(archs) != 1: - # TODO: Supporting fat binaries will be annoying. - self._WarnUnimplemented("ARCHS") - archs = ["i386"] - ldflags.append("-arch " + archs[0]) - - # Xcode adds the product directory by default. - # Rewrite -L. to -L./ to work around http://www.openradar.me/25313838 - ldflags.append("-L" + (product_dir if product_dir != "." else "./")) - - install_name = self.GetInstallName() - if install_name and self.spec["type"] != "loadable_module": - ldflags.append("-install_name " + install_name.replace(" ", r"\ ")) - - for rpath in self._Settings().get("LD_RUNPATH_SEARCH_PATHS", []): - ldflags.append("-Wl,-rpath," + rpath) - - sdk_root = self._SdkPath() - if not sdk_root: - sdk_root = "" - config = self.spec["configurations"][self.configname] - framework_dirs = config.get("mac_framework_dirs", []) - for directory in framework_dirs: - ldflags.append("-F" + directory.replace("$(SDKROOT)", sdk_root)) - - if self._IsXCTest(): - platform_root = self._XcodePlatformPath(configname) - if sdk_root and platform_root: - ldflags.append("-F" + platform_root + "/Developer/Library/Frameworks/") - ldflags.append("-framework XCTest") - - is_extension = self._IsIosAppExtension() or self._IsIosWatchKitExtension() - if sdk_root and is_extension: - # Adds the link flags for extensions. These flags are common for all - # extensions and provide loader and main function. - # These flags reflect the compilation options used by xcode to compile - # extensions. - xcode_version, _ = XcodeVersion() - if xcode_version < "0900": - ldflags.append("-lpkstart") - ldflags.append( - sdk_root - + "/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit" - ) - else: - ldflags.append("-e _NSExtensionMain") - ldflags.append("-fapplication-extension") - - self._Appendf(ldflags, "CLANG_CXX_LIBRARY", "-stdlib=%s") - - self.configname = None - return ldflags - - def GetLibtoolflags(self, configname): - """Returns flags that need to be passed to the static linker. - - Args: - configname: The name of the configuration to get ld flags for. - """ - self.configname = configname - libtoolflags = [] - - for libtoolflag in self._Settings().get("OTHER_LDFLAGS", []): - libtoolflags.append(libtoolflag) - # TODO(thakis): ARCHS? - - self.configname = None - return libtoolflags - - def GetPerTargetSettings(self): - """Gets a list of all the per-target settings. This will only fetch keys - whose values are the same across all configurations.""" - first_pass = True - result = {} - for configname in sorted(self.xcode_settings.keys()): - if first_pass: - result = dict(self.xcode_settings[configname]) - first_pass = False - else: - for key, value in self.xcode_settings[configname].items(): - if key not in result: - continue - elif result[key] != value: - del result[key] - return result - - def GetPerConfigSetting(self, setting, configname, default=None): - if configname in self.xcode_settings: - return self.xcode_settings[configname].get(setting, default) - else: - return self.GetPerTargetSetting(setting, default) - - def GetPerTargetSetting(self, setting, default=None): - """Tries to get xcode_settings.setting from spec. Assumes that the setting - has the same value in all configurations and throws otherwise.""" - is_first_pass = True - result = None - for configname in sorted(self.xcode_settings.keys()): - if is_first_pass: - result = self.xcode_settings[configname].get(setting, None) - is_first_pass = False - else: - assert result == self.xcode_settings[configname].get(setting, None), ( - "Expected per-target setting for '%s', got per-config setting " - "(target %s)" % (setting, self.spec["target_name"]) - ) - if result is None: - return default - return result - - def _GetStripPostbuilds(self, configname, output_binary, quiet): - """Returns a list of shell commands that contain the shell commands - necessary to strip this target's binary. These should be run as postbuilds - before the actual postbuilds run.""" - self.configname = configname - - result = [] - if self._Test("DEPLOYMENT_POSTPROCESSING", "YES", default="NO") and self._Test( - "STRIP_INSTALLED_PRODUCT", "YES", default="NO" - ): - - default_strip_style = "debugging" - if ( - self.spec["type"] == "loadable_module" or self._IsIosAppExtension() - ) and self._IsBundle(): - default_strip_style = "non-global" - elif self.spec["type"] == "executable": - default_strip_style = "all" - - strip_style = self._Settings().get("STRIP_STYLE", default_strip_style) - strip_flags = {"all": "", "non-global": "-x", "debugging": "-S"}[ - strip_style - ] - - explicit_strip_flags = self._Settings().get("STRIPFLAGS", "") - if explicit_strip_flags: - strip_flags += " " + _NormalizeEnvVarReferences(explicit_strip_flags) - - if not quiet: - result.append("echo STRIP\\(%s\\)" % self.spec["target_name"]) - result.append(f"strip {strip_flags} {output_binary}") - - self.configname = None - return result - - def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet): - """Returns a list of shell commands that contain the shell commands - necessary to massage this target's debug information. These should be run - as postbuilds before the actual postbuilds run.""" - self.configname = configname - - # For static libraries, no dSYMs are created. - result = [] - if ( - self._Test("GCC_GENERATE_DEBUGGING_SYMBOLS", "YES", default="YES") - and self._Test( - "DEBUG_INFORMATION_FORMAT", "dwarf-with-dsym", default="dwarf" - ) - and self.spec["type"] != "static_library" - ): - if not quiet: - result.append("echo DSYMUTIL\\(%s\\)" % self.spec["target_name"]) - result.append("dsymutil {} -o {}".format(output_binary, output + ".dSYM")) - - self.configname = None - return result - - def _GetTargetPostbuilds(self, configname, output, output_binary, quiet=False): - """Returns a list of shell commands that contain the shell commands - to run as postbuilds for this target, before the actual postbuilds.""" - # dSYMs need to build before stripping happens. - return self._GetDebugInfoPostbuilds( - configname, output, output_binary, quiet - ) + self._GetStripPostbuilds(configname, output_binary, quiet) - - def _GetIOSPostbuilds(self, configname, output_binary): - """Return a shell command to codesign the iOS output binary so it can - be deployed to a device. This should be run as the very last step of the - build.""" - if not ( - self.isIOS - and (self.spec["type"] == "executable" or self._IsXCTest()) - or self.IsIosFramework() - ): - return [] - - postbuilds = [] - product_name = self.GetFullProductName() - settings = self.xcode_settings[configname] - - # Xcode expects XCTests to be copied into the TEST_HOST dir. - if self._IsXCTest(): - source = os.path.join("${BUILT_PRODUCTS_DIR}", product_name) - test_host = os.path.dirname(settings.get("TEST_HOST")) - xctest_destination = os.path.join(test_host, "PlugIns", product_name) - postbuilds.extend([f"ditto {source} {xctest_destination}"]) - - key = self._GetIOSCodeSignIdentityKey(settings) - if not key: - return postbuilds - - # Warn for any unimplemented signing xcode keys. - unimpl = ["OTHER_CODE_SIGN_FLAGS"] - unimpl = set(unimpl) & set(self.xcode_settings[configname].keys()) - if unimpl: - print( - "Warning: Some codesign keys not implemented, ignoring: %s" - % ", ".join(sorted(unimpl)) - ) - - if self._IsXCTest(): - # For device xctests, Xcode copies two extra frameworks into $TEST_HOST. - test_host = os.path.dirname(settings.get("TEST_HOST")) - frameworks_dir = os.path.join(test_host, "Frameworks") - platform_root = self._XcodePlatformPath(configname) - frameworks = [ - "Developer/Library/PrivateFrameworks/IDEBundleInjection.framework", - "Developer/Library/Frameworks/XCTest.framework", - ] - for framework in frameworks: - source = os.path.join(platform_root, framework) - destination = os.path.join(frameworks_dir, os.path.basename(framework)) - postbuilds.extend([f"ditto {source} {destination}"]) - - # Then re-sign everything with 'preserve=True' - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - destination, - True, - ) - ] - ) - plugin_dir = os.path.join(test_host, "PlugIns") - targets = [os.path.join(plugin_dir, product_name), test_host] - for target in targets: - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - target, - True, - ) - ] - ) - - postbuilds.extend( - [ - '%s code-sign-bundle "%s" "%s" "%s" "%s" %s' - % ( - os.path.join("${TARGET_BUILD_DIR}", "gyp-mac-tool"), - key, - settings.get("CODE_SIGN_ENTITLEMENTS", ""), - settings.get("PROVISIONING_PROFILE", ""), - os.path.join("${BUILT_PRODUCTS_DIR}", product_name), - False, - ) - ] - ) - return postbuilds - - def _GetIOSCodeSignIdentityKey(self, settings): - identity = settings.get("CODE_SIGN_IDENTITY") - if not identity: - return None - if identity not in XcodeSettings._codesigning_key_cache: - output = subprocess.check_output( - ["security", "find-identity", "-p", "codesigning", "-v"] - ) - for line in output.splitlines(): - if identity in line: - fingerprint = line.split()[1] - cache = XcodeSettings._codesigning_key_cache - assert identity not in cache or fingerprint == cache[identity], ( - "Multiple codesigning fingerprints for identity: %s" % identity - ) - XcodeSettings._codesigning_key_cache[identity] = fingerprint - return XcodeSettings._codesigning_key_cache.get(identity, "") - - def AddImplicitPostbuilds( - self, configname, output, output_binary, postbuilds=[], quiet=False - ): - """Returns a list of shell commands that should run before and after - |postbuilds|.""" - assert output_binary is not None - pre = self._GetTargetPostbuilds(configname, output, output_binary, quiet) - post = self._GetIOSPostbuilds(configname, output_binary) - return pre + postbuilds + post - - def _AdjustLibrary(self, library, config_name=None): - if library.endswith(".framework"): - l_flag = "-framework " + os.path.splitext(os.path.basename(library))[0] - else: - m = self.library_re.match(library) - l_flag = "-l" + m.group(1) if m else library - - sdk_root = self._SdkPath(config_name) - if not sdk_root: - sdk_root = "" - # Xcode 7 started shipping with ".tbd" (text based stubs) files instead of - # ".dylib" without providing a real support for them. What it does, for - # "/usr/lib" libraries, is do "-L/usr/lib -lname" which is dependent on the - # library order and cause collision when building Chrome. - # - # Instead substitute ".tbd" to ".dylib" in the generated project when the - # following conditions are both true: - # - library is referenced in the gyp file as "$(SDKROOT)/**/*.dylib", - # - the ".dylib" file does not exists but a ".tbd" file do. - library = l_flag.replace("$(SDKROOT)", sdk_root) - if l_flag.startswith("$(SDKROOT)"): - basename, ext = os.path.splitext(library) - if ext == ".dylib" and not os.path.exists(library): - tbd_library = basename + ".tbd" - if os.path.exists(tbd_library): - library = tbd_library - return library - - def AdjustLibraries(self, libraries, config_name=None): - """Transforms entries like 'Cocoa.framework' in libraries into entries like - '-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc. - """ - libraries = [self._AdjustLibrary(library, config_name) for library in libraries] - return libraries - - def _BuildMachineOSBuild(self): - return GetStdout(["sw_vers", "-buildVersion"]) - - def _XcodeIOSDeviceFamily(self, configname): - family = self.xcode_settings[configname].get("TARGETED_DEVICE_FAMILY", "1") - return [int(x) for x in family.split(",")] - - def GetExtraPlistItems(self, configname=None): - """Returns a dictionary with extra items to insert into Info.plist.""" - if configname not in XcodeSettings._plist_cache: - cache = {} - cache["BuildMachineOSBuild"] = self._BuildMachineOSBuild() - - xcode_version, xcode_build = XcodeVersion() - cache["DTXcode"] = xcode_version - cache["DTXcodeBuild"] = xcode_build - compiler = self.xcode_settings[configname].get("GCC_VERSION") - if compiler is not None: - cache["DTCompiler"] = compiler - - sdk_root = self._SdkRoot(configname) - if not sdk_root: - sdk_root = self._DefaultSdkRoot() - sdk_version = self._GetSdkVersionInfoItem(sdk_root, "--show-sdk-version") - cache["DTSDKName"] = sdk_root + (sdk_version or "") - if xcode_version >= "0720": - cache["DTSDKBuild"] = self._GetSdkVersionInfoItem( - sdk_root, "--show-sdk-build-version" - ) - elif xcode_version >= "0430": - cache["DTSDKBuild"] = sdk_version - else: - cache["DTSDKBuild"] = cache["BuildMachineOSBuild"] - - if self.isIOS: - cache["MinimumOSVersion"] = self.xcode_settings[configname].get( - "IPHONEOS_DEPLOYMENT_TARGET" - ) - cache["DTPlatformName"] = sdk_root - cache["DTPlatformVersion"] = sdk_version - - if configname.endswith("iphoneos"): - cache["CFBundleSupportedPlatforms"] = ["iPhoneOS"] - cache["DTPlatformBuild"] = cache["DTSDKBuild"] - else: - cache["CFBundleSupportedPlatforms"] = ["iPhoneSimulator"] - # This is weird, but Xcode sets DTPlatformBuild to an empty field - # for simulator builds. - cache["DTPlatformBuild"] = "" - XcodeSettings._plist_cache[configname] = cache - - # Include extra plist items that are per-target, not per global - # XcodeSettings. - items = dict(XcodeSettings._plist_cache[configname]) - if self.isIOS: - items["UIDeviceFamily"] = self._XcodeIOSDeviceFamily(configname) - return items - - def _DefaultSdkRoot(self): - """Returns the default SDKROOT to use. - - Prior to version 5.0.0, if SDKROOT was not explicitly set in the Xcode - project, then the environment variable was empty. Starting with this - version, Xcode uses the name of the newest SDK installed. - """ - xcode_version, _ = XcodeVersion() - if xcode_version < "0500": - return "" - default_sdk_path = self._XcodeSdkPath("") - default_sdk_root = XcodeSettings._sdk_root_cache.get(default_sdk_path) - if default_sdk_root: - return default_sdk_root - try: - all_sdks = GetStdout(["xcodebuild", "-showsdks"]) - except GypError: - # If xcodebuild fails, there will be no valid SDKs - return "" - for line in all_sdks.splitlines(): - items = line.split() - if len(items) >= 3 and items[-2] == "-sdk": - sdk_root = items[-1] - sdk_path = self._XcodeSdkPath(sdk_root) - if sdk_path == default_sdk_path: - return sdk_root - return "" - - -class MacPrefixHeader: - """A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature. - - This feature consists of several pieces: - * If GCC_PREFIX_HEADER is present, all compilations in that project get an - additional |-include path_to_prefix_header| cflag. - * If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is - instead compiled, and all other compilations in the project get an - additional |-include path_to_compiled_header| instead. - + Compiled prefix headers have the extension gch. There is one gch file for - every language used in the project (c, cc, m, mm), since gch files for - different languages aren't compatible. - + gch files themselves are built with the target's normal cflags, but they - obviously don't get the |-include| flag. Instead, they need a -x flag that - describes their language. - + All o files in the target need to depend on the gch file, to make sure - it's built before any o file is built. - - This class helps with some of these tasks, but it needs help from the build - system for writing dependencies to the gch files, for writing build commands - for the gch files, and for figuring out the location of the gch files. - """ - - def __init__( - self, xcode_settings, gyp_path_to_build_path, gyp_path_to_build_output - ): - """If xcode_settings is None, all methods on this class are no-ops. - - Args: - gyp_path_to_build_path: A function that takes a gyp-relative path, - and returns a path relative to the build directory. - gyp_path_to_build_output: A function that takes a gyp-relative path and - a language code ('c', 'cc', 'm', or 'mm'), and that returns a path - to where the output of precompiling that path for that language - should be placed (without the trailing '.gch'). - """ - # This doesn't support per-configuration prefix headers. Good enough - # for now. - self.header = None - self.compile_headers = False - if xcode_settings: - self.header = xcode_settings.GetPerTargetSetting("GCC_PREFIX_HEADER") - self.compile_headers = ( - xcode_settings.GetPerTargetSetting( - "GCC_PRECOMPILE_PREFIX_HEADER", default="NO" - ) - != "NO" - ) - self.compiled_headers = {} - if self.header: - if self.compile_headers: - for lang in ["c", "cc", "m", "mm"]: - self.compiled_headers[lang] = gyp_path_to_build_output( - self.header, lang - ) - self.header = gyp_path_to_build_path(self.header) - - def _CompiledHeader(self, lang, arch): - assert self.compile_headers - h = self.compiled_headers[lang] - if arch: - h += "." + arch - return h - - def GetInclude(self, lang, arch=None): - """Gets the cflags to include the prefix header for language |lang|.""" - if self.compile_headers and lang in self.compiled_headers: - return "-include %s" % self._CompiledHeader(lang, arch) - elif self.header: - return "-include %s" % self.header - else: - return "" - - def _Gch(self, lang, arch): - """Returns the actual file name of the prefix header for language |lang|.""" - assert self.compile_headers - return self._CompiledHeader(lang, arch) + ".gch" - - def GetObjDependencies(self, sources, objs, arch=None): - """Given a list of source files and the corresponding object files, returns - a list of (source, object, gch) tuples, where |gch| is the build-directory - relative path to the gch file each object file depends on. |compilable[i]| - has to be the source file belonging to |objs[i]|.""" - if not self.header or not self.compile_headers: - return [] - - result = [] - for source, obj in zip(sources, objs): - ext = os.path.splitext(source)[1] - lang = { - ".c": "c", - ".cpp": "cc", - ".cc": "cc", - ".cxx": "cc", - ".m": "m", - ".mm": "mm", - }.get(ext, None) - if lang: - result.append((source, obj, self._Gch(lang, arch))) - return result - - def GetPchBuildCommands(self, arch=None): - """Returns [(path_to_gch, language_flag, language, header)]. - |path_to_gch| and |header| are relative to the build directory. - """ - if not self.header or not self.compile_headers: - return [] - return [ - (self._Gch("c", arch), "-x c-header", "c", self.header), - (self._Gch("cc", arch), "-x c++-header", "cc", self.header), - (self._Gch("m", arch), "-x objective-c-header", "m", self.header), - (self._Gch("mm", arch), "-x objective-c++-header", "mm", self.header), - ] - - -def XcodeVersion(): - """Returns a tuple of version and build version of installed Xcode.""" - # `xcodebuild -version` output looks like - # Xcode 4.6.3 - # Build version 4H1503 - # or like - # Xcode 3.2.6 - # Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 - # BuildVersion: 10M2518 - # Convert that to ('0463', '4H1503') or ('0326', '10M2518'). - global XCODE_VERSION_CACHE - if XCODE_VERSION_CACHE: - return XCODE_VERSION_CACHE - version = "" - build = "" - try: - version_list = GetStdoutQuiet(["xcodebuild", "-version"]).splitlines() - # In some circumstances xcodebuild exits 0 but doesn't return - # the right results; for example, a user on 10.7 or 10.8 with - # a bogus path set via xcode-select - # In that case this may be a CLT-only install so fall back to - # checking that version. - if len(version_list) < 2: - raise GypError("xcodebuild returned unexpected results") - version = version_list[0].split()[-1] # Last word on first line - build = version_list[-1].split()[-1] # Last word on last line - except GypError: # Xcode not installed so look for XCode Command Line Tools - version = CLTVersion() # macOS Catalina returns 11.0.0.0.1.1567737322 - if not version: - raise GypError("No Xcode or CLT version detected!") - # Be careful to convert "4.2.3" to "0423" and "11.0.0" to "1100": - version = version.split(".")[:3] # Just major, minor, micro - version[0] = version[0].zfill(2) # Add a leading zero if major is one digit - version = ("".join(version) + "00")[:4] # Limit to exactly four characters - XCODE_VERSION_CACHE = (version, build) - return XCODE_VERSION_CACHE - - -# This function ported from the logic in Homebrew's CLT version check -def CLTVersion(): - """Returns the version of command-line tools from pkgutil.""" - # pkgutil output looks like - # package-id: com.apple.pkg.CLTools_Executables - # version: 5.0.1.0.1.1382131676 - # volume: / - # location: / - # install-time: 1382544035 - # groups: com.apple.FindSystemFiles.pkg-group - # com.apple.DevToolsBoth.pkg-group - # com.apple.DevToolsNonRelocatableShared.pkg-group - STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo" - FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" - MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables" - - regex = re.compile("version: (?P.+)") - for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]: - try: - output = GetStdout(["/usr/sbin/pkgutil", "--pkg-info", key]) - return re.search(regex, output).groupdict()["version"] - except GypError: - continue - - regex = re.compile(r"Command Line Tools for Xcode\s+(?P\S+)") - try: - output = GetStdout(["/usr/sbin/softwareupdate", "--history"]) - return re.search(regex, output).groupdict()["version"] - except GypError: - return None - - -def GetStdoutQuiet(cmdlist): - """Returns the content of standard output returned by invoking |cmdlist|. - Ignores the stderr. - Raises |GypError| if the command return with a non-zero return code.""" - job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out = job.communicate()[0].decode("utf-8") - if job.returncode != 0: - raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) - return out.rstrip("\n") - - -def GetStdout(cmdlist): - """Returns the content of standard output returned by invoking |cmdlist|. - Raises |GypError| if the command return with a non-zero return code.""" - job = subprocess.Popen(cmdlist, stdout=subprocess.PIPE) - out = job.communicate()[0].decode("utf-8") - if job.returncode != 0: - sys.stderr.write(out + "\n") - raise GypError("Error %d running %s" % (job.returncode, cmdlist[0])) - return out.rstrip("\n") - - -def MergeGlobalXcodeSettingsToSpec(global_dict, spec): - """Merges the global xcode_settings dictionary into each configuration of the - target represented by spec. For keys that are both in the global and the local - xcode_settings dict, the local key gets precedence. - """ - # The xcode generator special-cases global xcode_settings and does something - # that amounts to merging in the global xcode_settings into each local - # xcode_settings dict. - global_xcode_settings = global_dict.get("xcode_settings", {}) - for config in spec["configurations"].values(): - if "xcode_settings" in config: - new_settings = global_xcode_settings.copy() - new_settings.update(config["xcode_settings"]) - config["xcode_settings"] = new_settings - - -def IsMacBundle(flavor, spec): - """Returns if |spec| should be treated as a bundle. - - Bundles are directories with a certain subdirectory structure, instead of - just a single file. Bundle rules do not produce a binary but also package - resources into that directory.""" - is_mac_bundle = ( - int(spec.get("mac_xctest_bundle", 0)) != 0 - or int(spec.get("mac_xcuitest_bundle", 0)) != 0 - or (int(spec.get("mac_bundle", 0)) != 0 and flavor == "mac") - ) - - if is_mac_bundle: - assert spec["type"] != "none", ( - 'mac_bundle targets cannot have type none (target "%s")' - % spec["target_name"] - ) - return is_mac_bundle - - -def GetMacBundleResources(product_dir, xcode_settings, resources): - """Yields (output, resource) pairs for every resource in |resources|. - Only call this for mac bundle targets. - - Args: - product_dir: Path to the directory containing the output bundle, - relative to the build directory. - xcode_settings: The XcodeSettings of the current target. - resources: A list of bundle resources, relative to the build directory. - """ - dest = os.path.join(product_dir, xcode_settings.GetBundleResourceFolder()) - for res in resources: - output = dest - - # The make generator doesn't support it, so forbid it everywhere - # to keep the generators more interchangeable. - assert " " not in res, "Spaces in resource filenames not supported (%s)" % res - - # Split into (path,file). - res_parts = os.path.split(res) - - # Now split the path into (prefix,maybe.lproj). - lproj_parts = os.path.split(res_parts[0]) - # If the resource lives in a .lproj bundle, add that to the destination. - if lproj_parts[1].endswith(".lproj"): - output = os.path.join(output, lproj_parts[1]) - - output = os.path.join(output, res_parts[1]) - # Compiled XIB files are referred to by .nib. - if output.endswith(".xib"): - output = os.path.splitext(output)[0] + ".nib" - # Compiled storyboard files are referred to by .storyboardc. - if output.endswith(".storyboard"): - output = os.path.splitext(output)[0] + ".storyboardc" - - yield output, res - - -def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): - """Returns (info_plist, dest_plist, defines, extra_env), where: - * |info_plist| is the source plist path, relative to the - build directory, - * |dest_plist| is the destination plist path, relative to the - build directory, - * |defines| is a list of preprocessor defines (empty if the plist - shouldn't be preprocessed, - * |extra_env| is a dict of env variables that should be exported when - invoking |mac_tool copy-info-plist|. - - Only call this for mac bundle targets. - - Args: - product_dir: Path to the directory containing the output bundle, - relative to the build directory. - xcode_settings: The XcodeSettings of the current target. - gyp_to_build_path: A function that converts paths relative to the - current gyp file to paths relative to the build directory. - """ - info_plist = xcode_settings.GetPerTargetSetting("INFOPLIST_FILE") - if not info_plist: - return None, None, [], {} - - # The make generator doesn't support it, so forbid it everywhere - # to keep the generators more interchangeable. - assert " " not in info_plist, ( - "Spaces in Info.plist filenames not supported (%s)" % info_plist - ) - - info_plist = gyp_path_to_build_path(info_plist) - - # If explicitly set to preprocess the plist, invoke the C preprocessor and - # specify any defines as -D flags. - if ( - xcode_settings.GetPerTargetSetting("INFOPLIST_PREPROCESS", default="NO") - == "YES" - ): - # Create an intermediate file based on the path. - defines = shlex.split( - xcode_settings.GetPerTargetSetting( - "INFOPLIST_PREPROCESSOR_DEFINITIONS", default="" - ) - ) - else: - defines = [] - - dest_plist = os.path.join(product_dir, xcode_settings.GetBundlePlistPath()) - extra_env = xcode_settings.GetPerTargetSettings() - - return info_plist, dest_plist, defines, extra_env - - -def _GetXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings=None -): - """Return the environment variables that Xcode would set. See - http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153 - for a full list. - - Args: - xcode_settings: An XcodeSettings object. If this is None, this function - returns an empty dict. - built_products_dir: Absolute path to the built products dir. - srcroot: Absolute path to the source root. - configuration: The build configuration name. - additional_settings: An optional dict with more values to add to the - result. - """ - - if not xcode_settings: - return {} - - # This function is considered a friend of XcodeSettings, so let it reach into - # its implementation details. - spec = xcode_settings.spec - - # These are filled in on an as-needed basis. - env = { - "BUILT_FRAMEWORKS_DIR": built_products_dir, - "BUILT_PRODUCTS_DIR": built_products_dir, - "CONFIGURATION": configuration, - "PRODUCT_NAME": xcode_settings.GetProductName(), - # For FULL_PRODUCT_NAME see: - # /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX\ Product\ Types.xcspec # noqa: E501 - "SRCROOT": srcroot, - "SOURCE_ROOT": "${SRCROOT}", - # This is not true for static libraries, but currently the env is only - # written for bundles: - "TARGET_BUILD_DIR": built_products_dir, - "TEMP_DIR": "${TMPDIR}", - "XCODE_VERSION_ACTUAL": XcodeVersion()[0], - } - if xcode_settings.GetPerConfigSetting("SDKROOT", configuration): - env["SDKROOT"] = xcode_settings._SdkPath(configuration) - else: - env["SDKROOT"] = "" - - if xcode_settings.mac_toolchain_dir: - env["DEVELOPER_DIR"] = xcode_settings.mac_toolchain_dir - - if spec["type"] in ( - "executable", - "static_library", - "shared_library", - "loadable_module", - ): - env["EXECUTABLE_NAME"] = xcode_settings.GetExecutableName() - env["EXECUTABLE_PATH"] = xcode_settings.GetExecutablePath() - env["FULL_PRODUCT_NAME"] = xcode_settings.GetFullProductName() - mach_o_type = xcode_settings.GetMachOType() - if mach_o_type: - env["MACH_O_TYPE"] = mach_o_type - env["PRODUCT_TYPE"] = xcode_settings.GetProductType() - if xcode_settings._IsBundle(): - # xcodeproj_file.py sets the same Xcode subfolder value for this as for - # FRAMEWORKS_FOLDER_PATH so Xcode builds will actually use FFP's value. - env["BUILT_FRAMEWORKS_DIR"] = os.path.join( - built_products_dir + os.sep + xcode_settings.GetBundleFrameworksFolderPath() - ) - env["CONTENTS_FOLDER_PATH"] = xcode_settings.GetBundleContentsFolderPath() - env["EXECUTABLE_FOLDER_PATH"] = xcode_settings.GetBundleExecutableFolderPath() - env[ - "UNLOCALIZED_RESOURCES_FOLDER_PATH" - ] = xcode_settings.GetBundleResourceFolder() - env["JAVA_FOLDER_PATH"] = xcode_settings.GetBundleJavaFolderPath() - env["FRAMEWORKS_FOLDER_PATH"] = xcode_settings.GetBundleFrameworksFolderPath() - env[ - "SHARED_FRAMEWORKS_FOLDER_PATH" - ] = xcode_settings.GetBundleSharedFrameworksFolderPath() - env[ - "SHARED_SUPPORT_FOLDER_PATH" - ] = xcode_settings.GetBundleSharedSupportFolderPath() - env["PLUGINS_FOLDER_PATH"] = xcode_settings.GetBundlePlugInsFolderPath() - env["XPCSERVICES_FOLDER_PATH"] = xcode_settings.GetBundleXPCServicesFolderPath() - env["INFOPLIST_PATH"] = xcode_settings.GetBundlePlistPath() - env["WRAPPER_NAME"] = xcode_settings.GetWrapperName() - - install_name = xcode_settings.GetInstallName() - if install_name: - env["LD_DYLIB_INSTALL_NAME"] = install_name - install_name_base = xcode_settings.GetInstallNameBase() - if install_name_base: - env["DYLIB_INSTALL_NAME_BASE"] = install_name_base - xcode_version, _ = XcodeVersion() - if xcode_version >= "0500" and not env.get("SDKROOT"): - sdk_root = xcode_settings._SdkRoot(configuration) - if not sdk_root: - sdk_root = xcode_settings._XcodeSdkPath("") - if sdk_root is None: - sdk_root = "" - env["SDKROOT"] = sdk_root - - if not additional_settings: - additional_settings = {} - else: - # Flatten lists to strings. - for k in additional_settings: - if not isinstance(additional_settings[k], str): - additional_settings[k] = " ".join(additional_settings[k]) - additional_settings.update(env) - - for k in additional_settings: - additional_settings[k] = _NormalizeEnvVarReferences(additional_settings[k]) - - return additional_settings - - -def _NormalizeEnvVarReferences(str): - """Takes a string containing variable references in the form ${FOO}, $(FOO), - or $FOO, and returns a string with all variable references in the form ${FOO}. - """ - # $FOO -> ${FOO} - str = re.sub(r"\$([a-zA-Z_][a-zA-Z0-9_]*)", r"${\1}", str) - - # $(FOO) -> ${FOO} - matches = re.findall(r"(\$\(([a-zA-Z0-9\-_]+)\))", str) - for match in matches: - to_replace, variable = match - assert "$(" not in match, "$($(FOO)) variables not supported: " + match - str = str.replace(to_replace, "${" + variable + "}") - - return str - - -def ExpandEnvVars(string, expansions): - """Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the - expansions list. If the variable expands to something that references - another variable, this variable is expanded as well if it's in env -- - until no variables present in env are left.""" - for k, v in reversed(expansions): - string = string.replace("${" + k + "}", v) - string = string.replace("$(" + k + ")", v) - string = string.replace("$" + k, v) - return string - - -def _TopologicallySortedEnvVarKeys(env): - """Takes a dict |env| whose values are strings that can refer to other keys, - for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of - env such that key2 is after key1 in L if env[key2] refers to env[key1]. - - Throws an Exception in case of dependency cycles. - """ - # Since environment variables can refer to other variables, the evaluation - # order is important. Below is the logic to compute the dependency graph - # and sort it. - regex = re.compile(r"\$\{([a-zA-Z0-9\-_]+)\}") - - def GetEdges(node): - # Use a definition of edges such that user_of_variable -> used_varible. - # This happens to be easier in this case, since a variable's - # definition contains all variables it references in a single string. - # We can then reverse the result of the topological sort at the end. - # Since: reverse(topsort(DAG)) = topsort(reverse_edges(DAG)) - matches = {v for v in regex.findall(env[node]) if v in env} - for dependee in matches: - assert "${" not in dependee, "Nested variables not supported: " + dependee - return matches - - try: - # Topologically sort, and then reverse, because we used an edge definition - # that's inverted from the expected result of this function (see comment - # above). - order = gyp.common.TopologicallySorted(env.keys(), GetEdges) - order.reverse() - return order - except gyp.common.CycleError as e: - raise GypError( - "Xcode environment variables are cyclically dependent: " + str(e.nodes) - ) - - -def GetSortedXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings=None -): - env = _GetXcodeEnv( - xcode_settings, built_products_dir, srcroot, configuration, additional_settings - ) - return [(key, env[key]) for key in _TopologicallySortedEnvVarKeys(env)] - - -def GetSpecPostbuildCommands(spec, quiet=False): - """Returns the list of postbuilds explicitly defined on |spec|, in a form - executable by a shell.""" - postbuilds = [] - for postbuild in spec.get("postbuilds", []): - if not quiet: - postbuilds.append( - "echo POSTBUILD\\(%s\\) %s" - % (spec["target_name"], postbuild["postbuild_name"]) - ) - postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild["action"])) - return postbuilds - - -def _HasIOSTarget(targets): - """Returns true if any target contains the iOS specific key - IPHONEOS_DEPLOYMENT_TARGET.""" - for target_dict in targets.values(): - for config in target_dict["configurations"].values(): - if config.get("xcode_settings", {}).get("IPHONEOS_DEPLOYMENT_TARGET"): - return True - return False - - -def _AddIOSDeviceConfigurations(targets): - """Clone all targets and append -iphoneos to the name. Configure these targets - to build for iOS devices and use correct architectures for those builds.""" - for target_dict in targets.values(): - toolset = target_dict["toolset"] - configs = target_dict["configurations"] - for config_name, simulator_config_dict in dict(configs).items(): - iphoneos_config_dict = copy.deepcopy(simulator_config_dict) - configs[config_name + "-iphoneos"] = iphoneos_config_dict - configs[config_name + "-iphonesimulator"] = simulator_config_dict - if toolset == "target": - simulator_config_dict["xcode_settings"]["SDKROOT"] = "iphonesimulator" - iphoneos_config_dict["xcode_settings"]["SDKROOT"] = "iphoneos" - return targets - - -def CloneConfigurationForDeviceAndEmulator(target_dicts): - """If |target_dicts| contains any iOS targets, automatically create -iphoneos - targets for iOS device builds.""" - if _HasIOSTarget(target_dicts): - return _AddIOSDeviceConfigurations(target_dicts) - return target_dicts diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py deleted file mode 100644 index bb74eac..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +++ /dev/null @@ -1,302 +0,0 @@ -# Copyright (c) 2014 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Xcode-ninja wrapper project file generator. - -This updates the data structures passed to the Xcode gyp generator to build -with ninja instead. The Xcode project itself is transformed into a list of -executable targets, each with a build step to build with ninja, and a target -with every source and resource file. This appears to sidestep some of the -major performance headaches experienced using complex projects and large number -of targets within Xcode. -""" - -import errno -import gyp.generator.ninja -import os -import re -import xml.sax.saxutils - - -def _WriteWorkspace(main_gyp, sources_gyp, params): - """ Create a workspace to wrap main and sources gyp paths. """ - (build_file_root, build_file_ext) = os.path.splitext(main_gyp) - workspace_path = build_file_root + ".xcworkspace" - options = params["options"] - if options.generator_output: - workspace_path = os.path.join(options.generator_output, workspace_path) - try: - os.makedirs(workspace_path) - except OSError as e: - if e.errno != errno.EEXIST: - raise - output_string = ( - '\n' + '\n' - ) - for gyp_name in [main_gyp, sources_gyp]: - name = os.path.splitext(os.path.basename(gyp_name))[0] + ".xcodeproj" - name = xml.sax.saxutils.quoteattr("group:" + name) - output_string += " \n" % name - output_string += "\n" - - workspace_file = os.path.join(workspace_path, "contents.xcworkspacedata") - - try: - with open(workspace_file) as input_file: - input_string = input_file.read() - if input_string == output_string: - return - except OSError: - # Ignore errors if the file doesn't exist. - pass - - with open(workspace_file, "w") as output_file: - output_file.write(output_string) - - -def _TargetFromSpec(old_spec, params): - """ Create fake target for xcode-ninja wrapper. """ - # Determine ninja top level build dir (e.g. /path/to/out). - ninja_toplevel = None - jobs = 0 - if params: - options = params["options"] - ninja_toplevel = os.path.join( - options.toplevel_dir, gyp.generator.ninja.ComputeOutputDir(params) - ) - jobs = params.get("generator_flags", {}).get("xcode_ninja_jobs", 0) - - target_name = old_spec.get("target_name") - product_name = old_spec.get("product_name", target_name) - product_extension = old_spec.get("product_extension") - - ninja_target = {} - ninja_target["target_name"] = target_name - ninja_target["product_name"] = product_name - if product_extension: - ninja_target["product_extension"] = product_extension - ninja_target["toolset"] = old_spec.get("toolset") - ninja_target["default_configuration"] = old_spec.get("default_configuration") - ninja_target["configurations"] = {} - - # Tell Xcode to look in |ninja_toplevel| for build products. - new_xcode_settings = {} - if ninja_toplevel: - new_xcode_settings["CONFIGURATION_BUILD_DIR"] = ( - "%s/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" % ninja_toplevel - ) - - if "configurations" in old_spec: - for config in old_spec["configurations"]: - old_xcode_settings = old_spec["configurations"][config].get( - "xcode_settings", {} - ) - if "IPHONEOS_DEPLOYMENT_TARGET" in old_xcode_settings: - new_xcode_settings["CODE_SIGNING_REQUIRED"] = "NO" - new_xcode_settings["IPHONEOS_DEPLOYMENT_TARGET"] = old_xcode_settings[ - "IPHONEOS_DEPLOYMENT_TARGET" - ] - for key in ["BUNDLE_LOADER", "TEST_HOST"]: - if key in old_xcode_settings: - new_xcode_settings[key] = old_xcode_settings[key] - - ninja_target["configurations"][config] = {} - ninja_target["configurations"][config][ - "xcode_settings" - ] = new_xcode_settings - - ninja_target["mac_bundle"] = old_spec.get("mac_bundle", 0) - ninja_target["mac_xctest_bundle"] = old_spec.get("mac_xctest_bundle", 0) - ninja_target["ios_app_extension"] = old_spec.get("ios_app_extension", 0) - ninja_target["ios_watchkit_extension"] = old_spec.get("ios_watchkit_extension", 0) - ninja_target["ios_watchkit_app"] = old_spec.get("ios_watchkit_app", 0) - ninja_target["type"] = old_spec["type"] - if ninja_toplevel: - ninja_target["actions"] = [ - { - "action_name": "Compile and copy %s via ninja" % target_name, - "inputs": [], - "outputs": [], - "action": [ - "env", - "PATH=%s" % os.environ["PATH"], - "ninja", - "-C", - new_xcode_settings["CONFIGURATION_BUILD_DIR"], - target_name, - ], - "message": "Compile and copy %s via ninja" % target_name, - }, - ] - if jobs > 0: - ninja_target["actions"][0]["action"].extend(("-j", jobs)) - return ninja_target - - -def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): - """Limit targets for Xcode wrapper. - - Xcode sometimes performs poorly with too many targets, so only include - proper executable targets, with filters to customize. - Arguments: - target_extras: Regular expression to always add, matching any target. - executable_target_pattern: Regular expression limiting executable targets. - spec: Specifications for target. - """ - target_name = spec.get("target_name") - # Always include targets matching target_extras. - if target_extras is not None and re.search(target_extras, target_name): - return True - - # Otherwise just show executable targets and xc_tests. - if int(spec.get("mac_xctest_bundle", 0)) != 0 or ( - spec.get("type", "") == "executable" - and spec.get("product_extension", "") != "bundle" - ): - - # If there is a filter and the target does not match, exclude the target. - if executable_target_pattern is not None: - if not re.search(executable_target_pattern, target_name): - return False - return True - return False - - -def CreateWrapper(target_list, target_dicts, data, params): - """Initialize targets for the ninja wrapper. - - This sets up the necessary variables in the targets to generate Xcode projects - that use ninja as an external builder. - Arguments: - target_list: List of target pairs: 'base/base.gyp:base'. - target_dicts: Dict of target properties keyed on target pair. - data: Dict of flattened build files keyed on gyp path. - params: Dict of global options for gyp. - """ - orig_gyp = params["build_files"][0] - for gyp_name, gyp_dict in data.items(): - if gyp_name == orig_gyp: - depth = gyp_dict["_DEPTH"] - - # Check for custom main gyp name, otherwise use the default CHROMIUM_GYP_FILE - # and prepend .ninja before the .gyp extension. - generator_flags = params.get("generator_flags", {}) - main_gyp = generator_flags.get("xcode_ninja_main_gyp", None) - if main_gyp is None: - (build_file_root, build_file_ext) = os.path.splitext(orig_gyp) - main_gyp = build_file_root + ".ninja" + build_file_ext - - # Create new |target_list|, |target_dicts| and |data| data structures. - new_target_list = [] - new_target_dicts = {} - new_data = {} - - # Set base keys needed for |data|. - new_data[main_gyp] = {} - new_data[main_gyp]["included_files"] = [] - new_data[main_gyp]["targets"] = [] - new_data[main_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {}) - - # Normally the xcode-ninja generator includes only valid executable targets. - # If |xcode_ninja_executable_target_pattern| is set, that list is reduced to - # executable targets that match the pattern. (Default all) - executable_target_pattern = generator_flags.get( - "xcode_ninja_executable_target_pattern", None - ) - - # For including other non-executable targets, add the matching target name - # to the |xcode_ninja_target_pattern| regular expression. (Default none) - target_extras = generator_flags.get("xcode_ninja_target_pattern", None) - - for old_qualified_target in target_list: - spec = target_dicts[old_qualified_target] - if IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): - # Add to new_target_list. - target_name = spec.get("target_name") - new_target_name = f"{main_gyp}:{target_name}#target" - new_target_list.append(new_target_name) - - # Add to new_target_dicts. - new_target_dicts[new_target_name] = _TargetFromSpec(spec, params) - - # Add to new_data. - for old_target in data[old_qualified_target.split(":")[0]]["targets"]: - if old_target["target_name"] == target_name: - new_data_target = {} - new_data_target["target_name"] = old_target["target_name"] - new_data_target["toolset"] = old_target["toolset"] - new_data[main_gyp]["targets"].append(new_data_target) - - # Create sources target. - sources_target_name = "sources_for_indexing" - sources_target = _TargetFromSpec( - { - "target_name": sources_target_name, - "toolset": "target", - "default_configuration": "Default", - "mac_bundle": "0", - "type": "executable", - }, - None, - ) - - # Tell Xcode to look everywhere for headers. - sources_target["configurations"] = {"Default": {"include_dirs": [depth]}} - - # Put excluded files into the sources target so they can be opened in Xcode. - skip_excluded_files = not generator_flags.get( - "xcode_ninja_list_excluded_files", True - ) - - sources = [] - for target, target_dict in target_dicts.items(): - base = os.path.dirname(target) - files = target_dict.get("sources", []) + target_dict.get( - "mac_bundle_resources", [] - ) - - if not skip_excluded_files: - files.extend( - target_dict.get("sources_excluded", []) - + target_dict.get("mac_bundle_resources_excluded", []) - ) - - for action in target_dict.get("actions", []): - files.extend(action.get("inputs", [])) - - if not skip_excluded_files: - files.extend(action.get("inputs_excluded", [])) - - # Remove files starting with $. These are mostly intermediate files for the - # build system. - files = [file for file in files if not file.startswith("$")] - - # Make sources relative to root build file. - relative_path = os.path.dirname(main_gyp) - sources += [ - os.path.relpath(os.path.join(base, file), relative_path) for file in files - ] - - sources_target["sources"] = sorted(set(sources)) - - # Put sources_to_index in it's own gyp. - sources_gyp = os.path.join(os.path.dirname(main_gyp), sources_target_name + ".gyp") - fully_qualified_target_name = f"{sources_gyp}:{sources_target_name}#target" - - # Add to new_target_list, new_target_dicts and new_data. - new_target_list.append(fully_qualified_target_name) - new_target_dicts[fully_qualified_target_name] = sources_target - new_data_target = {} - new_data_target["target_name"] = sources_target["target_name"] - new_data_target["_DEPTH"] = depth - new_data_target["toolset"] = "target" - new_data[sources_gyp] = {} - new_data[sources_gyp]["targets"] = [] - new_data[sources_gyp]["included_files"] = [] - new_data[sources_gyp]["xcode_settings"] = data[orig_gyp].get("xcode_settings", {}) - new_data[sources_gyp]["targets"].append(new_data_target) - - # Write workspace to file. - _WriteWorkspace(main_gyp, sources_gyp, params) - return (new_target_list, new_target_dicts, new_data) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py deleted file mode 100644 index 33c667c..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +++ /dev/null @@ -1,3198 +0,0 @@ -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Xcode project file generator. - -This module is both an Xcode project file generator and a documentation of the -Xcode project file format. Knowledge of the project file format was gained -based on extensive experience with Xcode, and by making changes to projects in -Xcode.app and observing the resultant changes in the associated project files. - -XCODE PROJECT FILES - -The generator targets the file format as written by Xcode 3.2 (specifically, -3.2.6), but past experience has taught that the format has not changed -significantly in the past several years, and future versions of Xcode are able -to read older project files. - -Xcode project files are "bundled": the project "file" from an end-user's -perspective is actually a directory with an ".xcodeproj" extension. The -project file from this module's perspective is actually a file inside this -directory, always named "project.pbxproj". This file contains a complete -description of the project and is all that is needed to use the xcodeproj. -Other files contained in the xcodeproj directory are simply used to store -per-user settings, such as the state of various UI elements in the Xcode -application. - -The project.pbxproj file is a property list, stored in a format almost -identical to the NeXTstep property list format. The file is able to carry -Unicode data, and is encoded in UTF-8. The root element in the property list -is a dictionary that contains several properties of minimal interest, and two -properties of immense interest. The most important property is a dictionary -named "objects". The entire structure of the project is represented by the -children of this property. The objects dictionary is keyed by unique 96-bit -values represented by 24 uppercase hexadecimal characters. Each value in the -objects dictionary is itself a dictionary, describing an individual object. - -Each object in the dictionary is a member of a class, which is identified by -the "isa" property of each object. A variety of classes are represented in a -project file. Objects can refer to other objects by ID, using the 24-character -hexadecimal object key. A project's objects form a tree, with a root object -of class PBXProject at the root. As an example, the PBXProject object serves -as parent to an XCConfigurationList object defining the build configurations -used in the project, a PBXGroup object serving as a container for all files -referenced in the project, and a list of target objects, each of which defines -a target in the project. There are several different types of target object, -such as PBXNativeTarget and PBXAggregateTarget. In this module, this -relationship is expressed by having each target type derive from an abstract -base named XCTarget. - -The project.pbxproj file's root dictionary also contains a property, sibling to -the "objects" dictionary, named "rootObject". The value of rootObject is a -24-character object key referring to the root PBXProject object in the -objects dictionary. - -In Xcode, every file used as input to a target or produced as a final product -of a target must appear somewhere in the hierarchy rooted at the PBXGroup -object referenced by the PBXProject's mainGroup property. A PBXGroup is -generally represented as a folder in the Xcode application. PBXGroups can -contain other PBXGroups as well as PBXFileReferences, which are pointers to -actual files. - -Each XCTarget contains a list of build phases, represented in this module by -the abstract base XCBuildPhase. Examples of concrete XCBuildPhase derivations -are PBXSourcesBuildPhase and PBXFrameworksBuildPhase, which correspond to the -"Compile Sources" and "Link Binary With Libraries" phases displayed in the -Xcode application. Files used as input to these phases (for example, source -files in the former case and libraries and frameworks in the latter) are -represented by PBXBuildFile objects, referenced by elements of "files" lists -in XCTarget objects. Each PBXBuildFile object refers to a PBXBuildFile -object as a "weak" reference: it does not "own" the PBXBuildFile, which is -owned by the root object's mainGroup or a descendant group. In most cases, the -layer of indirection between an XCBuildPhase and a PBXFileReference via a -PBXBuildFile appears extraneous, but there's actually one reason for this: -file-specific compiler flags are added to the PBXBuildFile object so as to -allow a single file to be a member of multiple targets while having distinct -compiler flags for each. These flags can be modified in the Xcode applciation -in the "Build" tab of a File Info window. - -When a project is open in the Xcode application, Xcode will rewrite it. As -such, this module is careful to adhere to the formatting used by Xcode, to -avoid insignificant changes appearing in the file when it is used in the -Xcode application. This will keep version control repositories happy, and -makes it possible to compare a project file used in Xcode to one generated by -this module to determine if any significant changes were made in the -application. - -Xcode has its own way of assigning 24-character identifiers to each object, -which is not duplicated here. Because the identifier only is only generated -once, when an object is created, and is then left unchanged, there is no need -to attempt to duplicate Xcode's behavior in this area. The generator is free -to select any identifier, even at random, to refer to the objects it creates, -and Xcode will retain those identifiers and use them when subsequently -rewriting the project file. However, the generator would choose new random -identifiers each time the project files are generated, leading to difficulties -comparing "used" project files to "pristine" ones produced by this module, -and causing the appearance of changes as every object identifier is changed -when updated projects are checked in to a version control repository. To -mitigate this problem, this module chooses identifiers in a more deterministic -way, by hashing a description of each object as well as its parent and ancestor -objects. This strategy should result in minimal "shift" in IDs as successive -generations of project files are produced. - -THIS MODULE - -This module introduces several classes, all derived from the XCObject class. -Nearly all of the "brains" are built into the XCObject class, which understands -how to create and modify objects, maintain the proper tree structure, compute -identifiers, and print objects. For the most part, classes derived from -XCObject need only provide a _schema class object, a dictionary that -expresses what properties objects of the class may contain. - -Given this structure, it's possible to build a minimal project file by creating -objects of the appropriate types and making the proper connections: - - config_list = XCConfigurationList() - group = PBXGroup() - project = PBXProject({'buildConfigurationList': config_list, - 'mainGroup': group}) - -With the project object set up, it can be added to an XCProjectFile object. -XCProjectFile is a pseudo-class in the sense that it is a concrete XCObject -subclass that does not actually correspond to a class type found in a project -file. Rather, it is used to represent the project file's root dictionary. -Printing an XCProjectFile will print the entire project file, including the -full "objects" dictionary. - - project_file = XCProjectFile({'rootObject': project}) - project_file.ComputeIDs() - project_file.Print() - -Xcode project files are always encoded in UTF-8. This module will accept -strings of either the str class or the unicode class. Strings of class str -are assumed to already be encoded in UTF-8. Obviously, if you're just using -ASCII, you won't encounter difficulties because ASCII is a UTF-8 subset. -Strings of class unicode are handled properly and encoded in UTF-8 when -a project file is output. -""" - -import gyp.common -from functools import cmp_to_key -import hashlib -from operator import attrgetter -import posixpath -import re -import struct -import sys - - -def cmp(x, y): - return (x > y) - (x < y) - - -# See XCObject._EncodeString. This pattern is used to determine when a string -# can be printed unquoted. Strings that match this pattern may be printed -# unquoted. Strings that do not match must be quoted and may be further -# transformed to be properly encoded. Note that this expression matches the -# characters listed with "+", for 1 or more occurrences: if a string is empty, -# it must not match this pattern, because it needs to be encoded as "". -_unquoted = re.compile("^[A-Za-z0-9$./_]+$") - -# Strings that match this pattern are quoted regardless of what _unquoted says. -# Oddly, Xcode will quote any string with a run of three or more underscores. -_quoted = re.compile("___") - -# This pattern should match any character that needs to be escaped by -# XCObject._EncodeString. See that function. -_escaped = re.compile('[\\\\"]|[\x00-\x1f]') - - -# Used by SourceTreeAndPathFromPath -_path_leading_variable = re.compile(r"^\$\((.*?)\)(/(.*))?$") - - -def SourceTreeAndPathFromPath(input_path): - """Given input_path, returns a tuple with sourceTree and path values. - - Examples: - input_path (source_tree, output_path) - '$(VAR)/path' ('VAR', 'path') - '$(VAR)' ('VAR', None) - 'path' (None, 'path') - """ - - source_group_match = _path_leading_variable.match(input_path) - if source_group_match: - source_tree = source_group_match.group(1) - output_path = source_group_match.group(3) # This may be None. - else: - source_tree = None - output_path = input_path - - return (source_tree, output_path) - - -def ConvertVariablesToShellSyntax(input_string): - return re.sub(r"\$\((.*?)\)", "${\\1}", input_string) - - -class XCObject: - """The abstract base of all class types used in Xcode project files. - - Class variables: - _schema: A dictionary defining the properties of this class. The keys to - _schema are string property keys as used in project files. Values - are a list of four or five elements: - [ is_list, property_type, is_strong, is_required, default ] - is_list: True if the property described is a list, as opposed - to a single element. - property_type: The type to use as the value of the property, - or if is_list is True, the type to use for each - element of the value's list. property_type must - be an XCObject subclass, or one of the built-in - types str, int, or dict. - is_strong: If property_type is an XCObject subclass, is_strong - is True to assert that this class "owns," or serves - as parent, to the property value (or, if is_list is - True, values). is_strong must be False if - property_type is not an XCObject subclass. - is_required: True if the property is required for the class. - Note that is_required being True does not preclude - an empty string ("", in the case of property_type - str) or list ([], in the case of is_list True) from - being set for the property. - default: Optional. If is_required is True, default may be set - to provide a default value for objects that do not supply - their own value. If is_required is True and default - is not provided, users of the class must supply their own - value for the property. - Note that although the values of the array are expressed in - boolean terms, subclasses provide values as integers to conserve - horizontal space. - _should_print_single_line: False in XCObject. Subclasses whose objects - should be written to the project file in the - alternate single-line format, such as - PBXFileReference and PBXBuildFile, should - set this to True. - _encode_transforms: Used by _EncodeString to encode unprintable characters. - The index into this list is the ordinal of the - character to transform; each value is a string - used to represent the character in the output. XCObject - provides an _encode_transforms list suitable for most - XCObject subclasses. - _alternate_encode_transforms: Provided for subclasses that wish to use - the alternate encoding rules. Xcode seems - to use these rules when printing objects in - single-line format. Subclasses that desire - this behavior should set _encode_transforms - to _alternate_encode_transforms. - _hashables: A list of XCObject subclasses that can be hashed by ComputeIDs - to construct this object's ID. Most classes that need custom - hashing behavior should do it by overriding Hashables, - but in some cases an object's parent may wish to push a - hashable value into its child, and it can do so by appending - to _hashables. - Attributes: - id: The object's identifier, a 24-character uppercase hexadecimal string. - Usually, objects being created should not set id until the entire - project file structure is built. At that point, UpdateIDs() should - be called on the root object to assign deterministic values for id to - each object in the tree. - parent: The object's parent. This is set by a parent XCObject when a child - object is added to it. - _properties: The object's property dictionary. An object's properties are - described by its class' _schema variable. - """ - - _schema = {} - _should_print_single_line = False - - # See _EncodeString. - _encode_transforms = [] - i = 0 - while i < ord(" "): - _encode_transforms.append("\\U%04x" % i) - i = i + 1 - _encode_transforms[7] = "\\a" - _encode_transforms[8] = "\\b" - _encode_transforms[9] = "\\t" - _encode_transforms[10] = "\\n" - _encode_transforms[11] = "\\v" - _encode_transforms[12] = "\\f" - _encode_transforms[13] = "\\n" - - _alternate_encode_transforms = list(_encode_transforms) - _alternate_encode_transforms[9] = chr(9) - _alternate_encode_transforms[10] = chr(10) - _alternate_encode_transforms[11] = chr(11) - - def __init__(self, properties=None, id=None, parent=None): - self.id = id - self.parent = parent - self._properties = {} - self._hashables = [] - self._SetDefaultsFromSchema() - self.UpdateProperties(properties) - - def __repr__(self): - try: - name = self.Name() - except NotImplementedError: - return f"<{self.__class__.__name__} at 0x{id(self):x}>" - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Copy(self): - """Make a copy of this object. - - The new object will have its own copy of lists and dicts. Any XCObject - objects owned by this object (marked "strong") will be copied in the - new object, even those found in lists. If this object has any weak - references to other XCObjects, the same references are added to the new - object without making a copy. - """ - - that = self.__class__(id=self.id, parent=self.parent) - for key, value in self._properties.items(): - is_strong = self._schema[key][2] - - if isinstance(value, XCObject): - if is_strong: - new_value = value.Copy() - new_value.parent = that - that._properties[key] = new_value - else: - that._properties[key] = value - elif isinstance(value, (str, int)): - that._properties[key] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, so it's safe to - # call Copy. - that._properties[key] = [] - for item in value: - new_item = item.Copy() - new_item.parent = that - that._properties[key].append(new_item) - else: - that._properties[key] = value[:] - elif isinstance(value, dict): - # dicts are never strong. - if is_strong: - raise TypeError( - "Strong dict for key " + key + " in " + self.__class__.__name__ - ) - else: - that._properties[key] = value.copy() - else: - raise TypeError( - "Unexpected type " - + value.__class__.__name__ - + " for key " - + key - + " in " - + self.__class__.__name__ - ) - - return that - - def Name(self): - """Return the name corresponding to an object. - - Not all objects necessarily need to be nameable, and not all that do have - a "name" property. Override as needed. - """ - - # If the schema indicates that "name" is required, try to access the - # property even if it doesn't exist. This will result in a KeyError - # being raised for the property that should be present, which seems more - # appropriate than NotImplementedError in this case. - if "name" in self._properties or ( - "name" in self._schema and self._schema["name"][3] - ): - return self._properties["name"] - - raise NotImplementedError(self.__class__.__name__ + " must implement Name") - - def Comment(self): - """Return a comment string for the object. - - Most objects just use their name as the comment, but PBXProject uses - different values. - - The returned comment is not escaped and does not have any comment marker - strings applied to it. - """ - - return self.Name() - - def Hashables(self): - hashables = [self.__class__.__name__] - - name = self.Name() - if name is not None: - hashables.append(name) - - hashables.extend(self._hashables) - - return hashables - - def HashablesForChild(self): - return None - - def ComputeIDs(self, recursive=True, overwrite=True, seed_hash=None): - """Set "id" properties deterministically. - - An object's "id" property is set based on a hash of its class type and - name, as well as the class type and name of all ancestor objects. As - such, it is only advisable to call ComputeIDs once an entire project file - tree is built. - - If recursive is True, recurse into all descendant objects and update their - hashes. - - If overwrite is True, any existing value set in the "id" property will be - replaced. - """ - - def _HashUpdate(hash, data): - """Update hash with data's length and contents. - - If the hash were updated only with the value of data, it would be - possible for clowns to induce collisions by manipulating the names of - their objects. By adding the length, it's exceedingly less likely that - ID collisions will be encountered, intentionally or not. - """ - - hash.update(struct.pack(">i", len(data))) - if isinstance(data, str): - data = data.encode("utf-8") - hash.update(data) - - if seed_hash is None: - seed_hash = hashlib.sha1() - - hash = seed_hash.copy() - - hashables = self.Hashables() - assert len(hashables) > 0 - for hashable in hashables: - _HashUpdate(hash, hashable) - - if recursive: - hashables_for_child = self.HashablesForChild() - if hashables_for_child is None: - child_hash = hash - else: - assert len(hashables_for_child) > 0 - child_hash = seed_hash.copy() - for hashable in hashables_for_child: - _HashUpdate(child_hash, hashable) - - for child in self.Children(): - child.ComputeIDs(recursive, overwrite, child_hash) - - if overwrite or self.id is None: - # Xcode IDs are only 96 bits (24 hex characters), but a SHA-1 digest is - # is 160 bits. Instead of throwing out 64 bits of the digest, xor them - # into the portion that gets used. - assert hash.digest_size % 4 == 0 - digest_int_count = hash.digest_size // 4 - digest_ints = struct.unpack(">" + "I" * digest_int_count, hash.digest()) - id_ints = [0, 0, 0] - for index in range(0, digest_int_count): - id_ints[index % 3] ^= digest_ints[index] - self.id = "%08X%08X%08X" % tuple(id_ints) - - def EnsureNoIDCollisions(self): - """Verifies that no two objects have the same ID. Checks all descendants. - """ - - ids = {} - descendants = self.Descendants() - for descendant in descendants: - if descendant.id in ids: - other = ids[descendant.id] - raise KeyError( - 'Duplicate ID %s, objects "%s" and "%s" in "%s"' - % ( - descendant.id, - str(descendant._properties), - str(other._properties), - self._properties["rootObject"].Name(), - ) - ) - ids[descendant.id] = descendant - - def Children(self): - """Returns a list of all of this object's owned (strong) children.""" - - children = [] - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong) = attributes[0:3] - if is_strong and property in self._properties: - if not is_list: - children.append(self._properties[property]) - else: - children.extend(self._properties[property]) - return children - - def Descendants(self): - """Returns a list of all of this object's descendants, including this - object. - """ - - children = self.Children() - descendants = [self] - for child in children: - descendants.extend(child.Descendants()) - return descendants - - def PBXProjectAncestor(self): - # The base case for recursion is defined at PBXProject.PBXProjectAncestor. - if self.parent: - return self.parent.PBXProjectAncestor() - return None - - def _EncodeComment(self, comment): - """Encodes a comment to be placed in the project file output, mimicking - Xcode behavior. - """ - - # This mimics Xcode behavior by wrapping the comment in "/*" and "*/". If - # the string already contains a "*/", it is turned into "(*)/". This keeps - # the file writer from outputting something that would be treated as the - # end of a comment in the middle of something intended to be entirely a - # comment. - - return "/* " + comment.replace("*/", "(*)/") + " */" - - def _EncodeTransform(self, match): - # This function works closely with _EncodeString. It will only be called - # by re.sub with match.group(0) containing a character matched by the - # the _escaped expression. - char = match.group(0) - - # Backslashes (\) and quotation marks (") are always replaced with a - # backslash-escaped version of the same. Everything else gets its - # replacement from the class' _encode_transforms array. - if char == "\\": - return "\\\\" - if char == '"': - return '\\"' - return self._encode_transforms[ord(char)] - - def _EncodeString(self, value): - """Encodes a string to be placed in the project file output, mimicking - Xcode behavior. - """ - - # Use quotation marks when any character outside of the range A-Z, a-z, 0-9, - # $ (dollar sign), . (period), and _ (underscore) is present. Also use - # quotation marks to represent empty strings. - # - # Escape " (double-quote) and \ (backslash) by preceding them with a - # backslash. - # - # Some characters below the printable ASCII range are encoded specially: - # 7 ^G BEL is encoded as "\a" - # 8 ^H BS is encoded as "\b" - # 11 ^K VT is encoded as "\v" - # 12 ^L NP is encoded as "\f" - # 127 ^? DEL is passed through as-is without escaping - # - In PBXFileReference and PBXBuildFile objects: - # 9 ^I HT is passed through as-is without escaping - # 10 ^J NL is passed through as-is without escaping - # 13 ^M CR is passed through as-is without escaping - # - In other objects: - # 9 ^I HT is encoded as "\t" - # 10 ^J NL is encoded as "\n" - # 13 ^M CR is encoded as "\n" rendering it indistinguishable from - # 10 ^J NL - # All other characters within the ASCII control character range (0 through - # 31 inclusive) are encoded as "\U001f" referring to the Unicode code point - # in hexadecimal. For example, character 14 (^N SO) is encoded as "\U000e". - # Characters above the ASCII range are passed through to the output encoded - # as UTF-8 without any escaping. These mappings are contained in the - # class' _encode_transforms list. - - if _unquoted.search(value) and not _quoted.search(value): - return value - - return '"' + _escaped.sub(self._EncodeTransform, value) + '"' - - def _XCPrint(self, file, tabs, line): - file.write("\t" * tabs + line) - - def _XCPrintableValue(self, tabs, value, flatten_list=False): - """Returns a representation of value that may be printed in a project file, - mimicking Xcode's behavior. - - _XCPrintableValue can handle str and int values, XCObjects (which are - made printable by returning their id property), and list and dict objects - composed of any of the above types. When printing a list or dict, and - _should_print_single_line is False, the tabs parameter is used to determine - how much to indent the lines corresponding to the items in the list or - dict. - - If flatten_list is True, single-element lists will be transformed into - strings. - """ - - printable = "" - comment = None - - if self._should_print_single_line: - sep = " " - element_tabs = "" - end_tabs = "" - else: - sep = "\n" - element_tabs = "\t" * (tabs + 1) - end_tabs = "\t" * tabs - - if isinstance(value, XCObject): - printable += value.id - comment = value.Comment() - elif isinstance(value, str): - printable += self._EncodeString(value) - elif isinstance(value, str): - printable += self._EncodeString(value.encode("utf-8")) - elif isinstance(value, int): - printable += str(value) - elif isinstance(value, list): - if flatten_list and len(value) <= 1: - if len(value) == 0: - printable += self._EncodeString("") - else: - printable += self._EncodeString(value[0]) - else: - printable = "(" + sep - for item in value: - printable += ( - element_tabs - + self._XCPrintableValue(tabs + 1, item, flatten_list) - + "," - + sep - ) - printable += end_tabs + ")" - elif isinstance(value, dict): - printable = "{" + sep - for item_key, item_value in sorted(value.items()): - printable += ( - element_tabs - + self._XCPrintableValue(tabs + 1, item_key, flatten_list) - + " = " - + self._XCPrintableValue(tabs + 1, item_value, flatten_list) - + ";" - + sep - ) - printable += end_tabs + "}" - else: - raise TypeError("Can't make " + value.__class__.__name__ + " printable") - - if comment: - printable += " " + self._EncodeComment(comment) - - return printable - - def _XCKVPrint(self, file, tabs, key, value): - """Prints a key and value, members of an XCObject's _properties dictionary, - to file. - - tabs is an int identifying the indentation level. If the class' - _should_print_single_line variable is True, tabs is ignored and the - key-value pair will be followed by a space insead of a newline. - """ - - if self._should_print_single_line: - printable = "" - after_kv = " " - else: - printable = "\t" * tabs - after_kv = "\n" - - # Xcode usually prints remoteGlobalIDString values in PBXContainerItemProxy - # objects without comments. Sometimes it prints them with comments, but - # the majority of the time, it doesn't. To avoid unnecessary changes to - # the project file after Xcode opens it, don't write comments for - # remoteGlobalIDString. This is a sucky hack and it would certainly be - # cleaner to extend the schema to indicate whether or not a comment should - # be printed, but since this is the only case where the problem occurs and - # Xcode itself can't seem to make up its mind, the hack will suffice. - # - # Also see PBXContainerItemProxy._schema['remoteGlobalIDString']. - if key == "remoteGlobalIDString" and isinstance(self, PBXContainerItemProxy): - value_to_print = value.id - else: - value_to_print = value - - # PBXBuildFile's settings property is represented in the output as a dict, - # but a hack here has it represented as a string. Arrange to strip off the - # quotes so that it shows up in the output as expected. - if key == "settings" and isinstance(self, PBXBuildFile): - strip_value_quotes = True - else: - strip_value_quotes = False - - # In another one-off, let's set flatten_list on buildSettings properties - # of XCBuildConfiguration objects, because that's how Xcode treats them. - if key == "buildSettings" and isinstance(self, XCBuildConfiguration): - flatten_list = True - else: - flatten_list = False - - try: - printable_key = self._XCPrintableValue(tabs, key, flatten_list) - printable_value = self._XCPrintableValue(tabs, value_to_print, flatten_list) - if ( - strip_value_quotes - and len(printable_value) > 1 - and printable_value[0] == '"' - and printable_value[-1] == '"' - ): - printable_value = printable_value[1:-1] - printable += printable_key + " = " + printable_value + ";" + after_kv - except TypeError as e: - gyp.common.ExceptionAppend(e, 'while printing key "%s"' % key) - raise - - self._XCPrint(file, 0, printable) - - def Print(self, file=sys.stdout): - """Prints a reprentation of this object to file, adhering to Xcode output - formatting. - """ - - self.VerifyHasRequiredProperties() - - if self._should_print_single_line: - # When printing an object in a single line, Xcode doesn't put any space - # between the beginning of a dictionary (or presumably a list) and the - # first contained item, so you wind up with snippets like - # ...CDEF = {isa = PBXFileReference; fileRef = 0123... - # If it were me, I would have put a space in there after the opening - # curly, but I guess this is just another one of those inconsistencies - # between how Xcode prints PBXFileReference and PBXBuildFile objects as - # compared to other objects. Mimic Xcode's behavior here by using an - # empty string for sep. - sep = "" - end_tabs = 0 - else: - sep = "\n" - end_tabs = 2 - - # Start the object. For example, '\t\tPBXProject = {\n'. - self._XCPrint(file, 2, self._XCPrintableValue(2, self) + " = {" + sep) - - # "isa" isn't in the _properties dictionary, it's an intrinsic property - # of the class which the object belongs to. Xcode always outputs "isa" - # as the first element of an object dictionary. - self._XCKVPrint(file, 3, "isa", self.__class__.__name__) - - # The remaining elements of an object dictionary are sorted alphabetically. - for property, value in sorted(self._properties.items()): - self._XCKVPrint(file, 3, property, value) - - # End the object. - self._XCPrint(file, end_tabs, "};\n") - - def UpdateProperties(self, properties, do_copy=False): - """Merge the supplied properties into the _properties dictionary. - - The input properties must adhere to the class schema or a KeyError or - TypeError exception will be raised. If adding an object of an XCObject - subclass and the schema indicates a strong relationship, the object's - parent will be set to this object. - - If do_copy is True, then lists, dicts, strong-owned XCObjects, and - strong-owned XCObjects in lists will be copied instead of having their - references added. - """ - - if properties is None: - return - - for property, value in properties.items(): - # Make sure the property is in the schema. - if property not in self._schema: - raise KeyError(property + " not in " + self.__class__.__name__) - - # Make sure the property conforms to the schema. - (is_list, property_type, is_strong) = self._schema[property][0:3] - if is_list: - if value.__class__ != list: - raise TypeError( - property - + " of " - + self.__class__.__name__ - + " must be list, not " - + value.__class__.__name__ - ) - for item in value: - if not isinstance(item, property_type) and not ( - isinstance(item, str) and property_type == str - ): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError( - "item of " - + property - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + item.__class__.__name__ - ) - elif not isinstance(value, property_type) and not ( - isinstance(value, str) and property_type == str - ): - # Accept unicode where str is specified. str is treated as - # UTF-8-encoded. - raise TypeError( - property - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + value.__class__.__name__ - ) - - # Checks passed, perform the assignment. - if do_copy: - if isinstance(value, XCObject): - if is_strong: - self._properties[property] = value.Copy() - else: - self._properties[property] = value - elif isinstance(value, (str, int)): - self._properties[property] = value - elif isinstance(value, list): - if is_strong: - # If is_strong is True, each element is an XCObject, - # so it's safe to call Copy. - self._properties[property] = [] - for item in value: - self._properties[property].append(item.Copy()) - else: - self._properties[property] = value[:] - elif isinstance(value, dict): - self._properties[property] = value.copy() - else: - raise TypeError( - "Don't know how to copy a " - + value.__class__.__name__ - + " object for " - + property - + " in " - + self.__class__.__name__ - ) - else: - self._properties[property] = value - - # Set up the child's back-reference to this object. Don't use |value| - # any more because it may not be right if do_copy is true. - if is_strong: - if not is_list: - self._properties[property].parent = self - else: - for item in self._properties[property]: - item.parent = self - - def HasProperty(self, key): - return key in self._properties - - def GetProperty(self, key): - return self._properties[key] - - def SetProperty(self, key, value): - self.UpdateProperties({key: value}) - - def DelProperty(self, key): - if key in self._properties: - del self._properties[key] - - def AppendProperty(self, key, value): - # TODO(mark): Support ExtendProperty too (and make this call that)? - - # Schema validation. - if key not in self._schema: - raise KeyError(key + " not in " + self.__class__.__name__) - - (is_list, property_type, is_strong) = self._schema[key][0:3] - if not is_list: - raise TypeError(key + " of " + self.__class__.__name__ + " must be list") - if not isinstance(value, property_type): - raise TypeError( - "item of " - + key - + " of " - + self.__class__.__name__ - + " must be " - + property_type.__name__ - + ", not " - + value.__class__.__name__ - ) - - # If the property doesn't exist yet, create a new empty list to receive the - # item. - self._properties[key] = self._properties.get(key, []) - - # Set up the ownership link. - if is_strong: - value.parent = self - - # Store the item. - self._properties[key].append(value) - - def VerifyHasRequiredProperties(self): - """Ensure that all properties identified as required by the schema are - set. - """ - - # TODO(mark): A stronger verification mechanism is needed. Some - # subclasses need to perform validation beyond what the schema can enforce. - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if is_required and property not in self._properties: - raise KeyError(self.__class__.__name__ + " requires " + property) - - def _SetDefaultsFromSchema(self): - """Assign object default values according to the schema. This will not - overwrite properties that have already been set.""" - - defaults = {} - for property, attributes in self._schema.items(): - (is_list, property_type, is_strong, is_required) = attributes[0:4] - if ( - is_required - and len(attributes) >= 5 - and property not in self._properties - ): - default = attributes[4] - - defaults[property] = default - - if len(defaults) > 0: - # Use do_copy=True so that each new object gets its own copy of strong - # objects, lists, and dicts. - self.UpdateProperties(defaults, do_copy=True) - - -class XCHierarchicalElement(XCObject): - """Abstract base for PBXGroup and PBXFileReference. Not represented in a - project file.""" - - # TODO(mark): Do name and path belong here? Probably so. - # If path is set and name is not, name may have a default value. Name will - # be set to the basename of path, if the basename of path is different from - # the full value of path. If path is already just a leaf name, name will - # not be set. - _schema = XCObject._schema.copy() - _schema.update( - { - "comments": [0, str, 0, 0], - "fileEncoding": [0, str, 0, 0], - "includeInIndex": [0, int, 0, 0], - "indentWidth": [0, int, 0, 0], - "lineEnding": [0, int, 0, 0], - "sourceTree": [0, str, 0, 1, ""], - "tabWidth": [0, int, 0, 0], - "usesTabs": [0, int, 0, 0], - "wrapsLines": [0, int, 0, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - if "path" in self._properties and "name" not in self._properties: - path = self._properties["path"] - name = posixpath.basename(path) - if name not in ("", path): - self.SetProperty("name", name) - - if "path" in self._properties and ( - "sourceTree" not in self._properties - or self._properties["sourceTree"] == "" - ): - # If the pathname begins with an Xcode variable like "$(SDKROOT)/", take - # the variable out and make the path be relative to that variable by - # assigning the variable name as the sourceTree. - (source_tree, path) = SourceTreeAndPathFromPath(self._properties["path"]) - if source_tree is not None: - self._properties["sourceTree"] = source_tree - if path is not None: - self._properties["path"] = path - if ( - source_tree is not None - and path is None - and "name" not in self._properties - ): - # The path was of the form "$(SDKROOT)" with no path following it. - # This object is now relative to that variable, so it has no path - # attribute of its own. It does, however, keep a name. - del self._properties["path"] - self._properties["name"] = source_tree - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - elif "path" in self._properties: - return self._properties["path"] - else: - # This happens in the case of the root PBXGroup. - return None - - def Hashables(self): - """Custom hashables for XCHierarchicalElements. - - XCHierarchicalElements are special. Generally, their hashes shouldn't - change if the paths don't change. The normal XCObject implementation of - Hashables adds a hashable for each object, which means that if - the hierarchical structure changes (possibly due to changes caused when - TakeOverOnlyChild runs and encounters slight changes in the hierarchy), - the hashes will change. For example, if a project file initially contains - a/b/f1 and a/b becomes collapsed into a/b, f1 will have a single parent - a/b. If someone later adds a/f2 to the project file, a/b can no longer be - collapsed, and f1 winds up with parent b and grandparent a. That would - be sufficient to change f1's hash. - - To counteract this problem, hashables for all XCHierarchicalElements except - for the main group (which has neither a name nor a path) are taken to be - just the set of path components. Because hashables are inherited from - parents, this provides assurance that a/b/f1 has the same set of hashables - whether its parent is b or a/b. - - The main group is a special case. As it is permitted to have no name or - path, it is permitted to use the standard XCObject hash mechanism. This - is not considered a problem because there can be only one main group. - """ - - if self == self.PBXProjectAncestor()._properties["mainGroup"]: - # super - return XCObject.Hashables(self) - - hashables = [] - - # Put the name in first, ensuring that if TakeOverOnlyChild collapses - # children into a top-level group like "Source", the name always goes - # into the list of hashables without interfering with path components. - if "name" in self._properties: - # Make it less likely for people to manipulate hashes by following the - # pattern of always pushing an object type value onto the list first. - hashables.append(self.__class__.__name__ + ".name") - hashables.append(self._properties["name"]) - - # NOTE: This still has the problem that if an absolute path is encountered, - # including paths with a sourceTree, they'll still inherit their parents' - # hashables, even though the paths aren't relative to their parents. This - # is not expected to be much of a problem in practice. - path = self.PathFromSourceTreeAndPath() - if path is not None: - components = path.split(posixpath.sep) - for component in components: - hashables.append(self.__class__.__name__ + ".path") - hashables.append(component) - - hashables.extend(self._hashables) - - return hashables - - def Compare(self, other): - # Allow comparison of these types. PBXGroup has the highest sort rank; - # PBXVariantGroup is treated as equal to PBXFileReference. - valid_class_types = { - PBXFileReference: "file", - PBXGroup: "group", - PBXVariantGroup: "file", - } - self_type = valid_class_types[self.__class__] - other_type = valid_class_types[other.__class__] - - if self_type == other_type: - # If the two objects are of the same sort rank, compare their names. - return cmp(self.Name(), other.Name()) - - # Otherwise, sort groups before everything else. - if self_type == "group": - return -1 - return 1 - - def CompareRootGroup(self, other): - # This function should be used only to compare direct children of the - # containing PBXProject's mainGroup. These groups should appear in the - # listed order. - # TODO(mark): "Build" is used by gyp.generator.xcode, perhaps the - # generator should have a way of influencing this list rather than having - # to hardcode for the generator here. - order = [ - "Source", - "Intermediates", - "Projects", - "Frameworks", - "Products", - "Build", - ] - - # If the groups aren't in the listed order, do a name comparison. - # Otherwise, groups in the listed order should come before those that - # aren't. - self_name = self.Name() - other_name = other.Name() - self_in = isinstance(self, PBXGroup) and self_name in order - other_in = isinstance(self, PBXGroup) and other_name in order - if not self_in and not other_in: - return self.Compare(other) - if self_name in order and other_name not in order: - return -1 - if other_name in order and self_name not in order: - return 1 - - # If both groups are in the listed order, go by the defined order. - self_index = order.index(self_name) - other_index = order.index(other_name) - if self_index < other_index: - return -1 - if self_index > other_index: - return 1 - return 0 - - def PathFromSourceTreeAndPath(self): - # Turn the object's sourceTree and path properties into a single flat - # string of a form comparable to the path parameter. If there's a - # sourceTree property other than "", wrap it in $(...) for the - # comparison. - components = [] - if self._properties["sourceTree"] != "": - components.append("$(" + self._properties["sourceTree"] + ")") - if "path" in self._properties: - components.append(self._properties["path"]) - - if len(components) > 0: - return posixpath.join(*components) - - return None - - def FullPath(self): - # Returns a full path to self relative to the project file, or relative - # to some other source tree. Start with self, and walk up the chain of - # parents prepending their paths, if any, until no more parents are - # available (project-relative path) or until a path relative to some - # source tree is found. - xche = self - path = None - while isinstance(xche, XCHierarchicalElement) and ( - path is None or (not path.startswith("/") and not path.startswith("$")) - ): - this_path = xche.PathFromSourceTreeAndPath() - if this_path is not None and path is not None: - path = posixpath.join(this_path, path) - elif this_path is not None: - path = this_path - xche = xche.parent - - return path - - -class PBXGroup(XCHierarchicalElement): - """ - Attributes: - _children_by_path: Maps pathnames of children of this PBXGroup to the - actual child XCHierarchicalElement objects. - _variant_children_by_name_and_path: Maps (name, path) tuples of - PBXVariantGroup children to the actual child PBXVariantGroup objects. - """ - - _schema = XCHierarchicalElement._schema.copy() - _schema.update( - { - "children": [1, XCHierarchicalElement, 1, 1, []], - "name": [0, str, 0, 0], - "path": [0, str, 0, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCHierarchicalElement.__init__(self, properties, id, parent) - self._children_by_path = {} - self._variant_children_by_name_and_path = {} - for child in self._properties.get("children", []): - self._AddChildToDicts(child) - - def Hashables(self): - # super - hashables = XCHierarchicalElement.Hashables(self) - - # It is not sufficient to just rely on name and parent to build a unique - # hashable : a node could have two child PBXGroup sharing a common name. - # To add entropy the hashable is enhanced with the names of all its - # children. - for child in self._properties.get("children", []): - child_name = child.Name() - if child_name is not None: - hashables.append(child_name) - - return hashables - - def HashablesForChild(self): - # To avoid a circular reference the hashables used to compute a child id do - # not include the child names. - return XCHierarchicalElement.Hashables(self) - - def _AddChildToDicts(self, child): - # Sets up this PBXGroup object's dicts to reference the child properly. - child_path = child.PathFromSourceTreeAndPath() - if child_path: - if child_path in self._children_by_path: - raise ValueError("Found multiple children with path " + child_path) - self._children_by_path[child_path] = child - - if isinstance(child, PBXVariantGroup): - child_name = child._properties.get("name", None) - key = (child_name, child_path) - if key in self._variant_children_by_name_and_path: - raise ValueError( - "Found multiple PBXVariantGroup children with " - + "name " - + str(child_name) - + " and path " - + str(child_path) - ) - self._variant_children_by_name_and_path[key] = child - - def AppendChild(self, child): - # Callers should use this instead of calling - # AppendProperty('children', child) directly because this function - # maintains the group's dicts. - self.AppendProperty("children", child) - self._AddChildToDicts(child) - - def GetChildByName(self, name): - # This is not currently optimized with a dict as GetChildByPath is because - # it has few callers. Most callers probably want GetChildByPath. This - # function is only useful to get children that have names but no paths, - # which is rare. The children of the main group ("Source", "Products", - # etc.) is pretty much the only case where this likely to come up. - # - # TODO(mark): Maybe this should raise an error if more than one child is - # present with the same name. - if "children" not in self._properties: - return None - - for child in self._properties["children"]: - if child.Name() == name: - return child - - return None - - def GetChildByPath(self, path): - if not path: - return None - - if path in self._children_by_path: - return self._children_by_path[path] - - return None - - def GetChildByRemoteObject(self, remote_object): - # This method is a little bit esoteric. Given a remote_object, which - # should be a PBXFileReference in another project file, this method will - # return this group's PBXReferenceProxy object serving as a local proxy - # for the remote PBXFileReference. - # - # This function might benefit from a dict optimization as GetChildByPath - # for some workloads, but profiling shows that it's not currently a - # problem. - if "children" not in self._properties: - return None - - for child in self._properties["children"]: - if not isinstance(child, PBXReferenceProxy): - continue - - container_proxy = child._properties["remoteRef"] - if container_proxy._properties["remoteGlobalIDString"] == remote_object: - return child - - return None - - def AddOrGetFileByPath(self, path, hierarchical): - """Returns an existing or new file reference corresponding to path. - - If hierarchical is True, this method will create or use the necessary - hierarchical group structure corresponding to path. Otherwise, it will - look in and create an item in the current group only. - - If an existing matching reference is found, it is returned, otherwise, a - new one will be created, added to the correct group, and returned. - - If path identifies a directory by virtue of carrying a trailing slash, - this method returns a PBXFileReference of "folder" type. If path - identifies a variant, by virtue of it identifying a file inside a directory - with an ".lproj" extension, this method returns a PBXVariantGroup - containing the variant named by path, and possibly other variants. For - all other paths, a "normal" PBXFileReference will be returned. - """ - - # Adding or getting a directory? Directories end with a trailing slash. - is_dir = False - if path.endswith("/"): - is_dir = True - path = posixpath.normpath(path) - if is_dir: - path = path + "/" - - # Adding or getting a variant? Variants are files inside directories - # with an ".lproj" extension. Xcode uses variants for localization. For - # a variant path/to/Language.lproj/MainMenu.nib, put a variant group named - # MainMenu.nib inside path/to, and give it a variant named Language. In - # this example, grandparent would be set to path/to and parent_root would - # be set to Language. - variant_name = None - parent = posixpath.dirname(path) - grandparent = posixpath.dirname(parent) - parent_basename = posixpath.basename(parent) - (parent_root, parent_ext) = posixpath.splitext(parent_basename) - if parent_ext == ".lproj": - variant_name = parent_root - if grandparent == "": - grandparent = None - - # Putting a directory inside a variant group is not currently supported. - assert not is_dir or variant_name is None - - path_split = path.split(posixpath.sep) - if ( - len(path_split) == 1 - or ((is_dir or variant_name is not None) and len(path_split) == 2) - or not hierarchical - ): - # The PBXFileReference or PBXVariantGroup will be added to or gotten from - # this PBXGroup, no recursion necessary. - if variant_name is None: - # Add or get a PBXFileReference. - file_ref = self.GetChildByPath(path) - if file_ref is not None: - assert file_ref.__class__ == PBXFileReference - else: - file_ref = PBXFileReference({"path": path}) - self.AppendChild(file_ref) - else: - # Add or get a PBXVariantGroup. The variant group name is the same - # as the basename (MainMenu.nib in the example above). grandparent - # specifies the path to the variant group itself, and path_split[-2:] - # is the path of the specific variant relative to its group. - variant_group_name = posixpath.basename(path) - variant_group_ref = self.AddOrGetVariantGroupByNameAndPath( - variant_group_name, grandparent - ) - variant_path = posixpath.sep.join(path_split[-2:]) - variant_ref = variant_group_ref.GetChildByPath(variant_path) - if variant_ref is not None: - assert variant_ref.__class__ == PBXFileReference - else: - variant_ref = PBXFileReference( - {"name": variant_name, "path": variant_path} - ) - variant_group_ref.AppendChild(variant_ref) - # The caller is interested in the variant group, not the specific - # variant file. - file_ref = variant_group_ref - return file_ref - else: - # Hierarchical recursion. Add or get a PBXGroup corresponding to the - # outermost path component, and then recurse into it, chopping off that - # path component. - next_dir = path_split[0] - group_ref = self.GetChildByPath(next_dir) - if group_ref is not None: - assert group_ref.__class__ == PBXGroup - else: - group_ref = PBXGroup({"path": next_dir}) - self.AppendChild(group_ref) - return group_ref.AddOrGetFileByPath( - posixpath.sep.join(path_split[1:]), hierarchical - ) - - def AddOrGetVariantGroupByNameAndPath(self, name, path): - """Returns an existing or new PBXVariantGroup for name and path. - - If a PBXVariantGroup identified by the name and path arguments is already - present as a child of this object, it is returned. Otherwise, a new - PBXVariantGroup with the correct properties is created, added as a child, - and returned. - - This method will generally be called by AddOrGetFileByPath, which knows - when to create a variant group based on the structure of the pathnames - passed to it. - """ - - key = (name, path) - if key in self._variant_children_by_name_and_path: - variant_group_ref = self._variant_children_by_name_and_path[key] - assert variant_group_ref.__class__ == PBXVariantGroup - return variant_group_ref - - variant_group_properties = {"name": name} - if path is not None: - variant_group_properties["path"] = path - variant_group_ref = PBXVariantGroup(variant_group_properties) - self.AppendChild(variant_group_ref) - - return variant_group_ref - - def TakeOverOnlyChild(self, recurse=False): - """If this PBXGroup has only one child and it's also a PBXGroup, take - it over by making all of its children this object's children. - - This function will continue to take over only children when those children - are groups. If there are three PBXGroups representing a, b, and c, with - c inside b and b inside a, and a and b have no other children, this will - result in a taking over both b and c, forming a PBXGroup for a/b/c. - - If recurse is True, this function will recurse into children and ask them - to collapse themselves by taking over only children as well. Assuming - an example hierarchy with files at a/b/c/d1, a/b/c/d2, and a/b/c/d3/e/f - (d1, d2, and f are files, the rest are groups), recursion will result in - a group for a/b/c containing a group for d3/e. - """ - - # At this stage, check that child class types are PBXGroup exactly, - # instead of using isinstance. The only subclass of PBXGroup, - # PBXVariantGroup, should not participate in reparenting in the same way: - # reparenting by merging different object types would be wrong. - while ( - len(self._properties["children"]) == 1 - and self._properties["children"][0].__class__ == PBXGroup - ): - # Loop to take over the innermost only-child group possible. - - child = self._properties["children"][0] - - # Assume the child's properties, including its children. Save a copy - # of this object's old properties, because they'll still be needed. - # This object retains its existing id and parent attributes. - old_properties = self._properties - self._properties = child._properties - self._children_by_path = child._children_by_path - - if ( - "sourceTree" not in self._properties - or self._properties["sourceTree"] == "" - ): - # The child was relative to its parent. Fix up the path. Note that - # children with a sourceTree other than "" are not relative to - # their parents, so no path fix-up is needed in that case. - if "path" in old_properties: - if "path" in self._properties: - # Both the original parent and child have paths set. - self._properties["path"] = posixpath.join( - old_properties["path"], self._properties["path"] - ) - else: - # Only the original parent has a path, use it. - self._properties["path"] = old_properties["path"] - if "sourceTree" in old_properties: - # The original parent had a sourceTree set, use it. - self._properties["sourceTree"] = old_properties["sourceTree"] - - # If the original parent had a name set, keep using it. If the original - # parent didn't have a name but the child did, let the child's name - # live on. If the name attribute seems unnecessary now, get rid of it. - if "name" in old_properties and old_properties["name"] not in ( - None, - self.Name(), - ): - self._properties["name"] = old_properties["name"] - if ( - "name" in self._properties - and "path" in self._properties - and self._properties["name"] == self._properties["path"] - ): - del self._properties["name"] - - # Notify all children of their new parent. - for child in self._properties["children"]: - child.parent = self - - # If asked to recurse, recurse. - if recurse: - for child in self._properties["children"]: - if child.__class__ == PBXGroup: - child.TakeOverOnlyChild(recurse) - - def SortGroup(self): - self._properties["children"] = sorted( - self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y)) - ) - - # Recurse. - for child in self._properties["children"]: - if isinstance(child, PBXGroup): - child.SortGroup() - - -class XCFileLikeElement(XCHierarchicalElement): - # Abstract base for objects that can be used as the fileRef property of - # PBXBuildFile. - - def PathHashables(self): - # A PBXBuildFile that refers to this object will call this method to - # obtain additional hashables specific to this XCFileLikeElement. Don't - # just use this object's hashables, they're not specific and unique enough - # on their own (without access to the parent hashables.) Instead, provide - # hashables that identify this object by path by getting its hashables as - # well as the hashables of ancestor XCHierarchicalElement objects. - - hashables = [] - xche = self - while isinstance(xche, XCHierarchicalElement): - xche_hashables = xche.Hashables() - for index, xche_hashable in enumerate(xche_hashables): - hashables.insert(index, xche_hashable) - xche = xche.parent - return hashables - - -class XCContainerPortal(XCObject): - # Abstract base for objects that can be used as the containerPortal property - # of PBXContainerItemProxy. - pass - - -class XCRemoteObject(XCObject): - # Abstract base for objects that can be used as the remoteGlobalIDString - # property of PBXContainerItemProxy. - pass - - -class PBXFileReference(XCFileLikeElement, XCContainerPortal, XCRemoteObject): - _schema = XCFileLikeElement._schema.copy() - _schema.update( - { - "explicitFileType": [0, str, 0, 0], - "lastKnownFileType": [0, str, 0, 0], - "name": [0, str, 0, 0], - "path": [0, str, 0, 1], - } - ) - - # Weird output rules for PBXFileReference. - _should_print_single_line = True - # super - _encode_transforms = XCFileLikeElement._alternate_encode_transforms - - def __init__(self, properties=None, id=None, parent=None): - # super - XCFileLikeElement.__init__(self, properties, id, parent) - if "path" in self._properties and self._properties["path"].endswith("/"): - self._properties["path"] = self._properties["path"][:-1] - is_dir = True - else: - is_dir = False - - if ( - "path" in self._properties - and "lastKnownFileType" not in self._properties - and "explicitFileType" not in self._properties - ): - # TODO(mark): This is the replacement for a replacement for a quick hack. - # It is no longer incredibly sucky, but this list needs to be extended. - extension_map = { - "a": "archive.ar", - "app": "wrapper.application", - "bdic": "file", - "bundle": "wrapper.cfbundle", - "c": "sourcecode.c.c", - "cc": "sourcecode.cpp.cpp", - "cpp": "sourcecode.cpp.cpp", - "css": "text.css", - "cxx": "sourcecode.cpp.cpp", - "dart": "sourcecode", - "dylib": "compiled.mach-o.dylib", - "framework": "wrapper.framework", - "gyp": "sourcecode", - "gypi": "sourcecode", - "h": "sourcecode.c.h", - "hxx": "sourcecode.cpp.h", - "icns": "image.icns", - "java": "sourcecode.java", - "js": "sourcecode.javascript", - "kext": "wrapper.kext", - "m": "sourcecode.c.objc", - "mm": "sourcecode.cpp.objcpp", - "nib": "wrapper.nib", - "o": "compiled.mach-o.objfile", - "pdf": "image.pdf", - "pl": "text.script.perl", - "plist": "text.plist.xml", - "pm": "text.script.perl", - "png": "image.png", - "py": "text.script.python", - "r": "sourcecode.rez", - "rez": "sourcecode.rez", - "s": "sourcecode.asm", - "storyboard": "file.storyboard", - "strings": "text.plist.strings", - "swift": "sourcecode.swift", - "ttf": "file", - "xcassets": "folder.assetcatalog", - "xcconfig": "text.xcconfig", - "xcdatamodel": "wrapper.xcdatamodel", - "xcdatamodeld": "wrapper.xcdatamodeld", - "xib": "file.xib", - "y": "sourcecode.yacc", - } - - prop_map = { - "dart": "explicitFileType", - "gyp": "explicitFileType", - "gypi": "explicitFileType", - } - - if is_dir: - file_type = "folder" - prop_name = "lastKnownFileType" - else: - basename = posixpath.basename(self._properties["path"]) - (root, ext) = posixpath.splitext(basename) - # Check the map using a lowercase extension. - # TODO(mark): Maybe it should try with the original case first and fall - # back to lowercase, in case there are any instances where case - # matters. There currently aren't. - if ext != "": - ext = ext[1:].lower() - - # TODO(mark): "text" is the default value, but "file" is appropriate - # for unrecognized files not containing text. Xcode seems to choose - # based on content. - file_type = extension_map.get(ext, "text") - prop_name = prop_map.get(ext, "lastKnownFileType") - - self._properties[prop_name] = file_type - - -class PBXVariantGroup(PBXGroup, XCFileLikeElement): - """PBXVariantGroup is used by Xcode to represent localizations.""" - - # No additions to the schema relative to PBXGroup. - pass - - -# PBXReferenceProxy is also an XCFileLikeElement subclass. It is defined below -# because it uses PBXContainerItemProxy, defined below. - - -class XCBuildConfiguration(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "baseConfigurationReference": [0, PBXFileReference, 0, 0], - "buildSettings": [0, dict, 0, 1, {}], - "name": [0, str, 0, 1], - } - ) - - def HasBuildSetting(self, key): - return key in self._properties["buildSettings"] - - def GetBuildSetting(self, key): - return self._properties["buildSettings"][key] - - def SetBuildSetting(self, key, value): - # TODO(mark): If a list, copy? - self._properties["buildSettings"][key] = value - - def AppendBuildSetting(self, key, value): - if key not in self._properties["buildSettings"]: - self._properties["buildSettings"][key] = [] - self._properties["buildSettings"][key].append(value) - - def DelBuildSetting(self, key): - if key in self._properties["buildSettings"]: - del self._properties["buildSettings"][key] - - def SetBaseConfiguration(self, value): - self._properties["baseConfigurationReference"] = value - - -class XCConfigurationList(XCObject): - # _configs is the default list of configurations. - _configs = [ - XCBuildConfiguration({"name": "Debug"}), - XCBuildConfiguration({"name": "Release"}), - ] - - _schema = XCObject._schema.copy() - _schema.update( - { - "buildConfigurations": [1, XCBuildConfiguration, 1, 1, _configs], - "defaultConfigurationIsVisible": [0, int, 0, 1, 1], - "defaultConfigurationName": [0, str, 0, 1, "Release"], - } - ) - - def Name(self): - return ( - "Build configuration list for " - + self.parent.__class__.__name__ - + ' "' - + self.parent.Name() - + '"' - ) - - def ConfigurationNamed(self, name): - """Convenience accessor to obtain an XCBuildConfiguration by name.""" - for configuration in self._properties["buildConfigurations"]: - if configuration._properties["name"] == name: - return configuration - - raise KeyError(name) - - def DefaultConfiguration(self): - """Convenience accessor to obtain the default XCBuildConfiguration.""" - return self.ConfigurationNamed(self._properties["defaultConfigurationName"]) - - def HasBuildSetting(self, key): - """Determines the state of a build setting in all XCBuildConfiguration - child objects. - - If all child objects have key in their build settings, and the value is the - same in all child objects, returns 1. - - If no child objects have the key in their build settings, returns 0. - - If some, but not all, child objects have the key in their build settings, - or if any children have different values for the key, returns -1. - """ - - has = None - value = None - for configuration in self._properties["buildConfigurations"]: - configuration_has = configuration.HasBuildSetting(key) - if has is None: - has = configuration_has - elif has != configuration_has: - return -1 - - if configuration_has: - configuration_value = configuration.GetBuildSetting(key) - if value is None: - value = configuration_value - elif value != configuration_value: - return -1 - - if not has: - return 0 - - return 1 - - def GetBuildSetting(self, key): - """Gets the build setting for key. - - All child XCConfiguration objects must have the same value set for the - setting, or a ValueError will be raised. - """ - - # TODO(mark): This is wrong for build settings that are lists. The list - # contents should be compared (and a list copy returned?) - - value = None - for configuration in self._properties["buildConfigurations"]: - configuration_value = configuration.GetBuildSetting(key) - if value is None: - value = configuration_value - else: - if value != configuration_value: - raise ValueError("Variant values for " + key) - - return value - - def SetBuildSetting(self, key, value): - """Sets the build setting for key to value in all child - XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.SetBuildSetting(key, value) - - def AppendBuildSetting(self, key, value): - """Appends value to the build setting for key, which is treated as a list, - in all child XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.AppendBuildSetting(key, value) - - def DelBuildSetting(self, key): - """Deletes the build setting key from all child XCBuildConfiguration - objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.DelBuildSetting(key) - - def SetBaseConfiguration(self, value): - """Sets the build configuration in all child XCBuildConfiguration objects. - """ - - for configuration in self._properties["buildConfigurations"]: - configuration.SetBaseConfiguration(value) - - -class PBXBuildFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "fileRef": [0, XCFileLikeElement, 0, 1], - "settings": [0, str, 0, 0], # hack, it's a dict - } - ) - - # Weird output rules for PBXBuildFile. - _should_print_single_line = True - _encode_transforms = XCObject._alternate_encode_transforms - - def Name(self): - # Example: "main.cc in Sources" - return self._properties["fileRef"].Name() + " in " + self.parent.Name() - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # It is not sufficient to just rely on Name() to get the - # XCFileLikeElement's name, because that is not a complete pathname. - # PathHashables returns hashables unique enough that no two - # PBXBuildFiles should wind up with the same set of hashables, unless - # someone adds the same file multiple times to the same target. That - # would be considered invalid anyway. - hashables.extend(self._properties["fileRef"].PathHashables()) - - return hashables - - -class XCBuildPhase(XCObject): - """Abstract base for build phase classes. Not represented in a project - file. - - Attributes: - _files_by_path: A dict mapping each path of a child in the files list by - path (keys) to the corresponding PBXBuildFile children (values). - _files_by_xcfilelikeelement: A dict mapping each XCFileLikeElement (keys) - to the corresponding PBXBuildFile children (values). - """ - - # TODO(mark): Some build phase types, like PBXShellScriptBuildPhase, don't - # actually have a "files" list. XCBuildPhase should not have "files" but - # another abstract subclass of it should provide this, and concrete build - # phase types that do have "files" lists should be derived from that new - # abstract subclass. XCBuildPhase should only provide buildActionMask and - # runOnlyForDeploymentPostprocessing, and not files or the various - # file-related methods and attributes. - - _schema = XCObject._schema.copy() - _schema.update( - { - "buildActionMask": [0, int, 0, 1, 0x7FFFFFFF], - "files": [1, PBXBuildFile, 1, 1, []], - "runOnlyForDeploymentPostprocessing": [0, int, 0, 1, 0], - } - ) - - def __init__(self, properties=None, id=None, parent=None): - # super - XCObject.__init__(self, properties, id, parent) - - self._files_by_path = {} - self._files_by_xcfilelikeelement = {} - for pbxbuildfile in self._properties.get("files", []): - self._AddBuildFileToDicts(pbxbuildfile) - - def FileGroup(self, path): - # Subclasses must override this by returning a two-element tuple. The - # first item in the tuple should be the PBXGroup to which "path" should be - # added, either as a child or deeper descendant. The second item should - # be a boolean indicating whether files should be added into hierarchical - # groups or one single flat group. - raise NotImplementedError(self.__class__.__name__ + " must implement FileGroup") - - def _AddPathToDict(self, pbxbuildfile, path): - """Adds path to the dict tracking paths belonging to this build phase. - - If the path is already a member of this build phase, raises an exception. - """ - - if path in self._files_by_path: - raise ValueError("Found multiple build files with path " + path) - self._files_by_path[path] = pbxbuildfile - - def _AddBuildFileToDicts(self, pbxbuildfile, path=None): - """Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. - - If path is specified, then it is the path that is being added to the - phase, and pbxbuildfile must contain either a PBXFileReference directly - referencing that path, or it must contain a PBXVariantGroup that itself - contains a PBXFileReference referencing the path. - - If path is not specified, either the PBXFileReference's path or the paths - of all children of the PBXVariantGroup are taken as being added to the - phase. - - If the path is already present in the phase, raises an exception. - - If the PBXFileReference or PBXVariantGroup referenced by pbxbuildfile - are already present in the phase, referenced by a different PBXBuildFile - object, raises an exception. This does not raise an exception when - a PBXFileReference or PBXVariantGroup reappear and are referenced by the - same PBXBuildFile that has already introduced them, because in the case - of PBXVariantGroup objects, they may correspond to multiple paths that are - not all added simultaneously. When this situation occurs, the path needs - to be added to _files_by_path, but nothing needs to change in - _files_by_xcfilelikeelement, and the caller should have avoided adding - the PBXBuildFile if it is already present in the list of children. - """ - - xcfilelikeelement = pbxbuildfile._properties["fileRef"] - - paths = [] - if path is not None: - # It's best when the caller provides the path. - if isinstance(xcfilelikeelement, PBXVariantGroup): - paths.append(path) - else: - # If the caller didn't provide a path, there can be either multiple - # paths (PBXVariantGroup) or one. - if isinstance(xcfilelikeelement, PBXVariantGroup): - for variant in xcfilelikeelement._properties["children"]: - paths.append(variant.FullPath()) - else: - paths.append(xcfilelikeelement.FullPath()) - - # Add the paths first, because if something's going to raise, the - # messages provided by _AddPathToDict are more useful owing to its - # having access to a real pathname and not just an object's Name(). - for a_path in paths: - self._AddPathToDict(pbxbuildfile, a_path) - - # If another PBXBuildFile references this XCFileLikeElement, there's a - # problem. - if ( - xcfilelikeelement in self._files_by_xcfilelikeelement - and self._files_by_xcfilelikeelement[xcfilelikeelement] != pbxbuildfile - ): - raise ValueError( - "Found multiple build files for " + xcfilelikeelement.Name() - ) - self._files_by_xcfilelikeelement[xcfilelikeelement] = pbxbuildfile - - def AppendBuildFile(self, pbxbuildfile, path=None): - # Callers should use this instead of calling - # AppendProperty('files', pbxbuildfile) directly because this function - # maintains the object's dicts. Better yet, callers can just call AddFile - # with a pathname and not worry about building their own PBXBuildFile - # objects. - self.AppendProperty("files", pbxbuildfile) - self._AddBuildFileToDicts(pbxbuildfile, path) - - def AddFile(self, path, settings=None): - (file_group, hierarchical) = self.FileGroup(path) - file_ref = file_group.AddOrGetFileByPath(path, hierarchical) - - if file_ref in self._files_by_xcfilelikeelement and isinstance( - file_ref, PBXVariantGroup - ): - # There's already a PBXBuildFile in this phase corresponding to the - # PBXVariantGroup. path just provides a new variant that belongs to - # the group. Add the path to the dict. - pbxbuildfile = self._files_by_xcfilelikeelement[file_ref] - self._AddBuildFileToDicts(pbxbuildfile, path) - else: - # Add a new PBXBuildFile to get file_ref into the phase. - if settings is None: - pbxbuildfile = PBXBuildFile({"fileRef": file_ref}) - else: - pbxbuildfile = PBXBuildFile({"fileRef": file_ref, "settings": settings}) - self.AppendBuildFile(pbxbuildfile, path) - - -class PBXHeadersBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Headers" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXResourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Resources" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXSourcesBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Sources" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - -class PBXFrameworksBuildPhase(XCBuildPhase): - # No additions to the schema relative to XCBuildPhase. - - def Name(self): - return "Frameworks" - - def FileGroup(self, path): - (root, ext) = posixpath.splitext(path) - if ext != "": - ext = ext[1:].lower() - if ext == "o": - # .o files are added to Xcode Frameworks phases, but conceptually aren't - # frameworks, they're more like sources or intermediates. Redirect them - # to show up in one of those other groups. - return self.PBXProjectAncestor().RootGroupForPath(path) - else: - return (self.PBXProjectAncestor().FrameworksGroup(), False) - - -class PBXShellScriptBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update( - { - "inputPaths": [1, str, 0, 1, []], - "name": [0, str, 0, 0], - "outputPaths": [1, str, 0, 1, []], - "shellPath": [0, str, 0, 1, "/bin/sh"], - "shellScript": [0, str, 0, 1], - "showEnvVarsInLog": [0, int, 0, 0], - } - ) - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - - return "ShellScript" - - -class PBXCopyFilesBuildPhase(XCBuildPhase): - _schema = XCBuildPhase._schema.copy() - _schema.update( - { - "dstPath": [0, str, 0, 1], - "dstSubfolderSpec": [0, int, 0, 1], - "name": [0, str, 0, 0], - } - ) - - # path_tree_re matches "$(DIR)/path", "$(DIR)/$(DIR2)/path" or just "$(DIR)". - # Match group 1 is "DIR", group 3 is "path" or "$(DIR2") or "$(DIR2)/path" - # or None. If group 3 is "path", group 4 will be None otherwise group 4 is - # "DIR2" and group 6 is "path". - path_tree_re = re.compile(r"^\$\((.*?)\)(/(\$\((.*?)\)(/(.*)|)|(.*)|)|)$") - - # path_tree_{first,second}_to_subfolder map names of Xcode variables to the - # associated dstSubfolderSpec property value used in a PBXCopyFilesBuildPhase - # object. - path_tree_first_to_subfolder = { - # Types that can be chosen via the Xcode UI. - "BUILT_PRODUCTS_DIR": 16, # Products Directory - "BUILT_FRAMEWORKS_DIR": 10, # Not an official Xcode macro. - # Existed before support for the - # names below was added. Maps to - # "Frameworks". - } - - path_tree_second_to_subfolder = { - "WRAPPER_NAME": 1, # Wrapper - # Although Xcode's friendly name is "Executables", the destination - # is demonstrably the value of the build setting - # EXECUTABLE_FOLDER_PATH not EXECUTABLES_FOLDER_PATH. - "EXECUTABLE_FOLDER_PATH": 6, # Executables. - "UNLOCALIZED_RESOURCES_FOLDER_PATH": 7, # Resources - "JAVA_FOLDER_PATH": 15, # Java Resources - "FRAMEWORKS_FOLDER_PATH": 10, # Frameworks - "SHARED_FRAMEWORKS_FOLDER_PATH": 11, # Shared Frameworks - "SHARED_SUPPORT_FOLDER_PATH": 12, # Shared Support - "PLUGINS_FOLDER_PATH": 13, # PlugIns - # For XPC Services, Xcode sets both dstPath and dstSubfolderSpec. - # Note that it re-uses the BUILT_PRODUCTS_DIR value for - # dstSubfolderSpec. dstPath is set below. - "XPCSERVICES_FOLDER_PATH": 16, # XPC Services. - } - - def Name(self): - if "name" in self._properties: - return self._properties["name"] - - return "CopyFiles" - - def FileGroup(self, path): - return self.PBXProjectAncestor().RootGroupForPath(path) - - def SetDestination(self, path): - """Set the dstSubfolderSpec and dstPath properties from path. - - path may be specified in the same notation used for XCHierarchicalElements, - specifically, "$(DIR)/path". - """ - - path_tree_match = self.path_tree_re.search(path) - if path_tree_match: - path_tree = path_tree_match.group(1) - if path_tree in self.path_tree_first_to_subfolder: - subfolder = self.path_tree_first_to_subfolder[path_tree] - relative_path = path_tree_match.group(3) - if relative_path is None: - relative_path = "" - - if subfolder == 16 and path_tree_match.group(4) is not None: - # BUILT_PRODUCTS_DIR (16) is the first element in a path whose - # second element is possibly one of the variable names in - # path_tree_second_to_subfolder. Xcode sets the values of all these - # variables to relative paths so .gyp files must prefix them with - # BUILT_PRODUCTS_DIR, e.g. - # $(BUILT_PRODUCTS_DIR)/$(PLUGINS_FOLDER_PATH). Then - # xcode_emulation.py can export these variables with the same values - # as Xcode yet make & ninja files can determine the absolute path - # to the target. Xcode uses the dstSubfolderSpec value set here - # to determine the full path. - # - # An alternative of xcode_emulation.py setting the values to - # absolute paths when exporting these variables has been - # ruled out because then the values would be different - # depending on the build tool. - # - # Another alternative is to invent new names for the variables used - # to match to the subfolder indices in the second table. .gyp files - # then will not need to prepend $(BUILT_PRODUCTS_DIR) because - # xcode_emulation.py can set the values of those variables to - # the absolute paths when exporting. This is possibly the thinking - # behind BUILT_FRAMEWORKS_DIR which is used in exactly this manner. - # - # Requiring prepending BUILT_PRODUCTS_DIR has been chosen because - # this same way could be used to specify destinations in .gyp files - # that pre-date this addition to GYP. However they would only work - # with the Xcode generator. - # The previous version of xcode_emulation.py - # does not export these variables. Such files will get the benefit - # of the Xcode UI showing the proper destination name simply by - # regenerating the projects with this version of GYP. - path_tree = path_tree_match.group(4) - relative_path = path_tree_match.group(6) - separator = "/" - - if path_tree in self.path_tree_second_to_subfolder: - subfolder = self.path_tree_second_to_subfolder[path_tree] - if relative_path is None: - relative_path = "" - separator = "" - if path_tree == "XPCSERVICES_FOLDER_PATH": - relative_path = ( - "$(CONTENTS_FOLDER_PATH)/XPCServices" - + separator - + relative_path - ) - else: - # subfolder = 16 from above - # The second element of the path is an unrecognized variable. - # Include it and any remaining elements in relative_path. - relative_path = path_tree_match.group(3) - - else: - # The path starts with an unrecognized Xcode variable - # name like $(SRCROOT). Xcode will still handle this - # as an "absolute path" that starts with the variable. - subfolder = 0 - relative_path = path - elif path.startswith("/"): - # Special case. Absolute paths are in dstSubfolderSpec 0. - subfolder = 0 - relative_path = path[1:] - else: - raise ValueError( - f"Can't use path {path} in a {self.__class__.__name__}" - ) - - self._properties["dstPath"] = relative_path - self._properties["dstSubfolderSpec"] = subfolder - - -class PBXBuildRule(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "compilerSpec": [0, str, 0, 1], - "filePatterns": [0, str, 0, 0], - "fileType": [0, str, 0, 1], - "isEditable": [0, int, 0, 1, 1], - "outputFiles": [1, str, 0, 1, []], - "script": [0, str, 0, 0], - } - ) - - def Name(self): - # Not very inspired, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.append(self._properties["fileType"]) - if "filePatterns" in self._properties: - hashables.append(self._properties["filePatterns"]) - return hashables - - -class PBXContainerItemProxy(XCObject): - # When referencing an item in this project file, containerPortal is the - # PBXProject root object of this project file. When referencing an item in - # another project file, containerPortal is a PBXFileReference identifying - # the other project file. - # - # When serving as a proxy to an XCTarget (in this project file or another), - # proxyType is 1. When serving as a proxy to a PBXFileReference (in another - # project file), proxyType is 2. Type 2 is used for references to the - # producs of the other project file's targets. - # - # Xcode is weird about remoteGlobalIDString. Usually, it's printed without - # a comment, indicating that it's tracked internally simply as a string, but - # sometimes it's printed with a comment (usually when the object is initially - # created), indicating that it's tracked as a project file object at least - # sometimes. This module always tracks it as an object, but contains a hack - # to prevent it from printing the comment in the project file output. See - # _XCKVPrint. - _schema = XCObject._schema.copy() - _schema.update( - { - "containerPortal": [0, XCContainerPortal, 0, 1], - "proxyType": [0, int, 0, 1], - "remoteGlobalIDString": [0, XCRemoteObject, 0, 1], - "remoteInfo": [0, str, 0, 1], - } - ) - - def __repr__(self): - props = self._properties - name = "{}.gyp:{}".format(props["containerPortal"].Name(), props["remoteInfo"]) - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties["containerPortal"].Hashables()) - hashables.extend(self._properties["remoteGlobalIDString"].Hashables()) - return hashables - - -class PBXTargetDependency(XCObject): - # The "target" property accepts an XCTarget object, and obviously not - # NoneType. But XCTarget is defined below, so it can't be put into the - # schema yet. The definition of PBXTargetDependency can't be moved below - # XCTarget because XCTarget's own schema references PBXTargetDependency. - # Python doesn't deal well with this circular relationship, and doesn't have - # a real way to do forward declarations. To work around, the type of - # the "target" property is reset below, after XCTarget is defined. - # - # At least one of "name" and "target" is required. - _schema = XCObject._schema.copy() - _schema.update( - { - "name": [0, str, 0, 0], - "target": [0, None.__class__, 0, 0], - "targetProxy": [0, PBXContainerItemProxy, 1, 1], - } - ) - - def __repr__(self): - name = self._properties.get("name") or self._properties["target"].Name() - return f"<{self.__class__.__name__} {name!r} at 0x{id(self):x}>" - - def Name(self): - # Admittedly not the best name, but it's what Xcode uses. - return self.__class__.__name__ - - def Hashables(self): - # super - hashables = XCObject.Hashables(self) - - # Use the hashables of the weak objects that this object refers to. - hashables.extend(self._properties["targetProxy"].Hashables()) - return hashables - - -class PBXReferenceProxy(XCFileLikeElement): - _schema = XCFileLikeElement._schema.copy() - _schema.update( - { - "fileType": [0, str, 0, 1], - "path": [0, str, 0, 1], - "remoteRef": [0, PBXContainerItemProxy, 1, 1], - } - ) - - -class XCTarget(XCRemoteObject): - # An XCTarget is really just an XCObject, the XCRemoteObject thing is just - # to allow PBXProject to be used in the remoteGlobalIDString property of - # PBXContainerItemProxy. - # - # Setting a "name" property at instantiation may also affect "productName", - # which may in turn affect the "PRODUCT_NAME" build setting in children of - # "buildConfigurationList". See __init__ below. - _schema = XCRemoteObject._schema.copy() - _schema.update( - { - "buildConfigurationList": [ - 0, - XCConfigurationList, - 1, - 1, - XCConfigurationList(), - ], - "buildPhases": [1, XCBuildPhase, 1, 1, []], - "dependencies": [1, PBXTargetDependency, 1, 1, []], - "name": [0, str, 0, 1], - "productName": [0, str, 0, 1], - } - ) - - def __init__( - self, - properties=None, - id=None, - parent=None, - force_outdir=None, - force_prefix=None, - force_extension=None, - ): - # super - XCRemoteObject.__init__(self, properties, id, parent) - - # Set up additional defaults not expressed in the schema. If a "name" - # property was supplied, set "productName" if it is not present. Also set - # the "PRODUCT_NAME" build setting in each configuration, but only if - # the setting is not present in any build configuration. - if "name" in self._properties and "productName" not in self._properties: - self.SetProperty("productName", self._properties["name"]) - - if "productName" in self._properties: - if "buildConfigurationList" in self._properties: - configs = self._properties["buildConfigurationList"] - if configs.HasBuildSetting("PRODUCT_NAME") == 0: - configs.SetBuildSetting( - "PRODUCT_NAME", self._properties["productName"] - ) - - def AddDependency(self, other): - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject == other_pbxproject: - # Add a dependency to another target in the same project file. - container = PBXContainerItemProxy( - { - "containerPortal": pbxproject, - "proxyType": 1, - "remoteGlobalIDString": other, - "remoteInfo": other.Name(), - } - ) - dependency = PBXTargetDependency( - {"target": other, "targetProxy": container} - ) - self.AppendProperty("dependencies", dependency) - else: - # Add a dependency to a target in a different project file. - other_project_ref = pbxproject.AddOrGetProjectReference(other_pbxproject)[1] - container = PBXContainerItemProxy( - { - "containerPortal": other_project_ref, - "proxyType": 1, - "remoteGlobalIDString": other, - "remoteInfo": other.Name(), - } - ) - dependency = PBXTargetDependency( - {"name": other.Name(), "targetProxy": container} - ) - self.AppendProperty("dependencies", dependency) - - # Proxy all of these through to the build configuration list. - - def ConfigurationNamed(self, name): - return self._properties["buildConfigurationList"].ConfigurationNamed(name) - - def DefaultConfiguration(self): - return self._properties["buildConfigurationList"].DefaultConfiguration() - - def HasBuildSetting(self, key): - return self._properties["buildConfigurationList"].HasBuildSetting(key) - - def GetBuildSetting(self, key): - return self._properties["buildConfigurationList"].GetBuildSetting(key) - - def SetBuildSetting(self, key, value): - return self._properties["buildConfigurationList"].SetBuildSetting(key, value) - - def AppendBuildSetting(self, key, value): - return self._properties["buildConfigurationList"].AppendBuildSetting(key, value) - - def DelBuildSetting(self, key): - return self._properties["buildConfigurationList"].DelBuildSetting(key) - - -# Redefine the type of the "target" property. See PBXTargetDependency._schema -# above. -PBXTargetDependency._schema["target"][1] = XCTarget - - -class PBXNativeTarget(XCTarget): - # buildPhases is overridden in the schema to be able to set defaults. - # - # NOTE: Contrary to most objects, it is advisable to set parent when - # constructing PBXNativeTarget. A parent of an XCTarget must be a PBXProject - # object. A parent reference is required for a PBXNativeTarget during - # construction to be able to set up the target defaults for productReference, - # because a PBXBuildFile object must be created for the target and it must - # be added to the PBXProject's mainGroup hierarchy. - _schema = XCTarget._schema.copy() - _schema.update( - { - "buildPhases": [ - 1, - XCBuildPhase, - 1, - 1, - [PBXSourcesBuildPhase(), PBXFrameworksBuildPhase()], - ], - "buildRules": [1, PBXBuildRule, 1, 1, []], - "productReference": [0, PBXFileReference, 0, 1], - "productType": [0, str, 0, 1], - } - ) - - # Mapping from Xcode product-types to settings. The settings are: - # filetype : used for explicitFileType in the project file - # prefix : the prefix for the file name - # suffix : the suffix for the file name - _product_filetypes = { - "com.apple.product-type.application": ["wrapper.application", "", ".app"], - "com.apple.product-type.application.watchapp": [ - "wrapper.application", - "", - ".app", - ], - "com.apple.product-type.watchkit-extension": [ - "wrapper.app-extension", - "", - ".appex", - ], - "com.apple.product-type.app-extension": ["wrapper.app-extension", "", ".appex"], - "com.apple.product-type.bundle": ["wrapper.cfbundle", "", ".bundle"], - "com.apple.product-type.framework": ["wrapper.framework", "", ".framework"], - "com.apple.product-type.library.dynamic": [ - "compiled.mach-o.dylib", - "lib", - ".dylib", - ], - "com.apple.product-type.library.static": ["archive.ar", "lib", ".a"], - "com.apple.product-type.tool": ["compiled.mach-o.executable", "", ""], - "com.apple.product-type.bundle.unit-test": ["wrapper.cfbundle", "", ".xctest"], - "com.apple.product-type.bundle.ui-testing": ["wrapper.cfbundle", "", ".xctest"], - "com.googlecode.gyp.xcode.bundle": ["compiled.mach-o.dylib", "", ".so"], - "com.apple.product-type.kernel-extension": ["wrapper.kext", "", ".kext"], - } - - def __init__( - self, - properties=None, - id=None, - parent=None, - force_outdir=None, - force_prefix=None, - force_extension=None, - ): - # super - XCTarget.__init__(self, properties, id, parent) - - if ( - "productName" in self._properties - and "productType" in self._properties - and "productReference" not in self._properties - and self._properties["productType"] in self._product_filetypes - ): - products_group = None - pbxproject = self.PBXProjectAncestor() - if pbxproject is not None: - products_group = pbxproject.ProductsGroup() - - if products_group is not None: - (filetype, prefix, suffix) = self._product_filetypes[ - self._properties["productType"] - ] - # Xcode does not have a distinct type for loadable modules that are - # pure BSD targets (not in a bundle wrapper). GYP allows such modules - # to be specified by setting a target type to loadable_module without - # having mac_bundle set. These are mapped to the pseudo-product type - # com.googlecode.gyp.xcode.bundle. - # - # By picking up this special type and converting it to a dynamic - # library (com.apple.product-type.library.dynamic) with fix-ups, - # single-file loadable modules can be produced. - # - # MACH_O_TYPE is changed to mh_bundle to produce the proper file type - # (as opposed to mh_dylib). In order for linking to succeed, - # DYLIB_CURRENT_VERSION and DYLIB_COMPATIBILITY_VERSION must be - # cleared. They are meaningless for type mh_bundle. - # - # Finally, the .so extension is forcibly applied over the default - # (.dylib), unless another forced extension is already selected. - # .dylib is plainly wrong, and .bundle is used by loadable_modules in - # bundle wrappers (com.apple.product-type.bundle). .so seems an odd - # choice because it's used as the extension on many other systems that - # don't distinguish between linkable shared libraries and non-linkable - # loadable modules, but there's precedent: Python loadable modules on - # Mac OS X use an .so extension. - if self._properties["productType"] == "com.googlecode.gyp.xcode.bundle": - self._properties[ - "productType" - ] = "com.apple.product-type.library.dynamic" - self.SetBuildSetting("MACH_O_TYPE", "mh_bundle") - self.SetBuildSetting("DYLIB_CURRENT_VERSION", "") - self.SetBuildSetting("DYLIB_COMPATIBILITY_VERSION", "") - if force_extension is None: - force_extension = suffix[1:] - - if ( - self._properties["productType"] in { - "com.apple.product-type-bundle.unit.test", - "com.apple.product-type-bundle.ui-testing" - } - ) and force_extension is None: - force_extension = suffix[1:] - - if force_extension is not None: - # If it's a wrapper (bundle), set WRAPPER_EXTENSION. - # Extension override. - suffix = "." + force_extension - if filetype.startswith("wrapper."): - self.SetBuildSetting("WRAPPER_EXTENSION", force_extension) - else: - self.SetBuildSetting("EXECUTABLE_EXTENSION", force_extension) - - if filetype.startswith("compiled.mach-o.executable"): - product_name = self._properties["productName"] - product_name += suffix - suffix = "" - self.SetProperty("productName", product_name) - self.SetBuildSetting("PRODUCT_NAME", product_name) - - # Xcode handles most prefixes based on the target type, however there - # are exceptions. If a "BSD Dynamic Library" target is added in the - # Xcode UI, Xcode sets EXECUTABLE_PREFIX. This check duplicates that - # behavior. - if force_prefix is not None: - prefix = force_prefix - if filetype.startswith("wrapper."): - self.SetBuildSetting("WRAPPER_PREFIX", prefix) - else: - self.SetBuildSetting("EXECUTABLE_PREFIX", prefix) - - if force_outdir is not None: - self.SetBuildSetting("TARGET_BUILD_DIR", force_outdir) - - # TODO(tvl): Remove the below hack. - # http://code.google.com/p/gyp/issues/detail?id=122 - - # Some targets include the prefix in the target_name. These targets - # really should just add a product_name setting that doesn't include - # the prefix. For example: - # target_name = 'libevent', product_name = 'event' - # This check cleans up for them. - product_name = self._properties["productName"] - prefix_len = len(prefix) - if prefix_len and (product_name[:prefix_len] == prefix): - product_name = product_name[prefix_len:] - self.SetProperty("productName", product_name) - self.SetBuildSetting("PRODUCT_NAME", product_name) - - ref_props = { - "explicitFileType": filetype, - "includeInIndex": 0, - "path": prefix + product_name + suffix, - "sourceTree": "BUILT_PRODUCTS_DIR", - } - file_ref = PBXFileReference(ref_props) - products_group.AppendChild(file_ref) - self.SetProperty("productReference", file_ref) - - def GetBuildPhaseByType(self, type): - if "buildPhases" not in self._properties: - return None - - the_phase = None - for phase in self._properties["buildPhases"]: - if isinstance(phase, type): - # Some phases may be present in multiples in a well-formed project file, - # but phases like PBXSourcesBuildPhase may only be present singly, and - # this function is intended as an aid to GetBuildPhaseByType. Loop - # over the entire list of phases and assert if more than one of the - # desired type is found. - assert the_phase is None - the_phase = phase - - return the_phase - - def HeadersPhase(self): - headers_phase = self.GetBuildPhaseByType(PBXHeadersBuildPhase) - if headers_phase is None: - headers_phase = PBXHeadersBuildPhase() - - # The headers phase should come before the resources, sources, and - # frameworks phases, if any. - insert_at = len(self._properties["buildPhases"]) - for index, phase in enumerate(self._properties["buildPhases"]): - if isinstance( - phase, - ( - PBXResourcesBuildPhase, - PBXSourcesBuildPhase, - PBXFrameworksBuildPhase, - ), - ): - insert_at = index - break - - self._properties["buildPhases"].insert(insert_at, headers_phase) - headers_phase.parent = self - - return headers_phase - - def ResourcesPhase(self): - resources_phase = self.GetBuildPhaseByType(PBXResourcesBuildPhase) - if resources_phase is None: - resources_phase = PBXResourcesBuildPhase() - - # The resources phase should come before the sources and frameworks - # phases, if any. - insert_at = len(self._properties["buildPhases"]) - for index, phase in enumerate(self._properties["buildPhases"]): - if isinstance(phase, (PBXSourcesBuildPhase, PBXFrameworksBuildPhase)): - insert_at = index - break - - self._properties["buildPhases"].insert(insert_at, resources_phase) - resources_phase.parent = self - - return resources_phase - - def SourcesPhase(self): - sources_phase = self.GetBuildPhaseByType(PBXSourcesBuildPhase) - if sources_phase is None: - sources_phase = PBXSourcesBuildPhase() - self.AppendProperty("buildPhases", sources_phase) - - return sources_phase - - def FrameworksPhase(self): - frameworks_phase = self.GetBuildPhaseByType(PBXFrameworksBuildPhase) - if frameworks_phase is None: - frameworks_phase = PBXFrameworksBuildPhase() - self.AppendProperty("buildPhases", frameworks_phase) - - return frameworks_phase - - def AddDependency(self, other): - # super - XCTarget.AddDependency(self, other) - - static_library_type = "com.apple.product-type.library.static" - shared_library_type = "com.apple.product-type.library.dynamic" - framework_type = "com.apple.product-type.framework" - if ( - isinstance(other, PBXNativeTarget) - and "productType" in self._properties - and self._properties["productType"] != static_library_type - and "productType" in other._properties - and ( - other._properties["productType"] == static_library_type - or ( - ( - other._properties["productType"] in { - shared_library_type, - framework_type - } - ) - and ( - (not other.HasBuildSetting("MACH_O_TYPE")) - or other.GetBuildSetting("MACH_O_TYPE") != "mh_bundle" - ) - ) - ) - ): - - file_ref = other.GetProperty("productReference") - - pbxproject = self.PBXProjectAncestor() - other_pbxproject = other.PBXProjectAncestor() - if pbxproject != other_pbxproject: - other_project_product_group = pbxproject.AddOrGetProjectReference( - other_pbxproject - )[0] - file_ref = other_project_product_group.GetChildByRemoteObject(file_ref) - - self.FrameworksPhase().AppendProperty( - "files", PBXBuildFile({"fileRef": file_ref}) - ) - - -class PBXAggregateTarget(XCTarget): - pass - - -class PBXProject(XCContainerPortal): - # A PBXProject is really just an XCObject, the XCContainerPortal thing is - # just to allow PBXProject to be used in the containerPortal property of - # PBXContainerItemProxy. - """ - - Attributes: - path: "sample.xcodeproj". TODO(mark) Document me! - _other_pbxprojects: A dictionary, keyed by other PBXProject objects. Each - value is a reference to the dict in the - projectReferences list associated with the keyed - PBXProject. - """ - - _schema = XCContainerPortal._schema.copy() - _schema.update( - { - "attributes": [0, dict, 0, 0], - "buildConfigurationList": [ - 0, - XCConfigurationList, - 1, - 1, - XCConfigurationList(), - ], - "compatibilityVersion": [0, str, 0, 1, "Xcode 3.2"], - "hasScannedForEncodings": [0, int, 0, 1, 1], - "mainGroup": [0, PBXGroup, 1, 1, PBXGroup()], - "projectDirPath": [0, str, 0, 1, ""], - "projectReferences": [1, dict, 0, 0], - "projectRoot": [0, str, 0, 1, ""], - "targets": [1, XCTarget, 1, 1, []], - } - ) - - def __init__(self, properties=None, id=None, parent=None, path=None): - self.path = path - self._other_pbxprojects = {} - # super - XCContainerPortal.__init__(self, properties, id, parent) - - def Name(self): - name = self.path - if name[-10:] == ".xcodeproj": - name = name[:-10] - return posixpath.basename(name) - - def Path(self): - return self.path - - def Comment(self): - return "Project object" - - def Children(self): - # super - children = XCContainerPortal.Children(self) - - # Add children that the schema doesn't know about. Maybe there's a more - # elegant way around this, but this is the only case where we need to own - # objects in a dictionary (that is itself in a list), and three lines for - # a one-off isn't that big a deal. - if "projectReferences" in self._properties: - for reference in self._properties["projectReferences"]: - children.append(reference["ProductGroup"]) - - return children - - def PBXProjectAncestor(self): - return self - - def _GroupByName(self, name): - if "mainGroup" not in self._properties: - self.SetProperty("mainGroup", PBXGroup()) - - main_group = self._properties["mainGroup"] - group = main_group.GetChildByName(name) - if group is None: - group = PBXGroup({"name": name}) - main_group.AppendChild(group) - - return group - - # SourceGroup and ProductsGroup are created by default in Xcode's own - # templates. - def SourceGroup(self): - return self._GroupByName("Source") - - def ProductsGroup(self): - return self._GroupByName("Products") - - # IntermediatesGroup is used to collect source-like files that are generated - # by rules or script phases and are placed in intermediate directories such - # as DerivedSources. - def IntermediatesGroup(self): - return self._GroupByName("Intermediates") - - # FrameworksGroup and ProjectsGroup are top-level groups used to collect - # frameworks and projects. - def FrameworksGroup(self): - return self._GroupByName("Frameworks") - - def ProjectsGroup(self): - return self._GroupByName("Projects") - - def RootGroupForPath(self, path): - """Returns a PBXGroup child of this object to which path should be added. - - This method is intended to choose between SourceGroup and - IntermediatesGroup on the basis of whether path is present in a source - directory or an intermediates directory. For the purposes of this - determination, any path located within a derived file directory such as - PROJECT_DERIVED_FILE_DIR is treated as being in an intermediates - directory. - - The returned value is a two-element tuple. The first element is the - PBXGroup, and the second element specifies whether that group should be - organized hierarchically (True) or as a single flat list (False). - """ - - # TODO(mark): make this a class variable and bind to self on call? - # Also, this list is nowhere near exhaustive. - # INTERMEDIATE_DIR and SHARED_INTERMEDIATE_DIR are used by - # gyp.generator.xcode. There should probably be some way for that module - # to push the names in, rather than having to hard-code them here. - source_tree_groups = { - "DERIVED_FILE_DIR": (self.IntermediatesGroup, True), - "INTERMEDIATE_DIR": (self.IntermediatesGroup, True), - "PROJECT_DERIVED_FILE_DIR": (self.IntermediatesGroup, True), - "SHARED_INTERMEDIATE_DIR": (self.IntermediatesGroup, True), - } - - (source_tree, path) = SourceTreeAndPathFromPath(path) - if source_tree is not None and source_tree in source_tree_groups: - (group_func, hierarchical) = source_tree_groups[source_tree] - group = group_func() - return (group, hierarchical) - - # TODO(mark): make additional choices based on file extension. - - return (self.SourceGroup(), True) - - def AddOrGetFileInRootGroup(self, path): - """Returns a PBXFileReference corresponding to path in the correct group - according to RootGroupForPath's heuristics. - - If an existing PBXFileReference for path exists, it will be returned. - Otherwise, one will be created and returned. - """ - - (group, hierarchical) = self.RootGroupForPath(path) - return group.AddOrGetFileByPath(path, hierarchical) - - def RootGroupsTakeOverOnlyChildren(self, recurse=False): - """Calls TakeOverOnlyChild for all groups in the main group.""" - - for group in self._properties["mainGroup"]._properties["children"]: - if isinstance(group, PBXGroup): - group.TakeOverOnlyChild(recurse) - - def SortGroups(self): - # Sort the children of the mainGroup (like "Source" and "Products") - # according to their defined order. - self._properties["mainGroup"]._properties["children"] = sorted( - self._properties["mainGroup"]._properties["children"], - key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)), - ) - - # Sort everything else by putting group before files, and going - # alphabetically by name within sections of groups and files. SortGroup - # is recursive. - for group in self._properties["mainGroup"]._properties["children"]: - if not isinstance(group, PBXGroup): - continue - - if group.Name() == "Products": - # The Products group is a special case. Instead of sorting - # alphabetically, sort things in the order of the targets that - # produce the products. To do this, just build up a new list of - # products based on the targets. - products = [] - for target in self._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - product = target._properties["productReference"] - # Make sure that the product is already in the products group. - assert product in group._properties["children"] - products.append(product) - - # Make sure that this process doesn't miss anything that was already - # in the products group. - assert len(products) == len(group._properties["children"]) - group._properties["children"] = products - else: - group.SortGroup() - - def AddOrGetProjectReference(self, other_pbxproject): - """Add a reference to another project file (via PBXProject object) to this - one. - - Returns [ProductGroup, ProjectRef]. ProductGroup is a PBXGroup object in - this project file that contains a PBXReferenceProxy object for each - product of each PBXNativeTarget in the other project file. ProjectRef is - a PBXFileReference to the other project file. - - If this project file already references the other project file, the - existing ProductGroup and ProjectRef are returned. The ProductGroup will - still be updated if necessary. - """ - - if "projectReferences" not in self._properties: - self._properties["projectReferences"] = [] - - product_group = None - project_ref = None - - if other_pbxproject not in self._other_pbxprojects: - # This project file isn't yet linked to the other one. Establish the - # link. - product_group = PBXGroup({"name": "Products"}) - - # ProductGroup is strong. - product_group.parent = self - - # There's nothing unique about this PBXGroup, and if left alone, it will - # wind up with the same set of hashables as all other PBXGroup objects - # owned by the projectReferences list. Add the hashables of the - # remote PBXProject that it's related to. - product_group._hashables.extend(other_pbxproject.Hashables()) - - # The other project reports its path as relative to the same directory - # that this project's path is relative to. The other project's path - # is not necessarily already relative to this project. Figure out the - # pathname that this project needs to use to refer to the other one. - this_path = posixpath.dirname(self.Path()) - projectDirPath = self.GetProperty("projectDirPath") - if projectDirPath: - if posixpath.isabs(projectDirPath[0]): - this_path = projectDirPath - else: - this_path = posixpath.join(this_path, projectDirPath) - other_path = gyp.common.RelativePath(other_pbxproject.Path(), this_path) - - # ProjectRef is weak (it's owned by the mainGroup hierarchy). - project_ref = PBXFileReference( - { - "lastKnownFileType": "wrapper.pb-project", - "path": other_path, - "sourceTree": "SOURCE_ROOT", - } - ) - self.ProjectsGroup().AppendChild(project_ref) - - ref_dict = {"ProductGroup": product_group, "ProjectRef": project_ref} - self._other_pbxprojects[other_pbxproject] = ref_dict - self.AppendProperty("projectReferences", ref_dict) - - # Xcode seems to sort this list case-insensitively - self._properties["projectReferences"] = sorted( - self._properties["projectReferences"], - key=lambda x: x["ProjectRef"].Name().lower() - ) - else: - # The link already exists. Pull out the relevnt data. - project_ref_dict = self._other_pbxprojects[other_pbxproject] - product_group = project_ref_dict["ProductGroup"] - project_ref = project_ref_dict["ProjectRef"] - - self._SetUpProductReferences(other_pbxproject, product_group, project_ref) - - inherit_unique_symroot = self._AllSymrootsUnique(other_pbxproject, False) - targets = other_pbxproject.GetProperty("targets") - if all(self._AllSymrootsUnique(t, inherit_unique_symroot) for t in targets): - dir_path = project_ref._properties["path"] - product_group._hashables.extend(dir_path) - - return [product_group, project_ref] - - def _AllSymrootsUnique(self, target, inherit_unique_symroot): - # Returns True if all configurations have a unique 'SYMROOT' attribute. - # The value of inherit_unique_symroot decides, if a configuration is assumed - # to inherit a unique 'SYMROOT' attribute from its parent, if it doesn't - # define an explicit value for 'SYMROOT'. - symroots = self._DefinedSymroots(target) - for s in self._DefinedSymroots(target): - if ( - s is not None - and not self._IsUniqueSymrootForTarget(s) - or s is None - and not inherit_unique_symroot - ): - return False - return True if symroots else inherit_unique_symroot - - def _DefinedSymroots(self, target): - # Returns all values for the 'SYMROOT' attribute defined in all - # configurations for this target. If any configuration doesn't define the - # 'SYMROOT' attribute, None is added to the returned set. If all - # configurations don't define the 'SYMROOT' attribute, an empty set is - # returned. - config_list = target.GetProperty("buildConfigurationList") - symroots = set() - for config in config_list.GetProperty("buildConfigurations"): - setting = config.GetProperty("buildSettings") - if "SYMROOT" in setting: - symroots.add(setting["SYMROOT"]) - else: - symroots.add(None) - if len(symroots) == 1 and None in symroots: - return set() - return symroots - - def _IsUniqueSymrootForTarget(self, symroot): - # This method returns True if all configurations in target contain a - # 'SYMROOT' attribute that is unique for the given target. A value is - # unique, if the Xcode macro '$SRCROOT' appears in it in any form. - uniquifier = ["$SRCROOT", "$(SRCROOT)"] - if any(x in symroot for x in uniquifier): - return True - return False - - def _SetUpProductReferences(self, other_pbxproject, product_group, project_ref): - # TODO(mark): This only adds references to products in other_pbxproject - # when they don't exist in this pbxproject. Perhaps it should also - # remove references from this pbxproject that are no longer present in - # other_pbxproject. Perhaps it should update various properties if they - # change. - for target in other_pbxproject._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - - other_fileref = target._properties["productReference"] - if product_group.GetChildByRemoteObject(other_fileref) is None: - # Xcode sets remoteInfo to the name of the target and not the name - # of its product, despite this proxy being a reference to the product. - container_item = PBXContainerItemProxy( - { - "containerPortal": project_ref, - "proxyType": 2, - "remoteGlobalIDString": other_fileref, - "remoteInfo": target.Name(), - } - ) - # TODO(mark): Does sourceTree get copied straight over from the other - # project? Can the other project ever have lastKnownFileType here - # instead of explicitFileType? (Use it if so?) Can path ever be - # unset? (I don't think so.) Can other_fileref have name set, and - # does it impact the PBXReferenceProxy if so? These are the questions - # that perhaps will be answered one day. - reference_proxy = PBXReferenceProxy( - { - "fileType": other_fileref._properties["explicitFileType"], - "path": other_fileref._properties["path"], - "sourceTree": other_fileref._properties["sourceTree"], - "remoteRef": container_item, - } - ) - - product_group.AppendChild(reference_proxy) - - def SortRemoteProductReferences(self): - # For each remote project file, sort the associated ProductGroup in the - # same order that the targets are sorted in the remote project file. This - # is the sort order used by Xcode. - - def CompareProducts(x, y, remote_products): - # x and y are PBXReferenceProxy objects. Go through their associated - # PBXContainerItem to get the remote PBXFileReference, which will be - # present in the remote_products list. - x_remote = x._properties["remoteRef"]._properties["remoteGlobalIDString"] - y_remote = y._properties["remoteRef"]._properties["remoteGlobalIDString"] - x_index = remote_products.index(x_remote) - y_index = remote_products.index(y_remote) - - # Use the order of each remote PBXFileReference in remote_products to - # determine the sort order. - return cmp(x_index, y_index) - - for other_pbxproject, ref_dict in self._other_pbxprojects.items(): - # Build up a list of products in the remote project file, ordered the - # same as the targets that produce them. - remote_products = [] - for target in other_pbxproject._properties["targets"]: - if not isinstance(target, PBXNativeTarget): - continue - remote_products.append(target._properties["productReference"]) - - # Sort the PBXReferenceProxy children according to the list of remote - # products. - product_group = ref_dict["ProductGroup"] - product_group._properties["children"] = sorted( - product_group._properties["children"], - key=cmp_to_key( - lambda x, y, rp=remote_products: CompareProducts(x, y, rp)), - ) - - -class XCProjectFile(XCObject): - _schema = XCObject._schema.copy() - _schema.update( - { - "archiveVersion": [0, int, 0, 1, 1], - "classes": [0, dict, 0, 1, {}], - "objectVersion": [0, int, 0, 1, 46], - "rootObject": [0, PBXProject, 1, 1], - } - ) - - def ComputeIDs(self, recursive=True, overwrite=True, hash=None): - # Although XCProjectFile is implemented here as an XCObject, it's not a - # proper object in the Xcode sense, and it certainly doesn't have its own - # ID. Pass through an attempt to update IDs to the real root object. - if recursive: - self._properties["rootObject"].ComputeIDs(recursive, overwrite, hash) - - def Print(self, file=sys.stdout): - self.VerifyHasRequiredProperties() - - # Add the special "objects" property, which will be caught and handled - # separately during printing. This structure allows a fairly standard - # loop do the normal printing. - self._properties["objects"] = {} - self._XCPrint(file, 0, "// !$*UTF8*$!\n") - if self._should_print_single_line: - self._XCPrint(file, 0, "{ ") - else: - self._XCPrint(file, 0, "{\n") - for property, value in sorted( - self._properties.items() - ): - if property == "objects": - self._PrintObjects(file) - else: - self._XCKVPrint(file, 1, property, value) - self._XCPrint(file, 0, "}\n") - del self._properties["objects"] - - def _PrintObjects(self, file): - if self._should_print_single_line: - self._XCPrint(file, 0, "objects = {") - else: - self._XCPrint(file, 1, "objects = {\n") - - objects_by_class = {} - for object in self.Descendants(): - if object == self: - continue - class_name = object.__class__.__name__ - if class_name not in objects_by_class: - objects_by_class[class_name] = [] - objects_by_class[class_name].append(object) - - for class_name in sorted(objects_by_class): - self._XCPrint(file, 0, "\n") - self._XCPrint(file, 0, "/* Begin " + class_name + " section */\n") - for object in sorted( - objects_by_class[class_name], key=attrgetter("id") - ): - object.Print(file) - self._XCPrint(file, 0, "/* End " + class_name + " section */\n") - - if self._should_print_single_line: - self._XCPrint(file, 0, "}; ") - else: - self._XCPrint(file, 1, "};\n") diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py deleted file mode 100644 index 5301963..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2011 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Applies a fix to CR LF TAB handling in xml.dom. - -Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293 -Working around this: http://bugs.python.org/issue5752 -TODO(bradnelson): Consider dropping this when we drop XP support. -""" - - -import xml.dom.minidom - - -def _Replacement_write_data(writer, data, is_attrib=False): - """Writes datachars to writer.""" - data = data.replace("&", "&").replace("<", "<") - data = data.replace('"', """).replace(">", ">") - if is_attrib: - data = data.replace("\r", " ").replace("\n", " ").replace("\t", " ") - writer.write(data) - - -def _Replacement_writexml(self, writer, indent="", addindent="", newl=""): - # indent = current indentation - # addindent = indentation to add to higher levels - # newl = newline string - writer.write(indent + "<" + self.tagName) - - attrs = self._get_attributes() - a_names = sorted(attrs.keys()) - - for a_name in a_names: - writer.write(' %s="' % a_name) - _Replacement_write_data(writer, attrs[a_name].value, is_attrib=True) - writer.write('"') - if self.childNodes: - writer.write(">%s" % newl) - for node in self.childNodes: - node.writexml(writer, indent + addindent, addindent, newl) - writer.write(f"{indent}{newl}") - else: - writer.write("/>%s" % newl) - - -class XmlFix: - """Object to manage temporary patching of xml.dom.minidom.""" - - def __init__(self): - # Preserve current xml.dom.minidom functions. - self.write_data = xml.dom.minidom._write_data - self.writexml = xml.dom.minidom.Element.writexml - # Inject replacement versions of a function and a method. - xml.dom.minidom._write_data = _Replacement_write_data - xml.dom.minidom.Element.writexml = _Replacement_writexml - - def Cleanup(self): - if self.write_data: - xml.dom.minidom._write_data = self.write_data - xml.dom.minidom.Element.writexml = self.writexml - self.write_data = None - - def __del__(self): - self.Cleanup() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE deleted file mode 100644 index 6f62d44..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -This software is made available under the terms of *either* of the licenses -found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made -under the terms of *both* these licenses. diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE deleted file mode 100644 index f433b1a..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.APACHE +++ /dev/null @@ -1,177 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD deleted file mode 100644 index 42ce7b7..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/LICENSE.BSD +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) Donald Stufft and individual contributors. -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. - -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. diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py deleted file mode 100644 index 5fd9183..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -__title__ = "packaging" -__summary__ = "Core utilities for Python packages" -__uri__ = "https://github.com/pypa/packaging" - -__version__ = "23.3.dev0" - -__author__ = "Donald Stufft and individual contributors" -__email__ = "donald@stufft.io" - -__license__ = "BSD-2-Clause or Apache-2.0" -__copyright__ = "2014 %s" % __author__ diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py deleted file mode 100644 index 6fb19b3..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +++ /dev/null @@ -1,108 +0,0 @@ -""" -ELF file parser. - -This provides a class ``ELFFile`` that parses an ELF executable in a similar -interface to ``ZipFile``. Only the read interface is implemented. - -Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca -ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html -""" - -import enum -import os -import struct -from typing import IO, Optional, Tuple - - -class ELFInvalid(ValueError): - pass - - -class EIClass(enum.IntEnum): - C32 = 1 - C64 = 2 - - -class EIData(enum.IntEnum): - Lsb = 1 - Msb = 2 - - -class EMachine(enum.IntEnum): - I386 = 3 - S390 = 22 - Arm = 40 - X8664 = 62 - AArc64 = 183 - - -class ELFFile: - """ - Representation of an ELF executable. - """ - - def __init__(self, f: IO[bytes]) -> None: - self._f = f - - try: - ident = self._read("16B") - except struct.error: - raise ELFInvalid("unable to parse identification") - magic = bytes(ident[:4]) - if magic != b"\x7fELF": - raise ELFInvalid(f"invalid magic: {magic!r}") - - self.capacity = ident[4] # Format for program header (bitness). - self.encoding = ident[5] # Data structure encoding (endianness). - - try: - # e_fmt: Format for program header. - # p_fmt: Format for section header. - # p_idx: Indexes to find p_type, p_offset, and p_filesz. - e_fmt, self._p_fmt, self._p_idx = { - (1, 1): ("HHIIIIIHHH", ">IIIIIIII", (0, 1, 4)), # 32-bit MSB. - (2, 1): ("HHIQQQIHHH", ">IIQQQQQQ", (0, 2, 5)), # 64-bit MSB. - }[(self.capacity, self.encoding)] - except KeyError: - raise ELFInvalid( - f"unrecognized capacity ({self.capacity}) or " - f"encoding ({self.encoding})" - ) - - try: - ( - _, - self.machine, # Architecture type. - _, - _, - self._e_phoff, # Offset of program header. - _, - self.flags, # Processor-specific flags. - _, - self._e_phentsize, # Size of section. - self._e_phnum, # Number of sections. - ) = self._read(e_fmt) - except struct.error as e: - raise ELFInvalid("unable to parse machine and section information") from e - - def _read(self, fmt: str) -> Tuple[int, ...]: - return struct.unpack(fmt, self._f.read(struct.calcsize(fmt))) - - @property - def interpreter(self) -> Optional[str]: - """ - The path recorded in the ``PT_INTERP`` section header. - """ - for index in range(self._e_phnum): - self._f.seek(self._e_phoff + self._e_phentsize * index) - try: - data = self._read(self._p_fmt) - except struct.error: - continue - if data[self._p_idx[0]] != 3: # Not PT_INTERP. - continue - self._f.seek(data[self._p_idx[1]]) - return os.fsdecode(self._f.read(data[self._p_idx[2]])).strip("\0") - return None diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py deleted file mode 100644 index 3705d50..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +++ /dev/null @@ -1,252 +0,0 @@ -import collections -import contextlib -import functools -import os -import re -import sys -import warnings -from typing import Dict, Generator, Iterator, NamedTuple, Optional, Sequence, Tuple - -from ._elffile import EIClass, EIData, ELFFile, EMachine - -EF_ARM_ABIMASK = 0xFF000000 -EF_ARM_ABI_VER5 = 0x05000000 -EF_ARM_ABI_FLOAT_HARD = 0x00000400 - - -# `os.PathLike` not a generic type until Python 3.9, so sticking with `str` -# as the type for `path` until then. -@contextlib.contextmanager -def _parse_elf(path: str) -> Generator[Optional[ELFFile], None, None]: - try: - with open(path, "rb") as f: - yield ELFFile(f) - except (OSError, TypeError, ValueError): - yield None - - -def _is_linux_armhf(executable: str) -> bool: - # hard-float ABI can be detected from the ELF header of the running - # process - # https://static.docs.arm.com/ihi0044/g/aaelf32.pdf - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.Arm - and f.flags & EF_ARM_ABIMASK == EF_ARM_ABI_VER5 - and f.flags & EF_ARM_ABI_FLOAT_HARD == EF_ARM_ABI_FLOAT_HARD - ) - - -def _is_linux_i686(executable: str) -> bool: - with _parse_elf(executable) as f: - return ( - f is not None - and f.capacity == EIClass.C32 - and f.encoding == EIData.Lsb - and f.machine == EMachine.I386 - ) - - -def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool: - if "armv7l" in archs: - return _is_linux_armhf(executable) - if "i686" in archs: - return _is_linux_i686(executable) - allowed_archs = {"x86_64", "aarch64", "ppc64", "ppc64le", "s390x", "loongarch64"} - return any(arch in allowed_archs for arch in archs) - - -# If glibc ever changes its major version, we need to know what the last -# minor version was, so we can build the complete list of all versions. -# For now, guess what the highest minor version might be, assume it will -# be 50 for testing. Once this actually happens, update the dictionary -# with the actual value. -_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50) - - -class _GLibCVersion(NamedTuple): - major: int - minor: int - - -def _glibc_version_string_confstr() -> Optional[str]: - """ - Primary implementation of glibc_version_string using os.confstr. - """ - # os.confstr is quite a bit faster than ctypes.DLL. It's also less likely - # to be broken or missing. This strategy is used in the standard library - # platform module. - # https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183 - try: - # Should be a string like "glibc 2.17". - version_string: str = getattr(os, "confstr")("CS_GNU_LIBC_VERSION") - assert version_string is not None - _, version = version_string.rsplit() - except (AssertionError, AttributeError, OSError, ValueError): - # os.confstr() or CS_GNU_LIBC_VERSION not available (or a bad value)... - return None - return version - - -def _glibc_version_string_ctypes() -> Optional[str]: - """ - Fallback implementation of glibc_version_string using ctypes. - """ - try: - import ctypes - except ImportError: - return None - - # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen - # manpage says, "If filename is NULL, then the returned handle is for the - # main program". This way we can let the linker do the work to figure out - # which libc our process is actually using. - # - # We must also handle the special case where the executable is not a - # dynamically linked executable. This can occur when using musl libc, - # for example. In this situation, dlopen() will error, leading to an - # OSError. Interestingly, at least in the case of musl, there is no - # errno set on the OSError. The single string argument used to construct - # OSError comes from libc itself and is therefore not portable to - # hard code here. In any case, failure to call dlopen() means we - # can proceed, so we bail on our attempt. - try: - process_namespace = ctypes.CDLL(None) - except OSError: - return None - - try: - gnu_get_libc_version = process_namespace.gnu_get_libc_version - except AttributeError: - # Symbol doesn't exist -> therefore, we are not linked to - # glibc. - return None - - # Call gnu_get_libc_version, which returns a string like "2.5" - gnu_get_libc_version.restype = ctypes.c_char_p - version_str: str = gnu_get_libc_version() - # py2 / py3 compatibility: - if not isinstance(version_str, str): - version_str = version_str.decode("ascii") - - return version_str - - -def _glibc_version_string() -> Optional[str]: - """Returns glibc version string, or None if not using glibc.""" - return _glibc_version_string_confstr() or _glibc_version_string_ctypes() - - -def _parse_glibc_version(version_str: str) -> Tuple[int, int]: - """Parse glibc version. - - We use a regexp instead of str.split because we want to discard any - random junk that might come after the minor version -- this might happen - in patched/forked versions of glibc (e.g. Linaro's version of glibc - uses version strings like "2.20-2014.11"). See gh-3588. - """ - m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) - if not m: - warnings.warn( - f"Expected glibc version with 2 components major.minor," - f" got: {version_str}", - RuntimeWarning, - ) - return -1, -1 - return int(m.group("major")), int(m.group("minor")) - - -@functools.lru_cache() -def _get_glibc_version() -> Tuple[int, int]: - version_str = _glibc_version_string() - if version_str is None: - return (-1, -1) - return _parse_glibc_version(version_str) - - -# From PEP 513, PEP 600 -def _is_compatible(arch: str, version: _GLibCVersion) -> bool: - sys_glibc = _get_glibc_version() - if sys_glibc < version: - return False - # Check for presence of _manylinux module. - try: - import _manylinux # noqa - except ImportError: - return True - if hasattr(_manylinux, "manylinux_compatible"): - result = _manylinux.manylinux_compatible(version[0], version[1], arch) - if result is not None: - return bool(result) - return True - if version == _GLibCVersion(2, 5): - if hasattr(_manylinux, "manylinux1_compatible"): - return bool(_manylinux.manylinux1_compatible) - if version == _GLibCVersion(2, 12): - if hasattr(_manylinux, "manylinux2010_compatible"): - return bool(_manylinux.manylinux2010_compatible) - if version == _GLibCVersion(2, 17): - if hasattr(_manylinux, "manylinux2014_compatible"): - return bool(_manylinux.manylinux2014_compatible) - return True - - -_LEGACY_MANYLINUX_MAP = { - # CentOS 7 w/ glibc 2.17 (PEP 599) - (2, 17): "manylinux2014", - # CentOS 6 w/ glibc 2.12 (PEP 571) - (2, 12): "manylinux2010", - # CentOS 5 w/ glibc 2.5 (PEP 513) - (2, 5): "manylinux1", -} - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate manylinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be manylinux-compatible. - - :returns: An iterator of compatible manylinux tags. - """ - if not _have_compatible_abi(sys.executable, archs): - return - # Oldest glibc to be supported regardless of architecture is (2, 17). - too_old_glibc2 = _GLibCVersion(2, 16) - if set(archs) & {"x86_64", "i686"}: - # On x86/i686 also oldest glibc to be supported is (2, 5). - too_old_glibc2 = _GLibCVersion(2, 4) - current_glibc = _GLibCVersion(*_get_glibc_version()) - glibc_max_list = [current_glibc] - # We can assume compatibility across glibc major versions. - # https://sourceware.org/bugzilla/show_bug.cgi?id=24636 - # - # Build a list of maximum glibc versions so that we can - # output the canonical list of all glibc from current_glibc - # down to too_old_glibc2, including all intermediary versions. - for glibc_major in range(current_glibc.major - 1, 1, -1): - glibc_minor = _LAST_GLIBC_MINOR[glibc_major] - glibc_max_list.append(_GLibCVersion(glibc_major, glibc_minor)) - for arch in archs: - for glibc_max in glibc_max_list: - if glibc_max.major == too_old_glibc2.major: - min_minor = too_old_glibc2.minor - else: - # For other glibc major versions oldest supported is (x, 0). - min_minor = -1 - for glibc_minor in range(glibc_max.minor, min_minor, -1): - glibc_version = _GLibCVersion(glibc_max.major, glibc_minor) - tag = "manylinux_{}_{}".format(*glibc_version) - if _is_compatible(arch, glibc_version): - yield f"{tag}_{arch}" - # Handle the legacy manylinux1, manylinux2010, manylinux2014 tags. - if glibc_version in _LEGACY_MANYLINUX_MAP: - legacy_tag = _LEGACY_MANYLINUX_MAP[glibc_version] - if _is_compatible(arch, glibc_version): - yield f"{legacy_tag}_{arch}" diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py deleted file mode 100644 index 86419df..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +++ /dev/null @@ -1,83 +0,0 @@ -"""PEP 656 support. - -This module implements logic to detect if the currently running Python is -linked against musl, and what musl version is used. -""" - -import functools -import re -import subprocess -import sys -from typing import Iterator, NamedTuple, Optional, Sequence - -from ._elffile import ELFFile - - -class _MuslVersion(NamedTuple): - major: int - minor: int - - -def _parse_musl_version(output: str) -> Optional[_MuslVersion]: - lines = [n for n in (n.strip() for n in output.splitlines()) if n] - if len(lines) < 2 or lines[0][:4] != "musl": - return None - m = re.match(r"Version (\d+)\.(\d+)", lines[1]) - if not m: - return None - return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2))) - - -@functools.lru_cache() -def _get_musl_version(executable: str) -> Optional[_MuslVersion]: - """Detect currently-running musl runtime version. - - This is done by checking the specified executable's dynamic linking - information, and invoking the loader to parse its output for a version - string. If the loader is musl, the output would be something like:: - - musl libc (x86_64) - Version 1.2.2 - Dynamic Program Loader - """ - try: - with open(executable, "rb") as f: - ld = ELFFile(f).interpreter - except (OSError, TypeError, ValueError): - return None - if ld is None or "musl" not in ld: - return None - proc = subprocess.run([ld], stderr=subprocess.PIPE, text=True) - return _parse_musl_version(proc.stderr) - - -def platform_tags(archs: Sequence[str]) -> Iterator[str]: - """Generate musllinux tags compatible to the current platform. - - :param archs: Sequence of compatible architectures. - The first one shall be the closest to the actual architecture and be the part of - platform tag after the ``linux_`` prefix, e.g. ``x86_64``. - The ``linux_`` prefix is assumed as a prerequisite for the current platform to - be musllinux-compatible. - - :returns: An iterator of compatible musllinux tags. - """ - sys_musl = _get_musl_version(sys.executable) - if sys_musl is None: # Python not dynamically linked against musl. - return - for arch in archs: - for minor in range(sys_musl.minor, -1, -1): - yield f"musllinux_{sys_musl.major}_{minor}_{arch}" - - -if __name__ == "__main__": # pragma: no cover - import sysconfig - - plat = sysconfig.get_platform() - assert plat.startswith("linux-"), "not linux" - - print("plat:", plat) - print("musl:", _get_musl_version(sys.executable)) - print("tags:", end=" ") - for t in platform_tags(re.sub(r"[.-]", "_", plat.split("-", 1)[-1])): - print(t, end="\n ") diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py deleted file mode 100644 index 4576981..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +++ /dev/null @@ -1,359 +0,0 @@ -"""Handwritten parser of dependency specifiers. - -The docstring for each __parse_* function contains ENBF-inspired grammar representing -the implementation. -""" - -import ast -from typing import Any, List, NamedTuple, Optional, Tuple, Union - -from ._tokenizer import DEFAULT_RULES, Tokenizer - - -class Node: - def __init__(self, value: str) -> None: - self.value = value - - def __str__(self) -> str: - return self.value - - def __repr__(self) -> str: - return f"<{self.__class__.__name__}('{self}')>" - - def serialize(self) -> str: - raise NotImplementedError - - -class Variable(Node): - def serialize(self) -> str: - return str(self) - - -class Value(Node): - def serialize(self) -> str: - return f'"{self}"' - - -class Op(Node): - def serialize(self) -> str: - return str(self) - - -MarkerVar = Union[Variable, Value] -MarkerItem = Tuple[MarkerVar, Op, MarkerVar] -# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]] -# MarkerList = List[Union["MarkerList", MarkerAtom, str]] -# mypy does not support recursive type definition -# https://github.com/python/mypy/issues/731 -MarkerAtom = Any -MarkerList = List[Any] - - -class ParsedRequirement(NamedTuple): - name: str - url: str - extras: List[str] - specifier: str - marker: Optional[MarkerList] - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for dependency specifier -# -------------------------------------------------------------------------------------- -def parse_requirement(source: str) -> ParsedRequirement: - return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement: - """ - requirement = WS? IDENTIFIER WS? extras WS? requirement_details - """ - tokenizer.consume("WS") - - name_token = tokenizer.expect( - "IDENTIFIER", expected="package name at the start of dependency specifier" - ) - name = name_token.text - tokenizer.consume("WS") - - extras = _parse_extras(tokenizer) - tokenizer.consume("WS") - - url, specifier, marker = _parse_requirement_details(tokenizer) - tokenizer.expect("END", expected="end of dependency specifier") - - return ParsedRequirement(name, url, extras, specifier, marker) - - -def _parse_requirement_details( - tokenizer: Tokenizer, -) -> Tuple[str, str, Optional[MarkerList]]: - """ - requirement_details = AT URL (WS requirement_marker?)? - | specifier WS? (requirement_marker)? - """ - - specifier = "" - url = "" - marker = None - - if tokenizer.check("AT"): - tokenizer.read() - tokenizer.consume("WS") - - url_start = tokenizer.position - url = tokenizer.expect("URL", expected="URL after @").text - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - tokenizer.expect("WS", expected="whitespace after URL") - - # The input might end after whitespace. - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, span_start=url_start, after="URL and whitespace" - ) - else: - specifier_start = tokenizer.position - specifier = _parse_specifier(tokenizer) - tokenizer.consume("WS") - - if tokenizer.check("END", peek=True): - return (url, specifier, marker) - - marker = _parse_requirement_marker( - tokenizer, - span_start=specifier_start, - after=( - "version specifier" - if specifier - else "name and no valid version specifier" - ), - ) - - return (url, specifier, marker) - - -def _parse_requirement_marker( - tokenizer: Tokenizer, *, span_start: int, after: str -) -> MarkerList: - """ - requirement_marker = SEMICOLON marker WS? - """ - - if not tokenizer.check("SEMICOLON"): - tokenizer.raise_syntax_error( - f"Expected end or semicolon (after {after})", - span_start=span_start, - ) - tokenizer.read() - - marker = _parse_marker(tokenizer) - tokenizer.consume("WS") - - return marker - - -def _parse_extras(tokenizer: Tokenizer) -> List[str]: - """ - extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)? - """ - if not tokenizer.check("LEFT_BRACKET", peek=True): - return [] - - with tokenizer.enclosing_tokens( - "LEFT_BRACKET", - "RIGHT_BRACKET", - around="extras", - ): - tokenizer.consume("WS") - extras = _parse_extras_list(tokenizer) - tokenizer.consume("WS") - - return extras - - -def _parse_extras_list(tokenizer: Tokenizer) -> List[str]: - """ - extras_list = identifier (wsp* ',' wsp* identifier)* - """ - extras: List[str] = [] - - if not tokenizer.check("IDENTIFIER"): - return extras - - extras.append(tokenizer.read().text) - - while True: - tokenizer.consume("WS") - if tokenizer.check("IDENTIFIER", peek=True): - tokenizer.raise_syntax_error("Expected comma between extra names") - elif not tokenizer.check("COMMA"): - break - - tokenizer.read() - tokenizer.consume("WS") - - extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma") - extras.append(extra_token.text) - - return extras - - -def _parse_specifier(tokenizer: Tokenizer) -> str: - """ - specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS - | WS? version_many WS? - """ - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="version specifier", - ): - tokenizer.consume("WS") - parsed_specifiers = _parse_version_many(tokenizer) - tokenizer.consume("WS") - - return parsed_specifiers - - -def _parse_version_many(tokenizer: Tokenizer) -> str: - """ - version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)? - """ - parsed_specifiers = "" - while tokenizer.check("SPECIFIER"): - span_start = tokenizer.position - parsed_specifiers += tokenizer.read().text - if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True): - tokenizer.raise_syntax_error( - ".* suffix can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position + 1, - ) - if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True): - tokenizer.raise_syntax_error( - "Local version label can only be used with `==` or `!=` operators", - span_start=span_start, - span_end=tokenizer.position, - ) - tokenizer.consume("WS") - if not tokenizer.check("COMMA"): - break - parsed_specifiers += tokenizer.read().text - tokenizer.consume("WS") - - return parsed_specifiers - - -# -------------------------------------------------------------------------------------- -# Recursive descent parser for marker expression -# -------------------------------------------------------------------------------------- -def parse_marker(source: str) -> MarkerList: - return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES)) - - -def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList: - retval = _parse_marker(tokenizer) - tokenizer.expect("END", expected="end of marker expression") - return retval - - -def _parse_marker(tokenizer: Tokenizer) -> MarkerList: - """ - marker = marker_atom (BOOLOP marker_atom)+ - """ - expression = [_parse_marker_atom(tokenizer)] - while tokenizer.check("BOOLOP"): - token = tokenizer.read() - expr_right = _parse_marker_atom(tokenizer) - expression.extend((token.text, expr_right)) - return expression - - -def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom: - """ - marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS? - | WS? marker_item WS? - """ - - tokenizer.consume("WS") - if tokenizer.check("LEFT_PARENTHESIS", peek=True): - with tokenizer.enclosing_tokens( - "LEFT_PARENTHESIS", - "RIGHT_PARENTHESIS", - around="marker expression", - ): - tokenizer.consume("WS") - marker: MarkerAtom = _parse_marker(tokenizer) - tokenizer.consume("WS") - else: - marker = _parse_marker_item(tokenizer) - tokenizer.consume("WS") - return marker - - -def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem: - """ - marker_item = WS? marker_var WS? marker_op WS? marker_var WS? - """ - tokenizer.consume("WS") - marker_var_left = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - marker_op = _parse_marker_op(tokenizer) - tokenizer.consume("WS") - marker_var_right = _parse_marker_var(tokenizer) - tokenizer.consume("WS") - return (marker_var_left, marker_op, marker_var_right) - - -def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar: - """ - marker_var = VARIABLE | QUOTED_STRING - """ - if tokenizer.check("VARIABLE"): - return process_env_var(tokenizer.read().text.replace(".", "_")) - elif tokenizer.check("QUOTED_STRING"): - return process_python_str(tokenizer.read().text) - else: - tokenizer.raise_syntax_error( - message="Expected a marker variable or quoted string" - ) - - -def process_env_var(env_var: str) -> Variable: - if ( - env_var == "platform_python_implementation" - or env_var == "python_implementation" - ): - return Variable("platform_python_implementation") - else: - return Variable(env_var) - - -def process_python_str(python_str: str) -> Value: - value = ast.literal_eval(python_str) - return Value(str(value)) - - -def _parse_marker_op(tokenizer: Tokenizer) -> Op: - """ - marker_op = IN | NOT IN | OP - """ - if tokenizer.check("IN"): - tokenizer.read() - return Op("in") - elif tokenizer.check("NOT"): - tokenizer.read() - tokenizer.expect("WS", expected="whitespace after 'not'") - tokenizer.expect("IN", expected="'in' after 'not'") - return Op("not in") - elif tokenizer.check("OP"): - return Op(tokenizer.read().text) - else: - return tokenizer.raise_syntax_error( - "Expected marker operator, one of " - "<=, <, !=, ==, >=, >, ~=, ===, in, not in" - ) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py deleted file mode 100644 index 90a6465..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +++ /dev/null @@ -1,61 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - - -class InfinityType: - def __repr__(self) -> str: - return "Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return False - - def __le__(self, other: object) -> bool: - return False - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return True - - def __ge__(self, other: object) -> bool: - return True - - def __neg__(self: object) -> "NegativeInfinityType": - return NegativeInfinity - - -Infinity = InfinityType() - - -class NegativeInfinityType: - def __repr__(self) -> str: - return "-Infinity" - - def __hash__(self) -> int: - return hash(repr(self)) - - def __lt__(self, other: object) -> bool: - return True - - def __le__(self, other: object) -> bool: - return True - - def __eq__(self, other: object) -> bool: - return isinstance(other, self.__class__) - - def __gt__(self, other: object) -> bool: - return False - - def __ge__(self, other: object) -> bool: - return False - - def __neg__(self: object) -> InfinityType: - return Infinity - - -NegativeInfinity = NegativeInfinityType() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py deleted file mode 100644 index dd0d648..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +++ /dev/null @@ -1,192 +0,0 @@ -import contextlib -import re -from dataclasses import dataclass -from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union - -from .specifiers import Specifier - - -@dataclass -class Token: - name: str - text: str - position: int - - -class ParserSyntaxError(Exception): - """The provided source text could not be parsed correctly.""" - - def __init__( - self, - message: str, - *, - source: str, - span: Tuple[int, int], - ) -> None: - self.span = span - self.message = message - self.source = source - - super().__init__() - - def __str__(self) -> str: - marker = " " * self.span[0] + "~" * (self.span[1] - self.span[0]) + "^" - return "\n ".join([self.message, self.source, marker]) - - -DEFAULT_RULES: "Dict[str, Union[str, re.Pattern[str]]]" = { - "LEFT_PARENTHESIS": r"\(", - "RIGHT_PARENTHESIS": r"\)", - "LEFT_BRACKET": r"\[", - "RIGHT_BRACKET": r"\]", - "SEMICOLON": r";", - "COMMA": r",", - "QUOTED_STRING": re.compile( - r""" - ( - ('[^']*') - | - ("[^"]*") - ) - """, - re.VERBOSE, - ), - "OP": r"(===|==|~=|!=|<=|>=|<|>)", - "BOOLOP": r"\b(or|and)\b", - "IN": r"\bin\b", - "NOT": r"\bnot\b", - "VARIABLE": re.compile( - r""" - \b( - python_version - |python_full_version - |os[._]name - |sys[._]platform - |platform_(release|system) - |platform[._](version|machine|python_implementation) - |python_implementation - |implementation_(name|version) - |extra - )\b - """, - re.VERBOSE, - ), - "SPECIFIER": re.compile( - Specifier._operator_regex_str + Specifier._version_regex_str, - re.VERBOSE | re.IGNORECASE, - ), - "AT": r"\@", - "URL": r"[^ \t]+", - "IDENTIFIER": r"\b[a-zA-Z0-9][a-zA-Z0-9._-]*\b", - "VERSION_PREFIX_TRAIL": r"\.\*", - "VERSION_LOCAL_LABEL_TRAIL": r"\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*", - "WS": r"[ \t]+", - "END": r"$", -} - - -class Tokenizer: - """Context-sensitive token parsing. - - Provides methods to examine the input stream to check whether the next token - matches. - """ - - def __init__( - self, - source: str, - *, - rules: "Dict[str, Union[str, re.Pattern[str]]]", - ) -> None: - self.source = source - self.rules: Dict[str, re.Pattern[str]] = { - name: re.compile(pattern) for name, pattern in rules.items() - } - self.next_token: Optional[Token] = None - self.position = 0 - - def consume(self, name: str) -> None: - """Move beyond provided token name, if at current position.""" - if self.check(name): - self.read() - - def check(self, name: str, *, peek: bool = False) -> bool: - """Check whether the next token has the provided name. - - By default, if the check succeeds, the token *must* be read before - another check. If `peek` is set to `True`, the token is not loaded and - would need to be checked again. - """ - assert ( - self.next_token is None - ), f"Cannot check for {name!r}, already have {self.next_token!r}" - assert name in self.rules, f"Unknown token name: {name!r}" - - expression = self.rules[name] - - match = expression.match(self.source, self.position) - if match is None: - return False - if not peek: - self.next_token = Token(name, match[0], self.position) - return True - - def expect(self, name: str, *, expected: str) -> Token: - """Expect a certain token name next, failing with a syntax error otherwise. - - The token is *not* read. - """ - if not self.check(name): - raise self.raise_syntax_error(f"Expected {expected}") - return self.read() - - def read(self) -> Token: - """Consume the next token and return it.""" - token = self.next_token - assert token is not None - - self.position += len(token.text) - self.next_token = None - - return token - - def raise_syntax_error( - self, - message: str, - *, - span_start: Optional[int] = None, - span_end: Optional[int] = None, - ) -> NoReturn: - """Raise ParserSyntaxError at the given position.""" - span = ( - self.position if span_start is None else span_start, - self.position if span_end is None else span_end, - ) - raise ParserSyntaxError( - message, - source=self.source, - span=span, - ) - - @contextlib.contextmanager - def enclosing_tokens( - self, open_token: str, close_token: str, *, around: str - ) -> Iterator[None]: - if self.check(open_token): - open_position = self.position - self.read() - else: - open_position = None - - yield - - if open_position is None: - return - - if not self.check(close_token): - self.raise_syntax_error( - f"Expected matching {close_token} for {open_token}, after {around}", - span_start=open_position, - ) - - self.read() diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py deleted file mode 100644 index 8b98fca..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py +++ /dev/null @@ -1,252 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import operator -import os -import platform -import sys -from typing import Any, Callable, Dict, List, Optional, Tuple, Union - -from ._parser import ( - MarkerAtom, - MarkerList, - Op, - Value, - Variable, - parse_marker as _parse_marker, -) -from ._tokenizer import ParserSyntaxError -from .specifiers import InvalidSpecifier, Specifier -from .utils import canonicalize_name - -__all__ = [ - "InvalidMarker", - "UndefinedComparison", - "UndefinedEnvironmentName", - "Marker", - "default_environment", -] - -Operator = Callable[[str, str], bool] - - -class InvalidMarker(ValueError): - """ - An invalid marker was found, users should refer to PEP 508. - """ - - -class UndefinedComparison(ValueError): - """ - An invalid operation was attempted on a value that doesn't support it. - """ - - -class UndefinedEnvironmentName(ValueError): - """ - A name was attempted to be used that does not exist inside of the - environment. - """ - - -def _normalize_extra_values(results: Any) -> Any: - """ - Normalize extra values. - """ - if isinstance(results[0], tuple): - lhs, op, rhs = results[0] - if isinstance(lhs, Variable) and lhs.value == "extra": - normalized_extra = canonicalize_name(rhs.value) - rhs = Value(normalized_extra) - elif isinstance(rhs, Variable) and rhs.value == "extra": - normalized_extra = canonicalize_name(lhs.value) - lhs = Value(normalized_extra) - results[0] = lhs, op, rhs - return results - - -def _format_marker( - marker: Union[List[str], MarkerAtom, str], first: Optional[bool] = True -) -> str: - - assert isinstance(marker, (list, tuple, str)) - - # Sometimes we have a structure like [[...]] which is a single item list - # where the single item is itself it's own list. In that case we want skip - # the rest of this function so that we don't get extraneous () on the - # outside. - if ( - isinstance(marker, list) - and len(marker) == 1 - and isinstance(marker[0], (list, tuple)) - ): - return _format_marker(marker[0]) - - if isinstance(marker, list): - inner = (_format_marker(m, first=False) for m in marker) - if first: - return " ".join(inner) - else: - return "(" + " ".join(inner) + ")" - elif isinstance(marker, tuple): - return " ".join([m.serialize() for m in marker]) - else: - return marker - - -_operators: Dict[str, Operator] = { - "in": lambda lhs, rhs: lhs in rhs, - "not in": lambda lhs, rhs: lhs not in rhs, - "<": operator.lt, - "<=": operator.le, - "==": operator.eq, - "!=": operator.ne, - ">=": operator.ge, - ">": operator.gt, -} - - -def _eval_op(lhs: str, op: Op, rhs: str) -> bool: - try: - spec = Specifier("".join([op.serialize(), rhs])) - except InvalidSpecifier: - pass - else: - return spec.contains(lhs, prereleases=True) - - oper: Optional[Operator] = _operators.get(op.serialize()) - if oper is None: - raise UndefinedComparison(f"Undefined {op!r} on {lhs!r} and {rhs!r}.") - - return oper(lhs, rhs) - - -def _normalize(*values: str, key: str) -> Tuple[str, ...]: - # PEP 685 – Comparison of extra names for optional distribution dependencies - # https://peps.python.org/pep-0685/ - # > When comparing extra names, tools MUST normalize the names being - # > compared using the semantics outlined in PEP 503 for names - if key == "extra": - return tuple(canonicalize_name(v) for v in values) - - # other environment markers don't have such standards - return values - - -def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool: - groups: List[List[bool]] = [[]] - - for marker in markers: - assert isinstance(marker, (list, tuple, str)) - - if isinstance(marker, list): - groups[-1].append(_evaluate_markers(marker, environment)) - elif isinstance(marker, tuple): - lhs, op, rhs = marker - - if isinstance(lhs, Variable): - environment_key = lhs.value - lhs_value = environment[environment_key] - rhs_value = rhs.value - else: - lhs_value = lhs.value - environment_key = rhs.value - rhs_value = environment[environment_key] - - lhs_value, rhs_value = _normalize(lhs_value, rhs_value, key=environment_key) - groups[-1].append(_eval_op(lhs_value, op, rhs_value)) - else: - assert marker in ["and", "or"] - if marker == "or": - groups.append([]) - - return any(all(item) for item in groups) - - -def format_full_version(info: "sys._version_info") -> str: - version = "{0.major}.{0.minor}.{0.micro}".format(info) - kind = info.releaselevel - if kind != "final": - version += kind[0] + str(info.serial) - return version - - -def default_environment() -> Dict[str, str]: - iver = format_full_version(sys.implementation.version) - implementation_name = sys.implementation.name - return { - "implementation_name": implementation_name, - "implementation_version": iver, - "os_name": os.name, - "platform_machine": platform.machine(), - "platform_release": platform.release(), - "platform_system": platform.system(), - "platform_version": platform.version(), - "python_full_version": platform.python_version(), - "platform_python_implementation": platform.python_implementation(), - "python_version": ".".join(platform.python_version_tuple()[:2]), - "sys_platform": sys.platform, - } - - -class Marker: - def __init__(self, marker: str) -> None: - # Note: We create a Marker object without calling this constructor in - # packaging.requirements.Requirement. If any additional logic is - # added here, make sure to mirror/adapt Requirement. - try: - self._markers = _normalize_extra_values(_parse_marker(marker)) - # The attribute `_markers` can be described in terms of a recursive type: - # MarkerList = List[Union[Tuple[Node, ...], str, MarkerList]] - # - # For example, the following expression: - # python_version > "3.6" or (python_version == "3.6" and os_name == "unix") - # - # is parsed into: - # [ - # (, ')>, ), - # 'and', - # [ - # (, , ), - # 'or', - # (, , ) - # ] - # ] - except ParserSyntaxError as e: - raise InvalidMarker(str(e)) from e - - def __str__(self) -> str: - return _format_marker(self._markers) - - def __repr__(self) -> str: - return f"" - - def __hash__(self) -> int: - return hash((self.__class__.__name__, str(self))) - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, Marker): - return NotImplemented - - return str(self) == str(other) - - def evaluate(self, environment: Optional[Dict[str, str]] = None) -> bool: - """Evaluate a marker. - - Return the boolean from evaluating the given marker against the - environment. environment is an optional argument to override all or - part of the determined environment. - - The environment is determined from the current Python process. - """ - current_environment = default_environment() - current_environment["extra"] = "" - if environment is not None: - current_environment.update(environment) - # The API used to allow setting extra to None. We need to handle this - # case for backwards compatibility. - if current_environment["extra"] is None: - current_environment["extra"] = "" - - return _evaluate_markers(self._markers, current_environment) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py deleted file mode 100644 index fb27493..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +++ /dev/null @@ -1,825 +0,0 @@ -import email.feedparser -import email.header -import email.message -import email.parser -import email.policy -import sys -import typing -from typing import ( - Any, - Callable, - Dict, - Generic, - List, - Optional, - Tuple, - Type, - Union, - cast, -) - -from . import requirements, specifiers, utils, version as version_module - -T = typing.TypeVar("T") -if sys.version_info[:2] >= (3, 8): # pragma: no cover - from typing import Literal, TypedDict -else: # pragma: no cover - if typing.TYPE_CHECKING: - from typing_extensions import Literal, TypedDict - else: - try: - from typing_extensions import Literal, TypedDict - except ImportError: - - class Literal: - def __init_subclass__(*_args, **_kwargs): - pass - - class TypedDict: - def __init_subclass__(*_args, **_kwargs): - pass - - -try: - ExceptionGroup -except NameError: # pragma: no cover - - class ExceptionGroup(Exception): # noqa: N818 - """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. - - If :external:exc:`ExceptionGroup` is already defined by Python itself, - that version is used instead. - """ - - message: str - exceptions: List[Exception] - - def __init__(self, message: str, exceptions: List[Exception]) -> None: - self.message = message - self.exceptions = exceptions - - def __repr__(self) -> str: - return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})" - -else: # pragma: no cover - ExceptionGroup = ExceptionGroup - - -class InvalidMetadata(ValueError): - """A metadata field contains invalid data.""" - - field: str - """The name of the field that contains invalid data.""" - - def __init__(self, field: str, message: str) -> None: - self.field = field - super().__init__(message) - - -# The RawMetadata class attempts to make as few assumptions about the underlying -# serialization formats as possible. The idea is that as long as a serialization -# formats offer some very basic primitives in *some* way then we can support -# serializing to and from that format. -class RawMetadata(TypedDict, total=False): - """A dictionary of raw core metadata. - - Each field in core metadata maps to a key of this dictionary (when data is - provided). The key is lower-case and underscores are used instead of dashes - compared to the equivalent core metadata field. Any core metadata field that - can be specified multiple times or can hold multiple values in a single - field have a key with a plural name. See :class:`Metadata` whose attributes - match the keys of this dictionary. - - Core metadata fields that can be specified multiple times are stored as a - list or dict depending on which is appropriate for the field. Any fields - which hold multiple values in a single field are stored as a list. - - """ - - # Metadata 1.0 - PEP 241 - metadata_version: str - name: str - version: str - platforms: List[str] - summary: str - description: str - keywords: List[str] - home_page: str - author: str - author_email: str - license: str - - # Metadata 1.1 - PEP 314 - supported_platforms: List[str] - download_url: str - classifiers: List[str] - requires: List[str] - provides: List[str] - obsoletes: List[str] - - # Metadata 1.2 - PEP 345 - maintainer: str - maintainer_email: str - requires_dist: List[str] - provides_dist: List[str] - obsoletes_dist: List[str] - requires_python: str - requires_external: List[str] - project_urls: Dict[str, str] - - # Metadata 2.0 - # PEP 426 attempted to completely revamp the metadata format - # but got stuck without ever being able to build consensus on - # it and ultimately ended up withdrawn. - # - # However, a number of tools had started emitting METADATA with - # `2.0` Metadata-Version, so for historical reasons, this version - # was skipped. - - # Metadata 2.1 - PEP 566 - description_content_type: str - provides_extra: List[str] - - # Metadata 2.2 - PEP 643 - dynamic: List[str] - - # Metadata 2.3 - PEP 685 - # No new fields were added in PEP 685, just some edge case were - # tightened up to provide better interoptability. - - -_STRING_FIELDS = { - "author", - "author_email", - "description", - "description_content_type", - "download_url", - "home_page", - "license", - "maintainer", - "maintainer_email", - "metadata_version", - "name", - "requires_python", - "summary", - "version", -} - -_LIST_FIELDS = { - "classifiers", - "dynamic", - "obsoletes", - "obsoletes_dist", - "platforms", - "provides", - "provides_dist", - "provides_extra", - "requires", - "requires_dist", - "requires_external", - "supported_platforms", -} - -_DICT_FIELDS = { - "project_urls", -} - - -def _parse_keywords(data: str) -> List[str]: - """Split a string of comma-separate keyboards into a list of keywords.""" - return [k.strip() for k in data.split(",")] - - -def _parse_project_urls(data: List[str]) -> Dict[str, str]: - """Parse a list of label/URL string pairings separated by a comma.""" - urls = {} - for pair in data: - # Our logic is slightly tricky here as we want to try and do - # *something* reasonable with malformed data. - # - # The main thing that we have to worry about, is data that does - # not have a ',' at all to split the label from the Value. There - # isn't a singular right answer here, and we will fail validation - # later on (if the caller is validating) so it doesn't *really* - # matter, but since the missing value has to be an empty str - # and our return value is dict[str, str], if we let the key - # be the missing value, then they'd have multiple '' values that - # overwrite each other in a accumulating dict. - # - # The other potentional issue is that it's possible to have the - # same label multiple times in the metadata, with no solid "right" - # answer with what to do in that case. As such, we'll do the only - # thing we can, which is treat the field as unparseable and add it - # to our list of unparsed fields. - parts = [p.strip() for p in pair.split(",", 1)] - parts.extend([""] * (max(0, 2 - len(parts)))) # Ensure 2 items - - # TODO: The spec doesn't say anything about if the keys should be - # considered case sensitive or not... logically they should - # be case-preserving and case-insensitive, but doing that - # would open up more cases where we might have duplicate - # entries. - label, url = parts - if label in urls: - # The label already exists in our set of urls, so this field - # is unparseable, and we can just add the whole thing to our - # unparseable data and stop processing it. - raise KeyError("duplicate labels in project urls") - urls[label] = url - - return urls - - -def _get_payload(msg: email.message.Message, source: Union[bytes, str]) -> str: - """Get the body of the message.""" - # If our source is a str, then our caller has managed encodings for us, - # and we don't need to deal with it. - if isinstance(source, str): - payload: str = msg.get_payload() - return payload - # If our source is a bytes, then we're managing the encoding and we need - # to deal with it. - else: - bpayload: bytes = msg.get_payload(decode=True) - try: - return bpayload.decode("utf8", "strict") - except UnicodeDecodeError: - raise ValueError("payload in an invalid encoding") - - -# The various parse_FORMAT functions here are intended to be as lenient as -# possible in their parsing, while still returning a correctly typed -# RawMetadata. -# -# To aid in this, we also generally want to do as little touching of the -# data as possible, except where there are possibly some historic holdovers -# that make valid data awkward to work with. -# -# While this is a lower level, intermediate format than our ``Metadata`` -# class, some light touch ups can make a massive difference in usability. - -# Map METADATA fields to RawMetadata. -_EMAIL_TO_RAW_MAPPING = { - "author": "author", - "author-email": "author_email", - "classifier": "classifiers", - "description": "description", - "description-content-type": "description_content_type", - "download-url": "download_url", - "dynamic": "dynamic", - "home-page": "home_page", - "keywords": "keywords", - "license": "license", - "maintainer": "maintainer", - "maintainer-email": "maintainer_email", - "metadata-version": "metadata_version", - "name": "name", - "obsoletes": "obsoletes", - "obsoletes-dist": "obsoletes_dist", - "platform": "platforms", - "project-url": "project_urls", - "provides": "provides", - "provides-dist": "provides_dist", - "provides-extra": "provides_extra", - "requires": "requires", - "requires-dist": "requires_dist", - "requires-external": "requires_external", - "requires-python": "requires_python", - "summary": "summary", - "supported-platform": "supported_platforms", - "version": "version", -} -_RAW_TO_EMAIL_MAPPING = {raw: email for email, raw in _EMAIL_TO_RAW_MAPPING.items()} - - -def parse_email(data: Union[bytes, str]) -> Tuple[RawMetadata, Dict[str, List[str]]]: - """Parse a distribution's metadata stored as email headers (e.g. from ``METADATA``). - - This function returns a two-item tuple of dicts. The first dict is of - recognized fields from the core metadata specification. Fields that can be - parsed and translated into Python's built-in types are converted - appropriately. All other fields are left as-is. Fields that are allowed to - appear multiple times are stored as lists. - - The second dict contains all other fields from the metadata. This includes - any unrecognized fields. It also includes any fields which are expected to - be parsed into a built-in type but were not formatted appropriately. Finally, - any fields that are expected to appear only once but are repeated are - included in this dict. - - """ - raw: Dict[str, Union[str, List[str], Dict[str, str]]] = {} - unparsed: Dict[str, List[str]] = {} - - if isinstance(data, str): - parsed = email.parser.Parser(policy=email.policy.compat32).parsestr(data) - else: - parsed = email.parser.BytesParser(policy=email.policy.compat32).parsebytes(data) - - # We have to wrap parsed.keys() in a set, because in the case of multiple - # values for a key (a list), the key will appear multiple times in the - # list of keys, but we're avoiding that by using get_all(). - for name in frozenset(parsed.keys()): - # Header names in RFC are case insensitive, so we'll normalize to all - # lower case to make comparisons easier. - name = name.lower() - - # We use get_all() here, even for fields that aren't multiple use, - # because otherwise someone could have e.g. two Name fields, and we - # would just silently ignore it rather than doing something about it. - headers = parsed.get_all(name) or [] - - # The way the email module works when parsing bytes is that it - # unconditionally decodes the bytes as ascii using the surrogateescape - # handler. When you pull that data back out (such as with get_all() ), - # it looks to see if the str has any surrogate escapes, and if it does - # it wraps it in a Header object instead of returning the string. - # - # As such, we'll look for those Header objects, and fix up the encoding. - value = [] - # Flag if we have run into any issues processing the headers, thus - # signalling that the data belongs in 'unparsed'. - valid_encoding = True - for h in headers: - # It's unclear if this can return more types than just a Header or - # a str, so we'll just assert here to make sure. - assert isinstance(h, (email.header.Header, str)) - - # If it's a header object, we need to do our little dance to get - # the real data out of it. In cases where there is invalid data - # we're going to end up with mojibake, but there's no obvious, good - # way around that without reimplementing parts of the Header object - # ourselves. - # - # That should be fine since, if mojibacked happens, this key is - # going into the unparsed dict anyways. - if isinstance(h, email.header.Header): - # The Header object stores it's data as chunks, and each chunk - # can be independently encoded, so we'll need to check each - # of them. - chunks: List[Tuple[bytes, Optional[str]]] = [] - for bin, encoding in email.header.decode_header(h): - try: - bin.decode("utf8", "strict") - except UnicodeDecodeError: - # Enable mojibake. - encoding = "latin1" - valid_encoding = False - else: - encoding = "utf8" - chunks.append((bin, encoding)) - - # Turn our chunks back into a Header object, then let that - # Header object do the right thing to turn them into a - # string for us. - value.append(str(email.header.make_header(chunks))) - # This is already a string, so just add it. - else: - value.append(h) - - # We've processed all of our values to get them into a list of str, - # but we may have mojibake data, in which case this is an unparsed - # field. - if not valid_encoding: - unparsed[name] = value - continue - - raw_name = _EMAIL_TO_RAW_MAPPING.get(name) - if raw_name is None: - # This is a bit of a weird situation, we've encountered a key that - # we don't know what it means, so we don't know whether it's meant - # to be a list or not. - # - # Since we can't really tell one way or another, we'll just leave it - # as a list, even though it may be a single item list, because that's - # what makes the most sense for email headers. - unparsed[name] = value - continue - - # If this is one of our string fields, then we'll check to see if our - # value is a list of a single item. If it is then we'll assume that - # it was emitted as a single string, and unwrap the str from inside - # the list. - # - # If it's any other kind of data, then we haven't the faintest clue - # what we should parse it as, and we have to just add it to our list - # of unparsed stuff. - if raw_name in _STRING_FIELDS and len(value) == 1: - raw[raw_name] = value[0] - # If this is one of our list of string fields, then we can just assign - # the value, since email *only* has strings, and our get_all() call - # above ensures that this is a list. - elif raw_name in _LIST_FIELDS: - raw[raw_name] = value - # Special Case: Keywords - # The keywords field is implemented in the metadata spec as a str, - # but it conceptually is a list of strings, and is serialized using - # ", ".join(keywords), so we'll do some light data massaging to turn - # this into what it logically is. - elif raw_name == "keywords" and len(value) == 1: - raw[raw_name] = _parse_keywords(value[0]) - # Special Case: Project-URL - # The project urls is implemented in the metadata spec as a list of - # specially-formatted strings that represent a key and a value, which - # is fundamentally a mapping, however the email format doesn't support - # mappings in a sane way, so it was crammed into a list of strings - # instead. - # - # We will do a little light data massaging to turn this into a map as - # it logically should be. - elif raw_name == "project_urls": - try: - raw[raw_name] = _parse_project_urls(value) - except KeyError: - unparsed[name] = value - # Nothing that we've done has managed to parse this, so it'll just - # throw it in our unparseable data and move on. - else: - unparsed[name] = value - - # We need to support getting the Description from the message payload in - # addition to getting it from the the headers. This does mean, though, there - # is the possibility of it being set both ways, in which case we put both - # in 'unparsed' since we don't know which is right. - try: - payload = _get_payload(parsed, data) - except ValueError: - unparsed.setdefault("description", []).append( - parsed.get_payload(decode=isinstance(data, bytes)) - ) - else: - if payload: - # Check to see if we've already got a description, if so then both - # it, and this body move to unparseable. - if "description" in raw: - description_header = cast(str, raw.pop("description")) - unparsed.setdefault("description", []).extend( - [description_header, payload] - ) - elif "description" in unparsed: - unparsed["description"].append(payload) - else: - raw["description"] = payload - - # We need to cast our `raw` to a metadata, because a TypedDict only support - # literal key names, but we're computing our key names on purpose, but the - # way this function is implemented, our `TypedDict` can only have valid key - # names. - return cast(RawMetadata, raw), unparsed - - -_NOT_FOUND = object() - - -# Keep the two values in sync. -_VALID_METADATA_VERSIONS = ["1.0", "1.1", "1.2", "2.1", "2.2", "2.3"] -_MetadataVersion = Literal["1.0", "1.1", "1.2", "2.1", "2.2", "2.3"] - -_REQUIRED_ATTRS = frozenset(["metadata_version", "name", "version"]) - - -class _Validator(Generic[T]): - """Validate a metadata field. - - All _process_*() methods correspond to a core metadata field. The method is - called with the field's raw value. If the raw value is valid it is returned - in its "enriched" form (e.g. ``version.Version`` for the ``Version`` field). - If the raw value is invalid, :exc:`InvalidMetadata` is raised (with a cause - as appropriate). - """ - - name: str - raw_name: str - added: _MetadataVersion - - def __init__( - self, - *, - added: _MetadataVersion = "1.0", - ) -> None: - self.added = added - - def __set_name__(self, _owner: "Metadata", name: str) -> None: - self.name = name - self.raw_name = _RAW_TO_EMAIL_MAPPING[name] - - def __get__(self, instance: "Metadata", _owner: Type["Metadata"]) -> T: - # With Python 3.8, the caching can be replaced with functools.cached_property(). - # No need to check the cache as attribute lookup will resolve into the - # instance's __dict__ before __get__ is called. - cache = instance.__dict__ - value = instance._raw.get(self.name) - - # To make the _process_* methods easier, we'll check if the value is None - # and if this field is NOT a required attribute, and if both of those - # things are true, we'll skip the the converter. This will mean that the - # converters never have to deal with the None union. - if self.name in _REQUIRED_ATTRS or value is not None: - try: - converter: Callable[[Any], T] = getattr(self, f"_process_{self.name}") - except AttributeError: - pass - else: - value = converter(value) - - cache[self.name] = value - try: - del instance._raw[self.name] # type: ignore[misc] - except KeyError: - pass - - return cast(T, value) - - def _invalid_metadata( - self, msg: str, cause: Optional[Exception] = None - ) -> InvalidMetadata: - exc = InvalidMetadata( - self.raw_name, msg.format_map({"field": repr(self.raw_name)}) - ) - exc.__cause__ = cause - return exc - - def _process_metadata_version(self, value: str) -> _MetadataVersion: - # Implicitly makes Metadata-Version required. - if value not in _VALID_METADATA_VERSIONS: - raise self._invalid_metadata(f"{value!r} is not a valid metadata version") - return cast(_MetadataVersion, value) - - def _process_name(self, value: str) -> str: - if not value: - raise self._invalid_metadata("{field} is a required field") - # Validate the name as a side-effect. - try: - utils.canonicalize_name(value, validate=True) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) - else: - return value - - def _process_version(self, value: str) -> version_module.Version: - if not value: - raise self._invalid_metadata("{field} is a required field") - try: - return version_module.parse(value) - except version_module.InvalidVersion as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) - - def _process_summary(self, value: str) -> str: - """Check the field contains no newlines.""" - if "\n" in value: - raise self._invalid_metadata("{field} must be a single line") - return value - - def _process_description_content_type(self, value: str) -> str: - content_types = {"text/plain", "text/x-rst", "text/markdown"} - message = email.message.EmailMessage() - message["content-type"] = value - - content_type, parameters = ( - # Defaults to `text/plain` if parsing failed. - message.get_content_type().lower(), - message["content-type"].params, - ) - # Check if content-type is valid or defaulted to `text/plain` and thus was - # not parseable. - if content_type not in content_types or content_type not in value.lower(): - raise self._invalid_metadata( - f"{{field}} must be one of {list(content_types)}, not {value!r}" - ) - - charset = parameters.get("charset", "UTF-8") - if charset != "UTF-8": - raise self._invalid_metadata( - f"{{field}} can only specify the UTF-8 charset, not {list(charset)}" - ) - - markdown_variants = {"GFM", "CommonMark"} - variant = parameters.get("variant", "GFM") # Use an acceptable default. - if content_type == "text/markdown" and variant not in markdown_variants: - raise self._invalid_metadata( - f"valid Markdown variants for {{field}} are {list(markdown_variants)}, " - f"not {variant!r}", - ) - return value - - def _process_dynamic(self, value: List[str]) -> List[str]: - for dynamic_field in map(str.lower, value): - if dynamic_field in {"name", "version", "metadata-version"}: - raise self._invalid_metadata( - f"{value!r} is not allowed as a dynamic field" - ) - elif dynamic_field not in _EMAIL_TO_RAW_MAPPING: - raise self._invalid_metadata(f"{value!r} is not a valid dynamic field") - return list(map(str.lower, value)) - - def _process_provides_extra( - self, - value: List[str], - ) -> List[utils.NormalizedName]: - normalized_names = [] - try: - for name in value: - normalized_names.append(utils.canonicalize_name(name, validate=True)) - except utils.InvalidName as exc: - raise self._invalid_metadata( - f"{name!r} is invalid for {{field}}", cause=exc - ) - else: - return normalized_names - - def _process_requires_python(self, value: str) -> specifiers.SpecifierSet: - try: - return specifiers.SpecifierSet(value) - except specifiers.InvalidSpecifier as exc: - raise self._invalid_metadata( - f"{value!r} is invalid for {{field}}", cause=exc - ) - - def _process_requires_dist( - self, - value: List[str], - ) -> List[requirements.Requirement]: - reqs = [] - try: - for req in value: - reqs.append(requirements.Requirement(req)) - except requirements.InvalidRequirement as exc: - raise self._invalid_metadata(f"{req!r} is invalid for {{field}}", cause=exc) - else: - return reqs - - -class Metadata: - """Representation of distribution metadata. - - Compared to :class:`RawMetadata`, this class provides objects representing - metadata fields instead of only using built-in types. Any invalid metadata - will cause :exc:`InvalidMetadata` to be raised (with a - :py:attr:`~BaseException.__cause__` attribute as appropriate). - """ - - _raw: RawMetadata - - @classmethod - def from_raw(cls, data: RawMetadata, *, validate: bool = True) -> "Metadata": - """Create an instance from :class:`RawMetadata`. - - If *validate* is true, all metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - ins = cls() - ins._raw = data.copy() # Mutations occur due to caching enriched values. - - if validate: - exceptions: List[Exception] = [] - try: - metadata_version = ins.metadata_version - metadata_age = _VALID_METADATA_VERSIONS.index(metadata_version) - except InvalidMetadata as metadata_version_exc: - exceptions.append(metadata_version_exc) - metadata_version = None - - # Make sure to check for the fields that are present, the required - # fields (so their absence can be reported). - fields_to_check = frozenset(ins._raw) | _REQUIRED_ATTRS - # Remove fields that have already been checked. - fields_to_check -= {"metadata_version"} - - for key in fields_to_check: - try: - if metadata_version: - # Can't use getattr() as that triggers descriptor protocol which - # will fail due to no value for the instance argument. - try: - field_metadata_version = cls.__dict__[key].added - except KeyError: - exc = InvalidMetadata(key, f"unrecognized field: {key!r}") - exceptions.append(exc) - continue - field_age = _VALID_METADATA_VERSIONS.index( - field_metadata_version - ) - if field_age > metadata_age: - field = _RAW_TO_EMAIL_MAPPING[key] - exc = InvalidMetadata( - field, - "{field} introduced in metadata version " - "{field_metadata_version}, not {metadata_version}", - ) - exceptions.append(exc) - continue - getattr(ins, key) - except InvalidMetadata as exc: - exceptions.append(exc) - - if exceptions: - raise ExceptionGroup("invalid metadata", exceptions) - - return ins - - @classmethod - def from_email( - cls, data: Union[bytes, str], *, validate: bool = True - ) -> "Metadata": - """Parse metadata from email headers. - - If *validate* is true, the metadata will be validated. All exceptions - related to validation will be gathered and raised as an :class:`ExceptionGroup`. - """ - raw, unparsed = parse_email(data) - - if validate: - exceptions: list[Exception] = [] - for unparsed_key in unparsed: - if unparsed_key in _EMAIL_TO_RAW_MAPPING: - message = f"{unparsed_key!r} has invalid data" - else: - message = f"unrecognized field: {unparsed_key!r}" - exceptions.append(InvalidMetadata(unparsed_key, message)) - - if exceptions: - raise ExceptionGroup("unparsed", exceptions) - - try: - return cls.from_raw(raw, validate=validate) - except ExceptionGroup as exc_group: - raise ExceptionGroup( - "invalid or unparsed metadata", exc_group.exceptions - ) from None - - metadata_version: _Validator[_MetadataVersion] = _Validator() - """:external:ref:`core-metadata-metadata-version` - (required; validated to be a valid metadata version)""" - name: _Validator[str] = _Validator() - """:external:ref:`core-metadata-name` - (required; validated using :func:`~packaging.utils.canonicalize_name` and its - *validate* parameter)""" - version: _Validator[version_module.Version] = _Validator() - """:external:ref:`core-metadata-version` (required)""" - dynamic: _Validator[Optional[List[str]]] = _Validator( - added="2.2", - ) - """:external:ref:`core-metadata-dynamic` - (validated against core metadata field names and lowercased)""" - platforms: _Validator[Optional[List[str]]] = _Validator() - """:external:ref:`core-metadata-platform`""" - supported_platforms: _Validator[Optional[List[str]]] = _Validator(added="1.1") - """:external:ref:`core-metadata-supported-platform`""" - summary: _Validator[Optional[str]] = _Validator() - """:external:ref:`core-metadata-summary` (validated to contain no newlines)""" - description: _Validator[Optional[str]] = _Validator() # TODO 2.1: can be in body - """:external:ref:`core-metadata-description`""" - description_content_type: _Validator[Optional[str]] = _Validator(added="2.1") - """:external:ref:`core-metadata-description-content-type` (validated)""" - keywords: _Validator[Optional[List[str]]] = _Validator() - """:external:ref:`core-metadata-keywords`""" - home_page: _Validator[Optional[str]] = _Validator() - """:external:ref:`core-metadata-home-page`""" - download_url: _Validator[Optional[str]] = _Validator(added="1.1") - """:external:ref:`core-metadata-download-url`""" - author: _Validator[Optional[str]] = _Validator() - """:external:ref:`core-metadata-author`""" - author_email: _Validator[Optional[str]] = _Validator() - """:external:ref:`core-metadata-author-email`""" - maintainer: _Validator[Optional[str]] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer`""" - maintainer_email: _Validator[Optional[str]] = _Validator(added="1.2") - """:external:ref:`core-metadata-maintainer-email`""" - license: _Validator[Optional[str]] = _Validator() - """:external:ref:`core-metadata-license`""" - classifiers: _Validator[Optional[List[str]]] = _Validator(added="1.1") - """:external:ref:`core-metadata-classifier`""" - requires_dist: _Validator[Optional[List[requirements.Requirement]]] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-dist`""" - requires_python: _Validator[Optional[specifiers.SpecifierSet]] = _Validator( - added="1.2" - ) - """:external:ref:`core-metadata-requires-python`""" - # Because `Requires-External` allows for non-PEP 440 version specifiers, we - # don't do any processing on the values. - requires_external: _Validator[Optional[List[str]]] = _Validator(added="1.2") - """:external:ref:`core-metadata-requires-external`""" - project_urls: _Validator[Optional[Dict[str, str]]] = _Validator(added="1.2") - """:external:ref:`core-metadata-project-url`""" - # PEP 685 lets us raise an error if an extra doesn't pass `Name` validation - # regardless of metadata version. - provides_extra: _Validator[Optional[List[utils.NormalizedName]]] = _Validator( - added="2.1", - ) - """:external:ref:`core-metadata-provides-extra`""" - provides_dist: _Validator[Optional[List[str]]] = _Validator(added="1.2") - """:external:ref:`core-metadata-provides-dist`""" - obsoletes_dist: _Validator[Optional[List[str]]] = _Validator(added="1.2") - """:external:ref:`core-metadata-obsoletes-dist`""" - requires: _Validator[Optional[List[str]]] = _Validator(added="1.1") - """``Requires`` (deprecated)""" - provides: _Validator[Optional[List[str]]] = _Validator(added="1.1") - """``Provides`` (deprecated)""" - obsoletes: _Validator[Optional[List[str]]] = _Validator(added="1.1") - """``Obsoletes`` (deprecated)""" diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py deleted file mode 100644 index 0c00eba..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +++ /dev/null @@ -1,90 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from typing import Any, Iterator, Optional, Set - -from ._parser import parse_requirement as _parse_requirement -from ._tokenizer import ParserSyntaxError -from .markers import Marker, _normalize_extra_values -from .specifiers import SpecifierSet -from .utils import canonicalize_name - - -class InvalidRequirement(ValueError): - """ - An invalid requirement was found, users should refer to PEP 508. - """ - - -class Requirement: - """Parse a requirement. - - Parse a given requirement string into its parts, such as name, specifier, - URL, and extras. Raises InvalidRequirement on a badly-formed requirement - string. - """ - - # TODO: Can we test whether something is contained within a requirement? - # If so how do we do that? Do we need to test against the _name_ of - # the thing as well as the version? What about the markers? - # TODO: Can we normalize the name and extra name? - - def __init__(self, requirement_string: str) -> None: - try: - parsed = _parse_requirement(requirement_string) - except ParserSyntaxError as e: - raise InvalidRequirement(str(e)) from e - - self.name: str = parsed.name - self.url: Optional[str] = parsed.url or None - self.extras: Set[str] = set(parsed.extras if parsed.extras else []) - self.specifier: SpecifierSet = SpecifierSet(parsed.specifier) - self.marker: Optional[Marker] = None - if parsed.marker is not None: - self.marker = Marker.__new__(Marker) - self.marker._markers = _normalize_extra_values(parsed.marker) - - def _iter_parts(self, name: str) -> Iterator[str]: - yield name - - if self.extras: - formatted_extras = ",".join(sorted(self.extras)) - yield f"[{formatted_extras}]" - - if self.specifier: - yield str(self.specifier) - - if self.url: - yield f"@ {self.url}" - if self.marker: - yield " " - - if self.marker: - yield f"; {self.marker}" - - def __str__(self) -> str: - return "".join(self._iter_parts(self.name)) - - def __repr__(self) -> str: - return f"" - - def __hash__(self) -> int: - return hash( - ( - self.__class__.__name__, - *self._iter_parts(canonicalize_name(self.name)), - ) - ) - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, Requirement): - return NotImplemented - - return ( - canonicalize_name(self.name) == canonicalize_name(other.name) - and self.extras == other.extras - and self.specifier == other.specifier - and self.url == other.url - and self.marker == other.marker - ) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py deleted file mode 100644 index 9444832..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +++ /dev/null @@ -1,1030 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier - from packaging.version import Version -""" - -import abc -import itertools -import re -from typing import ( - Callable, - Iterable, - Iterator, - List, - Optional, - Set, - Tuple, - TypeVar, - Union, -) - -from .utils import canonicalize_version -from .version import Version - -UnparsedVersion = Union[Version, str] -UnparsedVersionVar = TypeVar("UnparsedVersionVar", bound=UnparsedVersion) -CallableOperator = Callable[[Version, str], bool] - - -def _coerce_version(version: UnparsedVersion) -> Version: - if not isinstance(version, Version): - version = Version(version) - return version - - -class InvalidSpecifier(ValueError): - """ - Raised when attempting to create a :class:`Specifier` with a specifier - string that is invalid. - - >>> Specifier("lolwat") - Traceback (most recent call last): - ... - packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat' - """ - - -class BaseSpecifier(metaclass=abc.ABCMeta): - @abc.abstractmethod - def __str__(self) -> str: - """ - Returns the str representation of this Specifier-like object. This - should be representative of the Specifier itself. - """ - - @abc.abstractmethod - def __hash__(self) -> int: - """ - Returns a hash value for this Specifier-like object. - """ - - @abc.abstractmethod - def __eq__(self, other: object) -> bool: - """ - Returns a boolean representing whether or not the two Specifier-like - objects are equal. - - :param other: The other object to check against. - """ - - @property - @abc.abstractmethod - def prereleases(self) -> Optional[bool]: - """Whether or not pre-releases as a whole are allowed. - - This can be set to either ``True`` or ``False`` to explicitly enable or disable - prereleases or it can be set to ``None`` (the default) to use default semantics. - """ - - @prereleases.setter - def prereleases(self, value: bool) -> None: - """Setter for :attr:`prereleases`. - - :param value: The value to set. - """ - - @abc.abstractmethod - def contains(self, item: str, prereleases: Optional[bool] = None) -> bool: - """ - Determines if the given item is contained within this specifier. - """ - - @abc.abstractmethod - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None - ) -> Iterator[UnparsedVersionVar]: - """ - Takes an iterable of items and filters them so that only items which - are contained within this specifier are allowed in it. - """ - - -class Specifier(BaseSpecifier): - """This class abstracts handling of version specifiers. - - .. tip:: - - It is generally not required to instantiate this manually. You should instead - prefer to work with :class:`SpecifierSet` instead, which can parse - comma-separated version specifiers (which is what package metadata contains). - """ - - _operator_regex_str = r""" - (?P(~=|==|!=|<=|>=|<|>|===)) - """ - _version_regex_str = r""" - (?P - (?: - # The identity operators allow for an escape hatch that will - # do an exact string match of the version you wish to install. - # This will not be parsed by PEP 440 and we cannot determine - # any semantic meaning from it. This operator is discouraged - # but included entirely as an escape hatch. - (?<====) # Only match for the identity operator - \s* - [^\s;)]* # The arbitrary version can be just about anything, - # we match everything except for whitespace, a - # semi-colon for marker support, and a closing paren - # since versions can be enclosed in them. - ) - | - (?: - # The (non)equality operators allow for wild card and local - # versions to be specified so we have to define these two - # operators separately to enable that. - (?<===|!=) # Only match for equals and not equals - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)* # release - - # You cannot use a wild card and a pre-release, post-release, a dev or - # local version together so group them with a | and make them optional. - (?: - \.\* # Wild card syntax of .* - | - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local - )? - ) - | - (?: - # The compatible operator requires at least two digits in the - # release segment. - (?<=~=) # Only match for the compatible operator - - \s* - v? - (?:[0-9]+!)? # epoch - [0-9]+(?:\.[0-9]+)+ # release (We have a + instead of a *) - (?: # pre release - [-_\.]? - (alpha|beta|preview|pre|a|b|c|rc) - [-_\.]? - [0-9]* - )? - (?: # post release - (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*) - )? - (?:[-_\.]?dev[-_\.]?[0-9]*)? # dev release - ) - | - (?: - # All other operators only allow a sub set of what the - # (non)equality operators do. Specifically they do not allow - # local versions to be specified nor do they allow the prefix - # matching wild cards. - (?=": "greater_than_equal", - "<": "less_than", - ">": "greater_than", - "===": "arbitrary", - } - - def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None: - """Initialize a Specifier instance. - - :param spec: - The string representation of a specifier which will be parsed and - normalized before use. - :param prereleases: - This tells the specifier if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - :raises InvalidSpecifier: - If the given specifier is invalid (i.e. bad syntax). - """ - match = self._regex.search(spec) - if not match: - raise InvalidSpecifier(f"Invalid specifier: '{spec}'") - - self._spec: Tuple[str, str] = ( - match.group("operator").strip(), - match.group("version").strip(), - ) - - # Store whether or not this Specifier should accept prereleases - self._prereleases = prereleases - - # https://github.com/python/mypy/pull/13475#pullrequestreview-1079784515 - @property # type: ignore[override] - def prereleases(self) -> bool: - # If there is an explicit prereleases set for this, then we'll just - # blindly use that. - if self._prereleases is not None: - return self._prereleases - - # Look at all of our specifiers and determine if they are inclusive - # operators, and if they are if they are including an explicit - # prerelease. - operator, version = self._spec - if operator in ["==", ">=", "<=", "~=", "==="]: - # The == specifier can include a trailing .*, if it does we - # want to remove before parsing. - if operator == "==" and version.endswith(".*"): - version = version[:-2] - - # Parse the version, and if it is a pre-release than this - # specifier allows pre-releases. - if Version(version).is_prerelease: - return True - - return False - - @prereleases.setter - def prereleases(self, value: bool) -> None: - self._prereleases = value - - @property - def operator(self) -> str: - """The operator of this specifier. - - >>> Specifier("==1.2.3").operator - '==' - """ - return self._spec[0] - - @property - def version(self) -> str: - """The version of this specifier. - - >>> Specifier("==1.2.3").version - '1.2.3' - """ - return self._spec[1] - - def __repr__(self) -> str: - """A representation of the Specifier that shows all internal state. - - >>> Specifier('>=1.0.0') - =1.0.0')> - >>> Specifier('>=1.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> Specifier('>=1.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"<{self.__class__.__name__}({str(self)!r}{pre})>" - - def __str__(self) -> str: - """A string representation of the Specifier that can be round-tripped. - - >>> str(Specifier('>=1.0.0')) - '>=1.0.0' - >>> str(Specifier('>=1.0.0', prereleases=False)) - '>=1.0.0' - """ - return "{}{}".format(*self._spec) - - @property - def _canonical_spec(self) -> Tuple[str, str]: - canonical_version = canonicalize_version( - self._spec[1], - strip_trailing_zero=(self._spec[0] != "~="), - ) - return self._spec[0], canonical_version - - def __hash__(self) -> int: - return hash(self._canonical_spec) - - def __eq__(self, other: object) -> bool: - """Whether or not the two Specifier-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0") - True - >>> (Specifier("==1.2.3", prereleases=False) == - ... Specifier("==1.2.3", prereleases=True)) - True - >>> Specifier("==1.2.3") == "==1.2.3" - True - >>> Specifier("==1.2.3") == Specifier("==1.2.4") - False - >>> Specifier("==1.2.3") == Specifier("~=1.2.3") - False - """ - if isinstance(other, str): - try: - other = self.__class__(str(other)) - except InvalidSpecifier: - return NotImplemented - elif not isinstance(other, self.__class__): - return NotImplemented - - return self._canonical_spec == other._canonical_spec - - def _get_operator(self, op: str) -> CallableOperator: - operator_callable: CallableOperator = getattr( - self, f"_compare_{self._operators[op]}" - ) - return operator_callable - - def _compare_compatible(self, prospective: Version, spec: str) -> bool: - - # Compatible releases have an equivalent combination of >= and ==. That - # is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to - # implement this in terms of the other specifiers instead of - # implementing it ourselves. The only thing we need to do is construct - # the other specifiers. - - # We want everything but the last item in the version, but we want to - # ignore suffix segments. - prefix = _version_join( - list(itertools.takewhile(_is_not_suffix, _version_split(spec)))[:-1] - ) - - # Add the prefix notation to the end of our string - prefix += ".*" - - return self._get_operator(">=")(prospective, spec) and self._get_operator("==")( - prospective, prefix - ) - - def _compare_equal(self, prospective: Version, spec: str) -> bool: - - # We need special logic to handle prefix matching - if spec.endswith(".*"): - # In the case of prefix matching we want to ignore local segment. - normalized_prospective = canonicalize_version( - prospective.public, strip_trailing_zero=False - ) - # Get the normalized version string ignoring the trailing .* - normalized_spec = canonicalize_version(spec[:-2], strip_trailing_zero=False) - # Split the spec out by bangs and dots, and pretend that there is - # an implicit dot in between a release segment and a pre-release segment. - split_spec = _version_split(normalized_spec) - - # Split the prospective version out by bangs and dots, and pretend - # that there is an implicit dot in between a release segment and - # a pre-release segment. - split_prospective = _version_split(normalized_prospective) - - # 0-pad the prospective version before shortening it to get the correct - # shortened version. - padded_prospective, _ = _pad_version(split_prospective, split_spec) - - # Shorten the prospective version to be the same length as the spec - # so that we can determine if the specifier is a prefix of the - # prospective version or not. - shortened_prospective = padded_prospective[: len(split_spec)] - - return shortened_prospective == split_spec - else: - # Convert our spec string into a Version - spec_version = Version(spec) - - # If the specifier does not have a local segment, then we want to - # act as if the prospective version also does not have a local - # segment. - if not spec_version.local: - prospective = Version(prospective.public) - - return prospective == spec_version - - def _compare_not_equal(self, prospective: Version, spec: str) -> bool: - return not self._compare_equal(prospective, spec) - - def _compare_less_than_equal(self, prospective: Version, spec: str) -> bool: - - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return Version(prospective.public) <= Version(spec) - - def _compare_greater_than_equal(self, prospective: Version, spec: str) -> bool: - - # NB: Local version identifiers are NOT permitted in the version - # specifier, so local version labels can be universally removed from - # the prospective version. - return Version(prospective.public) >= Version(spec) - - def _compare_less_than(self, prospective: Version, spec_str: str) -> bool: - - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = Version(spec_str) - - # Check to see if the prospective version is less than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective < spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a pre-release version, that we do not accept pre-release - # versions for the version mentioned in the specifier (e.g. <3.1 should - # not match 3.1.dev0, but should match 3.0.dev0). - if not spec.is_prerelease and prospective.is_prerelease: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # If we've gotten to here, it means that prospective version is both - # less than the spec version *and* it's not a pre-release of the same - # version in the spec. - return True - - def _compare_greater_than(self, prospective: Version, spec_str: str) -> bool: - - # Convert our spec to a Version instance, since we'll want to work with - # it as a version. - spec = Version(spec_str) - - # Check to see if the prospective version is greater than the spec - # version. If it's not we can short circuit and just return False now - # instead of doing extra unneeded work. - if not prospective > spec: - return False - - # This special case is here so that, unless the specifier itself - # includes is a post-release version, that we do not accept - # post-release versions for the version mentioned in the specifier - # (e.g. >3.1 should not match 3.0.post0, but should match 3.2.post0). - if not spec.is_postrelease and prospective.is_postrelease: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # Ensure that we do not allow a local version of the version mentioned - # in the specifier, which is technically greater than, to match. - if prospective.local is not None: - if Version(prospective.base_version) == Version(spec.base_version): - return False - - # If we've gotten to here, it means that prospective version is both - # greater than the spec version *and* it's not a pre-release of the - # same version in the spec. - return True - - def _compare_arbitrary(self, prospective: Version, spec: str) -> bool: - return str(prospective).lower() == str(spec).lower() - - def __contains__(self, item: Union[str, Version]) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in Specifier(">=1.2.3") - True - >>> Version("1.2.3") in Specifier(">=1.2.3") - True - >>> "1.0.0" in Specifier(">=1.2.3") - False - >>> "1.3.0a1" in Specifier(">=1.2.3") - False - >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True) - True - """ - return self.contains(item) - - def contains( - self, item: UnparsedVersion, prereleases: Optional[bool] = None - ) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this Specifier. If set to - ``None`` (the default), it uses :attr:`prereleases` to determine - whether or not prereleases are allowed. - - >>> Specifier(">=1.2.3").contains("1.2.3") - True - >>> Specifier(">=1.2.3").contains(Version("1.2.3")) - True - >>> Specifier(">=1.2.3").contains("1.0.0") - False - >>> Specifier(">=1.2.3").contains("1.3.0a1") - False - >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1") - True - >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True) - True - """ - - # Determine if prereleases are to be allowed or not. - if prereleases is None: - prereleases = self.prereleases - - # Normalize item to a Version, this allows us to have a shortcut for - # "2.0" in Specifier(">=2") - normalized_item = _coerce_version(item) - - # Determine if we should be supporting prereleases in this specifier - # or not, if we do not support prereleases than we can short circuit - # logic if this version is a prereleases. - if normalized_item.is_prerelease and not prereleases: - return False - - # Actually do the comparison to determine if this item is contained - # within this Specifier or not. - operator_callable: CallableOperator = self._get_operator(self.operator) - return operator_callable(normalized_item, self.version) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifier. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will be intelligently decide whether to allow - prereleases or not (based on the :attr:`prereleases` attribute, and - whether the only versions matching are prereleases). - - This method is smarter than just ``filter(Specifier().contains, [...])`` - because it implements the rule from :pep:`440` that a prerelease item - SHOULD be accepted if no other versions match the given specifier. - - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")])) - ['1.2.3', '1.3', ] - >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"])) - ['1.5a1'] - >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - """ - - yielded = False - found_prereleases = [] - - kw = {"prereleases": prereleases if prereleases is not None else True} - - # Attempt to iterate over all the values in the iterable and if any of - # them match, yield them. - for version in iterable: - parsed_version = _coerce_version(version) - - if self.contains(parsed_version, **kw): - # If our version is a prerelease, and we were not set to allow - # prereleases, then we'll store it for later in case nothing - # else matches this specifier. - if parsed_version.is_prerelease and not ( - prereleases or self.prereleases - ): - found_prereleases.append(version) - # Either this is not a prerelease, or we should have been - # accepting prereleases from the beginning. - else: - yielded = True - yield version - - # Now that we've iterated over everything, determine if we've yielded - # any values, and if we have not and we have any prereleases stored up - # then we will go ahead and yield the prereleases. - if not yielded and found_prereleases: - for version in found_prereleases: - yield version - - -_prefix_regex = re.compile(r"^([0-9]+)((?:a|b|c|rc)[0-9]+)$") - - -def _version_split(version: str) -> List[str]: - """Split version into components. - - The split components are intended for version comparison. The logic does - not attempt to retain the original version string, so joining the - components back with :func:`_version_join` may not produce the original - version string. - """ - result: List[str] = [] - - epoch, _, rest = version.rpartition("!") - result.append(epoch or "0") - - for item in rest.split("."): - match = _prefix_regex.search(item) - if match: - result.extend(match.groups()) - else: - result.append(item) - return result - - -def _version_join(components: List[str]) -> str: - """Join split version components into a version string. - - This function assumes the input came from :func:`_version_split`, where the - first component must be the epoch (either empty or numeric), and all other - components numeric. - """ - epoch, *rest = components - return f"{epoch}!{'.'.join(rest)}" - - -def _is_not_suffix(segment: str) -> bool: - return not any( - segment.startswith(prefix) for prefix in ("dev", "a", "b", "rc", "post") - ) - - -def _pad_version(left: List[str], right: List[str]) -> Tuple[List[str], List[str]]: - left_split, right_split = [], [] - - # Get the release segment of our versions - left_split.append(list(itertools.takewhile(lambda x: x.isdigit(), left))) - right_split.append(list(itertools.takewhile(lambda x: x.isdigit(), right))) - - # Get the rest of our versions - left_split.append(left[len(left_split[0]) :]) - right_split.append(right[len(right_split[0]) :]) - - # Insert our padding - left_split.insert(1, ["0"] * max(0, len(right_split[0]) - len(left_split[0]))) - right_split.insert(1, ["0"] * max(0, len(left_split[0]) - len(right_split[0]))) - - return (list(itertools.chain(*left_split)), list(itertools.chain(*right_split))) - - -class SpecifierSet(BaseSpecifier): - """This class abstracts handling of a set of version specifiers. - - It can be passed a single specifier (``>=3.0``), a comma-separated list of - specifiers (``>=3.0,!=3.1``), or no specifier at all. - """ - - def __init__( - self, specifiers: str = "", prereleases: Optional[bool] = None - ) -> None: - """Initialize a SpecifierSet instance. - - :param specifiers: - The string representation of a specifier or a comma-separated list of - specifiers which will be parsed and normalized before use. - :param prereleases: - This tells the SpecifierSet if it should accept prerelease versions if - applicable or not. The default of ``None`` will autodetect it from the - given specifiers. - - :raises InvalidSpecifier: - If the given ``specifiers`` are not parseable than this exception will be - raised. - """ - - # Split on `,` to break each individual specifier into it's own item, and - # strip each item to remove leading/trailing whitespace. - split_specifiers = [s.strip() for s in specifiers.split(",") if s.strip()] - - # Parsed each individual specifier, attempting first to make it a - # Specifier. - parsed: Set[Specifier] = set() - for specifier in split_specifiers: - parsed.add(Specifier(specifier)) - - # Turn our parsed specifiers into a frozen set and save them for later. - self._specs = frozenset(parsed) - - # Store our prereleases value so we can use it later to determine if - # we accept prereleases or not. - self._prereleases = prereleases - - @property - def prereleases(self) -> Optional[bool]: - # If we have been given an explicit prerelease modifier, then we'll - # pass that through here. - if self._prereleases is not None: - return self._prereleases - - # If we don't have any specifiers, and we don't have a forced value, - # then we'll just return None since we don't know if this should have - # pre-releases or not. - if not self._specs: - return None - - # Otherwise we'll see if any of the given specifiers accept - # prereleases, if any of them do we'll return True, otherwise False. - return any(s.prereleases for s in self._specs) - - @prereleases.setter - def prereleases(self, value: bool) -> None: - self._prereleases = value - - def __repr__(self) -> str: - """A representation of the specifier set that shows all internal state. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> SpecifierSet('>=1.0.0,!=2.0.0') - =1.0.0')> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False) - =1.0.0', prereleases=False)> - >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True) - =1.0.0', prereleases=True)> - """ - pre = ( - f", prereleases={self.prereleases!r}" - if self._prereleases is not None - else "" - ) - - return f"" - - def __str__(self) -> str: - """A string representation of the specifier set that can be round-tripped. - - Note that the ordering of the individual specifiers within the set may not - match the input string. - - >>> str(SpecifierSet(">=1.0.0,!=1.0.1")) - '!=1.0.1,>=1.0.0' - >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False)) - '!=1.0.1,>=1.0.0' - """ - return ",".join(sorted(str(s) for s in self._specs)) - - def __hash__(self) -> int: - return hash(self._specs) - - def __and__(self, other: Union["SpecifierSet", str]) -> "SpecifierSet": - """Return a SpecifierSet which is a combination of the two sets. - - :param other: The other object to combine with. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1' - =1.0.0')> - >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1') - =1.0.0')> - """ - if isinstance(other, str): - other = SpecifierSet(other) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - specifier = SpecifierSet() - specifier._specs = frozenset(self._specs | other._specs) - - if self._prereleases is None and other._prereleases is not None: - specifier._prereleases = other._prereleases - elif self._prereleases is not None and other._prereleases is None: - specifier._prereleases = self._prereleases - elif self._prereleases == other._prereleases: - specifier._prereleases = self._prereleases - else: - raise ValueError( - "Cannot combine SpecifierSets with True and False prerelease " - "overrides." - ) - - return specifier - - def __eq__(self, other: object) -> bool: - """Whether or not the two SpecifierSet-like objects are equal. - - :param other: The other object to check against. - - The value of :attr:`prereleases` is ignored. - - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) == - ... SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1" - True - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2") - False - """ - if isinstance(other, (str, Specifier)): - other = SpecifierSet(str(other)) - elif not isinstance(other, SpecifierSet): - return NotImplemented - - return self._specs == other._specs - - def __len__(self) -> int: - """Returns the number of specifiers in this specifier set.""" - return len(self._specs) - - def __iter__(self) -> Iterator[Specifier]: - """ - Returns an iterator over all the underlying :class:`Specifier` instances - in this specifier set. - - >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str) - [, =1.0.0')>] - """ - return iter(self._specs) - - def __contains__(self, item: UnparsedVersion) -> bool: - """Return whether or not the item is contained in this specifier. - - :param item: The item to check for. - - This is used for the ``in`` operator and behaves the same as - :meth:`contains` with no ``prereleases`` argument passed. - - >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1") - True - >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1") - False - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1") - False - >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True) - True - """ - return self.contains(item) - - def contains( - self, - item: UnparsedVersion, - prereleases: Optional[bool] = None, - installed: Optional[bool] = None, - ) -> bool: - """Return whether or not the item is contained in this SpecifierSet. - - :param item: - The item to check for, which can be a version string or a - :class:`Version` instance. - :param prereleases: - Whether or not to match prereleases with this SpecifierSet. If set to - ``None`` (the default), it uses :attr:`prereleases` to determine - whether or not prereleases are allowed. - - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3")) - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1") - False - >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1") - True - >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True) - True - """ - # Ensure that our item is a Version instance. - if not isinstance(item, Version): - item = Version(item) - - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None: - prereleases = self.prereleases - - # We can determine if we're going to allow pre-releases by looking to - # see if any of the underlying items supports them. If none of them do - # and this item is a pre-release then we do not allow it and we can - # short circuit that here. - # Note: This means that 1.0.dev1 would not be contained in something - # like >=1.0.devabc however it would be in >=1.0.debabc,>0.0.dev0 - if not prereleases and item.is_prerelease: - return False - - if installed and item.is_prerelease: - item = Version(item.base_version) - - # We simply dispatch to the underlying specs here to make sure that the - # given version is contained within all of them. - # Note: This use of all() here means that an empty set of specifiers - # will always return True, this is an explicit design decision. - return all(s.contains(item, prereleases=prereleases) for s in self._specs) - - def filter( - self, iterable: Iterable[UnparsedVersionVar], prereleases: Optional[bool] = None - ) -> Iterator[UnparsedVersionVar]: - """Filter items in the given iterable, that match the specifiers in this set. - - :param iterable: - An iterable that can contain version strings and :class:`Version` instances. - The items in the iterable will be filtered according to the specifier. - :param prereleases: - Whether or not to allow prereleases in the returned iterator. If set to - ``None`` (the default), it will be intelligently decide whether to allow - prereleases or not (based on the :attr:`prereleases` attribute, and - whether the only versions matching are prereleases). - - This method is smarter than just ``filter(SpecifierSet(...).contains, [...])`` - because it implements the rule from :pep:`440` that a prerelease item - SHOULD be accepted if no other versions match the given specifier. - - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")])) - ['1.3', ] - >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"])) - [] - >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - - An "empty" SpecifierSet will filter items based on the presence of prerelease - versions in the set. - - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"])) - ['1.3'] - >>> list(SpecifierSet("").filter(["1.5a1"])) - ['1.5a1'] - >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"])) - ['1.3', '1.5a1'] - >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True)) - ['1.3', '1.5a1'] - """ - # Determine if we're forcing a prerelease or not, if we're not forcing - # one for this particular filter call, then we'll use whatever the - # SpecifierSet thinks for whether or not we should support prereleases. - if prereleases is None: - prereleases = self.prereleases - - # If we have any specifiers, then we want to wrap our iterable in the - # filter method for each one, this will act as a logical AND amongst - # each specifier. - if self._specs: - for spec in self._specs: - iterable = spec.filter(iterable, prereleases=bool(prereleases)) - return iter(iterable) - # If we do not have any specifiers, then we need to have a rough filter - # which will filter out any pre-releases, unless there are no final - # releases. - else: - filtered: List[UnparsedVersionVar] = [] - found_prereleases: List[UnparsedVersionVar] = [] - - for item in iterable: - parsed_version = _coerce_version(item) - - # Store any item which is a pre-release for later unless we've - # already found a final version or we are accepting prereleases - if parsed_version.is_prerelease and not prereleases: - if not filtered: - found_prereleases.append(item) - else: - filtered.append(item) - - # If we've found no items except for pre-releases, then we'll go - # ahead and use the pre-releases - if not filtered and found_prereleases and prereleases is None: - return iter(found_prereleases) - - return iter(filtered) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py deleted file mode 100644 index 37f33b1..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py +++ /dev/null @@ -1,553 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import logging -import platform -import struct -import subprocess -import sys -import sysconfig -from importlib.machinery import EXTENSION_SUFFIXES -from typing import ( - Dict, - FrozenSet, - Iterable, - Iterator, - List, - Optional, - Sequence, - Tuple, - Union, - cast, -) - -from . import _manylinux, _musllinux - -logger = logging.getLogger(__name__) - -PythonVersion = Sequence[int] -MacVersion = Tuple[int, int] - -INTERPRETER_SHORT_NAMES: Dict[str, str] = { - "python": "py", # Generic. - "cpython": "cp", - "pypy": "pp", - "ironpython": "ip", - "jython": "jy", -} - - -_32_BIT_INTERPRETER = struct.calcsize("P") == 4 - - -class Tag: - """ - A representation of the tag triple for a wheel. - - Instances are considered immutable and thus are hashable. Equality checking - is also supported. - """ - - __slots__ = ["_interpreter", "_abi", "_platform", "_hash"] - - def __init__(self, interpreter: str, abi: str, platform: str) -> None: - self._interpreter = interpreter.lower() - self._abi = abi.lower() - self._platform = platform.lower() - # The __hash__ of every single element in a Set[Tag] will be evaluated each time - # that a set calls its `.disjoint()` method, which may be called hundreds of - # times when scanning a page of links for packages with tags matching that - # Set[Tag]. Pre-computing the value here produces significant speedups for - # downstream consumers. - self._hash = hash((self._interpreter, self._abi, self._platform)) - - @property - def interpreter(self) -> str: - return self._interpreter - - @property - def abi(self) -> str: - return self._abi - - @property - def platform(self) -> str: - return self._platform - - def __eq__(self, other: object) -> bool: - if not isinstance(other, Tag): - return NotImplemented - - return ( - (self._hash == other._hash) # Short-circuit ASAP for perf reasons. - and (self._platform == other._platform) - and (self._abi == other._abi) - and (self._interpreter == other._interpreter) - ) - - def __hash__(self) -> int: - return self._hash - - def __str__(self) -> str: - return f"{self._interpreter}-{self._abi}-{self._platform}" - - def __repr__(self) -> str: - return f"<{self} @ {id(self)}>" - - -def parse_tag(tag: str) -> FrozenSet[Tag]: - """ - Parses the provided tag (e.g. `py3-none-any`) into a frozenset of Tag instances. - - Returning a set is required due to the possibility that the tag is a - compressed tag set. - """ - tags = set() - interpreters, abis, platforms = tag.split("-") - for interpreter in interpreters.split("."): - for abi in abis.split("."): - for platform_ in platforms.split("."): - tags.add(Tag(interpreter, abi, platform_)) - return frozenset(tags) - - -def _get_config_var(name: str, warn: bool = False) -> Union[int, str, None]: - value: Union[int, str, None] = sysconfig.get_config_var(name) - if value is None and warn: - logger.debug( - "Config variable '%s' is unset, Python ABI tag may be incorrect", name - ) - return value - - -def _normalize_string(string: str) -> str: - return string.replace(".", "_").replace("-", "_").replace(" ", "_") - - -def _abi3_applies(python_version: PythonVersion) -> bool: - """ - Determine if the Python version supports abi3. - - PEP 384 was first implemented in Python 3.2. - """ - return len(python_version) > 1 and tuple(python_version) >= (3, 2) - - -def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]: - py_version = tuple(py_version) # To allow for version comparison. - abis = [] - version = _version_nodot(py_version[:2]) - debug = pymalloc = ucs4 = "" - with_debug = _get_config_var("Py_DEBUG", warn) - has_refcount = hasattr(sys, "gettotalrefcount") - # Windows doesn't set Py_DEBUG, so checking for support of debug-compiled - # extension modules is the best option. - # https://github.com/pypa/pip/issues/3383#issuecomment-173267692 - has_ext = "_d.pyd" in EXTENSION_SUFFIXES - if with_debug or (with_debug is None and (has_refcount or has_ext)): - debug = "d" - if py_version < (3, 8): - with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) - if with_pymalloc or with_pymalloc is None: - pymalloc = "m" - if py_version < (3, 3): - unicode_size = _get_config_var("Py_UNICODE_SIZE", warn) - if unicode_size == 4 or ( - unicode_size is None and sys.maxunicode == 0x10FFFF - ): - ucs4 = "u" - elif debug: - # Debug builds can also load "normal" extension modules. - # We can also assume no UCS-4 or pymalloc requirement. - abis.append(f"cp{version}") - abis.insert( - 0, - "cp{version}{debug}{pymalloc}{ucs4}".format( - version=version, debug=debug, pymalloc=pymalloc, ucs4=ucs4 - ), - ) - return abis - - -def cpython_tags( - python_version: Optional[PythonVersion] = None, - abis: Optional[Iterable[str]] = None, - platforms: Optional[Iterable[str]] = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a CPython interpreter. - - The tags consist of: - - cp-- - - cp-abi3- - - cp-none- - - cp-abi3- # Older Python versions down to 3.2. - - If python_version only specifies a major version then user-provided ABIs and - the 'none' ABItag will be used. - - If 'abi3' or 'none' are specified in 'abis' then they will be yielded at - their normal position and not at the beginning. - """ - if not python_version: - python_version = sys.version_info[:2] - - interpreter = f"cp{_version_nodot(python_version[:2])}" - - if abis is None: - if len(python_version) > 1: - abis = _cpython_abis(python_version, warn) - else: - abis = [] - abis = list(abis) - # 'abi3' and 'none' are explicitly handled later. - for explicit_abi in ("abi3", "none"): - try: - abis.remove(explicit_abi) - except ValueError: - pass - - platforms = list(platforms or platform_tags()) - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - if _abi3_applies(python_version): - yield from (Tag(interpreter, "abi3", platform_) for platform_ in platforms) - yield from (Tag(interpreter, "none", platform_) for platform_ in platforms) - - if _abi3_applies(python_version): - for minor_version in range(python_version[1] - 1, 1, -1): - for platform_ in platforms: - interpreter = "cp{version}".format( - version=_version_nodot((python_version[0], minor_version)) - ) - yield Tag(interpreter, "abi3", platform_) - - -def _generic_abi() -> List[str]: - """ - Return the ABI tag based on EXT_SUFFIX. - """ - # The following are examples of `EXT_SUFFIX`. - # We want to keep the parts which are related to the ABI and remove the - # parts which are related to the platform: - # - linux: '.cpython-310-x86_64-linux-gnu.so' => cp310 - # - mac: '.cpython-310-darwin.so' => cp310 - # - win: '.cp310-win_amd64.pyd' => cp310 - # - win: '.pyd' => cp37 (uses _cpython_abis()) - # - pypy: '.pypy38-pp73-x86_64-linux-gnu.so' => pypy38_pp73 - # - graalpy: '.graalpy-38-native-x86_64-darwin.dylib' - # => graalpy_38_native - - ext_suffix = _get_config_var("EXT_SUFFIX", warn=True) - if not isinstance(ext_suffix, str) or ext_suffix[0] != ".": - raise SystemError("invalid sysconfig.get_config_var('EXT_SUFFIX')") - parts = ext_suffix.split(".") - if len(parts) < 3: - # CPython3.7 and earlier uses ".pyd" on Windows. - return _cpython_abis(sys.version_info[:2]) - soabi = parts[1] - if soabi.startswith("cpython"): - # non-windows - abi = "cp" + soabi.split("-")[1] - elif soabi.startswith("cp"): - # windows - abi = soabi.split("-")[0] - elif soabi.startswith("pypy"): - abi = "-".join(soabi.split("-")[:2]) - elif soabi.startswith("graalpy"): - abi = "-".join(soabi.split("-")[:3]) - elif soabi: - # pyston, ironpython, others? - abi = soabi - else: - return [] - return [_normalize_string(abi)] - - -def generic_tags( - interpreter: Optional[str] = None, - abis: Optional[Iterable[str]] = None, - platforms: Optional[Iterable[str]] = None, - *, - warn: bool = False, -) -> Iterator[Tag]: - """ - Yields the tags for a generic interpreter. - - The tags consist of: - - -- - - The "none" ABI will be added if it was not explicitly provided. - """ - if not interpreter: - interp_name = interpreter_name() - interp_version = interpreter_version(warn=warn) - interpreter = "".join([interp_name, interp_version]) - if abis is None: - abis = _generic_abi() - else: - abis = list(abis) - platforms = list(platforms or platform_tags()) - if "none" not in abis: - abis.append("none") - for abi in abis: - for platform_ in platforms: - yield Tag(interpreter, abi, platform_) - - -def _py_interpreter_range(py_version: PythonVersion) -> Iterator[str]: - """ - Yields Python versions in descending order. - - After the latest version, the major-only version will be yielded, and then - all previous versions of that major version. - """ - if len(py_version) > 1: - yield f"py{_version_nodot(py_version[:2])}" - yield f"py{py_version[0]}" - if len(py_version) > 1: - for minor in range(py_version[1] - 1, -1, -1): - yield f"py{_version_nodot((py_version[0], minor))}" - - -def compatible_tags( - python_version: Optional[PythonVersion] = None, - interpreter: Optional[str] = None, - platforms: Optional[Iterable[str]] = None, -) -> Iterator[Tag]: - """ - Yields the sequence of tags that are compatible with a specific version of Python. - - The tags consist of: - - py*-none- - - -none-any # ... if `interpreter` is provided. - - py*-none-any - """ - if not python_version: - python_version = sys.version_info[:2] - platforms = list(platforms or platform_tags()) - for version in _py_interpreter_range(python_version): - for platform_ in platforms: - yield Tag(version, "none", platform_) - if interpreter: - yield Tag(interpreter, "none", "any") - for version in _py_interpreter_range(python_version): - yield Tag(version, "none", "any") - - -def _mac_arch(arch: str, is_32bit: bool = _32_BIT_INTERPRETER) -> str: - if not is_32bit: - return arch - - if arch.startswith("ppc"): - return "ppc" - - return "i386" - - -def _mac_binary_formats(version: MacVersion, cpu_arch: str) -> List[str]: - formats = [cpu_arch] - if cpu_arch == "x86_64": - if version < (10, 4): - return [] - formats.extend(["intel", "fat64", "fat32"]) - - elif cpu_arch == "i386": - if version < (10, 4): - return [] - formats.extend(["intel", "fat32", "fat"]) - - elif cpu_arch == "ppc64": - # TODO: Need to care about 32-bit PPC for ppc64 through 10.2? - if version > (10, 5) or version < (10, 4): - return [] - formats.append("fat64") - - elif cpu_arch == "ppc": - if version > (10, 6): - return [] - formats.extend(["fat32", "fat"]) - - if cpu_arch in {"arm64", "x86_64"}: - formats.append("universal2") - - if cpu_arch in {"x86_64", "i386", "ppc64", "ppc", "intel"}: - formats.append("universal") - - return formats - - -def mac_platforms( - version: Optional[MacVersion] = None, arch: Optional[str] = None -) -> Iterator[str]: - """ - Yields the platform tags for a macOS system. - - The `version` parameter is a two-item tuple specifying the macOS version to - generate platform tags for. The `arch` parameter is the CPU architecture to - generate platform tags for. Both parameters default to the appropriate value - for the current system. - """ - version_str, _, cpu_arch = platform.mac_ver() - if version is None: - version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2]))) - if version == (10, 16): - # When built against an older macOS SDK, Python will report macOS 10.16 - # instead of the real version. - version_str = subprocess.run( - [ - sys.executable, - "-sS", - "-c", - "import platform; print(platform.mac_ver()[0])", - ], - check=True, - env={"SYSTEM_VERSION_COMPAT": "0"}, - stdout=subprocess.PIPE, - text=True, - ).stdout - version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2]))) - else: - version = version - if arch is None: - arch = _mac_arch(cpu_arch) - else: - arch = arch - - if (10, 0) <= version and version < (11, 0): - # Prior to Mac OS 11, each yearly release of Mac OS bumped the - # "minor" version number. The major version was always 10. - for minor_version in range(version[1], -1, -1): - compat_version = 10, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield "macosx_{major}_{minor}_{binary_format}".format( - major=10, minor=minor_version, binary_format=binary_format - ) - - if version >= (11, 0): - # Starting with Mac OS 11, each yearly release bumps the major version - # number. The minor versions are now the midyear updates. - for major_version in range(version[0], 10, -1): - compat_version = major_version, 0 - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield "macosx_{major}_{minor}_{binary_format}".format( - major=major_version, minor=0, binary_format=binary_format - ) - - if version >= (11, 0): - # Mac OS 11 on x86_64 is compatible with binaries from previous releases. - # Arm64 support was introduced in 11.0, so no Arm binaries from previous - # releases exist. - # - # However, the "universal2" binary format can have a - # macOS version earlier than 11.0 when the x86_64 part of the binary supports - # that version of macOS. - if arch == "x86_64": - for minor_version in range(16, 3, -1): - compat_version = 10, minor_version - binary_formats = _mac_binary_formats(compat_version, arch) - for binary_format in binary_formats: - yield "macosx_{major}_{minor}_{binary_format}".format( - major=compat_version[0], - minor=compat_version[1], - binary_format=binary_format, - ) - else: - for minor_version in range(16, 3, -1): - compat_version = 10, minor_version - binary_format = "universal2" - yield "macosx_{major}_{minor}_{binary_format}".format( - major=compat_version[0], - minor=compat_version[1], - binary_format=binary_format, - ) - - -def _linux_platforms(is_32bit: bool = _32_BIT_INTERPRETER) -> Iterator[str]: - linux = _normalize_string(sysconfig.get_platform()) - if not linux.startswith("linux_"): - # we should never be here, just yield the sysconfig one and return - yield linux - return - if is_32bit: - if linux == "linux_x86_64": - linux = "linux_i686" - elif linux == "linux_aarch64": - linux = "linux_armv8l" - _, arch = linux.split("_", 1) - archs = {"armv8l": ["armv8l", "armv7l"]}.get(arch, [arch]) - yield from _manylinux.platform_tags(archs) - yield from _musllinux.platform_tags(archs) - for arch in archs: - yield f"linux_{arch}" - - -def _generic_platforms() -> Iterator[str]: - yield _normalize_string(sysconfig.get_platform()) - - -def platform_tags() -> Iterator[str]: - """ - Provides the platform tags for this installation. - """ - if platform.system() == "Darwin": - return mac_platforms() - elif platform.system() == "Linux": - return _linux_platforms() - else: - return _generic_platforms() - - -def interpreter_name() -> str: - """ - Returns the name of the running interpreter. - - Some implementations have a reserved, two-letter abbreviation which will - be returned when appropriate. - """ - name = sys.implementation.name - return INTERPRETER_SHORT_NAMES.get(name) or name - - -def interpreter_version(*, warn: bool = False) -> str: - """ - Returns the version of the running interpreter. - """ - version = _get_config_var("py_version_nodot", warn=warn) - if version: - version = str(version) - else: - version = _version_nodot(sys.version_info[:2]) - return version - - -def _version_nodot(version: PythonVersion) -> str: - return "".join(map(str, version)) - - -def sys_tags(*, warn: bool = False) -> Iterator[Tag]: - """ - Returns the sequence of tag triples for the running interpreter. - - The order of the sequence corresponds to priority order for the - interpreter, from most to least important. - """ - - interp_name = interpreter_name() - if interp_name == "cp": - yield from cpython_tags(warn=warn) - else: - yield from generic_tags() - - if interp_name == "pp": - interp = "pp3" - elif interp_name == "cp": - interp = "cp" + interpreter_version(warn=warn) - else: - interp = None - yield from compatible_tags(interpreter=interp) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py deleted file mode 100644 index c2c2f75..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py +++ /dev/null @@ -1,172 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -import re -from typing import FrozenSet, NewType, Tuple, Union, cast - -from .tags import Tag, parse_tag -from .version import InvalidVersion, Version - -BuildTag = Union[Tuple[()], Tuple[int, str]] -NormalizedName = NewType("NormalizedName", str) - - -class InvalidName(ValueError): - """ - An invalid distribution name; users should refer to the packaging user guide. - """ - - -class InvalidWheelFilename(ValueError): - """ - An invalid wheel filename was found, users should refer to PEP 427. - """ - - -class InvalidSdistFilename(ValueError): - """ - An invalid sdist filename was found, users should refer to the packaging user guide. - """ - - -# Core metadata spec for `Name` -_validate_regex = re.compile( - r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE -) -_canonicalize_regex = re.compile(r"[-_.]+") -_normalized_regex = re.compile(r"^([a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9])$") -# PEP 427: The build number must start with a digit. -_build_tag_regex = re.compile(r"(\d+)(.*)") - - -def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName: - if validate and not _validate_regex.match(name): - raise InvalidName(f"name is invalid: {name!r}") - # This is taken from PEP 503. - value = _canonicalize_regex.sub("-", name).lower() - return cast(NormalizedName, value) - - -def is_normalized_name(name: str) -> bool: - return _normalized_regex.match(name) is not None - - -def canonicalize_version( - version: Union[Version, str], *, strip_trailing_zero: bool = True -) -> str: - """ - This is very similar to Version.__str__, but has one subtle difference - with the way it handles the release segment. - """ - if isinstance(version, str): - try: - parsed = Version(version) - except InvalidVersion: - # Legacy versions cannot be normalized - return version - else: - parsed = version - - parts = [] - - # Epoch - if parsed.epoch != 0: - parts.append(f"{parsed.epoch}!") - - # Release segment - release_segment = ".".join(str(x) for x in parsed.release) - if strip_trailing_zero: - # NB: This strips trailing '.0's to normalize - release_segment = re.sub(r"(\.0)+$", "", release_segment) - parts.append(release_segment) - - # Pre-release - if parsed.pre is not None: - parts.append("".join(str(x) for x in parsed.pre)) - - # Post-release - if parsed.post is not None: - parts.append(f".post{parsed.post}") - - # Development release - if parsed.dev is not None: - parts.append(f".dev{parsed.dev}") - - # Local version segment - if parsed.local is not None: - parts.append(f"+{parsed.local}") - - return "".join(parts) - - -def parse_wheel_filename( - filename: str, -) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]: - if not filename.endswith(".whl"): - raise InvalidWheelFilename( - f"Invalid wheel filename (extension must be '.whl'): {filename}" - ) - - filename = filename[:-4] - dashes = filename.count("-") - if dashes not in (4, 5): - raise InvalidWheelFilename( - f"Invalid wheel filename (wrong number of parts): {filename}" - ) - - parts = filename.split("-", dashes - 2) - name_part = parts[0] - # See PEP 427 for the rules on escaping the project name. - if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None: - raise InvalidWheelFilename(f"Invalid project name: {filename}") - name = canonicalize_name(name_part) - - try: - version = Version(parts[1]) - except InvalidVersion as e: - raise InvalidWheelFilename( - f"Invalid wheel filename (invalid version): {filename}" - ) from e - - if dashes == 5: - build_part = parts[2] - build_match = _build_tag_regex.match(build_part) - if build_match is None: - raise InvalidWheelFilename( - f"Invalid build number: {build_part} in '{filename}'" - ) - build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2))) - else: - build = () - tags = parse_tag(parts[-1]) - return (name, version, build, tags) - - -def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]: - if filename.endswith(".tar.gz"): - file_stem = filename[: -len(".tar.gz")] - elif filename.endswith(".zip"): - file_stem = filename[: -len(".zip")] - else: - raise InvalidSdistFilename( - f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):" - f" {filename}" - ) - - # We are requiring a PEP 440 version, which cannot contain dashes, - # so we split on the last dash. - name_part, sep, version_part = file_stem.rpartition("-") - if not sep: - raise InvalidSdistFilename(f"Invalid sdist filename: {filename}") - - name = canonicalize_name(name_part) - - try: - version = Version(version_part) - except InvalidVersion as e: - raise InvalidSdistFilename( - f"Invalid sdist filename (invalid version): {filename}" - ) from e - - return (name, version) diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py b/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py deleted file mode 100644 index 5faab9b..0000000 --- a/node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py +++ /dev/null @@ -1,563 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. -""" -.. testsetup:: - - from packaging.version import parse, Version -""" - -import itertools -import re -from typing import Any, Callable, NamedTuple, Optional, SupportsInt, Tuple, Union - -from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType - -__all__ = ["VERSION_PATTERN", "parse", "Version", "InvalidVersion"] - -LocalType = Tuple[Union[int, str], ...] - -CmpPrePostDevType = Union[InfinityType, NegativeInfinityType, Tuple[str, int]] -CmpLocalType = Union[ - NegativeInfinityType, - Tuple[Union[Tuple[int, str], Tuple[NegativeInfinityType, Union[int, str]]], ...], -] -CmpKey = Tuple[ - int, - Tuple[int, ...], - CmpPrePostDevType, - CmpPrePostDevType, - CmpPrePostDevType, - CmpLocalType, -] -VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool] - - -class _Version(NamedTuple): - epoch: int - release: Tuple[int, ...] - dev: Optional[Tuple[str, int]] - pre: Optional[Tuple[str, int]] - post: Optional[Tuple[str, int]] - local: Optional[LocalType] - - -def parse(version: str) -> "Version": - """Parse the given version string. - - >>> parse('1.0.dev1') - - - :param version: The version string to parse. - :raises InvalidVersion: When the version string is not a valid version. - """ - return Version(version) - - -class InvalidVersion(ValueError): - """Raised when a version string is not a valid version. - - >>> Version("invalid") - Traceback (most recent call last): - ... - packaging.version.InvalidVersion: Invalid version: 'invalid' - """ - - -class _BaseVersion: - _key: Tuple[Any, ...] - - def __hash__(self) -> int: - return hash(self._key) - - # Please keep the duplicated `isinstance` check - # in the six comparisons hereunder - # unless you find a way to avoid adding overhead function calls. - def __lt__(self, other: "_BaseVersion") -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key < other._key - - def __le__(self, other: "_BaseVersion") -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key <= other._key - - def __eq__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key == other._key - - def __ge__(self, other: "_BaseVersion") -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key >= other._key - - def __gt__(self, other: "_BaseVersion") -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key > other._key - - def __ne__(self, other: object) -> bool: - if not isinstance(other, _BaseVersion): - return NotImplemented - - return self._key != other._key - - -# Deliberately not anchored to the start and end of the string, to make it -# easier for 3rd party code to reuse -_VERSION_PATTERN = r""" - v? - (?: - (?:(?P[0-9]+)!)? # epoch - (?P[0-9]+(?:\.[0-9]+)*) # release segment - (?P
                                          # pre-release
-            [-_\.]?
-            (?Palpha|a|beta|b|preview|pre|c|rc)
-            [-_\.]?
-            (?P[0-9]+)?
-        )?
-        (?P                                         # post release
-            (?:-(?P[0-9]+))
-            |
-            (?:
-                [-_\.]?
-                (?Ppost|rev|r)
-                [-_\.]?
-                (?P[0-9]+)?
-            )
-        )?
-        (?P                                          # dev release
-            [-_\.]?
-            (?Pdev)
-            [-_\.]?
-            (?P[0-9]+)?
-        )?
-    )
-    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
-"""
-
-VERSION_PATTERN = _VERSION_PATTERN
-"""
-A string containing the regular expression used to match a valid version.
-
-The pattern is not anchored at either end, and is intended for embedding in larger
-expressions (for example, matching a version number as part of a file name). The
-regular expression should be compiled with the ``re.VERBOSE`` and ``re.IGNORECASE``
-flags set.
-
-:meta hide-value:
-"""
-
-
-class Version(_BaseVersion):
-    """This class abstracts handling of a project's versions.
-
-    A :class:`Version` instance is comparison aware and can be compared and
-    sorted using the standard Python interfaces.
-
-    >>> v1 = Version("1.0a5")
-    >>> v2 = Version("1.0")
-    >>> v1
-    
-    >>> v2
-    
-    >>> v1 < v2
-    True
-    >>> v1 == v2
-    False
-    >>> v1 > v2
-    False
-    >>> v1 >= v2
-    False
-    >>> v1 <= v2
-    True
-    """
-
-    _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE)
-    _key: CmpKey
-
-    def __init__(self, version: str) -> None:
-        """Initialize a Version object.
-
-        :param version:
-            The string representation of a version which will be parsed and normalized
-            before use.
-        :raises InvalidVersion:
-            If the ``version`` does not conform to PEP 440 in any way then this
-            exception will be raised.
-        """
-
-        # Validate the version and parse it into pieces
-        match = self._regex.search(version)
-        if not match:
-            raise InvalidVersion(f"Invalid version: '{version}'")
-
-        # Store the parsed out pieces of the version
-        self._version = _Version(
-            epoch=int(match.group("epoch")) if match.group("epoch") else 0,
-            release=tuple(int(i) for i in match.group("release").split(".")),
-            pre=_parse_letter_version(match.group("pre_l"), match.group("pre_n")),
-            post=_parse_letter_version(
-                match.group("post_l"), match.group("post_n1") or match.group("post_n2")
-            ),
-            dev=_parse_letter_version(match.group("dev_l"), match.group("dev_n")),
-            local=_parse_local_version(match.group("local")),
-        )
-
-        # Generate a key which will be used for sorting
-        self._key = _cmpkey(
-            self._version.epoch,
-            self._version.release,
-            self._version.pre,
-            self._version.post,
-            self._version.dev,
-            self._version.local,
-        )
-
-    def __repr__(self) -> str:
-        """A representation of the Version that shows all internal state.
-
-        >>> Version('1.0.0')
-        
-        """
-        return f""
-
-    def __str__(self) -> str:
-        """A string representation of the version that can be rounded-tripped.
-
-        >>> str(Version("1.0a5"))
-        '1.0a5'
-        """
-        parts = []
-
-        # Epoch
-        if self.epoch != 0:
-            parts.append(f"{self.epoch}!")
-
-        # Release segment
-        parts.append(".".join(str(x) for x in self.release))
-
-        # Pre-release
-        if self.pre is not None:
-            parts.append("".join(str(x) for x in self.pre))
-
-        # Post-release
-        if self.post is not None:
-            parts.append(f".post{self.post}")
-
-        # Development release
-        if self.dev is not None:
-            parts.append(f".dev{self.dev}")
-
-        # Local version segment
-        if self.local is not None:
-            parts.append(f"+{self.local}")
-
-        return "".join(parts)
-
-    @property
-    def epoch(self) -> int:
-        """The epoch of the version.
-
-        >>> Version("2.0.0").epoch
-        0
-        >>> Version("1!2.0.0").epoch
-        1
-        """
-        return self._version.epoch
-
-    @property
-    def release(self) -> Tuple[int, ...]:
-        """The components of the "release" segment of the version.
-
-        >>> Version("1.2.3").release
-        (1, 2, 3)
-        >>> Version("2.0.0").release
-        (2, 0, 0)
-        >>> Version("1!2.0.0.post0").release
-        (2, 0, 0)
-
-        Includes trailing zeroes but not the epoch or any pre-release / development /
-        post-release suffixes.
-        """
-        return self._version.release
-
-    @property
-    def pre(self) -> Optional[Tuple[str, int]]:
-        """The pre-release segment of the version.
-
-        >>> print(Version("1.2.3").pre)
-        None
-        >>> Version("1.2.3a1").pre
-        ('a', 1)
-        >>> Version("1.2.3b1").pre
-        ('b', 1)
-        >>> Version("1.2.3rc1").pre
-        ('rc', 1)
-        """
-        return self._version.pre
-
-    @property
-    def post(self) -> Optional[int]:
-        """The post-release number of the version.
-
-        >>> print(Version("1.2.3").post)
-        None
-        >>> Version("1.2.3.post1").post
-        1
-        """
-        return self._version.post[1] if self._version.post else None
-
-    @property
-    def dev(self) -> Optional[int]:
-        """The development number of the version.
-
-        >>> print(Version("1.2.3").dev)
-        None
-        >>> Version("1.2.3.dev1").dev
-        1
-        """
-        return self._version.dev[1] if self._version.dev else None
-
-    @property
-    def local(self) -> Optional[str]:
-        """The local version segment of the version.
-
-        >>> print(Version("1.2.3").local)
-        None
-        >>> Version("1.2.3+abc").local
-        'abc'
-        """
-        if self._version.local:
-            return ".".join(str(x) for x in self._version.local)
-        else:
-            return None
-
-    @property
-    def public(self) -> str:
-        """The public portion of the version.
-
-        >>> Version("1.2.3").public
-        '1.2.3'
-        >>> Version("1.2.3+abc").public
-        '1.2.3'
-        >>> Version("1.2.3+abc.dev1").public
-        '1.2.3'
-        """
-        return str(self).split("+", 1)[0]
-
-    @property
-    def base_version(self) -> str:
-        """The "base version" of the version.
-
-        >>> Version("1.2.3").base_version
-        '1.2.3'
-        >>> Version("1.2.3+abc").base_version
-        '1.2.3'
-        >>> Version("1!1.2.3+abc.dev1").base_version
-        '1!1.2.3'
-
-        The "base version" is the public version of the project without any pre or post
-        release markers.
-        """
-        parts = []
-
-        # Epoch
-        if self.epoch != 0:
-            parts.append(f"{self.epoch}!")
-
-        # Release segment
-        parts.append(".".join(str(x) for x in self.release))
-
-        return "".join(parts)
-
-    @property
-    def is_prerelease(self) -> bool:
-        """Whether this version is a pre-release.
-
-        >>> Version("1.2.3").is_prerelease
-        False
-        >>> Version("1.2.3a1").is_prerelease
-        True
-        >>> Version("1.2.3b1").is_prerelease
-        True
-        >>> Version("1.2.3rc1").is_prerelease
-        True
-        >>> Version("1.2.3dev1").is_prerelease
-        True
-        """
-        return self.dev is not None or self.pre is not None
-
-    @property
-    def is_postrelease(self) -> bool:
-        """Whether this version is a post-release.
-
-        >>> Version("1.2.3").is_postrelease
-        False
-        >>> Version("1.2.3.post1").is_postrelease
-        True
-        """
-        return self.post is not None
-
-    @property
-    def is_devrelease(self) -> bool:
-        """Whether this version is a development release.
-
-        >>> Version("1.2.3").is_devrelease
-        False
-        >>> Version("1.2.3.dev1").is_devrelease
-        True
-        """
-        return self.dev is not None
-
-    @property
-    def major(self) -> int:
-        """The first item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").major
-        1
-        """
-        return self.release[0] if len(self.release) >= 1 else 0
-
-    @property
-    def minor(self) -> int:
-        """The second item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").minor
-        2
-        >>> Version("1").minor
-        0
-        """
-        return self.release[1] if len(self.release) >= 2 else 0
-
-    @property
-    def micro(self) -> int:
-        """The third item of :attr:`release` or ``0`` if unavailable.
-
-        >>> Version("1.2.3").micro
-        3
-        >>> Version("1").micro
-        0
-        """
-        return self.release[2] if len(self.release) >= 3 else 0
-
-
-def _parse_letter_version(
-    letter: Optional[str], number: Union[str, bytes, SupportsInt, None]
-) -> Optional[Tuple[str, int]]:
-
-    if letter:
-        # We consider there to be an implicit 0 in a pre-release if there is
-        # not a numeral associated with it.
-        if number is None:
-            number = 0
-
-        # We normalize any letters to their lower case form
-        letter = letter.lower()
-
-        # We consider some words to be alternate spellings of other words and
-        # in those cases we want to normalize the spellings to our preferred
-        # spelling.
-        if letter == "alpha":
-            letter = "a"
-        elif letter == "beta":
-            letter = "b"
-        elif letter in ["c", "pre", "preview"]:
-            letter = "rc"
-        elif letter in ["rev", "r"]:
-            letter = "post"
-
-        return letter, int(number)
-    if not letter and number:
-        # We assume if we are given a number, but we are not given a letter
-        # then this is using the implicit post release syntax (e.g. 1.0-1)
-        letter = "post"
-
-        return letter, int(number)
-
-    return None
-
-
-_local_version_separators = re.compile(r"[\._-]")
-
-
-def _parse_local_version(local: Optional[str]) -> Optional[LocalType]:
-    """
-    Takes a string like abc.1.twelve and turns it into ("abc", 1, "twelve").
-    """
-    if local is not None:
-        return tuple(
-            part.lower() if not part.isdigit() else int(part)
-            for part in _local_version_separators.split(local)
-        )
-    return None
-
-
-def _cmpkey(
-    epoch: int,
-    release: Tuple[int, ...],
-    pre: Optional[Tuple[str, int]],
-    post: Optional[Tuple[str, int]],
-    dev: Optional[Tuple[str, int]],
-    local: Optional[LocalType],
-) -> CmpKey:
-
-    # When we compare a release version, we want to compare it with all of the
-    # trailing zeros removed. So we'll use a reverse the list, drop all the now
-    # leading zeros until we come to something non zero, then take the rest
-    # re-reverse it back into the correct order and make it a tuple and use
-    # that for our sorting key.
-    _release = tuple(
-        reversed(list(itertools.dropwhile(lambda x: x == 0, reversed(release))))
-    )
-
-    # We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
-    # We'll do this by abusing the pre segment, but we _only_ want to do this
-    # if there is not a pre or a post segment. If we have one of those then
-    # the normal sorting rules will handle this case correctly.
-    if pre is None and post is None and dev is not None:
-        _pre: CmpPrePostDevType = NegativeInfinity
-    # Versions without a pre-release (except as noted above) should sort after
-    # those with one.
-    elif pre is None:
-        _pre = Infinity
-    else:
-        _pre = pre
-
-    # Versions without a post segment should sort before those with one.
-    if post is None:
-        _post: CmpPrePostDevType = NegativeInfinity
-
-    else:
-        _post = post
-
-    # Versions without a development segment should sort after those with one.
-    if dev is None:
-        _dev: CmpPrePostDevType = Infinity
-
-    else:
-        _dev = dev
-
-    if local is None:
-        # Versions without a local segment should sort before those with one.
-        _local: CmpLocalType = NegativeInfinity
-    else:
-        # Versions with a local segment need that segment parsed to implement
-        # the sorting rules in PEP440.
-        # - Alpha numeric segments sort before numeric segments
-        # - Alpha numeric segments sort lexicographically
-        # - Numeric segments sort numerically
-        # - Shorter versions sort before longer versions when the prefixes
-        #   match exactly
-        _local = tuple(
-            (i, "") if isinstance(i, int) else (NegativeInfinity, i) for i in local
-        )
-
-    return epoch, _release, _pre, _post, _dev, _local
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/pyproject.toml b/node_modules/npm/node_modules/node-gyp/gyp/pyproject.toml
deleted file mode 100644
index 0c25d0b..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/pyproject.toml
+++ /dev/null
@@ -1,119 +0,0 @@
-[build-system]
-requires = ["setuptools>=61.0"]
-build-backend = "setuptools.build_meta"
-
-[project]
-name = "gyp-next"
-version = "0.16.1"
-authors = [
-  { name="Node.js contributors", email="ryzokuken@disroot.org" },
-]
-description = "A fork of the GYP build system for use in the Node.js projects"
-readme = "README.md"
-license = { file="LICENSE" }
-requires-python = ">=3.8"
-# The Python module "packaging" is vendored in the "pylib/packaging" directory to support Python >= 3.12.
-# dependencies = ["packaging>=23.1"]  # Uncomment this line if the vendored version is removed.
-classifiers = [
-    "Development Status :: 3 - Alpha",
-    "Environment :: Console",
-    "Intended Audience :: Developers",
-    "License :: OSI Approved :: BSD License",
-    "Natural Language :: English",
-    "Programming Language :: Python",
-    "Programming Language :: Python :: 3",
-    "Programming Language :: Python :: 3.8",
-    "Programming Language :: Python :: 3.9",
-    "Programming Language :: Python :: 3.10",
-    "Programming Language :: Python :: 3.11",
-]
-
-[project.optional-dependencies]
-dev = ["flake8", "ruff", "pytest"]
-
-[project.scripts]
-gyp = "gyp:script_main"
-
-[project.urls]
-"Homepage" = "https://github.com/nodejs/gyp-next"
-
-[tool.ruff]
-select = [
-  "C4",   # flake8-comprehensions
-  "C90",  # McCabe cyclomatic complexity
-  "DTZ",  # flake8-datetimez
-  "E",    # pycodestyle
-  "F",    # Pyflakes
-  "G",    # flake8-logging-format
-  "ICN",  # flake8-import-conventions
-  "INT",  # flake8-gettext
-  "PL",   # Pylint
-  "PYI",  # flake8-pyi
-  "RSE",  # flake8-raise
-  "RUF",  # Ruff-specific rules
-  "T10",  # flake8-debugger
-  "TCH",  # flake8-type-checking
-  "TID",  # flake8-tidy-imports
-  "UP",   # pyupgrade
-  "W",    # pycodestyle
-  "YTT",  # flake8-2020
-  # "A",    # flake8-builtins
-  # "ANN",  # flake8-annotations
-  # "ARG",  # flake8-unused-arguments
-  # "B",    # flake8-bugbear
-  # "BLE",  # flake8-blind-except
-  # "COM",  # flake8-commas
-  # "D",    # pydocstyle
-  # "DJ",   # flake8-django
-  # "EM",   # flake8-errmsg
-  # "ERA",  # eradicate
-  # "EXE",  # flake8-executable
-  # "FBT",  # flake8-boolean-trap
-  # "I",    # isort
-  # "INP",  # flake8-no-pep420
-  # "ISC",  # flake8-implicit-str-concat
-  # "N",    # pep8-naming
-  # "NPY",  # NumPy-specific rules
-  # "PD",   # pandas-vet
-  # "PGH",  # pygrep-hooks
-  # "PIE",  # flake8-pie
-  # "PT",   # flake8-pytest-style
-  # "PTH",  # flake8-use-pathlib
-  # "Q",    # flake8-quotes
-  # "RET",  # flake8-return
-  # "S",    # flake8-bandit
-  # "SIM",  # flake8-simplify
-  # "SLF",  # flake8-self
-  # "T20",  # flake8-print
-  # "TRY",  # tryceratops
-]
-ignore = [
-  "E721",
-  "PLC1901",
-  "PLR0402",
-  "PLR1714",
-  "PLR2004",
-  "PLR5501",
-  "PLW0603",
-  "PLW2901",
-  "PYI024",
-  "RUF005",
-  "RUF012",
-  "UP031",
-]
-extend-exclude = ["pylib/packaging"]
-line-length = 88
-target-version = "py37"
-
-[tool.ruff.mccabe]
-max-complexity = 101
-
-[tool.ruff.pylint]
-max-args = 11
-max-branches = 108
-max-returns = 10
-max-statements = 286
-
-[tool.setuptools]
-package-dir = {"" = "pylib"}
-packages = ["gyp", "gyp.generator"]
diff --git a/node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py b/node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py
deleted file mode 100755
index b7bb956..0000000
--- a/node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py
+++ /dev/null
@@ -1,261 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2012 Google Inc. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""gyptest.py -- test runner for GYP tests."""
-
-
-import argparse
-import os
-import platform
-import subprocess
-import sys
-import time
-
-
-def is_test_name(f):
-    return f.startswith("gyptest") and f.endswith(".py")
-
-
-def find_all_gyptest_files(directory):
-    result = []
-    for root, dirs, files in os.walk(directory):
-        result.extend([os.path.join(root, f) for f in files if is_test_name(f)])
-    result.sort()
-    return result
-
-
-def main(argv=None):
-    if argv is None:
-        argv = sys.argv
-
-    parser = argparse.ArgumentParser()
-    parser.add_argument("-a", "--all", action="store_true", help="run all tests")
-    parser.add_argument("-C", "--chdir", action="store", help="change to directory")
-    parser.add_argument(
-        "-f",
-        "--format",
-        action="store",
-        default="",
-        help="run tests with the specified formats",
-    )
-    parser.add_argument(
-        "-G",
-        "--gyp_option",
-        action="append",
-        default=[],
-        help="Add -G options to the gyp command line",
-    )
-    parser.add_argument(
-        "-l", "--list", action="store_true", help="list available tests and exit"
-    )
-    parser.add_argument(
-        "-n",
-        "--no-exec",
-        action="store_true",
-        help="no execute, just print the command line",
-    )
-    parser.add_argument(
-        "--path", action="append", default=[], help="additional $PATH directory"
-    )
-    parser.add_argument(
-        "-q",
-        "--quiet",
-        action="store_true",
-        help="quiet, don't print anything unless there are failures",
-    )
-    parser.add_argument(
-        "-v",
-        "--verbose",
-        action="store_true",
-        help="print configuration info and test results.",
-    )
-    parser.add_argument("tests", nargs="*")
-    args = parser.parse_args(argv[1:])
-
-    if args.chdir:
-        os.chdir(args.chdir)
-
-    if args.path:
-        extra_path = [os.path.abspath(p) for p in args.path]
-        extra_path = os.pathsep.join(extra_path)
-        os.environ["PATH"] = extra_path + os.pathsep + os.environ["PATH"]
-
-    if not args.tests:
-        if not args.all:
-            sys.stderr.write("Specify -a to get all tests.\n")
-            return 1
-        args.tests = ["test"]
-
-    tests = []
-    for arg in args.tests:
-        if os.path.isdir(arg):
-            tests.extend(find_all_gyptest_files(os.path.normpath(arg)))
-        else:
-            if not is_test_name(os.path.basename(arg)):
-                print(arg, "is not a valid gyp test name.", file=sys.stderr)
-                sys.exit(1)
-            tests.append(arg)
-
-    if args.list:
-        for test in tests:
-            print(test)
-        sys.exit(0)
-
-    os.environ["PYTHONPATH"] = os.path.abspath("test/lib")
-
-    if args.verbose:
-        print_configuration_info()
-
-    if args.gyp_option and not args.quiet:
-        print("Extra Gyp options: %s\n" % args.gyp_option)
-
-    if args.format:
-        format_list = args.format.split(",")
-    else:
-        format_list = {
-            "aix5": ["make"],
-            "os400": ["make"],
-            "freebsd7": ["make"],
-            "freebsd8": ["make"],
-            "openbsd5": ["make"],
-            "cygwin": ["msvs"],
-            "win32": ["msvs", "ninja"],
-            "linux": ["make", "ninja"],
-            "linux2": ["make", "ninja"],
-            "linux3": ["make", "ninja"],
-            # TODO: Re-enable xcode-ninja.
-            # https://bugs.chromium.org/p/gyp/issues/detail?id=530
-            # 'darwin':   ['make', 'ninja', 'xcode', 'xcode-ninja'],
-            "darwin": ["make", "ninja", "xcode"],
-        }[sys.platform]
-
-    gyp_options = []
-    for option in args.gyp_option:
-        gyp_options += ["-G", option]
-
-    runner = Runner(format_list, tests, gyp_options, args.verbose)
-    runner.run()
-
-    if not args.quiet:
-        runner.print_results()
-
-    return 1 if runner.failures else 0
-
-
-def print_configuration_info():
-    print("Test configuration:")
-    if sys.platform == "darwin":
-        sys.path.append(os.path.abspath("test/lib"))
-        import TestMac
-
-        print(f"  Mac {platform.mac_ver()[0]} {platform.mac_ver()[2]}")
-        print(f"  Xcode {TestMac.Xcode.Version()}")
-    elif sys.platform == "win32":
-        sys.path.append(os.path.abspath("pylib"))
-        import gyp.MSVSVersion
-
-        print("  Win %s %s\n" % platform.win32_ver()[0:2])
-        print("  MSVS %s" % gyp.MSVSVersion.SelectVisualStudioVersion().Description())
-    elif sys.platform in ("linux", "linux2"):
-        print("  Linux %s" % " ".join(platform.linux_distribution()))
-    print(f"  Python {platform.python_version()}")
-    print(f"  PYTHONPATH={os.environ['PYTHONPATH']}")
-    print()
-
-
-class Runner:
-    def __init__(self, formats, tests, gyp_options, verbose):
-        self.formats = formats
-        self.tests = tests
-        self.verbose = verbose
-        self.gyp_options = gyp_options
-        self.failures = []
-        self.num_tests = len(formats) * len(tests)
-        num_digits = len(str(self.num_tests))
-        self.fmt_str = "[%%%dd/%%%dd] (%%s) %%s" % (num_digits, num_digits)
-        self.isatty = sys.stdout.isatty() and not self.verbose
-        self.env = os.environ.copy()
-        self.hpos = 0
-
-    def run(self):
-        run_start = time.time()
-
-        i = 1
-        for fmt in self.formats:
-            for test in self.tests:
-                self.run_test(test, fmt, i)
-                i += 1
-
-        if self.isatty:
-            self.erase_current_line()
-
-        self.took = time.time() - run_start
-
-    def run_test(self, test, fmt, i):
-        if self.isatty:
-            self.erase_current_line()
-
-        msg = self.fmt_str % (i, self.num_tests, fmt, test)
-        self.print_(msg)
-
-        start = time.time()
-        cmd = [sys.executable, test] + self.gyp_options
-        self.env["TESTGYP_FORMAT"] = fmt
-        proc = subprocess.Popen(
-            cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=self.env
-        )
-        proc.wait()
-        took = time.time() - start
-
-        stdout = proc.stdout.read().decode("utf8")
-        if proc.returncode == 2:
-            res = "skipped"
-        elif proc.returncode:
-            res = "failed"
-            self.failures.append(f"({test}) {fmt}")
-        else:
-            res = "passed"
-        res_msg = f" {res} {took:.3f}s"
-        self.print_(res_msg)
-
-        if stdout and not stdout.endswith(("PASSED\n", "NO RESULT\n")):
-            print()
-            print("\n".join(f"    {line}" for line in stdout.splitlines()))
-        elif not self.isatty:
-            print()
-
-    def print_(self, msg):
-        print(msg, end="")
-        index = msg.rfind("\n")
-        if index == -1:
-            self.hpos += len(msg)
-        else:
-            self.hpos = len(msg) - index
-        sys.stdout.flush()
-
-    def erase_current_line(self):
-        print("\b" * self.hpos + " " * self.hpos + "\b" * self.hpos, end="")
-        sys.stdout.flush()
-        self.hpos = 0
-
-    def print_results(self):
-        num_failures = len(self.failures)
-        if num_failures:
-            print()
-            if num_failures == 1:
-                print("Failed the following test:")
-            else:
-                print("Failed the following %d tests:" % num_failures)
-            print("\t" + "\n\t".join(sorted(self.failures)))
-            print()
-        print(
-            "Ran %d tests in %.3fs, %d failed."
-            % (self.num_tests, self.took, num_failures)
-        )
-        print()
-
-
-if __name__ == "__main__":
-    sys.exit(main())
diff --git a/node_modules/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs b/node_modules/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs
deleted file mode 100644
index d2e45a7..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/Find-VisualStudio.cs
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2017 - Refael Ackermann
-// Distributed under MIT style license
-// See accompanying file LICENSE at https://github.com/node4good/windows-autoconf
-
-// Usage:
-// powershell -ExecutionPolicy Unrestricted -Command "Add-Type -Path Find-VisualStudio.cs; [VisualStudioConfiguration.Main]::PrintJson()"
-// This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7.
-
-using System;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
-
-namespace VisualStudioConfiguration
-{
-    [Flags]
-    public enum InstanceState : uint
-    {
-        None = 0,
-        Local = 1,
-        Registered = 2,
-        NoRebootRequired = 4,
-        NoErrors = 8,
-        Complete = 4294967295,
-    }
-
-    [Guid("6380BCFF-41D3-4B2E-8B2E-BF8A6810C848")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface IEnumSetupInstances
-    {
-
-        void Next([MarshalAs(UnmanagedType.U4), In] int celt,
-            [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface), Out] ISetupInstance[] rgelt,
-            [MarshalAs(UnmanagedType.U4)] out int pceltFetched);
-
-        void Skip([MarshalAs(UnmanagedType.U4), In] int celt);
-
-        void Reset();
-
-        [return: MarshalAs(UnmanagedType.Interface)]
-        IEnumSetupInstances Clone();
-    }
-
-    [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupConfiguration
-    {
-    }
-
-    [Guid("26AAB78C-4A60-49D6-AF3B-3C35BC93365D")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupConfiguration2 : ISetupConfiguration
-    {
-
-        [return: MarshalAs(UnmanagedType.Interface)]
-        IEnumSetupInstances EnumInstances();
-
-        [return: MarshalAs(UnmanagedType.Interface)]
-        ISetupInstance GetInstanceForCurrentProcess();
-
-        [return: MarshalAs(UnmanagedType.Interface)]
-        ISetupInstance GetInstanceForPath([MarshalAs(UnmanagedType.LPWStr), In] string path);
-
-        [return: MarshalAs(UnmanagedType.Interface)]
-        IEnumSetupInstances EnumAllInstances();
-    }
-
-    [Guid("B41463C3-8866-43B5-BC33-2B0676F7F42E")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupInstance
-    {
-    }
-
-    [Guid("89143C9A-05AF-49B0-B717-72E218A2185C")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupInstance2 : ISetupInstance
-    {
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetInstanceId();
-
-        [return: MarshalAs(UnmanagedType.Struct)]
-        System.Runtime.InteropServices.ComTypes.FILETIME GetInstallDate();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetInstallationName();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetInstallationPath();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetInstallationVersion();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetDisplayName([MarshalAs(UnmanagedType.U4), In] int lcid);
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetDescription([MarshalAs(UnmanagedType.U4), In] int lcid);
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string ResolvePath([MarshalAs(UnmanagedType.LPWStr), In] string pwszRelativePath);
-
-        [return: MarshalAs(UnmanagedType.U4)]
-        InstanceState GetState();
-
-        [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
-        ISetupPackageReference[] GetPackages();
-
-        ISetupPackageReference GetProduct();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetProductPath();
-
-        [return: MarshalAs(UnmanagedType.VariantBool)]
-        bool IsLaunchable();
-
-        [return: MarshalAs(UnmanagedType.VariantBool)]
-        bool IsComplete();
-
-        [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_UNKNOWN)]
-        ISetupPropertyStore GetProperties();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetEnginePath();
-    }
-
-    [Guid("DA8D8A16-B2B6-4487-A2F1-594CCCCD6BF5")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupPackageReference
-    {
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetId();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetVersion();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetChip();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetLanguage();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetBranch();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetType();
-
-        [return: MarshalAs(UnmanagedType.BStr)]
-        string GetUniqueId();
-
-        [return: MarshalAs(UnmanagedType.VariantBool)]
-        bool GetIsExtension();
-    }
-
-    [Guid("c601c175-a3be-44bc-91f6-4568d230fc83")]
-    [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
-    [ComImport]
-    public interface ISetupPropertyStore
-    {
-
-        [return: MarshalAs(UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_BSTR)]
-        string[] GetNames();
-
-        object GetValue([MarshalAs(UnmanagedType.LPWStr), In] string pwszName);
-    }
-
-    [Guid("42843719-DB4C-46C2-8E7C-64F1816EFD5B")]
-    [CoClass(typeof(SetupConfigurationClass))]
-    [ComImport]
-    public interface SetupConfiguration : ISetupConfiguration2, ISetupConfiguration
-    {
-    }
-
-    [Guid("177F0C4A-1CD3-4DE7-A32C-71DBBB9FA36D")]
-    [ClassInterface(ClassInterfaceType.None)]
-    [ComImport]
-    public class SetupConfigurationClass
-    {
-    }
-
-    public static class Main
-    {
-        public static void PrintJson()
-        {
-            ISetupConfiguration query = new SetupConfiguration();
-            ISetupConfiguration2 query2 = (ISetupConfiguration2)query;
-            IEnumSetupInstances e = query2.EnumAllInstances();
-
-            int pceltFetched;
-            ISetupInstance2[] rgelt = new ISetupInstance2[1];
-            List instances = new List();
-            while (true)
-            {
-                e.Next(1, rgelt, out pceltFetched);
-                if (pceltFetched <= 0)
-                {
-                    Console.WriteLine(String.Format("[{0}]", string.Join(",", instances.ToArray())));
-                    return;
-                }
-
-                try
-                {
-                    instances.Add(InstanceJson(rgelt[0]));
-                }
-                catch (COMException)
-                {
-                    // Ignore instances that can't be queried.
-                }
-            }
-        }
-
-        private static string JsonString(string s)
-        {
-            return "\"" + s.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"";
-        }
-
-        private static string InstanceJson(ISetupInstance2 setupInstance2)
-        {
-            // Visual Studio component directory:
-            // https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids
-
-            StringBuilder json = new StringBuilder();
-            json.Append("{");
-
-            string path = JsonString(setupInstance2.GetInstallationPath());
-            json.Append(String.Format("\"path\":{0},", path));
-
-            string version = JsonString(setupInstance2.GetInstallationVersion());
-            json.Append(String.Format("\"version\":{0},", version));
-
-            List packages = new List();
-            foreach (ISetupPackageReference package in setupInstance2.GetPackages())
-            {
-                string id = JsonString(package.GetId());
-                packages.Add(id);
-            }
-            json.Append(String.Format("\"packages\":[{0}]", string.Join(",", packages.ToArray())));
-
-            json.Append("}");
-            return json.ToString();
-        }
-    }
-}
diff --git a/node_modules/npm/node_modules/node-gyp/lib/build.js b/node_modules/npm/node_modules/node-gyp/lib/build.js
deleted file mode 100644
index 6b8d84d..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/build.js
+++ /dev/null
@@ -1,220 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs').promises
-const path = require('path')
-const { glob } = require('glob')
-const log = require('./log')
-const which = require('which')
-const win = process.platform === 'win32'
-
-async function build (gyp, argv) {
-  let platformMake = 'make'
-  if (process.platform === 'aix') {
-    platformMake = 'gmake'
-  } else if (process.platform === 'os400') {
-    platformMake = 'gmake'
-  } else if (process.platform.indexOf('bsd') !== -1) {
-    platformMake = 'gmake'
-  } else if (win && argv.length > 0) {
-    argv = argv.map(function (target) {
-      return '/t:' + target
-    })
-  }
-
-  const makeCommand = gyp.opts.make || process.env.MAKE || platformMake
-  let command = win ? 'msbuild' : makeCommand
-  const jobs = gyp.opts.jobs || process.env.JOBS
-  let buildType
-  let config
-  let arch
-  let nodeDir
-  let guessedSolution
-  let python
-  let buildBinsDir
-
-  await loadConfigGypi()
-
-  /**
-   * Load the "config.gypi" file that was generated during "configure".
-   */
-
-  async function loadConfigGypi () {
-    let data
-    try {
-      const configPath = path.resolve('build', 'config.gypi')
-      data = await fs.readFile(configPath, 'utf8')
-    } catch (err) {
-      if (err.code === 'ENOENT') {
-        throw new Error('You must run `node-gyp configure` first!')
-      } else {
-        throw err
-      }
-    }
-
-    config = JSON.parse(data.replace(/#.+\n/, ''))
-
-    // get the 'arch', 'buildType', and 'nodeDir' vars from the config
-    buildType = config.target_defaults.default_configuration
-    arch = config.variables.target_arch
-    nodeDir = config.variables.nodedir
-    python = config.variables.python
-
-    if ('debug' in gyp.opts) {
-      buildType = gyp.opts.debug ? 'Debug' : 'Release'
-    }
-    if (!buildType) {
-      buildType = 'Release'
-    }
-
-    log.verbose('build type', buildType)
-    log.verbose('architecture', arch)
-    log.verbose('node dev dir', nodeDir)
-    log.verbose('python', python)
-
-    if (win) {
-      await findSolutionFile()
-    } else {
-      await doWhich()
-    }
-  }
-
-  /**
-   * On Windows, find the first build/*.sln file.
-   */
-
-  async function findSolutionFile () {
-    const files = await glob('build/*.sln')
-    if (files.length === 0) {
-      throw new Error('Could not find *.sln file. Did you run "configure"?')
-    }
-    guessedSolution = files[0]
-    log.verbose('found first Solution file', guessedSolution)
-    await doWhich()
-  }
-
-  /**
-   * Uses node-which to locate the msbuild / make executable.
-   */
-
-  async function doWhich () {
-    // On Windows use msbuild provided by node-gyp configure
-    if (win) {
-      if (!config.variables.msbuild_path) {
-        throw new Error('MSBuild is not set, please run `node-gyp configure`.')
-      }
-      command = config.variables.msbuild_path
-      log.verbose('using MSBuild:', command)
-      await doBuild()
-      return
-    }
-
-    // First make sure we have the build command in the PATH
-    const execPath = await which(command)
-    log.verbose('`which` succeeded for `' + command + '`', execPath)
-    await doBuild()
-  }
-
-  /**
-   * Actually spawn the process and compile the module.
-   */
-
-  async function doBuild () {
-    // Enable Verbose build
-    const verbose = log.logger.isVisible('verbose')
-    let j
-
-    if (!win && verbose) {
-      argv.push('V=1')
-    }
-
-    if (win && !verbose) {
-      argv.push('/clp:Verbosity=minimal')
-    }
-
-    if (win) {
-      // Turn off the Microsoft logo on Windows
-      argv.push('/nologo')
-    }
-
-    // Specify the build type, Release by default
-    if (win) {
-      // Convert .gypi config target_arch to MSBuild /Platform
-      // Since there are many ways to state '32-bit Intel', default to it.
-      // N.B. msbuild's Condition string equality tests are case-insensitive.
-      const archLower = arch.toLowerCase()
-      const p = archLower === 'x64'
-        ? 'x64'
-        : (archLower === 'arm'
-            ? 'ARM'
-            : (archLower === 'arm64' ? 'ARM64' : 'Win32'))
-      argv.push('/p:Configuration=' + buildType + ';Platform=' + p)
-      if (jobs) {
-        j = parseInt(jobs, 10)
-        if (!isNaN(j) && j > 0) {
-          argv.push('/m:' + j)
-        } else if (jobs.toUpperCase() === 'MAX') {
-          argv.push('/m:' + require('os').cpus().length)
-        }
-      }
-    } else {
-      argv.push('BUILDTYPE=' + buildType)
-      // Invoke the Makefile in the 'build' dir.
-      argv.push('-C')
-      argv.push('build')
-      if (jobs) {
-        j = parseInt(jobs, 10)
-        if (!isNaN(j) && j > 0) {
-          argv.push('--jobs')
-          argv.push(j)
-        } else if (jobs.toUpperCase() === 'MAX') {
-          argv.push('--jobs')
-          argv.push(require('os').cpus().length)
-        }
-      }
-    }
-
-    if (win) {
-      // did the user specify their own .sln file?
-      const hasSln = argv.some(function (arg) {
-        return path.extname(arg) === '.sln'
-      })
-      if (!hasSln) {
-        argv.unshift(gyp.opts.solution || guessedSolution)
-      }
-    }
-
-    if (!win) {
-      // Add build-time dependency symlinks (such as Python) to PATH
-      buildBinsDir = path.resolve('build', 'node_gyp_bins')
-      process.env.PATH = `${buildBinsDir}:${process.env.PATH}`
-      await fs.mkdir(buildBinsDir, { recursive: true })
-      const symlinkDestination = path.join(buildBinsDir, 'python3')
-      try {
-        await fs.unlink(symlinkDestination)
-      } catch (err) {
-        if (err.code !== 'ENOENT') throw err
-      }
-      await fs.symlink(python, symlinkDestination)
-      log.verbose('bin symlinks', `created symlink to "${python}" in "${buildBinsDir}" and added to PATH`)
-    }
-
-    const proc = gyp.spawn(command, argv)
-    await new Promise((resolve, reject) => proc.on('exit', async (code, signal) => {
-      if (buildBinsDir) {
-        // Clean up the build-time dependency symlinks:
-        await fs.rm(buildBinsDir, { recursive: true })
-      }
-
-      if (code !== 0) {
-        return reject(new Error('`' + command + '` failed with exit code: ' + code))
-      }
-      if (signal) {
-        return reject(new Error('`' + command + '` got signal: ' + signal))
-      }
-      resolve()
-    }))
-  }
-}
-
-module.exports = build
-module.exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/clean.js b/node_modules/npm/node_modules/node-gyp/lib/clean.js
deleted file mode 100644
index 523f801..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/clean.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs').promises
-const log = require('./log')
-
-async function clean (gyp, argv) {
-  // Remove the 'build' dir
-  const buildDir = 'build'
-
-  log.verbose('clean', 'removing "%s" directory', buildDir)
-  await fs.rm(buildDir, { recursive: true, force: true })
-}
-
-module.exports = clean
-module.exports.usage = 'Removes any generated build files and the "out" dir'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/configure.js b/node_modules/npm/node_modules/node-gyp/lib/configure.js
deleted file mode 100644
index 8da41a8..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/configure.js
+++ /dev/null
@@ -1,282 +0,0 @@
-'use strict'
-
-const { promises: fs } = require('graceful-fs')
-const path = require('path')
-const log = require('./log')
-const os = require('os')
-const processRelease = require('./process-release')
-const win = process.platform === 'win32'
-const findNodeDirectory = require('./find-node-directory')
-const { createConfigGypi } = require('./create-config-gypi')
-const { format: msgFormat } = require('util')
-const { findAccessibleSync } = require('./util')
-const { findPython } = require('./find-python')
-const { findVisualStudio } = win ? require('./find-visualstudio') : {}
-
-async function configure (gyp, argv) {
-  const buildDir = path.resolve('build')
-  const configNames = ['config.gypi', 'common.gypi']
-  const configs = []
-  let nodeDir
-  const release = processRelease(argv, gyp, process.version, process.release)
-
-  const python = await findPython(gyp.opts.python)
-  return getNodeDir()
-
-  async function getNodeDir () {
-    // 'python' should be set by now
-    process.env.PYTHON = python
-
-    if (gyp.opts.nodedir) {
-      // --nodedir was specified. use that for the dev files
-      nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir())
-      log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir)
-    } else {
-      // if no --nodedir specified, ensure node dependencies are installed
-      if ('v' + release.version !== process.version) {
-        // if --target was given, then determine a target version to compile for
-        log.verbose('get node dir', 'compiling against --target node version: %s', release.version)
-      } else {
-        // if no --target was specified then use the current host node version
-        log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version)
-      }
-
-      if (!release.semver) {
-        // could not parse the version string with semver
-        throw new Error('Invalid version number: ' + release.version)
-      }
-
-      // If the tarball option is set, always remove and reinstall the headers
-      // into devdir. Otherwise only install if they're not already there.
-      gyp.opts.ensure = !gyp.opts.tarball
-
-      await gyp.commands.install([release.version])
-
-      log.verbose('get node dir', 'target node version installed:', release.versionDir)
-      nodeDir = path.resolve(gyp.devDir, release.versionDir)
-    }
-
-    return createBuildDir()
-  }
-
-  async function createBuildDir () {
-    log.verbose('build dir', 'attempting to create "build" dir: %s', buildDir)
-
-    const isNew = await fs.mkdir(buildDir, { recursive: true })
-    log.verbose(
-      'build dir', '"build" dir needed to be created?', isNew ? 'Yes' : 'No'
-    )
-    const vsInfo = win ? await findVisualStudio(release.semver, gyp.opts['msvs-version']) : null
-    return createConfigFile(vsInfo)
-  }
-
-  async function createConfigFile (vsInfo) {
-    if (win) {
-      process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015)
-      process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path
-    }
-    const configPath = await createConfigGypi({ gyp, buildDir, nodeDir, vsInfo, python })
-    configs.push(configPath)
-    return findConfigs()
-  }
-
-  async function findConfigs () {
-    const name = configNames.shift()
-    if (!name) {
-      return runGyp()
-    }
-
-    const fullPath = path.resolve(name)
-    log.verbose(name, 'checking for gypi file: %s', fullPath)
-    try {
-      await fs.stat(fullPath)
-      log.verbose(name, 'found gypi file')
-      configs.push(fullPath)
-    } catch (err) {
-      // ENOENT will check next gypi filename
-      if (err.code !== 'ENOENT') {
-        throw err
-      }
-    }
-
-    return findConfigs()
-  }
-
-  async function runGyp () {
-    if (!~argv.indexOf('-f') && !~argv.indexOf('--format')) {
-      if (win) {
-        log.verbose('gyp', 'gyp format was not specified; forcing "msvs"')
-        // force the 'make' target for non-Windows
-        argv.push('-f', 'msvs')
-      } else {
-        log.verbose('gyp', 'gyp format was not specified; forcing "make"')
-        // force the 'make' target for non-Windows
-        argv.push('-f', 'make')
-      }
-    }
-
-    // include all the ".gypi" files that were found
-    configs.forEach(function (config) {
-      argv.push('-I', config)
-    })
-
-    // For AIX and z/OS we need to set up the path to the exports file
-    // which contains the symbols needed for linking.
-    let nodeExpFile
-    let nodeRootDir
-    let candidates
-    let logprefix = 'find exports file'
-    if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
-      const ext = process.platform === 'os390' ? 'x' : 'exp'
-      nodeRootDir = findNodeDirectory()
-
-      if (process.platform === 'aix' || process.platform === 'os400') {
-        candidates = [
-          'include/node/node',
-          'out/Release/node',
-          'out/Debug/node',
-          'node'
-        ].map(function (file) {
-          return file + '.' + ext
-        })
-      } else {
-        candidates = [
-          'out/Release/lib.target/libnode',
-          'out/Debug/lib.target/libnode',
-          'out/Release/obj.target/libnode',
-          'out/Debug/obj.target/libnode',
-          'lib/libnode'
-        ].map(function (file) {
-          return file + '.' + ext
-        })
-      }
-
-      nodeExpFile = findAccessibleSync(logprefix, nodeRootDir, candidates)
-      if (nodeExpFile !== undefined) {
-        log.verbose(logprefix, 'Found exports file: %s', nodeExpFile)
-      } else {
-        const msg = msgFormat('Could not find node.%s file in %s', ext, nodeRootDir)
-        log.error(logprefix, 'Could not find exports file')
-        throw new Error(msg)
-      }
-    }
-
-    // For z/OS we need to set up the path to zoslib include directory,
-    // which contains headers included in v8config.h.
-    let zoslibIncDir
-    if (process.platform === 'os390') {
-      logprefix = "find zoslib's zos-base.h:"
-      let msg
-      let zoslibIncPath = process.env.ZOSLIB_INCLUDES
-      if (zoslibIncPath) {
-        zoslibIncPath = findAccessibleSync(logprefix, zoslibIncPath, ['zos-base.h'])
-        if (zoslibIncPath === undefined) {
-          msg = msgFormat('Could not find zos-base.h file in the directory set ' +
-                          'in ZOSLIB_INCLUDES environment variable: %s; set it ' +
-                          'to the correct path, or unset it to search %s', process.env.ZOSLIB_INCLUDES, nodeRootDir)
-        }
-      } else {
-        candidates = [
-          'include/node/zoslib/zos-base.h',
-          'include/zoslib/zos-base.h',
-          'zoslib/include/zos-base.h',
-          'install/include/node/zoslib/zos-base.h'
-        ]
-        zoslibIncPath = findAccessibleSync(logprefix, nodeRootDir, candidates)
-        if (zoslibIncPath === undefined) {
-          msg = msgFormat('Could not find any of %s in directory %s; set ' +
-                          'environmant variable ZOSLIB_INCLUDES to the path ' +
-                          'that contains zos-base.h', candidates.toString(), nodeRootDir)
-        }
-      }
-      if (zoslibIncPath !== undefined) {
-        zoslibIncDir = path.dirname(zoslibIncPath)
-        log.verbose(logprefix, "Found zoslib's zos-base.h in: %s", zoslibIncDir)
-      } else if (release.version.split('.')[0] >= 16) {
-        // zoslib is only shipped in Node v16 and above.
-        log.error(logprefix, msg)
-        throw new Error(msg)
-      }
-    }
-
-    // this logic ported from the old `gyp_addon` python file
-    const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
-    const addonGypi = path.resolve(__dirname, '..', 'addon.gypi')
-    let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi')
-    try {
-      await fs.stat(commonGypi)
-    } catch (err) {
-      commonGypi = path.resolve(nodeDir, 'common.gypi')
-    }
-
-    let outputDir = 'build'
-    if (win) {
-      // Windows expects an absolute path
-      outputDir = buildDir
-    }
-    const nodeGypDir = path.resolve(__dirname, '..')
-
-    let nodeLibFile = path.join(nodeDir,
-      !gyp.opts.nodedir ? '<(target_arch)' : '$(Configuration)',
-      release.name + '.lib')
-
-    argv.push('-I', addonGypi)
-    argv.push('-I', commonGypi)
-    argv.push('-Dlibrary=shared_library')
-    argv.push('-Dvisibility=default')
-    argv.push('-Dnode_root_dir=' + nodeDir)
-    if (process.platform === 'aix' || process.platform === 'os390' || process.platform === 'os400') {
-      argv.push('-Dnode_exp_file=' + nodeExpFile)
-      if (process.platform === 'os390' && zoslibIncDir) {
-        argv.push('-Dzoslib_include_dir=' + zoslibIncDir)
-      }
-    }
-    argv.push('-Dnode_gyp_dir=' + nodeGypDir)
-
-    // Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up,
-    // resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder
-    if (win) {
-      nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\')
-    }
-    argv.push('-Dnode_lib_file=' + nodeLibFile)
-    argv.push('-Dmodule_root_dir=' + process.cwd())
-    argv.push('-Dnode_engine=' +
-        (gyp.opts.node_engine || process.jsEngine || 'v8'))
-    argv.push('--depth=.')
-    argv.push('--no-parallel')
-
-    // tell gyp to write the Makefile/Solution files into output_dir
-    argv.push('--generator-output', outputDir)
-
-    // tell make to write its output into the same dir
-    argv.push('-Goutput_dir=.')
-
-    // enforce use of the "binding.gyp" file
-    argv.unshift('binding.gyp')
-
-    // execute `gyp` from the current target nodedir
-    argv.unshift(gypScript)
-
-    // make sure python uses files that came with this particular node package
-    const pypath = [path.join(__dirname, '..', 'gyp', 'pylib')]
-    if (process.env.PYTHONPATH) {
-      pypath.push(process.env.PYTHONPATH)
-    }
-    process.env.PYTHONPATH = pypath.join(win ? ';' : ':')
-
-    await new Promise((resolve, reject) => {
-      const cp = gyp.spawn(python, argv)
-      cp.on('exit', (code) => {
-        if (code !== 0) {
-          reject(new Error('`gyp` failed with exit code: ' + code))
-        } else {
-          // we're done
-          resolve()
-        }
-      })
-    })
-  }
-}
-
-module.exports = configure
-module.exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/create-config-gypi.js b/node_modules/npm/node_modules/node-gyp/lib/create-config-gypi.js
deleted file mode 100644
index d598dea..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/create-config-gypi.js
+++ /dev/null
@@ -1,150 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs').promises
-const log = require('./log')
-const path = require('path')
-
-function parseConfigGypi (config) {
-  // translated from tools/js2c.py of Node.js
-  // 1. string comments
-  config = config.replace(/#.*/g, '')
-  // 2. join multiline strings
-  config = config.replace(/'$\s+'/mg, '')
-  // 3. normalize string literals from ' into "
-  config = config.replace(/'/g, '"')
-  return JSON.parse(config)
-}
-
-async function getBaseConfigGypi ({ gyp, nodeDir }) {
-  // try reading $nodeDir/include/node/config.gypi first when:
-  // 1. --dist-url or --nodedir is specified
-  // 2. and --force-process-config is not specified
-  const useCustomHeaders = gyp.opts.nodedir || gyp.opts.disturl || gyp.opts['dist-url']
-  const shouldReadConfigGypi = useCustomHeaders && !gyp.opts['force-process-config']
-  if (shouldReadConfigGypi && nodeDir) {
-    try {
-      const baseConfigGypiPath = path.resolve(nodeDir, 'include/node/config.gypi')
-      const baseConfigGypi = await fs.readFile(baseConfigGypiPath)
-      return parseConfigGypi(baseConfigGypi.toString())
-    } catch (err) {
-      log.warn('read config.gypi', err.message)
-    }
-  }
-
-  // fallback to process.config if it is invalid
-  return JSON.parse(JSON.stringify(process.config))
-}
-
-async function getCurrentConfigGypi ({ gyp, nodeDir, vsInfo, python }) {
-  const config = await getBaseConfigGypi({ gyp, nodeDir })
-  if (!config.target_defaults) {
-    config.target_defaults = {}
-  }
-  if (!config.variables) {
-    config.variables = {}
-  }
-
-  const defaults = config.target_defaults
-  const variables = config.variables
-
-  // don't inherit the "defaults" from the base config.gypi.
-  // doing so could cause problems in cases where the `node` executable was
-  // compiled on a different machine (with different lib/include paths) than
-  // the machine where the addon is being built to
-  defaults.cflags = []
-  defaults.defines = []
-  defaults.include_dirs = []
-  defaults.libraries = []
-
-  // set the default_configuration prop
-  if ('debug' in gyp.opts) {
-    defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release'
-  }
-
-  if (!defaults.default_configuration) {
-    defaults.default_configuration = 'Release'
-  }
-
-  // set the target_arch variable
-  variables.target_arch = gyp.opts.arch || process.arch || 'ia32'
-  if (variables.target_arch === 'arm64') {
-    defaults.msvs_configuration_platform = 'ARM64'
-    defaults.xcode_configuration_platform = 'arm64'
-  }
-
-  // set the node development directory
-  variables.nodedir = nodeDir
-
-  // set the configured Python path
-  variables.python = python
-
-  // disable -T "thin" static archives by default
-  variables.standalone_static_library = gyp.opts.thin ? 0 : 1
-
-  if (process.platform === 'win32') {
-    defaults.msbuild_toolset = vsInfo.toolset
-    if (vsInfo.sdk) {
-      defaults.msvs_windows_target_platform_version = vsInfo.sdk
-    }
-    if (variables.target_arch === 'arm64') {
-      if (vsInfo.versionMajor > 15 ||
-          (vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) {
-        defaults.msvs_enable_marmasm = 1
-      } else {
-        log.warn('Compiling ARM64 assembly is only available in\n' +
-          'Visual Studio 2017 version 15.9 and above')
-      }
-    }
-    variables.msbuild_path = vsInfo.msBuild
-  }
-
-  // loop through the rest of the opts and add the unknown ones as variables.
-  // this allows for module-specific configure flags like:
-  //
-  //   $ node-gyp configure --shared-libxml2
-  Object.keys(gyp.opts).forEach(function (opt) {
-    if (opt === 'argv') {
-      return
-    }
-    if (opt in gyp.configDefs) {
-      return
-    }
-    variables[opt.replace(/-/g, '_')] = gyp.opts[opt]
-  })
-
-  return config
-}
-
-async function createConfigGypi ({ gyp, buildDir, nodeDir, vsInfo, python }) {
-  const configFilename = 'config.gypi'
-  const configPath = path.resolve(buildDir, configFilename)
-
-  log.verbose('build/' + configFilename, 'creating config file')
-
-  const config = await getCurrentConfigGypi({ gyp, nodeDir, vsInfo, python })
-
-  // ensures that any boolean values in config.gypi get stringified
-  function boolsToString (k, v) {
-    if (typeof v === 'boolean') {
-      return String(v)
-    }
-    return v
-  }
-
-  log.silly('build/' + configFilename, config)
-
-  // now write out the config.gypi file to the build/ dir
-  const prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step'
-
-  const json = JSON.stringify(config, boolsToString, 2)
-  log.verbose('build/' + configFilename, 'writing out config file: %s', configPath)
-  await fs.writeFile(configPath, [prefix, json, ''].join('\n'))
-
-  return configPath
-}
-
-module.exports = {
-  createConfigGypi,
-  parseConfigGypi,
-  getCurrentConfigGypi
-}
diff --git a/node_modules/npm/node_modules/node-gyp/lib/download.js b/node_modules/npm/node_modules/node-gyp/lib/download.js
deleted file mode 100644
index ed0aa37..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/download.js
+++ /dev/null
@@ -1,39 +0,0 @@
-const fetch = require('make-fetch-happen')
-const { promises: fs } = require('graceful-fs')
-const log = require('./log')
-
-async function download (gyp, url) {
-  log.http('GET', url)
-
-  const requestOpts = {
-    headers: {
-      'User-Agent': `node-gyp v${gyp.version} (node ${process.version})`,
-      Connection: 'keep-alive'
-    },
-    proxy: gyp.opts.proxy,
-    noProxy: gyp.opts.noproxy
-  }
-
-  const cafile = gyp.opts.cafile
-  if (cafile) {
-    requestOpts.ca = await readCAFile(cafile)
-  }
-
-  const res = await fetch(url, requestOpts)
-  log.http(res.status, res.url)
-
-  return res
-}
-
-async function readCAFile (filename) {
-  // The CA file can contain multiple certificates so split on certificate
-  // boundaries.  [\S\s]*? is used to match everything including newlines.
-  const ca = await fs.readFile(filename, 'utf8')
-  const re = /(-----BEGIN CERTIFICATE-----[\S\s]*?-----END CERTIFICATE-----)/g
-  return ca.match(re)
-}
-
-module.exports = {
-  download,
-  readCAFile
-}
diff --git a/node_modules/npm/node_modules/node-gyp/lib/find-node-directory.js b/node_modules/npm/node_modules/node-gyp/lib/find-node-directory.js
deleted file mode 100644
index 8838b81..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/find-node-directory.js
+++ /dev/null
@@ -1,63 +0,0 @@
-'use strict'
-
-const path = require('path')
-const log = require('./log')
-
-function findNodeDirectory (scriptLocation, processObj) {
-  // set dirname and process if not passed in
-  // this facilitates regression tests
-  if (scriptLocation === undefined) {
-    scriptLocation = __dirname
-  }
-  if (processObj === undefined) {
-    processObj = process
-  }
-
-  // Have a look to see what is above us, to try and work out where we are
-  const npmParentDirectory = path.join(scriptLocation, '../../../..')
-  log.verbose('node-gyp root', 'npm_parent_directory is ' +
-              path.basename(npmParentDirectory))
-  let nodeRootDir = ''
-
-  log.verbose('node-gyp root', 'Finding node root directory')
-  if (path.basename(npmParentDirectory) === 'deps') {
-    // We are in a build directory where this script lives in
-    // deps/npm/node_modules/node-gyp/lib
-    nodeRootDir = path.join(npmParentDirectory, '..')
-    log.verbose('node-gyp root', 'in build directory, root = ' +
-                nodeRootDir)
-  } else if (path.basename(npmParentDirectory) === 'node_modules') {
-    // We are in a node install directory where this script lives in
-    // lib/node_modules/npm/node_modules/node-gyp/lib or
-    // node_modules/npm/node_modules/node-gyp/lib depending on the
-    // platform
-    if (processObj.platform === 'win32') {
-      nodeRootDir = path.join(npmParentDirectory, '..')
-    } else {
-      nodeRootDir = path.join(npmParentDirectory, '../..')
-    }
-    log.verbose('node-gyp root', 'in install directory, root = ' +
-                nodeRootDir)
-  } else {
-    // We don't know where we are, try working it out from the location
-    // of the node binary
-    const nodeDir = path.dirname(processObj.execPath)
-    const directoryUp = path.basename(nodeDir)
-    if (directoryUp === 'bin') {
-      nodeRootDir = path.join(nodeDir, '..')
-    } else if (directoryUp === 'Release' || directoryUp === 'Debug') {
-      // If we are a recently built node, and the directory structure
-      // is that of a repository. If we are on Windows then we only need
-      // to go one level up, everything else, two
-      if (processObj.platform === 'win32') {
-        nodeRootDir = path.join(nodeDir, '..')
-      } else {
-        nodeRootDir = path.join(nodeDir, '../..')
-      }
-    }
-    // Else return the default blank, "".
-  }
-  return nodeRootDir
-}
-
-module.exports = findNodeDirectory
diff --git a/node_modules/npm/node_modules/node-gyp/lib/find-python.js b/node_modules/npm/node_modules/node-gyp/lib/find-python.js
deleted file mode 100644
index 615da57..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/find-python.js
+++ /dev/null
@@ -1,310 +0,0 @@
-'use strict'
-
-const log = require('./log')
-const semver = require('semver')
-const { execFile } = require('./util')
-const win = process.platform === 'win32'
-
-function getOsUserInfo () {
-  try {
-    return require('os').userInfo().username
-  } catch {}
-}
-
-const systemDrive = process.env.SystemDrive || 'C:'
-const username = process.env.USERNAME || process.env.USER || getOsUserInfo()
-const localAppData = process.env.LOCALAPPDATA || `${systemDrive}\\${username}\\AppData\\Local`
-const foundLocalAppData = process.env.LOCALAPPDATA || username
-const programFiles = process.env.ProgramW6432 || process.env.ProgramFiles || `${systemDrive}\\Program Files`
-const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)`
-
-const winDefaultLocationsArray = []
-for (const majorMinor of ['311', '310', '39', '38']) {
-  if (foundLocalAppData) {
-    winDefaultLocationsArray.push(
-      `${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`,
-      `${programFiles}\\Python${majorMinor}\\python.exe`,
-      `${localAppData}\\Programs\\Python\\Python${majorMinor}-32\\python.exe`,
-      `${programFiles}\\Python${majorMinor}-32\\python.exe`,
-      `${programFilesX86}\\Python${majorMinor}-32\\python.exe`
-    )
-  } else {
-    winDefaultLocationsArray.push(
-      `${programFiles}\\Python${majorMinor}\\python.exe`,
-      `${programFiles}\\Python${majorMinor}-32\\python.exe`,
-      `${programFilesX86}\\Python${majorMinor}-32\\python.exe`
-    )
-  }
-}
-
-class PythonFinder {
-  static findPython = (...args) => new PythonFinder(...args).findPython()
-
-  log = log.withPrefix('find Python')
-  argsExecutable = ['-c', 'import sys; print(sys.executable);']
-  argsVersion = ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);']
-  semverRange = '>=3.6.0'
-
-  // These can be overridden for testing:
-  execFile = execFile
-  env = process.env
-  win = win
-  pyLauncher = 'py.exe'
-  winDefaultLocations = winDefaultLocationsArray
-
-  constructor (configPython) {
-    this.configPython = configPython
-    this.errorLog = []
-  }
-
-  // Logs a message at verbose level, but also saves it to be displayed later
-  // at error level if an error occurs. This should help diagnose the problem.
-  addLog (message) {
-    this.log.verbose(message)
-    this.errorLog.push(message)
-  }
-
-  // Find Python by trying a sequence of possibilities.
-  // Ignore errors, keep trying until Python is found.
-  async findPython () {
-    const SKIP = 0
-    const FAIL = 1
-    const toCheck = (() => {
-      if (this.env.NODE_GYP_FORCE_PYTHON) {
-        return [{
-          before: () => {
-            this.addLog(
-              'checking Python explicitly set from NODE_GYP_FORCE_PYTHON')
-            this.addLog('- process.env.NODE_GYP_FORCE_PYTHON is ' +
-              `"${this.env.NODE_GYP_FORCE_PYTHON}"`)
-          },
-          check: () => this.checkCommand(this.env.NODE_GYP_FORCE_PYTHON)
-        }]
-      }
-
-      const checks = [
-        {
-          before: () => {
-            if (!this.configPython) {
-              this.addLog(
-                'Python is not set from command line or npm configuration')
-              return SKIP
-            }
-            this.addLog('checking Python explicitly set from command line or ' +
-              'npm configuration')
-            this.addLog('- "--python=" or "npm config get python" is ' +
-              `"${this.configPython}"`)
-          },
-          check: () => this.checkCommand(this.configPython)
-        },
-        {
-          before: () => {
-            if (!this.env.PYTHON) {
-              this.addLog('Python is not set from environment variable ' +
-                'PYTHON')
-              return SKIP
-            }
-            this.addLog('checking Python explicitly set from environment ' +
-              'variable PYTHON')
-            this.addLog(`- process.env.PYTHON is "${this.env.PYTHON}"`)
-          },
-          check: () => this.checkCommand(this.env.PYTHON)
-        }
-      ]
-
-      if (this.win) {
-        checks.push({
-          before: () => {
-            this.addLog(
-              'checking if the py launcher can be used to find Python 3')
-          },
-          check: () => this.checkPyLauncher()
-        })
-      }
-
-      checks.push(...[
-        {
-          before: () => { this.addLog('checking if "python3" can be used') },
-          check: () => this.checkCommand('python3')
-        },
-        {
-          before: () => { this.addLog('checking if "python" can be used') },
-          check: () => this.checkCommand('python')
-        }
-      ])
-
-      if (this.win) {
-        for (let i = 0; i < this.winDefaultLocations.length; ++i) {
-          const location = this.winDefaultLocations[i]
-          checks.push({
-            before: () => this.addLog(`checking if Python is ${location}`),
-            check: () => this.checkExecPath(location)
-          })
-        }
-      }
-
-      return checks
-    })()
-
-    for (const check of toCheck) {
-      const before = check.before()
-      if (before === SKIP) {
-        continue
-      }
-      if (before === FAIL) {
-        return this.fail()
-      }
-      try {
-        return await check.check()
-      } catch (err) {
-        this.log.silly('runChecks: err = %j', (err && err.stack) || err)
-      }
-    }
-
-    return this.fail()
-  }
-
-  // Check if command is a valid Python to use.
-  // Will exit the Python finder on success.
-  // If on Windows, run in a CMD shell to support BAT/CMD launchers.
-  async checkCommand (command) {
-    let exec = command
-    let args = this.argsExecutable
-    let shell = false
-    if (this.win) {
-      // Arguments have to be manually quoted
-      exec = `"${exec}"`
-      args = args.map(a => `"${a}"`)
-      shell = true
-    }
-
-    this.log.verbose(`- executing "${command}" to get executable path`)
-    // Possible outcomes:
-    // - Error: not in PATH, not executable or execution fails
-    // - Gibberish: the next command to check version will fail
-    // - Absolute path to executable
-    try {
-      const execPath = await this.run(exec, args, shell)
-      this.addLog(`- executable path is "${execPath}"`)
-      return this.checkExecPath(execPath)
-    } catch (err) {
-      this.addLog(`- "${command}" is not in PATH or produced an error`)
-      throw err
-    }
-  }
-
-  // Check if the py launcher can find a valid Python to use.
-  // Will exit the Python finder on success.
-  // Distributions of Python on Windows by default install with the "py.exe"
-  // Python launcher which is more likely to exist than the Python executable
-  // being in the $PATH.
-  // Because the Python launcher supports Python 2 and Python 3, we should
-  // explicitly request a Python 3 version. This is done by supplying "-3" as
-  // the first command line argument. Since "py.exe -3" would be an invalid
-  // executable for "execFile", we have to use the launcher to figure out
-  // where the actual "python.exe" executable is located.
-  async checkPyLauncher () {
-    this.log.verbose(`- executing "${this.pyLauncher}" to get Python 3 executable path`)
-    // Possible outcomes: same as checkCommand
-    try {
-      const execPath = await this.run(this.pyLauncher, ['-3', ...this.argsExecutable], false)
-      this.addLog(`- executable path is "${execPath}"`)
-      return this.checkExecPath(execPath)
-    } catch (err) {
-      this.addLog(`- "${this.pyLauncher}" is not in PATH or produced an error`)
-      throw err
-    }
-  }
-
-  // Check if a Python executable is the correct version to use.
-  // Will exit the Python finder on success.
-  async checkExecPath (execPath) {
-    this.log.verbose(`- executing "${execPath}" to get version`)
-    // Possible outcomes:
-    // - Error: executable can not be run (likely meaning the command wasn't
-    //   a Python executable and the previous command produced gibberish)
-    // - Gibberish: somehow the last command produced an executable path,
-    //   this will fail when verifying the version
-    // - Version of the Python executable
-    try {
-      const version = await this.run(execPath, this.argsVersion, false)
-      this.addLog(`- version is "${version}"`)
-
-      const range = new semver.Range(this.semverRange)
-      let valid = false
-      try {
-        valid = range.test(version)
-      } catch (err) {
-        this.log.silly('range.test() threw:\n%s', err.stack)
-        this.addLog(`- "${execPath}" does not have a valid version`)
-        this.addLog('- is it a Python executable?')
-        throw err
-      }
-      if (!valid) {
-        this.addLog(`- version is ${version} - should be ${this.semverRange}`)
-        this.addLog('- THIS VERSION OF PYTHON IS NOT SUPPORTED')
-        throw new Error(`Found unsupported Python version ${version}`)
-      }
-      return this.succeed(execPath, version)
-    } catch (err) {
-      this.addLog(`- "${execPath}" could not be run`)
-      throw err
-    }
-  }
-
-  // Run an executable or shell command, trimming the output.
-  async run (exec, args, shell) {
-    const env = Object.assign({}, this.env)
-    env.TERM = 'dumb'
-    const opts = { env, shell }
-
-    this.log.silly('execFile: exec = %j', exec)
-    this.log.silly('execFile: args = %j', args)
-    this.log.silly('execFile: opts = %j', opts)
-    try {
-      const [err, stdout, stderr] = await this.execFile(exec, args, opts)
-      this.log.silly('execFile result: err = %j', (err && err.stack) || err)
-      this.log.silly('execFile result: stdout = %j', stdout)
-      this.log.silly('execFile result: stderr = %j', stderr)
-      return stdout.trim()
-    } catch (err) {
-      this.log.silly('execFile: threw:\n%s', err.stack)
-      throw err
-    }
-  }
-
-  succeed (execPath, version) {
-    this.log.info(`using Python version ${version} found at "${execPath}"`)
-    return execPath
-  }
-
-  fail () {
-    const errorLog = this.errorLog.join('\n')
-
-    const pathExample = this.win
-      ? 'C:\\Path\\To\\python.exe'
-      : '/path/to/pythonexecutable'
-    // For Windows 80 col console, use up to the column before the one marked
-    // with X (total 79 chars including logger prefix, 58 chars usable here):
-    //                                                           X
-    const info = [
-      '**********************************************************',
-      'You need to install the latest version of Python.',
-      'Node-gyp should be able to find and use Python. If not,',
-      'you can try one of the following options:',
-      `- Use the switch --python="${pathExample}"`,
-      '  (accepted by both node-gyp and npm)',
-      '- Set the environment variable PYTHON',
-      '- Set the npm configuration variable python:',
-      `  npm config set python "${pathExample}"`,
-      'For more information consult the documentation at:',
-      'https://github.com/nodejs/node-gyp#installation',
-      '**********************************************************'
-    ].join('\n')
-
-    this.log.error(`\n${errorLog}\n\n${info}\n`)
-    throw new Error('Could not find any Python installation to use')
-  }
-}
-
-module.exports = PythonFinder
diff --git a/node_modules/npm/node_modules/node-gyp/lib/find-visualstudio.js b/node_modules/npm/node_modules/node-gyp/lib/find-visualstudio.js
deleted file mode 100644
index b577702..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/find-visualstudio.js
+++ /dev/null
@@ -1,443 +0,0 @@
-'use strict'
-
-const log = require('./log')
-const { existsSync } = require('fs')
-const { win32: path } = require('path')
-const { regSearchKeys, execFile } = require('./util')
-
-class VisualStudioFinder {
-  static findVisualStudio = (...args) => new VisualStudioFinder(...args).findVisualStudio()
-
-  log = log.withPrefix('find VS')
-
-  regSearchKeys = regSearchKeys
-
-  constructor (nodeSemver, configMsvsVersion) {
-    this.nodeSemver = nodeSemver
-    this.configMsvsVersion = configMsvsVersion
-    this.errorLog = []
-    this.validVersions = []
-  }
-
-  // Logs a message at verbose level, but also saves it to be displayed later
-  // at error level if an error occurs. This should help diagnose the problem.
-  addLog (message) {
-    this.log.verbose(message)
-    this.errorLog.push(message)
-  }
-
-  async findVisualStudio () {
-    this.configVersionYear = null
-    this.configPath = null
-    if (this.configMsvsVersion) {
-      this.addLog('msvs_version was set from command line or npm config')
-      if (this.configMsvsVersion.match(/^\d{4}$/)) {
-        this.configVersionYear = parseInt(this.configMsvsVersion, 10)
-        this.addLog(
-          `- looking for Visual Studio version ${this.configVersionYear}`)
-      } else {
-        this.configPath = path.resolve(this.configMsvsVersion)
-        this.addLog(
-          `- looking for Visual Studio installed in "${this.configPath}"`)
-      }
-    } else {
-      this.addLog('msvs_version not set from command line or npm config')
-    }
-
-    if (process.env.VCINSTALLDIR) {
-      this.envVcInstallDir =
-        path.resolve(process.env.VCINSTALLDIR, '..')
-      this.addLog('running in VS Command Prompt, installation path is:\n' +
-        `"${this.envVcInstallDir}"\n- will only use this version`)
-    } else {
-      this.addLog('VCINSTALLDIR not set, not running in VS Command Prompt')
-    }
-
-    const checks = [
-      () => this.findVisualStudio2017OrNewer(),
-      () => this.findVisualStudio2015(),
-      () => this.findVisualStudio2013()
-    ]
-
-    for (const check of checks) {
-      const info = await check()
-      if (info) {
-        return this.succeed(info)
-      }
-    }
-
-    return this.fail()
-  }
-
-  succeed (info) {
-    this.log.info(`using VS${info.versionYear} (${info.version}) found at:` +
-                  `\n"${info.path}"` +
-                  '\nrun with --verbose for detailed information')
-    return info
-  }
-
-  fail () {
-    if (this.configMsvsVersion && this.envVcInstallDir) {
-      this.errorLog.push(
-        'msvs_version does not match this VS Command Prompt or the',
-        'installation cannot be used.')
-    } else if (this.configMsvsVersion) {
-      // If msvs_version was specified but finding VS failed, print what would
-      // have been accepted
-      this.errorLog.push('')
-      if (this.validVersions) {
-        this.errorLog.push('valid versions for msvs_version:')
-        this.validVersions.forEach((version) => {
-          this.errorLog.push(`- "${version}"`)
-        })
-      } else {
-        this.errorLog.push('no valid versions for msvs_version were found')
-      }
-    }
-
-    const errorLog = this.errorLog.join('\n')
-
-    // For Windows 80 col console, use up to the column before the one marked
-    // with X (total 79 chars including logger prefix, 62 chars usable here):
-    //                                                               X
-    const infoLog = [
-      '**************************************************************',
-      'You need to install the latest version of Visual Studio',
-      'including the "Desktop development with C++" workload.',
-      'For more information consult the documentation at:',
-      'https://github.com/nodejs/node-gyp#on-windows',
-      '**************************************************************'
-    ].join('\n')
-
-    this.log.error(`\n${errorLog}\n\n${infoLog}\n`)
-    throw new Error('Could not find any Visual Studio installation to use')
-  }
-
-  // Invoke the PowerShell script to get information about Visual Studio 2017
-  // or newer installations
-  async findVisualStudio2017OrNewer () {
-    const ps = path.join(process.env.SystemRoot, 'System32',
-      'WindowsPowerShell', 'v1.0', 'powershell.exe')
-    const csFile = path.join(__dirname, 'Find-VisualStudio.cs')
-    const psArgs = [
-      '-ExecutionPolicy',
-      'Unrestricted',
-      '-NoProfile',
-      '-Command',
-      '&{Add-Type -Path \'' + csFile + '\';' + '[VisualStudioConfiguration.Main]::PrintJson()}'
-    ]
-
-    this.log.silly('Running', ps, psArgs)
-    const [err, stdout, stderr] = await execFile(ps, psArgs, { encoding: 'utf8' })
-    return this.parseData(err, stdout, stderr)
-  }
-
-  // Parse the output of the PowerShell script and look for an installation
-  // of Visual Studio 2017 or newer to use
-  parseData (err, stdout, stderr) {
-    this.log.silly('PS stderr = %j', stderr)
-
-    const failPowershell = () => {
-      this.addLog(
-        'could not use PowerShell to find Visual Studio 2017 or newer, try re-running with \'--loglevel silly\' for more details')
-      return null
-    }
-
-    if (err) {
-      this.log.silly('PS err = %j', err && (err.stack || err))
-      return failPowershell()
-    }
-
-    let vsInfo
-    try {
-      vsInfo = JSON.parse(stdout)
-    } catch (e) {
-      this.log.silly('PS stdout = %j', stdout)
-      this.log.silly(e)
-      return failPowershell()
-    }
-
-    if (!Array.isArray(vsInfo)) {
-      this.log.silly('PS stdout = %j', stdout)
-      return failPowershell()
-    }
-
-    vsInfo = vsInfo.map((info) => {
-      this.log.silly(`processing installation: "${info.path}"`)
-      info.path = path.resolve(info.path)
-      const ret = this.getVersionInfo(info)
-      ret.path = info.path
-      ret.msBuild = this.getMSBuild(info, ret.versionYear)
-      ret.toolset = this.getToolset(info, ret.versionYear)
-      ret.sdk = this.getSDK(info)
-      return ret
-    })
-    this.log.silly('vsInfo:', vsInfo)
-
-    // Remove future versions or errors parsing version number
-    vsInfo = vsInfo.filter((info) => {
-      if (info.versionYear) {
-        return true
-      }
-      this.addLog(`unknown version "${info.version}" found at "${info.path}"`)
-      return false
-    })
-
-    // Sort to place newer versions first
-    vsInfo.sort((a, b) => b.versionYear - a.versionYear)
-
-    for (let i = 0; i < vsInfo.length; ++i) {
-      const info = vsInfo[i]
-      this.addLog(`checking VS${info.versionYear} (${info.version}) found ` +
-                  `at:\n"${info.path}"`)
-
-      if (info.msBuild) {
-        this.addLog('- found "Visual Studio C++ core features"')
-      } else {
-        this.addLog('- "Visual Studio C++ core features" missing')
-        continue
-      }
-
-      if (info.toolset) {
-        this.addLog(`- found VC++ toolset: ${info.toolset}`)
-      } else {
-        this.addLog('- missing any VC++ toolset')
-        continue
-      }
-
-      if (info.sdk) {
-        this.addLog(`- found Windows SDK: ${info.sdk}`)
-      } else {
-        this.addLog('- missing any Windows SDK')
-        continue
-      }
-
-      if (!this.checkConfigVersion(info.versionYear, info.path)) {
-        continue
-      }
-
-      return info
-    }
-
-    this.addLog(
-      'could not find a version of Visual Studio 2017 or newer to use')
-    return null
-  }
-
-  // Helper - process version information
-  getVersionInfo (info) {
-    const match = /^(\d+)\.(\d+)\..*/.exec(info.version)
-    if (!match) {
-      this.log.silly('- failed to parse version:', info.version)
-      return {}
-    }
-    this.log.silly('- version match = %j', match)
-    const ret = {
-      version: info.version,
-      versionMajor: parseInt(match[1], 10),
-      versionMinor: parseInt(match[2], 10)
-    }
-    if (ret.versionMajor === 15) {
-      ret.versionYear = 2017
-      return ret
-    }
-    if (ret.versionMajor === 16) {
-      ret.versionYear = 2019
-      return ret
-    }
-    if (ret.versionMajor === 17) {
-      ret.versionYear = 2022
-      return ret
-    }
-    this.log.silly('- unsupported version:', ret.versionMajor)
-    return {}
-  }
-
-  msBuildPathExists (path) {
-    return existsSync(path)
-  }
-
-  // Helper - process MSBuild information
-  getMSBuild (info, versionYear) {
-    const pkg = 'Microsoft.VisualStudio.VC.MSBuild.Base'
-    const msbuildPath = path.join(info.path, 'MSBuild', 'Current', 'Bin', 'MSBuild.exe')
-    const msbuildPathArm64 = path.join(info.path, 'MSBuild', 'Current', 'Bin', 'arm64', 'MSBuild.exe')
-    if (info.packages.indexOf(pkg) !== -1) {
-      this.log.silly('- found VC.MSBuild.Base')
-      if (versionYear === 2017) {
-        return path.join(info.path, 'MSBuild', '15.0', 'Bin', 'MSBuild.exe')
-      }
-      if (versionYear === 2019) {
-        return msbuildPath
-      }
-    }
-    /**
-     * Visual Studio 2022 doesn't have the MSBuild package.
-     * Support for compiling _on_ ARM64 was added in MSVC 14.32.31326,
-     * so let's leverage it if the user has an ARM64 device.
-     */
-    if (process.arch === 'arm64' && this.msBuildPathExists(msbuildPathArm64)) {
-      return msbuildPathArm64
-    } else if (this.msBuildPathExists(msbuildPath)) {
-      return msbuildPath
-    }
-    return null
-  }
-
-  // Helper - process toolset information
-  getToolset (info, versionYear) {
-    const pkg = 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
-    const express = 'Microsoft.VisualStudio.WDExpress'
-
-    if (info.packages.indexOf(pkg) !== -1) {
-      this.log.silly('- found VC.Tools.x86.x64')
-    } else if (info.packages.indexOf(express) !== -1) {
-      this.log.silly('- found Visual Studio Express (looking for toolset)')
-    } else {
-      return null
-    }
-
-    if (versionYear === 2017) {
-      return 'v141'
-    } else if (versionYear === 2019) {
-      return 'v142'
-    } else if (versionYear === 2022) {
-      return 'v143'
-    }
-    this.log.silly('- invalid versionYear:', versionYear)
-    return null
-  }
-
-  // Helper - process Windows SDK information
-  getSDK (info) {
-    const win8SDK = 'Microsoft.VisualStudio.Component.Windows81SDK'
-    const win10SDKPrefix = 'Microsoft.VisualStudio.Component.Windows10SDK.'
-    const win11SDKPrefix = 'Microsoft.VisualStudio.Component.Windows11SDK.'
-
-    let Win10or11SDKVer = 0
-    info.packages.forEach((pkg) => {
-      if (!pkg.startsWith(win10SDKPrefix) && !pkg.startsWith(win11SDKPrefix)) {
-        return
-      }
-      const parts = pkg.split('.')
-      if (parts.length > 5 && parts[5] !== 'Desktop') {
-        this.log.silly('- ignoring non-Desktop Win10/11SDK:', pkg)
-        return
-      }
-      const foundSdkVer = parseInt(parts[4], 10)
-      if (isNaN(foundSdkVer)) {
-        // Microsoft.VisualStudio.Component.Windows10SDK.IpOverUsb
-        this.log.silly('- failed to parse Win10/11SDK number:', pkg)
-        return
-      }
-      this.log.silly('- found Win10/11SDK:', foundSdkVer)
-      Win10or11SDKVer = Math.max(Win10or11SDKVer, foundSdkVer)
-    })
-
-    if (Win10or11SDKVer !== 0) {
-      return `10.0.${Win10or11SDKVer}.0`
-    } else if (info.packages.indexOf(win8SDK) !== -1) {
-      this.log.silly('- found Win8SDK')
-      return '8.1'
-    }
-    return null
-  }
-
-  // Find an installation of Visual Studio 2015 to use
-  async findVisualStudio2015 () {
-    if (this.nodeSemver.major >= 19) {
-      this.addLog(
-        'not looking for VS2015 as it is only supported up to Node.js 18')
-      return null
-    }
-    return this.findOldVS({
-      version: '14.0',
-      versionMajor: 14,
-      versionMinor: 0,
-      versionYear: 2015,
-      toolset: 'v140'
-    })
-  }
-
-  // Find an installation of Visual Studio 2013 to use
-  async findVisualStudio2013 () {
-    if (this.nodeSemver.major >= 9) {
-      this.addLog(
-        'not looking for VS2013 as it is only supported up to Node.js 8')
-      return null
-    }
-    return this.findOldVS({
-      version: '12.0',
-      versionMajor: 12,
-      versionMinor: 0,
-      versionYear: 2013,
-      toolset: 'v120'
-    })
-  }
-
-  // Helper - common code for VS2013 and VS2015
-  async findOldVS (info) {
-    const regVC7 = ['HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7',
-      'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7']
-    const regMSBuild = 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions'
-
-    this.addLog(`looking for Visual Studio ${info.versionYear}`)
-    try {
-      let res = await this.regSearchKeys(regVC7, info.version, [])
-      const vsPath = path.resolve(res, '..')
-      this.addLog(`- found in "${vsPath}"`)
-      const msBuildRegOpts = process.arch === 'ia32' ? [] : ['/reg:32']
-
-      try {
-        res = await this.regSearchKeys([`${regMSBuild}\\${info.version}`], 'MSBuildToolsPath', msBuildRegOpts)
-      } catch (err) {
-        this.addLog('- could not find MSBuild in registry for this version')
-        return null
-      }
-
-      const msBuild = path.join(res, 'MSBuild.exe')
-      this.addLog(`- MSBuild in "${msBuild}"`)
-
-      if (!this.checkConfigVersion(info.versionYear, vsPath)) {
-        return null
-      }
-
-      info.path = vsPath
-      info.msBuild = msBuild
-      info.sdk = null
-      return info
-    } catch (err) {
-      this.addLog('- not found')
-      return null
-    }
-  }
-
-  // After finding a usable version of Visual Studio:
-  // - add it to validVersions to be displayed at the end if a specific
-  //   version was requested and not found;
-  // - check if this is the version that was requested.
-  // - check if this matches the Visual Studio Command Prompt
-  checkConfigVersion (versionYear, vsPath) {
-    this.validVersions.push(versionYear)
-    this.validVersions.push(vsPath)
-
-    if (this.configVersionYear && this.configVersionYear !== versionYear) {
-      this.addLog('- msvs_version does not match this version')
-      return false
-    }
-    if (this.configPath &&
-        path.relative(this.configPath, vsPath) !== '') {
-      this.addLog('- msvs_version does not point to this installation')
-      return false
-    }
-    if (this.envVcInstallDir &&
-        path.relative(this.envVcInstallDir, vsPath) !== '') {
-      this.addLog('- does not match this Visual Studio Command Prompt')
-      return false
-    }
-
-    return true
-  }
-}
-
-module.exports = VisualStudioFinder
diff --git a/node_modules/npm/node_modules/node-gyp/lib/install.js b/node_modules/npm/node_modules/node-gyp/lib/install.js
deleted file mode 100644
index 7196a31..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/install.js
+++ /dev/null
@@ -1,415 +0,0 @@
-'use strict'
-
-const { createWriteStream, promises: fs } = require('graceful-fs')
-const os = require('os')
-const { backOff } = require('exponential-backoff')
-const tar = require('tar')
-const path = require('path')
-const { Transform, promises: { pipeline } } = require('stream')
-const crypto = require('crypto')
-const log = require('./log')
-const semver = require('semver')
-const { download } = require('./download')
-const processRelease = require('./process-release')
-
-const win = process.platform === 'win32'
-
-async function install (gyp, argv) {
-  log.stdout()
-  const release = processRelease(argv, gyp, process.version, process.release)
-  // Detecting target_arch based on logic from create-cnfig-gyp.js. Used on Windows only.
-  const arch = win ? (gyp.opts.target_arch || gyp.opts.arch || process.arch || 'ia32') : ''
-  // Used to prevent downloading tarball if only new node.lib is required on Windows.
-  let shouldDownloadTarball = true
-
-  // Determine which node dev files version we are installing
-  log.verbose('install', 'input version string %j', release.version)
-
-  if (!release.semver) {
-    // could not parse the version string with semver
-    throw new Error('Invalid version number: ' + release.version)
-  }
-
-  if (semver.lt(release.version, '0.8.0')) {
-    throw new Error('Minimum target version is `0.8.0` or greater. Got: ' + release.version)
-  }
-
-  // 0.x.y-pre versions are not published yet and cannot be installed. Bail.
-  if (release.semver.prerelease[0] === 'pre') {
-    log.verbose('detected "pre" node version', release.version)
-    if (!gyp.opts.nodedir) {
-      throw new Error('"pre" versions of node cannot be installed, use the --nodedir flag instead')
-    }
-    log.verbose('--nodedir flag was passed; skipping install', gyp.opts.nodedir)
-    return
-  }
-
-  // flatten version into String
-  log.verbose('install', 'installing version: %s', release.versionDir)
-
-  // the directory where the dev files will be installed
-  const devDir = path.resolve(gyp.devDir, release.versionDir)
-
-  // If '--ensure' was passed, then don't *always* install the version;
-  // check if it is already installed, and only install when needed
-  if (gyp.opts.ensure) {
-    log.verbose('install', '--ensure was passed, so won\'t reinstall if already installed')
-    try {
-      await fs.stat(devDir)
-    } catch (err) {
-      if (err.code === 'ENOENT') {
-        log.verbose('install', 'version not already installed, continuing with install', release.version)
-        try {
-          return await go()
-        } catch (err) {
-          return rollback(err)
-        }
-      } else if (err.code === 'EACCES') {
-        return eaccesFallback(err)
-      }
-      throw err
-    }
-    log.verbose('install', 'version is already installed, need to check "installVersion"')
-    const installVersionFile = path.resolve(devDir, 'installVersion')
-    let installVersion = 0
-    try {
-      const ver = await fs.readFile(installVersionFile, 'ascii')
-      installVersion = parseInt(ver, 10) || 0
-    } catch (err) {
-      if (err.code !== 'ENOENT') {
-        throw err
-      }
-    }
-    log.verbose('got "installVersion"', installVersion)
-    log.verbose('needs "installVersion"', gyp.package.installVersion)
-    if (installVersion < gyp.package.installVersion) {
-      log.verbose('install', 'version is no good; reinstalling')
-      try {
-        return await go()
-      } catch (err) {
-        return rollback(err)
-      }
-    }
-    log.verbose('install', 'version is good')
-    if (win) {
-      log.verbose('on Windows; need to check node.lib')
-      const nodeLibPath = path.resolve(devDir, arch, 'node.lib')
-      try {
-        await fs.stat(nodeLibPath)
-      } catch (err) {
-        if (err.code === 'ENOENT') {
-          log.verbose('install', `version not already installed for ${arch}, continuing with install`, release.version)
-          try {
-            shouldDownloadTarball = false
-            return await go()
-          } catch (err) {
-            return rollback(err)
-          }
-        } else if (err.code === 'EACCES') {
-          return eaccesFallback(err)
-        }
-        throw err
-      }
-    }
-  } else {
-    try {
-      return await go()
-    } catch (err) {
-      return rollback(err)
-    }
-  }
-
-  async function copyDirectory (src, dest) {
-    try {
-      await fs.stat(src)
-    } catch {
-      throw new Error(`Missing source directory for copy: ${src}`)
-    }
-    await fs.mkdir(dest, { recursive: true })
-    const entries = await fs.readdir(src, { withFileTypes: true })
-    for (const entry of entries) {
-      if (entry.isDirectory()) {
-        await copyDirectory(path.join(src, entry.name), path.join(dest, entry.name))
-      } else if (entry.isFile()) {
-        // with parallel installs, copying files may cause file errors on
-        // Windows so use an exponential backoff to resolve collisions
-        await backOff(async () => {
-          try {
-            await fs.copyFile(path.join(src, entry.name), path.join(dest, entry.name))
-          } catch (err) {
-            // if ensure, check if file already exists and that's good enough
-            if (gyp.opts.ensure && err.code === 'EBUSY') {
-              try {
-                await fs.stat(path.join(dest, entry.name))
-                return
-              } catch {}
-            }
-            throw err
-          }
-        })
-      } else {
-        throw new Error('Unexpected file directory entry type')
-      }
-    }
-  }
-
-  async function go () {
-    log.verbose('ensuring devDir is created', devDir)
-
-    // first create the dir for the node dev files
-    try {
-      const created = await fs.mkdir(devDir, { recursive: true })
-
-      if (created) {
-        log.verbose('created devDir', created)
-      }
-    } catch (err) {
-      if (err.code === 'EACCES') {
-        return eaccesFallback(err)
-      }
-
-      throw err
-    }
-
-    // now download the node tarball
-    const tarPath = gyp.opts.tarball
-    let extractErrors = false
-    let extractCount = 0
-    const contentShasums = {}
-    const expectShasums = {}
-
-    // checks if a file to be extracted from the tarball is valid.
-    // only .h header files and the gyp files get extracted
-    function isValid (path) {
-      const isValid = valid(path)
-      if (isValid) {
-        log.verbose('extracted file from tarball', path)
-        extractCount++
-      } else {
-        // invalid
-        log.silly('ignoring from tarball', path)
-      }
-      return isValid
-    }
-
-    function onwarn (code, message) {
-      extractErrors = true
-      log.error('error while extracting tarball', code, message)
-    }
-
-    // download the tarball and extract!
-    // Ommited on Windows if only new node.lib is required
-
-    // on Windows there can be file errors from tar if parallel installs
-    // are happening (not uncommon with multiple native modules) so
-    // extract the tarball to a temp directory first and then copy over
-    const tarExtractDir = win ? await fs.mkdtemp(path.join(os.tmpdir(), 'node-gyp-tmp-')) : devDir
-
-    try {
-      if (shouldDownloadTarball) {
-        if (tarPath) {
-          await tar.extract({
-            file: tarPath,
-            strip: 1,
-            filter: isValid,
-            onwarn,
-            cwd: tarExtractDir
-          })
-        } else {
-          try {
-            const res = await download(gyp, release.tarballUrl)
-
-            if (res.status !== 200) {
-              throw new Error(`${res.status} response downloading ${release.tarballUrl}`)
-            }
-
-            await pipeline(
-              res.body,
-              // content checksum
-              new ShaSum((_, checksum) => {
-                const filename = path.basename(release.tarballUrl).trim()
-                contentShasums[filename] = checksum
-                log.verbose('content checksum', filename, checksum)
-              }),
-              tar.extract({
-                strip: 1,
-                cwd: tarExtractDir,
-                filter: isValid,
-                onwarn
-              })
-            )
-          } catch (err) {
-          // something went wrong downloading the tarball?
-            if (err.code === 'ENOTFOUND') {
-              throw new Error('This is most likely not a problem with node-gyp or the package itself and\n' +
-              'is related to network connectivity. In most cases you are behind a proxy or have bad \n' +
-              'network settings.')
-            }
-            throw err
-          }
-        }
-
-        // invoked after the tarball has finished being extracted
-        if (extractErrors || extractCount === 0) {
-          throw new Error('There was a fatal problem while downloading/extracting the tarball')
-        }
-
-        log.verbose('tarball', 'done parsing tarball')
-      }
-
-      const installVersionPath = path.resolve(tarExtractDir, 'installVersion')
-      await Promise.all([
-      // need to download node.lib
-        ...(win ? [downloadNodeLib()] : []),
-        // write the "installVersion" file
-        fs.writeFile(installVersionPath, gyp.package.installVersion + '\n'),
-        // Only download SHASUMS.txt if we downloaded something in need of SHA verification
-        ...(!tarPath || win ? [downloadShasums()] : [])
-      ])
-
-      log.verbose('download contents checksum', JSON.stringify(contentShasums))
-      // check content shasums
-      for (const k in contentShasums) {
-        log.verbose('validating download checksum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k])
-        if (contentShasums[k] !== expectShasums[k]) {
-          throw new Error(k + ' local checksum ' + contentShasums[k] + ' not match remote ' + expectShasums[k])
-        }
-      }
-
-      // copy over the files from the temp tarball extract directory to devDir
-      if (tarExtractDir !== devDir) {
-        await copyDirectory(tarExtractDir, devDir)
-      }
-    } finally {
-      if (tarExtractDir !== devDir) {
-        try {
-          // try to cleanup temp dir
-          await fs.rm(tarExtractDir, { recursive: true })
-        } catch {
-          log.warn('failed to clean up temp tarball extract directory')
-        }
-      }
-    }
-
-    async function downloadShasums () {
-      log.verbose('check download content checksum, need to download `SHASUMS256.txt`...')
-      log.verbose('checksum url', release.shasumsUrl)
-
-      const res = await download(gyp, release.shasumsUrl)
-
-      if (res.status !== 200) {
-        throw new Error(`${res.status}  status code downloading checksum`)
-      }
-
-      for (const line of (await res.text()).trim().split('\n')) {
-        const items = line.trim().split(/\s+/)
-        if (items.length !== 2) {
-          return
-        }
-
-        // 0035d18e2dcf9aad669b1c7c07319e17abfe3762  ./node-v0.11.4.tar.gz
-        const name = items[1].replace(/^\.\//, '')
-        expectShasums[name] = items[0]
-      }
-
-      log.verbose('checksum data', JSON.stringify(expectShasums))
-    }
-
-    async function downloadNodeLib () {
-      log.verbose('on Windows; need to download `' + release.name + '.lib`...')
-      const dir = path.resolve(tarExtractDir, arch)
-      const targetLibPath = path.resolve(dir, release.name + '.lib')
-      const { libUrl, libPath } = release[arch]
-      const name = `${arch} ${release.name}.lib`
-      log.verbose(name, 'dir', dir)
-      log.verbose(name, 'url', libUrl)
-
-      await fs.mkdir(dir, { recursive: true })
-      log.verbose('streaming', name, 'to:', targetLibPath)
-
-      const res = await download(gyp, libUrl)
-
-      // Since only required node.lib is downloaded throw error if it is not fetched
-      if (res.status !== 200) {
-        throw new Error(`${res.status} status code downloading ${name}`)
-      }
-
-      return pipeline(
-        res.body,
-        new ShaSum((_, checksum) => {
-          contentShasums[libPath] = checksum
-          log.verbose('content checksum', libPath, checksum)
-        }),
-        createWriteStream(targetLibPath)
-      )
-    } // downloadNodeLib()
-  } // go()
-
-  /**
-   * Checks if a given filename is "valid" for this installation.
-   */
-
-  function valid (file) {
-    // header files
-    const extname = path.extname(file)
-    return extname === '.h' || extname === '.gypi'
-  }
-
-  async function rollback (err) {
-    log.warn('install', 'got an error, rolling back install')
-    // roll-back the install if anything went wrong
-    await gyp.commands.remove([release.versionDir])
-    throw err
-  }
-
-  /**
-   * The EACCES fallback is a workaround for npm's `sudo` behavior, where
-   * it drops the permissions before invoking any child processes (like
-   * node-gyp). So what happens is the "nobody" user doesn't have
-   * permission to create the dev dir. As a fallback, make the tmpdir() be
-   * the dev dir for this installation. This is not ideal, but at least
-   * the compilation will succeed...
-   */
-
-  async function eaccesFallback (err) {
-    const noretry = '--node_gyp_internal_noretry'
-    if (argv.indexOf(noretry) !== -1) {
-      throw err
-    }
-    const tmpdir = os.tmpdir()
-    gyp.devDir = path.resolve(tmpdir, '.node-gyp')
-    let userString = ''
-    try {
-      // os.userInfo can fail on some systems, it's not critical here
-      userString = ` ("${os.userInfo().username}")`
-    } catch (e) {}
-    log.warn('EACCES', 'current user%s does not have permission to access the dev dir "%s"', userString, devDir)
-    log.warn('EACCES', 'attempting to reinstall using temporary dev dir "%s"', gyp.devDir)
-    if (process.cwd() === tmpdir) {
-      log.verbose('tmpdir == cwd', 'automatically will remove dev files after to save disk space')
-      gyp.todo.push({ name: 'remove', args: argv })
-    }
-    return gyp.commands.install([noretry].concat(argv))
-  }
-}
-
-class ShaSum extends Transform {
-  constructor (callback) {
-    super()
-    this._callback = callback
-    this._digester = crypto.createHash('sha256')
-  }
-
-  _transform (chunk, _, callback) {
-    this._digester.update(chunk)
-    callback(null, chunk)
-  }
-
-  _flush (callback) {
-    this._callback(null, this._digester.digest('hex'))
-    callback()
-  }
-}
-
-module.exports = install
-module.exports.usage = 'Install node development files for the specified node version.'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/list.js b/node_modules/npm/node_modules/node-gyp/lib/list.js
deleted file mode 100644
index 36889ad..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/list.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs').promises
-const log = require('./log')
-
-async function list (gyp, args) {
-  const devDir = gyp.devDir
-  log.verbose('list', 'using node-gyp dir:', devDir)
-
-  let versions = []
-  try {
-    const dir = await fs.readdir(devDir)
-    if (Array.isArray(dir)) {
-      versions = dir.filter((v) => v !== 'current')
-    }
-  } catch (err) {
-    if (err && err.code !== 'ENOENT') {
-      throw err
-    }
-  }
-
-  return versions
-}
-
-module.exports = list
-module.exports.usage = 'Prints a listing of the currently installed node development files'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/log.js b/node_modules/npm/node_modules/node-gyp/lib/log.js
deleted file mode 100644
index 6841719..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/log.js
+++ /dev/null
@@ -1,169 +0,0 @@
-'use strict'
-
-const procLog = require('proc-log')
-const { format } = require('util')
-
-// helper to emit log messages with a predefined prefix
-const logLevels = Object.keys(procLog).filter((k) => typeof procLog[k] === 'function')
-const withPrefix = (prefix) => logLevels.reduce((acc, level) => {
-  acc[level] = (...args) => procLog[level](prefix, ...args)
-  return acc
-}, {})
-
-// very basic ansi color generator
-const COLORS = {
-  wrap: (str, colors) => {
-    const codes = colors.filter(c => typeof c === 'number')
-    return `\x1b[${codes.join(';')}m${str}\x1b[0m`
-  },
-  inverse: 7,
-  fg: {
-    black: 30,
-    red: 31,
-    green: 32,
-    yellow: 33,
-    blue: 34,
-    magenta: 35,
-    cyan: 36,
-    white: 37
-  },
-  bg: {
-    black: 40,
-    red: 41,
-    green: 42,
-    yellow: 43,
-    blue: 44,
-    magenta: 45,
-    cyan: 46,
-    white: 47
-  }
-}
-
-class Logger {
-  #buffer = []
-  #paused = null
-  #level = null
-  #stream = null
-
-  // ordered from loudest to quietest
-  #levels = [{
-    id: 'silly',
-    display: 'sill',
-    style: { inverse: true }
-  }, {
-    id: 'verbose',
-    display: 'verb',
-    style: { fg: 'cyan', bg: 'black' }
-  }, {
-    id: 'info',
-    style: { fg: 'green' }
-  }, {
-    id: 'http',
-    style: { fg: 'green', bg: 'black' }
-  }, {
-    id: 'notice',
-    style: { fg: 'cyan', bg: 'black' }
-  }, {
-    id: 'warn',
-    display: 'WARN',
-    style: { fg: 'black', bg: 'yellow' }
-  }, {
-    id: 'error',
-    display: 'ERR!',
-    style: { fg: 'red', bg: 'black' }
-  }]
-
-  constructor (stream) {
-    process.on('log', (...args) => this.#onLog(...args))
-    this.#levels = new Map(this.#levels.map((level, index) => [level.id, { ...level, index }]))
-    this.level = 'info'
-    this.stream = stream
-    procLog.pause()
-  }
-
-  get stream () {
-    return this.#stream
-  }
-
-  set stream (stream) {
-    this.#stream = stream
-  }
-
-  get level () {
-    return this.#levels.get(this.#level) ?? null
-  }
-
-  set level (level) {
-    this.#level = this.#levels.get(level)?.id ?? null
-  }
-
-  isVisible (level) {
-    return this.level?.index <= this.#levels.get(level)?.index ?? -1
-  }
-
-  #onLog (...args) {
-    const [level] = args
-
-    if (level === 'pause') {
-      this.#paused = true
-      return
-    }
-
-    if (level === 'resume') {
-      this.#paused = false
-      this.#buffer.forEach((b) => this.#log(...b))
-      this.#buffer.length = 0
-      return
-    }
-
-    if (this.#paused) {
-      this.#buffer.push(args)
-      return
-    }
-
-    this.#log(...args)
-  }
-
-  #color (str, { fg, bg, inverse }) {
-    if (!this.#stream?.isTTY) {
-      return str
-    }
-
-    return COLORS.wrap(str, [
-      COLORS.fg[fg],
-      COLORS.bg[bg],
-      inverse && COLORS.inverse
-    ])
-  }
-
-  #log (levelId, msgPrefix, ...args) {
-    if (!this.isVisible(levelId) || typeof this.#stream?.write !== 'function') {
-      return
-    }
-
-    const level = this.#levels.get(levelId)
-
-    const prefixParts = [
-      this.#color('gyp', { fg: 'white', bg: 'black' }),
-      this.#color(level.display ?? level.id, level.style)
-    ]
-    if (msgPrefix) {
-      prefixParts.push(this.#color(msgPrefix, { fg: 'magenta' }))
-    }
-
-    const prefix = prefixParts.join(' ').trim() + ' '
-    const lines = format(...args).split(/\r?\n/).map(l => prefix + l.trim())
-
-    this.#stream.write(lines.join('\n') + '\n')
-  }
-}
-
-// used to suppress logs in tests
-const NULL_LOGGER = !!process.env.NODE_GYP_NULL_LOGGER
-
-module.exports = {
-  logger: new Logger(NULL_LOGGER ? null : process.stderr),
-  stdout: NULL_LOGGER ? () => {} : (...args) => console.log(...args),
-  withPrefix,
-  ...procLog
-}
diff --git a/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js b/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
deleted file mode 100644
index 5e25bf9..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
+++ /dev/null
@@ -1,188 +0,0 @@
-'use strict'
-
-const path = require('path')
-const nopt = require('nopt')
-const log = require('./log')
-const childProcess = require('child_process')
-const { EventEmitter } = require('events')
-
-const commands = [
-  // Module build commands
-  'build',
-  'clean',
-  'configure',
-  'rebuild',
-  // Development Header File management commands
-  'install',
-  'list',
-  'remove'
-]
-
-class Gyp extends EventEmitter {
-  /**
-   * Export the contents of the package.json.
-   */
-  package = require('../package.json')
-
-  /**
-   * nopt configuration definitions
-   */
-  configDefs = {
-    help: Boolean, // everywhere
-    arch: String, // 'configure'
-    cafile: String, // 'install'
-    debug: Boolean, // 'build'
-    directory: String, // bin
-    make: String, // 'build'
-    'msvs-version': String, // 'configure'
-    ensure: Boolean, // 'install'
-    solution: String, // 'build' (windows only)
-    proxy: String, // 'install'
-    noproxy: String, // 'install'
-    devdir: String, // everywhere
-    nodedir: String, // 'configure'
-    loglevel: String, // everywhere
-    python: String, // 'configure'
-    'dist-url': String, // 'install'
-    tarball: String, // 'install'
-    jobs: String, // 'build'
-    thin: String, // 'configure'
-    'force-process-config': Boolean // 'configure'
-  }
-
-  /**
-   * nopt shorthands
-   */
-  shorthands = {
-    release: '--no-debug',
-    C: '--directory',
-    debug: '--debug',
-    j: '--jobs',
-    silly: '--loglevel=silly',
-    verbose: '--loglevel=verbose',
-    silent: '--loglevel=silent'
-  }
-
-  /**
-   * expose the command aliases for the bin file to use.
-   */
-  aliases = {
-    ls: 'list',
-    rm: 'remove'
-  }
-
-  constructor (...args) {
-    super(...args)
-
-    this.devDir = ''
-
-    this.commands = commands.reduce((acc, command) => {
-      acc[command] = (argv) => require('./' + command)(this, argv)
-      return acc
-    }, {})
-
-    Object.defineProperty(this, 'version', {
-      enumerable: true,
-      get: function () { return this.package.version }
-    })
-  }
-
-  /**
-   * Parses the given argv array and sets the 'opts',
-   * 'argv' and 'command' properties.
-   */
-  parseArgv (argv) {
-    this.opts = nopt(this.configDefs, this.shorthands, argv)
-    this.argv = this.opts.argv.remain.slice()
-
-    const commands = this.todo = []
-
-    // create a copy of the argv array with aliases mapped
-    argv = this.argv.map((arg) => {
-    // is this an alias?
-      if (arg in this.aliases) {
-        arg = this.aliases[arg]
-      }
-      return arg
-    })
-
-    // process the mapped args into "command" objects ("name" and "args" props)
-    argv.slice().forEach((arg) => {
-      if (arg in this.commands) {
-        const args = argv.splice(0, argv.indexOf(arg))
-        argv.shift()
-        if (commands.length > 0) {
-          commands[commands.length - 1].args = args
-        }
-        commands.push({ name: arg, args: [] })
-      }
-    })
-    if (commands.length > 0) {
-      commands[commands.length - 1].args = argv.splice(0)
-    }
-
-    // support for inheriting config env variables from npm
-    const npmConfigPrefix = 'npm_config_'
-    Object.keys(process.env).forEach((name) => {
-      if (name.indexOf(npmConfigPrefix) !== 0) {
-        return
-      }
-      const val = process.env[name]
-      if (name === npmConfigPrefix + 'loglevel') {
-        log.logger.level = val
-      } else {
-      // add the user-defined options to the config
-        name = name.substring(npmConfigPrefix.length)
-        // gyp@741b7f1 enters an infinite loop when it encounters
-        // zero-length options so ensure those don't get through.
-        if (name) {
-        // convert names like force_process_config to force-process-config
-          if (name.includes('_')) {
-            name = name.replace(/_/g, '-')
-          }
-          this.opts[name] = val
-        }
-      }
-    })
-
-    if (this.opts.loglevel) {
-      log.logger.level = this.opts.loglevel
-    }
-    log.resume()
-  }
-
-  /**
-   * Spawns a child process and emits a 'spawn' event.
-   */
-  spawn (command, args, opts) {
-    if (!opts) {
-      opts = {}
-    }
-    if (!opts.silent && !opts.stdio) {
-      opts.stdio = [0, 1, 2]
-    }
-    const cp = childProcess.spawn(command, args, opts)
-    log.info('spawn', command)
-    log.info('spawn args', args)
-    return cp
-  }
-
-  /**
-   * Returns the usage instructions for node-gyp.
-   */
-  usage () {
-    return [
-      '',
-      '  Usage: node-gyp  [options]',
-      '',
-      '  where  is one of:',
-      commands.map((c) => '    - ' + c + ' - ' + require('./' + c).usage).join('\n'),
-      '',
-      'node-gyp@' + this.version + '  ' + path.resolve(__dirname, '..'),
-      'node@' + process.versions.node
-    ].join('\n')
-  }
-}
-
-module.exports = () => new Gyp()
-module.exports.Gyp = Gyp
diff --git a/node_modules/npm/node_modules/node-gyp/lib/process-release.js b/node_modules/npm/node_modules/node-gyp/lib/process-release.js
deleted file mode 100644
index c9a319d..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/process-release.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/* eslint-disable n/no-deprecated-api */
-
-'use strict'
-
-const semver = require('semver')
-const url = require('url')
-const path = require('path')
-const log = require('./log')
-
-// versions where -headers.tar.gz started shipping
-const headersTarballRange = '>= 3.0.0 || ~0.12.10 || ~0.10.42'
-const bitsre = /\/win-(x86|x64|arm64)\//
-const bitsreV3 = /\/win-(x86|ia32|x64)\// // io.js v3.x.x shipped with "ia32" but should
-// have been "x86"
-
-// Captures all the logic required to determine download URLs, local directory and
-// file names. Inputs come from command-line switches (--target, --dist-url),
-// `process.version` and `process.release` where it exists.
-function processRelease (argv, gyp, defaultVersion, defaultRelease) {
-  let version = (semver.valid(argv[0]) && argv[0]) || gyp.opts.target || defaultVersion
-  const versionSemver = semver.parse(version)
-  let overrideDistUrl = gyp.opts['dist-url'] || gyp.opts.disturl
-  let isNamedForLegacyIojs
-  let name
-  let distBaseUrl
-  let baseUrl
-  let libUrl32
-  let libUrl64
-  let libUrlArm64
-  let tarballUrl
-  let canGetHeaders
-
-  if (!versionSemver) {
-    // not a valid semver string, nothing we can do
-    return { version }
-  }
-  // flatten version into String
-  version = versionSemver.version
-
-  // defaultVersion should come from process.version so ought to be valid semver
-  const isDefaultVersion = version === semver.parse(defaultVersion).version
-
-  // can't use process.release if we're using --target=x.y.z
-  if (!isDefaultVersion) {
-    defaultRelease = null
-  }
-
-  if (defaultRelease) {
-    // v3 onward, has process.release
-    name = defaultRelease.name.replace(/io\.js/, 'iojs') // remove the '.' for directory naming purposes
-  } else {
-    // old node or alternative --target=
-    // semver.satisfies() doesn't like prerelease tags so test major directly
-    isNamedForLegacyIojs = versionSemver.major >= 1 && versionSemver.major < 4
-    // isNamedForLegacyIojs is required to support Electron < 4 (in particular Electron 3)
-    // as previously this logic was used to ensure "iojs" was used to download iojs releases
-    // and "node" for node releases.  Unfortunately the logic was broad enough that electron@3
-    // published release assets as "iojs" so that the node-gyp logic worked.  Once Electron@3 has
-    // been EOL for a while (late 2019) we should remove this hack.
-    name = isNamedForLegacyIojs ? 'iojs' : 'node'
-  }
-
-  // check for the nvm.sh standard mirror env variables
-  if (!overrideDistUrl && process.env.NODEJS_ORG_MIRROR) {
-    overrideDistUrl = process.env.NODEJS_ORG_MIRROR
-  }
-
-  if (overrideDistUrl) {
-    log.verbose('download', 'using dist-url', overrideDistUrl)
-  }
-
-  if (overrideDistUrl) {
-    distBaseUrl = overrideDistUrl.replace(/\/+$/, '')
-  } else {
-    distBaseUrl = 'https://nodejs.org/dist'
-  }
-  distBaseUrl += '/v' + version + '/'
-
-  // new style, based on process.release so we have a lot of the data we need
-  if (defaultRelease && defaultRelease.headersUrl && !overrideDistUrl) {
-    baseUrl = url.resolve(defaultRelease.headersUrl, './')
-    libUrl32 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x86', versionSemver.major)
-    libUrl64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'x64', versionSemver.major)
-    libUrlArm64 = resolveLibUrl(name, defaultRelease.libUrl || baseUrl || distBaseUrl, 'arm64', versionSemver.major)
-    tarballUrl = defaultRelease.headersUrl
-  } else {
-    // older versions without process.release are captured here and we have to make
-    // a lot of assumptions, additionally if you --target=x.y.z then we can't use the
-    // current process.release
-    baseUrl = distBaseUrl
-    libUrl32 = resolveLibUrl(name, baseUrl, 'x86', versionSemver.major)
-    libUrl64 = resolveLibUrl(name, baseUrl, 'x64', versionSemver.major)
-    libUrlArm64 = resolveLibUrl(name, baseUrl, 'arm64', versionSemver.major)
-
-    // making the bold assumption that anything with a version number >3.0.0 will
-    // have a *-headers.tar.gz file in its dist location, even some frankenstein
-    // custom version
-    canGetHeaders = semver.satisfies(versionSemver, headersTarballRange)
-    tarballUrl = url.resolve(baseUrl, name + '-v' + version + (canGetHeaders ? '-headers' : '') + '.tar.gz')
-  }
-
-  return {
-    version,
-    semver: versionSemver,
-    name,
-    baseUrl,
-    tarballUrl,
-    shasumsUrl: url.resolve(baseUrl, 'SHASUMS256.txt'),
-    versionDir: (name !== 'node' ? name + '-' : '') + version,
-    ia32: {
-      libUrl: libUrl32,
-      libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl32).path))
-    },
-    x64: {
-      libUrl: libUrl64,
-      libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrl64).path))
-    },
-    arm64: {
-      libUrl: libUrlArm64,
-      libPath: normalizePath(path.relative(url.parse(baseUrl).path, url.parse(libUrlArm64).path))
-    }
-  }
-}
-
-function normalizePath (p) {
-  return path.normalize(p).replace(/\\/g, '/')
-}
-
-function resolveLibUrl (name, defaultUrl, arch, versionMajor) {
-  const base = url.resolve(defaultUrl, './')
-  const hasLibUrl = bitsre.test(defaultUrl) || (versionMajor === 3 && bitsreV3.test(defaultUrl))
-
-  if (!hasLibUrl) {
-    // let's assume it's a baseUrl then
-    if (versionMajor >= 1) {
-      return url.resolve(base, 'win-' + arch + '/' + name + '.lib')
-    }
-    // prior to io.js@1.0.0 32-bit node.lib lives in /, 64-bit lives in /x64/
-    return url.resolve(base, (arch === 'x86' ? '' : arch + '/') + name + '.lib')
-  }
-
-  // else we have a proper url to a .lib, just make sure it's the right arch
-  return defaultUrl.replace(versionMajor === 3 ? bitsreV3 : bitsre, '/win-' + arch + '/')
-}
-
-module.exports = processRelease
diff --git a/node_modules/npm/node_modules/node-gyp/lib/rebuild.js b/node_modules/npm/node_modules/node-gyp/lib/rebuild.js
deleted file mode 100644
index 6098176..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/rebuild.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict'
-
-async function rebuild (gyp, argv) {
-  gyp.todo.push(
-    { name: 'clean', args: [] }
-    , { name: 'configure', args: argv }
-    , { name: 'build', args: [] }
-  )
-}
-
-module.exports = rebuild
-module.exports.usage = 'Runs "clean", "configure" and "build" all at once'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/remove.js b/node_modules/npm/node_modules/node-gyp/lib/remove.js
deleted file mode 100644
index 7efdb01..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/remove.js
+++ /dev/null
@@ -1,43 +0,0 @@
-'use strict'
-
-const fs = require('graceful-fs').promises
-const path = require('path')
-const log = require('./log')
-const semver = require('semver')
-
-async function remove (gyp, argv) {
-  const devDir = gyp.devDir
-  log.verbose('remove', 'using node-gyp dir:', devDir)
-
-  // get the user-specified version to remove
-  let version = argv[0] || gyp.opts.target
-  log.verbose('remove', 'removing target version:', version)
-
-  if (!version) {
-    throw new Error('You must specify a version number to remove. Ex: "' + process.version + '"')
-  }
-
-  const versionSemver = semver.parse(version)
-  if (versionSemver) {
-    // flatten the version Array into a String
-    version = versionSemver.version
-  }
-
-  const versionPath = path.resolve(gyp.devDir, version)
-  log.verbose('remove', 'removing development files for version:', version)
-
-  // first check if its even installed
-  try {
-    await fs.stat(versionPath)
-  } catch (err) {
-    if (err.code === 'ENOENT') {
-      return 'version was already uninstalled: ' + version
-    }
-    throw err
-  }
-
-  await fs.rm(versionPath, { recursive: true, force: true })
-}
-
-module.exports = remove
-module.exports.usage = 'Removes the node development files for the specified version'
diff --git a/node_modules/npm/node_modules/node-gyp/lib/util.js b/node_modules/npm/node_modules/node-gyp/lib/util.js
deleted file mode 100644
index 3f6aeeb..0000000
--- a/node_modules/npm/node_modules/node-gyp/lib/util.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict'
-
-const cp = require('child_process')
-const path = require('path')
-const { openSync, closeSync } = require('graceful-fs')
-const log = require('./log')
-
-const execFile = async (...args) => new Promise((resolve) => {
-  const child = cp.execFile(...args, (...a) => resolve(a))
-  child.stdin.end()
-})
-
-async function regGetValue (key, value, addOpts) {
-  const outReValue = value.replace(/\W/g, '.')
-  const outRe = new RegExp(`^\\s+${outReValue}\\s+REG_\\w+\\s+(\\S.*)$`, 'im')
-  const reg = path.join(process.env.SystemRoot, 'System32', 'reg.exe')
-  const regArgs = ['query', key, '/v', value].concat(addOpts)
-
-  log.silly('reg', 'running', reg, regArgs)
-  const [err, stdout, stderr] = await execFile(reg, regArgs, { encoding: 'utf8' })
-
-  log.silly('reg', 'reg.exe stdout = %j', stdout)
-  if (err || stderr.trim() !== '') {
-    log.silly('reg', 'reg.exe err = %j', err && (err.stack || err))
-    log.silly('reg', 'reg.exe stderr = %j', stderr)
-    if (err) {
-      throw err
-    }
-    throw new Error(stderr)
-  }
-
-  const result = outRe.exec(stdout)
-  if (!result) {
-    log.silly('reg', 'error parsing stdout')
-    throw new Error('Could not parse output of reg.exe')
-  }
-
-  log.silly('reg', 'found: %j', result[1])
-  return result[1]
-}
-
-async function regSearchKeys (keys, value, addOpts) {
-  for (const key of keys) {
-    try {
-      return await regGetValue(key, value, addOpts)
-    } catch {
-      continue
-    }
-  }
-}
-
-/**
- * Returns the first file or directory from an array of candidates that is
- * readable by the current user, or undefined if none of the candidates are
- * readable.
- */
-function findAccessibleSync (logprefix, dir, candidates) {
-  for (let next = 0; next < candidates.length; next++) {
-    const candidate = path.resolve(dir, candidates[next])
-    let fd
-    try {
-      fd = openSync(candidate, 'r')
-    } catch (e) {
-      // this candidate was not found or not readable, do nothing
-      log.silly(logprefix, 'Could not open %s: %s', candidate, e.message)
-      continue
-    }
-    closeSync(fd)
-    log.silly(logprefix, 'Found readable %s', candidate)
-    return candidate
-  }
-
-  return undefined
-}
-
-module.exports = {
-  execFile,
-  regGetValue,
-  regSearchKeys,
-  findAccessibleSync
-}
diff --git a/node_modules/npm/node_modules/node-gyp/macOS_Catalina_acid_test.sh b/node_modules/npm/node_modules/node-gyp/macOS_Catalina_acid_test.sh
deleted file mode 100644
index e1e9894..0000000
--- a/node_modules/npm/node_modules/node-gyp/macOS_Catalina_acid_test.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-pkgs=(
-  "com.apple.pkg.DeveloperToolsCLILeo" # standalone
-  "com.apple.pkg.DeveloperToolsCLI"    # from XCode
-  "com.apple.pkg.CLTools_Executables"  # Mavericks
-)
-
-for pkg in "${pkgs[@]}"; do
-  output=$(/usr/sbin/pkgutil --pkg-info "$pkg" 2>/dev/null)
-  if [ "$output" ]; then
-    version=$(echo "$output" | grep 'version' | cut -d' ' -f2)
-    break
-  fi
-done
-
-if [ "$version" ]; then
-  echo "Command Line Tools version: $version"
-else
-  echo >&2 'Command Line Tools not found'
-fi
diff --git a/node_modules/npm/node_modules/node-gyp/package.json b/node_modules/npm/node_modules/node-gyp/package.json
deleted file mode 100644
index 80c63f2..0000000
--- a/node_modules/npm/node_modules/node-gyp/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-  "name": "node-gyp",
-  "description": "Node.js native addon build tool",
-  "license": "MIT",
-  "keywords": [
-    "native",
-    "addon",
-    "module",
-    "c",
-    "c++",
-    "bindings",
-    "gyp"
-  ],
-  "version": "10.0.1",
-  "installVersion": 11,
-  "author": "Nathan Rajlich  (http://tootallnate.net)",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/nodejs/node-gyp.git"
-  },
-  "preferGlobal": true,
-  "bin": "./bin/node-gyp.js",
-  "main": "./lib/node-gyp.js",
-  "dependencies": {
-    "env-paths": "^2.2.0",
-    "exponential-backoff": "^3.1.1",
-    "glob": "^10.3.10",
-    "graceful-fs": "^4.2.6",
-    "make-fetch-happen": "^13.0.0",
-    "nopt": "^7.0.0",
-    "proc-log": "^3.0.0",
-    "semver": "^7.3.5",
-    "tar": "^6.1.2",
-    "which": "^4.0.0"
-  },
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "devDependencies": {
-    "bindings": "^1.5.0",
-    "cross-env": "^7.0.3",
-    "mocha": "^10.2.0",
-    "nan": "^2.14.2",
-    "require-inject": "^1.4.4",
-    "standard": "^17.0.0"
-  },
-  "scripts": {
-    "lint": "standard \"*/*.js\" \"test/**/*.js\" \".github/**/*.js\"",
-    "test": "cross-env NODE_GYP_NULL_LOGGER=true mocha --timeout 15000 test/test-download.js test/test-*"
-  }
-}
diff --git a/node_modules/npm/node_modules/node-gyp/src/win_delay_load_hook.cc b/node_modules/npm/node_modules/node-gyp/src/win_delay_load_hook.cc
deleted file mode 100644
index 169f802..0000000
--- a/node_modules/npm/node_modules/node-gyp/src/win_delay_load_hook.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * When this file is linked to a DLL, it sets up a delay-load hook that
- * intervenes when the DLL is trying to load the host executable
- * dynamically. Instead of trying to locate the .exe file it'll just
- * return a handle to the process image.
- *
- * This allows compiled addons to work when the host executable is renamed.
- */
-
-#ifdef _MSC_VER
-
-#pragma managed(push, off)
-
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-
-#include 
-
-#include 
-#include 
-
-static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) {
-  HMODULE m;
-  if (event != dliNotePreLoadLibrary)
-    return NULL;
-
-  if (_stricmp(info->szDll, HOST_BINARY) != 0)
-    return NULL;
-
-  m = GetModuleHandle(NULL);
-  return (FARPROC) m;
-}
-
-decltype(__pfnDliNotifyHook2) __pfnDliNotifyHook2 = load_exe_hook;
-
-#pragma managed(pop)
-
-#endif
diff --git a/node_modules/npm/node_modules/nopt/LICENSE b/node_modules/npm/node_modules/nopt/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/nopt/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/nopt/README.md b/node_modules/npm/node_modules/nopt/README.md
deleted file mode 100644
index a99531c..0000000
--- a/node_modules/npm/node_modules/nopt/README.md
+++ /dev/null
@@ -1,213 +0,0 @@
-If you want to write an option parser, and have it be good, there are
-two ways to do it.  The Right Way, and the Wrong Way.
-
-The Wrong Way is to sit down and write an option parser.  We've all done
-that.
-
-The Right Way is to write some complex configurable program with so many
-options that you hit the limit of your frustration just trying to
-manage them all, and defer it with duct-tape solutions until you see
-exactly to the core of the problem, and finally snap and write an
-awesome option parser.
-
-If you want to write an option parser, don't write an option parser.
-Write a package manager, or a source control system, or a service
-restarter, or an operating system.  You probably won't end up with a
-good one of those, but if you don't give up, and you are relentless and
-diligent enough in your procrastination, you may just end up with a very
-nice option parser.
-
-## USAGE
-
-```javascript
-// my-program.js
-var nopt = require("nopt")
-  , Stream = require("stream").Stream
-  , path = require("path")
-  , knownOpts = { "foo" : [String, null]
-                , "bar" : [Stream, Number]
-                , "baz" : path
-                , "bloo" : [ "big", "medium", "small" ]
-                , "flag" : Boolean
-                , "pick" : Boolean
-                , "many1" : [String, Array]
-                , "many2" : [path, Array]
-                }
-  , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
-                 , "b7" : ["--bar", "7"]
-                 , "m" : ["--bloo", "medium"]
-                 , "p" : ["--pick"]
-                 , "f" : ["--flag"]
-                 }
-             // everything is optional.
-             // knownOpts and shorthands default to {}
-             // arg list defaults to process.argv
-             // slice defaults to 2
-  , parsed = nopt(knownOpts, shortHands, process.argv, 2)
-console.log(parsed)
-```
-
-This would give you support for any of the following:
-
-```console
-$ node my-program.js --foo "blerp" --no-flag
-{ "foo" : "blerp", "flag" : false }
-
-$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
-{ bar: 7, foo: "Mr. Hand", flag: true }
-
-$ node my-program.js --foo "blerp" -f -----p
-{ foo: "blerp", flag: true, pick: true }
-
-$ node my-program.js -fp --foofoo
-{ foo: "Mr. Foo", flag: true, pick: true }
-
-$ node my-program.js --foofoo -- -fp  # -- stops the flag parsing.
-{ foo: "Mr. Foo", argv: { remain: ["-fp"] } }
-
-$ node my-program.js --blatzk -fp # unknown opts are ok.
-{ blatzk: true, flag: true, pick: true }
-
-$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value
-{ blatzk: 1000, flag: true, pick: true }
-
-$ node my-program.js --no-blatzk -fp # unless they start with "no-"
-{ blatzk: false, flag: true, pick: true }
-
-$ node my-program.js --baz b/a/z # known paths are resolved.
-{ baz: "/Users/isaacs/b/a/z" }
-
-# if Array is one of the types, then it can take many
-# values, and will always be an array.  The other types provided
-# specify what types are allowed in the list.
-
-$ node my-program.js --many1 5 --many1 null --many1 foo
-{ many1: ["5", "null", "foo"] }
-
-$ node my-program.js --many2 foo --many2 bar
-{ many2: ["/path/to/foo", "path/to/bar"] }
-```
-
-Read the tests at the bottom of `lib/nopt.js` for more examples of
-what this puppy can do.
-
-## Types
-
-The following types are supported, and defined on `nopt.typeDefs`
-
-* String: A normal string.  No parsing is done.
-* path: A file system path.  Gets resolved against cwd if not absolute.
-* url: A url.  If it doesn't parse, it isn't accepted.
-* Number: Must be numeric.
-* Date: Must parse as a date. If it does, and `Date` is one of the options,
-  then it will return a Date object, not a string.
-* Boolean: Must be either `true` or `false`.  If an option is a boolean,
-  then it does not need a value, and its presence will imply `true` as
-  the value.  To negate boolean flags, do `--no-whatever` or `--whatever
-  false`
-* NaN: Means that the option is strictly not allowed.  Any value will
-  fail.
-* Stream: An object matching the "Stream" class in node.  Valuable
-  for use when validating programmatically.  (npm uses this to let you
-  supply any WriteStream on the `outfd` and `logfd` config options.)
-* Array: If `Array` is specified as one of the types, then the value
-  will be parsed as a list of options.  This means that multiple values
-  can be specified, and that the value will always be an array.
-
-If a type is an array of values not on this list, then those are
-considered valid values.  For instance, in the example above, the
-`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
-and any other value will be rejected.
-
-When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
-interpreted as their JavaScript equivalents.
-
-You can also mix types and values, or multiple types, in a list.  For
-instance `{ blah: [Number, null] }` would allow a value to be set to
-either a Number or null.  When types are ordered, this implies a
-preference, and the first type that can be used to properly interpret
-the value will be used.
-
-To define a new type, add it to `nopt.typeDefs`.  Each item in that
-hash is an object with a `type` member and a `validate` method.  The
-`type` member is an object that matches what goes in the type list.  The
-`validate` method is a function that gets called with `validate(data,
-key, val)`.  Validate methods should assign `data[key]` to the valid
-value of `val` if it can be handled properly, or return boolean
-`false` if it cannot.
-
-You can also call `nopt.clean(data, types, typeDefs)` to clean up a
-config object and remove its invalid properties.
-
-## Error Handling
-
-By default, nopt outputs a warning to standard error when invalid values for
-known options are found.  You can change this behavior by assigning a method
-to `nopt.invalidHandler`.  This method will be called with
-the offending `nopt.invalidHandler(key, val, types)`.
-
-If no `nopt.invalidHandler` is assigned, then it will console.error
-its whining.  If it is assigned to boolean `false` then the warning is
-suppressed.
-
-## Abbreviations
-
-Yes, they are supported.  If you define options like this:
-
-```javascript
-{ "foolhardyelephants" : Boolean
-, "pileofmonkeys" : Boolean }
-```
-
-Then this will work:
-
-```bash
-node program.js --foolhar --pil
-node program.js --no-f --pileofmon
-# etc.
-```
-
-## Shorthands
-
-Shorthands are a hash of shorter option names to a snippet of args that
-they expand to.
-
-If multiple one-character shorthands are all combined, and the
-combination does not unambiguously match any other option or shorthand,
-then they will be broken up into their constituent parts.  For example:
-
-```json
-{ "s" : ["--loglevel", "silent"]
-, "g" : "--global"
-, "f" : "--force"
-, "p" : "--parseable"
-, "l" : "--long"
-}
-```
-
-```bash
-npm ls -sgflp
-# just like doing this:
-npm ls --loglevel silent --global --force --long --parseable
-```
-
-## The Rest of the args
-
-The config object returned by nopt is given a special member called
-`argv`, which is an object with the following fields:
-
-* `remain`: The remaining args after all the parsing has occurred.
-* `original`: The args as they originally appeared.
-* `cooked`: The args after flags and shorthands are expanded.
-
-## Slicing
-
-Node programs are called with more or less the exact argv as it appears
-in C land, after the v8 and node-specific options have been plucked off.
-As such, `argv[0]` is always `node` and `argv[1]` is always the
-JavaScript program being run.
-
-That's usually not very useful to you.  So they're sliced off by
-default.  If you want them, then you can pass in `0` as the last
-argument, or any other number that you'd like to slice off the start of
-the list.
diff --git a/node_modules/npm/node_modules/nopt/bin/nopt.js b/node_modules/npm/node_modules/nopt/bin/nopt.js
deleted file mode 100755
index 6ed2082..0000000
--- a/node_modules/npm/node_modules/nopt/bin/nopt.js
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env node
-const nopt = require('../lib/nopt')
-const path = require('path')
-console.log('parsed', nopt({
-  num: Number,
-  bool: Boolean,
-  help: Boolean,
-  list: Array,
-  'num-list': [Number, Array],
-  'str-list': [String, Array],
-  'bool-list': [Boolean, Array],
-  str: String,
-  clear: Boolean,
-  config: Boolean,
-  length: Number,
-  file: path,
-}, {
-  s: ['--str', 'astring'],
-  b: ['--bool'],
-  nb: ['--no-bool'],
-  tft: ['--bool-list', '--no-bool-list', '--bool-list', 'true'],
-  '?': ['--help'],
-  h: ['--help'],
-  H: ['--help'],
-  n: ['--num', '125'],
-  c: ['--config'],
-  l: ['--length'],
-  f: ['--file'],
-}, process.argv, 2))
diff --git a/node_modules/npm/node_modules/nopt/lib/debug.js b/node_modules/npm/node_modules/nopt/lib/debug.js
deleted file mode 100644
index e62198e..0000000
--- a/node_modules/npm/node_modules/nopt/lib/debug.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* istanbul ignore next */
-module.exports = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
-  ? (...a) => console.error(...a)
-  : () => {}
diff --git a/node_modules/npm/node_modules/nopt/lib/nopt-lib.js b/node_modules/npm/node_modules/nopt/lib/nopt-lib.js
deleted file mode 100644
index d3d1de0..0000000
--- a/node_modules/npm/node_modules/nopt/lib/nopt-lib.js
+++ /dev/null
@@ -1,479 +0,0 @@
-const abbrev = require('abbrev')
-const debug = require('./debug')
-const defaultTypeDefs = require('./type-defs')
-
-const hasOwn = (o, k) => Object.prototype.hasOwnProperty.call(o, k)
-
-const getType = (k, { types, dynamicTypes }) => {
-  let hasType = hasOwn(types, k)
-  let type = types[k]
-  if (!hasType && typeof dynamicTypes === 'function') {
-    const matchedType = dynamicTypes(k)
-    if (matchedType !== undefined) {
-      type = matchedType
-      hasType = true
-    }
-  }
-  return [hasType, type]
-}
-
-const isTypeDef = (type, def) => def && type === def
-const hasTypeDef = (type, def) => def && type.indexOf(def) !== -1
-const doesNotHaveTypeDef = (type, def) => def && !hasTypeDef(type, def)
-
-function nopt (args, {
-  types,
-  shorthands,
-  typeDefs,
-  invalidHandler,
-  typeDefault,
-  dynamicTypes,
-} = {}) {
-  debug(types, shorthands, args, typeDefs)
-
-  const data = {}
-  const argv = {
-    remain: [],
-    cooked: args,
-    original: args.slice(0),
-  }
-
-  parse(args, data, argv.remain, { typeDefs, types, dynamicTypes, shorthands })
-
-  // now data is full
-  clean(data, { types, dynamicTypes, typeDefs, invalidHandler, typeDefault })
-  data.argv = argv
-
-  Object.defineProperty(data.argv, 'toString', {
-    value: function () {
-      return this.original.map(JSON.stringify).join(' ')
-    },
-    enumerable: false,
-  })
-
-  return data
-}
-
-function clean (data, {
-  types = {},
-  typeDefs = {},
-  dynamicTypes,
-  invalidHandler,
-  typeDefault,
-} = {}) {
-  const StringType = typeDefs.String?.type
-  const NumberType = typeDefs.Number?.type
-  const ArrayType = typeDefs.Array?.type
-  const BooleanType = typeDefs.Boolean?.type
-  const DateType = typeDefs.Date?.type
-
-  const hasTypeDefault = typeof typeDefault !== 'undefined'
-  if (!hasTypeDefault) {
-    typeDefault = [false, true, null]
-    if (StringType) {
-      typeDefault.push(StringType)
-    }
-    if (ArrayType) {
-      typeDefault.push(ArrayType)
-    }
-  }
-
-  const remove = {}
-
-  Object.keys(data).forEach((k) => {
-    if (k === 'argv') {
-      return
-    }
-    let val = data[k]
-    debug('val=%j', val)
-    const isArray = Array.isArray(val)
-    let [hasType, rawType] = getType(k, { types, dynamicTypes })
-    let type = rawType
-    if (!isArray) {
-      val = [val]
-    }
-    if (!type) {
-      type = typeDefault
-    }
-    if (isTypeDef(type, ArrayType)) {
-      type = typeDefault.concat(ArrayType)
-    }
-    if (!Array.isArray(type)) {
-      type = [type]
-    }
-
-    debug('val=%j', val)
-    debug('types=', type)
-    val = val.map((v) => {
-      // if it's an unknown value, then parse false/true/null/numbers/dates
-      if (typeof v === 'string') {
-        debug('string %j', v)
-        v = v.trim()
-        if ((v === 'null' && ~type.indexOf(null))
-            || (v === 'true' &&
-               (~type.indexOf(true) || hasTypeDef(type, BooleanType)))
-            || (v === 'false' &&
-               (~type.indexOf(false) || hasTypeDef(type, BooleanType)))) {
-          v = JSON.parse(v)
-          debug('jsonable %j', v)
-        } else if (hasTypeDef(type, NumberType) && !isNaN(v)) {
-          debug('convert to number', v)
-          v = +v
-        } else if (hasTypeDef(type, DateType) && !isNaN(Date.parse(v))) {
-          debug('convert to date', v)
-          v = new Date(v)
-        }
-      }
-
-      if (!hasType) {
-        if (!hasTypeDefault) {
-          return v
-        }
-        // if the default type has been passed in then we want to validate the
-        // unknown data key instead of bailing out earlier. we also set the raw
-        // type which is passed to the invalid handler so that it can be
-        // determined if during validation if it is unknown vs invalid
-        rawType = typeDefault
-      }
-
-      // allow `--no-blah` to set 'blah' to null if null is allowed
-      if (v === false && ~type.indexOf(null) &&
-          !(~type.indexOf(false) || hasTypeDef(type, BooleanType))) {
-        v = null
-      }
-
-      const d = {}
-      d[k] = v
-      debug('prevalidated val', d, v, rawType)
-      if (!validate(d, k, v, rawType, { typeDefs })) {
-        if (invalidHandler) {
-          invalidHandler(k, v, rawType, data)
-        } else if (invalidHandler !== false) {
-          debug('invalid: ' + k + '=' + v, rawType)
-        }
-        return remove
-      }
-      debug('validated v', d, v, rawType)
-      return d[k]
-    }).filter((v) => v !== remove)
-
-    // if we allow Array specifically, then an empty array is how we
-    // express 'no value here', not null.  Allow it.
-    if (!val.length && doesNotHaveTypeDef(type, ArrayType)) {
-      debug('VAL HAS NO LENGTH, DELETE IT', val, k, type.indexOf(ArrayType))
-      delete data[k]
-    } else if (isArray) {
-      debug(isArray, data[k], val)
-      data[k] = val
-    } else {
-      data[k] = val[0]
-    }
-
-    debug('k=%s val=%j', k, val, data[k])
-  })
-}
-
-function validate (data, k, val, type, { typeDefs } = {}) {
-  const ArrayType = typeDefs?.Array?.type
-  // arrays are lists of types.
-  if (Array.isArray(type)) {
-    for (let i = 0, l = type.length; i < l; i++) {
-      if (isTypeDef(type[i], ArrayType)) {
-        continue
-      }
-      if (validate(data, k, val, type[i], { typeDefs })) {
-        return true
-      }
-    }
-    delete data[k]
-    return false
-  }
-
-  // an array of anything?
-  if (isTypeDef(type, ArrayType)) {
-    return true
-  }
-
-  // Original comment:
-  // NaN is poisonous.  Means that something is not allowed.
-  // New comment: Changing this to an isNaN check breaks a lot of tests.
-  // Something is being assumed here that is not actually what happens in
-  // practice.  Fixing it is outside the scope of getting linting to pass in
-  // this repo. Leaving as-is for now.
-  /* eslint-disable-next-line no-self-compare */
-  if (type !== type) {
-    debug('Poison NaN', k, val, type)
-    delete data[k]
-    return false
-  }
-
-  // explicit list of values
-  if (val === type) {
-    debug('Explicitly allowed %j', val)
-    data[k] = val
-    return true
-  }
-
-  // now go through the list of typeDefs, validate against each one.
-  let ok = false
-  const types = Object.keys(typeDefs)
-  for (let i = 0, l = types.length; i < l; i++) {
-    debug('test type %j %j %j', k, val, types[i])
-    const t = typeDefs[types[i]]
-    if (t && (
-      (type && type.name && t.type && t.type.name) ?
-        (type.name === t.type.name) :
-        (type === t.type)
-    )) {
-      const d = {}
-      ok = t.validate(d, k, val) !== false
-      val = d[k]
-      if (ok) {
-        data[k] = val
-        break
-      }
-    }
-  }
-  debug('OK? %j (%j %j %j)', ok, k, val, types[types.length - 1])
-
-  if (!ok) {
-    delete data[k]
-  }
-  return ok
-}
-
-function parse (args, data, remain, {
-  types = {},
-  typeDefs = {},
-  shorthands = {},
-  dynamicTypes,
-} = {}) {
-  const StringType = typeDefs.String?.type
-  const NumberType = typeDefs.Number?.type
-  const ArrayType = typeDefs.Array?.type
-  const BooleanType = typeDefs.Boolean?.type
-
-  debug('parse', args, data, remain)
-
-  const abbrevs = abbrev(Object.keys(types))
-  debug('abbrevs=%j', abbrevs)
-  const shortAbbr = abbrev(Object.keys(shorthands))
-
-  for (let i = 0; i < args.length; i++) {
-    let arg = args[i]
-    debug('arg', arg)
-
-    if (arg.match(/^-{2,}$/)) {
-      // done with keys.
-      // the rest are args.
-      remain.push.apply(remain, args.slice(i + 1))
-      args[i] = '--'
-      break
-    }
-    let hadEq = false
-    if (arg.charAt(0) === '-' && arg.length > 1) {
-      const at = arg.indexOf('=')
-      if (at > -1) {
-        hadEq = true
-        const v = arg.slice(at + 1)
-        arg = arg.slice(0, at)
-        args.splice(i, 1, arg, v)
-      }
-
-      // see if it's a shorthand
-      // if so, splice and back up to re-parse it.
-      const shRes = resolveShort(arg, shortAbbr, abbrevs, { shorthands })
-      debug('arg=%j shRes=%j', arg, shRes)
-      if (shRes) {
-        args.splice.apply(args, [i, 1].concat(shRes))
-        if (arg !== shRes[0]) {
-          i--
-          continue
-        }
-      }
-      arg = arg.replace(/^-+/, '')
-      let no = null
-      while (arg.toLowerCase().indexOf('no-') === 0) {
-        no = !no
-        arg = arg.slice(3)
-      }
-
-      if (abbrevs[arg]) {
-        arg = abbrevs[arg]
-      }
-
-      let [hasType, argType] = getType(arg, { types, dynamicTypes })
-      let isTypeArray = Array.isArray(argType)
-      if (isTypeArray && argType.length === 1) {
-        isTypeArray = false
-        argType = argType[0]
-      }
-
-      let isArray = isTypeDef(argType, ArrayType) ||
-        isTypeArray && hasTypeDef(argType, ArrayType)
-
-      // allow unknown things to be arrays if specified multiple times.
-      if (!hasType && hasOwn(data, arg)) {
-        if (!Array.isArray(data[arg])) {
-          data[arg] = [data[arg]]
-        }
-        isArray = true
-      }
-
-      let val
-      let la = args[i + 1]
-
-      const isBool = typeof no === 'boolean' ||
-        isTypeDef(argType, BooleanType) ||
-        isTypeArray && hasTypeDef(argType, BooleanType) ||
-        (typeof argType === 'undefined' && !hadEq) ||
-        (la === 'false' &&
-         (argType === null ||
-          isTypeArray && ~argType.indexOf(null)))
-
-      if (isBool) {
-        // just set and move along
-        val = !no
-        // however, also support --bool true or --bool false
-        if (la === 'true' || la === 'false') {
-          val = JSON.parse(la)
-          la = null
-          if (no) {
-            val = !val
-          }
-          i++
-        }
-
-        // also support "foo":[Boolean, "bar"] and "--foo bar"
-        if (isTypeArray && la) {
-          if (~argType.indexOf(la)) {
-            // an explicit type
-            val = la
-            i++
-          } else if (la === 'null' && ~argType.indexOf(null)) {
-            // null allowed
-            val = null
-            i++
-          } else if (!la.match(/^-{2,}[^-]/) &&
-                      !isNaN(la) &&
-                      hasTypeDef(argType, NumberType)) {
-            // number
-            val = +la
-            i++
-          } else if (!la.match(/^-[^-]/) && hasTypeDef(argType, StringType)) {
-            // string
-            val = la
-            i++
-          }
-        }
-
-        if (isArray) {
-          (data[arg] = data[arg] || []).push(val)
-        } else {
-          data[arg] = val
-        }
-
-        continue
-      }
-
-      if (isTypeDef(argType, StringType)) {
-        if (la === undefined) {
-          la = ''
-        } else if (la.match(/^-{1,2}[^-]+/)) {
-          la = ''
-          i--
-        }
-      }
-
-      if (la && la.match(/^-{2,}$/)) {
-        la = undefined
-        i--
-      }
-
-      val = la === undefined ? true : la
-      if (isArray) {
-        (data[arg] = data[arg] || []).push(val)
-      } else {
-        data[arg] = val
-      }
-
-      i++
-      continue
-    }
-    remain.push(arg)
-  }
-}
-
-const SINGLES = Symbol('singles')
-const singleCharacters = (arg, shorthands) => {
-  let singles = shorthands[SINGLES]
-  if (!singles) {
-    singles = Object.keys(shorthands).filter((s) => s.length === 1).reduce((l, r) => {
-      l[r] = true
-      return l
-    }, {})
-    shorthands[SINGLES] = singles
-    debug('shorthand singles', singles)
-  }
-  const chrs = arg.split('').filter((c) => singles[c])
-  return chrs.join('') === arg ? chrs : null
-}
-
-function resolveShort (arg, ...rest) {
-  const { types = {}, shorthands = {} } = rest.length ? rest.pop() : {}
-  const shortAbbr = rest[0] ?? abbrev(Object.keys(shorthands))
-  const abbrevs = rest[1] ?? abbrev(Object.keys(types))
-
-  // handle single-char shorthands glommed together, like
-  // npm ls -glp, but only if there is one dash, and only if
-  // all of the chars are single-char shorthands, and it's
-  // not a match to some other abbrev.
-  arg = arg.replace(/^-+/, '')
-
-  // if it's an exact known option, then don't go any further
-  if (abbrevs[arg] === arg) {
-    return null
-  }
-
-  // if it's an exact known shortopt, same deal
-  if (shorthands[arg]) {
-    // make it an array, if it's a list of words
-    if (shorthands[arg] && !Array.isArray(shorthands[arg])) {
-      shorthands[arg] = shorthands[arg].split(/\s+/)
-    }
-
-    return shorthands[arg]
-  }
-
-  // first check to see if this arg is a set of single-char shorthands
-  const chrs = singleCharacters(arg, shorthands)
-  if (chrs) {
-    return chrs.map((c) => shorthands[c]).reduce((l, r) => l.concat(r), [])
-  }
-
-  // if it's an arg abbrev, and not a literal shorthand, then prefer the arg
-  if (abbrevs[arg] && !shorthands[arg]) {
-    return null
-  }
-
-  // if it's an abbr for a shorthand, then use that
-  if (shortAbbr[arg]) {
-    arg = shortAbbr[arg]
-  }
-
-  // make it an array, if it's a list of words
-  if (shorthands[arg] && !Array.isArray(shorthands[arg])) {
-    shorthands[arg] = shorthands[arg].split(/\s+/)
-  }
-
-  return shorthands[arg]
-}
-
-module.exports = {
-  nopt,
-  clean,
-  parse,
-  validate,
-  resolveShort,
-  typeDefs: defaultTypeDefs,
-}
diff --git a/node_modules/npm/node_modules/nopt/lib/nopt.js b/node_modules/npm/node_modules/nopt/lib/nopt.js
deleted file mode 100644
index 37f01a0..0000000
--- a/node_modules/npm/node_modules/nopt/lib/nopt.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const lib = require('./nopt-lib')
-const defaultTypeDefs = require('./type-defs')
-
-// This is the version of nopt's API that requires setting typeDefs and invalidHandler
-// on the required `nopt` object since it is a singleton. To not do a breaking change
-// an API that requires all options be passed in is located in `nopt-lib.js` and
-// exported here as lib.
-// TODO(breaking): make API only work in non-singleton mode
-
-module.exports = exports = nopt
-exports.clean = clean
-exports.typeDefs = defaultTypeDefs
-exports.lib = lib
-
-function nopt (types, shorthands, args = process.argv, slice = 2) {
-  return lib.nopt(args.slice(slice), {
-    types: types || {},
-    shorthands: shorthands || {},
-    typeDefs: exports.typeDefs,
-    invalidHandler: exports.invalidHandler,
-  })
-}
-
-function clean (data, types, typeDefs = exports.typeDefs) {
-  return lib.clean(data, {
-    types: types || {},
-    typeDefs,
-    invalidHandler: exports.invalidHandler,
-  })
-}
diff --git a/node_modules/npm/node_modules/nopt/lib/type-defs.js b/node_modules/npm/node_modules/nopt/lib/type-defs.js
deleted file mode 100644
index 608352e..0000000
--- a/node_modules/npm/node_modules/nopt/lib/type-defs.js
+++ /dev/null
@@ -1,91 +0,0 @@
-const url = require('url')
-const path = require('path')
-const Stream = require('stream').Stream
-const os = require('os')
-const debug = require('./debug')
-
-function validateString (data, k, val) {
-  data[k] = String(val)
-}
-
-function validatePath (data, k, val) {
-  if (val === true) {
-    return false
-  }
-  if (val === null) {
-    return true
-  }
-
-  val = String(val)
-
-  const isWin = process.platform === 'win32'
-  const homePattern = isWin ? /^~(\/|\\)/ : /^~\//
-  const home = os.homedir()
-
-  if (home && val.match(homePattern)) {
-    data[k] = path.resolve(home, val.slice(2))
-  } else {
-    data[k] = path.resolve(val)
-  }
-  return true
-}
-
-function validateNumber (data, k, val) {
-  debug('validate Number %j %j %j', k, val, isNaN(val))
-  if (isNaN(val)) {
-    return false
-  }
-  data[k] = +val
-}
-
-function validateDate (data, k, val) {
-  const s = Date.parse(val)
-  debug('validate Date %j %j %j', k, val, s)
-  if (isNaN(s)) {
-    return false
-  }
-  data[k] = new Date(val)
-}
-
-function validateBoolean (data, k, val) {
-  if (typeof val === 'string') {
-    if (!isNaN(val)) {
-      val = !!(+val)
-    } else if (val === 'null' || val === 'false') {
-      val = false
-    } else {
-      val = true
-    }
-  } else {
-    val = !!val
-  }
-  data[k] = val
-}
-
-function validateUrl (data, k, val) {
-  // Changing this would be a breaking change in the npm cli
-  /* eslint-disable-next-line node/no-deprecated-api */
-  val = url.parse(String(val))
-  if (!val.host) {
-    return false
-  }
-  data[k] = val.href
-}
-
-function validateStream (data, k, val) {
-  if (!(val instanceof Stream)) {
-    return false
-  }
-  data[k] = val
-}
-
-module.exports = {
-  String: { type: String, validate: validateString },
-  Boolean: { type: Boolean, validate: validateBoolean },
-  url: { type: url, validate: validateUrl },
-  Number: { type: Number, validate: validateNumber },
-  path: { type: path, validate: validatePath },
-  Stream: { type: Stream, validate: validateStream },
-  Date: { type: Date, validate: validateDate },
-  Array: { type: Array },
-}
diff --git a/node_modules/npm/node_modules/nopt/package.json b/node_modules/npm/node_modules/nopt/package.json
deleted file mode 100644
index 01b7de8..0000000
--- a/node_modules/npm/node_modules/nopt/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-  "name": "nopt",
-  "version": "7.2.0",
-  "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
-  "author": "GitHub Inc.",
-  "main": "lib/nopt.js",
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/nopt.git"
-  },
-  "bin": {
-    "nopt": "bin/nopt.js"
-  },
-  "license": "ISC",
-  "dependencies": {
-    "abbrev": "^2.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.15.1",
-    "tap": "^16.3.0"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "windowsCI": false,
-    "version": "4.15.1",
-    "publish": true
-  }
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/LICENSE b/node_modules/npm/node_modules/normalize-package-data/LICENSE
deleted file mode 100644
index 19d1364..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-This package contains code originally written by Isaac Z. Schlueter.
-Used with permission.
-
-Copyright (c) Meryn Stol ("Author")
-All rights reserved.
-
-The BSD License
-
-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.
-
-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.
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/npm/node_modules/normalize-package-data/lib/extract_description.js
deleted file mode 100644
index 631966b..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/extract_description.js
+++ /dev/null
@@ -1,24 +0,0 @@
-module.exports = extractDescription
-
-// Extracts description from contents of a readme file in markdown format
-function extractDescription (d) {
-  if (!d) {
-    return
-  }
-  if (d === 'ERROR: No README data found!') {
-    return
-  }
-  // the first block of text before the first heading
-  // that isn't the first line heading
-  d = d.trim().split('\n')
-  let s = 0
-  while (d[s] && d[s].trim().match(/^(#|$)/)) {
-    s++
-  }
-  const l = d.length
-  let e = s + 1
-  while (e < l && d[e].trim()) {
-    e++
-  }
-  return d.slice(s, e).join(' ').trim()
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/fixer.js b/node_modules/npm/node_modules/normalize-package-data/lib/fixer.js
deleted file mode 100644
index bb78231..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/fixer.js
+++ /dev/null
@@ -1,475 +0,0 @@
-var isValidSemver = require('semver/functions/valid')
-var cleanSemver = require('semver/functions/clean')
-var validateLicense = require('validate-npm-package-license')
-var hostedGitInfo = require('hosted-git-info')
-var isBuiltinModule = require('is-core-module')
-var depTypes = ['dependencies', 'devDependencies', 'optionalDependencies']
-var extractDescription = require('./extract_description')
-var url = require('url')
-var typos = require('./typos.json')
-
-var isEmail = str => str.includes('@') && (str.indexOf('@') < str.lastIndexOf('.'))
-
-module.exports = {
-  // default warning function
-  warn: function () {},
-
-  fixRepositoryField: function (data) {
-    if (data.repositories) {
-      this.warn('repositories')
-      data.repository = data.repositories[0]
-    }
-    if (!data.repository) {
-      return this.warn('missingRepository')
-    }
-    if (typeof data.repository === 'string') {
-      data.repository = {
-        type: 'git',
-        url: data.repository,
-      }
-    }
-    var r = data.repository.url || ''
-    if (r) {
-      var hosted = hostedGitInfo.fromUrl(r)
-      if (hosted) {
-        r = data.repository.url
-          = hosted.getDefaultRepresentation() === 'shortcut' ? hosted.https() : hosted.toString()
-      }
-    }
-
-    if (r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)) {
-      this.warn('brokenGitUrl', r)
-    }
-  },
-
-  fixTypos: function (data) {
-    Object.keys(typos.topLevel).forEach(function (d) {
-      if (Object.prototype.hasOwnProperty.call(data, d)) {
-        this.warn('typo', d, typos.topLevel[d])
-      }
-    }, this)
-  },
-
-  fixScriptsField: function (data) {
-    if (!data.scripts) {
-      return
-    }
-    if (typeof data.scripts !== 'object') {
-      this.warn('nonObjectScripts')
-      delete data.scripts
-      return
-    }
-    Object.keys(data.scripts).forEach(function (k) {
-      if (typeof data.scripts[k] !== 'string') {
-        this.warn('nonStringScript')
-        delete data.scripts[k]
-      } else if (typos.script[k] && !data.scripts[typos.script[k]]) {
-        this.warn('typo', k, typos.script[k], 'scripts')
-      }
-    }, this)
-  },
-
-  fixFilesField: function (data) {
-    var files = data.files
-    if (files && !Array.isArray(files)) {
-      this.warn('nonArrayFiles')
-      delete data.files
-    } else if (data.files) {
-      data.files = data.files.filter(function (file) {
-        if (!file || typeof file !== 'string') {
-          this.warn('invalidFilename', file)
-          return false
-        } else {
-          return true
-        }
-      }, this)
-    }
-  },
-
-  fixBinField: function (data) {
-    if (!data.bin) {
-      return
-    }
-    if (typeof data.bin === 'string') {
-      var b = {}
-      var match
-      if (match = data.name.match(/^@[^/]+[/](.*)$/)) {
-        b[match[1]] = data.bin
-      } else {
-        b[data.name] = data.bin
-      }
-      data.bin = b
-    }
-  },
-
-  fixManField: function (data) {
-    if (!data.man) {
-      return
-    }
-    if (typeof data.man === 'string') {
-      data.man = [data.man]
-    }
-  },
-  fixBundleDependenciesField: function (data) {
-    var bdd = 'bundledDependencies'
-    var bd = 'bundleDependencies'
-    if (data[bdd] && !data[bd]) {
-      data[bd] = data[bdd]
-      delete data[bdd]
-    }
-    if (data[bd] && !Array.isArray(data[bd])) {
-      this.warn('nonArrayBundleDependencies')
-      delete data[bd]
-    } else if (data[bd]) {
-      data[bd] = data[bd].filter(function (filtered) {
-        if (!filtered || typeof filtered !== 'string') {
-          this.warn('nonStringBundleDependency', filtered)
-          return false
-        } else {
-          if (!data.dependencies) {
-            data.dependencies = {}
-          }
-          if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) {
-            this.warn('nonDependencyBundleDependency', filtered)
-            data.dependencies[filtered] = '*'
-          }
-          return true
-        }
-      }, this)
-    }
-  },
-
-  fixDependencies: function (data, strict) {
-    objectifyDeps(data, this.warn)
-    addOptionalDepsToDeps(data, this.warn)
-    this.fixBundleDependenciesField(data)
-
-    ;['dependencies', 'devDependencies'].forEach(function (deps) {
-      if (!(deps in data)) {
-        return
-      }
-      if (!data[deps] || typeof data[deps] !== 'object') {
-        this.warn('nonObjectDependencies', deps)
-        delete data[deps]
-        return
-      }
-      Object.keys(data[deps]).forEach(function (d) {
-        var r = data[deps][d]
-        if (typeof r !== 'string') {
-          this.warn('nonStringDependency', d, JSON.stringify(r))
-          delete data[deps][d]
-        }
-        var hosted = hostedGitInfo.fromUrl(data[deps][d])
-        if (hosted) {
-          data[deps][d] = hosted.toString()
-        }
-      }, this)
-    }, this)
-  },
-
-  fixModulesField: function (data) {
-    if (data.modules) {
-      this.warn('deprecatedModules')
-      delete data.modules
-    }
-  },
-
-  fixKeywordsField: function (data) {
-    if (typeof data.keywords === 'string') {
-      data.keywords = data.keywords.split(/,\s+/)
-    }
-    if (data.keywords && !Array.isArray(data.keywords)) {
-      delete data.keywords
-      this.warn('nonArrayKeywords')
-    } else if (data.keywords) {
-      data.keywords = data.keywords.filter(function (kw) {
-        if (typeof kw !== 'string' || !kw) {
-          this.warn('nonStringKeyword')
-          return false
-        } else {
-          return true
-        }
-      }, this)
-    }
-  },
-
-  fixVersionField: function (data, strict) {
-    // allow "loose" semver 1.0 versions in non-strict mode
-    // enforce strict semver 2.0 compliance in strict mode
-    var loose = !strict
-    if (!data.version) {
-      data.version = ''
-      return true
-    }
-    if (!isValidSemver(data.version, loose)) {
-      throw new Error('Invalid version: "' + data.version + '"')
-    }
-    data.version = cleanSemver(data.version, loose)
-    return true
-  },
-
-  fixPeople: function (data) {
-    modifyPeople(data, unParsePerson)
-    modifyPeople(data, parsePerson)
-  },
-
-  fixNameField: function (data, options) {
-    if (typeof options === 'boolean') {
-      options = { strict: options }
-    } else if (typeof options === 'undefined') {
-      options = {}
-    }
-    var strict = options.strict
-    if (!data.name && !strict) {
-      data.name = ''
-      return
-    }
-    if (typeof data.name !== 'string') {
-      throw new Error('name field must be a string.')
-    }
-    if (!strict) {
-      data.name = data.name.trim()
-    }
-    ensureValidName(data.name, strict, options.allowLegacyCase)
-    if (isBuiltinModule(data.name)) {
-      this.warn('conflictingName', data.name)
-    }
-  },
-
-  fixDescriptionField: function (data) {
-    if (data.description && typeof data.description !== 'string') {
-      this.warn('nonStringDescription')
-      delete data.description
-    }
-    if (data.readme && !data.description) {
-      data.description = extractDescription(data.readme)
-    }
-    if (data.description === undefined) {
-      delete data.description
-    }
-    if (!data.description) {
-      this.warn('missingDescription')
-    }
-  },
-
-  fixReadmeField: function (data) {
-    if (!data.readme) {
-      this.warn('missingReadme')
-      data.readme = 'ERROR: No README data found!'
-    }
-  },
-
-  fixBugsField: function (data) {
-    if (!data.bugs && data.repository && data.repository.url) {
-      var hosted = hostedGitInfo.fromUrl(data.repository.url)
-      if (hosted && hosted.bugs()) {
-        data.bugs = { url: hosted.bugs() }
-      }
-    } else if (data.bugs) {
-      if (typeof data.bugs === 'string') {
-        if (isEmail(data.bugs)) {
-          data.bugs = { email: data.bugs }
-        /* eslint-disable-next-line node/no-deprecated-api */
-        } else if (url.parse(data.bugs).protocol) {
-          data.bugs = { url: data.bugs }
-        } else {
-          this.warn('nonEmailUrlBugsString')
-        }
-      } else {
-        bugsTypos(data.bugs, this.warn)
-        var oldBugs = data.bugs
-        data.bugs = {}
-        if (oldBugs.url) {
-          /* eslint-disable-next-line node/no-deprecated-api */
-          if (typeof (oldBugs.url) === 'string' && url.parse(oldBugs.url).protocol) {
-            data.bugs.url = oldBugs.url
-          } else {
-            this.warn('nonUrlBugsUrlField')
-          }
-        }
-        if (oldBugs.email) {
-          if (typeof (oldBugs.email) === 'string' && isEmail(oldBugs.email)) {
-            data.bugs.email = oldBugs.email
-          } else {
-            this.warn('nonEmailBugsEmailField')
-          }
-        }
-      }
-      if (!data.bugs.email && !data.bugs.url) {
-        delete data.bugs
-        this.warn('emptyNormalizedBugs')
-      }
-    }
-  },
-
-  fixHomepageField: function (data) {
-    if (!data.homepage && data.repository && data.repository.url) {
-      var hosted = hostedGitInfo.fromUrl(data.repository.url)
-      if (hosted && hosted.docs()) {
-        data.homepage = hosted.docs()
-      }
-    }
-    if (!data.homepage) {
-      return
-    }
-
-    if (typeof data.homepage !== 'string') {
-      this.warn('nonUrlHomepage')
-      return delete data.homepage
-    }
-    /* eslint-disable-next-line node/no-deprecated-api */
-    if (!url.parse(data.homepage).protocol) {
-      data.homepage = 'http://' + data.homepage
-    }
-  },
-
-  fixLicenseField: function (data) {
-    const license = data.license || data.licence
-    if (!license) {
-      return this.warn('missingLicense')
-    }
-    if (
-      typeof (license) !== 'string' ||
-      license.length < 1 ||
-      license.trim() === ''
-    ) {
-      return this.warn('invalidLicense')
-    }
-    if (!validateLicense(license).validForNewPackages) {
-      return this.warn('invalidLicense')
-    }
-  },
-}
-
-function isValidScopedPackageName (spec) {
-  if (spec.charAt(0) !== '@') {
-    return false
-  }
-
-  var rest = spec.slice(1).split('/')
-  if (rest.length !== 2) {
-    return false
-  }
-
-  return rest[0] && rest[1] &&
-    rest[0] === encodeURIComponent(rest[0]) &&
-    rest[1] === encodeURIComponent(rest[1])
-}
-
-function isCorrectlyEncodedName (spec) {
-  return !spec.match(/[/@\s+%:]/) &&
-    spec === encodeURIComponent(spec)
-}
-
-function ensureValidName (name, strict, allowLegacyCase) {
-  if (name.charAt(0) === '.' ||
-      !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) ||
-      (strict && (!allowLegacyCase) && name !== name.toLowerCase()) ||
-      name.toLowerCase() === 'node_modules' ||
-      name.toLowerCase() === 'favicon.ico') {
-    throw new Error('Invalid name: ' + JSON.stringify(name))
-  }
-}
-
-function modifyPeople (data, fn) {
-  if (data.author) {
-    data.author = fn(data.author)
-  }['maintainers', 'contributors'].forEach(function (set) {
-    if (!Array.isArray(data[set])) {
-      return
-    }
-    data[set] = data[set].map(fn)
-  })
-  return data
-}
-
-function unParsePerson (person) {
-  if (typeof person === 'string') {
-    return person
-  }
-  var name = person.name || ''
-  var u = person.url || person.web
-  var wrappedUrl = u ? (' (' + u + ')') : ''
-  var e = person.email || person.mail
-  var wrappedEmail = e ? (' <' + e + '>') : ''
-  return name + wrappedEmail + wrappedUrl
-}
-
-function parsePerson (person) {
-  if (typeof person !== 'string') {
-    return person
-  }
-  var matchedName = person.match(/^([^(<]+)/)
-  var matchedUrl = person.match(/\(([^()]+)\)/)
-  var matchedEmail = person.match(/<([^<>]+)>/)
-  var obj = {}
-  if (matchedName && matchedName[0].trim()) {
-    obj.name = matchedName[0].trim()
-  }
-  if (matchedEmail) {
-    obj.email = matchedEmail[1]
-  }
-  if (matchedUrl) {
-    obj.url = matchedUrl[1]
-  }
-  return obj
-}
-
-function addOptionalDepsToDeps (data, warn) {
-  var o = data.optionalDependencies
-  if (!o) {
-    return
-  }
-  var d = data.dependencies || {}
-  Object.keys(o).forEach(function (k) {
-    d[k] = o[k]
-  })
-  data.dependencies = d
-}
-
-function depObjectify (deps, type, warn) {
-  if (!deps) {
-    return {}
-  }
-  if (typeof deps === 'string') {
-    deps = deps.trim().split(/[\n\r\s\t ,]+/)
-  }
-  if (!Array.isArray(deps)) {
-    return deps
-  }
-  warn('deprecatedArrayDependencies', type)
-  var o = {}
-  deps.filter(function (d) {
-    return typeof d === 'string'
-  }).forEach(function (d) {
-    d = d.trim().split(/(:?[@\s><=])/)
-    var dn = d.shift()
-    var dv = d.join('')
-    dv = dv.trim()
-    dv = dv.replace(/^@/, '')
-    o[dn] = dv
-  })
-  return o
-}
-
-function objectifyDeps (data, warn) {
-  depTypes.forEach(function (type) {
-    if (!data[type]) {
-      return
-    }
-    data[type] = depObjectify(data[type], type, warn)
-  })
-}
-
-function bugsTypos (bugs, warn) {
-  if (!bugs) {
-    return
-  }
-  Object.keys(bugs).forEach(function (k) {
-    if (typos.bugs[k]) {
-      warn('typo', k, typos.bugs[k], 'bugs')
-      bugs[typos.bugs[k]] = bugs[k]
-      delete bugs[k]
-    }
-  })
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/make_warning.js b/node_modules/npm/node_modules/normalize-package-data/lib/make_warning.js
deleted file mode 100644
index 3be9c86..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/make_warning.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var util = require('util')
-var messages = require('./warning_messages.json')
-
-module.exports = function () {
-  var args = Array.prototype.slice.call(arguments, 0)
-  var warningName = args.shift()
-  if (warningName === 'typo') {
-    return makeTypoWarning.apply(null, args)
-  } else {
-    var msgTemplate = messages[warningName] ? messages[warningName] : warningName + ": '%s'"
-    args.unshift(msgTemplate)
-    return util.format.apply(null, args)
-  }
-}
-
-function makeTypoWarning (providedName, probableName, field) {
-  if (field) {
-    providedName = field + "['" + providedName + "']"
-    probableName = field + "['" + probableName + "']"
-  }
-  return util.format(messages.typo, providedName, probableName)
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js b/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js
deleted file mode 100644
index bf71d2c..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/normalize.js
+++ /dev/null
@@ -1,48 +0,0 @@
-module.exports = normalize
-
-var fixer = require('./fixer')
-normalize.fixer = fixer
-
-var makeWarning = require('./make_warning')
-
-var fieldsToFix = ['name', 'version', 'description', 'repository', 'modules', 'scripts',
-  'files', 'bin', 'man', 'bugs', 'keywords', 'readme', 'homepage', 'license']
-var otherThingsToFix = ['dependencies', 'people', 'typos']
-
-var thingsToFix = fieldsToFix.map(function (fieldName) {
-  return ucFirst(fieldName) + 'Field'
-})
-// two ways to do this in CoffeeScript on only one line, sub-70 chars:
-// thingsToFix = fieldsToFix.map (name) -> ucFirst(name) + "Field"
-// thingsToFix = (ucFirst(name) + "Field" for name in fieldsToFix)
-thingsToFix = thingsToFix.concat(otherThingsToFix)
-
-function normalize (data, warn, strict) {
-  if (warn === true) {
-    warn = null
-    strict = true
-  }
-  if (!strict) {
-    strict = false
-  }
-  if (!warn || data.private) {
-    warn = function (msg) { /* noop */ }
-  }
-
-  if (data.scripts &&
-      data.scripts.install === 'node-gyp rebuild' &&
-      !data.scripts.preinstall) {
-    data.gypfile = true
-  }
-  fixer.warn = function () {
-    warn(makeWarning.apply(null, arguments))
-  }
-  thingsToFix.forEach(function (thingName) {
-    fixer['fix' + ucFirst(thingName)](data, strict)
-  })
-  data._id = data.name + '@' + data.version
-}
-
-function ucFirst (string) {
-  return string.charAt(0).toUpperCase() + string.slice(1)
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/safe_format.js b/node_modules/npm/node_modules/normalize-package-data/lib/safe_format.js
deleted file mode 100644
index 5fc888e..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/safe_format.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var util = require('util')
-
-module.exports = function () {
-  var args = Array.prototype.slice.call(arguments, 0)
-  args.forEach(function (arg) {
-    if (!arg) {
-      throw new TypeError('Bad arguments.')
-    }
-  })
-  return util.format.apply(null, arguments)
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/typos.json b/node_modules/npm/node_modules/normalize-package-data/lib/typos.json
deleted file mode 100644
index 7f9dd28..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/typos.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "topLevel": {
-    "dependancies": "dependencies"
-   ,"dependecies": "dependencies"
-   ,"depdenencies": "dependencies"
-   ,"devEependencies": "devDependencies"
-   ,"depends": "dependencies"
-   ,"dev-dependencies": "devDependencies"
-   ,"devDependences": "devDependencies"
-   ,"devDepenencies": "devDependencies"
-   ,"devdependencies": "devDependencies"
-   ,"repostitory": "repository"
-   ,"repo": "repository"
-   ,"prefereGlobal": "preferGlobal"
-   ,"hompage": "homepage"
-   ,"hampage": "homepage"
-   ,"autohr": "author"
-   ,"autor": "author"
-   ,"contributers": "contributors"
-   ,"publicationConfig": "publishConfig"
-   ,"script": "scripts"
-  },
-  "bugs": { "web": "url", "name": "url" },
-  "script": { "server": "start", "tests": "test" }
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/lib/warning_messages.json b/node_modules/npm/node_modules/normalize-package-data/lib/warning_messages.json
deleted file mode 100644
index 4890f50..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/lib/warning_messages.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "repositories": "'repositories' (plural) Not supported. Please pick one as the 'repository' field"
-  ,"missingRepository": "No repository field."
-  ,"brokenGitUrl": "Probably broken git url: %s"
-  ,"nonObjectScripts": "scripts must be an object"
-  ,"nonStringScript": "script values must be string commands"
-  ,"nonArrayFiles": "Invalid 'files' member"
-  ,"invalidFilename": "Invalid filename in 'files' list: %s"
-  ,"nonArrayBundleDependencies": "Invalid 'bundleDependencies' list. Must be array of package names"
-  ,"nonStringBundleDependency": "Invalid bundleDependencies member: %s"
-  ,"nonDependencyBundleDependency": "Non-dependency in bundleDependencies: %s"
-  ,"nonObjectDependencies": "%s field must be an object"
-  ,"nonStringDependency": "Invalid dependency: %s %s"
-  ,"deprecatedArrayDependencies": "specifying %s as array is deprecated"
-  ,"deprecatedModules": "modules field is deprecated"
-  ,"nonArrayKeywords": "keywords should be an array of strings"
-  ,"nonStringKeyword": "keywords should be an array of strings"
-  ,"conflictingName": "%s is also the name of a node core module."
-  ,"nonStringDescription": "'description' field should be a string"
-  ,"missingDescription": "No description"
-  ,"missingReadme": "No README data"
-  ,"missingLicense": "No license field."
-  ,"nonEmailUrlBugsString": "Bug string field must be url, email, or {email,url}"
-  ,"nonUrlBugsUrlField": "bugs.url field must be a string url. Deleted."
-  ,"nonEmailBugsEmailField": "bugs.email field must be a string email. Deleted."
-  ,"emptyNormalizedBugs": "Normalized value of bugs field is an empty object. Deleted."
-  ,"nonUrlHomepage": "homepage field must be a string url. Deleted."
-  ,"invalidLicense": "license should be a valid SPDX license expression"
-  ,"typo": "%s should probably be %s."
-}
diff --git a/node_modules/npm/node_modules/normalize-package-data/package.json b/node_modules/npm/node_modules/normalize-package-data/package.json
deleted file mode 100644
index 48d2371..0000000
--- a/node_modules/npm/node_modules/normalize-package-data/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
-  "name": "normalize-package-data",
-  "version": "6.0.0",
-  "author": "GitHub Inc.",
-  "description": "Normalizes data that can be found in package.json files.",
-  "license": "BSD-2-Clause",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/normalize-package-data.git"
-  },
-  "main": "lib/normalize.js",
-  "scripts": {
-    "test": "tap",
-    "npmclilint": "npmcli-lint",
-    "lint": "eslint \"**/*.js\"",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "postsnap": "npm run lintfix --",
-    "postlint": "template-oss-check",
-    "snap": "tap",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "dependencies": {
-    "hosted-git-info": "^7.0.0",
-    "is-core-module": "^2.8.1",
-    "semver": "^7.3.5",
-    "validate-npm-package-license": "^3.0.4"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "tap": "^16.0.1"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "publish": "true",
-    "ciVersions": [
-      "16.14.0",
-      "16.x",
-      "18.0.0",
-      "18.x"
-    ]
-  },
-  "tap": {
-    "branches": 86,
-    "functions": 92,
-    "lines": 86,
-    "statements": 86,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-audit-report/LICENSE b/node_modules/npm/node_modules/npm-audit-report/LICENSE
deleted file mode 100644
index 8d28acf..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/LICENSE
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for
-any purpose with or without fee is hereby granted, provided that the
-above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
-ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/colors.js b/node_modules/npm/node_modules/npm-audit-report/lib/colors.js
deleted file mode 100644
index e6688f2..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/colors.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = (chalk) => {
-  const green = s => chalk.green.bold(s)
-  const red = s => chalk.red.bold(s)
-  const magenta = s => chalk.magenta.bold(s)
-  const yellow = s => chalk.yellow.bold(s)
-  const white = s => chalk.bold(s)
-  const severity = (sev, s) => sev.toLowerCase() === 'moderate' ? yellow(s || sev)
-    : sev.toLowerCase() === 'high' ? red(s || sev)
-    : sev.toLowerCase() === 'critical' ? magenta(s || sev)
-    : white(s || sev)
-  const dim = s => chalk.dim(s)
-
-  return {
-    dim,
-    green,
-    red,
-    magenta,
-    yellow,
-    white,
-    severity,
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/exit-code.js b/node_modules/npm/node_modules/npm-audit-report/lib/exit-code.js
deleted file mode 100644
index fcb580b..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/exit-code.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// return 1 if any vulns in the set are at or above the specified severity
-const severities = new Map(Object.entries([
-  'info',
-  'low',
-  'moderate',
-  'high',
-  'critical',
-  'none',
-]).map(s => s.reverse()))
-
-module.exports = (data, level) =>
-  Object.entries(data.metadata.vulnerabilities)
-    .some(([sev, count]) => count > 0 && severities.has(sev) &&
-      severities.get(sev) >= severities.get(level)) ? 1 : 0
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/index.js b/node_modules/npm/node_modules/npm-audit-report/lib/index.js
deleted file mode 100644
index d0ced01..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/index.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict'
-
-const reporters = {
-  install: require('./reporters/install'),
-  detail: require('./reporters/detail'),
-  json: require('./reporters/json'),
-  quiet: require('./reporters/quiet'),
-}
-
-const exitCode = require('./exit-code.js')
-
-module.exports = Object.assign((data, options = {}) => {
-  const {
-    reporter = 'install',
-    chalk,
-    unicode = true,
-    indent = 2,
-  } = options
-
-  // CLI defaults this to `null` so the defaulting method above doesn't work
-  const auditLevel = options.auditLevel || 'low'
-
-  if (!data) {
-    throw Object.assign(
-      new TypeError('ENOAUDITDATA'),
-      {
-        code: 'ENOAUDITDATA',
-        message: 'missing audit data',
-      }
-    )
-  }
-
-  if (typeof data.toJSON === 'function') {
-    data = data.toJSON()
-  }
-
-  return {
-    report: reporters[reporter](data, { chalk, unicode, indent }),
-    exitCode: exitCode(data, auditLevel),
-  }
-}, { reporters })
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/detail.js b/node_modules/npm/node_modules/npm-audit-report/lib/reporters/detail.js
deleted file mode 100644
index 6dde8ec..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/detail.js
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict'
-
-const colors = require('../colors.js')
-const install = require('./install.js')
-
-module.exports = (data, { chalk }) => {
-  const summary = install.summary(data, { chalk })
-  const none = data.metadata.vulnerabilities.total === 0
-  return none ? summary : fullReport(data, { chalk, summary })
-}
-
-const fullReport = (data, { chalk, summary }) => {
-  const c = colors(chalk)
-  const output = [c.white('# npm audit report'), '']
-
-  const printed = new Set()
-  for (const [, vuln] of Object.entries(data.vulnerabilities)) {
-    // only print starting from the top-level advisories
-    if (vuln.via.filter(v => typeof v !== 'string').length !== 0) {
-      output.push(printVuln(vuln, c, data.vulnerabilities, printed))
-    }
-  }
-
-  output.push(summary)
-
-  return output.join('\n')
-}
-
-const printVuln = (vuln, c, vulnerabilities, printed, indent = '') => {
-  if (printed.has(vuln)) {
-    return null
-  }
-
-  printed.add(vuln)
-  const output = []
-
-  output.push(c.white(vuln.name) + '  ' + vuln.range)
-
-  if (indent === '' && (vuln.severity !== 'low' || vuln.severity === 'info')) {
-    output.push(`Severity: ${c.severity(vuln.severity)}`)
-  }
-
-  for (const via of vuln.via) {
-    if (typeof via === 'string') {
-      output.push(`Depends on vulnerable versions of ${c.white(via)}`)
-    } else if (indent === '') {
-      output.push(`${c.white(via.title)} - ${via.url}`)
-    }
-  }
-
-  if (indent === '') {
-    const { fixAvailable: fa } = vuln
-    if (fa === false) {
-      output.push(c.red('No fix available'))
-    } else if (fa === true) {
-      output.push(c.green('fix available') + ' via `npm audit fix`')
-    } else {
-      /* istanbul ignore else - should be impossible, just being cautious */
-      if (typeof fa === 'object' && indent === '') {
-        output.push(
-          `${c.yellow('fix available')} via \`npm audit fix --force\``,
-          `Will install ${fa.name}@${fa.version}` +
-          `, which is ${fa.isSemVerMajor ? 'a breaking change' :
-            'outside the stated dependency range'}`
-        )
-      }
-    }
-  }
-
-  for (const path of vuln.nodes) {
-    output.push(c.dim(path))
-  }
-
-  for (const effect of vuln.effects) {
-    const e = printVuln(vulnerabilities[effect], c, vulnerabilities, printed, '  ')
-    if (e) {
-      output.push(...e.split('\n'))
-    }
-  }
-
-  if (indent === '') {
-    output.push('')
-  }
-
-  return output.map(l => `${indent}${l}`).join('\n')
-}
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/install.js b/node_modules/npm/node_modules/npm-audit-report/lib/reporters/install.js
deleted file mode 100644
index 0a1e825..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/install.js
+++ /dev/null
@@ -1,75 +0,0 @@
-const colors = require('../colors.js')
-
-const calculate = (data, { chalk }) => {
-  const c = colors(chalk)
-  const output = []
-  const { metadata: { vulnerabilities } } = data
-  const vulnCount = vulnerabilities.total
-
-  let someFixable = false
-  let someForceFixable = false
-  let forceFixSemVerMajor = false
-  let someUnfixable = false
-
-  if (vulnCount === 0) {
-    output.push(`found ${c.green('0')} vulnerabilities`)
-  } else {
-    for (const [, vuln] of Object.entries(data.vulnerabilities)) {
-      const { fixAvailable } = vuln
-      someFixable = someFixable || fixAvailable === true
-      someUnfixable = someUnfixable || fixAvailable === false
-      if (typeof fixAvailable === 'object') {
-        someForceFixable = true
-        forceFixSemVerMajor = forceFixSemVerMajor || fixAvailable.isSemVerMajor
-      }
-    }
-    const total = vulnerabilities.total
-    const sevs = Object.entries(vulnerabilities).filter(([s, count]) => {
-      return (s === 'low' || s === 'moderate' || s === 'high' || s === 'critical') &&
-        count > 0
-    })
-
-    if (sevs.length > 1) {
-      const severities = sevs.map(([s, count]) => {
-        return `${count} ${c.severity(s)}`
-      }).join(', ')
-      output.push(`${c.red(total)} vulnerabilities (${severities})`)
-    } else {
-      const [sev, count] = sevs[0]
-      output.push(`${count} ${c.severity(sev)} severity vulnerabilit${count === 1 ? 'y' : 'ies'}`)
-    }
-
-    // XXX use a different footer line if some aren't fixable easily.
-    // just 'run `npm audit` for details' maybe?
-
-    if (someFixable) {
-      output.push('', 'To address ' +
-        (someForceFixable || someUnfixable ? 'issues that do not require attention'
-        : 'all issues') + ', run:\n  npm audit fix')
-    }
-
-    if (someForceFixable) {
-      output.push('', 'To address all issues' +
-        (someUnfixable ? ' possible' : '') +
-        (forceFixSemVerMajor ? ' (including breaking changes)' : '') +
-        ', run:\n  npm audit fix --force')
-    }
-
-    if (someUnfixable) {
-      output.push('',
-        'Some issues need review, and may require choosing',
-        'a different dependency.')
-    }
-  }
-
-  const summary = output.join('\n')
-  return {
-    summary,
-    report: vulnCount > 0 ? `${summary}\n\nRun \`npm audit\` for details.`
-    : summary,
-  }
-}
-
-module.exports = Object.assign((data, opt) => calculate(data, opt).report, {
-  summary: (data, opt) => calculate(data, opt).summary,
-})
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/json.js b/node_modules/npm/node_modules/npm-audit-report/lib/reporters/json.js
deleted file mode 100644
index 6714720..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/json.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = (data, { indent }) => JSON.stringify(data, null, indent)
diff --git a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/quiet.js b/node_modules/npm/node_modules/npm-audit-report/lib/reporters/quiet.js
deleted file mode 100644
index 57517aa..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/lib/reporters/quiet.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = () => ''
diff --git a/node_modules/npm/node_modules/npm-audit-report/package.json b/node_modules/npm/node_modules/npm-audit-report/package.json
deleted file mode 100644
index 492071c..0000000
--- a/node_modules/npm/node_modules/npm-audit-report/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
-  "name": "npm-audit-report",
-  "version": "5.0.0",
-  "description": "Given a response from the npm security api, render it into a variety of security reports",
-  "main": "lib/index.js",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint"
-  },
-  "tap": {
-    "check-coverage": true,
-    "coverage-map": "map.js",
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "keywords": [
-    "npm",
-    "security",
-    "report",
-    "audit"
-  ],
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.14.1",
-    "chalk": "^5.2.0",
-    "tap": "^16.0.0"
-  },
-  "directories": {
-    "lib": "lib",
-    "test": "test"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-audit-report.git"
-  },
-  "bugs": {
-    "url": "https://github.com/npm/npm-audit-report/issues"
-  },
-  "homepage": "https://github.com/npm/npm-audit-report#readme",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.14.1"
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-bundled/LICENSE b/node_modules/npm/node_modules/npm-bundled/LICENSE
deleted file mode 100644
index 20a4762..0000000
--- a/node_modules/npm/node_modules/npm-bundled/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm, Inc. and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-bundled/lib/index.js b/node_modules/npm/node_modules/npm-bundled/lib/index.js
deleted file mode 100644
index 4f54ca6..0000000
--- a/node_modules/npm/node_modules/npm-bundled/lib/index.js
+++ /dev/null
@@ -1,254 +0,0 @@
-'use strict'
-
-// walk the tree of deps starting from the top level list of bundled deps
-// Any deps at the top level that are depended on by a bundled dep that
-// does not have that dep in its own node_modules folder are considered
-// bundled deps as well.  This list of names can be passed to npm-packlist
-// as the "bundled" argument.  Additionally, packageJsonCache is shared so
-// packlist doesn't have to re-read files already consumed in this pass
-
-const fs = require('fs')
-const path = require('path')
-const EE = require('events').EventEmitter
-// we don't care about the package bins, but we share a pj cache
-// with other modules that DO care about it, so keep it nice.
-const normalizePackageBin = require('npm-normalize-package-bin')
-
-class BundleWalker extends EE {
-  constructor (opt) {
-    opt = opt || {}
-    super(opt)
-    this.path = path.resolve(opt.path || process.cwd())
-
-    this.parent = opt.parent || null
-    if (this.parent) {
-      this.result = this.parent.result
-      // only collect results in node_modules folders at the top level
-      // since the node_modules in a bundled dep is included always
-      if (!this.parent.parent) {
-        const base = path.basename(this.path)
-        const scope = path.basename(path.dirname(this.path))
-        this.result.add(/^@/.test(scope) ? scope + '/' + base : base)
-      }
-      this.root = this.parent.root
-      this.packageJsonCache = this.parent.packageJsonCache
-    } else {
-      this.result = new Set()
-      this.root = this.path
-      this.packageJsonCache = opt.packageJsonCache || new Map()
-    }
-
-    this.seen = new Set()
-    this.didDone = false
-    this.children = 0
-    this.node_modules = []
-    this.package = null
-    this.bundle = null
-  }
-
-  addListener (ev, fn) {
-    return this.on(ev, fn)
-  }
-
-  on (ev, fn) {
-    const ret = super.on(ev, fn)
-    if (ev === 'done' && this.didDone) {
-      this.emit('done', this.result)
-    }
-    return ret
-  }
-
-  done () {
-    if (!this.didDone) {
-      this.didDone = true
-      if (!this.parent) {
-        const res = Array.from(this.result)
-        this.result = res
-        this.emit('done', res)
-      } else {
-        this.emit('done')
-      }
-    }
-  }
-
-  start () {
-    const pj = path.resolve(this.path, 'package.json')
-    if (this.packageJsonCache.has(pj)) {
-      this.onPackage(this.packageJsonCache.get(pj))
-    } else {
-      this.readPackageJson(pj)
-    }
-    return this
-  }
-
-  readPackageJson (pj) {
-    fs.readFile(pj, (er, data) =>
-      er ? this.done() : this.onPackageJson(pj, data))
-  }
-
-  onPackageJson (pj, data) {
-    try {
-      this.package = normalizePackageBin(JSON.parse(data + ''))
-    } catch (er) {
-      return this.done()
-    }
-    this.packageJsonCache.set(pj, this.package)
-    this.onPackage(this.package)
-  }
-
-  allDepsBundled (pkg) {
-    return Object.keys(pkg.dependencies || {}).concat(
-      Object.keys(pkg.optionalDependencies || {}))
-  }
-
-  onPackage (pkg) {
-    // all deps are bundled if we got here as a child.
-    // otherwise, only bundle bundledDeps
-    // Get a unique-ified array with a short-lived Set
-    const bdRaw = this.parent ? this.allDepsBundled(pkg)
-      : pkg.bundleDependencies || pkg.bundledDependencies || []
-
-    const bd = Array.from(new Set(
-      Array.isArray(bdRaw) ? bdRaw
-      : bdRaw === true ? this.allDepsBundled(pkg)
-      : Object.keys(bdRaw)))
-
-    if (!bd.length) {
-      return this.done()
-    }
-
-    this.bundle = bd
-    this.readModules()
-  }
-
-  readModules () {
-    readdirNodeModules(this.path + '/node_modules', (er, nm) =>
-      er ? this.onReaddir([]) : this.onReaddir(nm))
-  }
-
-  onReaddir (nm) {
-    // keep track of what we have, in case children need it
-    this.node_modules = nm
-
-    this.bundle.forEach(dep => this.childDep(dep))
-    if (this.children === 0) {
-      this.done()
-    }
-  }
-
-  childDep (dep) {
-    if (this.node_modules.indexOf(dep) !== -1) {
-      if (!this.seen.has(dep)) {
-        this.seen.add(dep)
-        this.child(dep)
-      }
-    } else if (this.parent) {
-      this.parent.childDep(dep)
-    }
-  }
-
-  child (dep) {
-    const p = this.path + '/node_modules/' + dep
-    this.children += 1
-    const child = new BundleWalker({
-      path: p,
-      parent: this,
-    })
-    child.on('done', _ => {
-      if (--this.children === 0) {
-        this.done()
-      }
-    })
-    child.start()
-  }
-}
-
-class BundleWalkerSync extends BundleWalker {
-  start () {
-    super.start()
-    this.done()
-    return this
-  }
-
-  readPackageJson (pj) {
-    try {
-      this.onPackageJson(pj, fs.readFileSync(pj))
-    } catch {
-      // empty catch
-    }
-    return this
-  }
-
-  readModules () {
-    try {
-      this.onReaddir(readdirNodeModulesSync(this.path + '/node_modules'))
-    } catch {
-      this.onReaddir([])
-    }
-  }
-
-  child (dep) {
-    new BundleWalkerSync({
-      path: this.path + '/node_modules/' + dep,
-      parent: this,
-    }).start()
-  }
-}
-
-const readdirNodeModules = (nm, cb) => {
-  fs.readdir(nm, (er, set) => {
-    if (er) {
-      cb(er)
-    } else {
-      const scopes = set.filter(f => /^@/.test(f))
-      if (!scopes.length) {
-        cb(null, set)
-      } else {
-        const unscoped = set.filter(f => !/^@/.test(f))
-        let count = scopes.length
-        scopes.forEach(scope => {
-          fs.readdir(nm + '/' + scope, (readdirEr, pkgs) => {
-            if (readdirEr || !pkgs.length) {
-              unscoped.push(scope)
-            } else {
-              unscoped.push.apply(unscoped, pkgs.map(p => scope + '/' + p))
-            }
-            if (--count === 0) {
-              cb(null, unscoped)
-            }
-          })
-        })
-      }
-    }
-  })
-}
-
-const readdirNodeModulesSync = nm => {
-  const set = fs.readdirSync(nm)
-  const unscoped = set.filter(f => !/^@/.test(f))
-  const scopes = set.filter(f => /^@/.test(f)).map(scope => {
-    try {
-      const pkgs = fs.readdirSync(nm + '/' + scope)
-      return pkgs.length ? pkgs.map(p => scope + '/' + p) : [scope]
-    } catch (er) {
-      return [scope]
-    }
-  }).reduce((a, b) => a.concat(b), [])
-  return unscoped.concat(scopes)
-}
-
-const walk = (options, callback) => {
-  const p = new Promise((resolve, reject) => {
-    new BundleWalker(options).on('done', resolve).on('error', reject).start()
-  })
-  return callback ? p.then(res => callback(null, res), callback) : p
-}
-
-const walkSync = options => {
-  return new BundleWalkerSync(options).start().result
-}
-
-module.exports = walk
-walk.sync = walkSync
-walk.BundleWalker = BundleWalker
-walk.BundleWalkerSync = BundleWalkerSync
diff --git a/node_modules/npm/node_modules/npm-bundled/package.json b/node_modules/npm/node_modules/npm-bundled/package.json
deleted file mode 100644
index f41066a..0000000
--- a/node_modules/npm/node_modules/npm-bundled/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-  "name": "npm-bundled",
-  "version": "3.0.0",
-  "description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
-  "main": "lib/index.js",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-bundled.git"
-  },
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.5.1",
-    "mkdirp": "^1.0.4",
-    "mutate-fs": "^2.1.1",
-    "rimraf": "^3.0.2",
-    "tap": "^16.3.0"
-  },
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "dependencies": {
-    "npm-normalize-package-bin": "^3.0.0"
-  },
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.5.1"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-install-checks/LICENSE b/node_modules/npm/node_modules/npm-install-checks/LICENSE
deleted file mode 100644
index 3bed832..0000000
--- a/node_modules/npm/node_modules/npm-install-checks/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Robert Kowalski and Isaac Z. Schlueter ("Authors")
-All rights reserved.
-
-The BSD License
-
-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.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/npm/node_modules/npm-install-checks/lib/index.js b/node_modules/npm/node_modules/npm-install-checks/lib/index.js
deleted file mode 100644
index 545472b..0000000
--- a/node_modules/npm/node_modules/npm-install-checks/lib/index.js
+++ /dev/null
@@ -1,101 +0,0 @@
-const semver = require('semver')
-
-const checkEngine = (target, npmVer, nodeVer, force = false) => {
-  const nodev = force ? null : nodeVer
-  const eng = target.engines
-  const opt = { includePrerelease: true }
-  if (!eng) {
-    return
-  }
-
-  const nodeFail = nodev && eng.node && !semver.satisfies(nodev, eng.node, opt)
-  const npmFail = npmVer && eng.npm && !semver.satisfies(npmVer, eng.npm, opt)
-  if (nodeFail || npmFail) {
-    throw Object.assign(new Error('Unsupported engine'), {
-      pkgid: target._id,
-      current: { node: nodeVer, npm: npmVer },
-      required: eng,
-      code: 'EBADENGINE',
-    })
-  }
-}
-
-const isMusl = (file) => file.includes('libc.musl-') || file.includes('ld-musl-')
-
-const checkPlatform = (target, force = false, environment = {}) => {
-  if (force) {
-    return
-  }
-
-  const platform = environment.os || process.platform
-  const arch = environment.cpu || process.arch
-  const osOk = target.os ? checkList(platform, target.os) : true
-  const cpuOk = target.cpu ? checkList(arch, target.cpu) : true
-
-  let libcOk = true
-  let libcFamily = null
-  if (target.libc) {
-    // libc checks only work in linux, any value is a failure if we aren't
-    if (environment.libc) {
-      libcOk = checkList(environment.libc, target.libc)
-    } else if (platform !== 'linux') {
-      libcOk = false
-    } else {
-      const report = process.report.getReport()
-      if (report.header?.glibcVersionRuntime) {
-        libcFamily = 'glibc'
-      } else if (Array.isArray(report.sharedObjects) && report.sharedObjects.some(isMusl)) {
-        libcFamily = 'musl'
-      }
-      libcOk = libcFamily ? checkList(libcFamily, target.libc) : false
-    }
-  }
-
-  if (!osOk || !cpuOk || !libcOk) {
-    throw Object.assign(new Error('Unsupported platform'), {
-      pkgid: target._id,
-      current: {
-        os: platform,
-        cpu: arch,
-        libc: libcFamily,
-      },
-      required: {
-        os: target.os,
-        cpu: target.cpu,
-        libc: target.libc,
-      },
-      code: 'EBADPLATFORM',
-    })
-  }
-}
-
-const checkList = (value, list) => {
-  if (typeof list === 'string') {
-    list = [list]
-  }
-  if (list.length === 1 && list[0] === 'any') {
-    return true
-  }
-  // match none of the negated values, and at least one of the
-  // non-negated values, if any are present.
-  let negated = 0
-  let match = false
-  for (const entry of list) {
-    const negate = entry.charAt(0) === '!'
-    const test = negate ? entry.slice(1) : entry
-    if (negate) {
-      negated++
-      if (value === test) {
-        return false
-      }
-    } else {
-      match = match || value === test
-    }
-  }
-  return match || negated === list.length
-}
-
-module.exports = {
-  checkEngine,
-  checkPlatform,
-}
diff --git a/node_modules/npm/node_modules/npm-install-checks/package.json b/node_modules/npm/node_modules/npm-install-checks/package.json
deleted file mode 100644
index 11a3b87..0000000
--- a/node_modules/npm/node_modules/npm-install-checks/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
-  "name": "npm-install-checks",
-  "version": "6.3.0",
-  "description": "Check the engines and platform fields in package.json",
-  "main": "lib/index.js",
-  "dependencies": {
-    "semver": "^7.1.1"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.19.0",
-    "tap": "^16.0.1"
-  },
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-install-checks.git"
-  },
-  "keywords": [
-    "npm,",
-    "install"
-  ],
-  "license": "BSD-2-Clause",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "author": "GitHub Inc.",
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.19.0",
-    "publish": "true"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-normalize-package-bin/LICENSE b/node_modules/npm/node_modules/npm-normalize-package-bin/LICENSE
deleted file mode 100644
index 19cec97..0000000
--- a/node_modules/npm/node_modules/npm-normalize-package-bin/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-normalize-package-bin/lib/index.js b/node_modules/npm/node_modules/npm-normalize-package-bin/lib/index.js
deleted file mode 100644
index 3cb8478..0000000
--- a/node_modules/npm/node_modules/npm-normalize-package-bin/lib/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// pass in a manifest with a 'bin' field here, and it'll turn it
-// into a properly santized bin object
-const { join, basename } = require('path')
-
-const normalize = pkg =>
-  !pkg.bin ? removeBin(pkg)
-  : typeof pkg.bin === 'string' ? normalizeString(pkg)
-  : Array.isArray(pkg.bin) ? normalizeArray(pkg)
-  : typeof pkg.bin === 'object' ? normalizeObject(pkg)
-  : removeBin(pkg)
-
-const normalizeString = pkg => {
-  if (!pkg.name) {
-    return removeBin(pkg)
-  }
-  pkg.bin = { [pkg.name]: pkg.bin }
-  return normalizeObject(pkg)
-}
-
-const normalizeArray = pkg => {
-  pkg.bin = pkg.bin.reduce((acc, k) => {
-    acc[basename(k)] = k
-    return acc
-  }, {})
-  return normalizeObject(pkg)
-}
-
-const removeBin = pkg => {
-  delete pkg.bin
-  return pkg
-}
-
-const normalizeObject = pkg => {
-  const orig = pkg.bin
-  const clean = {}
-  let hasBins = false
-  Object.keys(orig).forEach(binKey => {
-    const base = join('/', basename(binKey.replace(/\\|:/g, '/'))).slice(1)
-
-    if (typeof orig[binKey] !== 'string' || !base) {
-      return
-    }
-
-    const binTarget = join('/', orig[binKey].replace(/\\/g, '/'))
-      .replace(/\\/g, '/').slice(1)
-
-    if (!binTarget) {
-      return
-    }
-
-    clean[base] = binTarget
-    hasBins = true
-  })
-
-  if (hasBins) {
-    pkg.bin = clean
-  } else {
-    delete pkg.bin
-  }
-
-  return pkg
-}
-
-module.exports = normalize
diff --git a/node_modules/npm/node_modules/npm-normalize-package-bin/package.json b/node_modules/npm/node_modules/npm-normalize-package-bin/package.json
deleted file mode 100644
index 5ea50dc..0000000
--- a/node_modules/npm/node_modules/npm-normalize-package-bin/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "name": "npm-normalize-package-bin",
-  "version": "3.0.1",
-  "description": "Turn any flavor of allowable package.json bin into a normalized object",
-  "main": "lib/index.js",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-normalize-package-bin.git"
-  },
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.14.1",
-    "tap": "^16.3.0"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.14.1",
-    "publish": "true"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-package-arg/LICENSE b/node_modules/npm/node_modules/npm-package-arg/LICENSE
deleted file mode 100644
index 19cec97..0000000
--- a/node_modules/npm/node_modules/npm-package-arg/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-package-arg/lib/npa.js b/node_modules/npm/node_modules/npm-package-arg/lib/npa.js
deleted file mode 100644
index 23bf68d..0000000
--- a/node_modules/npm/node_modules/npm-package-arg/lib/npa.js
+++ /dev/null
@@ -1,411 +0,0 @@
-'use strict'
-module.exports = npa
-module.exports.resolve = resolve
-module.exports.toPurl = toPurl
-module.exports.Result = Result
-
-const { URL } = require('url')
-const HostedGit = require('hosted-git-info')
-const semver = require('semver')
-const path = global.FAKE_WINDOWS ? require('path').win32 : require('path')
-const validatePackageName = require('validate-npm-package-name')
-const { homedir } = require('os')
-const log = require('proc-log')
-
-const isWindows = process.platform === 'win32' || global.FAKE_WINDOWS
-const hasSlashes = isWindows ? /\\|[/]/ : /[/]/
-const isURL = /^(?:git[+])?[a-z]+:/i
-const isGit = /^[^@]+@[^:.]+\.[^:]+:.+$/i
-const isFilename = /[.](?:tgz|tar.gz|tar)$/i
-
-function npa (arg, where) {
-  let name
-  let spec
-  if (typeof arg === 'object') {
-    if (arg instanceof Result && (!where || where === arg.where)) {
-      return arg
-    } else if (arg.name && arg.rawSpec) {
-      return npa.resolve(arg.name, arg.rawSpec, where || arg.where)
-    } else {
-      return npa(arg.raw, where || arg.where)
-    }
-  }
-  const nameEndsAt = arg[0] === '@' ? arg.slice(1).indexOf('@') + 1 : arg.indexOf('@')
-  const namePart = nameEndsAt > 0 ? arg.slice(0, nameEndsAt) : arg
-  if (isURL.test(arg)) {
-    spec = arg
-  } else if (isGit.test(arg)) {
-    spec = `git+ssh://${arg}`
-  } else if (namePart[0] !== '@' && (hasSlashes.test(namePart) || isFilename.test(namePart))) {
-    spec = arg
-  } else if (nameEndsAt > 0) {
-    name = namePart
-    spec = arg.slice(nameEndsAt + 1) || '*'
-  } else {
-    const valid = validatePackageName(arg)
-    if (valid.validForOldPackages) {
-      name = arg
-      spec = '*'
-    } else {
-      spec = arg
-    }
-  }
-  return resolve(name, spec, where, arg)
-}
-
-const isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/
-
-function resolve (name, spec, where, arg) {
-  const res = new Result({
-    raw: arg,
-    name: name,
-    rawSpec: spec,
-    fromArgument: arg != null,
-  })
-
-  if (name) {
-    res.setName(name)
-  }
-
-  if (spec && (isFilespec.test(spec) || /^file:/i.test(spec))) {
-    return fromFile(res, where)
-  } else if (spec && /^npm:/i.test(spec)) {
-    return fromAlias(res, where)
-  }
-
-  const hosted = HostedGit.fromUrl(spec, {
-    noGitPlus: true,
-    noCommittish: true,
-  })
-  if (hosted) {
-    return fromHostedGit(res, hosted)
-  } else if (spec && isURL.test(spec)) {
-    return fromURL(res)
-  } else if (spec && (hasSlashes.test(spec) || isFilename.test(spec))) {
-    return fromFile(res, where)
-  } else {
-    return fromRegistry(res)
-  }
-}
-
-const defaultRegistry = 'https://registry.npmjs.org'
-
-function toPurl (arg, reg = defaultRegistry) {
-  const res = npa(arg)
-
-  if (res.type !== 'version') {
-    throw invalidPurlType(res.type, res.raw)
-  }
-
-  // URI-encode leading @ of scoped packages
-  let purl = 'pkg:npm/' + res.name.replace(/^@/, '%40') + '@' + res.rawSpec
-  if (reg !== defaultRegistry) {
-    purl += '?repository_url=' + reg
-  }
-
-  return purl
-}
-
-function invalidPackageName (name, valid, raw) {
-  // eslint-disable-next-line max-len
-  const err = new Error(`Invalid package name "${name}" of package "${raw}": ${valid.errors.join('; ')}.`)
-  err.code = 'EINVALIDPACKAGENAME'
-  return err
-}
-
-function invalidTagName (name, raw) {
-  // eslint-disable-next-line max-len
-  const err = new Error(`Invalid tag name "${name}" of package "${raw}": Tags may not have any characters that encodeURIComponent encodes.`)
-  err.code = 'EINVALIDTAGNAME'
-  return err
-}
-
-function invalidPurlType (type, raw) {
-  // eslint-disable-next-line max-len
-  const err = new Error(`Invalid type "${type}" of package "${raw}": Purl can only be generated for "version" types.`)
-  err.code = 'EINVALIDPURLTYPE'
-  return err
-}
-
-function Result (opts) {
-  this.type = opts.type
-  this.registry = opts.registry
-  this.where = opts.where
-  if (opts.raw == null) {
-    this.raw = opts.name ? opts.name + '@' + opts.rawSpec : opts.rawSpec
-  } else {
-    this.raw = opts.raw
-  }
-
-  this.name = undefined
-  this.escapedName = undefined
-  this.scope = undefined
-  this.rawSpec = opts.rawSpec || ''
-  this.saveSpec = opts.saveSpec
-  this.fetchSpec = opts.fetchSpec
-  if (opts.name) {
-    this.setName(opts.name)
-  }
-  this.gitRange = opts.gitRange
-  this.gitCommittish = opts.gitCommittish
-  this.gitSubdir = opts.gitSubdir
-  this.hosted = opts.hosted
-}
-
-Result.prototype.setName = function (name) {
-  const valid = validatePackageName(name)
-  if (!valid.validForOldPackages) {
-    throw invalidPackageName(name, valid, this.raw)
-  }
-
-  this.name = name
-  this.scope = name[0] === '@' ? name.slice(0, name.indexOf('/')) : undefined
-  // scoped packages in couch must have slash url-encoded, e.g. @foo%2Fbar
-  this.escapedName = name.replace('/', '%2f')
-  return this
-}
-
-Result.prototype.toString = function () {
-  const full = []
-  if (this.name != null && this.name !== '') {
-    full.push(this.name)
-  }
-  const spec = this.saveSpec || this.fetchSpec || this.rawSpec
-  if (spec != null && spec !== '') {
-    full.push(spec)
-  }
-  return full.length ? full.join('@') : this.raw
-}
-
-Result.prototype.toJSON = function () {
-  const result = Object.assign({}, this)
-  delete result.hosted
-  return result
-}
-
-// sets res.gitCommittish, res.gitRange, and res.gitSubdir
-function setGitAttrs (res, committish) {
-  if (!committish) {
-    res.gitCommittish = null
-    return
-  }
-
-  // for each :: separated item:
-  for (const part of committish.split('::')) {
-    // if the item has no : the n it is a commit-ish
-    if (!part.includes(':')) {
-      if (res.gitRange) {
-        throw new Error('cannot override existing semver range with a committish')
-      }
-      if (res.gitCommittish) {
-        throw new Error('cannot override existing committish with a second committish')
-      }
-      res.gitCommittish = part
-      continue
-    }
-    // split on name:value
-    const [name, value] = part.split(':')
-    // if name is semver do semver lookup of ref or tag
-    if (name === 'semver') {
-      if (res.gitCommittish) {
-        throw new Error('cannot override existing committish with a semver range')
-      }
-      if (res.gitRange) {
-        throw new Error('cannot override existing semver range with a second semver range')
-      }
-      res.gitRange = decodeURIComponent(value)
-      continue
-    }
-    if (name === 'path') {
-      if (res.gitSubdir) {
-        throw new Error('cannot override existing path with a second path')
-      }
-      res.gitSubdir = `/${value}`
-      continue
-    }
-    log.warn('npm-package-arg', `ignoring unknown key "${name}"`)
-  }
-}
-
-function fromFile (res, where) {
-  if (!where) {
-    where = process.cwd()
-  }
-  res.type = isFilename.test(res.rawSpec) ? 'file' : 'directory'
-  res.where = where
-
-  // always put the '/' on where when resolving urls, or else
-  // file:foo from /path/to/bar goes to /path/to/foo, when we want
-  // it to be /path/to/bar/foo
-
-  let specUrl
-  let resolvedUrl
-  const prefix = (!/^file:/.test(res.rawSpec) ? 'file:' : '')
-  const rawWithPrefix = prefix + res.rawSpec
-  let rawNoPrefix = rawWithPrefix.replace(/^file:/, '')
-  try {
-    resolvedUrl = new URL(rawWithPrefix, `file://${path.resolve(where)}/`)
-    specUrl = new URL(rawWithPrefix)
-  } catch (originalError) {
-    const er = new Error('Invalid file: URL, must comply with RFC 8089')
-    throw Object.assign(er, {
-      raw: res.rawSpec,
-      spec: res,
-      where,
-      originalError,
-    })
-  }
-
-  // XXX backwards compatibility lack of compliance with RFC 8089
-  if (resolvedUrl.host && resolvedUrl.host !== 'localhost') {
-    const rawSpec = res.rawSpec.replace(/^file:\/\//, 'file:///')
-    resolvedUrl = new URL(rawSpec, `file://${path.resolve(where)}/`)
-    specUrl = new URL(rawSpec)
-    rawNoPrefix = rawSpec.replace(/^file:/, '')
-  }
-  // turn file:/../foo into file:../foo
-  // for 1, 2 or 3 leading slashes since we attempted
-  // in the previous step to make it a file protocol url with a leading slash
-  if (/^\/{1,3}\.\.?(\/|$)/.test(rawNoPrefix)) {
-    const rawSpec = res.rawSpec.replace(/^file:\/{1,3}/, 'file:')
-    resolvedUrl = new URL(rawSpec, `file://${path.resolve(where)}/`)
-    specUrl = new URL(rawSpec)
-    rawNoPrefix = rawSpec.replace(/^file:/, '')
-  }
-  // XXX end RFC 8089 violation backwards compatibility section
-
-  // turn /C:/blah into just C:/blah on windows
-  let specPath = decodeURIComponent(specUrl.pathname)
-  let resolvedPath = decodeURIComponent(resolvedUrl.pathname)
-  if (isWindows) {
-    specPath = specPath.replace(/^\/+([a-z]:\/)/i, '$1')
-    resolvedPath = resolvedPath.replace(/^\/+([a-z]:\/)/i, '$1')
-  }
-
-  // replace ~ with homedir, but keep the ~ in the saveSpec
-  // otherwise, make it relative to where param
-  if (/^\/~(\/|$)/.test(specPath)) {
-    res.saveSpec = `file:${specPath.substr(1)}`
-    resolvedPath = path.resolve(homedir(), specPath.substr(3))
-  } else if (!path.isAbsolute(rawNoPrefix)) {
-    res.saveSpec = `file:${path.relative(where, resolvedPath)}`
-  } else {
-    res.saveSpec = `file:${path.resolve(resolvedPath)}`
-  }
-
-  res.fetchSpec = path.resolve(where, resolvedPath)
-  return res
-}
-
-function fromHostedGit (res, hosted) {
-  res.type = 'git'
-  res.hosted = hosted
-  res.saveSpec = hosted.toString({ noGitPlus: false, noCommittish: false })
-  res.fetchSpec = hosted.getDefaultRepresentation() === 'shortcut' ? null : hosted.toString()
-  setGitAttrs(res, hosted.committish)
-  return res
-}
-
-function unsupportedURLType (protocol, spec) {
-  const err = new Error(`Unsupported URL Type "${protocol}": ${spec}`)
-  err.code = 'EUNSUPPORTEDPROTOCOL'
-  return err
-}
-
-function fromURL (res) {
-  let rawSpec = res.rawSpec
-  res.saveSpec = rawSpec
-  if (rawSpec.startsWith('git+ssh:')) {
-    // git ssh specifiers are overloaded to also use scp-style git
-    // specifiers, so we have to parse those out and treat them special.
-    // They are NOT true URIs, so we can't hand them to URL.
-
-    // This regex looks for things that look like:
-    // git+ssh://git@my.custom.git.com:username/project.git#deadbeef
-    // ...and various combinations. The username in the beginning is *required*.
-    const matched = rawSpec.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i)
-    if (matched && !matched[1].match(/:[0-9]+\/?.*$/i)) {
-      res.type = 'git'
-      setGitAttrs(res, matched[2])
-      res.fetchSpec = matched[1]
-      return res
-    }
-  } else if (rawSpec.startsWith('git+file://')) {
-    // URL can't handle windows paths
-    rawSpec = rawSpec.replace(/\\/g, '/')
-  }
-  const parsedUrl = new URL(rawSpec)
-  // check the protocol, and then see if it's git or not
-  switch (parsedUrl.protocol) {
-    case 'git:':
-    case 'git+http:':
-    case 'git+https:':
-    case 'git+rsync:':
-    case 'git+ftp:':
-    case 'git+file:':
-    case 'git+ssh:':
-      res.type = 'git'
-      setGitAttrs(res, parsedUrl.hash.slice(1))
-      if (parsedUrl.protocol === 'git+file:' && /^git\+file:\/\/[a-z]:/i.test(rawSpec)) {
-        // URL can't handle drive letters on windows file paths, the host can't contain a :
-        res.fetchSpec = `git+file://${parsedUrl.host.toLowerCase()}:${parsedUrl.pathname}`
-      } else {
-        parsedUrl.hash = ''
-        res.fetchSpec = parsedUrl.toString()
-      }
-      if (res.fetchSpec.startsWith('git+')) {
-        res.fetchSpec = res.fetchSpec.slice(4)
-      }
-      break
-    case 'http:':
-    case 'https:':
-      res.type = 'remote'
-      res.fetchSpec = res.saveSpec
-      break
-
-    default:
-      throw unsupportedURLType(parsedUrl.protocol, rawSpec)
-  }
-
-  return res
-}
-
-function fromAlias (res, where) {
-  const subSpec = npa(res.rawSpec.substr(4), where)
-  if (subSpec.type === 'alias') {
-    throw new Error('nested aliases not supported')
-  }
-
-  if (!subSpec.registry) {
-    throw new Error('aliases only work for registry deps')
-  }
-
-  res.subSpec = subSpec
-  res.registry = true
-  res.type = 'alias'
-  res.saveSpec = null
-  res.fetchSpec = null
-  return res
-}
-
-function fromRegistry (res) {
-  res.registry = true
-  const spec = res.rawSpec.trim()
-  // no save spec for registry components as we save based on the fetched
-  // version, not on the argument so this can't compute that.
-  res.saveSpec = null
-  res.fetchSpec = spec
-  const version = semver.valid(spec, true)
-  const range = semver.validRange(spec, true)
-  if (version) {
-    res.type = 'version'
-  } else if (range) {
-    res.type = 'range'
-  } else {
-    if (encodeURIComponent(spec) !== spec) {
-      throw invalidTagName(spec, res.raw)
-    }
-    res.type = 'tag'
-  }
-  return res
-}
diff --git a/node_modules/npm/node_modules/npm-package-arg/package.json b/node_modules/npm/node_modules/npm-package-arg/package.json
deleted file mode 100644
index f7965d5..0000000
--- a/node_modules/npm/node_modules/npm-package-arg/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-  "name": "npm-package-arg",
-  "version": "11.0.1",
-  "description": "Parse the things that can be arguments to `npm install`",
-  "main": "./lib/npa.js",
-  "directories": {
-    "test": "test"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "dependencies": {
-    "hosted-git-info": "^7.0.0",
-    "proc-log": "^3.0.0",
-    "semver": "^7.3.5",
-    "validate-npm-package-name": "^5.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "tap": "^16.0.1"
-  },
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "npmclilint": "npmcli-lint",
-    "lint": "eslint \"**/*.js\"",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "postsnap": "npm run lintfix --",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-package-arg.git"
-  },
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "bugs": {
-    "url": "https://github.com/npm/npm-package-arg/issues"
-  },
-  "homepage": "https://github.com/npm/npm-package-arg",
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "tap": {
-    "branches": 97,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "publish": true,
-    "ciVersions": [
-      "16.14.0",
-      "16.x",
-      "18.0.0",
-      "18.x"
-    ],
-    "npmSpec": "next-9"
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-packlist/LICENSE b/node_modules/npm/node_modules/npm-packlist/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/npm-packlist/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-packlist/lib/index.js b/node_modules/npm/node_modules/npm-packlist/lib/index.js
deleted file mode 100644
index 8445925..0000000
--- a/node_modules/npm/node_modules/npm-packlist/lib/index.js
+++ /dev/null
@@ -1,484 +0,0 @@
-'use strict'
-
-const { Walker: IgnoreWalker } = require('ignore-walk')
-const { lstatSync: lstat, readFileSync: readFile } = require('fs')
-const { basename, dirname, extname, join, relative, resolve, sep } = require('path')
-
-// symbols used to represent synthetic rule sets
-const defaultRules = Symbol('npm-packlist.rules.default')
-const strictRules = Symbol('npm-packlist.rules.strict')
-
-// There may be others, but :?|<> are handled by node-tar
-const nameIsBadForWindows = file => /\*/.test(file)
-
-// these are the default rules that are applied to everything except for non-link bundled deps
-const defaults = [
-  '.npmignore',
-  '.gitignore',
-  '**/.git',
-  '**/.svn',
-  '**/.hg',
-  '**/CVS',
-  '**/.git/**',
-  '**/.svn/**',
-  '**/.hg/**',
-  '**/CVS/**',
-  '/.lock-wscript',
-  '/.wafpickle-*',
-  '/build/config.gypi',
-  'npm-debug.log',
-  '**/.npmrc',
-  '.*.swp',
-  '.DS_Store',
-  '**/.DS_Store/**',
-  '._*',
-  '**/._*/**',
-  '*.orig',
-  '/archived-packages/**',
-]
-
-const strictDefaults = [
-  // these are forcibly excluded
-  '/.git',
-]
-
-const allLevels = [
-  // these are included by default but can be excluded by package.json files array
-  '!/readme{,.*[^~$]}',
-  '!/copying{,.*[^~$]}',
-  '!/license{,.*[^~$]}',
-  '!/licence{,.*[^~$]}',
-]
-
-const rootOnly = [
-  /^!.*readme/i,
-  /^!.*copying/i,
-  /^!.*licen[sc]e/i,
-]
-
-const normalizePath = (path) => path.split('\\').join('/')
-
-const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
-  for (const file of ['.npmignore', '.gitignore']) {
-    try {
-      const ignoreContent = readFile(join(root, file), { encoding: 'utf8' })
-      result.push(ignoreContent)
-      // break the loop immediately after reading, this allows us to prioritize
-      // the .npmignore and discard the .gitignore if one is present
-      break
-    } catch (err) {
-      // we ignore ENOENT errors completely because we don't care if the file doesn't exist
-      // but we throw everything else because failing to read a file that does exist is
-      // something that the user likely wants to know about
-      // istanbul ignore next -- we do not need to test a thrown error
-      if (err.code !== 'ENOENT') {
-        throw err
-      }
-    }
-  }
-
-  if (!rel) {
-    return result
-  }
-
-  const firstRel = rel.split(sep, 1)[0]
-  const newRoot = join(root, firstRel)
-  const newRel = relative(newRoot, join(root, rel))
-
-  return readOutOfTreeIgnoreFiles(newRoot, newRel, result)
-}
-
-class PackWalker extends IgnoreWalker {
-  constructor (tree, opts) {
-    const options = {
-      ...opts,
-      includeEmpty: false,
-      follow: false,
-      // we path.resolve() here because ignore-walk doesn't do it and we want full paths
-      path: resolve(opts?.path || tree.path).replace(/\\/g, '/'),
-      ignoreFiles: opts?.ignoreFiles || [
-        defaultRules,
-        'package.json',
-        '.npmignore',
-        '.gitignore',
-        strictRules,
-      ],
-    }
-
-    super(options)
-    this.isPackage = options.isPackage
-    this.seen = options.seen || new Set()
-    this.tree = tree
-    this.requiredFiles = options.requiredFiles || []
-
-    const additionalDefaults = []
-    if (options.prefix && options.workspaces) {
-      const path = normalizePath(options.path)
-      const prefix = normalizePath(options.prefix)
-      const workspaces = options.workspaces.map((ws) => normalizePath(ws))
-
-      // istanbul ignore else - this does nothing unless we need it to
-      if (path !== prefix && workspaces.includes(path)) {
-        // if path and prefix are not the same directory, and workspaces has path in it
-        // then we know path is a workspace directory. in order to not drop ignore rules
-        // from directories between the workspaces root (prefix) and the workspace itself
-        // (path) we need to find and read those now
-        const relpath = relative(options.prefix, dirname(options.path))
-        additionalDefaults.push(...readOutOfTreeIgnoreFiles(options.prefix, relpath))
-      } else if (path === prefix) {
-        // on the other hand, if the path and prefix are the same, then we ignore workspaces
-        // so that we don't pack a workspace as part of the root project. append them as
-        // normalized relative paths from the root
-        additionalDefaults.push(...workspaces.map((w) => normalizePath(relative(options.path, w))))
-      }
-    }
-
-    // go ahead and inject the default rules now
-    this.injectRules(defaultRules, [...defaults, ...additionalDefaults])
-
-    if (!this.isPackage) {
-      // if this instance is not a package, then place some strict default rules, and append
-      // known required files for this directory
-      this.injectRules(strictRules, [
-        ...strictDefaults,
-        ...allLevels,
-        ...this.requiredFiles.map((file) => `!${file}`),
-      ])
-    }
-  }
-
-  // overridden method: we intercept the reading of the package.json file here so that we can
-  // process it into both the package.json file rules as well as the strictRules synthetic rule set
-  addIgnoreFile (file, callback) {
-    // if we're adding anything other than package.json, then let ignore-walk handle it
-    if (file !== 'package.json' || !this.isPackage) {
-      return super.addIgnoreFile(file, callback)
-    }
-
-    return this.processPackage(callback)
-  }
-
-  // overridden method: if we're done, but we're a package, then we also need to evaluate bundles
-  // before we actually emit our done event
-  emit (ev, data) {
-    if (ev !== 'done' || !this.isPackage) {
-      return super.emit(ev, data)
-    }
-
-    // we intentionally delay the done event while keeping the function sync here
-    // eslint-disable-next-line promise/catch-or-return, promise/always-return
-    this.gatherBundles().then(() => {
-      super.emit('done', this.result)
-    })
-    return true
-  }
-
-  // overridden method: before actually filtering, we make sure that we've removed the rules for
-  // files that should no longer take effect due to our order of precedence
-  filterEntries () {
-    if (this.ignoreRules['package.json']) {
-      // package.json means no .npmignore or .gitignore
-      this.ignoreRules['.npmignore'] = null
-      this.ignoreRules['.gitignore'] = null
-    } else if (this.ignoreRules['.npmignore']) {
-      // .npmignore means no .gitignore
-      this.ignoreRules['.gitignore'] = null
-    }
-
-    return super.filterEntries()
-  }
-
-  // overridden method: we never want to include anything that isn't a file or directory
-  onstat (opts, callback) {
-    if (!opts.st.isFile() && !opts.st.isDirectory()) {
-      return callback()
-    }
-
-    return super.onstat(opts, callback)
-  }
-
-  // overridden method: we want to refuse to pack files that are invalid, node-tar protects us from
-  // a lot of them but not all
-  stat (opts, callback) {
-    if (nameIsBadForWindows(opts.entry)) {
-      return callback()
-    }
-
-    return super.stat(opts, callback)
-  }
-
-  // overridden method: this is called to create options for a child walker when we step
-  // in to a normal child directory (this will never be a bundle). the default method here
-  // copies the root's `ignoreFiles` value, but we don't want to respect package.json for
-  // subdirectories, so we override it with a list that intentionally omits package.json
-  walkerOpt (entry, opts) {
-    let ignoreFiles = null
-
-    // however, if we have a tree, and we have workspaces, and the directory we're about
-    // to step into is a workspace, then we _do_ want to respect its package.json
-    if (this.tree.workspaces) {
-      const workspaceDirs = [...this.tree.workspaces.values()]
-        .map((dir) => dir.replace(/\\/g, '/'))
-
-      const entryPath = join(this.path, entry).replace(/\\/g, '/')
-      if (workspaceDirs.includes(entryPath)) {
-        ignoreFiles = [
-          defaultRules,
-          'package.json',
-          '.npmignore',
-          '.gitignore',
-          strictRules,
-        ]
-      }
-    } else {
-      ignoreFiles = [
-        defaultRules,
-        '.npmignore',
-        '.gitignore',
-        strictRules,
-      ]
-    }
-
-    return {
-      ...super.walkerOpt(entry, opts),
-      ignoreFiles,
-      // we map over our own requiredFiles and pass ones that are within this entry
-      requiredFiles: this.requiredFiles
-        .map((file) => {
-          if (relative(file, entry) === '..') {
-            return relative(entry, file).replace(/\\/g, '/')
-          }
-          return false
-        })
-        .filter(Boolean),
-    }
-  }
-
-  // overridden method: we want child walkers to be instances of this class, not ignore-walk
-  walker (entry, opts, callback) {
-    new PackWalker(this.tree, this.walkerOpt(entry, opts)).on('done', callback).start()
-  }
-
-  // overridden method: we use a custom sort method to help compressibility
-  sort (a, b) {
-    // optimize for compressibility
-    // extname, then basename, then locale alphabetically
-    // https://twitter.com/isntitvacant/status/1131094910923231232
-    const exta = extname(a).toLowerCase()
-    const extb = extname(b).toLowerCase()
-    const basea = basename(a).toLowerCase()
-    const baseb = basename(b).toLowerCase()
-
-    return exta.localeCompare(extb, 'en') ||
-      basea.localeCompare(baseb, 'en') ||
-      a.localeCompare(b, 'en')
-  }
-
-  // convenience method: this joins the given rules with newlines, appends a trailing newline,
-  // and calls the internal onReadIgnoreFile method
-  injectRules (filename, rules, callback = () => {}) {
-    this.onReadIgnoreFile(filename, `${rules.join('\n')}\n`, callback)
-  }
-
-  // custom method: this is called by addIgnoreFile when we find a package.json, it uses the
-  // arborist tree to pull both default rules and strict rules for the package
-  processPackage (callback) {
-    const {
-      bin,
-      browser,
-      files,
-      main,
-    } = this.tree.package
-
-    // rules in these arrays are inverted since they are patterns we want to _not_ ignore
-    const ignores = []
-    const strict = [
-      ...strictDefaults,
-      ...allLevels,
-      '!/package.json',
-      '/.git',
-      '/node_modules',
-      '.npmrc',
-      '/package-lock.json',
-      '/yarn.lock',
-      '/pnpm-lock.yaml',
-    ]
-
-    // if we have a files array in our package, we need to pull rules from it
-    if (files) {
-      for (let file of files) {
-        // invert the rule because these are things we want to include
-        if (file.startsWith('./')) {
-          file = file.slice(1)
-        } else if (file.endsWith('/*')) {
-          file = file.slice(0, -1)
-        }
-        const inverse = `!${file}`
-
-        this.excludeNonRoot(file)
-
-        try {
-          // if an entry in the files array is a specific file, then we need to include it as a
-          // strict requirement for this package. if it's a directory or a pattern, it's a default
-          // pattern instead. this is ugly, but we have to stat to find out if it's a file
-          const stat = lstat(join(this.path, file.replace(/^!+/, '')).replace(/\\/g, '/'))
-          // if we have a file and we know that, it's strictly required
-          if (stat.isFile()) {
-            strict.unshift(inverse)
-            this.requiredFiles.push(file.startsWith('/') ? file.slice(1) : file)
-          } else if (stat.isDirectory()) {
-            // otherwise, it's a default ignore, and since we got here we know it's not a pattern
-            // so we include the directory contents
-            ignores.push(inverse)
-            ignores.push(`${inverse}/**`)
-          }
-          // if the thing exists, but is neither a file or a directory, we don't want it at all
-        } catch (err) {
-          // if lstat throws, then we assume we're looking at a pattern and treat it as a default
-          ignores.push(inverse)
-        }
-      }
-
-      // we prepend a '*' to exclude everything, followed by our inverted file rules
-      // which now mean to include those
-      this.injectRules('package.json', ['*', ...ignores])
-    }
-
-    // browser is required
-    if (browser) {
-      strict.push(`!/${browser}`)
-    }
-
-    // main is required
-    if (main) {
-      strict.push(`!/${main}`)
-    }
-
-    // each bin is required
-    if (bin) {
-      for (const key in bin) {
-        strict.push(`!/${bin[key]}`)
-      }
-    }
-
-    // and now we add all of the strict rules to our synthetic file
-    this.injectRules(strictRules, strict, callback)
-  }
-
-  // excludes non root files by checking if elements from the files array in
-  // package.json contain an ! and readme/license/licence/copying, and then
-  // removing readme/license/licence/copying accordingly from strict defaults
-  excludeNonRoot (file) {
-    // Find the pattern
-    const matchingPattern = rootOnly.find(regex => regex.test(file))
-
-    if (matchingPattern) {
-      // Find which index matches the pattern and remove it from allLevels
-      const indexToRemove = allLevels.findIndex(element => matchingPattern.test(element))
-      allLevels.splice(indexToRemove, 1)
-    }
-  }
-
-  // custom method: after we've finished gathering the files for the root package, we call this
-  // before emitting the 'done' event in order to gather all of the files for bundled deps
-  async gatherBundles () {
-    if (this.seen.has(this.tree)) {
-      return
-    }
-
-    // add this node to our seen tracker
-    this.seen.add(this.tree)
-
-    // if we're the project root, then we look at our bundleDependencies, otherwise we got here
-    // because we're a bundled dependency of the root, which means we need to include all prod
-    // and optional dependencies in the bundle
-    let toBundle
-    if (this.tree.isProjectRoot) {
-      const { bundleDependencies } = this.tree.package
-      toBundle = bundleDependencies || []
-    } else {
-      const { dependencies, optionalDependencies } = this.tree.package
-      toBundle = Object.keys(dependencies || {}).concat(Object.keys(optionalDependencies || {}))
-    }
-
-    for (const dep of toBundle) {
-      const edge = this.tree.edgesOut.get(dep)
-      // no edgeOut = missing node, so skip it. we can't pack it if it's not here
-      // we also refuse to pack peer dependencies and dev dependencies
-      if (!edge || edge.peer || edge.dev) {
-        continue
-      }
-
-      // get a reference to the node we're bundling
-      const node = this.tree.edgesOut.get(dep).to
-      // if there's no node, this is most likely an optional dependency that hasn't been
-      // installed. just skip it.
-      if (!node) {
-        continue
-      }
-      // we use node.path for the path because we want the location the node was linked to,
-      // not where it actually lives on disk
-      const path = node.path
-      // but link nodes don't have edgesOut, so we need to pass in the target of the node
-      // in order to make sure we correctly traverse its dependencies
-      const tree = node.target
-
-      // and start building options to be passed to the walker for this package
-      const walkerOpts = {
-        path,
-        isPackage: true,
-        ignoreFiles: [],
-        seen: this.seen, // pass through seen so we can prevent infinite circular loops
-      }
-
-      // if our node is a link, we apply defaultRules. we don't do this for regular bundled
-      // deps because their .npmignore and .gitignore files are excluded by default and may
-      // override defaults
-      if (node.isLink) {
-        walkerOpts.ignoreFiles.push(defaultRules)
-      }
-
-      // _all_ nodes will follow package.json rules from their package root
-      walkerOpts.ignoreFiles.push('package.json')
-
-      // only link nodes will obey .npmignore or .gitignore
-      if (node.isLink) {
-        walkerOpts.ignoreFiles.push('.npmignore')
-        walkerOpts.ignoreFiles.push('.gitignore')
-      }
-
-      // _all_ nodes follow strict rules
-      walkerOpts.ignoreFiles.push(strictRules)
-
-      // create a walker for this dependency and gather its results
-      const walker = new PackWalker(tree, walkerOpts)
-      const bundled = await new Promise((pResolve, pReject) => {
-        walker.on('error', pReject)
-        walker.on('done', pResolve)
-        walker.start()
-      })
-
-      // now we make sure we have our paths correct from the root, and accumulate everything into
-      // our own result set to deduplicate
-      const relativeFrom = relative(this.root, walker.path)
-      for (const file of bundled) {
-        this.result.add(join(relativeFrom, file).replace(/\\/g, '/'))
-      }
-    }
-  }
-}
-
-const walk = (tree, options, callback) => {
-  if (typeof options === 'function') {
-    callback = options
-    options = {}
-  }
-  const p = new Promise((pResolve, pReject) => {
-    new PackWalker(tree, { ...options, isPackage: true })
-      .on('done', pResolve).on('error', pReject).start()
-  })
-  return callback ? p.then(res => callback(null, res), callback) : p
-}
-
-module.exports = walk
-walk.Walker = PackWalker
diff --git a/node_modules/npm/node_modules/npm-packlist/package.json b/node_modules/npm/node_modules/npm-packlist/package.json
deleted file mode 100644
index 5f41355..0000000
--- a/node_modules/npm/node_modules/npm-packlist/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
-  "name": "npm-packlist",
-  "version": "8.0.1",
-  "description": "Get a list of the files to add from a folder into an npm package",
-  "directories": {
-    "test": "test"
-  },
-  "main": "lib/index.js",
-  "dependencies": {
-    "ignore-walk": "^6.0.4"
-  },
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "devDependencies": {
-    "@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0",
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.21.2",
-    "mutate-fs": "^2.1.1",
-    "tap": "^16.0.1"
-  },
-  "scripts": {
-    "test": "tap",
-    "posttest": "npm run lint",
-    "snap": "tap",
-    "postsnap": "npm run lintfix --",
-    "eslint": "eslint",
-    "lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
-    "lintfix": "npm run lint -- --fix",
-    "npmclilint": "npmcli-lint",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-packlist.git"
-  },
-  "tap": {
-    "test-env": [
-      "LC_ALL=sk"
-    ],
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ],
-    "files": [
-      "test/*.js"
-    ]
-  },
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.21.2",
-    "publish": true
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-pick-manifest/LICENSE.md b/node_modules/npm/node_modules/npm-pick-manifest/LICENSE.md
deleted file mode 100644
index 8d28acf..0000000
--- a/node_modules/npm/node_modules/npm-pick-manifest/LICENSE.md
+++ /dev/null
@@ -1,16 +0,0 @@
-ISC License
-
-Copyright (c) npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for
-any purpose with or without fee is hereby granted, provided that the
-above copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
-ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js b/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js
deleted file mode 100644
index 8dbd272..0000000
--- a/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js
+++ /dev/null
@@ -1,218 +0,0 @@
-'use strict'
-
-const npa = require('npm-package-arg')
-const semver = require('semver')
-const { checkEngine } = require('npm-install-checks')
-const normalizeBin = require('npm-normalize-package-bin')
-
-const engineOk = (manifest, npmVersion, nodeVersion) => {
-  try {
-    checkEngine(manifest, npmVersion, nodeVersion)
-    return true
-  } catch (_) {
-    return false
-  }
-}
-
-const isBefore = (verTimes, ver, time) =>
-  !verTimes || !verTimes[ver] || Date.parse(verTimes[ver]) <= time
-
-const avoidSemverOpt = { includePrerelease: true, loose: true }
-const shouldAvoid = (ver, avoid) =>
-  avoid && semver.satisfies(ver, avoid, avoidSemverOpt)
-
-const decorateAvoid = (result, avoid) =>
-  result && shouldAvoid(result.version, avoid)
-    ? { ...result, _shouldAvoid: true }
-    : result
-
-const pickManifest = (packument, wanted, opts) => {
-  const {
-    defaultTag = 'latest',
-    before = null,
-    nodeVersion = process.version,
-    npmVersion = null,
-    includeStaged = false,
-    avoid = null,
-    avoidStrict = false,
-  } = opts
-
-  const { name, time: verTimes } = packument
-  const versions = packument.versions || {}
-
-  if (avoidStrict) {
-    const looseOpts = {
-      ...opts,
-      avoidStrict: false,
-    }
-
-    const result = pickManifest(packument, wanted, looseOpts)
-    if (!result || !result._shouldAvoid) {
-      return result
-    }
-
-    const caret = pickManifest(packument, `^${result.version}`, looseOpts)
-    if (!caret || !caret._shouldAvoid) {
-      return {
-        ...caret,
-        _outsideDependencyRange: true,
-        _isSemVerMajor: false,
-      }
-    }
-
-    const star = pickManifest(packument, '*', looseOpts)
-    if (!star || !star._shouldAvoid) {
-      return {
-        ...star,
-        _outsideDependencyRange: true,
-        _isSemVerMajor: true,
-      }
-    }
-
-    throw Object.assign(new Error(`No avoidable versions for ${name}`), {
-      code: 'ETARGET',
-      name,
-      wanted,
-      avoid,
-      before,
-      versions: Object.keys(versions),
-    })
-  }
-
-  const staged = (includeStaged && packument.stagedVersions &&
-    packument.stagedVersions.versions) || {}
-  const restricted = (packument.policyRestrictions &&
-    packument.policyRestrictions.versions) || {}
-
-  const time = before && verTimes ? +(new Date(before)) : Infinity
-  const spec = npa.resolve(name, wanted || defaultTag)
-  const type = spec.type
-  const distTags = packument['dist-tags'] || {}
-
-  if (type !== 'tag' && type !== 'version' && type !== 'range') {
-    throw new Error('Only tag, version, and range are supported')
-  }
-
-  // if the type is 'tag', and not just the implicit default, then it must
-  // be that exactly, or nothing else will do.
-  if (wanted && type === 'tag') {
-    const ver = distTags[wanted]
-    // if the version in the dist-tags is before the before date, then
-    // we use that.  Otherwise, we get the highest precedence version
-    // prior to the dist-tag.
-    if (isBefore(verTimes, ver, time)) {
-      return decorateAvoid(versions[ver] || staged[ver] || restricted[ver], avoid)
-    } else {
-      return pickManifest(packument, `<=${ver}`, opts)
-    }
-  }
-
-  // similarly, if a specific version, then only that version will do
-  if (wanted && type === 'version') {
-    const ver = semver.clean(wanted, { loose: true })
-    const mani = versions[ver] || staged[ver] || restricted[ver]
-    return isBefore(verTimes, ver, time) ? decorateAvoid(mani, avoid) : null
-  }
-
-  // ok, sort based on our heuristics, and pick the best fit
-  const range = type === 'range' ? wanted : '*'
-
-  // if the range is *, then we prefer the 'latest' if available
-  // but skip this if it should be avoided, in that case we have
-  // to try a little harder.
-  const defaultVer = distTags[defaultTag]
-  if (defaultVer &&
-      (range === '*' || semver.satisfies(defaultVer, range, { loose: true })) &&
-      !shouldAvoid(defaultVer, avoid)) {
-    const mani = versions[defaultVer]
-    if (mani && isBefore(verTimes, defaultVer, time)) {
-      return mani
-    }
-  }
-
-  // ok, actually have to sort the list and take the winner
-  const allEntries = Object.entries(versions)
-    .concat(Object.entries(staged))
-    .concat(Object.entries(restricted))
-    .filter(([ver, mani]) => isBefore(verTimes, ver, time))
-
-  if (!allEntries.length) {
-    throw Object.assign(new Error(`No versions available for ${name}`), {
-      code: 'ENOVERSIONS',
-      name,
-      type,
-      wanted,
-      before,
-      versions: Object.keys(versions),
-    })
-  }
-
-  const sortSemverOpt = { loose: true }
-  const entries = allEntries.filter(([ver, mani]) =>
-    semver.satisfies(ver, range, { loose: true }))
-    .sort((a, b) => {
-      const [vera, mania] = a
-      const [verb, manib] = b
-      const notavoida = !shouldAvoid(vera, avoid)
-      const notavoidb = !shouldAvoid(verb, avoid)
-      const notrestra = !restricted[a]
-      const notrestrb = !restricted[b]
-      const notstagea = !staged[a]
-      const notstageb = !staged[b]
-      const notdepra = !mania.deprecated
-      const notdeprb = !manib.deprecated
-      const enginea = engineOk(mania, npmVersion, nodeVersion)
-      const engineb = engineOk(manib, npmVersion, nodeVersion)
-      // sort by:
-      // - not an avoided version
-      // - not restricted
-      // - not staged
-      // - not deprecated and engine ok
-      // - engine ok
-      // - not deprecated
-      // - semver
-      return (notavoidb - notavoida) ||
-        (notrestrb - notrestra) ||
-        (notstageb - notstagea) ||
-        ((notdeprb && engineb) - (notdepra && enginea)) ||
-        (engineb - enginea) ||
-        (notdeprb - notdepra) ||
-        semver.rcompare(vera, verb, sortSemverOpt)
-    })
-
-  return decorateAvoid(entries[0] && entries[0][1], avoid)
-}
-
-module.exports = (packument, wanted, opts = {}) => {
-  const mani = pickManifest(packument, wanted, opts)
-  const picked = mani && normalizeBin(mani)
-  const policyRestrictions = packument.policyRestrictions
-  const restricted = (policyRestrictions && policyRestrictions.versions) || {}
-
-  if (picked && !restricted[picked.version]) {
-    return picked
-  }
-
-  const { before = null, defaultTag = 'latest' } = opts
-  const bstr = before ? new Date(before).toLocaleString() : ''
-  const { name } = packument
-  const pckg = `${name}@${wanted}` +
-    (before ? ` with a date before ${bstr}` : '')
-
-  const isForbidden = picked && !!restricted[picked.version]
-  const polMsg = isForbidden ? policyRestrictions.message : ''
-
-  const msg = !isForbidden ? `No matching version found for ${pckg}.`
-    : `Could not download ${pckg} due to policy violations:\n${polMsg}`
-
-  const code = isForbidden ? 'E403' : 'ETARGET'
-  throw Object.assign(new Error(msg), {
-    code,
-    type: npa.resolve(packument.name, wanted).type,
-    wanted,
-    versions: Object.keys(packument.versions ?? {}),
-    name,
-    distTags: packument['dist-tags'],
-    defaultTag,
-  })
-}
diff --git a/node_modules/npm/node_modules/npm-pick-manifest/package.json b/node_modules/npm/node_modules/npm-pick-manifest/package.json
deleted file mode 100644
index e30c2cf..0000000
--- a/node_modules/npm/node_modules/npm-pick-manifest/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
-  "name": "npm-pick-manifest",
-  "version": "9.0.0",
-  "description": "Resolves a matching manifest from a package metadata document according to standard npm semver resolution rules.",
-  "main": "./lib",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "scripts": {
-    "coverage": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "test": "tap",
-    "posttest": "npm run lint",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-pick-manifest.git"
-  },
-  "keywords": [
-    "npm",
-    "semver",
-    "package manager"
-  ],
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "dependencies": {
-    "npm-install-checks": "^6.0.0",
-    "npm-normalize-package-bin": "^3.0.0",
-    "npm-package-arg": "^11.0.0",
-    "semver": "^7.3.5"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "tap": "^16.0.1"
-  },
-  "tap": {
-    "check-coverage": true,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "publish": true,
-    "ciVersions": [
-      "16.14.0",
-      "16.x",
-      "18.0.0",
-      "18.x"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-profile/LICENSE.md b/node_modules/npm/node_modules/npm-profile/LICENSE.md
deleted file mode 100644
index 5fc208f..0000000
--- a/node_modules/npm/node_modules/npm-profile/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-ISC License
-
-Copyright npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this
-software for any purpose with or without fee is hereby
-granted, provided that the above copyright notice and this
-permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-profile/lib/index.js b/node_modules/npm/node_modules/npm-profile/lib/index.js
deleted file mode 100644
index ce78882..0000000
--- a/node_modules/npm/node_modules/npm-profile/lib/index.js
+++ /dev/null
@@ -1,295 +0,0 @@
-'use strict'
-
-const fetch = require('npm-registry-fetch')
-const { HttpErrorBase } = require('npm-registry-fetch/lib/errors')
-const EventEmitter = require('events')
-const os = require('os')
-const { URL } = require('url')
-const log = require('proc-log')
-
-// try loginWeb, catch the "not supported" message and fall back to couch
-const login = (opener, prompter, opts = {}) => {
-  const { creds } = opts
-  return loginWeb(opener, opts).catch(er => {
-    if (er instanceof WebLoginNotSupported) {
-      log.verbose('web login not supported, trying couch')
-      return prompter(creds)
-        .then(data => loginCouch(data.username, data.password, opts))
-    } else {
-      throw er
-    }
-  })
-}
-
-const adduser = (opener, prompter, opts = {}) => {
-  const { creds } = opts
-  return adduserWeb(opener, opts).catch(er => {
-    if (er instanceof WebLoginNotSupported) {
-      log.verbose('web adduser not supported, trying couch')
-      return prompter(creds)
-        .then(data => adduserCouch(data.username, data.email, data.password, opts))
-    } else {
-      throw er
-    }
-  })
-}
-
-const adduserWeb = (opener, opts = {}) => {
-  log.verbose('web adduser', 'before first POST')
-  return webAuth(opener, opts, { create: true })
-}
-
-const loginWeb = (opener, opts = {}) => {
-  log.verbose('web login', 'before first POST')
-  return webAuth(opener, opts, {})
-}
-
-const isValidUrl = u => {
-  try {
-    return /^https?:$/.test(new URL(u).protocol)
-  } catch (er) {
-    return false
-  }
-}
-
-const webAuth = (opener, opts, body) => {
-  const { hostname } = opts
-  body.hostname = hostname || os.hostname()
-  const target = '/-/v1/login'
-  const doneEmitter = new EventEmitter()
-  return fetch(target, {
-    ...opts,
-    method: 'POST',
-    body,
-  }).then(res => {
-    return Promise.all([res, res.json()])
-  }).then(([res, content]) => {
-    const { doneUrl, loginUrl } = content
-    log.verbose('web auth', 'got response', content)
-    if (!isValidUrl(doneUrl) || !isValidUrl(loginUrl)) {
-      throw new WebLoginInvalidResponse('POST', res, content)
-    }
-    return content
-  }).then(({ doneUrl, loginUrl }) => {
-    log.verbose('web auth', 'opening url pair')
-
-    const openPromise = opener(loginUrl, doneEmitter)
-    const webAuthCheckPromise = webAuthCheckLogin(doneUrl, { ...opts, cache: false })
-      .then(authResult => {
-        log.verbose('web auth', 'done-check finished')
-
-        // cancel open prompt if it's present
-        doneEmitter.emit('abort')
-
-        return authResult
-      })
-
-    return Promise.all([openPromise, webAuthCheckPromise]).then(
-      // pick the auth result and pass it along
-      ([, authResult]) => authResult
-    )
-  }).catch(er => {
-    // cancel open prompt if it's present
-    doneEmitter.emit('abort')
-
-    if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) {
-      throw new WebLoginNotSupported('POST', {
-        status: er.statusCode,
-        headers: { raw: () => er.headers },
-      }, er.body)
-    } else {
-      throw er
-    }
-  })
-}
-
-const webAuthCheckLogin = (doneUrl, opts) => {
-  return fetch(doneUrl, opts).then(res => {
-    return Promise.all([res, res.json()])
-  }).then(([res, content]) => {
-    if (res.status === 200) {
-      if (!content.token) {
-        throw new WebLoginInvalidResponse('GET', res, content)
-      } else {
-        return content
-      }
-    } else if (res.status === 202) {
-      const retry = +res.headers.get('retry-after') * 1000
-      if (retry > 0) {
-        return sleep(retry).then(() => webAuthCheckLogin(doneUrl, opts))
-      } else {
-        return webAuthCheckLogin(doneUrl, opts)
-      }
-    } else {
-      throw new WebLoginInvalidResponse('GET', res, content)
-    }
-  })
-}
-
-const adduserCouch = (username, email, password, opts = {}) => {
-  const body = {
-    _id: 'org.couchdb.user:' + username,
-    name: username,
-    password: password,
-    email: email,
-    type: 'user',
-    roles: [],
-    date: new Date().toISOString(),
-  }
-  const logObj = {
-    ...body,
-    password: 'XXXXX',
-  }
-  log.verbose('adduser', 'before first PUT', logObj)
-
-  const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username)
-  return fetch.json(target, {
-    ...opts,
-    method: 'PUT',
-    body,
-  }).then(result => {
-    result.username = username
-    return result
-  })
-}
-
-const loginCouch = (username, password, opts = {}) => {
-  const body = {
-    _id: 'org.couchdb.user:' + username,
-    name: username,
-    password: password,
-    type: 'user',
-    roles: [],
-    date: new Date().toISOString(),
-  }
-  const logObj = {
-    ...body,
-    password: 'XXXXX',
-  }
-  log.verbose('login', 'before first PUT', logObj)
-
-  const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username)
-  return fetch.json(target, {
-    ...opts,
-    method: 'PUT',
-    body,
-  }).catch(err => {
-    if (err.code === 'E400') {
-      err.message = `There is no user with the username "${username}".`
-      throw err
-    }
-    if (err.code !== 'E409') {
-      throw err
-    }
-    return fetch.json(target, {
-      ...opts,
-      query: { write: true },
-    }).then(result => {
-      Object.keys(result).forEach(k => {
-        if (!body[k] || k === 'roles') {
-          body[k] = result[k]
-        }
-      })
-      const { otp } = opts
-      return fetch.json(`${target}/-rev/${body._rev}`, {
-        ...opts,
-        method: 'PUT',
-        body,
-        forceAuth: {
-          username,
-          password: Buffer.from(password, 'utf8').toString('base64'),
-          otp,
-        },
-      })
-    })
-  }).then(result => {
-    result.username = username
-    return result
-  })
-}
-
-const get = (opts = {}) => fetch.json('/-/npm/v1/user', opts)
-
-const set = (profile, opts = {}) => {
-  Object.keys(profile).forEach(key => {
-    // profile keys can't be empty strings, but they CAN be null
-    if (profile[key] === '') {
-      profile[key] = null
-    }
-  })
-  return fetch.json('/-/npm/v1/user', {
-    ...opts,
-    method: 'POST',
-    body: profile,
-  })
-}
-
-const listTokens = (opts = {}) => {
-  const untilLastPage = (href, objects) => {
-    return fetch.json(href, opts).then(result => {
-      objects = objects ? objects.concat(result.objects) : result.objects
-      if (result.urls.next) {
-        return untilLastPage(result.urls.next, objects)
-      } else {
-        return objects
-      }
-    })
-  }
-  return untilLastPage('/-/npm/v1/tokens')
-}
-
-const removeToken = (tokenKey, opts = {}) => {
-  const target = `/-/npm/v1/tokens/token/${tokenKey}`
-  return fetch(target, {
-    ...opts,
-    method: 'DELETE',
-    ignoreBody: true,
-  }).then(() => null)
-}
-
-const createToken = (password, readonly, cidrs, opts = {}) => {
-  return fetch.json('/-/npm/v1/tokens', {
-    ...opts,
-    method: 'POST',
-    body: {
-      password: password,
-      readonly: readonly,
-      cidr_whitelist: cidrs,
-    },
-  })
-}
-
-class WebLoginInvalidResponse extends HttpErrorBase {
-  constructor (method, res, body) {
-    super(method, res, body)
-    this.message = 'Invalid response from web login endpoint'
-    Error.captureStackTrace(this, WebLoginInvalidResponse)
-  }
-}
-
-class WebLoginNotSupported extends HttpErrorBase {
-  constructor (method, res, body) {
-    super(method, res, body)
-    this.message = 'Web login not supported'
-    this.code = 'ENYI'
-    Error.captureStackTrace(this, WebLoginNotSupported)
-  }
-}
-
-const sleep = (ms) =>
-  new Promise((resolve, reject) => setTimeout(resolve, ms))
-
-module.exports = {
-  adduserCouch,
-  loginCouch,
-  adduserWeb,
-  loginWeb,
-  login,
-  adduser,
-  get,
-  set,
-  listTokens,
-  removeToken,
-  createToken,
-  webAuthCheckLogin,
-}
diff --git a/node_modules/npm/node_modules/npm-profile/package.json b/node_modules/npm/node_modules/npm-profile/package.json
deleted file mode 100644
index af57e9e..0000000
--- a/node_modules/npm/node_modules/npm-profile/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
-  "name": "npm-profile",
-  "version": "9.0.0",
-  "description": "Library for updating an npmjs.com profile",
-  "keywords": [],
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "dependencies": {
-    "npm-registry-fetch": "^16.0.0",
-    "proc-log": "^3.0.0"
-  },
-  "main": "./lib/index.js",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-profile.git"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "nock": "^13.2.4",
-    "tap": "^16.0.1"
-  },
-  "scripts": {
-    "posttest": "npm run lint",
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "tap": {
-    "check-coverage": true,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "ciVersions": [
-      "16.14.0",
-      "16.x",
-      "18.0.0",
-      "18.x"
-    ],
-    "publish": true
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/LICENSE.md b/node_modules/npm/node_modules/npm-registry-fetch/LICENSE.md
deleted file mode 100644
index 5fc208f..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-ISC License
-
-Copyright npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this
-software for any purpose with or without fee is hereby
-granted, provided that the above copyright notice and this
-permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/auth.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/auth.js
deleted file mode 100644
index 9270025..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/auth.js
+++ /dev/null
@@ -1,181 +0,0 @@
-'use strict'
-const fs = require('fs')
-const npa = require('npm-package-arg')
-const { URL } = require('url')
-
-// Find the longest registry key that is used for some kind of auth
-// in the options.  Returns the registry key and the auth config.
-const regFromURI = (uri, opts) => {
-  const parsed = new URL(uri)
-  // try to find a config key indicating we have auth for this registry
-  // can be one of :_authToken, :_auth, :_password and :username, or
-  // :certfile and :keyfile
-  // We walk up the "path" until we're left with just //[:],
-  // stopping when we reach '//'.
-  let regKey = `//${parsed.host}${parsed.pathname}`
-  while (regKey.length > '//'.length) {
-    const authKey = hasAuth(regKey, opts)
-    // got some auth for this URI
-    if (authKey) {
-      return { regKey, authKey }
-    }
-
-    // can be either //host/some/path/:_auth or //host/some/path:_auth
-    // walk up by removing EITHER what's after the slash OR the slash itself
-    regKey = regKey.replace(/([^/]+|\/)$/, '')
-  }
-  return { regKey: false, authKey: null }
-}
-
-// Not only do we want to know if there is auth, but if we are calling `npm
-// logout` we want to know what config value specifically provided it.  This is
-// so we can look up where the config came from to delete it (i.e. user vs
-// project)
-const hasAuth = (regKey, opts) => {
-  if (opts[`${regKey}:_authToken`]) {
-    return '_authToken'
-  }
-  if (opts[`${regKey}:_auth`]) {
-    return '_auth'
-  }
-  if (opts[`${regKey}:username`] && opts[`${regKey}:_password`]) {
-    // 'password' can be inferred to also be present
-    return 'username'
-  }
-  if (opts[`${regKey}:certfile`] && opts[`${regKey}:keyfile`]) {
-    // 'keyfile' can be inferred to also be present
-    return 'certfile'
-  }
-  return false
-}
-
-const sameHost = (a, b) => {
-  const parsedA = new URL(a)
-  const parsedB = new URL(b)
-  return parsedA.host === parsedB.host
-}
-
-const getRegistry = opts => {
-  const { spec } = opts
-  const { scope: specScope, subSpec } = spec ? npa(spec) : {}
-  const subSpecScope = subSpec && subSpec.scope
-  const scope = subSpec ? subSpecScope : specScope
-  const scopeReg = scope && opts[`${scope}:registry`]
-  return scopeReg || opts.registry
-}
-
-const maybeReadFile = file => {
-  try {
-    return fs.readFileSync(file, 'utf8')
-  } catch (er) {
-    if (er.code !== 'ENOENT') {
-      throw er
-    }
-    return null
-  }
-}
-
-const getAuth = (uri, opts = {}) => {
-  const { forceAuth } = opts
-  if (!uri) {
-    throw new Error('URI is required')
-  }
-  const { regKey, authKey } = regFromURI(uri, forceAuth || opts)
-
-  // we are only allowed to use what's in forceAuth if specified
-  if (forceAuth && !regKey) {
-    return new Auth({
-      // if we force auth we don't want to refer back to anything in config
-      regKey: false,
-      authKey: null,
-      scopeAuthKey: null,
-      token: forceAuth._authToken || forceAuth.token,
-      username: forceAuth.username,
-      password: forceAuth._password || forceAuth.password,
-      auth: forceAuth._auth || forceAuth.auth,
-      certfile: forceAuth.certfile,
-      keyfile: forceAuth.keyfile,
-    })
-  }
-
-  // no auth for this URI, but might have it for the registry
-  if (!regKey) {
-    const registry = getRegistry(opts)
-    if (registry && uri !== registry && sameHost(uri, registry)) {
-      return getAuth(registry, opts)
-    } else if (registry !== opts.registry) {
-      // If making a tarball request to a different base URI than the
-      // registry where we logged in, but the same auth SHOULD be sent
-      // to that artifact host, then we track where it was coming in from,
-      // and warn the user if we get a 4xx error on it.
-      const { regKey: scopeAuthKey, authKey: _authKey } = regFromURI(registry, opts)
-      return new Auth({ scopeAuthKey, regKey: scopeAuthKey, authKey: _authKey })
-    }
-  }
-
-  const {
-    [`${regKey}:_authToken`]: token,
-    [`${regKey}:username`]: username,
-    [`${regKey}:_password`]: password,
-    [`${regKey}:_auth`]: auth,
-    [`${regKey}:certfile`]: certfile,
-    [`${regKey}:keyfile`]: keyfile,
-  } = opts
-
-  return new Auth({
-    scopeAuthKey: null,
-    regKey,
-    authKey,
-    token,
-    auth,
-    username,
-    password,
-    certfile,
-    keyfile,
-  })
-}
-
-class Auth {
-  constructor ({
-    token,
-    auth,
-    username,
-    password,
-    scopeAuthKey,
-    certfile,
-    keyfile,
-    regKey,
-    authKey,
-  }) {
-    // same as regKey but only present for scoped auth. Should have been named scopeRegKey
-    this.scopeAuthKey = scopeAuthKey
-    // `${regKey}:${authKey}` will get you back to the auth config that gave us auth
-    this.regKey = regKey
-    this.authKey = authKey
-    this.token = null
-    this.auth = null
-    this.isBasicAuth = false
-    this.cert = null
-    this.key = null
-    if (token) {
-      this.token = token
-    } else if (auth) {
-      this.auth = auth
-    } else if (username && password) {
-      const p = Buffer.from(password, 'base64').toString('utf8')
-      this.auth = Buffer.from(`${username}:${p}`, 'utf8').toString('base64')
-      this.isBasicAuth = true
-    }
-    // mTLS may be used in conjunction with another auth method above
-    if (certfile && keyfile) {
-      const cert = maybeReadFile(certfile, 'utf-8')
-      const key = maybeReadFile(keyfile, 'utf-8')
-      if (cert && key) {
-        this.cert = cert
-        this.key = key
-      }
-    }
-  }
-}
-
-module.exports = getAuth
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js
deleted file mode 100644
index 066ac3c..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/check-response.js
+++ /dev/null
@@ -1,100 +0,0 @@
-'use strict'
-
-const errors = require('./errors.js')
-const { Response } = require('minipass-fetch')
-const defaultOpts = require('./default-opts.js')
-const log = require('proc-log')
-const cleanUrl = require('./clean-url.js')
-
-/* eslint-disable-next-line max-len */
-const moreInfoUrl = 'https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry'
-const checkResponse =
-  async ({ method, uri, res, startTime, auth, opts }) => {
-    opts = { ...defaultOpts, ...opts }
-    if (res.headers.has('npm-notice') && !res.headers.has('x-local-cache')) {
-      log.notice('', res.headers.get('npm-notice'))
-    }
-
-    if (res.status >= 400) {
-      logRequest(method, res, startTime)
-      if (auth && auth.scopeAuthKey && !auth.token && !auth.auth) {
-      // we didn't have auth for THIS request, but we do have auth for
-      // requests to the registry indicated by the spec's scope value.
-      // Warn the user.
-        log.warn('registry', `No auth for URI, but auth present for scoped registry.
-
-URI: ${uri}
-Scoped Registry Key: ${auth.scopeAuthKey}
-
-More info here: ${moreInfoUrl}`)
-      }
-      return checkErrors(method, res, startTime, opts)
-    } else {
-      res.body.on('end', () => logRequest(method, res, startTime, opts))
-      if (opts.ignoreBody) {
-        res.body.resume()
-        return new Response(null, res)
-      }
-      return res
-    }
-  }
-module.exports = checkResponse
-
-function logRequest (method, res, startTime) {
-  const elapsedTime = Date.now() - startTime
-  const attempt = res.headers.get('x-fetch-attempts')
-  const attemptStr = attempt && attempt > 1 ? ` attempt #${attempt}` : ''
-  const cacheStatus = res.headers.get('x-local-cache-status')
-  const cacheStr = cacheStatus ? ` (cache ${cacheStatus})` : ''
-  const urlStr = cleanUrl(res.url)
-
-  log.http(
-    'fetch',
-    `${method.toUpperCase()} ${res.status} ${urlStr} ${elapsedTime}ms${attemptStr}${cacheStr}`
-  )
-}
-
-function checkErrors (method, res, startTime, opts) {
-  return res.buffer()
-    .catch(() => null)
-    .then(body => {
-      let parsed = body
-      try {
-        parsed = JSON.parse(body.toString('utf8'))
-      } catch {
-        // ignore errors
-      }
-      if (res.status === 401 && res.headers.get('www-authenticate')) {
-        const auth = res.headers.get('www-authenticate')
-          .split(/,\s*/)
-          .map(s => s.toLowerCase())
-        if (auth.indexOf('ipaddress') !== -1) {
-          throw new errors.HttpErrorAuthIPAddress(
-            method, res, parsed, opts.spec
-          )
-        } else if (auth.indexOf('otp') !== -1) {
-          throw new errors.HttpErrorAuthOTP(
-            method, res, parsed, opts.spec
-          )
-        } else {
-          throw new errors.HttpErrorAuthUnknown(
-            method, res, parsed, opts.spec
-          )
-        }
-      } else if (
-        res.status === 401 &&
-        body != null &&
-        /one-time pass/.test(body.toString('utf8'))
-      ) {
-        // Heuristic for malformed OTP responses that don't include the
-        // www-authenticate header.
-        throw new errors.HttpErrorAuthOTP(
-          method, res, parsed, opts.spec
-        )
-      } else {
-        throw new errors.HttpErrorGeneral(
-          method, res, parsed, opts.spec
-        )
-      }
-    })
-}
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/clean-url.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/clean-url.js
deleted file mode 100644
index 0c2656b..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/clean-url.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const { URL } = require('url')
-
-const replace = '***'
-const tokenRegex = /\bnpm_[a-zA-Z0-9]{36}\b/g
-const guidRegex = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/g
-
-const cleanUrl = (str) => {
-  if (typeof str !== 'string' || !str) {
-    return str
-  }
-
-  try {
-    const url = new URL(str)
-    if (url.password) {
-      url.password = replace
-      str = url.toString()
-    }
-  } catch {
-    // ignore errors
-  }
-
-  return str
-    .replace(tokenRegex, `npm_${replace}`)
-    .replace(guidRegex, `npm_${replace}`)
-}
-
-module.exports = cleanUrl
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/default-opts.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/default-opts.js
deleted file mode 100644
index f0847f0..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/default-opts.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const pkg = require('../package.json')
-module.exports = {
-  maxSockets: 12,
-  method: 'GET',
-  registry: 'https://registry.npmjs.org/',
-  timeout: 5 * 60 * 1000, // 5 minutes
-  strictSSL: true,
-  noProxy: process.env.NOPROXY,
-  userAgent: `${pkg.name
-    }@${
-      pkg.version
-    }/node@${
-      process.version
-    }+${
-      process.arch
-    } (${
-      process.platform
-    })`,
-}
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/errors.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/errors.js
deleted file mode 100644
index cf5ddba..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/errors.js
+++ /dev/null
@@ -1,80 +0,0 @@
-'use strict'
-
-const url = require('url')
-
-function packageName (href) {
-  try {
-    let basePath = new url.URL(href).pathname.slice(1)
-    if (!basePath.match(/^-/)) {
-      basePath = basePath.split('/')
-      var index = basePath.indexOf('_rewrite')
-      if (index === -1) {
-        index = basePath.length - 1
-      } else {
-        index++
-      }
-      return decodeURIComponent(basePath[index])
-    }
-  } catch (_) {
-    // this is ok
-  }
-}
-
-class HttpErrorBase extends Error {
-  constructor (method, res, body, spec) {
-    super()
-    this.name = this.constructor.name
-    this.headers = res.headers.raw()
-    this.statusCode = res.status
-    this.code = `E${res.status}`
-    this.method = method
-    this.uri = res.url
-    this.body = body
-    this.pkgid = spec ? spec.toString() : packageName(res.url)
-  }
-}
-module.exports.HttpErrorBase = HttpErrorBase
-
-class HttpErrorGeneral extends HttpErrorBase {
-  constructor (method, res, body, spec) {
-    super(method, res, body, spec)
-    this.message = `${res.status} ${res.statusText} - ${
-      this.method.toUpperCase()
-    } ${
-      this.spec || this.uri
-    }${
-      (body && body.error) ? ' - ' + body.error : ''
-    }`
-    Error.captureStackTrace(this, HttpErrorGeneral)
-  }
-}
-module.exports.HttpErrorGeneral = HttpErrorGeneral
-
-class HttpErrorAuthOTP extends HttpErrorBase {
-  constructor (method, res, body, spec) {
-    super(method, res, body, spec)
-    this.message = 'OTP required for authentication'
-    this.code = 'EOTP'
-    Error.captureStackTrace(this, HttpErrorAuthOTP)
-  }
-}
-module.exports.HttpErrorAuthOTP = HttpErrorAuthOTP
-
-class HttpErrorAuthIPAddress extends HttpErrorBase {
-  constructor (method, res, body, spec) {
-    super(method, res, body, spec)
-    this.message = 'Login is not allowed from your IP address'
-    this.code = 'EAUTHIP'
-    Error.captureStackTrace(this, HttpErrorAuthIPAddress)
-  }
-}
-module.exports.HttpErrorAuthIPAddress = HttpErrorAuthIPAddress
-
-class HttpErrorAuthUnknown extends HttpErrorBase {
-  constructor (method, res, body, spec) {
-    super(method, res, body, spec)
-    this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate')
-    Error.captureStackTrace(this, HttpErrorAuthUnknown)
-  }
-}
-module.exports.HttpErrorAuthUnknown = HttpErrorAuthUnknown
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js b/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js
deleted file mode 100644
index bb413f8..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js
+++ /dev/null
@@ -1,249 +0,0 @@
-'use strict'
-
-const { HttpErrorAuthOTP } = require('./errors.js')
-const checkResponse = require('./check-response.js')
-const getAuth = require('./auth.js')
-const fetch = require('make-fetch-happen')
-const JSONStream = require('minipass-json-stream')
-const npa = require('npm-package-arg')
-const qs = require('querystring')
-const url = require('url')
-const zlib = require('minizlib')
-const { Minipass } = require('minipass')
-
-const defaultOpts = require('./default-opts.js')
-
-// WhatWG URL throws if it's not fully resolved
-const urlIsValid = u => {
-  try {
-    return !!new url.URL(u)
-  } catch (_) {
-    return false
-  }
-}
-
-module.exports = regFetch
-function regFetch (uri, /* istanbul ignore next */ opts_ = {}) {
-  const opts = {
-    ...defaultOpts,
-    ...opts_,
-  }
-
-  // if we did not get a fully qualified URI, then we look at the registry
-  // config or relevant scope to resolve it.
-  const uriValid = urlIsValid(uri)
-  let registry = opts.registry || defaultOpts.registry
-  if (!uriValid) {
-    registry = opts.registry = (
-      (opts.spec && pickRegistry(opts.spec, opts)) ||
-      opts.registry ||
-      registry
-    )
-    uri = `${
-      registry.trim().replace(/\/?$/g, '')
-    }/${
-      uri.trim().replace(/^\//, '')
-    }`
-    // asserts that this is now valid
-    new url.URL(uri)
-  }
-
-  const method = opts.method || 'GET'
-
-  // through that takes into account the scope, the prefix of `uri`, etc
-  const startTime = Date.now()
-  const auth = getAuth(uri, opts)
-  const headers = getHeaders(uri, auth, opts)
-  let body = opts.body
-  const bodyIsStream = Minipass.isStream(body)
-  const bodyIsPromise = body &&
-    typeof body === 'object' &&
-    typeof body.then === 'function'
-
-  if (
-    body && !bodyIsStream && !bodyIsPromise && typeof body !== 'string' && !Buffer.isBuffer(body)
-  ) {
-    headers['content-type'] = headers['content-type'] || 'application/json'
-    body = JSON.stringify(body)
-  } else if (body && !headers['content-type']) {
-    headers['content-type'] = 'application/octet-stream'
-  }
-
-  if (opts.gzip) {
-    headers['content-encoding'] = 'gzip'
-    if (bodyIsStream) {
-      const gz = new zlib.Gzip()
-      body.on('error', /* istanbul ignore next: unlikely and hard to test */
-        err => gz.emit('error', err))
-      body = body.pipe(gz)
-    } else if (!bodyIsPromise) {
-      body = new zlib.Gzip().end(body).concat()
-    }
-  }
-
-  const parsed = new url.URL(uri)
-
-  if (opts.query) {
-    const q = typeof opts.query === 'string' ? qs.parse(opts.query)
-      : opts.query
-
-    Object.keys(q).forEach(key => {
-      if (q[key] !== undefined) {
-        parsed.searchParams.set(key, q[key])
-      }
-    })
-    uri = url.format(parsed)
-  }
-
-  if (parsed.searchParams.get('write') === 'true' && method === 'GET') {
-    // do not cache, because this GET is fetching a rev that will be
-    // used for a subsequent PUT or DELETE, so we need to conditionally
-    // update cache.
-    opts.offline = false
-    opts.preferOffline = false
-    opts.preferOnline = true
-  }
-
-  const doFetch = async fetchBody => {
-    const p = fetch(uri, {
-      agent: opts.agent,
-      algorithms: opts.algorithms,
-      body: fetchBody,
-      cache: getCacheMode(opts),
-      cachePath: opts.cache,
-      ca: opts.ca,
-      cert: auth.cert || opts.cert,
-      headers,
-      integrity: opts.integrity,
-      key: auth.key || opts.key,
-      localAddress: opts.localAddress,
-      maxSockets: opts.maxSockets,
-      memoize: opts.memoize,
-      method: method,
-      noProxy: opts.noProxy,
-      proxy: opts.httpsProxy || opts.proxy,
-      retry: opts.retry ? opts.retry : {
-        retries: opts.fetchRetries,
-        factor: opts.fetchRetryFactor,
-        minTimeout: opts.fetchRetryMintimeout,
-        maxTimeout: opts.fetchRetryMaxtimeout,
-      },
-      strictSSL: opts.strictSSL,
-      timeout: opts.timeout || 30 * 1000,
-    }).then(res => checkResponse({
-      method,
-      uri,
-      res,
-      registry,
-      startTime,
-      auth,
-      opts,
-    }))
-
-    if (typeof opts.otpPrompt === 'function') {
-      return p.catch(async er => {
-        if (er instanceof HttpErrorAuthOTP) {
-          let otp
-          // if otp fails to complete, we fail with that failure
-          try {
-            otp = await opts.otpPrompt()
-          } catch (_) {
-            // ignore this error
-          }
-          // if no otp provided, or otpPrompt errored, throw the original HTTP error
-          if (!otp) {
-            throw er
-          }
-          return regFetch(uri, { ...opts, otp })
-        }
-        throw er
-      })
-    } else {
-      return p
-    }
-  }
-
-  return Promise.resolve(body).then(doFetch)
-}
-
-module.exports.getAuth = getAuth
-
-module.exports.json = fetchJSON
-function fetchJSON (uri, opts) {
-  return regFetch(uri, opts).then(res => res.json())
-}
-
-module.exports.json.stream = fetchJSONStream
-function fetchJSONStream (uri, jsonPath,
-  /* istanbul ignore next */ opts_ = {}) {
-  const opts = { ...defaultOpts, ...opts_ }
-  const parser = JSONStream.parse(jsonPath, opts.mapJSON)
-  regFetch(uri, opts).then(res =>
-    res.body.on('error',
-      /* istanbul ignore next: unlikely and difficult to test */
-      er => parser.emit('error', er)).pipe(parser)
-  ).catch(er => parser.emit('error', er))
-  return parser
-}
-
-module.exports.pickRegistry = pickRegistry
-function pickRegistry (spec, opts = {}) {
-  spec = npa(spec)
-  let registry = spec.scope &&
-    opts[spec.scope.replace(/^@?/, '@') + ':registry']
-
-  if (!registry && opts.scope) {
-    registry = opts[opts.scope.replace(/^@?/, '@') + ':registry']
-  }
-
-  if (!registry) {
-    registry = opts.registry || defaultOpts.registry
-  }
-
-  return registry
-}
-
-function getCacheMode (opts) {
-  return opts.offline ? 'only-if-cached'
-    : opts.preferOffline ? 'force-cache'
-    : opts.preferOnline ? 'no-cache'
-    : 'default'
-}
-
-function getHeaders (uri, auth, opts) {
-  const headers = Object.assign({
-    'user-agent': opts.userAgent,
-  }, opts.headers || {})
-
-  if (opts.authType) {
-    headers['npm-auth-type'] = opts.authType
-  }
-
-  if (opts.scope) {
-    headers['npm-scope'] = opts.scope
-  }
-
-  if (opts.npmSession) {
-    headers['npm-session'] = opts.npmSession
-  }
-
-  if (opts.npmCommand) {
-    headers['npm-command'] = opts.npmCommand
-  }
-
-  // If a tarball is hosted on a different place than the manifest, only send
-  // credentials on `alwaysAuth`
-  if (auth.token) {
-    headers.authorization = `Bearer ${auth.token}`
-  } else if (auth.auth) {
-    headers.authorization = `Basic ${auth.auth}`
-  }
-
-  if (opts.otp) {
-    headers['npm-otp'] = opts.otp
-  }
-
-  return headers
-}
-
-module.exports.cleanUrl = require('./clean-url.js')
diff --git a/node_modules/npm/node_modules/npm-registry-fetch/package.json b/node_modules/npm/node_modules/npm-registry-fetch/package.json
deleted file mode 100644
index b715d52..0000000
--- a/node_modules/npm/node_modules/npm-registry-fetch/package.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-  "name": "npm-registry-fetch",
-  "version": "16.1.0",
-  "description": "Fetch-based http client for use with npm registry APIs",
-  "main": "lib",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "scripts": {
-    "eslint": "eslint",
-    "lint": "eslint \"**/*.js\"",
-    "lintfix": "npm run lint -- --fix",
-    "test": "tap",
-    "posttest": "npm run lint",
-    "npmclilint": "npmcli-lint",
-    "postsnap": "npm run lintfix --",
-    "postlint": "template-oss-check",
-    "snap": "tap",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-registry-fetch.git"
-  },
-  "keywords": [
-    "npm",
-    "registry",
-    "fetch"
-  ],
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "dependencies": {
-    "make-fetch-happen": "^13.0.0",
-    "minipass": "^7.0.2",
-    "minipass-fetch": "^3.0.0",
-    "minipass-json-stream": "^1.0.1",
-    "minizlib": "^2.1.2",
-    "npm-package-arg": "^11.0.0",
-    "proc-log": "^3.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.19.0",
-    "cacache": "^18.0.0",
-    "nock": "^13.2.4",
-    "require-inject": "^1.4.4",
-    "ssri": "^10.0.0",
-    "tap": "^16.0.1"
-  },
-  "tap": {
-    "check-coverage": true,
-    "test-ignore": "test[\\\\/](util|cache)[\\\\/]",
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.19.0",
-    "publish": "true"
-  }
-}
diff --git a/node_modules/npm/node_modules/npm-user-validate/LICENSE b/node_modules/npm/node_modules/npm-user-validate/LICENSE
deleted file mode 100644
index 79128b2..0000000
--- a/node_modules/npm/node_modules/npm-user-validate/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) Robert Kowalski
-All rights reserved.
-
-The BSD License
-
-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.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/npm-user-validate/lib/index.js b/node_modules/npm/node_modules/npm-user-validate/lib/index.js
deleted file mode 100644
index 379a31d..0000000
--- a/node_modules/npm/node_modules/npm-user-validate/lib/index.js
+++ /dev/null
@@ -1,61 +0,0 @@
-exports.email = email
-exports.pw = pw
-exports.username = username
-var requirements = exports.requirements = {
-  username: {
-    length: 'Name length must be less than or equal to 214 characters long',
-    lowerCase: 'Name must be lowercase',
-    urlSafe: 'Name may not contain non-url-safe chars',
-    dot: 'Name may not start with "."',
-    illegal: 'Name may not contain illegal character',
-  },
-  password: {},
-  email: {
-    length: 'Email length must be less then or equal to 254 characters long',
-    valid: 'Email must be an email address',
-  },
-}
-
-var illegalCharacterRe = new RegExp('([' + [
-  "'",
-].join() + '])')
-
-function username (un) {
-  if (un !== un.toLowerCase()) {
-    return new Error(requirements.username.lowerCase)
-  }
-
-  if (un !== encodeURIComponent(un)) {
-    return new Error(requirements.username.urlSafe)
-  }
-
-  if (un.charAt(0) === '.') {
-    return new Error(requirements.username.dot)
-  }
-
-  if (un.length > 214) {
-    return new Error(requirements.username.length)
-  }
-
-  var illegal = un.match(illegalCharacterRe)
-  if (illegal) {
-    return new Error(requirements.username.illegal + ' "' + illegal[0] + '"')
-  }
-
-  return null
-}
-
-function email (em) {
-  if (em.length > 254) {
-    return new Error(requirements.email.length)
-  }
-  if (!em.match(/^[^@]+@.+\..+$/)) {
-    return new Error(requirements.email.valid)
-  }
-
-  return null
-}
-
-function pw () {
-  return null
-}
diff --git a/node_modules/npm/node_modules/npm-user-validate/package.json b/node_modules/npm/node_modules/npm-user-validate/package.json
deleted file mode 100644
index 8cf48f8..0000000
--- a/node_modules/npm/node_modules/npm-user-validate/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "name": "npm-user-validate",
-  "version": "2.0.0",
-  "description": "User validations for npm",
-  "main": "lib/index.js",
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.1",
-    "@npmcli/template-oss": "4.11.0",
-    "tap": "^16.3.2"
-  },
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npm-user-validate.git"
-  },
-  "keywords": [
-    "npm",
-    "validation",
-    "registry"
-  ],
-  "author": "GitHub Inc.",
-  "license": "BSD-2-Clause",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.11.0"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/npmlog/LICENSE.md b/node_modules/npm/node_modules/npmlog/LICENSE.md
deleted file mode 100644
index 5fc208f..0000000
--- a/node_modules/npm/node_modules/npmlog/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-ISC License
-
-Copyright npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this
-software for any purpose with or without fee is hereby
-granted, provided that the above copyright notice and this
-permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/npmlog/lib/log.js b/node_modules/npm/node_modules/npmlog/lib/log.js
deleted file mode 100644
index 38106ea..0000000
--- a/node_modules/npm/node_modules/npmlog/lib/log.js
+++ /dev/null
@@ -1,400 +0,0 @@
-'use strict'
-var Progress = require('are-we-there-yet')
-var Gauge = require('gauge')
-var EE = require('events').EventEmitter
-var log = exports = module.exports = new EE()
-var util = require('util')
-
-var setBlocking = require('set-blocking')
-var consoleControl = require('console-control-strings')
-
-setBlocking(true)
-var stream = process.stderr
-Object.defineProperty(log, 'stream', {
-  set: function (newStream) {
-    stream = newStream
-    if (this.gauge) {
-      this.gauge.setWriteTo(stream, stream)
-    }
-  },
-  get: function () {
-    return stream
-  },
-})
-
-// by default, decide based on tty-ness.
-var colorEnabled
-log.useColor = function () {
-  return colorEnabled != null ? colorEnabled : stream.isTTY
-}
-
-log.enableColor = function () {
-  colorEnabled = true
-  this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled })
-}
-log.disableColor = function () {
-  colorEnabled = false
-  this.gauge.setTheme({ hasColor: colorEnabled, hasUnicode: unicodeEnabled })
-}
-
-// default level
-log.level = 'info'
-
-log.gauge = new Gauge(stream, {
-  enabled: false, // no progress bars unless asked
-  theme: { hasColor: log.useColor() },
-  template: [
-    { type: 'progressbar', length: 20 },
-    { type: 'activityIndicator', kerning: 1, length: 1 },
-    { type: 'section', default: '' },
-    ':',
-    { type: 'logline', kerning: 1, default: '' },
-  ],
-})
-
-log.tracker = new Progress.TrackerGroup()
-
-// we track this separately as we may need to temporarily disable the
-// display of the status bar for our own loggy purposes.
-log.progressEnabled = log.gauge.isEnabled()
-
-var unicodeEnabled
-
-log.enableUnicode = function () {
-  unicodeEnabled = true
-  this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled })
-}
-
-log.disableUnicode = function () {
-  unicodeEnabled = false
-  this.gauge.setTheme({ hasColor: this.useColor(), hasUnicode: unicodeEnabled })
-}
-
-log.setGaugeThemeset = function (themes) {
-  this.gauge.setThemeset(themes)
-}
-
-log.setGaugeTemplate = function (template) {
-  this.gauge.setTemplate(template)
-}
-
-log.enableProgress = function () {
-  if (this.progressEnabled || this._paused) {
-    return
-  }
-
-  this.progressEnabled = true
-  this.tracker.on('change', this.showProgress)
-  this.gauge.enable()
-}
-
-log.disableProgress = function () {
-  if (!this.progressEnabled) {
-    return
-  }
-  this.progressEnabled = false
-  this.tracker.removeListener('change', this.showProgress)
-  this.gauge.disable()
-}
-
-var trackerConstructors = ['newGroup', 'newItem', 'newStream']
-
-var mixinLog = function (tracker) {
-  // mixin the public methods from log into the tracker
-  // (except: conflicts and one's we handle specially)
-  Object.keys(log).forEach(function (P) {
-    if (P[0] === '_') {
-      return
-    }
-
-    if (trackerConstructors.filter(function (C) {
-      return C === P
-    }).length) {
-      return
-    }
-
-    if (tracker[P]) {
-      return
-    }
-
-    if (typeof log[P] !== 'function') {
-      return
-    }
-
-    var func = log[P]
-    tracker[P] = function () {
-      return func.apply(log, arguments)
-    }
-  })
-  // if the new tracker is a group, make sure any subtrackers get
-  // mixed in too
-  if (tracker instanceof Progress.TrackerGroup) {
-    trackerConstructors.forEach(function (C) {
-      var func = tracker[C]
-      tracker[C] = function () {
-        return mixinLog(func.apply(tracker, arguments))
-      }
-    })
-  }
-  return tracker
-}
-
-// Add tracker constructors to the top level log object
-trackerConstructors.forEach(function (C) {
-  log[C] = function () {
-    return mixinLog(this.tracker[C].apply(this.tracker, arguments))
-  }
-})
-
-log.clearProgress = function (cb) {
-  if (!this.progressEnabled) {
-    return cb && process.nextTick(cb)
-  }
-
-  this.gauge.hide(cb)
-}
-
-log.showProgress = function (name, completed) {
-  if (!this.progressEnabled) {
-    return
-  }
-
-  var values = {}
-  if (name) {
-    values.section = name
-  }
-
-  var last = log.record[log.record.length - 1]
-  if (last) {
-    values.subsection = last.prefix
-    var disp = log.disp[last.level] || last.level
-    var logline = this._format(disp, log.style[last.level])
-    if (last.prefix) {
-      logline += ' ' + this._format(last.prefix, this.prefixStyle)
-    }
-
-    logline += ' ' + last.message.split(/\r?\n/)[0]
-    values.logline = logline
-  }
-  values.completed = completed || this.tracker.completed()
-  this.gauge.show(values)
-}.bind(log) // bind for use in tracker's on-change listener
-
-// temporarily stop emitting, but don't drop
-log.pause = function () {
-  this._paused = true
-  if (this.progressEnabled) {
-    this.gauge.disable()
-  }
-}
-
-log.resume = function () {
-  if (!this._paused) {
-    return
-  }
-
-  this._paused = false
-
-  var b = this._buffer
-  this._buffer = []
-  b.forEach(function (m) {
-    this.emitLog(m)
-  }, this)
-  if (this.progressEnabled) {
-    this.gauge.enable()
-  }
-}
-
-log._buffer = []
-
-var id = 0
-log.record = []
-log.maxRecordSize = 10000
-log.log = function (lvl, prefix, message) {
-  var l = this.levels[lvl]
-  if (l === undefined) {
-    return this.emit('error', new Error(util.format(
-      'Undefined log level: %j', lvl)))
-  }
-
-  var a = new Array(arguments.length - 2)
-  var stack = null
-  for (var i = 2; i < arguments.length; i++) {
-    var arg = a[i - 2] = arguments[i]
-
-    // resolve stack traces to a plain string.
-    if (typeof arg === 'object' && arg instanceof Error && arg.stack) {
-      Object.defineProperty(arg, 'stack', {
-        value: stack = arg.stack + '',
-        enumerable: true,
-        writable: true,
-      })
-    }
-  }
-  if (stack) {
-    a.unshift(stack + '\n')
-  }
-  message = util.format.apply(util, a)
-
-  var m = {
-    id: id++,
-    level: lvl,
-    prefix: String(prefix || ''),
-    message: message,
-    messageRaw: a,
-  }
-
-  this.emit('log', m)
-  this.emit('log.' + lvl, m)
-  if (m.prefix) {
-    this.emit(m.prefix, m)
-  }
-
-  this.record.push(m)
-  var mrs = this.maxRecordSize
-  var n = this.record.length - mrs
-  if (n > mrs / 10) {
-    var newSize = Math.floor(mrs * 0.9)
-    this.record = this.record.slice(-1 * newSize)
-  }
-
-  this.emitLog(m)
-}.bind(log)
-
-log.emitLog = function (m) {
-  if (this._paused) {
-    this._buffer.push(m)
-    return
-  }
-  if (this.progressEnabled) {
-    this.gauge.pulse(m.prefix)
-  }
-
-  var l = this.levels[m.level]
-  if (l === undefined) {
-    return
-  }
-
-  if (l < this.levels[this.level]) {
-    return
-  }
-
-  if (l > 0 && !isFinite(l)) {
-    return
-  }
-
-  // If 'disp' is null or undefined, use the lvl as a default
-  // Allows: '', 0 as valid disp
-  var disp = log.disp[m.level] != null ? log.disp[m.level] : m.level
-  this.clearProgress()
-  m.message.split(/\r?\n/).forEach(function (line) {
-    var heading = this.heading
-    if (heading) {
-      this.write(heading, this.headingStyle)
-      this.write(' ')
-    }
-    this.write(disp, log.style[m.level])
-    var p = m.prefix || ''
-    if (p) {
-      this.write(' ')
-    }
-
-    this.write(p, this.prefixStyle)
-    this.write(' ' + line + '\n')
-  }, this)
-  this.showProgress()
-}
-
-log._format = function (msg, style) {
-  if (!stream) {
-    return
-  }
-
-  var output = ''
-  if (this.useColor()) {
-    style = style || {}
-    var settings = []
-    if (style.fg) {
-      settings.push(style.fg)
-    }
-
-    if (style.bg) {
-      settings.push('bg' + style.bg[0].toUpperCase() + style.bg.slice(1))
-    }
-
-    if (style.bold) {
-      settings.push('bold')
-    }
-
-    if (style.underline) {
-      settings.push('underline')
-    }
-
-    if (style.inverse) {
-      settings.push('inverse')
-    }
-
-    if (settings.length) {
-      output += consoleControl.color(settings)
-    }
-
-    if (style.beep) {
-      output += consoleControl.beep()
-    }
-  }
-  output += msg
-  if (this.useColor()) {
-    output += consoleControl.color('reset')
-  }
-
-  return output
-}
-
-log.write = function (msg, style) {
-  if (!stream) {
-    return
-  }
-
-  stream.write(this._format(msg, style))
-}
-
-log.addLevel = function (lvl, n, style, disp) {
-  // If 'disp' is null or undefined, use the lvl as a default
-  if (disp == null) {
-    disp = lvl
-  }
-
-  this.levels[lvl] = n
-  this.style[lvl] = style
-  if (!this[lvl]) {
-    this[lvl] = function () {
-      var a = new Array(arguments.length + 1)
-      a[0] = lvl
-      for (var i = 0; i < arguments.length; i++) {
-        a[i + 1] = arguments[i]
-      }
-
-      return this.log.apply(this, a)
-    }.bind(this)
-  }
-  this.disp[lvl] = disp
-}
-
-log.prefixStyle = { fg: 'magenta' }
-log.headingStyle = { fg: 'white', bg: 'black' }
-
-log.style = {}
-log.levels = {}
-log.disp = {}
-log.addLevel('silly', -Infinity, { inverse: true }, 'sill')
-log.addLevel('verbose', 1000, { fg: 'cyan', bg: 'black' }, 'verb')
-log.addLevel('info', 2000, { fg: 'green' })
-log.addLevel('timing', 2500, { fg: 'green', bg: 'black' })
-log.addLevel('http', 3000, { fg: 'green', bg: 'black' })
-log.addLevel('notice', 3500, { fg: 'cyan', bg: 'black' })
-log.addLevel('warn', 4000, { fg: 'black', bg: 'yellow' }, 'WARN')
-log.addLevel('error', 5000, { fg: 'red', bg: 'black' }, 'ERR!')
-log.addLevel('silent', Infinity)
-
-// allow 'error' prefix
-log.on('error', function () {})
diff --git a/node_modules/npm/node_modules/npmlog/package.json b/node_modules/npm/node_modules/npmlog/package.json
deleted file mode 100644
index dbcc772..0000000
--- a/node_modules/npm/node_modules/npmlog/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-  "author": "GitHub Inc.",
-  "name": "npmlog",
-  "description": "logger for npm",
-  "version": "7.0.1",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/npmlog.git"
-  },
-  "main": "lib/log.js",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "scripts": {
-    "test": "tap",
-    "npmclilint": "npmcli-lint",
-    "lint": "eslint \"**/*.js\"",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "postsnap": "npm run lintfix --",
-    "postlint": "template-oss-check",
-    "snap": "tap",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "dependencies": {
-    "are-we-there-yet": "^4.0.0",
-    "console-control-strings": "^1.1.0",
-    "gauge": "^5.0.0",
-    "set-blocking": "^2.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.6.1",
-    "tap": "^16.0.1"
-  },
-  "license": "ISC",
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "tap": {
-    "branches": 95,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.6.1"
-  }
-}
diff --git a/node_modules/npm/node_modules/p-map/index.js b/node_modules/npm/node_modules/p-map/index.js
deleted file mode 100644
index c11a285..0000000
--- a/node_modules/npm/node_modules/p-map/index.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-const AggregateError = require('aggregate-error');
-
-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 (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) {
-			throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
-		}
-
-		const result = [];
-		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 index = currentIndex;
-			currentIndex++;
-
-			if (nextItem.done) {
-				isIterableDone = true;
-
-				if (resolvingCount === 0) {
-					if (!stopOnError && errors.length !== 0) {
-						reject(new AggregateError(errors));
-					} else {
-						resolve(result);
-					}
-				}
-
-				return;
-			}
-
-			resolvingCount++;
-
-			(async () => {
-				try {
-					const element = await nextItem.value;
-					result[index] = await mapper(element, index);
-					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;
-			}
-		}
-	});
-};
diff --git a/node_modules/npm/node_modules/p-map/license b/node_modules/npm/node_modules/p-map/license
deleted file mode 100644
index fa7ceba..0000000
--- a/node_modules/npm/node_modules/p-map/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus  (https://sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/p-map/package.json b/node_modules/npm/node_modules/p-map/package.json
deleted file mode 100644
index 042b1af..0000000
--- a/node_modules/npm/node_modules/p-map/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-	"name": "p-map",
-	"version": "4.0.0",
-	"description": "Map over promises concurrently",
-	"license": "MIT",
-	"repository": "sindresorhus/p-map",
-	"funding": "https://github.com/sponsors/sindresorhus",
-	"author": {
-		"name": "Sindre Sorhus",
-		"email": "sindresorhus@gmail.com",
-		"url": "https://sindresorhus.com"
-	},
-	"engines": {
-		"node": ">=10"
-	},
-	"scripts": {
-		"test": "xo && ava && tsd"
-	},
-	"files": [
-		"index.js",
-		"index.d.ts"
-	],
-	"keywords": [
-		"promise",
-		"map",
-		"resolved",
-		"wait",
-		"collection",
-		"iterable",
-		"iterator",
-		"race",
-		"fulfilled",
-		"async",
-		"await",
-		"promises",
-		"concurrently",
-		"concurrency",
-		"parallel",
-		"bluebird"
-	],
-	"dependencies": {
-		"aggregate-error": "^3.0.0"
-	},
-	"devDependencies": {
-		"ava": "^2.2.0",
-		"delay": "^4.1.0",
-		"in-range": "^2.0.0",
-		"random-int": "^2.0.0",
-		"time-span": "^3.1.0",
-		"tsd": "^0.7.4",
-		"xo": "^0.27.2"
-	}
-}
diff --git a/node_modules/npm/node_modules/pacote/LICENSE b/node_modules/npm/node_modules/pacote/LICENSE
deleted file mode 100644
index a03cd0e..0000000
--- a/node_modules/npm/node_modules/pacote/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter, Kat Marchán, npm, Inc., and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/pacote/README.md b/node_modules/npm/node_modules/pacote/README.md
deleted file mode 100644
index 17c027d..0000000
--- a/node_modules/npm/node_modules/pacote/README.md
+++ /dev/null
@@ -1,285 +0,0 @@
-# pacote
-
-Fetches package manifests and tarballs from the npm registry.
-
-## USAGE
-
-```js
-const pacote = require('pacote')
-
-// get a package manifest
-pacote.manifest('foo@1.x').then(manifest => console.log('got it', manifest))
-
-// extract a package into a folder
-pacote.extract('github:npm/cli', 'some/path', options)
-  .then(({from, resolved, integrity}) => {
-    console.log('extracted!', from, resolved, integrity)
-  })
-
-pacote.tarball('https://server.com/package.tgz').then(data => {
-  console.log('got ' + data.length + ' bytes of tarball data')
-})
-```
-
-`pacote` works with any kind of package specifier that npm can install.  If
-you can pass it to the npm CLI, you can pass it to pacote.  (In fact, that's
-exactly what the npm CLI does.)
-
-Anything that you can do with one kind of package, you can do with another.
-
-Data that isn't relevant (like a packument for a tarball) will be
-simulated.
-
-`prepare` scripts will be run when generating tarballs from `git` and
-`directory` locations, to simulate what _would_ be published to the
-registry, so that you get a working package instead of just raw source
-code that might need to be transpiled.
-
-## CLI
-
-This module exports a command line interface that can do most of what is
-described below.  Run `pacote -h` to learn more.
-
-```
-Pacote - The JavaScript Package Handler, v10.1.1
-
-Usage:
-
-  pacote resolve 
-    Resolve a specifier and output the fully resolved target
-    Returns integrity and from if '--long' flag is set.
-
-  pacote manifest 
-    Fetch a manifest and print to stdout
-
-  pacote packument 
-    Fetch a full packument and print to stdout
-
-  pacote tarball  []
-    Fetch a package tarball and save to 
-    If  is missing or '-', the tarball will be streamed to stdout.
-
-  pacote extract  
-    Extract a package to the destination folder.
-
-Configuration values all match the names of configs passed to npm, or
-options passed to Pacote.  Additional flags for this executable:
-
-  --long     Print an object from 'resolve', including integrity and spec.
-  --json     Print result objects as JSON rather than node's default.
-             (This is the default if stdout is not a TTY.)
-  --help -h  Print this helpful text.
-
-For example '--cache=/path/to/folder' will use that folder as the cache.
-```
-
-## API
-
-The `spec` refers to any kind of package specifier that npm can install.
-If you can pass it to the npm CLI, you can pass it to pacote.  (In fact,
-that's exactly what the npm CLI does.)
-
-See below for valid `opts` values.
-
-* `pacote.resolve(spec, opts)` Resolve a specifier like `foo@latest` or
-  `github:user/project` all the way to a tarball url, tarball file, or git
-  repo with commit hash.
-
-* `pacote.extract(spec, dest, opts)` Extract a package's tarball into a
-  destination folder.  Returns a promise that resolves to the
-  `{from,resolved,integrity}` of the extracted package.
-
-* `pacote.manifest(spec, opts)` Fetch (or simulate) a package's manifest
-  (basically, the `package.json` file, plus a bit of metadata).
-  See below for more on manifests and packuments.  Returns a Promise that
-  resolves to the manifest object.
-
-* `pacote.packument(spec, opts)` Fetch (or simulate) a package's packument
-  (basically, the top-level package document listing all the manifests that
-  the registry returns).  See below for more on manifests and packuments.
-  Returns a Promise that resolves to the packument object.
-
-* `pacote.tarball(spec, opts)`  Get a package tarball data as a buffer in
-  memory.  Returns a Promise that resolves to the tarball data Buffer, with
-  `from`, `resolved`, and `integrity` fields attached.
-
-* `pacote.tarball.file(spec, dest, opts)`  Save a package tarball data to
-  a file on disk.  Returns a Promise that resolves to
-  `{from,integrity,resolved}` of the fetched tarball.
-
-* `pacote.tarball.stream(spec, streamHandler, opts)`  Fetch a tarball and
-  make the stream available to the `streamHandler` function.
-
-    This is mostly an internal function, but it is exposed because it does
-    provide some functionality that may be difficult to achieve otherwise.
-
-    The `streamHandler` function MUST return a Promise that resolves when
-    the stream (and all associated work) is ended, or rejects if the stream
-    has an error.
-
-    The `streamHandler` function MAY be called multiple times, as Pacote
-    retries requests in some scenarios, such as cache corruption or
-    retriable network failures.
-
-### Options
-
-Options are passed to
-[`npm-registry-fetch`](http://npm.im/npm-registry-fetch) and
-[`cacache`](http://npm.im/cacache), so in addition to these, anything for
-those modules can be given to pacote as well.
-
-Options object is cloned, and mutated along the way to add integrity,
-resolved, and other properties, as they are determined.
-
-* `cache` Where to store cache entries and temp files.  Passed to
-  [`cacache`](http://npm.im/cacache).  Defaults to the same cache directory
-  that npm will use by default, based on platform and environment.
-* `where` Base folder for resolving relative `file:` dependencies.
-* `resolved` Shortcut for looking up resolved values.  Should be specified
-  if known.
-* `integrity` Expected integrity of fetched package tarball.  If specified,
-  tarballs with mismatched integrity values will raise an `EINTEGRITY`
-  error.
-* `umask` Permission mode mask for extracted files and directories.
-  Defaults to `0o22`.  See "Extracted File Modes" below.
-* `fmode` Minimum permission mode for extracted files.  Defaults to
-  `0o666`.  See "Extracted File Modes" below.
-* `dmode` Minimum permission mode for extracted directories.  Defaults to
-  `0o777`.  See "Extracted File Modes" below.
-* `preferOnline` Prefer to revalidate cache entries, even when it would not
-  be strictly necessary.  Default `false`.
-* `before` When picking a manifest from a packument, only consider
-  packages published before the specified date.  Default `null`.
-* `defaultTag` The default `dist-tag` to use when choosing a manifest from a
-  packument.  Defaults to `latest`.
-* `registry` The npm registry to use by default.  Defaults to
-  `https://registry.npmjs.org/`.
-* `fullMetadata` Fetch the full metadata from the registry for packuments,
-  including information not strictly required for installation (author,
-  description, etc.)  Defaults to `true` when `before` is set, since the
-  version publish time is part of the extended packument metadata.
-* `fullReadJson` Use the slower `read-package-json` package insted of
-  `read-package-json-fast` in order to include extra fields like "readme" in
-  the manifest. Defaults to `false`.
-* `packumentCache` For registry packuments only, you may provide a `Map`
-  object which will be used to cache packument requests between pacote
-  calls.  This allows you to easily avoid hitting the registry multiple
-  times (even just to validate the cache) for a given packument, since it
-  is unlikely to change in the span of a single command.
-* `silent` A boolean that determines whether the banner is displayed
-  when calling `@npmcli/run-script`.
-* `verifySignatures` A boolean that will make pacote verify the
-    integrity signature of a manifest, if present.  There must be a
-    configured `_keys` entry in the config that is scoped to the
-    registry the manifest is being fetched from.
-* `verifyAttestations` A boolean that will make pacote verify Sigstore
-    attestations, if present. There must be a configured `_keys` entry in the
-    config that is scoped to the registry the manifest is being fetched from.
-* `tufCache` Where to store metadata/target files when retrieving the package
-  attestation key material via TUF. Defaults to the same cache directory that
-  npm will use by default, based on platform and environment.
-
-### Advanced API
-
-Each different type of fetcher is exposed for more advanced usage such as
-using helper methods from this classes:
-
-* `DirFetcher`
-* `FileFetcher`
-* `GitFetcher`
-* `RegistryFetcher`
-* `RemoteFetcher`
-
-## Extracted File Modes
-
-Files are extracted with a mode matching the following formula:
-
-```
-( (tarball entry mode value) | (minimum mode option) ) ~ (umask)
-```
-
-This is in order to prevent unreadable files or unlistable directories from
-cluttering a project's `node_modules` folder, even if the package tarball
-specifies that the file should be inaccessible.
-
-It also prevents files from being group- or world-writable without explicit
-opt-in by the user, because all file and directory modes are masked against
-the `umask` value.
-
-So, a file which is `0o771` in the tarball, using the default `fmode` of
-`0o666` and `umask` of `0o22`, will result in a file mode of `0o755`:
-
-```
-(0o771 | 0o666) => 0o777
-(0o777 ~ 0o22) => 0o755
-```
-
-In almost every case, the defaults are appropriate.  To respect exactly
-what is in the package tarball (even if this makes an unusable system), set
-both `dmode` and `fmode` options to `0`.  Otherwise, the `umask` config
-should be used in most cases where file mode modifications are required,
-and this functions more or less the same as the `umask` value in most Unix
-systems.
-
-## Extracted File Ownership
-
-When running as `root` on Unix systems, all extracted files and folders
-will have their owning `uid` and `gid` values set to match the ownership
-of the containing folder.
-
-This prevents `root`-owned files showing up in a project's `node_modules`
-folder when a user runs `sudo npm install`.
-
-## Manifests
-
-A `manifest` is similar to a `package.json` file.  However, it has a few
-pieces of extra metadata, and sometimes lacks metadata that is inessential
-to package installation.
-
-In addition to the common `package.json` fields, manifests include:
-
-* `manifest._resolved` The tarball url or file path where the package
-  artifact can be found.
-* `manifest._from` A normalized form of the spec passed in as an argument.
-* `manifest._integrity` The integrity value for the package artifact.
-* `manifest._id` The canonical spec of this package version: name@version.
-* `manifest.dist` Registry manifests (those included in a packument) have a
-  `dist` object.  Only `tarball` is required, though at least one of
-  `shasum` or `integrity` is almost always present.
-
-    * `tarball` The url to the associated package artifact.  (Copied by
-      Pacote to `manifest._resolved`.)
-    * `integrity` The integrity SRI string for the artifact.  This may not
-      be present for older packages on the npm registry.  (Copied by Pacote
-      to `manifest._integrity`.)
-    * `shasum` Legacy integrity value.  Hexadecimal-encoded sha1 hash.
-      (Converted to an SRI string and copied by Pacote to
-      `manifest._integrity` when `dist.integrity` is not present.)
-    * `fileCount` Number of files in the tarball.
-    * `unpackedSize` Size on disk of the package when unpacked.
-    * `signatures` Signatures of the shasum.  Includes the keyid that
-        correlates to a [`key from the npm
-        registry`](https://registry.npmjs.org/-/npm/v1/keys)
-
-## Packuments
-
-A packument is the top-level package document that lists the set of
-manifests for available versions for a package.
-
-When a packument is fetched with `accept:
-application/vnd.npm.install-v1+json` in the HTTP headers, only the most
-minimum necessary metadata is returned.  Additional metadata is returned
-when fetched with only `accept: application/json`.
-
-For Pacote's purposes, the following fields are relevant:
-
-* `versions` An object where each key is a version, and each value is the
-  manifest for that version.
-* `dist-tags` An object mapping dist-tags to version numbers.  This is how
-  `foo@latest` gets turned into `foo@1.2.3`.
-* `time` In the full packument, an object mapping version numbers to
-  publication times, for the `opts.before` functionality.
-
-Pacote adds the following field, regardless of the accept header:
-
-* `_contentLength` The size of the packument.
diff --git a/node_modules/npm/node_modules/pacote/lib/bin.js b/node_modules/npm/node_modules/pacote/lib/bin.js
deleted file mode 100755
index f35b62c..0000000
--- a/node_modules/npm/node_modules/pacote/lib/bin.js
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/usr/bin/env node
-
-const run = conf => {
-  const pacote = require('../')
-  switch (conf._[0]) {
-    case 'resolve':
-    case 'manifest':
-    case 'packument':
-      if (conf._[0] === 'resolve' && conf.long) {
-        return pacote.manifest(conf._[1], conf).then(mani => ({
-          resolved: mani._resolved,
-          integrity: mani._integrity,
-          from: mani._from,
-        }))
-      }
-      return pacote[conf._[0]](conf._[1], conf)
-
-    case 'tarball':
-      if (!conf._[2] || conf._[2] === '-') {
-        return pacote.tarball.stream(conf._[1], stream => {
-          stream.pipe(
-            conf.testStdout ||
-            /* istanbul ignore next */
-            process.stdout
-          )
-          // make sure it resolves something falsey
-          return stream.promise().then(() => {
-            return false
-          })
-        }, conf)
-      } else {
-        return pacote.tarball.file(conf._[1], conf._[2], conf)
-      }
-
-    case 'extract':
-      return pacote.extract(conf._[1], conf._[2], conf)
-
-    default: /* istanbul ignore next */ {
-      throw new Error(`bad command: ${conf._[0]}`)
-    }
-  }
-}
-
-const version = require('../package.json').version
-const usage = () =>
-`Pacote - The JavaScript Package Handler, v${version}
-
-Usage:
-
-  pacote resolve 
-    Resolve a specifier and output the fully resolved target
-    Returns integrity and from if '--long' flag is set.
-
-  pacote manifest 
-    Fetch a manifest and print to stdout
-
-  pacote packument 
-    Fetch a full packument and print to stdout
-
-  pacote tarball  []
-    Fetch a package tarball and save to 
-    If  is missing or '-', the tarball will be streamed to stdout.
-
-  pacote extract  
-    Extract a package to the destination folder.
-
-Configuration values all match the names of configs passed to npm, or
-options passed to Pacote.  Additional flags for this executable:
-
-  --long     Print an object from 'resolve', including integrity and spec.
-  --json     Print result objects as JSON rather than node's default.
-             (This is the default if stdout is not a TTY.)
-  --help -h  Print this helpful text.
-
-For example '--cache=/path/to/folder' will use that folder as the cache.
-`
-
-const shouldJSON = (conf, result) =>
-  conf.json ||
-  !process.stdout.isTTY &&
-  conf.json === undefined &&
-  result &&
-  typeof result === 'object'
-
-const pretty = (conf, result) =>
-  shouldJSON(conf, result) ? JSON.stringify(result, 0, 2) : result
-
-let addedLogListener = false
-const main = args => {
-  const conf = parse(args)
-  if (conf.help || conf.h) {
-    return console.log(usage())
-  }
-
-  if (!addedLogListener) {
-    process.on('log', console.error)
-    addedLogListener = true
-  }
-
-  try {
-    return run(conf)
-      .then(result => result && console.log(pretty(conf, result)))
-      .catch(er => {
-        console.error(er)
-        process.exit(1)
-      })
-  } catch (er) {
-    console.error(er.message)
-    console.error(usage())
-  }
-}
-
-const parseArg = arg => {
-  const split = arg.slice(2).split('=')
-  const k = split.shift()
-  const v = split.join('=')
-  const no = /^no-/.test(k) && !v
-  const key = (no ? k.slice(3) : k)
-    .replace(/^tag$/, 'defaultTag')
-    .replace(/-([a-z])/g, (_, c) => c.toUpperCase())
-  const value = v ? v.replace(/^~/, process.env.HOME) : !no
-  return { key, value }
-}
-
-const parse = args => {
-  const conf = {
-    _: [],
-    cache: process.env.HOME + '/.npm/_cacache',
-  }
-  let dashdash = false
-  args.forEach(arg => {
-    if (dashdash) {
-      conf._.push(arg)
-    } else if (arg === '--') {
-      dashdash = true
-    } else if (arg === '-h') {
-      conf.help = true
-    } else if (/^--/.test(arg)) {
-      const { key, value } = parseArg(arg)
-      conf[key] = value
-    } else {
-      conf._.push(arg)
-    }
-  })
-  return conf
-}
-
-if (module === require.main) {
-  main(process.argv.slice(2))
-} else {
-  module.exports = {
-    main,
-    run,
-    usage,
-    parseArg,
-    parse,
-  }
-}
diff --git a/node_modules/npm/node_modules/pacote/lib/dir.js b/node_modules/npm/node_modules/pacote/lib/dir.js
deleted file mode 100644
index 420afc5..0000000
--- a/node_modules/npm/node_modules/pacote/lib/dir.js
+++ /dev/null
@@ -1,108 +0,0 @@
-const Fetcher = require('./fetcher.js')
-const FileFetcher = require('./file.js')
-const { Minipass } = require('minipass')
-const tarCreateOptions = require('./util/tar-create-options.js')
-const packlist = require('npm-packlist')
-const tar = require('tar')
-const _prepareDir = Symbol('_prepareDir')
-const { resolve } = require('path')
-const _readPackageJson = Symbol.for('package.Fetcher._readPackageJson')
-
-const runScript = require('@npmcli/run-script')
-
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-class DirFetcher extends Fetcher {
-  constructor (spec, opts) {
-    super(spec, opts)
-    // just the fully resolved filename
-    this.resolved = this.spec.fetchSpec
-
-    this.tree = opts.tree || null
-    this.Arborist = opts.Arborist || null
-  }
-
-  // exposes tarCreateOptions as public API
-  static tarCreateOptions (manifest) {
-    return tarCreateOptions(manifest)
-  }
-
-  get types () {
-    return ['directory']
-  }
-
-  [_prepareDir] () {
-    return this.manifest().then(mani => {
-      if (!mani.scripts || !mani.scripts.prepare) {
-        return
-      }
-
-      // we *only* run prepare.
-      // pre/post-pack is run by the npm CLI for publish and pack,
-      // but this function is *also* run when installing git deps
-      const stdio = this.opts.foregroundScripts ? 'inherit' : 'pipe'
-
-      // hide the banner if silent opt is passed in, or if prepare running
-      // in the background.
-      const banner = this.opts.silent ? false : stdio === 'inherit'
-
-      return runScript({
-        pkg: mani,
-        event: 'prepare',
-        path: this.resolved,
-        stdio,
-        banner,
-        env: {
-          npm_package_resolved: this.resolved,
-          npm_package_integrity: this.integrity,
-          npm_package_json: resolve(this.resolved, 'package.json'),
-        },
-      })
-    })
-  }
-
-  [_tarballFromResolved] () {
-    if (!this.tree && !this.Arborist) {
-      throw new Error('DirFetcher requires either a tree or an Arborist constructor to pack')
-    }
-
-    const stream = new Minipass()
-    stream.resolved = this.resolved
-    stream.integrity = this.integrity
-
-    const { prefix, workspaces } = this.opts
-
-    // run the prepare script, get the list of files, and tar it up
-    // pipe to the stream, and proxy errors the chain.
-    this[_prepareDir]()
-      .then(async () => {
-        if (!this.tree) {
-          const arb = new this.Arborist({ path: this.resolved })
-          this.tree = await arb.loadActual()
-        }
-        return packlist(this.tree, { path: this.resolved, prefix, workspaces })
-      })
-      .then(files => tar.c(tarCreateOptions(this.package), files)
-        .on('error', er => stream.emit('error', er)).pipe(stream))
-      .catch(er => stream.emit('error', er))
-    return stream
-  }
-
-  manifest () {
-    if (this.package) {
-      return Promise.resolve(this.package)
-    }
-
-    return this[_readPackageJson](this.resolved + '/package.json')
-      .then(mani => this.package = {
-        ...mani,
-        _integrity: this.integrity && String(this.integrity),
-        _resolved: this.resolved,
-        _from: this.from,
-      })
-  }
-
-  packument () {
-    return FileFetcher.prototype.packument.apply(this)
-  }
-}
-module.exports = DirFetcher
diff --git a/node_modules/npm/node_modules/pacote/lib/fetcher.js b/node_modules/npm/node_modules/pacote/lib/fetcher.js
deleted file mode 100644
index f961a45..0000000
--- a/node_modules/npm/node_modules/pacote/lib/fetcher.js
+++ /dev/null
@@ -1,505 +0,0 @@
-// This is the base class that the other fetcher types in lib
-// all descend from.
-// It handles the unpacking and retry logic that is shared among
-// all of the other Fetcher types.
-
-const npa = require('npm-package-arg')
-const ssri = require('ssri')
-const { promisify } = require('util')
-const { basename, dirname } = require('path')
-const tar = require('tar')
-const log = require('proc-log')
-const retry = require('promise-retry')
-const fs = require('fs/promises')
-const fsm = require('fs-minipass')
-const cacache = require('cacache')
-const isPackageBin = require('./util/is-package-bin.js')
-const removeTrailingSlashes = require('./util/trailing-slashes.js')
-const getContents = require('@npmcli/installed-package-contents')
-const readPackageJsonFast = require('read-package-json-fast')
-const readPackageJson = promisify(require('read-package-json'))
-const { Minipass } = require('minipass')
-
-const cacheDir = require('./util/cache-dir.js')
-
-// Private methods.
-// Child classes should not have to override these.
-// Users should never call them.
-const _extract = Symbol('_extract')
-const _mkdir = Symbol('_mkdir')
-const _empty = Symbol('_empty')
-const _toFile = Symbol('_toFile')
-const _tarxOptions = Symbol('_tarxOptions')
-const _entryMode = Symbol('_entryMode')
-const _istream = Symbol('_istream')
-const _assertType = Symbol('_assertType')
-const _tarballFromCache = Symbol('_tarballFromCache')
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-const _cacheFetches = Symbol.for('pacote.Fetcher._cacheFetches')
-const _readPackageJson = Symbol.for('package.Fetcher._readPackageJson')
-
-class FetcherBase {
-  constructor (spec, opts) {
-    if (!opts || typeof opts !== 'object') {
-      throw new TypeError('options object is required')
-    }
-    this.spec = npa(spec, opts.where)
-
-    this.allowGitIgnore = !!opts.allowGitIgnore
-
-    // a bit redundant because presumably the caller already knows this,
-    // but it makes it easier to not have to keep track of the requested
-    // spec when we're dispatching thousands of these at once, and normalizing
-    // is nice.  saveSpec is preferred if set, because it turns stuff like
-    // x/y#committish into github:x/y#committish.  use name@rawSpec for
-    // registry deps so that we turn xyz and xyz@ -> xyz@
-    this.from = this.spec.registry
-      ? `${this.spec.name}@${this.spec.rawSpec}` : this.spec.saveSpec
-
-    this[_assertType]()
-    // clone the opts object so that others aren't upset when we mutate it
-    // by adding/modifying the integrity value.
-    this.opts = { ...opts }
-
-    this.cache = opts.cache || cacheDir().cacache
-    this.tufCache = opts.tufCache || cacheDir().tufcache
-    this.resolved = opts.resolved || null
-
-    // default to caching/verifying with sha512, that's what we usually have
-    // need to change this default, or start overriding it, when sha512
-    // is no longer strong enough.
-    this.defaultIntegrityAlgorithm = opts.defaultIntegrityAlgorithm || 'sha512'
-
-    if (typeof opts.integrity === 'string') {
-      this.opts.integrity = ssri.parse(opts.integrity)
-    }
-
-    this.package = null
-    this.type = this.constructor.name
-    this.fmode = opts.fmode || 0o666
-    this.dmode = opts.dmode || 0o777
-    // we don't need a default umask, because we don't chmod files coming
-    // out of package tarballs.  they're forced to have a mode that is
-    // valid, regardless of what's in the tarball entry, and then we let
-    // the process's umask setting do its job.  but if configured, we do
-    // respect it.
-    this.umask = opts.umask || 0
-
-    this.preferOnline = !!opts.preferOnline
-    this.preferOffline = !!opts.preferOffline
-    this.offline = !!opts.offline
-
-    this.before = opts.before
-    this.fullMetadata = this.before ? true : !!opts.fullMetadata
-    this.fullReadJson = !!opts.fullReadJson
-    if (this.fullReadJson) {
-      this[_readPackageJson] = readPackageJson
-    } else {
-      this[_readPackageJson] = readPackageJsonFast
-    }
-
-    // rrh is a registry hostname or 'never' or 'always'
-    // defaults to registry.npmjs.org
-    this.replaceRegistryHost = (!opts.replaceRegistryHost || opts.replaceRegistryHost === 'npmjs') ?
-      'registry.npmjs.org' : opts.replaceRegistryHost
-
-    this.defaultTag = opts.defaultTag || 'latest'
-    this.registry = removeTrailingSlashes(opts.registry || 'https://registry.npmjs.org')
-
-    // command to run 'prepare' scripts on directories and git dirs
-    // To use pacote with yarn, for example, set npmBin to 'yarn'
-    // and npmCliConfig with yarn's equivalents.
-    this.npmBin = opts.npmBin || 'npm'
-
-    // command to install deps for preparing
-    this.npmInstallCmd = opts.npmInstallCmd || ['install', '--force']
-
-    // XXX fill more of this in based on what we know from this.opts
-    // we explicitly DO NOT fill in --tag, though, since we are often
-    // going to be packing in the context of a publish, which may set
-    // a dist-tag, but certainly wants to keep defaulting to latest.
-    this.npmCliConfig = opts.npmCliConfig || [
-      `--cache=${dirname(this.cache)}`,
-      `--prefer-offline=${!!this.preferOffline}`,
-      `--prefer-online=${!!this.preferOnline}`,
-      `--offline=${!!this.offline}`,
-      ...(this.before ? [`--before=${this.before.toISOString()}`] : []),
-      '--no-progress',
-      '--no-save',
-      '--no-audit',
-      // override any omit settings from the environment
-      '--include=dev',
-      '--include=peer',
-      '--include=optional',
-      // we need the actual things, not just the lockfile
-      '--no-package-lock-only',
-      '--no-dry-run',
-    ]
-  }
-
-  get integrity () {
-    return this.opts.integrity || null
-  }
-
-  set integrity (i) {
-    if (!i) {
-      return
-    }
-
-    i = ssri.parse(i)
-    const current = this.opts.integrity
-
-    // do not ever update an existing hash value, but do
-    // merge in NEW algos and hashes that we don't already have.
-    if (current) {
-      current.merge(i)
-    } else {
-      this.opts.integrity = i
-    }
-  }
-
-  get notImplementedError () {
-    return new Error('not implemented in this fetcher type: ' + this.type)
-  }
-
-  // override in child classes
-  // Returns a Promise that resolves to this.resolved string value
-  resolve () {
-    return this.resolved ? Promise.resolve(this.resolved)
-      : Promise.reject(this.notImplementedError)
-  }
-
-  packument () {
-    return Promise.reject(this.notImplementedError)
-  }
-
-  // override in child class
-  // returns a manifest containing:
-  // - name
-  // - version
-  // - _resolved
-  // - _integrity
-  // - plus whatever else was in there (corgi, full metadata, or pj file)
-  manifest () {
-    return Promise.reject(this.notImplementedError)
-  }
-
-  // private, should be overridden.
-  // Note that they should *not* calculate or check integrity or cache,
-  // but *just*  return the raw tarball data stream.
-  [_tarballFromResolved] () {
-    throw this.notImplementedError
-  }
-
-  // public, should not be overridden
-  tarball () {
-    return this.tarballStream(stream => stream.concat().then(data => {
-      data.integrity = this.integrity && String(this.integrity)
-      data.resolved = this.resolved
-      data.from = this.from
-      return data
-    }))
-  }
-
-  // private
-  // Note: cacache will raise a EINTEGRITY error if the integrity doesn't match
-  [_tarballFromCache] () {
-    return cacache.get.stream.byDigest(this.cache, this.integrity, this.opts)
-  }
-
-  get [_cacheFetches] () {
-    return true
-  }
-
-  [_istream] (stream) {
-    // if not caching this, just return it
-    if (!this.opts.cache || !this[_cacheFetches]) {
-      // instead of creating a new integrity stream, we only piggyback on the
-      // provided stream's events
-      if (stream.hasIntegrityEmitter) {
-        stream.on('integrity', i => this.integrity = i)
-        return stream
-      }
-
-      const istream = ssri.integrityStream(this.opts)
-      istream.on('integrity', i => this.integrity = i)
-      stream.on('error', err => istream.emit('error', err))
-      return stream.pipe(istream)
-    }
-
-    // we have to return a stream that gets ALL the data, and proxies errors,
-    // but then pipe from the original tarball stream into the cache as well.
-    // To do this without losing any data, and since the cacache put stream
-    // is not a passthrough, we have to pipe from the original stream into
-    // the cache AFTER we pipe into the middleStream.  Since the cache stream
-    // has an asynchronous flush to write its contents to disk, we need to
-    // defer the middleStream end until the cache stream ends.
-    const middleStream = new Minipass()
-    stream.on('error', err => middleStream.emit('error', err))
-    stream.pipe(middleStream, { end: false })
-    const cstream = cacache.put.stream(
-      this.opts.cache,
-      `pacote:tarball:${this.from}`,
-      this.opts
-    )
-    cstream.on('integrity', i => this.integrity = i)
-    cstream.on('error', err => stream.emit('error', err))
-    stream.pipe(cstream)
-
-    // eslint-disable-next-line promise/catch-or-return
-    cstream.promise().catch(() => {}).then(() => middleStream.end())
-    return middleStream
-  }
-
-  pickIntegrityAlgorithm () {
-    return this.integrity ? this.integrity.pickAlgorithm(this.opts)
-      : this.defaultIntegrityAlgorithm
-  }
-
-  // TODO: check error class, once those are rolled out to our deps
-  isDataCorruptionError (er) {
-    return er.code === 'EINTEGRITY' || er.code === 'Z_DATA_ERROR'
-  }
-
-  // override the types getter
-  get types () {
-    return false
-  }
-
-  [_assertType] () {
-    if (this.types && !this.types.includes(this.spec.type)) {
-      throw new TypeError(`Wrong spec type (${
-        this.spec.type
-      }) for ${
-        this.constructor.name
-      }. Supported types: ${this.types.join(', ')}`)
-    }
-  }
-
-  // We allow ENOENTs from cacache, but not anywhere else.
-  // An ENOENT trying to read a tgz file, for example, is Right Out.
-  isRetriableError (er) {
-    // TODO: check error class, once those are rolled out to our deps
-    return this.isDataCorruptionError(er) ||
-      er.code === 'ENOENT' ||
-      er.code === 'EISDIR'
-  }
-
-  // Mostly internal, but has some uses
-  // Pass in a function which returns a promise
-  // Function will be called 1 or more times with streams that may fail.
-  // Retries:
-  // Function MUST handle errors on the stream by rejecting the promise,
-  // so that retry logic can pick it up and either retry or fail whatever
-  // promise it was making (ie, failing extraction, etc.)
-  //
-  // The return value of this method is a Promise that resolves the same
-  // as whatever the streamHandler resolves to.
-  //
-  // This should never be overridden by child classes, but it is public.
-  tarballStream (streamHandler) {
-    // Only short-circuit via cache if we have everything else we'll need,
-    // and the user has not expressed a preference for checking online.
-
-    const fromCache = (
-      !this.preferOnline &&
-      this.integrity &&
-      this.resolved
-    ) ? streamHandler(this[_tarballFromCache]()).catch(er => {
-        if (this.isDataCorruptionError(er)) {
-          log.warn('tarball', `cached data for ${
-          this.spec
-        } (${this.integrity}) seems to be corrupted. Refreshing cache.`)
-          return this.cleanupCached().then(() => {
-            throw er
-          })
-        } else {
-          throw er
-        }
-      }) : null
-
-    const fromResolved = er => {
-      if (er) {
-        if (!this.isRetriableError(er)) {
-          throw er
-        }
-        log.silly('tarball', `no local data for ${
-          this.spec
-        }. Extracting by manifest.`)
-      }
-      return this.resolve().then(() => retry(tryAgain =>
-        streamHandler(this[_istream](this[_tarballFromResolved]()))
-          .catch(streamErr => {
-          // Most likely data integrity.  A cache ENOENT error is unlikely
-          // here, since we're definitely not reading from the cache, but it
-          // IS possible that the fetch subsystem accessed the cache, and the
-          // entry got blown away or something.  Try one more time to be sure.
-            if (this.isRetriableError(streamErr)) {
-              log.warn('tarball', `tarball data for ${
-              this.spec
-            } (${this.integrity}) seems to be corrupted. Trying again.`)
-              return this.cleanupCached().then(() => tryAgain(streamErr))
-            }
-            throw streamErr
-          }), { retries: 1, minTimeout: 0, maxTimeout: 0 }))
-    }
-
-    return fromCache ? fromCache.catch(fromResolved) : fromResolved()
-  }
-
-  cleanupCached () {
-    return cacache.rm.content(this.cache, this.integrity, this.opts)
-  }
-
-  [_empty] (path) {
-    return getContents({ path, depth: 1 }).then(contents => Promise.all(
-      contents.map(entry => fs.rm(entry, { recursive: true, force: true }))))
-  }
-
-  async [_mkdir] (dest) {
-    await this[_empty](dest)
-    return await fs.mkdir(dest, { recursive: true })
-  }
-
-  // extraction is always the same.  the only difference is where
-  // the tarball comes from.
-  async extract (dest) {
-    await this[_mkdir](dest)
-    return this.tarballStream((tarball) => this[_extract](dest, tarball))
-  }
-
-  [_toFile] (dest) {
-    return this.tarballStream(str => new Promise((res, rej) => {
-      const writer = new fsm.WriteStream(dest)
-      str.on('error', er => writer.emit('error', er))
-      writer.on('error', er => rej(er))
-      writer.on('close', () => res({
-        integrity: this.integrity && String(this.integrity),
-        resolved: this.resolved,
-        from: this.from,
-      }))
-      str.pipe(writer)
-    }))
-  }
-
-  // don't use this[_mkdir] because we don't want to rimraf anything
-  async tarballFile (dest) {
-    const dir = dirname(dest)
-    await fs.mkdir(dir, { recursive: true })
-    return this[_toFile](dest)
-  }
-
-  [_extract] (dest, tarball) {
-    const extractor = tar.x(this[_tarxOptions]({ cwd: dest }))
-    const p = new Promise((resolve, reject) => {
-      extractor.on('end', () => {
-        resolve({
-          resolved: this.resolved,
-          integrity: this.integrity && String(this.integrity),
-          from: this.from,
-        })
-      })
-
-      extractor.on('error', er => {
-        log.warn('tar', er.message)
-        log.silly('tar', er)
-        reject(er)
-      })
-
-      tarball.on('error', er => reject(er))
-    })
-
-    tarball.pipe(extractor)
-    return p
-  }
-
-  // always ensure that entries are at least as permissive as our configured
-  // dmode/fmode, but never more permissive than the umask allows.
-  [_entryMode] (path, mode, type) {
-    const m = /Directory|GNUDumpDir/.test(type) ? this.dmode
-      : /File$/.test(type) ? this.fmode
-      : /* istanbul ignore next - should never happen in a pkg */ 0
-
-    // make sure package bins are executable
-    const exe = isPackageBin(this.package, path) ? 0o111 : 0
-    // always ensure that files are read/writable by the owner
-    return ((mode | m) & ~this.umask) | exe | 0o600
-  }
-
-  [_tarxOptions] ({ cwd }) {
-    const sawIgnores = new Set()
-    return {
-      cwd,
-      noChmod: true,
-      noMtime: true,
-      filter: (name, entry) => {
-        if (/Link$/.test(entry.type)) {
-          return false
-        }
-        entry.mode = this[_entryMode](entry.path, entry.mode, entry.type)
-        // this replicates the npm pack behavior where .gitignore files
-        // are treated like .npmignore files, but only if a .npmignore
-        // file is not present.
-        if (/File$/.test(entry.type)) {
-          const base = basename(entry.path)
-          if (base === '.npmignore') {
-            sawIgnores.add(entry.path)
-          } else if (base === '.gitignore' && !this.allowGitIgnore) {
-            // rename, but only if there's not already a .npmignore
-            const ni = entry.path.replace(/\.gitignore$/, '.npmignore')
-            if (sawIgnores.has(ni)) {
-              return false
-            }
-            entry.path = ni
-          }
-          return true
-        }
-      },
-      strip: 1,
-      onwarn: /* istanbul ignore next - we can trust that tar logs */
-      (code, msg, data) => {
-        log.warn('tar', code, msg)
-        log.silly('tar', code, msg, data)
-      },
-      umask: this.umask,
-      // always ignore ownership info from tarball metadata
-      preserveOwner: false,
-    }
-  }
-}
-
-module.exports = FetcherBase
-
-// Child classes
-const GitFetcher = require('./git.js')
-const RegistryFetcher = require('./registry.js')
-const FileFetcher = require('./file.js')
-const DirFetcher = require('./dir.js')
-const RemoteFetcher = require('./remote.js')
-
-// Get an appropriate fetcher object from a spec and options
-FetcherBase.get = (rawSpec, opts = {}) => {
-  const spec = npa(rawSpec, opts.where)
-  switch (spec.type) {
-    case 'git':
-      return new GitFetcher(spec, opts)
-
-    case 'remote':
-      return new RemoteFetcher(spec, opts)
-
-    case 'version':
-    case 'range':
-    case 'tag':
-    case 'alias':
-      return new RegistryFetcher(spec.subSpec || spec, opts)
-
-    case 'file':
-      return new FileFetcher(spec, opts)
-
-    case 'directory':
-      return new DirFetcher(spec, opts)
-
-    default:
-      throw new TypeError('Unknown spec type: ' + spec.type)
-  }
-}
diff --git a/node_modules/npm/node_modules/pacote/lib/file.js b/node_modules/npm/node_modules/pacote/lib/file.js
deleted file mode 100644
index bf99bb8..0000000
--- a/node_modules/npm/node_modules/pacote/lib/file.js
+++ /dev/null
@@ -1,96 +0,0 @@
-const Fetcher = require('./fetcher.js')
-const fsm = require('fs-minipass')
-const cacache = require('cacache')
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-const _exeBins = Symbol('_exeBins')
-const { resolve } = require('path')
-const fs = require('fs')
-const _readPackageJson = Symbol.for('package.Fetcher._readPackageJson')
-
-class FileFetcher extends Fetcher {
-  constructor (spec, opts) {
-    super(spec, opts)
-    // just the fully resolved filename
-    this.resolved = this.spec.fetchSpec
-  }
-
-  get types () {
-    return ['file']
-  }
-
-  manifest () {
-    if (this.package) {
-      return Promise.resolve(this.package)
-    }
-
-    // have to unpack the tarball for this.
-    return cacache.tmp.withTmp(this.cache, this.opts, dir =>
-      this.extract(dir)
-        .then(() => this[_readPackageJson](dir + '/package.json'))
-        .then(mani => this.package = {
-          ...mani,
-          _integrity: this.integrity && String(this.integrity),
-          _resolved: this.resolved,
-          _from: this.from,
-        }))
-  }
-
-  [_exeBins] (pkg, dest) {
-    if (!pkg.bin) {
-      return Promise.resolve()
-    }
-
-    return Promise.all(Object.keys(pkg.bin).map(k => new Promise(res => {
-      const script = resolve(dest, pkg.bin[k])
-      // Best effort.  Ignore errors here, the only result is that
-      // a bin script is not executable.  But if it's missing or
-      // something, we just leave it for a later stage to trip over
-      // when we can provide a more useful contextual error.
-      fs.stat(script, (er, st) => {
-        if (er) {
-          return res()
-        }
-        const mode = st.mode | 0o111
-        if (mode === st.mode) {
-          return res()
-        }
-        fs.chmod(script, mode, res)
-      })
-    })))
-  }
-
-  extract (dest) {
-    // if we've already loaded the manifest, then the super got it.
-    // but if not, read the unpacked manifest and chmod properly.
-    return super.extract(dest)
-      .then(result => this.package ? result
-      : this[_readPackageJson](dest + '/package.json').then(pkg =>
-        this[_exeBins](pkg, dest)).then(() => result))
-  }
-
-  [_tarballFromResolved] () {
-    // create a read stream and return it
-    return new fsm.ReadStream(this.resolved)
-  }
-
-  packument () {
-    // simulate based on manifest
-    return this.manifest().then(mani => ({
-      name: mani.name,
-      'dist-tags': {
-        [this.defaultTag]: mani.version,
-      },
-      versions: {
-        [mani.version]: {
-          ...mani,
-          dist: {
-            tarball: `file:${this.resolved}`,
-            integrity: this.integrity && String(this.integrity),
-          },
-        },
-      },
-    }))
-  }
-}
-
-module.exports = FileFetcher
diff --git a/node_modules/npm/node_modules/pacote/lib/git.js b/node_modules/npm/node_modules/pacote/lib/git.js
deleted file mode 100644
index 5d24f72..0000000
--- a/node_modules/npm/node_modules/pacote/lib/git.js
+++ /dev/null
@@ -1,327 +0,0 @@
-const Fetcher = require('./fetcher.js')
-const FileFetcher = require('./file.js')
-const RemoteFetcher = require('./remote.js')
-const DirFetcher = require('./dir.js')
-const hashre = /^[a-f0-9]{40}$/
-const git = require('@npmcli/git')
-const pickManifest = require('npm-pick-manifest')
-const npa = require('npm-package-arg')
-const { Minipass } = require('minipass')
-const cacache = require('cacache')
-const log = require('proc-log')
-const npm = require('./util/npm.js')
-
-const _resolvedFromRepo = Symbol('_resolvedFromRepo')
-const _resolvedFromHosted = Symbol('_resolvedFromHosted')
-const _resolvedFromClone = Symbol('_resolvedFromClone')
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-const _addGitSha = Symbol('_addGitSha')
-const addGitSha = require('./util/add-git-sha.js')
-const _clone = Symbol('_clone')
-const _cloneHosted = Symbol('_cloneHosted')
-const _cloneRepo = Symbol('_cloneRepo')
-const _setResolvedWithSha = Symbol('_setResolvedWithSha')
-const _prepareDir = Symbol('_prepareDir')
-const _readPackageJson = Symbol.for('package.Fetcher._readPackageJson')
-
-// get the repository url.
-// prefer https if there's auth, since ssh will drop that.
-// otherwise, prefer ssh if available (more secure).
-// We have to add the git+ back because npa suppresses it.
-const repoUrl = (h, opts) =>
-  h.sshurl && !(h.https && h.auth) && addGitPlus(h.sshurl(opts)) ||
-  h.https && addGitPlus(h.https(opts))
-
-// add git+ to the url, but only one time.
-const addGitPlus = url => url && `git+${url}`.replace(/^(git\+)+/, 'git+')
-
-class GitFetcher extends Fetcher {
-  constructor (spec, opts) {
-    super(spec, opts)
-
-    // we never want to compare integrity for git dependencies: npm/rfcs#525
-    if (this.opts.integrity) {
-      delete this.opts.integrity
-      log.warn(`skipping integrity check for git dependency ${this.spec.fetchSpec}`)
-    }
-
-    this.resolvedRef = null
-    if (this.spec.hosted) {
-      this.from = this.spec.hosted.shortcut({ noCommittish: false })
-    }
-
-    // shortcut: avoid full clone when we can go straight to the tgz
-    // if we have the full sha and it's a hosted git platform
-    if (this.spec.gitCommittish && hashre.test(this.spec.gitCommittish)) {
-      this.resolvedSha = this.spec.gitCommittish
-      // use hosted.tarball() when we shell to RemoteFetcher later
-      this.resolved = this.spec.hosted
-        ? repoUrl(this.spec.hosted, { noCommittish: false })
-        : this.spec.rawSpec
-    } else {
-      this.resolvedSha = ''
-    }
-
-    this.Arborist = opts.Arborist || null
-  }
-
-  // just exposed to make it easier to test all the combinations
-  static repoUrl (hosted, opts) {
-    return repoUrl(hosted, opts)
-  }
-
-  get types () {
-    return ['git']
-  }
-
-  resolve () {
-    // likely a hosted git repo with a sha, so get the tarball url
-    // but in general, no reason to resolve() more than necessary!
-    if (this.resolved) {
-      return super.resolve()
-    }
-
-    // fetch the git repo and then look at the current hash
-    const h = this.spec.hosted
-    // try to use ssh, fall back to git.
-    return h ? this[_resolvedFromHosted](h)
-      : this[_resolvedFromRepo](this.spec.fetchSpec)
-  }
-
-  // first try https, since that's faster and passphrase-less for
-  // public repos, and supports private repos when auth is provided.
-  // Fall back to SSH to support private repos
-  // NB: we always store the https url in resolved field if auth
-  // is present, otherwise ssh if the hosted type provides it
-  [_resolvedFromHosted] (hosted) {
-    return this[_resolvedFromRepo](hosted.https && hosted.https())
-      .catch(er => {
-        // Throw early since we know pathspec errors will fail again if retried
-        if (er instanceof git.errors.GitPathspecError) {
-          throw er
-        }
-        const ssh = hosted.sshurl && hosted.sshurl()
-        // no fallthrough if we can't fall through or have https auth
-        if (!ssh || hosted.auth) {
-          throw er
-        }
-        return this[_resolvedFromRepo](ssh)
-      })
-  }
-
-  [_resolvedFromRepo] (gitRemote) {
-    // XXX make this a custom error class
-    if (!gitRemote) {
-      return Promise.reject(new Error(`No git url for ${this.spec}`))
-    }
-    const gitRange = this.spec.gitRange
-    const name = this.spec.name
-    return git.revs(gitRemote, this.opts).then(remoteRefs => {
-      return gitRange ? pickManifest({
-        versions: remoteRefs.versions,
-        'dist-tags': remoteRefs['dist-tags'],
-        name,
-      }, gitRange, this.opts)
-        : this.spec.gitCommittish ?
-          remoteRefs.refs[this.spec.gitCommittish] ||
-          remoteRefs.refs[remoteRefs.shas[this.spec.gitCommittish]]
-          : remoteRefs.refs.HEAD // no git committish, get default head
-    }).then(revDoc => {
-      // the committish provided isn't in the rev list
-      // things like HEAD~3 or @yesterday can land here.
-      if (!revDoc || !revDoc.sha) {
-        return this[_resolvedFromClone]()
-      }
-
-      this.resolvedRef = revDoc
-      this.resolvedSha = revDoc.sha
-      this[_addGitSha](revDoc.sha)
-      return this.resolved
-    })
-  }
-
-  [_setResolvedWithSha] (withSha) {
-    // we haven't cloned, so a tgz download is still faster
-    // of course, if it's not a known host, we can't do that.
-    this.resolved = !this.spec.hosted ? withSha
-      : repoUrl(npa(withSha).hosted, { noCommittish: false })
-  }
-
-  // when we get the git sha, we affix it to our spec to build up
-  // either a git url with a hash, or a tarball download URL
-  [_addGitSha] (sha) {
-    this[_setResolvedWithSha](addGitSha(this.spec, sha))
-  }
-
-  [_resolvedFromClone] () {
-    // do a full or shallow clone, then look at the HEAD
-    // kind of wasteful, but no other option, really
-    return this[_clone](dir => this.resolved)
-  }
-
-  [_prepareDir] (dir) {
-    return this[_readPackageJson](dir + '/package.json').then(mani => {
-      // no need if we aren't going to do any preparation.
-      const scripts = mani.scripts
-      if (!mani.workspaces && (!scripts || !(
-        scripts.postinstall ||
-          scripts.build ||
-          scripts.preinstall ||
-          scripts.install ||
-          scripts.prepack ||
-          scripts.prepare))) {
-        return
-      }
-
-      // to avoid cases where we have an cycle of git deps that depend
-      // on one another, we only ever do preparation for one instance
-      // of a given git dep along the chain of installations.
-      // Note that this does mean that a dependency MAY in theory end up
-      // trying to run its prepare script using a dependency that has not
-      // been properly prepared itself, but that edge case is smaller
-      // and less hazardous than a fork bomb of npm and git commands.
-      const noPrepare = !process.env._PACOTE_NO_PREPARE_ ? []
-        : process.env._PACOTE_NO_PREPARE_.split('\n')
-      if (noPrepare.includes(this.resolved)) {
-        log.info('prepare', 'skip prepare, already seen', this.resolved)
-        return
-      }
-      noPrepare.push(this.resolved)
-
-      // the DirFetcher will do its own preparation to run the prepare scripts
-      // All we have to do is put the deps in place so that it can succeed.
-      return npm(
-        this.npmBin,
-        [].concat(this.npmInstallCmd).concat(this.npmCliConfig),
-        dir,
-        { ...process.env, _PACOTE_NO_PREPARE_: noPrepare.join('\n') },
-        { message: 'git dep preparation failed' }
-      )
-    })
-  }
-
-  [_tarballFromResolved] () {
-    const stream = new Minipass()
-    stream.resolved = this.resolved
-    stream.from = this.from
-
-    // check it out and then shell out to the DirFetcher tarball packer
-    this[_clone](dir => this[_prepareDir](dir)
-      .then(() => new Promise((res, rej) => {
-        if (!this.Arborist) {
-          throw new Error('GitFetcher requires an Arborist constructor to pack a tarball')
-        }
-        const df = new DirFetcher(`file:${dir}`, {
-          ...this.opts,
-          Arborist: this.Arborist,
-          resolved: null,
-          integrity: null,
-        })
-        const dirStream = df[_tarballFromResolved]()
-        dirStream.on('error', rej)
-        dirStream.on('end', res)
-        dirStream.pipe(stream)
-      }))).catch(
-      /* istanbul ignore next: very unlikely and hard to test */
-      er => stream.emit('error', er)
-    )
-    return stream
-  }
-
-  // clone a git repo into a temp folder (or fetch and unpack if possible)
-  // handler accepts a directory, and returns a promise that resolves
-  // when we're done with it, at which point, cacache deletes it
-  //
-  // TODO: after cloning, create a tarball of the folder, and add to the cache
-  // with cacache.put.stream(), using a key that's deterministic based on the
-  // spec and repo, so that we don't ever clone the same thing multiple times.
-  [_clone] (handler, tarballOk = true) {
-    const o = { tmpPrefix: 'git-clone' }
-    const ref = this.resolvedSha || this.spec.gitCommittish
-    const h = this.spec.hosted
-    const resolved = this.resolved
-
-    // can be set manually to false to fall back to actual git clone
-    tarballOk = tarballOk &&
-      h && resolved === repoUrl(h, { noCommittish: false }) && h.tarball
-
-    return cacache.tmp.withTmp(this.cache, o, async tmp => {
-      // if we're resolved, and have a tarball url, shell out to RemoteFetcher
-      if (tarballOk) {
-        const nameat = this.spec.name ? `${this.spec.name}@` : ''
-        return new RemoteFetcher(h.tarball({ noCommittish: false }), {
-          ...this.opts,
-          allowGitIgnore: true,
-          pkgid: `git:${nameat}${this.resolved}`,
-          resolved: this.resolved,
-          integrity: null, // it'll always be different, if we have one
-        }).extract(tmp).then(() => handler(tmp), er => {
-          // fall back to ssh download if tarball fails
-          if (er.constructor.name.match(/^Http/)) {
-            return this[_clone](handler, false)
-          } else {
-            throw er
-          }
-        })
-      }
-
-      const sha = await (
-        h ? this[_cloneHosted](ref, tmp)
-        : this[_cloneRepo](this.spec.fetchSpec, ref, tmp)
-      )
-      this.resolvedSha = sha
-      if (!this.resolved) {
-        await this[_addGitSha](sha)
-      }
-      return handler(tmp)
-    })
-  }
-
-  // first try https, since that's faster and passphrase-less for
-  // public repos, and supports private repos when auth is provided.
-  // Fall back to SSH to support private repos
-  // NB: we always store the https url in resolved field if auth
-  // is present, otherwise ssh if the hosted type provides it
-  [_cloneHosted] (ref, tmp) {
-    const hosted = this.spec.hosted
-    return this[_cloneRepo](hosted.https({ noCommittish: true }), ref, tmp)
-      .catch(er => {
-        // Throw early since we know pathspec errors will fail again if retried
-        if (er instanceof git.errors.GitPathspecError) {
-          throw er
-        }
-        const ssh = hosted.sshurl && hosted.sshurl({ noCommittish: true })
-        // no fallthrough if we can't fall through or have https auth
-        if (!ssh || hosted.auth) {
-          throw er
-        }
-        return this[_cloneRepo](ssh, ref, tmp)
-      })
-  }
-
-  [_cloneRepo] (repo, ref, tmp) {
-    const { opts, spec } = this
-    return git.clone(repo, ref, tmp, { ...opts, spec })
-  }
-
-  manifest () {
-    if (this.package) {
-      return Promise.resolve(this.package)
-    }
-
-    return this.spec.hosted && this.resolved
-      ? FileFetcher.prototype.manifest.apply(this)
-      : this[_clone](dir =>
-        this[_readPackageJson](dir + '/package.json')
-          .then(mani => this.package = {
-            ...mani,
-            _resolved: this.resolved,
-            _from: this.from,
-          }))
-  }
-
-  packument () {
-    return FileFetcher.prototype.packument.apply(this)
-  }
-}
-module.exports = GitFetcher
diff --git a/node_modules/npm/node_modules/pacote/lib/index.js b/node_modules/npm/node_modules/pacote/lib/index.js
deleted file mode 100644
index cbcbd7c..0000000
--- a/node_modules/npm/node_modules/pacote/lib/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const { get } = require('./fetcher.js')
-const GitFetcher = require('./git.js')
-const RegistryFetcher = require('./registry.js')
-const FileFetcher = require('./file.js')
-const DirFetcher = require('./dir.js')
-const RemoteFetcher = require('./remote.js')
-
-module.exports = {
-  GitFetcher,
-  RegistryFetcher,
-  FileFetcher,
-  DirFetcher,
-  RemoteFetcher,
-  resolve: (spec, opts) => get(spec, opts).resolve(),
-  extract: (spec, dest, opts) => get(spec, opts).extract(dest),
-  manifest: (spec, opts) => get(spec, opts).manifest(),
-  tarball: (spec, opts) => get(spec, opts).tarball(),
-  packument: (spec, opts) => get(spec, opts).packument(),
-}
-module.exports.tarball.stream = (spec, handler, opts) =>
-  get(spec, opts).tarballStream(handler)
-module.exports.tarball.file = (spec, dest, opts) =>
-  get(spec, opts).tarballFile(dest)
diff --git a/node_modules/npm/node_modules/pacote/lib/registry.js b/node_modules/npm/node_modules/pacote/lib/registry.js
deleted file mode 100644
index 0e83edf..0000000
--- a/node_modules/npm/node_modules/pacote/lib/registry.js
+++ /dev/null
@@ -1,368 +0,0 @@
-const Fetcher = require('./fetcher.js')
-const RemoteFetcher = require('./remote.js')
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-const pacoteVersion = require('../package.json').version
-const removeTrailingSlashes = require('./util/trailing-slashes.js')
-const rpj = require('read-package-json-fast')
-const pickManifest = require('npm-pick-manifest')
-const ssri = require('ssri')
-const crypto = require('crypto')
-const npa = require('npm-package-arg')
-const sigstore = require('sigstore')
-
-// Corgis are cute. 🐕🐶
-const corgiDoc = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'
-const fullDoc = 'application/json'
-
-// Some really old packages have no time field in their packument so we need a
-// cutoff date.
-const MISSING_TIME_CUTOFF = '2015-01-01T00:00:00.000Z'
-
-const fetch = require('npm-registry-fetch')
-
-const _headers = Symbol('_headers')
-class RegistryFetcher extends Fetcher {
-  constructor (spec, opts) {
-    super(spec, opts)
-
-    // you usually don't want to fetch the same packument multiple times in
-    // the span of a given script or command, no matter how many pacote calls
-    // are made, so this lets us avoid doing that.  It's only relevant for
-    // registry fetchers, because other types simulate their packument from
-    // the manifest, which they memoize on this.package, so it's very cheap
-    // already.
-    this.packumentCache = this.opts.packumentCache || null
-
-    this.registry = fetch.pickRegistry(spec, opts)
-    this.packumentUrl = removeTrailingSlashes(this.registry) + '/' +
-      this.spec.escapedName
-
-    const parsed = new URL(this.registry)
-    const regKey = `//${parsed.host}${parsed.pathname}`
-    // unlike the nerf-darted auth keys, this one does *not* allow a mismatch
-    // of trailing slashes.  It must match exactly.
-    if (this.opts[`${regKey}:_keys`]) {
-      this.registryKeys = this.opts[`${regKey}:_keys`]
-    }
-
-    // XXX pacote <=9 has some logic to ignore opts.resolved if
-    // the resolved URL doesn't go to the same registry.
-    // Consider reproducing that here, to throw away this.resolved
-    // in that case.
-  }
-
-  async resolve () {
-    // fetching the manifest sets resolved and (if present) integrity
-    await this.manifest()
-    if (!this.resolved) {
-      throw Object.assign(
-        new Error('Invalid package manifest: no `dist.tarball` field'),
-        { package: this.spec.toString() }
-      )
-    }
-    return this.resolved
-  }
-
-  [_headers] () {
-    return {
-      // npm will override UA, but ensure that we always send *something*
-      'user-agent': this.opts.userAgent ||
-        `pacote/${pacoteVersion} node/${process.version}`,
-      ...(this.opts.headers || {}),
-      'pacote-version': pacoteVersion,
-      'pacote-req-type': 'packument',
-      'pacote-pkg-id': `registry:${this.spec.name}`,
-      accept: this.fullMetadata ? fullDoc : corgiDoc,
-    }
-  }
-
-  async packument () {
-    // note this might be either an in-flight promise for a request,
-    // or the actual packument, but we never want to make more than
-    // one request at a time for the same thing regardless.
-    if (this.packumentCache && this.packumentCache.has(this.packumentUrl)) {
-      return this.packumentCache.get(this.packumentUrl)
-    }
-
-    // npm-registry-fetch the packument
-    // set the appropriate header for corgis if fullMetadata isn't set
-    // return the res.json() promise
-    try {
-      const res = await fetch(this.packumentUrl, {
-        ...this.opts,
-        headers: this[_headers](),
-        spec: this.spec,
-        // never check integrity for packuments themselves
-        integrity: null,
-      })
-      const packument = await res.json()
-      packument._contentLength = +res.headers.get('content-length')
-      if (this.packumentCache) {
-        this.packumentCache.set(this.packumentUrl, packument)
-      }
-      return packument
-    } catch (err) {
-      if (this.packumentCache) {
-        this.packumentCache.delete(this.packumentUrl)
-      }
-      if (err.code !== 'E404' || this.fullMetadata) {
-        throw err
-      }
-      // possible that corgis are not supported by this registry
-      this.fullMetadata = true
-      return this.packument()
-    }
-  }
-
-  async manifest () {
-    if (this.package) {
-      return this.package
-    }
-
-    // When verifying signatures, we need to fetch the full/uncompressed
-    // packument to get publish time as this is not included in the
-    // corgi/compressed packument.
-    if (this.opts.verifySignatures) {
-      this.fullMetadata = true
-    }
-
-    const packument = await this.packument()
-    let mani = await pickManifest(packument, this.spec.fetchSpec, {
-      ...this.opts,
-      defaultTag: this.defaultTag,
-      before: this.before,
-    })
-    mani = rpj.normalize(mani)
-    /* XXX add ETARGET and E403 revalidation of cached packuments here */
-
-    // add _time from packument if fetched with fullMetadata
-    const time = packument.time?.[mani.version]
-    if (time) {
-      mani._time = time
-    }
-
-    // add _resolved and _integrity from dist object
-    const { dist } = mani
-    if (dist) {
-      this.resolved = mani._resolved = dist.tarball
-      mani._from = this.from
-      const distIntegrity = dist.integrity ? ssri.parse(dist.integrity)
-        : dist.shasum ? ssri.fromHex(dist.shasum, 'sha1', { ...this.opts })
-        : null
-      if (distIntegrity) {
-        if (this.integrity && !this.integrity.match(distIntegrity)) {
-          // only bork if they have algos in common.
-          // otherwise we end up breaking if we have saved a sha512
-          // previously for the tarball, but the manifest only
-          // provides a sha1, which is possible for older publishes.
-          // Otherwise, this is almost certainly a case of holding it
-          // wrong, and will result in weird or insecure behavior
-          // later on when building package tree.
-          for (const algo of Object.keys(this.integrity)) {
-            if (distIntegrity[algo]) {
-              throw Object.assign(new Error(
-                `Integrity checksum failed when using ${algo}: ` +
-                `wanted ${this.integrity} but got ${distIntegrity}.`
-              ), { code: 'EINTEGRITY' })
-            }
-          }
-        }
-        // made it this far, the integrity is worthwhile.  accept it.
-        // the setter here will take care of merging it into what we already
-        // had.
-        this.integrity = distIntegrity
-      }
-    }
-    if (this.integrity) {
-      mani._integrity = String(this.integrity)
-      if (dist.signatures) {
-        if (this.opts.verifySignatures) {
-          // validate and throw on error, then set _signatures
-          const message = `${mani._id}:${mani._integrity}`
-          for (const signature of dist.signatures) {
-            const publicKey = this.registryKeys &&
-              this.registryKeys.filter(key => (key.keyid === signature.keyid))[0]
-            if (!publicKey) {
-              throw Object.assign(new Error(
-                  `${mani._id} has a registry signature with keyid: ${signature.keyid} ` +
-                  'but no corresponding public key can be found'
-              ), { code: 'EMISSINGSIGNATUREKEY' })
-            }
-
-            const publishedTime = Date.parse(mani._time || MISSING_TIME_CUTOFF)
-            const validPublicKey = !publicKey.expires ||
-              publishedTime < Date.parse(publicKey.expires)
-            if (!validPublicKey) {
-              throw Object.assign(new Error(
-                  `${mani._id} has a registry signature with keyid: ${signature.keyid} ` +
-                  `but the corresponding public key has expired ${publicKey.expires}`
-              ), { code: 'EEXPIREDSIGNATUREKEY' })
-            }
-            const verifier = crypto.createVerify('SHA256')
-            verifier.write(message)
-            verifier.end()
-            const valid = verifier.verify(
-              publicKey.pemkey,
-              signature.sig,
-              'base64'
-            )
-            if (!valid) {
-              throw Object.assign(new Error(
-                  `${mani._id} has an invalid registry signature with ` +
-                  `keyid: ${publicKey.keyid} and signature: ${signature.sig}`
-              ), {
-                code: 'EINTEGRITYSIGNATURE',
-                keyid: publicKey.keyid,
-                signature: signature.sig,
-                resolved: mani._resolved,
-                integrity: mani._integrity,
-              })
-            }
-          }
-          mani._signatures = dist.signatures
-        } else {
-          mani._signatures = dist.signatures
-        }
-      }
-
-      if (dist.attestations) {
-        if (this.opts.verifyAttestations) {
-          // Always fetch attestations from the current registry host
-          const attestationsPath = new URL(dist.attestations.url).pathname
-          const attestationsUrl = removeTrailingSlashes(this.registry) + attestationsPath
-          const res = await fetch(attestationsUrl, {
-            ...this.opts,
-            // disable integrity check for attestations json payload, we check the
-            // integrity in the verification steps below
-            integrity: null,
-          })
-          const { attestations } = await res.json()
-          const bundles = attestations.map(({ predicateType, bundle }) => {
-            const statement = JSON.parse(
-              Buffer.from(bundle.dsseEnvelope.payload, 'base64').toString('utf8')
-            )
-            const keyid = bundle.dsseEnvelope.signatures[0].keyid
-            const signature = bundle.dsseEnvelope.signatures[0].sig
-
-            return {
-              predicateType,
-              bundle,
-              statement,
-              keyid,
-              signature,
-            }
-          })
-
-          const attestationKeyIds = bundles.map((b) => b.keyid).filter((k) => !!k)
-          const attestationRegistryKeys = (this.registryKeys || [])
-            .filter(key => attestationKeyIds.includes(key.keyid))
-          if (!attestationRegistryKeys.length) {
-            throw Object.assign(new Error(
-              `${mani._id} has attestations but no corresponding public key(s) can be found`
-            ), { code: 'EMISSINGSIGNATUREKEY' })
-          }
-
-          for (const { predicateType, bundle, keyid, signature, statement } of bundles) {
-            const publicKey = attestationRegistryKeys.find(key => key.keyid === keyid)
-            // Publish attestations have a keyid set and a valid public key must be found
-            if (keyid) {
-              if (!publicKey) {
-                throw Object.assign(new Error(
-                  `${mani._id} has attestations with keyid: ${keyid} ` +
-                  'but no corresponding public key can be found'
-                ), { code: 'EMISSINGSIGNATUREKEY' })
-              }
-
-              const integratedTime = new Date(
-                Number(
-                  bundle.verificationMaterial.tlogEntries[0].integratedTime
-                ) * 1000
-              )
-              const validPublicKey = !publicKey.expires ||
-                (integratedTime < Date.parse(publicKey.expires))
-              if (!validPublicKey) {
-                throw Object.assign(new Error(
-                  `${mani._id} has attestations with keyid: ${keyid} ` +
-                  `but the corresponding public key has expired ${publicKey.expires}`
-                ), { code: 'EEXPIREDSIGNATUREKEY' })
-              }
-            }
-
-            const subject = {
-              name: statement.subject[0].name,
-              sha512: statement.subject[0].digest.sha512,
-            }
-
-            // Only type 'version' can be turned into a PURL
-            const purl = this.spec.type === 'version' ? npa.toPurl(this.spec) : this.spec
-            // Verify the statement subject matches the package, version
-            if (subject.name !== purl) {
-              throw Object.assign(new Error(
-                `${mani._id} package name and version (PURL): ${purl} ` +
-                `doesn't match what was signed: ${subject.name}`
-              ), { code: 'EATTESTATIONSUBJECT' })
-            }
-
-            // Verify the statement subject matches the tarball integrity
-            const integrityHexDigest = ssri.parse(this.integrity).hexDigest()
-            if (subject.sha512 !== integrityHexDigest) {
-              throw Object.assign(new Error(
-                `${mani._id} package integrity (hex digest): ` +
-                `${integrityHexDigest} ` +
-                `doesn't match what was signed: ${subject.sha512}`
-              ), { code: 'EATTESTATIONSUBJECT' })
-            }
-
-            try {
-              // Provenance attestations are signed with a signing certificate
-              // (including the key) so we don't need to return a public key.
-              //
-              // Publish attestations are signed with a keyid so we need to
-              // specify a public key from the keys endpoint: `registry-host.tld/-/npm/v1/keys`
-              const options = {
-                tufCachePath: this.tufCache,
-                keySelector: publicKey ? () => publicKey.pemkey : undefined,
-              }
-              await sigstore.verify(bundle, options)
-            } catch (e) {
-              throw Object.assign(new Error(
-                `${mani._id} failed to verify attestation: ${e.message}`
-              ), {
-                code: 'EATTESTATIONVERIFY',
-                predicateType,
-                keyid,
-                signature,
-                resolved: mani._resolved,
-                integrity: mani._integrity,
-              })
-            }
-          }
-          mani._attestations = dist.attestations
-        } else {
-          mani._attestations = dist.attestations
-        }
-      }
-    }
-
-    this.package = mani
-    return this.package
-  }
-
-  [_tarballFromResolved] () {
-    // we use a RemoteFetcher to get the actual tarball stream
-    return new RemoteFetcher(this.resolved, {
-      ...this.opts,
-      resolved: this.resolved,
-      pkgid: `registry:${this.spec.name}@${this.resolved}`,
-    })[_tarballFromResolved]()
-  }
-
-  get types () {
-    return [
-      'tag',
-      'version',
-      'range',
-    ]
-  }
-}
-module.exports = RegistryFetcher
diff --git a/node_modules/npm/node_modules/pacote/lib/remote.js b/node_modules/npm/node_modules/pacote/lib/remote.js
deleted file mode 100644
index fd61745..0000000
--- a/node_modules/npm/node_modules/pacote/lib/remote.js
+++ /dev/null
@@ -1,91 +0,0 @@
-const Fetcher = require('./fetcher.js')
-const FileFetcher = require('./file.js')
-const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
-const pacoteVersion = require('../package.json').version
-const fetch = require('npm-registry-fetch')
-const { Minipass } = require('minipass')
-
-const _cacheFetches = Symbol.for('pacote.Fetcher._cacheFetches')
-const _headers = Symbol('_headers')
-class RemoteFetcher extends Fetcher {
-  constructor (spec, opts) {
-    super(spec, opts)
-    this.resolved = this.spec.fetchSpec
-    const resolvedURL = new URL(this.resolved)
-    if (this.replaceRegistryHost !== 'never'
-      && (this.replaceRegistryHost === 'always'
-      || this.replaceRegistryHost === resolvedURL.host)) {
-      this.resolved = new URL(resolvedURL.pathname, this.registry).href
-    }
-
-    // nam is a fermented pork sausage that is good to eat
-    const nameat = this.spec.name ? `${this.spec.name}@` : ''
-    this.pkgid = opts.pkgid ? opts.pkgid : `remote:${nameat}${this.resolved}`
-  }
-
-  // Don't need to cache tarball fetches in pacote, because make-fetch-happen
-  // will write into cacache anyway.
-  get [_cacheFetches] () {
-    return false
-  }
-
-  [_tarballFromResolved] () {
-    const stream = new Minipass()
-    stream.hasIntegrityEmitter = true
-
-    const fetchOpts = {
-      ...this.opts,
-      headers: this[_headers](),
-      spec: this.spec,
-      integrity: this.integrity,
-      algorithms: [this.pickIntegrityAlgorithm()],
-    }
-
-    // eslint-disable-next-line promise/always-return
-    fetch(this.resolved, fetchOpts).then(res => {
-      res.body.on('error',
-        /* istanbul ignore next - exceedingly rare and hard to simulate */
-        er => stream.emit('error', er)
-      )
-
-      res.body.on('integrity', i => {
-        this.integrity = i
-        stream.emit('integrity', i)
-      })
-
-      res.body.pipe(stream)
-    }).catch(er => stream.emit('error', er))
-
-    return stream
-  }
-
-  [_headers] () {
-    return {
-      // npm will override this, but ensure that we always send *something*
-      'user-agent': this.opts.userAgent ||
-        `pacote/${pacoteVersion} node/${process.version}`,
-      ...(this.opts.headers || {}),
-      'pacote-version': pacoteVersion,
-      'pacote-req-type': 'tarball',
-      'pacote-pkg-id': this.pkgid,
-      ...(this.integrity ? { 'pacote-integrity': String(this.integrity) }
-      : {}),
-      ...(this.opts.headers || {}),
-    }
-  }
-
-  get types () {
-    return ['remote']
-  }
-
-  // getting a packument and/or manifest is the same as with a file: spec.
-  // unpack the tarball stream, and then read from the package.json file.
-  packument () {
-    return FileFetcher.prototype.packument.apply(this)
-  }
-
-  manifest () {
-    return FileFetcher.prototype.manifest.apply(this)
-  }
-}
-module.exports = RemoteFetcher
diff --git a/node_modules/npm/node_modules/pacote/lib/util/add-git-sha.js b/node_modules/npm/node_modules/pacote/lib/util/add-git-sha.js
deleted file mode 100644
index 843fe5b..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/add-git-sha.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// add a sha to a git remote url spec
-const addGitSha = (spec, sha) => {
-  if (spec.hosted) {
-    const h = spec.hosted
-    const opt = { noCommittish: true }
-    const base = h.https && h.auth ? h.https(opt) : h.shortcut(opt)
-
-    return `${base}#${sha}`
-  } else {
-    // don't use new URL for this, because it doesn't handle scp urls
-    return spec.rawSpec.replace(/#.*$/, '') + `#${sha}`
-  }
-}
-
-module.exports = addGitSha
diff --git a/node_modules/npm/node_modules/pacote/lib/util/cache-dir.js b/node_modules/npm/node_modules/pacote/lib/util/cache-dir.js
deleted file mode 100644
index ac83b17..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/cache-dir.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const os = require('os')
-const { resolve } = require('path')
-
-module.exports = (fakePlatform = false) => {
-  const temp = os.tmpdir()
-  const uidOrPid = process.getuid ? process.getuid() : process.pid
-  const home = os.homedir() || resolve(temp, 'npm-' + uidOrPid)
-  const platform = fakePlatform || process.platform
-  const cacheExtra = platform === 'win32' ? 'npm-cache' : '.npm'
-  const cacheRoot = (platform === 'win32' && process.env.LOCALAPPDATA) || home
-  return {
-    cacache: resolve(cacheRoot, cacheExtra, '_cacache'),
-    tufcache: resolve(cacheRoot, cacheExtra, '_tuf'),
-  }
-}
diff --git a/node_modules/npm/node_modules/pacote/lib/util/is-package-bin.js b/node_modules/npm/node_modules/pacote/lib/util/is-package-bin.js
deleted file mode 100644
index 49a3f73..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/is-package-bin.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// Function to determine whether a path is in the package.bin set.
-// Used to prevent issues when people publish a package from a
-// windows machine, and then install with --no-bin-links.
-//
-// Note: this is not possible in remote or file fetchers, since
-// we don't have the manifest until AFTER we've unpacked.  But the
-// main use case is registry fetching with git a distant second,
-// so that's an acceptable edge case to not handle.
-
-const binObj = (name, bin) =>
-  typeof bin === 'string' ? { [name]: bin } : bin
-
-const hasBin = (pkg, path) => {
-  const bin = binObj(pkg.name, pkg.bin)
-  const p = path.replace(/^[^\\/]*\//, '')
-  for (const kv of Object.entries(bin)) {
-    if (kv[1] === p) {
-      return true
-    }
-  }
-  return false
-}
-
-module.exports = (pkg, path) =>
-  pkg && pkg.bin ? hasBin(pkg, path) : false
diff --git a/node_modules/npm/node_modules/pacote/lib/util/npm.js b/node_modules/npm/node_modules/pacote/lib/util/npm.js
deleted file mode 100644
index a3005c2..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/npm.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// run an npm command
-const spawn = require('@npmcli/promise-spawn')
-
-module.exports = (npmBin, npmCommand, cwd, env, extra) => {
-  const isJS = npmBin.endsWith('.js')
-  const cmd = isJS ? process.execPath : npmBin
-  const args = (isJS ? [npmBin] : []).concat(npmCommand)
-  // when installing to run the `prepare` script for a git dep, we need
-  // to ensure that we don't run into a cycle of checking out packages
-  // in temp directories.  this lets us link previously-seen repos that
-  // are also being prepared.
-
-  return spawn(cmd, args, { cwd, env }, extra)
-}
diff --git a/node_modules/npm/node_modules/pacote/lib/util/tar-create-options.js b/node_modules/npm/node_modules/pacote/lib/util/tar-create-options.js
deleted file mode 100644
index d070f0f..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/tar-create-options.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const isPackageBin = require('./is-package-bin.js')
-
-const tarCreateOptions = manifest => ({
-  cwd: manifest._resolved,
-  prefix: 'package/',
-  portable: true,
-  gzip: {
-    // forcing the level to 9 seems to avoid some
-    // platform specific optimizations that cause
-    // integrity mismatch errors due to differing
-    // end results after compression
-    level: 9,
-  },
-
-  // ensure that package bins are always executable
-  // Note that npm-packlist is already filtering out
-  // anything that is not a regular file, ignored by
-  // .npmignore or package.json "files", etc.
-  filter: (path, stat) => {
-    if (isPackageBin(manifest, path)) {
-      stat.mode |= 0o111
-    }
-    return true
-  },
-
-  // Provide a specific date in the 1980s for the benefit of zip,
-  // which is confounded by files dated at the Unix epoch 0.
-  mtime: new Date('1985-10-26T08:15:00.000Z'),
-})
-
-module.exports = tarCreateOptions
diff --git a/node_modules/npm/node_modules/pacote/lib/util/trailing-slashes.js b/node_modules/npm/node_modules/pacote/lib/util/trailing-slashes.js
deleted file mode 100644
index c50cb61..0000000
--- a/node_modules/npm/node_modules/pacote/lib/util/trailing-slashes.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const removeTrailingSlashes = (input) => {
-  // in order to avoid regexp redos detection
-  let output = input
-  while (output.endsWith('/')) {
-    output = output.slice(0, -1)
-  }
-  return output
-}
-
-module.exports = removeTrailingSlashes
diff --git a/node_modules/npm/node_modules/pacote/package.json b/node_modules/npm/node_modules/pacote/package.json
deleted file mode 100644
index 88d479d..0000000
--- a/node_modules/npm/node_modules/pacote/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
-  "name": "pacote",
-  "version": "17.0.5",
-  "description": "JavaScript package downloader",
-  "author": "GitHub Inc.",
-  "bin": {
-    "pacote": "lib/bin.js"
-  },
-  "license": "ISC",
-  "main": "lib/index.js",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "tap": {
-    "timeout": 300,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "devDependencies": {
-    "@npmcli/arborist": "^7.1.0",
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.19.0",
-    "hosted-git-info": "^7.0.0",
-    "mutate-fs": "^2.1.1",
-    "nock": "^13.2.4",
-    "npm-registry-mock": "^1.3.2",
-    "tap": "^16.0.1"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "keywords": [
-    "packages",
-    "npm",
-    "git"
-  ],
-  "dependencies": {
-    "@npmcli/git": "^5.0.0",
-    "@npmcli/installed-package-contents": "^2.0.1",
-    "@npmcli/promise-spawn": "^7.0.0",
-    "@npmcli/run-script": "^7.0.0",
-    "cacache": "^18.0.0",
-    "fs-minipass": "^3.0.0",
-    "minipass": "^7.0.2",
-    "npm-package-arg": "^11.0.0",
-    "npm-packlist": "^8.0.0",
-    "npm-pick-manifest": "^9.0.0",
-    "npm-registry-fetch": "^16.0.0",
-    "proc-log": "^3.0.0",
-    "promise-retry": "^2.0.1",
-    "read-package-json": "^7.0.0",
-    "read-package-json-fast": "^3.0.0",
-    "sigstore": "^2.0.0",
-    "ssri": "^10.0.0",
-    "tar": "^6.1.11"
-  },
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/pacote.git"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.19.0",
-    "windowsCI": false,
-    "publish": "true"
-  }
-}
diff --git a/node_modules/npm/node_modules/parse-conflict-json/LICENSE.md b/node_modules/npm/node_modules/parse-conflict-json/LICENSE.md
deleted file mode 100644
index 5fc208f..0000000
--- a/node_modules/npm/node_modules/parse-conflict-json/LICENSE.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-ISC License
-
-Copyright npm, Inc.
-
-Permission to use, copy, modify, and/or distribute this
-software for any purpose with or without fee is hereby
-granted, provided that the above copyright notice and this
-permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
-WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
-EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
-USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/parse-conflict-json/lib/index.js b/node_modules/npm/node_modules/parse-conflict-json/lib/index.js
deleted file mode 100644
index 21b295d..0000000
--- a/node_modules/npm/node_modules/parse-conflict-json/lib/index.js
+++ /dev/null
@@ -1,104 +0,0 @@
-const parseJSON = require('json-parse-even-better-errors')
-const { diff } = require('just-diff')
-const { diffApply } = require('just-diff-apply')
-
-const globalObjectProperties = Object.getOwnPropertyNames(Object.prototype)
-
-const stripBOM = content => {
-  content = content.toString()
-  // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
-  // because the buffer-to-string conversion in `fs.readFileSync()`
-  // translates it to FEFF, the UTF-16 BOM.
-  if (content.charCodeAt(0) === 0xFEFF) {
-    content = content.slice(1)
-  }
-  return content
-}
-
-const PARENT_RE = /\|{7,}/g
-const OURS_RE = /<{7,}/g
-const THEIRS_RE = /={7,}/g
-const END_RE = />{7,}/g
-
-const isDiff = str =>
-  str.match(OURS_RE) && str.match(THEIRS_RE) && str.match(END_RE)
-
-const parseConflictJSON = (str, reviver, prefer) => {
-  prefer = prefer || 'ours'
-  if (prefer !== 'theirs' && prefer !== 'ours') {
-    throw new TypeError('prefer param must be "ours" or "theirs" if set')
-  }
-
-  str = stripBOM(str)
-
-  if (!isDiff(str)) {
-    return parseJSON(str)
-  }
-
-  const pieces = str.split(/[\n\r]+/g).reduce((acc, line) => {
-    if (line.match(PARENT_RE)) {
-      acc.state = 'parent'
-    } else if (line.match(OURS_RE)) {
-      acc.state = 'ours'
-    } else if (line.match(THEIRS_RE)) {
-      acc.state = 'theirs'
-    } else if (line.match(END_RE)) {
-      acc.state = 'top'
-    } else {
-      if (acc.state === 'top' || acc.state === 'ours') {
-        acc.ours += line
-      }
-      if (acc.state === 'top' || acc.state === 'theirs') {
-        acc.theirs += line
-      }
-      if (acc.state === 'top' || acc.state === 'parent') {
-        acc.parent += line
-      }
-    }
-    return acc
-  }, {
-    state: 'top',
-    ours: '',
-    theirs: '',
-    parent: '',
-  })
-
-  // this will throw if either piece is not valid JSON, that's intended
-  const parent = parseJSON(pieces.parent, reviver)
-  const ours = parseJSON(pieces.ours, reviver)
-  const theirs = parseJSON(pieces.theirs, reviver)
-
-  return prefer === 'ours'
-    ? resolve(parent, ours, theirs)
-    : resolve(parent, theirs, ours)
-}
-
-const isObj = obj => obj && typeof obj === 'object'
-
-const copyPath = (to, from, path, i) => {
-  const p = path[i]
-  if (isObj(to[p]) && isObj(from[p]) &&
-      Array.isArray(to[p]) === Array.isArray(from[p])) {
-    return copyPath(to[p], from[p], path, i + 1)
-  }
-  to[p] = from[p]
-}
-
-// get the diff from parent->ours and applying our changes on top of theirs.
-// If they turned an object into a non-object, then put it back.
-const resolve = (parent, ours, theirs) => {
-  const dours = diff(parent, ours)
-  for (let i = 0; i < dours.length; i++) {
-    if (globalObjectProperties.find(prop => dours[i].path.includes(prop))) {
-      continue
-    }
-    try {
-      diffApply(theirs, [dours[i]])
-    } catch (e) {
-      copyPath(theirs, ours, dours[i].path, 0)
-    }
-  }
-  return theirs
-}
-
-module.exports = Object.assign(parseConflictJSON, { isDiff })
diff --git a/node_modules/npm/node_modules/parse-conflict-json/package.json b/node_modules/npm/node_modules/parse-conflict-json/package.json
deleted file mode 100644
index 32584d3..0000000
--- a/node_modules/npm/node_modules/parse-conflict-json/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-  "name": "parse-conflict-json",
-  "version": "3.0.1",
-  "description": "Parse a JSON string that has git merge conflicts, resolving if possible",
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "main": "lib",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "tap": {
-    "check-coverage": true,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.12.0",
-    "tap": "^16.0.1"
-  },
-  "dependencies": {
-    "json-parse-even-better-errors": "^3.0.0",
-    "just-diff": "^6.0.0",
-    "just-diff-apply": "^5.2.0"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/parse-conflict-json.git"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.12.0"
-  }
-}
diff --git a/node_modules/npm/node_modules/path-key/index.js b/node_modules/npm/node_modules/path-key/index.js
deleted file mode 100644
index 0cf6415..0000000
--- a/node_modules/npm/node_modules/path-key/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'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;
diff --git a/node_modules/npm/node_modules/path-key/license b/node_modules/npm/node_modules/path-key/license
deleted file mode 100644
index e7af2f7..0000000
--- a/node_modules/npm/node_modules/path-key/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus  (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/path-key/package.json b/node_modules/npm/node_modules/path-key/package.json
deleted file mode 100644
index c8cbd38..0000000
--- a/node_modules/npm/node_modules/path-key/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
-	"name": "path-key",
-	"version": "3.1.1",
-	"description": "Get the PATH environment variable key cross-platform",
-	"license": "MIT",
-	"repository": "sindresorhus/path-key",
-	"author": {
-		"name": "Sindre Sorhus",
-		"email": "sindresorhus@gmail.com",
-		"url": "sindresorhus.com"
-	},
-	"engines": {
-		"node": ">=8"
-	},
-	"scripts": {
-		"test": "xo && ava && tsd"
-	},
-	"files": [
-		"index.js",
-		"index.d.ts"
-	],
-	"keywords": [
-		"path",
-		"key",
-		"environment",
-		"env",
-		"variable",
-		"var",
-		"get",
-		"cross-platform",
-		"windows"
-	],
-	"devDependencies": {
-		"@types/node": "^11.13.0",
-		"ava": "^1.4.1",
-		"tsd": "^0.7.2",
-		"xo": "^0.24.0"
-	}
-}
diff --git a/node_modules/npm/node_modules/path-scurry/LICENSE.md b/node_modules/npm/node_modules/path-scurry/LICENSE.md
deleted file mode 100644
index c5402b9..0000000
--- a/node_modules/npm/node_modules/path-scurry/LICENSE.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# Blue Oak Model License
-
-Version 1.0.0
-
-## Purpose
-
-This license gives everyone as much permission to work with
-this software as possible, while protecting contributors
-from liability.
-
-## Acceptance
-
-In order to receive this license, you must agree to its
-rules.  The rules of this license are both obligations
-under that agreement and conditions to your license.
-You must not do anything with this software that triggers
-a rule that you cannot or will not follow.
-
-## Copyright
-
-Each contributor licenses you to do everything with this
-software that would otherwise infringe that contributor's
-copyright in it.
-
-## Notices
-
-You must ensure that everyone who gets a copy of
-any part of this software from you, with or without
-changes, also gets the text of this license or a link to
-.
-
-## Excuse
-
-If anyone notifies you in writing that you have not
-complied with [Notices](#notices), you can keep your
-license by taking all practical steps to comply within 30
-days after the notice.  If you do not do so, your license
-ends immediately.
-
-## Patent
-
-Each contributor licenses you to do everything with this
-software that would otherwise infringe any patent claims
-they can license or become able to license.
-
-## Reliability
-
-No contributor can revoke this license.
-
-## No Liability
-
-***As far as the law allows, this software comes as is,
-without any warranty or condition, and no contributor
-will be liable to anyone for any damages related to this
-software or this license, under any kind of legal claim.***
diff --git a/node_modules/npm/node_modules/path-scurry/dist/cjs/index.js b/node_modules/npm/node_modules/path-scurry/dist/cjs/index.js
deleted file mode 100644
index 23eb5b0..0000000
--- a/node_modules/npm/node_modules/path-scurry/dist/cjs/index.js
+++ /dev/null
@@ -1,2018 +0,0 @@
-"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.PathScurry = exports.Path = exports.PathScurryDarwin = exports.PathScurryPosix = exports.PathScurryWin32 = exports.PathScurryBase = exports.PathPosix = exports.PathWin32 = exports.PathBase = exports.ChildrenCache = exports.ResolveCache = void 0;
-const lru_cache_1 = require("lru-cache");
-const path_1 = require("path");
-const url_1 = require("url");
-const actualFS = __importStar(require("fs"));
-const fs_1 = require("fs");
-const realpathSync = fs_1.realpathSync.native;
-// TODO: test perf of fs/promises realpath vs realpathCB,
-// since the promises one uses realpath.native
-const promises_1 = require("fs/promises");
-const minipass_1 = require("minipass");
-const defaultFS = {
-    lstatSync: fs_1.lstatSync,
-    readdir: fs_1.readdir,
-    readdirSync: fs_1.readdirSync,
-    readlinkSync: fs_1.readlinkSync,
-    realpathSync,
-    promises: {
-        lstat: promises_1.lstat,
-        readdir: promises_1.readdir,
-        readlink: promises_1.readlink,
-        realpath: promises_1.realpath,
-    },
-};
-// if they just gave us require('fs') then use our default
-const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS
-    ? defaultFS
-    : {
-        ...defaultFS,
-        ...fsOption,
-        promises: {
-            ...defaultFS.promises,
-            ...(fsOption.promises || {}),
-        },
-    };
-// turn something like //?/c:/ into c:\
-const uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
-const uncToDrive = (rootPath) => rootPath.replace(/\//g, '\\').replace(uncDriveRegexp, '$1\\');
-// windows paths are separated by either / or \
-const eitherSep = /[\\\/]/;
-const UNKNOWN = 0; // may not even exist, for all we know
-const IFIFO = 0b0001;
-const IFCHR = 0b0010;
-const IFDIR = 0b0100;
-const IFBLK = 0b0110;
-const IFREG = 0b1000;
-const IFLNK = 0b1010;
-const IFSOCK = 0b1100;
-const IFMT = 0b1111;
-// mask to unset low 4 bits
-const IFMT_UNKNOWN = ~IFMT;
-// set after successfully calling readdir() and getting entries.
-const READDIR_CALLED = 16;
-// set after a successful lstat()
-const LSTAT_CALLED = 32;
-// set if an entry (or one of its parents) is definitely not a dir
-const ENOTDIR = 64;
-// set if an entry (or one of its parents) does not exist
-// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
-const ENOENT = 128;
-// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
-// set if we fail to readlink
-const ENOREADLINK = 256;
-// set if we know realpath() will fail
-const ENOREALPATH = 512;
-const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
-const TYPEMASK = 1023;
-const entToType = (s) => s.isFile()
-    ? IFREG
-    : s.isDirectory()
-        ? IFDIR
-        : s.isSymbolicLink()
-            ? IFLNK
-            : s.isCharacterDevice()
-                ? IFCHR
-                : s.isBlockDevice()
-                    ? IFBLK
-                    : s.isSocket()
-                        ? IFSOCK
-                        : s.isFIFO()
-                            ? IFIFO
-                            : UNKNOWN;
-// normalize unicode path names
-const normalizeCache = new Map();
-const normalize = (s) => {
-    const c = normalizeCache.get(s);
-    if (c)
-        return c;
-    const n = s.normalize('NFKD');
-    normalizeCache.set(s, n);
-    return n;
-};
-const normalizeNocaseCache = new Map();
-const normalizeNocase = (s) => {
-    const c = normalizeNocaseCache.get(s);
-    if (c)
-        return c;
-    const n = normalize(s.toLowerCase());
-    normalizeNocaseCache.set(s, n);
-    return n;
-};
-/**
- * An LRUCache for storing resolved path strings or Path objects.
- * @internal
- */
-class ResolveCache extends lru_cache_1.LRUCache {
-    constructor() {
-        super({ max: 256 });
-    }
-}
-exports.ResolveCache = ResolveCache;
-// In order to prevent blowing out the js heap by allocating hundreds of
-// thousands of Path entries when walking extremely large trees, the "children"
-// in this tree are represented by storing an array of Path entries in an
-// LRUCache, indexed by the parent.  At any time, Path.children() may return an
-// empty array, indicating that it doesn't know about any of its children, and
-// thus has to rebuild that cache.  This is fine, it just means that we don't
-// benefit as much from having the cached entries, but huge directory walks
-// don't blow out the stack, and smaller ones are still as fast as possible.
-//
-//It does impose some complexity when building up the readdir data, because we
-//need to pass a reference to the children array that we started with.
-/**
- * an LRUCache for storing child entries.
- * @internal
- */
-class ChildrenCache extends lru_cache_1.LRUCache {
-    constructor(maxSize = 16 * 1024) {
-        super({
-            maxSize,
-            // parent + children
-            sizeCalculation: a => a.length + 1,
-        });
-    }
-}
-exports.ChildrenCache = ChildrenCache;
-const setAsCwd = Symbol('PathScurry setAsCwd');
-/**
- * Path objects are sort of like a super-powered
- * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
- *
- * Each one represents a single filesystem entry on disk, which may or may not
- * exist. It includes methods for reading various types of information via
- * lstat, readlink, and readdir, and caches all information to the greatest
- * degree possible.
- *
- * Note that fs operations that would normally throw will instead return an
- * "empty" value. This is in order to prevent excessive overhead from error
- * stack traces.
- */
-class PathBase {
-    /**
-     * the basename of this path
-     *
-     * **Important**: *always* test the path name against any test string
-     * usingthe {@link isNamed} method, and not by directly comparing this
-     * string. Otherwise, unicode path strings that the system sees as identical
-     * will not be properly treated as the same path, leading to incorrect
-     * behavior and possible security issues.
-     */
-    name;
-    /**
-     * the Path entry corresponding to the path root.
-     *
-     * @internal
-     */
-    root;
-    /**
-     * All roots found within the current PathScurry family
-     *
-     * @internal
-     */
-    roots;
-    /**
-     * a reference to the parent path, or undefined in the case of root entries
-     *
-     * @internal
-     */
-    parent;
-    /**
-     * boolean indicating whether paths are compared case-insensitively
-     * @internal
-     */
-    nocase;
-    // potential default fs override
-    #fs;
-    // Stats fields
-    #dev;
-    get dev() {
-        return this.#dev;
-    }
-    #mode;
-    get mode() {
-        return this.#mode;
-    }
-    #nlink;
-    get nlink() {
-        return this.#nlink;
-    }
-    #uid;
-    get uid() {
-        return this.#uid;
-    }
-    #gid;
-    get gid() {
-        return this.#gid;
-    }
-    #rdev;
-    get rdev() {
-        return this.#rdev;
-    }
-    #blksize;
-    get blksize() {
-        return this.#blksize;
-    }
-    #ino;
-    get ino() {
-        return this.#ino;
-    }
-    #size;
-    get size() {
-        return this.#size;
-    }
-    #blocks;
-    get blocks() {
-        return this.#blocks;
-    }
-    #atimeMs;
-    get atimeMs() {
-        return this.#atimeMs;
-    }
-    #mtimeMs;
-    get mtimeMs() {
-        return this.#mtimeMs;
-    }
-    #ctimeMs;
-    get ctimeMs() {
-        return this.#ctimeMs;
-    }
-    #birthtimeMs;
-    get birthtimeMs() {
-        return this.#birthtimeMs;
-    }
-    #atime;
-    get atime() {
-        return this.#atime;
-    }
-    #mtime;
-    get mtime() {
-        return this.#mtime;
-    }
-    #ctime;
-    get ctime() {
-        return this.#ctime;
-    }
-    #birthtime;
-    get birthtime() {
-        return this.#birthtime;
-    }
-    #matchName;
-    #depth;
-    #fullpath;
-    #fullpathPosix;
-    #relative;
-    #relativePosix;
-    #type;
-    #children;
-    #linkTarget;
-    #realpath;
-    /**
-     * This property is for compatibility with the Dirent class as of
-     * Node v20, where Dirent['path'] refers to the path of the directory
-     * that was passed to readdir.  So, somewhat counterintuitively, this
-     * property refers to the *parent* path, not the path object itself.
-     * For root entries, it's the path to the entry itself.
-     */
-    get path() {
-        return (this.parent || this).fullpath();
-    }
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        this.name = name;
-        this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
-        this.#type = type & TYPEMASK;
-        this.nocase = nocase;
-        this.roots = roots;
-        this.root = root || this;
-        this.#children = children;
-        this.#fullpath = opts.fullpath;
-        this.#relative = opts.relative;
-        this.#relativePosix = opts.relativePosix;
-        this.parent = opts.parent;
-        if (this.parent) {
-            this.#fs = this.parent.#fs;
-        }
-        else {
-            this.#fs = fsFromOption(opts.fs);
-        }
-    }
-    /**
-     * Returns the depth of the Path object from its root.
-     *
-     * For example, a path at `/foo/bar` would have a depth of 2.
-     */
-    depth() {
-        if (this.#depth !== undefined)
-            return this.#depth;
-        if (!this.parent)
-            return (this.#depth = 0);
-        return (this.#depth = this.parent.depth() + 1);
-    }
-    /**
-     * @internal
-     */
-    childrenCache() {
-        return this.#children;
-    }
-    /**
-     * Get the Path object referenced by the string path, resolved from this Path
-     */
-    resolve(path) {
-        if (!path) {
-            return this;
-        }
-        const rootPath = this.getRootString(path);
-        const dir = path.substring(rootPath.length);
-        const dirParts = dir.split(this.splitSep);
-        const result = rootPath
-            ? this.getRoot(rootPath).#resolveParts(dirParts)
-            : this.#resolveParts(dirParts);
-        return result;
-    }
-    #resolveParts(dirParts) {
-        let p = this;
-        for (const part of dirParts) {
-            p = p.child(part);
-        }
-        return p;
-    }
-    /**
-     * Returns the cached children Path objects, if still available.  If they
-     * have fallen out of the cache, then returns an empty array, and resets the
-     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
-     * lookup.
-     *
-     * @internal
-     */
-    children() {
-        const cached = this.#children.get(this);
-        if (cached) {
-            return cached;
-        }
-        const children = Object.assign([], { provisional: 0 });
-        this.#children.set(this, children);
-        this.#type &= ~READDIR_CALLED;
-        return children;
-    }
-    /**
-     * Resolves a path portion and returns or creates the child Path.
-     *
-     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
-     * `'..'`.
-     *
-     * This should not be called directly.  If `pathPart` contains any path
-     * separators, it will lead to unsafe undefined behavior.
-     *
-     * Use `Path.resolve()` instead.
-     *
-     * @internal
-     */
-    child(pathPart, opts) {
-        if (pathPart === '' || pathPart === '.') {
-            return this;
-        }
-        if (pathPart === '..') {
-            return this.parent || this;
-        }
-        // find the child
-        const children = this.children();
-        const name = this.nocase
-            ? normalizeNocase(pathPart)
-            : normalize(pathPart);
-        for (const p of children) {
-            if (p.#matchName === name) {
-                return p;
-            }
-        }
-        // didn't find it, create provisional child, since it might not
-        // actually exist.  If we know the parent isn't a dir, then
-        // in fact it CAN'T exist.
-        const s = this.parent ? this.sep : '';
-        const fullpath = this.#fullpath
-            ? this.#fullpath + s + pathPart
-            : undefined;
-        const pchild = this.newChild(pathPart, UNKNOWN, {
-            ...opts,
-            parent: this,
-            fullpath,
-        });
-        if (!this.canReaddir()) {
-            pchild.#type |= ENOENT;
-        }
-        // don't have to update provisional, because if we have real children,
-        // then provisional is set to children.length, otherwise a lower number
-        children.push(pchild);
-        return pchild;
-    }
-    /**
-     * The relative path from the cwd. If it does not share an ancestor with
-     * the cwd, then this ends up being equivalent to the fullpath()
-     */
-    relative() {
-        if (this.#relative !== undefined) {
-            return this.#relative;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#relative = this.name);
-        }
-        const pv = p.relative();
-        return pv + (!pv || !p.parent ? '' : this.sep) + name;
-    }
-    /**
-     * The relative path from the cwd, using / as the path separator.
-     * If it does not share an ancestor with
-     * the cwd, then this ends up being equivalent to the fullpathPosix()
-     * On posix systems, this is identical to relative().
-     */
-    relativePosix() {
-        if (this.sep === '/')
-            return this.relative();
-        if (this.#relativePosix !== undefined)
-            return this.#relativePosix;
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#relativePosix = this.fullpathPosix());
-        }
-        const pv = p.relativePosix();
-        return pv + (!pv || !p.parent ? '' : '/') + name;
-    }
-    /**
-     * The fully resolved path string for this Path entry
-     */
-    fullpath() {
-        if (this.#fullpath !== undefined) {
-            return this.#fullpath;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#fullpath = this.name);
-        }
-        const pv = p.fullpath();
-        const fp = pv + (!p.parent ? '' : this.sep) + name;
-        return (this.#fullpath = fp);
-    }
-    /**
-     * On platforms other than windows, this is identical to fullpath.
-     *
-     * On windows, this is overridden to return the forward-slash form of the
-     * full UNC path.
-     */
-    fullpathPosix() {
-        if (this.#fullpathPosix !== undefined)
-            return this.#fullpathPosix;
-        if (this.sep === '/')
-            return (this.#fullpathPosix = this.fullpath());
-        if (!this.parent) {
-            const p = this.fullpath().replace(/\\/g, '/');
-            if (/^[a-z]:\//i.test(p)) {
-                return (this.#fullpathPosix = `//?/${p}`);
-            }
-            else {
-                return (this.#fullpathPosix = p);
-            }
-        }
-        const p = this.parent;
-        const pfpp = p.fullpathPosix();
-        const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;
-        return (this.#fullpathPosix = fpp);
-    }
-    /**
-     * Is the Path of an unknown type?
-     *
-     * Note that we might know *something* about it if there has been a previous
-     * filesystem operation, for example that it does not exist, or is not a
-     * link, or whether it has child entries.
-     */
-    isUnknown() {
-        return (this.#type & IFMT) === UNKNOWN;
-    }
-    isType(type) {
-        return this[`is${type}`]();
-    }
-    getType() {
-        return this.isUnknown()
-            ? 'Unknown'
-            : this.isDirectory()
-                ? 'Directory'
-                : this.isFile()
-                    ? 'File'
-                    : this.isSymbolicLink()
-                        ? 'SymbolicLink'
-                        : this.isFIFO()
-                            ? 'FIFO'
-                            : this.isCharacterDevice()
-                                ? 'CharacterDevice'
-                                : this.isBlockDevice()
-                                    ? 'BlockDevice'
-                                    : /* c8 ignore start */ this.isSocket()
-                                        ? 'Socket'
-                                        : 'Unknown';
-        /* c8 ignore stop */
-    }
-    /**
-     * Is the Path a regular file?
-     */
-    isFile() {
-        return (this.#type & IFMT) === IFREG;
-    }
-    /**
-     * Is the Path a directory?
-     */
-    isDirectory() {
-        return (this.#type & IFMT) === IFDIR;
-    }
-    /**
-     * Is the path a character device?
-     */
-    isCharacterDevice() {
-        return (this.#type & IFMT) === IFCHR;
-    }
-    /**
-     * Is the path a block device?
-     */
-    isBlockDevice() {
-        return (this.#type & IFMT) === IFBLK;
-    }
-    /**
-     * Is the path a FIFO pipe?
-     */
-    isFIFO() {
-        return (this.#type & IFMT) === IFIFO;
-    }
-    /**
-     * Is the path a socket?
-     */
-    isSocket() {
-        return (this.#type & IFMT) === IFSOCK;
-    }
-    /**
-     * Is the path a symbolic link?
-     */
-    isSymbolicLink() {
-        return (this.#type & IFLNK) === IFLNK;
-    }
-    /**
-     * Return the entry if it has been subject of a successful lstat, or
-     * undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* simply
-     * mean that we haven't called lstat on it.
-     */
-    lstatCached() {
-        return this.#type & LSTAT_CALLED ? this : undefined;
-    }
-    /**
-     * Return the cached link target if the entry has been the subject of a
-     * successful readlink, or undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * readlink() has been called at some point.
-     */
-    readlinkCached() {
-        return this.#linkTarget;
-    }
-    /**
-     * Returns the cached realpath target if the entry has been the subject
-     * of a successful realpath, or undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * realpath() has been called at some point.
-     */
-    realpathCached() {
-        return this.#realpath;
-    }
-    /**
-     * Returns the cached child Path entries array if the entry has been the
-     * subject of a successful readdir(), or [] otherwise.
-     *
-     * Does not read the filesystem, so an empty array *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * readdir() has been called recently enough to still be valid.
-     */
-    readdirCached() {
-        const children = this.children();
-        return children.slice(0, children.provisional);
-    }
-    /**
-     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
-     * any indication that readlink will definitely fail.
-     *
-     * Returns false if the path is known to not be a symlink, if a previous
-     * readlink failed, or if the entry does not exist.
-     */
-    canReadlink() {
-        if (this.#linkTarget)
-            return true;
-        if (!this.parent)
-            return false;
-        // cases where it cannot possibly succeed
-        const ifmt = this.#type & IFMT;
-        return !((ifmt !== UNKNOWN && ifmt !== IFLNK) ||
-            this.#type & ENOREADLINK ||
-            this.#type & ENOENT);
-    }
-    /**
-     * Return true if readdir has previously been successfully called on this
-     * path, indicating that cachedReaddir() is likely valid.
-     */
-    calledReaddir() {
-        return !!(this.#type & READDIR_CALLED);
-    }
-    /**
-     * Returns true if the path is known to not exist. That is, a previous lstat
-     * or readdir failed to verify its existence when that would have been
-     * expected, or a parent entry was marked either enoent or enotdir.
-     */
-    isENOENT() {
-        return !!(this.#type & ENOENT);
-    }
-    /**
-     * Return true if the path is a match for the given path name.  This handles
-     * case sensitivity and unicode normalization.
-     *
-     * Note: even on case-sensitive systems, it is **not** safe to test the
-     * equality of the `.name` property to determine whether a given pathname
-     * matches, due to unicode normalization mismatches.
-     *
-     * Always use this method instead of testing the `path.name` property
-     * directly.
-     */
-    isNamed(n) {
-        return !this.nocase
-            ? this.#matchName === normalize(n)
-            : this.#matchName === normalizeNocase(n);
-    }
-    /**
-     * Return the Path object corresponding to the target of a symbolic link.
-     *
-     * If the Path is not a symbolic link, or if the readlink call fails for any
-     * reason, `undefined` is returned.
-     *
-     * Result is cached, and thus may be outdated if the filesystem is mutated.
-     */
-    async readlink() {
-        const target = this.#linkTarget;
-        if (target) {
-            return target;
-        }
-        if (!this.canReadlink()) {
-            return undefined;
-        }
-        /* c8 ignore start */
-        // already covered by the canReadlink test, here for ts grumples
-        if (!this.parent) {
-            return undefined;
-        }
-        /* c8 ignore stop */
-        try {
-            const read = await this.#fs.promises.readlink(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-                return (this.#linkTarget = linkTarget);
-            }
-        }
-        catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
-        }
-    }
-    /**
-     * Synchronous {@link PathBase.readlink}
-     */
-    readlinkSync() {
-        const target = this.#linkTarget;
-        if (target) {
-            return target;
-        }
-        if (!this.canReadlink()) {
-            return undefined;
-        }
-        /* c8 ignore start */
-        // already covered by the canReadlink test, here for ts grumples
-        if (!this.parent) {
-            return undefined;
-        }
-        /* c8 ignore stop */
-        try {
-            const read = this.#fs.readlinkSync(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-                return (this.#linkTarget = linkTarget);
-            }
-        }
-        catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
-        }
-    }
-    #readdirSuccess(children) {
-        // succeeded, mark readdir called bit
-        this.#type |= READDIR_CALLED;
-        // mark all remaining provisional children as ENOENT
-        for (let p = children.provisional; p < children.length; p++) {
-            children[p].#markENOENT();
-        }
-    }
-    #markENOENT() {
-        // mark as UNKNOWN and ENOENT
-        if (this.#type & ENOENT)
-            return;
-        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
-        this.#markChildrenENOENT();
-    }
-    #markChildrenENOENT() {
-        // all children are provisional and do not exist
-        const children = this.children();
-        children.provisional = 0;
-        for (const p of children) {
-            p.#markENOENT();
-        }
-    }
-    #markENOREALPATH() {
-        this.#type |= ENOREALPATH;
-        this.#markENOTDIR();
-    }
-    // save the information when we know the entry is not a dir
-    #markENOTDIR() {
-        // entry is not a directory, so any children can't exist.
-        // this *should* be impossible, since any children created
-        // after it's been marked ENOTDIR should be marked ENOENT,
-        // so it won't even get to this point.
-        /* c8 ignore start */
-        if (this.#type & ENOTDIR)
-            return;
-        /* c8 ignore stop */
-        let t = this.#type;
-        // this could happen if we stat a dir, then delete it,
-        // then try to read it or one of its children.
-        if ((t & IFMT) === IFDIR)
-            t &= IFMT_UNKNOWN;
-        this.#type = t | ENOTDIR;
-        this.#markChildrenENOENT();
-    }
-    #readdirFail(code = '') {
-        // markENOTDIR and markENOENT also set provisional=0
-        if (code === 'ENOTDIR' || code === 'EPERM') {
-            this.#markENOTDIR();
-        }
-        else if (code === 'ENOENT') {
-            this.#markENOENT();
-        }
-        else {
-            this.children().provisional = 0;
-        }
-    }
-    #lstatFail(code = '') {
-        // Windows just raises ENOENT in this case, disable for win CI
-        /* c8 ignore start */
-        if (code === 'ENOTDIR') {
-            // already know it has a parent by this point
-            const p = this.parent;
-            p.#markENOTDIR();
-        }
-        else if (code === 'ENOENT') {
-            /* c8 ignore stop */
-            this.#markENOENT();
-        }
-    }
-    #readlinkFail(code = '') {
-        let ter = this.#type;
-        ter |= ENOREADLINK;
-        if (code === 'ENOENT')
-            ter |= ENOENT;
-        // windows gets a weird error when you try to readlink a file
-        if (code === 'EINVAL' || code === 'UNKNOWN') {
-            // exists, but not a symlink, we don't know WHAT it is, so remove
-            // all IFMT bits.
-            ter &= IFMT_UNKNOWN;
-        }
-        this.#type = ter;
-        // windows just gets ENOENT in this case.  We do cover the case,
-        // just disabled because it's impossible on Windows CI
-        /* c8 ignore start */
-        if (code === 'ENOTDIR' && this.parent) {
-            this.parent.#markENOTDIR();
-        }
-        /* c8 ignore stop */
-    }
-    #readdirAddChild(e, c) {
-        return (this.#readdirMaybePromoteChild(e, c) ||
-            this.#readdirAddNewChild(e, c));
-    }
-    #readdirAddNewChild(e, c) {
-        // alloc new entry at head, so it's never provisional
-        const type = entToType(e);
-        const child = this.newChild(e.name, type, { parent: this });
-        const ifmt = child.#type & IFMT;
-        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
-            child.#type |= ENOTDIR;
-        }
-        c.unshift(child);
-        c.provisional++;
-        return child;
-    }
-    #readdirMaybePromoteChild(e, c) {
-        for (let p = c.provisional; p < c.length; p++) {
-            const pchild = c[p];
-            const name = this.nocase
-                ? normalizeNocase(e.name)
-                : normalize(e.name);
-            if (name !== pchild.#matchName) {
-                continue;
-            }
-            return this.#readdirPromoteChild(e, pchild, p, c);
-        }
-    }
-    #readdirPromoteChild(e, p, index, c) {
-        const v = p.name;
-        // retain any other flags, but set ifmt from dirent
-        p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e);
-        // case sensitivity fixing when we learn the true name.
-        if (v !== e.name)
-            p.name = e.name;
-        // just advance provisional index (potentially off the list),
-        // otherwise we have to splice/pop it out and re-insert at head
-        if (index !== c.provisional) {
-            if (index === c.length - 1)
-                c.pop();
-            else
-                c.splice(index, 1);
-            c.unshift(p);
-        }
-        c.provisional++;
-        return p;
-    }
-    /**
-     * Call lstat() on this Path, and update all known information that can be
-     * determined.
-     *
-     * Note that unlike `fs.lstat()`, the returned value does not contain some
-     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-     * information is required, you will need to call `fs.lstat` yourself.
-     *
-     * If the Path refers to a nonexistent file, or if the lstat call fails for
-     * any reason, `undefined` is returned.  Otherwise the updated Path object is
-     * returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async lstat() {
-        if ((this.#type & ENOENT) === 0) {
-            try {
-                this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
-                return this;
-            }
-            catch (er) {
-                this.#lstatFail(er.code);
-            }
-        }
-    }
-    /**
-     * synchronous {@link PathBase.lstat}
-     */
-    lstatSync() {
-        if ((this.#type & ENOENT) === 0) {
-            try {
-                this.#applyStat(this.#fs.lstatSync(this.fullpath()));
-                return this;
-            }
-            catch (er) {
-                this.#lstatFail(er.code);
-            }
-        }
-    }
-    #applyStat(st) {
-        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid, } = st;
-        this.#atime = atime;
-        this.#atimeMs = atimeMs;
-        this.#birthtime = birthtime;
-        this.#birthtimeMs = birthtimeMs;
-        this.#blksize = blksize;
-        this.#blocks = blocks;
-        this.#ctime = ctime;
-        this.#ctimeMs = ctimeMs;
-        this.#dev = dev;
-        this.#gid = gid;
-        this.#ino = ino;
-        this.#mode = mode;
-        this.#mtime = mtime;
-        this.#mtimeMs = mtimeMs;
-        this.#nlink = nlink;
-        this.#rdev = rdev;
-        this.#size = size;
-        this.#uid = uid;
-        const ifmt = entToType(st);
-        // retain any other flags, but set the ifmt
-        this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED;
-        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
-            this.#type |= ENOTDIR;
-        }
-    }
-    #onReaddirCB = [];
-    #readdirCBInFlight = false;
-    #callOnReaddirCB(children) {
-        this.#readdirCBInFlight = false;
-        const cbs = this.#onReaddirCB.slice();
-        this.#onReaddirCB.length = 0;
-        cbs.forEach(cb => cb(null, children));
-    }
-    /**
-     * Standard node-style callback interface to get list of directory entries.
-     *
-     * If the Path cannot or does not contain any children, then an empty array
-     * is returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     *
-     * @param cb The callback called with (er, entries).  Note that the `er`
-     * param is somewhat extraneous, as all readdir() errors are handled and
-     * simply result in an empty set of entries being returned.
-     * @param allowZalgo Boolean indicating that immediately known results should
-     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
-     * zalgo at your peril, the dark pony lord is devious and unforgiving.
-     */
-    readdirCB(cb, allowZalgo = false) {
-        if (!this.canReaddir()) {
-            if (allowZalgo)
-                cb(null, []);
-            else
-                queueMicrotask(() => cb(null, []));
-            return;
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            const c = children.slice(0, children.provisional);
-            if (allowZalgo)
-                cb(null, c);
-            else
-                queueMicrotask(() => cb(null, c));
-            return;
-        }
-        // don't have to worry about zalgo at this point.
-        this.#onReaddirCB.push(cb);
-        if (this.#readdirCBInFlight) {
-            return;
-        }
-        this.#readdirCBInFlight = true;
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
-            if (er) {
-                this.#readdirFail(er.code);
-                children.provisional = 0;
-            }
-            else {
-                // if we didn't get an error, we always get entries.
-                //@ts-ignore
-                for (const e of entries) {
-                    this.#readdirAddChild(e, children);
-                }
-                this.#readdirSuccess(children);
-            }
-            this.#callOnReaddirCB(children.slice(0, children.provisional));
-            return;
-        });
-    }
-    #asyncReaddirInFlight;
-    /**
-     * Return an array of known child entries.
-     *
-     * If the Path cannot or does not contain any children, then an empty array
-     * is returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async readdir() {
-        if (!this.canReaddir()) {
-            return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-        }
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        if (this.#asyncReaddirInFlight) {
-            await this.#asyncReaddirInFlight;
-        }
-        else {
-            /* c8 ignore start */
-            let resolve = () => { };
-            /* c8 ignore stop */
-            this.#asyncReaddirInFlight = new Promise(res => (resolve = res));
-            try {
-                for (const e of await this.#fs.promises.readdir(fullpath, {
-                    withFileTypes: true,
-                })) {
-                    this.#readdirAddChild(e, children);
-                }
-                this.#readdirSuccess(children);
-            }
-            catch (er) {
-                this.#readdirFail(er.code);
-                children.provisional = 0;
-            }
-            this.#asyncReaddirInFlight = undefined;
-            resolve();
-        }
-        return children.slice(0, children.provisional);
-    }
-    /**
-     * synchronous {@link PathBase.readdir}
-     */
-    readdirSync() {
-        if (!this.canReaddir()) {
-            return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-        }
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        try {
-            for (const e of this.#fs.readdirSync(fullpath, {
-                withFileTypes: true,
-            })) {
-                this.#readdirAddChild(e, children);
-            }
-            this.#readdirSuccess(children);
-        }
-        catch (er) {
-            this.#readdirFail(er.code);
-            children.provisional = 0;
-        }
-        return children.slice(0, children.provisional);
-    }
-    canReaddir() {
-        if (this.#type & ENOCHILD)
-            return false;
-        const ifmt = IFMT & this.#type;
-        // we always set ENOTDIR when setting IFMT, so should be impossible
-        /* c8 ignore start */
-        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
-            return false;
-        }
-        /* c8 ignore stop */
-        return true;
-    }
-    shouldWalk(dirs, walkFilter) {
-        return ((this.#type & IFDIR) === IFDIR &&
-            !(this.#type & ENOCHILD) &&
-            !dirs.has(this) &&
-            (!walkFilter || walkFilter(this)));
-    }
-    /**
-     * Return the Path object corresponding to path as resolved
-     * by realpath(3).
-     *
-     * If the realpath call fails for any reason, `undefined` is returned.
-     *
-     * Result is cached, and thus may be outdated if the filesystem is mutated.
-     * On success, returns a Path object.
-     */
-    async realpath() {
-        if (this.#realpath)
-            return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-        try {
-            const rp = await this.#fs.promises.realpath(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-        }
-        catch (_) {
-            this.#markENOREALPATH();
-        }
-    }
-    /**
-     * Synchronous {@link realpath}
-     */
-    realpathSync() {
-        if (this.#realpath)
-            return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-        try {
-            const rp = this.#fs.realpathSync(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-        }
-        catch (_) {
-            this.#markENOREALPATH();
-        }
-    }
-    /**
-     * Internal method to mark this Path object as the scurry cwd,
-     * called by {@link PathScurry#chdir}
-     *
-     * @internal
-     */
-    [setAsCwd](oldCwd) {
-        if (oldCwd === this)
-            return;
-        const changed = new Set([]);
-        let rp = [];
-        let p = this;
-        while (p && p.parent) {
-            changed.add(p);
-            p.#relative = rp.join(this.sep);
-            p.#relativePosix = rp.join('/');
-            p = p.parent;
-            rp.push('..');
-        }
-        // now un-memoize parents of old cwd
-        p = oldCwd;
-        while (p && p.parent && !changed.has(p)) {
-            p.#relative = undefined;
-            p.#relativePosix = undefined;
-            p = p.parent;
-        }
-    }
-}
-exports.PathBase = PathBase;
-/**
- * Path class used on win32 systems
- *
- * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
- * as the path separator for parsing paths.
- */
-class PathWin32 extends PathBase {
-    /**
-     * Separator for generating path strings.
-     */
-    sep = '\\';
-    /**
-     * Separator for parsing path strings.
-     */
-    splitSep = eitherSep;
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type, root, roots, nocase, children, opts);
-    }
-    /**
-     * @internal
-     */
-    newChild(name, type = UNKNOWN, opts = {}) {
-        return new PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
-    }
-    /**
-     * @internal
-     */
-    getRootString(path) {
-        return path_1.win32.parse(path).root;
-    }
-    /**
-     * @internal
-     */
-    getRoot(rootPath) {
-        rootPath = uncToDrive(rootPath.toUpperCase());
-        if (rootPath === this.root.name) {
-            return this.root;
-        }
-        // ok, not that one, check if it matches another we know about
-        for (const [compare, root] of Object.entries(this.roots)) {
-            if (this.sameRoot(rootPath, compare)) {
-                return (this.roots[rootPath] = root);
-            }
-        }
-        // otherwise, have to create a new one.
-        return (this.roots[rootPath] = new PathScurryWin32(rootPath, this).root);
-    }
-    /**
-     * @internal
-     */
-    sameRoot(rootPath, compare = this.root.name) {
-        // windows can (rarely) have case-sensitive filesystem, but
-        // UNC and drive letters are always case-insensitive, and canonically
-        // represented uppercase.
-        rootPath = rootPath
-            .toUpperCase()
-            .replace(/\//g, '\\')
-            .replace(uncDriveRegexp, '$1\\');
-        return rootPath === compare;
-    }
-}
-exports.PathWin32 = PathWin32;
-/**
- * Path class used on all posix systems.
- *
- * Uses `'/'` as the path separator.
- */
-class PathPosix extends PathBase {
-    /**
-     * separator for parsing path strings
-     */
-    splitSep = '/';
-    /**
-     * separator for generating path strings
-     */
-    sep = '/';
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type, root, roots, nocase, children, opts);
-    }
-    /**
-     * @internal
-     */
-    getRootString(path) {
-        return path.startsWith('/') ? '/' : '';
-    }
-    /**
-     * @internal
-     */
-    getRoot(_rootPath) {
-        return this.root;
-    }
-    /**
-     * @internal
-     */
-    newChild(name, type = UNKNOWN, opts = {}) {
-        return new PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
-    }
-}
-exports.PathPosix = PathPosix;
-/**
- * The base class for all PathScurry classes, providing the interface for path
- * resolution and filesystem operations.
- *
- * Typically, you should *not* instantiate this class directly, but rather one
- * of the platform-specific classes, or the exported {@link PathScurry} which
- * defaults to the current platform.
- */
-class PathScurryBase {
-    /**
-     * The root Path entry for the current working directory of this Scurry
-     */
-    root;
-    /**
-     * The string path for the root of this Scurry's current working directory
-     */
-    rootPath;
-    /**
-     * A collection of all roots encountered, referenced by rootPath
-     */
-    roots;
-    /**
-     * The Path entry corresponding to this PathScurry's current working directory.
-     */
-    cwd;
-    #resolveCache;
-    #resolvePosixCache;
-    #children;
-    /**
-     * Perform path comparisons case-insensitively.
-     *
-     * Defaults true on Darwin and Windows systems, false elsewhere.
-     */
-    nocase;
-    #fs;
-    /**
-     * This class should not be instantiated directly.
-     *
-     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
-     *
-     * @internal
-     */
-    constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
-        this.#fs = fsFromOption(fs);
-        if (cwd instanceof URL || cwd.startsWith('file://')) {
-            cwd = (0, url_1.fileURLToPath)(cwd);
-        }
-        // resolve and split root, and then add to the store.
-        // this is the only time we call path.resolve()
-        const cwdPath = pathImpl.resolve(cwd);
-        this.roots = Object.create(null);
-        this.rootPath = this.parseRootPath(cwdPath);
-        this.#resolveCache = new ResolveCache();
-        this.#resolvePosixCache = new ResolveCache();
-        this.#children = new ChildrenCache(childrenCacheSize);
-        const split = cwdPath.substring(this.rootPath.length).split(sep);
-        // resolve('/') leaves '', splits to [''], we don't want that.
-        if (split.length === 1 && !split[0]) {
-            split.pop();
-        }
-        /* c8 ignore start */
-        if (nocase === undefined) {
-            throw new TypeError('must provide nocase setting to PathScurryBase ctor');
-        }
-        /* c8 ignore stop */
-        this.nocase = nocase;
-        this.root = this.newRoot(this.#fs);
-        this.roots[this.rootPath] = this.root;
-        let prev = this.root;
-        let len = split.length - 1;
-        const joinSep = pathImpl.sep;
-        let abs = this.rootPath;
-        let sawFirst = false;
-        for (const part of split) {
-            const l = len--;
-            prev = prev.child(part, {
-                relative: new Array(l).fill('..').join(joinSep),
-                relativePosix: new Array(l).fill('..').join('/'),
-                fullpath: (abs += (sawFirst ? '' : joinSep) + part),
-            });
-            sawFirst = true;
-        }
-        this.cwd = prev;
-    }
-    /**
-     * Get the depth of a provided path, string, or the cwd
-     */
-    depth(path = this.cwd) {
-        if (typeof path === 'string') {
-            path = this.cwd.resolve(path);
-        }
-        return path.depth();
-    }
-    /**
-     * Return the cache of child entries.  Exposed so subclasses can create
-     * child Path objects in a platform-specific way.
-     *
-     * @internal
-     */
-    childrenCache() {
-        return this.#children;
-    }
-    /**
-     * Resolve one or more path strings to a resolved string
-     *
-     * Same interface as require('path').resolve.
-     *
-     * Much faster than path.resolve() when called multiple times for the same
-     * path, because the resolved Path objects are cached.  Much slower
-     * otherwise.
-     */
-    resolve(...paths) {
-        // first figure out the minimum number of paths we have to test
-        // we always start at cwd, but any absolutes will bump the start
-        let r = '';
-        for (let i = paths.length - 1; i >= 0; i--) {
-            const p = paths[i];
-            if (!p || p === '.')
-                continue;
-            r = r ? `${p}/${r}` : p;
-            if (this.isAbsolute(p)) {
-                break;
-            }
-        }
-        const cached = this.#resolveCache.get(r);
-        if (cached !== undefined) {
-            return cached;
-        }
-        const result = this.cwd.resolve(r).fullpath();
-        this.#resolveCache.set(r, result);
-        return result;
-    }
-    /**
-     * Resolve one or more path strings to a resolved string, returning
-     * the posix path.  Identical to .resolve() on posix systems, but on
-     * windows will return a forward-slash separated UNC path.
-     *
-     * Same interface as require('path').resolve.
-     *
-     * Much faster than path.resolve() when called multiple times for the same
-     * path, because the resolved Path objects are cached.  Much slower
-     * otherwise.
-     */
-    resolvePosix(...paths) {
-        // first figure out the minimum number of paths we have to test
-        // we always start at cwd, but any absolutes will bump the start
-        let r = '';
-        for (let i = paths.length - 1; i >= 0; i--) {
-            const p = paths[i];
-            if (!p || p === '.')
-                continue;
-            r = r ? `${p}/${r}` : p;
-            if (this.isAbsolute(p)) {
-                break;
-            }
-        }
-        const cached = this.#resolvePosixCache.get(r);
-        if (cached !== undefined) {
-            return cached;
-        }
-        const result = this.cwd.resolve(r).fullpathPosix();
-        this.#resolvePosixCache.set(r, result);
-        return result;
-    }
-    /**
-     * find the relative path from the cwd to the supplied path string or entry
-     */
-    relative(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.relative();
-    }
-    /**
-     * find the relative path from the cwd to the supplied path string or
-     * entry, using / as the path delimiter, even on Windows.
-     */
-    relativePosix(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.relativePosix();
-    }
-    /**
-     * Return the basename for the provided string or Path object
-     */
-    basename(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.name;
-    }
-    /**
-     * Return the dirname for the provided string or Path object
-     */
-    dirname(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return (entry.parent || entry).fullpath();
-    }
-    async readdir(entry = this.cwd, opts = {
-        withFileTypes: true,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes } = opts;
-        if (!entry.canReaddir()) {
-            return [];
-        }
-        else {
-            const p = await entry.readdir();
-            return withFileTypes ? p : p.map(e => e.name);
-        }
-    }
-    readdirSync(entry = this.cwd, opts = {
-        withFileTypes: true,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true } = opts;
-        if (!entry.canReaddir()) {
-            return [];
-        }
-        else if (withFileTypes) {
-            return entry.readdirSync();
-        }
-        else {
-            return entry.readdirSync().map(e => e.name);
-        }
-    }
-    /**
-     * Call lstat() on the string or Path object, and update all known
-     * information that can be determined.
-     *
-     * Note that unlike `fs.lstat()`, the returned value does not contain some
-     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-     * information is required, you will need to call `fs.lstat` yourself.
-     *
-     * If the Path refers to a nonexistent file, or if the lstat call fails for
-     * any reason, `undefined` is returned.  Otherwise the updated Path object is
-     * returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async lstat(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.lstat();
-    }
-    /**
-     * synchronous {@link PathScurryBase.lstat}
-     */
-    lstatSync(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.lstatSync();
-    }
-    async readlink(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = await entry.readlink();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    readlinkSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = entry.readlinkSync();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    async realpath(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = await entry.realpath();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    realpathSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = entry.realpathSync();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    async walk(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set();
-        const walk = (dir, cb) => {
-            dirs.add(dir);
-            dir.readdirCB((er, entries) => {
-                /* c8 ignore start */
-                if (er) {
-                    return cb(er);
-                }
-                /* c8 ignore stop */
-                let len = entries.length;
-                if (!len)
-                    return cb();
-                const next = () => {
-                    if (--len === 0) {
-                        cb();
-                    }
-                };
-                for (const e of entries) {
-                    if (!filter || filter(e)) {
-                        results.push(withFileTypes ? e : e.fullpath());
-                    }
-                    if (follow && e.isSymbolicLink()) {
-                        e.realpath()
-                            .then(r => (r?.isUnknown() ? r.lstat() : r))
-                            .then(r => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
-                    }
-                    else {
-                        if (e.shouldWalk(dirs, walkFilter)) {
-                            walk(e, next);
-                        }
-                        else {
-                            next();
-                        }
-                    }
-                }
-            }, true); // zalgooooooo
-        };
-        const start = entry;
-        return new Promise((res, rej) => {
-            walk(start, er => {
-                /* c8 ignore start */
-                if (er)
-                    return rej(er);
-                /* c8 ignore stop */
-                res(results);
-            });
-        });
-    }
-    walkSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set([entry]);
-        for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-                if (!filter || filter(e)) {
-                    results.push(withFileTypes ? e : e.fullpath());
-                }
-                let r = e;
-                if (e.isSymbolicLink()) {
-                    if (!(follow && (r = e.realpathSync())))
-                        continue;
-                    if (r.isUnknown())
-                        r.lstatSync();
-                }
-                if (r.shouldWalk(dirs, walkFilter)) {
-                    dirs.add(r);
-                }
-            }
-        }
-        return results;
-    }
-    /**
-     * Support for `for await`
-     *
-     * Alias for {@link PathScurryBase.iterate}
-     *
-     * Note: As of Node 19, this is very slow, compared to other methods of
-     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
-     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
-     */
-    [Symbol.asyncIterator]() {
-        return this.iterate();
-    }
-    iterate(entry = this.cwd, options = {}) {
-        // iterating async over the stream is significantly more performant,
-        // especially in the warm-cache scenario, because it buffers up directory
-        // entries in the background instead of waiting for a yield for each one.
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            options = entry;
-            entry = this.cwd;
-        }
-        return this.stream(entry, options)[Symbol.asyncIterator]();
-    }
-    /**
-     * Iterating over a PathScurry performs a synchronous walk.
-     *
-     * Alias for {@link PathScurryBase.iterateSync}
-     */
-    [Symbol.iterator]() {
-        return this.iterateSync();
-    }
-    *iterateSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        if (!filter || filter(entry)) {
-            yield withFileTypes ? entry : entry.fullpath();
-        }
-        const dirs = new Set([entry]);
-        for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-                if (!filter || filter(e)) {
-                    yield withFileTypes ? e : e.fullpath();
-                }
-                let r = e;
-                if (e.isSymbolicLink()) {
-                    if (!(follow && (r = e.realpathSync())))
-                        continue;
-                    if (r.isUnknown())
-                        r.lstatSync();
-                }
-                if (r.shouldWalk(dirs, walkFilter)) {
-                    dirs.add(r);
-                }
-            }
-        }
-    }
-    stream(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = new minipass_1.Minipass({ objectMode: true });
-        if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set();
-        const queue = [entry];
-        let processing = 0;
-        const process = () => {
-            let paused = false;
-            while (!paused) {
-                const dir = queue.shift();
-                if (!dir) {
-                    if (processing === 0)
-                        results.end();
-                    return;
-                }
-                processing++;
-                dirs.add(dir);
-                const onReaddir = (er, entries, didRealpaths = false) => {
-                    /* c8 ignore start */
-                    if (er)
-                        return results.emit('error', er);
-                    /* c8 ignore stop */
-                    if (follow && !didRealpaths) {
-                        const promises = [];
-                        for (const e of entries) {
-                            if (e.isSymbolicLink()) {
-                                promises.push(e
-                                    .realpath()
-                                    .then((r) => r?.isUnknown() ? r.lstat() : r));
-                            }
-                        }
-                        if (promises.length) {
-                            Promise.all(promises).then(() => onReaddir(null, entries, true));
-                            return;
-                        }
-                    }
-                    for (const e of entries) {
-                        if (e && (!filter || filter(e))) {
-                            if (!results.write(withFileTypes ? e : e.fullpath())) {
-                                paused = true;
-                            }
-                        }
-                    }
-                    processing--;
-                    for (const e of entries) {
-                        const r = e.realpathCached() || e;
-                        if (r.shouldWalk(dirs, walkFilter)) {
-                            queue.push(r);
-                        }
-                    }
-                    if (paused && !results.flowing) {
-                        results.once('drain', process);
-                    }
-                    else if (!sync) {
-                        process();
-                    }
-                };
-                // zalgo containment
-                let sync = true;
-                dir.readdirCB(onReaddir, true);
-                sync = false;
-            }
-        };
-        process();
-        return results;
-    }
-    streamSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = new minipass_1.Minipass({ objectMode: true });
-        const dirs = new Set();
-        if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const queue = [entry];
-        let processing = 0;
-        const process = () => {
-            let paused = false;
-            while (!paused) {
-                const dir = queue.shift();
-                if (!dir) {
-                    if (processing === 0)
-                        results.end();
-                    return;
-                }
-                processing++;
-                dirs.add(dir);
-                const entries = dir.readdirSync();
-                for (const e of entries) {
-                    if (!filter || filter(e)) {
-                        if (!results.write(withFileTypes ? e : e.fullpath())) {
-                            paused = true;
-                        }
-                    }
-                }
-                processing--;
-                for (const e of entries) {
-                    let r = e;
-                    if (e.isSymbolicLink()) {
-                        if (!(follow && (r = e.realpathSync())))
-                            continue;
-                        if (r.isUnknown())
-                            r.lstatSync();
-                    }
-                    if (r.shouldWalk(dirs, walkFilter)) {
-                        queue.push(r);
-                    }
-                }
-            }
-            if (paused && !results.flowing)
-                results.once('drain', process);
-        };
-        process();
-        return results;
-    }
-    chdir(path = this.cwd) {
-        const oldCwd = this.cwd;
-        this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
-        this.cwd[setAsCwd](oldCwd);
-    }
-}
-exports.PathScurryBase = PathScurryBase;
-/**
- * Windows implementation of {@link PathScurryBase}
- *
- * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
- * {@link PathWin32} for Path objects.
- */
-class PathScurryWin32 extends PathScurryBase {
-    /**
-     * separator for generating path strings
-     */
-    sep = '\\';
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, path_1.win32, '\\', { ...opts, nocase });
-        this.nocase = nocase;
-        for (let p = this.cwd; p; p = p.parent) {
-            p.nocase = this.nocase;
-        }
-    }
-    /**
-     * @internal
-     */
-    parseRootPath(dir) {
-        // if the path starts with a single separator, it's not a UNC, and we'll
-        // just get separator as the root, and driveFromUNC will return \
-        // In that case, mount \ on the root from the cwd.
-        return path_1.win32.parse(dir).root.toUpperCase();
-    }
-    /**
-     * @internal
-     */
-    newRoot(fs) {
-        return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
-    }
-    /**
-     * Return true if the provided path string is an absolute path
-     */
-    isAbsolute(p) {
-        return (p.startsWith('/') || p.startsWith('\\') || /^[a-z]:(\/|\\)/i.test(p));
-    }
-}
-exports.PathScurryWin32 = PathScurryWin32;
-/**
- * {@link PathScurryBase} implementation for all posix systems other than Darwin.
- *
- * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
- *
- * Uses {@link PathPosix} for Path objects.
- */
-class PathScurryPosix extends PathScurryBase {
-    /**
-     * separator for generating path strings
-     */
-    sep = '/';
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = false } = opts;
-        super(cwd, path_1.posix, '/', { ...opts, nocase });
-        this.nocase = nocase;
-    }
-    /**
-     * @internal
-     */
-    parseRootPath(_dir) {
-        return '/';
-    }
-    /**
-     * @internal
-     */
-    newRoot(fs) {
-        return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
-    }
-    /**
-     * Return true if the provided path string is an absolute path
-     */
-    isAbsolute(p) {
-        return p.startsWith('/');
-    }
-}
-exports.PathScurryPosix = PathScurryPosix;
-/**
- * {@link PathScurryBase} implementation for Darwin (macOS) systems.
- *
- * Defaults to case-insensitive matching, uses `'/'` for generating path
- * strings.
- *
- * Uses {@link PathPosix} for Path objects.
- */
-class PathScurryDarwin extends PathScurryPosix {
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, { ...opts, nocase });
-    }
-}
-exports.PathScurryDarwin = PathScurryDarwin;
-/**
- * Default {@link PathBase} implementation for the current platform.
- *
- * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
- */
-exports.Path = process.platform === 'win32' ? PathWin32 : PathPosix;
-/**
- * Default {@link PathScurryBase} implementation for the current platform.
- *
- * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
- * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
- */
-exports.PathScurry = process.platform === 'win32'
-    ? PathScurryWin32
-    : process.platform === 'darwin'
-        ? PathScurryDarwin
-        : PathScurryPosix;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/path-scurry/dist/cjs/package.json b/node_modules/npm/node_modules/path-scurry/dist/cjs/package.json
deleted file mode 100644
index 5bbefff..0000000
--- a/node_modules/npm/node_modules/path-scurry/dist/cjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "type": "commonjs"
-}
diff --git a/node_modules/npm/node_modules/path-scurry/dist/mjs/index.js b/node_modules/npm/node_modules/path-scurry/dist/mjs/index.js
deleted file mode 100644
index 079253a..0000000
--- a/node_modules/npm/node_modules/path-scurry/dist/mjs/index.js
+++ /dev/null
@@ -1,1983 +0,0 @@
-import { LRUCache } from 'lru-cache';
-import { posix, win32 } from 'path';
-import { fileURLToPath } from 'url';
-import * as actualFS from 'fs';
-import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps, } from 'fs';
-const realpathSync = rps.native;
-// TODO: test perf of fs/promises realpath vs realpathCB,
-// since the promises one uses realpath.native
-import { lstat, readdir, readlink, realpath } from 'fs/promises';
-import { Minipass } from 'minipass';
-const defaultFS = {
-    lstatSync,
-    readdir: readdirCB,
-    readdirSync,
-    readlinkSync,
-    realpathSync,
-    promises: {
-        lstat,
-        readdir,
-        readlink,
-        realpath,
-    },
-};
-// if they just gave us require('fs') then use our default
-const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS
-    ? defaultFS
-    : {
-        ...defaultFS,
-        ...fsOption,
-        promises: {
-            ...defaultFS.promises,
-            ...(fsOption.promises || {}),
-        },
-    };
-// turn something like //?/c:/ into c:\
-const uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
-const uncToDrive = (rootPath) => rootPath.replace(/\//g, '\\').replace(uncDriveRegexp, '$1\\');
-// windows paths are separated by either / or \
-const eitherSep = /[\\\/]/;
-const UNKNOWN = 0; // may not even exist, for all we know
-const IFIFO = 0b0001;
-const IFCHR = 0b0010;
-const IFDIR = 0b0100;
-const IFBLK = 0b0110;
-const IFREG = 0b1000;
-const IFLNK = 0b1010;
-const IFSOCK = 0b1100;
-const IFMT = 0b1111;
-// mask to unset low 4 bits
-const IFMT_UNKNOWN = ~IFMT;
-// set after successfully calling readdir() and getting entries.
-const READDIR_CALLED = 16;
-// set after a successful lstat()
-const LSTAT_CALLED = 32;
-// set if an entry (or one of its parents) is definitely not a dir
-const ENOTDIR = 64;
-// set if an entry (or one of its parents) does not exist
-// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
-const ENOENT = 128;
-// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
-// set if we fail to readlink
-const ENOREADLINK = 256;
-// set if we know realpath() will fail
-const ENOREALPATH = 512;
-const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
-const TYPEMASK = 1023;
-const entToType = (s) => s.isFile()
-    ? IFREG
-    : s.isDirectory()
-        ? IFDIR
-        : s.isSymbolicLink()
-            ? IFLNK
-            : s.isCharacterDevice()
-                ? IFCHR
-                : s.isBlockDevice()
-                    ? IFBLK
-                    : s.isSocket()
-                        ? IFSOCK
-                        : s.isFIFO()
-                            ? IFIFO
-                            : UNKNOWN;
-// normalize unicode path names
-const normalizeCache = new Map();
-const normalize = (s) => {
-    const c = normalizeCache.get(s);
-    if (c)
-        return c;
-    const n = s.normalize('NFKD');
-    normalizeCache.set(s, n);
-    return n;
-};
-const normalizeNocaseCache = new Map();
-const normalizeNocase = (s) => {
-    const c = normalizeNocaseCache.get(s);
-    if (c)
-        return c;
-    const n = normalize(s.toLowerCase());
-    normalizeNocaseCache.set(s, n);
-    return n;
-};
-/**
- * An LRUCache for storing resolved path strings or Path objects.
- * @internal
- */
-export class ResolveCache extends LRUCache {
-    constructor() {
-        super({ max: 256 });
-    }
-}
-// In order to prevent blowing out the js heap by allocating hundreds of
-// thousands of Path entries when walking extremely large trees, the "children"
-// in this tree are represented by storing an array of Path entries in an
-// LRUCache, indexed by the parent.  At any time, Path.children() may return an
-// empty array, indicating that it doesn't know about any of its children, and
-// thus has to rebuild that cache.  This is fine, it just means that we don't
-// benefit as much from having the cached entries, but huge directory walks
-// don't blow out the stack, and smaller ones are still as fast as possible.
-//
-//It does impose some complexity when building up the readdir data, because we
-//need to pass a reference to the children array that we started with.
-/**
- * an LRUCache for storing child entries.
- * @internal
- */
-export class ChildrenCache extends LRUCache {
-    constructor(maxSize = 16 * 1024) {
-        super({
-            maxSize,
-            // parent + children
-            sizeCalculation: a => a.length + 1,
-        });
-    }
-}
-const setAsCwd = Symbol('PathScurry setAsCwd');
-/**
- * Path objects are sort of like a super-powered
- * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
- *
- * Each one represents a single filesystem entry on disk, which may or may not
- * exist. It includes methods for reading various types of information via
- * lstat, readlink, and readdir, and caches all information to the greatest
- * degree possible.
- *
- * Note that fs operations that would normally throw will instead return an
- * "empty" value. This is in order to prevent excessive overhead from error
- * stack traces.
- */
-export class PathBase {
-    /**
-     * the basename of this path
-     *
-     * **Important**: *always* test the path name against any test string
-     * usingthe {@link isNamed} method, and not by directly comparing this
-     * string. Otherwise, unicode path strings that the system sees as identical
-     * will not be properly treated as the same path, leading to incorrect
-     * behavior and possible security issues.
-     */
-    name;
-    /**
-     * the Path entry corresponding to the path root.
-     *
-     * @internal
-     */
-    root;
-    /**
-     * All roots found within the current PathScurry family
-     *
-     * @internal
-     */
-    roots;
-    /**
-     * a reference to the parent path, or undefined in the case of root entries
-     *
-     * @internal
-     */
-    parent;
-    /**
-     * boolean indicating whether paths are compared case-insensitively
-     * @internal
-     */
-    nocase;
-    // potential default fs override
-    #fs;
-    // Stats fields
-    #dev;
-    get dev() {
-        return this.#dev;
-    }
-    #mode;
-    get mode() {
-        return this.#mode;
-    }
-    #nlink;
-    get nlink() {
-        return this.#nlink;
-    }
-    #uid;
-    get uid() {
-        return this.#uid;
-    }
-    #gid;
-    get gid() {
-        return this.#gid;
-    }
-    #rdev;
-    get rdev() {
-        return this.#rdev;
-    }
-    #blksize;
-    get blksize() {
-        return this.#blksize;
-    }
-    #ino;
-    get ino() {
-        return this.#ino;
-    }
-    #size;
-    get size() {
-        return this.#size;
-    }
-    #blocks;
-    get blocks() {
-        return this.#blocks;
-    }
-    #atimeMs;
-    get atimeMs() {
-        return this.#atimeMs;
-    }
-    #mtimeMs;
-    get mtimeMs() {
-        return this.#mtimeMs;
-    }
-    #ctimeMs;
-    get ctimeMs() {
-        return this.#ctimeMs;
-    }
-    #birthtimeMs;
-    get birthtimeMs() {
-        return this.#birthtimeMs;
-    }
-    #atime;
-    get atime() {
-        return this.#atime;
-    }
-    #mtime;
-    get mtime() {
-        return this.#mtime;
-    }
-    #ctime;
-    get ctime() {
-        return this.#ctime;
-    }
-    #birthtime;
-    get birthtime() {
-        return this.#birthtime;
-    }
-    #matchName;
-    #depth;
-    #fullpath;
-    #fullpathPosix;
-    #relative;
-    #relativePosix;
-    #type;
-    #children;
-    #linkTarget;
-    #realpath;
-    /**
-     * This property is for compatibility with the Dirent class as of
-     * Node v20, where Dirent['path'] refers to the path of the directory
-     * that was passed to readdir.  So, somewhat counterintuitively, this
-     * property refers to the *parent* path, not the path object itself.
-     * For root entries, it's the path to the entry itself.
-     */
-    get path() {
-        return (this.parent || this).fullpath();
-    }
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        this.name = name;
-        this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
-        this.#type = type & TYPEMASK;
-        this.nocase = nocase;
-        this.roots = roots;
-        this.root = root || this;
-        this.#children = children;
-        this.#fullpath = opts.fullpath;
-        this.#relative = opts.relative;
-        this.#relativePosix = opts.relativePosix;
-        this.parent = opts.parent;
-        if (this.parent) {
-            this.#fs = this.parent.#fs;
-        }
-        else {
-            this.#fs = fsFromOption(opts.fs);
-        }
-    }
-    /**
-     * Returns the depth of the Path object from its root.
-     *
-     * For example, a path at `/foo/bar` would have a depth of 2.
-     */
-    depth() {
-        if (this.#depth !== undefined)
-            return this.#depth;
-        if (!this.parent)
-            return (this.#depth = 0);
-        return (this.#depth = this.parent.depth() + 1);
-    }
-    /**
-     * @internal
-     */
-    childrenCache() {
-        return this.#children;
-    }
-    /**
-     * Get the Path object referenced by the string path, resolved from this Path
-     */
-    resolve(path) {
-        if (!path) {
-            return this;
-        }
-        const rootPath = this.getRootString(path);
-        const dir = path.substring(rootPath.length);
-        const dirParts = dir.split(this.splitSep);
-        const result = rootPath
-            ? this.getRoot(rootPath).#resolveParts(dirParts)
-            : this.#resolveParts(dirParts);
-        return result;
-    }
-    #resolveParts(dirParts) {
-        let p = this;
-        for (const part of dirParts) {
-            p = p.child(part);
-        }
-        return p;
-    }
-    /**
-     * Returns the cached children Path objects, if still available.  If they
-     * have fallen out of the cache, then returns an empty array, and resets the
-     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
-     * lookup.
-     *
-     * @internal
-     */
-    children() {
-        const cached = this.#children.get(this);
-        if (cached) {
-            return cached;
-        }
-        const children = Object.assign([], { provisional: 0 });
-        this.#children.set(this, children);
-        this.#type &= ~READDIR_CALLED;
-        return children;
-    }
-    /**
-     * Resolves a path portion and returns or creates the child Path.
-     *
-     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
-     * `'..'`.
-     *
-     * This should not be called directly.  If `pathPart` contains any path
-     * separators, it will lead to unsafe undefined behavior.
-     *
-     * Use `Path.resolve()` instead.
-     *
-     * @internal
-     */
-    child(pathPart, opts) {
-        if (pathPart === '' || pathPart === '.') {
-            return this;
-        }
-        if (pathPart === '..') {
-            return this.parent || this;
-        }
-        // find the child
-        const children = this.children();
-        const name = this.nocase
-            ? normalizeNocase(pathPart)
-            : normalize(pathPart);
-        for (const p of children) {
-            if (p.#matchName === name) {
-                return p;
-            }
-        }
-        // didn't find it, create provisional child, since it might not
-        // actually exist.  If we know the parent isn't a dir, then
-        // in fact it CAN'T exist.
-        const s = this.parent ? this.sep : '';
-        const fullpath = this.#fullpath
-            ? this.#fullpath + s + pathPart
-            : undefined;
-        const pchild = this.newChild(pathPart, UNKNOWN, {
-            ...opts,
-            parent: this,
-            fullpath,
-        });
-        if (!this.canReaddir()) {
-            pchild.#type |= ENOENT;
-        }
-        // don't have to update provisional, because if we have real children,
-        // then provisional is set to children.length, otherwise a lower number
-        children.push(pchild);
-        return pchild;
-    }
-    /**
-     * The relative path from the cwd. If it does not share an ancestor with
-     * the cwd, then this ends up being equivalent to the fullpath()
-     */
-    relative() {
-        if (this.#relative !== undefined) {
-            return this.#relative;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#relative = this.name);
-        }
-        const pv = p.relative();
-        return pv + (!pv || !p.parent ? '' : this.sep) + name;
-    }
-    /**
-     * The relative path from the cwd, using / as the path separator.
-     * If it does not share an ancestor with
-     * the cwd, then this ends up being equivalent to the fullpathPosix()
-     * On posix systems, this is identical to relative().
-     */
-    relativePosix() {
-        if (this.sep === '/')
-            return this.relative();
-        if (this.#relativePosix !== undefined)
-            return this.#relativePosix;
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#relativePosix = this.fullpathPosix());
-        }
-        const pv = p.relativePosix();
-        return pv + (!pv || !p.parent ? '' : '/') + name;
-    }
-    /**
-     * The fully resolved path string for this Path entry
-     */
-    fullpath() {
-        if (this.#fullpath !== undefined) {
-            return this.#fullpath;
-        }
-        const name = this.name;
-        const p = this.parent;
-        if (!p) {
-            return (this.#fullpath = this.name);
-        }
-        const pv = p.fullpath();
-        const fp = pv + (!p.parent ? '' : this.sep) + name;
-        return (this.#fullpath = fp);
-    }
-    /**
-     * On platforms other than windows, this is identical to fullpath.
-     *
-     * On windows, this is overridden to return the forward-slash form of the
-     * full UNC path.
-     */
-    fullpathPosix() {
-        if (this.#fullpathPosix !== undefined)
-            return this.#fullpathPosix;
-        if (this.sep === '/')
-            return (this.#fullpathPosix = this.fullpath());
-        if (!this.parent) {
-            const p = this.fullpath().replace(/\\/g, '/');
-            if (/^[a-z]:\//i.test(p)) {
-                return (this.#fullpathPosix = `//?/${p}`);
-            }
-            else {
-                return (this.#fullpathPosix = p);
-            }
-        }
-        const p = this.parent;
-        const pfpp = p.fullpathPosix();
-        const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;
-        return (this.#fullpathPosix = fpp);
-    }
-    /**
-     * Is the Path of an unknown type?
-     *
-     * Note that we might know *something* about it if there has been a previous
-     * filesystem operation, for example that it does not exist, or is not a
-     * link, or whether it has child entries.
-     */
-    isUnknown() {
-        return (this.#type & IFMT) === UNKNOWN;
-    }
-    isType(type) {
-        return this[`is${type}`]();
-    }
-    getType() {
-        return this.isUnknown()
-            ? 'Unknown'
-            : this.isDirectory()
-                ? 'Directory'
-                : this.isFile()
-                    ? 'File'
-                    : this.isSymbolicLink()
-                        ? 'SymbolicLink'
-                        : this.isFIFO()
-                            ? 'FIFO'
-                            : this.isCharacterDevice()
-                                ? 'CharacterDevice'
-                                : this.isBlockDevice()
-                                    ? 'BlockDevice'
-                                    : /* c8 ignore start */ this.isSocket()
-                                        ? 'Socket'
-                                        : 'Unknown';
-        /* c8 ignore stop */
-    }
-    /**
-     * Is the Path a regular file?
-     */
-    isFile() {
-        return (this.#type & IFMT) === IFREG;
-    }
-    /**
-     * Is the Path a directory?
-     */
-    isDirectory() {
-        return (this.#type & IFMT) === IFDIR;
-    }
-    /**
-     * Is the path a character device?
-     */
-    isCharacterDevice() {
-        return (this.#type & IFMT) === IFCHR;
-    }
-    /**
-     * Is the path a block device?
-     */
-    isBlockDevice() {
-        return (this.#type & IFMT) === IFBLK;
-    }
-    /**
-     * Is the path a FIFO pipe?
-     */
-    isFIFO() {
-        return (this.#type & IFMT) === IFIFO;
-    }
-    /**
-     * Is the path a socket?
-     */
-    isSocket() {
-        return (this.#type & IFMT) === IFSOCK;
-    }
-    /**
-     * Is the path a symbolic link?
-     */
-    isSymbolicLink() {
-        return (this.#type & IFLNK) === IFLNK;
-    }
-    /**
-     * Return the entry if it has been subject of a successful lstat, or
-     * undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* simply
-     * mean that we haven't called lstat on it.
-     */
-    lstatCached() {
-        return this.#type & LSTAT_CALLED ? this : undefined;
-    }
-    /**
-     * Return the cached link target if the entry has been the subject of a
-     * successful readlink, or undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * readlink() has been called at some point.
-     */
-    readlinkCached() {
-        return this.#linkTarget;
-    }
-    /**
-     * Returns the cached realpath target if the entry has been the subject
-     * of a successful realpath, or undefined otherwise.
-     *
-     * Does not read the filesystem, so an undefined result *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * realpath() has been called at some point.
-     */
-    realpathCached() {
-        return this.#realpath;
-    }
-    /**
-     * Returns the cached child Path entries array if the entry has been the
-     * subject of a successful readdir(), or [] otherwise.
-     *
-     * Does not read the filesystem, so an empty array *could* just mean we
-     * don't have any cached data. Only use it if you are very sure that a
-     * readdir() has been called recently enough to still be valid.
-     */
-    readdirCached() {
-        const children = this.children();
-        return children.slice(0, children.provisional);
-    }
-    /**
-     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
-     * any indication that readlink will definitely fail.
-     *
-     * Returns false if the path is known to not be a symlink, if a previous
-     * readlink failed, or if the entry does not exist.
-     */
-    canReadlink() {
-        if (this.#linkTarget)
-            return true;
-        if (!this.parent)
-            return false;
-        // cases where it cannot possibly succeed
-        const ifmt = this.#type & IFMT;
-        return !((ifmt !== UNKNOWN && ifmt !== IFLNK) ||
-            this.#type & ENOREADLINK ||
-            this.#type & ENOENT);
-    }
-    /**
-     * Return true if readdir has previously been successfully called on this
-     * path, indicating that cachedReaddir() is likely valid.
-     */
-    calledReaddir() {
-        return !!(this.#type & READDIR_CALLED);
-    }
-    /**
-     * Returns true if the path is known to not exist. That is, a previous lstat
-     * or readdir failed to verify its existence when that would have been
-     * expected, or a parent entry was marked either enoent or enotdir.
-     */
-    isENOENT() {
-        return !!(this.#type & ENOENT);
-    }
-    /**
-     * Return true if the path is a match for the given path name.  This handles
-     * case sensitivity and unicode normalization.
-     *
-     * Note: even on case-sensitive systems, it is **not** safe to test the
-     * equality of the `.name` property to determine whether a given pathname
-     * matches, due to unicode normalization mismatches.
-     *
-     * Always use this method instead of testing the `path.name` property
-     * directly.
-     */
-    isNamed(n) {
-        return !this.nocase
-            ? this.#matchName === normalize(n)
-            : this.#matchName === normalizeNocase(n);
-    }
-    /**
-     * Return the Path object corresponding to the target of a symbolic link.
-     *
-     * If the Path is not a symbolic link, or if the readlink call fails for any
-     * reason, `undefined` is returned.
-     *
-     * Result is cached, and thus may be outdated if the filesystem is mutated.
-     */
-    async readlink() {
-        const target = this.#linkTarget;
-        if (target) {
-            return target;
-        }
-        if (!this.canReadlink()) {
-            return undefined;
-        }
-        /* c8 ignore start */
-        // already covered by the canReadlink test, here for ts grumples
-        if (!this.parent) {
-            return undefined;
-        }
-        /* c8 ignore stop */
-        try {
-            const read = await this.#fs.promises.readlink(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-                return (this.#linkTarget = linkTarget);
-            }
-        }
-        catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
-        }
-    }
-    /**
-     * Synchronous {@link PathBase.readlink}
-     */
-    readlinkSync() {
-        const target = this.#linkTarget;
-        if (target) {
-            return target;
-        }
-        if (!this.canReadlink()) {
-            return undefined;
-        }
-        /* c8 ignore start */
-        // already covered by the canReadlink test, here for ts grumples
-        if (!this.parent) {
-            return undefined;
-        }
-        /* c8 ignore stop */
-        try {
-            const read = this.#fs.readlinkSync(this.fullpath());
-            const linkTarget = this.parent.resolve(read);
-            if (linkTarget) {
-                return (this.#linkTarget = linkTarget);
-            }
-        }
-        catch (er) {
-            this.#readlinkFail(er.code);
-            return undefined;
-        }
-    }
-    #readdirSuccess(children) {
-        // succeeded, mark readdir called bit
-        this.#type |= READDIR_CALLED;
-        // mark all remaining provisional children as ENOENT
-        for (let p = children.provisional; p < children.length; p++) {
-            children[p].#markENOENT();
-        }
-    }
-    #markENOENT() {
-        // mark as UNKNOWN and ENOENT
-        if (this.#type & ENOENT)
-            return;
-        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
-        this.#markChildrenENOENT();
-    }
-    #markChildrenENOENT() {
-        // all children are provisional and do not exist
-        const children = this.children();
-        children.provisional = 0;
-        for (const p of children) {
-            p.#markENOENT();
-        }
-    }
-    #markENOREALPATH() {
-        this.#type |= ENOREALPATH;
-        this.#markENOTDIR();
-    }
-    // save the information when we know the entry is not a dir
-    #markENOTDIR() {
-        // entry is not a directory, so any children can't exist.
-        // this *should* be impossible, since any children created
-        // after it's been marked ENOTDIR should be marked ENOENT,
-        // so it won't even get to this point.
-        /* c8 ignore start */
-        if (this.#type & ENOTDIR)
-            return;
-        /* c8 ignore stop */
-        let t = this.#type;
-        // this could happen if we stat a dir, then delete it,
-        // then try to read it or one of its children.
-        if ((t & IFMT) === IFDIR)
-            t &= IFMT_UNKNOWN;
-        this.#type = t | ENOTDIR;
-        this.#markChildrenENOENT();
-    }
-    #readdirFail(code = '') {
-        // markENOTDIR and markENOENT also set provisional=0
-        if (code === 'ENOTDIR' || code === 'EPERM') {
-            this.#markENOTDIR();
-        }
-        else if (code === 'ENOENT') {
-            this.#markENOENT();
-        }
-        else {
-            this.children().provisional = 0;
-        }
-    }
-    #lstatFail(code = '') {
-        // Windows just raises ENOENT in this case, disable for win CI
-        /* c8 ignore start */
-        if (code === 'ENOTDIR') {
-            // already know it has a parent by this point
-            const p = this.parent;
-            p.#markENOTDIR();
-        }
-        else if (code === 'ENOENT') {
-            /* c8 ignore stop */
-            this.#markENOENT();
-        }
-    }
-    #readlinkFail(code = '') {
-        let ter = this.#type;
-        ter |= ENOREADLINK;
-        if (code === 'ENOENT')
-            ter |= ENOENT;
-        // windows gets a weird error when you try to readlink a file
-        if (code === 'EINVAL' || code === 'UNKNOWN') {
-            // exists, but not a symlink, we don't know WHAT it is, so remove
-            // all IFMT bits.
-            ter &= IFMT_UNKNOWN;
-        }
-        this.#type = ter;
-        // windows just gets ENOENT in this case.  We do cover the case,
-        // just disabled because it's impossible on Windows CI
-        /* c8 ignore start */
-        if (code === 'ENOTDIR' && this.parent) {
-            this.parent.#markENOTDIR();
-        }
-        /* c8 ignore stop */
-    }
-    #readdirAddChild(e, c) {
-        return (this.#readdirMaybePromoteChild(e, c) ||
-            this.#readdirAddNewChild(e, c));
-    }
-    #readdirAddNewChild(e, c) {
-        // alloc new entry at head, so it's never provisional
-        const type = entToType(e);
-        const child = this.newChild(e.name, type, { parent: this });
-        const ifmt = child.#type & IFMT;
-        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
-            child.#type |= ENOTDIR;
-        }
-        c.unshift(child);
-        c.provisional++;
-        return child;
-    }
-    #readdirMaybePromoteChild(e, c) {
-        for (let p = c.provisional; p < c.length; p++) {
-            const pchild = c[p];
-            const name = this.nocase
-                ? normalizeNocase(e.name)
-                : normalize(e.name);
-            if (name !== pchild.#matchName) {
-                continue;
-            }
-            return this.#readdirPromoteChild(e, pchild, p, c);
-        }
-    }
-    #readdirPromoteChild(e, p, index, c) {
-        const v = p.name;
-        // retain any other flags, but set ifmt from dirent
-        p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e);
-        // case sensitivity fixing when we learn the true name.
-        if (v !== e.name)
-            p.name = e.name;
-        // just advance provisional index (potentially off the list),
-        // otherwise we have to splice/pop it out and re-insert at head
-        if (index !== c.provisional) {
-            if (index === c.length - 1)
-                c.pop();
-            else
-                c.splice(index, 1);
-            c.unshift(p);
-        }
-        c.provisional++;
-        return p;
-    }
-    /**
-     * Call lstat() on this Path, and update all known information that can be
-     * determined.
-     *
-     * Note that unlike `fs.lstat()`, the returned value does not contain some
-     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-     * information is required, you will need to call `fs.lstat` yourself.
-     *
-     * If the Path refers to a nonexistent file, or if the lstat call fails for
-     * any reason, `undefined` is returned.  Otherwise the updated Path object is
-     * returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async lstat() {
-        if ((this.#type & ENOENT) === 0) {
-            try {
-                this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
-                return this;
-            }
-            catch (er) {
-                this.#lstatFail(er.code);
-            }
-        }
-    }
-    /**
-     * synchronous {@link PathBase.lstat}
-     */
-    lstatSync() {
-        if ((this.#type & ENOENT) === 0) {
-            try {
-                this.#applyStat(this.#fs.lstatSync(this.fullpath()));
-                return this;
-            }
-            catch (er) {
-                this.#lstatFail(er.code);
-            }
-        }
-    }
-    #applyStat(st) {
-        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid, } = st;
-        this.#atime = atime;
-        this.#atimeMs = atimeMs;
-        this.#birthtime = birthtime;
-        this.#birthtimeMs = birthtimeMs;
-        this.#blksize = blksize;
-        this.#blocks = blocks;
-        this.#ctime = ctime;
-        this.#ctimeMs = ctimeMs;
-        this.#dev = dev;
-        this.#gid = gid;
-        this.#ino = ino;
-        this.#mode = mode;
-        this.#mtime = mtime;
-        this.#mtimeMs = mtimeMs;
-        this.#nlink = nlink;
-        this.#rdev = rdev;
-        this.#size = size;
-        this.#uid = uid;
-        const ifmt = entToType(st);
-        // retain any other flags, but set the ifmt
-        this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED;
-        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
-            this.#type |= ENOTDIR;
-        }
-    }
-    #onReaddirCB = [];
-    #readdirCBInFlight = false;
-    #callOnReaddirCB(children) {
-        this.#readdirCBInFlight = false;
-        const cbs = this.#onReaddirCB.slice();
-        this.#onReaddirCB.length = 0;
-        cbs.forEach(cb => cb(null, children));
-    }
-    /**
-     * Standard node-style callback interface to get list of directory entries.
-     *
-     * If the Path cannot or does not contain any children, then an empty array
-     * is returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     *
-     * @param cb The callback called with (er, entries).  Note that the `er`
-     * param is somewhat extraneous, as all readdir() errors are handled and
-     * simply result in an empty set of entries being returned.
-     * @param allowZalgo Boolean indicating that immediately known results should
-     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
-     * zalgo at your peril, the dark pony lord is devious and unforgiving.
-     */
-    readdirCB(cb, allowZalgo = false) {
-        if (!this.canReaddir()) {
-            if (allowZalgo)
-                cb(null, []);
-            else
-                queueMicrotask(() => cb(null, []));
-            return;
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            const c = children.slice(0, children.provisional);
-            if (allowZalgo)
-                cb(null, c);
-            else
-                queueMicrotask(() => cb(null, c));
-            return;
-        }
-        // don't have to worry about zalgo at this point.
-        this.#onReaddirCB.push(cb);
-        if (this.#readdirCBInFlight) {
-            return;
-        }
-        this.#readdirCBInFlight = true;
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
-            if (er) {
-                this.#readdirFail(er.code);
-                children.provisional = 0;
-            }
-            else {
-                // if we didn't get an error, we always get entries.
-                //@ts-ignore
-                for (const e of entries) {
-                    this.#readdirAddChild(e, children);
-                }
-                this.#readdirSuccess(children);
-            }
-            this.#callOnReaddirCB(children.slice(0, children.provisional));
-            return;
-        });
-    }
-    #asyncReaddirInFlight;
-    /**
-     * Return an array of known child entries.
-     *
-     * If the Path cannot or does not contain any children, then an empty array
-     * is returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async readdir() {
-        if (!this.canReaddir()) {
-            return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-        }
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        if (this.#asyncReaddirInFlight) {
-            await this.#asyncReaddirInFlight;
-        }
-        else {
-            /* c8 ignore start */
-            let resolve = () => { };
-            /* c8 ignore stop */
-            this.#asyncReaddirInFlight = new Promise(res => (resolve = res));
-            try {
-                for (const e of await this.#fs.promises.readdir(fullpath, {
-                    withFileTypes: true,
-                })) {
-                    this.#readdirAddChild(e, children);
-                }
-                this.#readdirSuccess(children);
-            }
-            catch (er) {
-                this.#readdirFail(er.code);
-                children.provisional = 0;
-            }
-            this.#asyncReaddirInFlight = undefined;
-            resolve();
-        }
-        return children.slice(0, children.provisional);
-    }
-    /**
-     * synchronous {@link PathBase.readdir}
-     */
-    readdirSync() {
-        if (!this.canReaddir()) {
-            return [];
-        }
-        const children = this.children();
-        if (this.calledReaddir()) {
-            return children.slice(0, children.provisional);
-        }
-        // else read the directory, fill up children
-        // de-provisionalize any provisional children.
-        const fullpath = this.fullpath();
-        try {
-            for (const e of this.#fs.readdirSync(fullpath, {
-                withFileTypes: true,
-            })) {
-                this.#readdirAddChild(e, children);
-            }
-            this.#readdirSuccess(children);
-        }
-        catch (er) {
-            this.#readdirFail(er.code);
-            children.provisional = 0;
-        }
-        return children.slice(0, children.provisional);
-    }
-    canReaddir() {
-        if (this.#type & ENOCHILD)
-            return false;
-        const ifmt = IFMT & this.#type;
-        // we always set ENOTDIR when setting IFMT, so should be impossible
-        /* c8 ignore start */
-        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
-            return false;
-        }
-        /* c8 ignore stop */
-        return true;
-    }
-    shouldWalk(dirs, walkFilter) {
-        return ((this.#type & IFDIR) === IFDIR &&
-            !(this.#type & ENOCHILD) &&
-            !dirs.has(this) &&
-            (!walkFilter || walkFilter(this)));
-    }
-    /**
-     * Return the Path object corresponding to path as resolved
-     * by realpath(3).
-     *
-     * If the realpath call fails for any reason, `undefined` is returned.
-     *
-     * Result is cached, and thus may be outdated if the filesystem is mutated.
-     * On success, returns a Path object.
-     */
-    async realpath() {
-        if (this.#realpath)
-            return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-        try {
-            const rp = await this.#fs.promises.realpath(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-        }
-        catch (_) {
-            this.#markENOREALPATH();
-        }
-    }
-    /**
-     * Synchronous {@link realpath}
-     */
-    realpathSync() {
-        if (this.#realpath)
-            return this.#realpath;
-        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
-            return undefined;
-        try {
-            const rp = this.#fs.realpathSync(this.fullpath());
-            return (this.#realpath = this.resolve(rp));
-        }
-        catch (_) {
-            this.#markENOREALPATH();
-        }
-    }
-    /**
-     * Internal method to mark this Path object as the scurry cwd,
-     * called by {@link PathScurry#chdir}
-     *
-     * @internal
-     */
-    [setAsCwd](oldCwd) {
-        if (oldCwd === this)
-            return;
-        const changed = new Set([]);
-        let rp = [];
-        let p = this;
-        while (p && p.parent) {
-            changed.add(p);
-            p.#relative = rp.join(this.sep);
-            p.#relativePosix = rp.join('/');
-            p = p.parent;
-            rp.push('..');
-        }
-        // now un-memoize parents of old cwd
-        p = oldCwd;
-        while (p && p.parent && !changed.has(p)) {
-            p.#relative = undefined;
-            p.#relativePosix = undefined;
-            p = p.parent;
-        }
-    }
-}
-/**
- * Path class used on win32 systems
- *
- * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
- * as the path separator for parsing paths.
- */
-export class PathWin32 extends PathBase {
-    /**
-     * Separator for generating path strings.
-     */
-    sep = '\\';
-    /**
-     * Separator for parsing path strings.
-     */
-    splitSep = eitherSep;
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type, root, roots, nocase, children, opts);
-    }
-    /**
-     * @internal
-     */
-    newChild(name, type = UNKNOWN, opts = {}) {
-        return new PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
-    }
-    /**
-     * @internal
-     */
-    getRootString(path) {
-        return win32.parse(path).root;
-    }
-    /**
-     * @internal
-     */
-    getRoot(rootPath) {
-        rootPath = uncToDrive(rootPath.toUpperCase());
-        if (rootPath === this.root.name) {
-            return this.root;
-        }
-        // ok, not that one, check if it matches another we know about
-        for (const [compare, root] of Object.entries(this.roots)) {
-            if (this.sameRoot(rootPath, compare)) {
-                return (this.roots[rootPath] = root);
-            }
-        }
-        // otherwise, have to create a new one.
-        return (this.roots[rootPath] = new PathScurryWin32(rootPath, this).root);
-    }
-    /**
-     * @internal
-     */
-    sameRoot(rootPath, compare = this.root.name) {
-        // windows can (rarely) have case-sensitive filesystem, but
-        // UNC and drive letters are always case-insensitive, and canonically
-        // represented uppercase.
-        rootPath = rootPath
-            .toUpperCase()
-            .replace(/\//g, '\\')
-            .replace(uncDriveRegexp, '$1\\');
-        return rootPath === compare;
-    }
-}
-/**
- * Path class used on all posix systems.
- *
- * Uses `'/'` as the path separator.
- */
-export class PathPosix extends PathBase {
-    /**
-     * separator for parsing path strings
-     */
-    splitSep = '/';
-    /**
-     * separator for generating path strings
-     */
-    sep = '/';
-    /**
-     * Do not create new Path objects directly.  They should always be accessed
-     * via the PathScurry class or other methods on the Path class.
-     *
-     * @internal
-     */
-    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
-        super(name, type, root, roots, nocase, children, opts);
-    }
-    /**
-     * @internal
-     */
-    getRootString(path) {
-        return path.startsWith('/') ? '/' : '';
-    }
-    /**
-     * @internal
-     */
-    getRoot(_rootPath) {
-        return this.root;
-    }
-    /**
-     * @internal
-     */
-    newChild(name, type = UNKNOWN, opts = {}) {
-        return new PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
-    }
-}
-/**
- * The base class for all PathScurry classes, providing the interface for path
- * resolution and filesystem operations.
- *
- * Typically, you should *not* instantiate this class directly, but rather one
- * of the platform-specific classes, or the exported {@link PathScurry} which
- * defaults to the current platform.
- */
-export class PathScurryBase {
-    /**
-     * The root Path entry for the current working directory of this Scurry
-     */
-    root;
-    /**
-     * The string path for the root of this Scurry's current working directory
-     */
-    rootPath;
-    /**
-     * A collection of all roots encountered, referenced by rootPath
-     */
-    roots;
-    /**
-     * The Path entry corresponding to this PathScurry's current working directory.
-     */
-    cwd;
-    #resolveCache;
-    #resolvePosixCache;
-    #children;
-    /**
-     * Perform path comparisons case-insensitively.
-     *
-     * Defaults true on Darwin and Windows systems, false elsewhere.
-     */
-    nocase;
-    #fs;
-    /**
-     * This class should not be instantiated directly.
-     *
-     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
-     *
-     * @internal
-     */
-    constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
-        this.#fs = fsFromOption(fs);
-        if (cwd instanceof URL || cwd.startsWith('file://')) {
-            cwd = fileURLToPath(cwd);
-        }
-        // resolve and split root, and then add to the store.
-        // this is the only time we call path.resolve()
-        const cwdPath = pathImpl.resolve(cwd);
-        this.roots = Object.create(null);
-        this.rootPath = this.parseRootPath(cwdPath);
-        this.#resolveCache = new ResolveCache();
-        this.#resolvePosixCache = new ResolveCache();
-        this.#children = new ChildrenCache(childrenCacheSize);
-        const split = cwdPath.substring(this.rootPath.length).split(sep);
-        // resolve('/') leaves '', splits to [''], we don't want that.
-        if (split.length === 1 && !split[0]) {
-            split.pop();
-        }
-        /* c8 ignore start */
-        if (nocase === undefined) {
-            throw new TypeError('must provide nocase setting to PathScurryBase ctor');
-        }
-        /* c8 ignore stop */
-        this.nocase = nocase;
-        this.root = this.newRoot(this.#fs);
-        this.roots[this.rootPath] = this.root;
-        let prev = this.root;
-        let len = split.length - 1;
-        const joinSep = pathImpl.sep;
-        let abs = this.rootPath;
-        let sawFirst = false;
-        for (const part of split) {
-            const l = len--;
-            prev = prev.child(part, {
-                relative: new Array(l).fill('..').join(joinSep),
-                relativePosix: new Array(l).fill('..').join('/'),
-                fullpath: (abs += (sawFirst ? '' : joinSep) + part),
-            });
-            sawFirst = true;
-        }
-        this.cwd = prev;
-    }
-    /**
-     * Get the depth of a provided path, string, or the cwd
-     */
-    depth(path = this.cwd) {
-        if (typeof path === 'string') {
-            path = this.cwd.resolve(path);
-        }
-        return path.depth();
-    }
-    /**
-     * Return the cache of child entries.  Exposed so subclasses can create
-     * child Path objects in a platform-specific way.
-     *
-     * @internal
-     */
-    childrenCache() {
-        return this.#children;
-    }
-    /**
-     * Resolve one or more path strings to a resolved string
-     *
-     * Same interface as require('path').resolve.
-     *
-     * Much faster than path.resolve() when called multiple times for the same
-     * path, because the resolved Path objects are cached.  Much slower
-     * otherwise.
-     */
-    resolve(...paths) {
-        // first figure out the minimum number of paths we have to test
-        // we always start at cwd, but any absolutes will bump the start
-        let r = '';
-        for (let i = paths.length - 1; i >= 0; i--) {
-            const p = paths[i];
-            if (!p || p === '.')
-                continue;
-            r = r ? `${p}/${r}` : p;
-            if (this.isAbsolute(p)) {
-                break;
-            }
-        }
-        const cached = this.#resolveCache.get(r);
-        if (cached !== undefined) {
-            return cached;
-        }
-        const result = this.cwd.resolve(r).fullpath();
-        this.#resolveCache.set(r, result);
-        return result;
-    }
-    /**
-     * Resolve one or more path strings to a resolved string, returning
-     * the posix path.  Identical to .resolve() on posix systems, but on
-     * windows will return a forward-slash separated UNC path.
-     *
-     * Same interface as require('path').resolve.
-     *
-     * Much faster than path.resolve() when called multiple times for the same
-     * path, because the resolved Path objects are cached.  Much slower
-     * otherwise.
-     */
-    resolvePosix(...paths) {
-        // first figure out the minimum number of paths we have to test
-        // we always start at cwd, but any absolutes will bump the start
-        let r = '';
-        for (let i = paths.length - 1; i >= 0; i--) {
-            const p = paths[i];
-            if (!p || p === '.')
-                continue;
-            r = r ? `${p}/${r}` : p;
-            if (this.isAbsolute(p)) {
-                break;
-            }
-        }
-        const cached = this.#resolvePosixCache.get(r);
-        if (cached !== undefined) {
-            return cached;
-        }
-        const result = this.cwd.resolve(r).fullpathPosix();
-        this.#resolvePosixCache.set(r, result);
-        return result;
-    }
-    /**
-     * find the relative path from the cwd to the supplied path string or entry
-     */
-    relative(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.relative();
-    }
-    /**
-     * find the relative path from the cwd to the supplied path string or
-     * entry, using / as the path delimiter, even on Windows.
-     */
-    relativePosix(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.relativePosix();
-    }
-    /**
-     * Return the basename for the provided string or Path object
-     */
-    basename(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.name;
-    }
-    /**
-     * Return the dirname for the provided string or Path object
-     */
-    dirname(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return (entry.parent || entry).fullpath();
-    }
-    async readdir(entry = this.cwd, opts = {
-        withFileTypes: true,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes } = opts;
-        if (!entry.canReaddir()) {
-            return [];
-        }
-        else {
-            const p = await entry.readdir();
-            return withFileTypes ? p : p.map(e => e.name);
-        }
-    }
-    readdirSync(entry = this.cwd, opts = {
-        withFileTypes: true,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true } = opts;
-        if (!entry.canReaddir()) {
-            return [];
-        }
-        else if (withFileTypes) {
-            return entry.readdirSync();
-        }
-        else {
-            return entry.readdirSync().map(e => e.name);
-        }
-    }
-    /**
-     * Call lstat() on the string or Path object, and update all known
-     * information that can be determined.
-     *
-     * Note that unlike `fs.lstat()`, the returned value does not contain some
-     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
-     * information is required, you will need to call `fs.lstat` yourself.
-     *
-     * If the Path refers to a nonexistent file, or if the lstat call fails for
-     * any reason, `undefined` is returned.  Otherwise the updated Path object is
-     * returned.
-     *
-     * Results are cached, and thus may be out of date if the filesystem is
-     * mutated.
-     */
-    async lstat(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.lstat();
-    }
-    /**
-     * synchronous {@link PathScurryBase.lstat}
-     */
-    lstatSync(entry = this.cwd) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        return entry.lstatSync();
-    }
-    async readlink(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = await entry.readlink();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    readlinkSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = entry.readlinkSync();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    async realpath(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = await entry.realpath();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    realpathSync(entry = this.cwd, { withFileTypes } = {
-        withFileTypes: false,
-    }) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            withFileTypes = entry.withFileTypes;
-            entry = this.cwd;
-        }
-        const e = entry.realpathSync();
-        return withFileTypes ? e : e?.fullpath();
-    }
-    async walk(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set();
-        const walk = (dir, cb) => {
-            dirs.add(dir);
-            dir.readdirCB((er, entries) => {
-                /* c8 ignore start */
-                if (er) {
-                    return cb(er);
-                }
-                /* c8 ignore stop */
-                let len = entries.length;
-                if (!len)
-                    return cb();
-                const next = () => {
-                    if (--len === 0) {
-                        cb();
-                    }
-                };
-                for (const e of entries) {
-                    if (!filter || filter(e)) {
-                        results.push(withFileTypes ? e : e.fullpath());
-                    }
-                    if (follow && e.isSymbolicLink()) {
-                        e.realpath()
-                            .then(r => (r?.isUnknown() ? r.lstat() : r))
-                            .then(r => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
-                    }
-                    else {
-                        if (e.shouldWalk(dirs, walkFilter)) {
-                            walk(e, next);
-                        }
-                        else {
-                            next();
-                        }
-                    }
-                }
-            }, true); // zalgooooooo
-        };
-        const start = entry;
-        return new Promise((res, rej) => {
-            walk(start, er => {
-                /* c8 ignore start */
-                if (er)
-                    return rej(er);
-                /* c8 ignore stop */
-                res(results);
-            });
-        });
-    }
-    walkSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = [];
-        if (!filter || filter(entry)) {
-            results.push(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set([entry]);
-        for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-                if (!filter || filter(e)) {
-                    results.push(withFileTypes ? e : e.fullpath());
-                }
-                let r = e;
-                if (e.isSymbolicLink()) {
-                    if (!(follow && (r = e.realpathSync())))
-                        continue;
-                    if (r.isUnknown())
-                        r.lstatSync();
-                }
-                if (r.shouldWalk(dirs, walkFilter)) {
-                    dirs.add(r);
-                }
-            }
-        }
-        return results;
-    }
-    /**
-     * Support for `for await`
-     *
-     * Alias for {@link PathScurryBase.iterate}
-     *
-     * Note: As of Node 19, this is very slow, compared to other methods of
-     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
-     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
-     */
-    [Symbol.asyncIterator]() {
-        return this.iterate();
-    }
-    iterate(entry = this.cwd, options = {}) {
-        // iterating async over the stream is significantly more performant,
-        // especially in the warm-cache scenario, because it buffers up directory
-        // entries in the background instead of waiting for a yield for each one.
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            options = entry;
-            entry = this.cwd;
-        }
-        return this.stream(entry, options)[Symbol.asyncIterator]();
-    }
-    /**
-     * Iterating over a PathScurry performs a synchronous walk.
-     *
-     * Alias for {@link PathScurryBase.iterateSync}
-     */
-    [Symbol.iterator]() {
-        return this.iterateSync();
-    }
-    *iterateSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        if (!filter || filter(entry)) {
-            yield withFileTypes ? entry : entry.fullpath();
-        }
-        const dirs = new Set([entry]);
-        for (const dir of dirs) {
-            const entries = dir.readdirSync();
-            for (const e of entries) {
-                if (!filter || filter(e)) {
-                    yield withFileTypes ? e : e.fullpath();
-                }
-                let r = e;
-                if (e.isSymbolicLink()) {
-                    if (!(follow && (r = e.realpathSync())))
-                        continue;
-                    if (r.isUnknown())
-                        r.lstatSync();
-                }
-                if (r.shouldWalk(dirs, walkFilter)) {
-                    dirs.add(r);
-                }
-            }
-        }
-    }
-    stream(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = new Minipass({ objectMode: true });
-        if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const dirs = new Set();
-        const queue = [entry];
-        let processing = 0;
-        const process = () => {
-            let paused = false;
-            while (!paused) {
-                const dir = queue.shift();
-                if (!dir) {
-                    if (processing === 0)
-                        results.end();
-                    return;
-                }
-                processing++;
-                dirs.add(dir);
-                const onReaddir = (er, entries, didRealpaths = false) => {
-                    /* c8 ignore start */
-                    if (er)
-                        return results.emit('error', er);
-                    /* c8 ignore stop */
-                    if (follow && !didRealpaths) {
-                        const promises = [];
-                        for (const e of entries) {
-                            if (e.isSymbolicLink()) {
-                                promises.push(e
-                                    .realpath()
-                                    .then((r) => r?.isUnknown() ? r.lstat() : r));
-                            }
-                        }
-                        if (promises.length) {
-                            Promise.all(promises).then(() => onReaddir(null, entries, true));
-                            return;
-                        }
-                    }
-                    for (const e of entries) {
-                        if (e && (!filter || filter(e))) {
-                            if (!results.write(withFileTypes ? e : e.fullpath())) {
-                                paused = true;
-                            }
-                        }
-                    }
-                    processing--;
-                    for (const e of entries) {
-                        const r = e.realpathCached() || e;
-                        if (r.shouldWalk(dirs, walkFilter)) {
-                            queue.push(r);
-                        }
-                    }
-                    if (paused && !results.flowing) {
-                        results.once('drain', process);
-                    }
-                    else if (!sync) {
-                        process();
-                    }
-                };
-                // zalgo containment
-                let sync = true;
-                dir.readdirCB(onReaddir, true);
-                sync = false;
-            }
-        };
-        process();
-        return results;
-    }
-    streamSync(entry = this.cwd, opts = {}) {
-        if (typeof entry === 'string') {
-            entry = this.cwd.resolve(entry);
-        }
-        else if (!(entry instanceof PathBase)) {
-            opts = entry;
-            entry = this.cwd;
-        }
-        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
-        const results = new Minipass({ objectMode: true });
-        const dirs = new Set();
-        if (!filter || filter(entry)) {
-            results.write(withFileTypes ? entry : entry.fullpath());
-        }
-        const queue = [entry];
-        let processing = 0;
-        const process = () => {
-            let paused = false;
-            while (!paused) {
-                const dir = queue.shift();
-                if (!dir) {
-                    if (processing === 0)
-                        results.end();
-                    return;
-                }
-                processing++;
-                dirs.add(dir);
-                const entries = dir.readdirSync();
-                for (const e of entries) {
-                    if (!filter || filter(e)) {
-                        if (!results.write(withFileTypes ? e : e.fullpath())) {
-                            paused = true;
-                        }
-                    }
-                }
-                processing--;
-                for (const e of entries) {
-                    let r = e;
-                    if (e.isSymbolicLink()) {
-                        if (!(follow && (r = e.realpathSync())))
-                            continue;
-                        if (r.isUnknown())
-                            r.lstatSync();
-                    }
-                    if (r.shouldWalk(dirs, walkFilter)) {
-                        queue.push(r);
-                    }
-                }
-            }
-            if (paused && !results.flowing)
-                results.once('drain', process);
-        };
-        process();
-        return results;
-    }
-    chdir(path = this.cwd) {
-        const oldCwd = this.cwd;
-        this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
-        this.cwd[setAsCwd](oldCwd);
-    }
-}
-/**
- * Windows implementation of {@link PathScurryBase}
- *
- * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
- * {@link PathWin32} for Path objects.
- */
-export class PathScurryWin32 extends PathScurryBase {
-    /**
-     * separator for generating path strings
-     */
-    sep = '\\';
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, win32, '\\', { ...opts, nocase });
-        this.nocase = nocase;
-        for (let p = this.cwd; p; p = p.parent) {
-            p.nocase = this.nocase;
-        }
-    }
-    /**
-     * @internal
-     */
-    parseRootPath(dir) {
-        // if the path starts with a single separator, it's not a UNC, and we'll
-        // just get separator as the root, and driveFromUNC will return \
-        // In that case, mount \ on the root from the cwd.
-        return win32.parse(dir).root.toUpperCase();
-    }
-    /**
-     * @internal
-     */
-    newRoot(fs) {
-        return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
-    }
-    /**
-     * Return true if the provided path string is an absolute path
-     */
-    isAbsolute(p) {
-        return (p.startsWith('/') || p.startsWith('\\') || /^[a-z]:(\/|\\)/i.test(p));
-    }
-}
-/**
- * {@link PathScurryBase} implementation for all posix systems other than Darwin.
- *
- * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
- *
- * Uses {@link PathPosix} for Path objects.
- */
-export class PathScurryPosix extends PathScurryBase {
-    /**
-     * separator for generating path strings
-     */
-    sep = '/';
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = false } = opts;
-        super(cwd, posix, '/', { ...opts, nocase });
-        this.nocase = nocase;
-    }
-    /**
-     * @internal
-     */
-    parseRootPath(_dir) {
-        return '/';
-    }
-    /**
-     * @internal
-     */
-    newRoot(fs) {
-        return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
-    }
-    /**
-     * Return true if the provided path string is an absolute path
-     */
-    isAbsolute(p) {
-        return p.startsWith('/');
-    }
-}
-/**
- * {@link PathScurryBase} implementation for Darwin (macOS) systems.
- *
- * Defaults to case-insensitive matching, uses `'/'` for generating path
- * strings.
- *
- * Uses {@link PathPosix} for Path objects.
- */
-export class PathScurryDarwin extends PathScurryPosix {
-    constructor(cwd = process.cwd(), opts = {}) {
-        const { nocase = true } = opts;
-        super(cwd, { ...opts, nocase });
-    }
-}
-/**
- * Default {@link PathBase} implementation for the current platform.
- *
- * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
- */
-export const Path = process.platform === 'win32' ? PathWin32 : PathPosix;
-/**
- * Default {@link PathScurryBase} implementation for the current platform.
- *
- * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
- * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
- */
-export const PathScurry = process.platform === 'win32'
-    ? PathScurryWin32
-    : process.platform === 'darwin'
-        ? PathScurryDarwin
-        : PathScurryPosix;
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/path-scurry/dist/mjs/package.json b/node_modules/npm/node_modules/path-scurry/dist/mjs/package.json
deleted file mode 100644
index 3dbc1ca..0000000
--- a/node_modules/npm/node_modules/path-scurry/dist/mjs/package.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-  "type": "module"
-}
diff --git a/node_modules/npm/node_modules/path-scurry/package.json b/node_modules/npm/node_modules/path-scurry/package.json
deleted file mode 100644
index af04f80..0000000
--- a/node_modules/npm/node_modules/path-scurry/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
-  "name": "path-scurry",
-  "version": "1.10.1",
-  "description": "walk paths fast and efficiently",
-  "author": "Isaac Z. Schlueter  (https://blog.izs.me)",
-  "main": "./dist/cjs/index.js",
-  "module": "./dist/mjs/index.js",
-  "exports": {
-    ".": {
-      "import": {
-        "types": "./dist/mjs/index.d.ts",
-        "default": "./dist/mjs/index.js"
-      },
-      "require": {
-        "types": "./dist/cjs/index.d.ts",
-        "default": "./dist/cjs/index.js"
-      }
-    }
-  },
-  "files": [
-    "dist"
-  ],
-  "license": "BlueOak-1.0.0",
-  "scripts": {
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags",
-    "preprepare": "rm -rf dist",
-    "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
-    "postprepare": "bash ./scripts/fixup.sh",
-    "pretest": "npm run prepare",
-    "presnap": "npm run prepare",
-    "test": "c8 tap",
-    "snap": "c8 tap",
-    "format": "prettier --write . --loglevel warn",
-    "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts",
-    "bench": "bash ./scripts/bench.sh"
-  },
-  "prettier": {
-    "semi": false,
-    "printWidth": 75,
-    "tabWidth": 2,
-    "useTabs": false,
-    "singleQuote": true,
-    "jsxSingleQuote": false,
-    "bracketSameLine": true,
-    "arrowParens": "avoid",
-    "endOfLine": "lf"
-  },
-  "tap": {
-    "coverage": false,
-    "node-arg": [
-      "--no-warnings",
-      "--loader",
-      "ts-node/esm"
-    ],
-    "ts": false
-  },
-  "devDependencies": {
-    "@nodelib/fs.walk": "^1.2.8",
-    "@types/node": "^20.1.4",
-    "@types/tap": "^15.0.7",
-    "c8": "^7.12.0",
-    "eslint-config-prettier": "^8.6.0",
-    "mkdirp": "^3.0.0",
-    "prettier": "^2.8.3",
-    "rimraf": "^5.0.1",
-    "tap": "^16.3.4",
-    "ts-node": "^10.9.1",
-    "typedoc": "^0.23.24",
-    "typescript": "^5.0.4"
-  },
-  "engines": {
-    "node": ">=16 || 14 >=14.17"
-  },
-  "funding": {
-    "url": "https://github.com/sponsors/isaacs"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/path-scurry"
-  },
-  "dependencies": {
-    "lru-cache": "^9.1.1 || ^10.0.0",
-    "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
-  }
-}
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/API.md b/node_modules/npm/node_modules/postcss-selector-parser/API.md
deleted file mode 100644
index 64459e3..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/API.md
+++ /dev/null
@@ -1,872 +0,0 @@
-# API Documentation
-
-*Please use only this documented API when working with the parser. Methods
-not documented here are subject to change at any point.*
-
-## `parser` function
-
-This is the module's main entry point.
-
-```js
-const parser = require('postcss-selector-parser');
-```
-
-### `parser([transform], [options])`
-
-Creates a new `processor` instance
-
-```js
-const processor = parser();
-```
-
-Or, with optional transform function
-
-```js
-const transform = selectors => {
-    selectors.walkUniversals(selector => {
-        selector.remove();
-    });
-};
-
-const processor = parser(transform)
-
-// Example
-const result = processor.processSync('*.class');
-// => .class
-```
-
-[See processor documentation](#processor)
-
-Arguments:
-
-* `transform (function)`: Provide a function to work with the parsed AST.
-* `options (object)`: Provide default options for all calls on the returned `Processor`.
-
-### `parser.attribute([props])`
-
-Creates a new attribute selector.
-
-```js
-parser.attribute({attribute: 'href'});
-// => [href]
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.className([props])`
-
-Creates a new class selector.
-
-```js
-parser.className({value: 'button'});
-// => .button
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.combinator([props])`
-
-Creates a new selector combinator.
-
-```js
-parser.combinator({value: '+'});
-// => +
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-Notes:
-* **Descendant Combinators** The value of descendant combinators created by the
-  parser always just a single space (`" "`). For descendant selectors with no
-  comments, additional space is now stored in `node.spaces.before`. Depending
-  on the location of comments, additional spaces may be stored in
-  `node.raws.spaces.before`, `node.raws.spaces.after`, or `node.raws.value`.
-* **Named Combinators** Although, nonstandard and unlikely to ever become a standard,
-  named combinators like `/deep/` and `/for/` are parsed as combinators. The
-  `node.value` is name after being unescaped and normalized as lowercase. The
-  original value for the combinator name is stored in `node.raws.value`.
-
-
-### `parser.comment([props])`
-
-Creates a new comment.
-
-```js
-parser.comment({value: '/* Affirmative, Dave. I read you. */'});
-// => /* Affirmative, Dave. I read you. */
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.id([props])`
-
-Creates a new id selector.
-
-```js
-parser.id({value: 'search'});
-// => #search
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.nesting([props])`
-
-Creates a new nesting selector.
-
-```js
-parser.nesting();
-// => &
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.pseudo([props])`
-
-Creates a new pseudo selector.
-
-```js
-parser.pseudo({value: '::before'});
-// => ::before
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.root([props])`
-
-Creates a new root node.
-
-```js
-parser.root();
-// => (empty)
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.selector([props])`
-
-Creates a new selector node.
-
-```js
-parser.selector();
-// => (empty)
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.string([props])`
-
-Creates a new string node.
-
-```js
-parser.string();
-// => (empty)
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.tag([props])`
-
-Creates a new tag selector.
-
-```js
-parser.tag({value: 'button'});
-// => button
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-### `parser.universal([props])`
-
-Creates a new universal selector.
-
-```js
-parser.universal();
-// => *
-```
-
-Arguments:
-
-* `props (object)`: The new node's properties.
-
-## Node types
-
-### `node.type`
-
-A string representation of the selector type. It can be one of the following;
-`attribute`, `class`, `combinator`, `comment`, `id`, `nesting`, `pseudo`,
-`root`, `selector`, `string`, `tag`, or `universal`. Note that for convenience,
-these constants are exposed on the main `parser` as uppercased keys. So for
-example you can get `id` by querying `parser.ID`.
-
-```js
-parser.attribute({attribute: 'href'}).type;
-// => 'attribute'
-```
-
-### `node.parent`
-
-Returns the parent node.
-
-```js
-root.nodes[0].parent === root;
-```
-
-### `node.toString()`, `String(node)`, or `'' + node`
-
-Returns a string representation of the node.
-
-```js
-const id = parser.id({value: 'search'});
-console.log(String(id));
-// => #search
-```
-
-### `node.next()` & `node.prev()`
-
-Returns the next/previous child of the parent node.
-
-```js
-const next = id.next();
-if (next && next.type !== 'combinator') {
-    throw new Error('Qualified IDs are not allowed!');
-}
-```
-
-### `node.replaceWith(node)`
-
-Replace a node with another.
-
-```js
-const attr = selectors.first.first;
-const className = parser.className({value: 'test'});
-attr.replaceWith(className);
-```
-
-Arguments:
-
-* `node`: The node to substitute the original with.
-
-### `node.remove()`
-
-Removes the node from its parent node.
-
-```js
-if (node.type === 'id') {
-    node.remove();
-}
-```
-
-### `node.clone([opts])`
-
-Returns a copy of a node, detached from any parent containers that the
-original might have had.
-
-```js
-const cloned = node.clone();
-```
-
-### `node.isAtPosition(line, column)`
-
-Return a `boolean` indicating whether this node includes the character at the
-position of the given line and column. Returns `undefined` if the nodes lack
-sufficient source metadata to determine the position.
-
-Arguments:
-
-* `line`: 1-index based line number relative to the start of the selector.
-* `column`: 1-index based column number relative to the start of the selector.
-
-### `node.spaces`
-
-Extra whitespaces around the node will be moved into `node.spaces.before` and
-`node.spaces.after`. So for example, these spaces will be moved as they have
-no semantic meaning:
-
-```css
-      h1     ,     h2   {}
-```
-
-For descendent selectors, the value is always a single space.
-
-```css
-h1        h2 {}
-```
-
-Additional whitespace is found in either the `node.spaces.before` and `node.spaces.after` depending on the presence of comments or other whitespace characters. If the actual whitespace does not start or end with a single space, the node's raw value is set to the actual space(s) found in the source.
-
-### `node.source`
-
-An object describing the node's start/end, line/column source position.
-
-Within the following CSS, the `.bar` class node ...
-
-```css
-.foo,
-  .bar {}
-```
-
-... will contain the following `source` object.
-
-```js
-source: {
-    start: {
-        line: 2,
-        column: 3
-    },
-    end: {
-        line: 2,
-        column: 6
-    }
-}
-```
-
-### `node.sourceIndex`
-
-The zero-based index of the node within the original source string.
-
-Within the following CSS, the `.baz` class node will have a `sourceIndex` of `12`.
-
-```css
-.foo, .bar, .baz {}
-```
-
-## Container types
-
-The `root`, `selector`, and `pseudo` nodes have some helper methods for working
-with their children.
-
-### `container.nodes`
-
-An array of the container's children.
-
-```js
-// Input: h1 h2
-selectors.at(0).nodes.length   // => 3
-selectors.at(0).nodes[0].value // => 'h1'
-selectors.at(0).nodes[1].value // => ' '
-```
-
-### `container.first` & `container.last`
-
-The first/last child of the container.
-
-```js
-selector.first === selector.nodes[0];
-selector.last === selector.nodes[selector.nodes.length - 1];
-```
-
-### `container.at(index)`
-
-Returns the node at position `index`.
-
-```js
-selector.at(0) === selector.first;
-selector.at(0) === selector.nodes[0];
-```
-
-Arguments:
-
-* `index`: The index of the node to return.
-
-### `container.atPosition(line, column)`
-
-Returns the node at the source position `line` and `column`.
-
-```js
-// Input: :not(.foo),\n#foo > :matches(ol, ul)
-selector.atPosition(1, 1); // => :not(.foo)
-selector.atPosition(2, 1); // => \n#foo
-```
-
-Arguments:
-
-* `line`: The line number of the node to return.
-* `column`: The column number of the node to return.
-
-### `container.index(node)`
-
-Return the index of the node within its container.
-
-```js
-selector.index(selector.nodes[2]) // => 2
-```
-
-Arguments:
-
-* `node`: A node within the current container.
-
-### `container.length`
-
-Proxy to the length of the container's nodes.
-
-```js
-container.length === container.nodes.length
-```
-
-### `container` Array iterators
-
-The container class provides proxies to certain Array methods; these are:
-
-* `container.map === container.nodes.map`
-* `container.reduce === container.nodes.reduce`
-* `container.every === container.nodes.every`
-* `container.some === container.nodes.some`
-* `container.filter === container.nodes.filter`
-* `container.sort === container.nodes.sort`
-
-Note that these methods only work on a container's immediate children; recursive
-iteration is provided by `container.walk`.
-
-### `container.each(callback)`
-
-Iterate the container's immediate children, calling `callback` for each child.
-You may return `false` within the callback to break the iteration.
-
-```js
-let className;
-selectors.each((selector, index) => {
-    if (selector.type === 'class') {
-        className = selector.value;
-        return false;
-    }
-});
-```
-
-Note that unlike `Array#forEach()`, this iterator is safe to use whilst adding
-or removing nodes from the container.
-
-Arguments:
-
-* `callback (function)`: A function to call for each node, which receives `node`
-  and `index` arguments.
-
-### `container.walk(callback)`
-
-Like `container#each`, but will also iterate child nodes as long as they are
-`container` types.
-
-```js
-selectors.walk((selector, index) => {
-    // all nodes
-});
-```
-
-Arguments:
-
-* `callback (function)`: A function to call for each node, which receives `node`
-  and `index` arguments.
-
-This iterator is safe to use whilst mutating `container.nodes`,
-like `container#each`.
-
-### `container.walk` proxies
-
-The container class provides proxy methods for iterating over types of nodes,
-so that it is easier to write modules that target specific selectors. Those
-methods are:
-
-* `container.walkAttributes`
-* `container.walkClasses`
-* `container.walkCombinators`
-* `container.walkComments`
-* `container.walkIds`
-* `container.walkNesting`
-* `container.walkPseudos`
-* `container.walkTags`
-* `container.walkUniversals`
-
-### `container.split(callback)`
-
-This method allows you to split a group of nodes by returning `true` from
-a callback. It returns an array of arrays, where each inner array corresponds
-to the groups that you created via the callback.
-
-```js
-// (input) => h1 h2>>h3
-const list = selectors.first.split(selector => {
-    return selector.type === 'combinator';
-});
-
-// (node values) => [['h1', ' '], ['h2', '>>'], ['h3']]
-```
-
-Arguments:
-
-* `callback (function)`: A function to call for each node, which receives `node`
-  as an argument.
-
-### `container.prepend(node)` & `container.append(node)`
-
-Add a node to the start/end of the container. Note that doing so will set
-the parent property of the node to this container.
-
-```js
-const id = parser.id({value: 'search'});
-selector.append(id);
-```
-
-Arguments:
-
-* `node`: The node to add.
-
-### `container.insertBefore(old, new)` & `container.insertAfter(old, new)`
-
-Add a node before or after an existing node in a container:
-
-```js
-selectors.walk(selector => {
-    if (selector.type !== 'class') {
-        const className = parser.className({value: 'theme-name'});
-        selector.parent.insertAfter(selector, className);
-    }
-});
-```
-
-Arguments:
-
-* `old`: The existing node in the container.
-* `new`: The new node to add before/after the existing node.
-
-### `container.removeChild(node)`
-
-Remove the node from the container. Note that you can also use
-`node.remove()` if you would like to remove just a single node.
-
-```js
-selector.length // => 2
-selector.remove(id)
-selector.length // => 1;
-id.parent       // undefined
-```
-
-Arguments:
-
-* `node`: The node to remove.
-
-### `container.removeAll()` or `container.empty()`
-
-Remove all children from the container.
-
-```js
-selector.removeAll();
-selector.length // => 0
-```
-
-## Root nodes
-
-A root node represents a comma separated list of selectors. Indeed, all
-a root's `toString()` method does is join its selector children with a ','.
-Other than this, it has no special functionality and acts like a container.
-
-### `root.trailingComma`
-
-This will be set to `true` if the input has a trailing comma, in order to
-support parsing of legacy CSS hacks.
-
-## Selector nodes
-
-A selector node represents a single complex selector. For example, this
-selector string `h1 h2 h3, [href] > p`, is represented as two selector nodes.
-It has no special functionality of its own.
-
-## Pseudo nodes
-
-A pseudo selector extends a container node; if it has any parameters of its
-own (such as `h1:not(h2, h3)`), they will be its children. Note that the pseudo
-`value` will always contain the colons preceding the pseudo identifier. This
-is so that both `:before` and `::before` are properly represented in the AST.
-
-## Attribute nodes
-
-### `attribute.quoted`
-
-Returns `true` if the attribute's value is wrapped in quotation marks, false if it is not.
-Remains `undefined` if there is no attribute value.
-
-```css
-[href=foo] /* false */
-[href='foo'] /* true */
-[href="foo"] /* true */
-[href] /* undefined */
-```
-
-### `attribute.qualifiedAttribute`
-
-Returns the attribute name qualified with the namespace if one is given.
-
-### `attribute.offsetOf(part)`
-
- Returns the offset of the attribute part specified relative to the
- start of the node of the output string. This is useful in raising
- error messages about a specific part of the attribute, especially
- in combination with `attribute.sourceIndex`.
-
- Returns `-1` if the name is invalid or the value doesn't exist in this
- attribute.
-
- The legal values for `part` are:
-
- * `"ns"` - alias for "namespace"
- * `"namespace"` - the namespace if it exists.
- * `"attribute"` - the attribute name
- * `"attributeNS"` - the start of the attribute or its namespace
- * `"operator"` - the match operator of the attribute
- * `"value"` - The value (string or identifier)
- * `"insensitive"` - the case insensitivity flag
-
-### `attribute.raws.unquoted`
-
-Returns the unquoted content of the attribute's value.
-Remains `undefined` if there is no attribute value.
-
-```css
-[href=foo] /* foo */
-[href='foo'] /* foo */
-[href="foo"] /* foo */
-[href] /* undefined */
-```
-
-### `attribute.spaces`
-
-Like `node.spaces` with the `before` and `after` values containing the spaces
-around the element, the parts of the attribute can also have spaces before
-and after them. The for each of `attribute`, `operator`, `value` and
-`insensitive` there is corresponding property of the same nam in
-`node.spaces` that has an optional `before` or `after` string containing only
-whitespace.
-
-Note that corresponding values in `attributes.raws.spaces` contain values
-including any comments. If set, these values will override the
-`attribute.spaces` value. Take care to remove them if changing
-`attribute.spaces`.
-
-### `attribute.raws`
-
-The raws object stores comments and other information necessary to re-render
-the node exactly as it was in the source.
-
-If a comment is embedded within the identifiers for the `namespace`, `attribute`
-or `value` then a property is placed in the raws for that value containing the full source of the propery including comments.
-
-If a comment is embedded within the space between parts of the attribute
-then the raw for that space is set accordingly.
-
-Setting an attribute's property `raws` value to be deleted.
-
-For now, changing the spaces required also updating or removing any of the
-raws values that override them.
-
-Example: `[ /*before*/ href /* after-attr */ = /* after-operator */ te/*inside-value*/st/* wow */ /*omg*/i/*bbq*/ /*whodoesthis*/]` would parse as:
-
-```js
-{
-  attribute: "href",
-  operator: "=",
-  value: "test",
-  spaces: {
-    before: '',
-    after: '',
-    attribute: { before: '  ', after: '  ' },
-    operator: { after: '  ' },
-    value: { after: ' ' },
-    insensitive: { after: ' ' }
-  },
-  raws: {
-    spaces: {
-      attribute: { before: ' /*before*/ ', after: ' /* after-attr */ ' },
-      operator: { after: ' /* after-operator */ ' },
-      value: { after: '/* wow */ /*omg*/' },
-      insensitive: { after: '/*bbq*/ /*whodoesthis*/' }
-    },
-    unquoted: 'test',
-    value: 'te/*inside-value*/st'
-  }
-}
-```
-
-## `Processor`
-
-### `ProcessorOptions`
-
-* `lossless` - When `true`, whitespace is preserved. Defaults to `true`.
-* `updateSelector` - When `true`, if any processor methods are passed a postcss
-  `Rule` node instead of a string, then that Rule's selector is updated
-  with the results of the processing. Defaults to `true`.
-
-### `process|processSync(selectors, [options])`
-
-Processes the `selectors`, returning a string from the result of processing.
-
-Note: when the `updateSelector` option is set, the rule's selector
-will be updated with the resulting string.
-
-**Example:**
-
-```js
-const parser = require("postcss-selector-parser");
-const processor = parser();
-
-let result = processor.processSync(' .class');
-console.log(result);
-// =>  .class
-
-// Asynchronous operation
-let promise = processor.process(' .class').then(result => {
-    console.log(result)
-    // => .class
-});
-
-// To have the parser normalize whitespace values, utilize the options
-result = processor.processSync('  .class  ', {lossless: false});
-console.log(result);
-// => .class
-
-// For better syntax errors, pass a PostCSS Rule node.
-const postcss = require('postcss');
-rule = postcss.rule({selector: ' #foo    > a,  .class  '});
-processor.process(rule, {lossless: false, updateSelector: true}).then(result => {
-    console.log(result);
-    // => #foo>a,.class
-    console.log("rule:", rule.selector);
-    // => rule: #foo>a,.class
-})
-```
-
-Arguments:
-
-* `selectors (string|postcss.Rule)`: Either a selector string or a PostCSS Rule
-  node.
-* `[options] (object)`: Process options
-
-
-### `ast|astSync(selectors, [options])`
-
-Like `process()` and `processSync()` but after
-processing the `selectors` these methods return the `Root` node of the result
-instead of a string.
-
-Note: when the `updateSelector` option is set, the rule's selector
-will be updated with the resulting string.
-
-### `transform|transformSync(selectors, [options])`
-
-Like `process()` and `processSync()` but after
-processing the `selectors` these methods return the value returned by the
-processor callback.
-
-Note: when the `updateSelector` option is set, the rule's selector
-will be updated with the resulting string.
-
-### Error Handling Within Selector Processors
-
-The root node passed to the selector processor callback
-has a method `error(message, options)` that returns an
-error object. This method should always be used to raise
-errors relating to the syntax of selectors. The options
-to this method are passed to postcss's error constructor
-([documentation](http://api.postcss.org/Container.html#error)).
-
-#### Async Error Example
-
-```js
-let processor = (root) => {
-    return new Promise((resolve, reject) => {
-        root.walkClasses((classNode) => {
-            if (/^(.*)[-_]/.test(classNode.value)) {
-                let msg = "classes may not have underscores or dashes in them";
-                reject(root.error(msg, {
-                    index: classNode.sourceIndex + RegExp.$1.length + 1,
-                    word: classNode.value
-                }));
-            }
-        });
-        resolve();
-    });
-};
-
-const postcss = require("postcss");
-const parser = require("postcss-selector-parser");
-const selectorProcessor = parser(processor);
-const plugin = postcss.plugin('classValidator', (options) => {
-    return (root) => {
-        let promises = [];
-        root.walkRules(rule => {
-            promises.push(selectorProcessor.process(rule));
-        });
-        return Promise.all(promises);
-    };
-});
-postcss(plugin()).process(`
-.foo-bar {
-  color: red;
-}
-`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
-
-// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
-//
-// > 1 | .foo-bar {
-//     |     ^
-//   2 |   color: red;
-//   3 | }
-```
-
-#### Synchronous Error Example
-
-```js
-let processor = (root) => {
-    root.walkClasses((classNode) => {
-        if (/.*[-_]/.test(classNode.value)) {
-            let msg = "classes may not have underscores or dashes in them";
-            throw root.error(msg, {
-                index: classNode.sourceIndex,
-                word: classNode.value
-            });
-        }
-    });
-};
-
-const postcss = require("postcss");
-const parser = require("postcss-selector-parser");
-const selectorProcessor = parser(processor);
-const plugin = postcss.plugin('classValidator', (options) => {
-    return (root) => {
-        root.walkRules(rule => {
-            selectorProcessor.processSync(rule);
-        });
-    };
-});
-postcss(plugin()).process(`
-.foo-bar {
-  color: red;
-}
-`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
-
-// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
-//
-// > 1 | .foo-bar {
-//     |     ^
-//   2 |   color: red;
-//   3 | }
-```
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/LICENSE-MIT b/node_modules/npm/node_modules/postcss-selector-parser/LICENSE-MIT
deleted file mode 100644
index fd0e863..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/LICENSE-MIT
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) Ben Briggs  (http://beneb.info)
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/index.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/index.js
deleted file mode 100644
index 995741a..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _processor = _interopRequireDefault(require("./processor"));
-var selectors = _interopRequireWildcard(require("./selectors"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-var parser = function parser(processor) {
-  return new _processor["default"](processor);
-};
-Object.assign(parser, selectors);
-delete parser.__esModule;
-var _default = parser;
-exports["default"] = _default;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/parser.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/parser.js
deleted file mode 100644
index b4c75e3..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/parser.js
+++ /dev/null
@@ -1,1012 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _root = _interopRequireDefault(require("./selectors/root"));
-var _selector = _interopRequireDefault(require("./selectors/selector"));
-var _className = _interopRequireDefault(require("./selectors/className"));
-var _comment = _interopRequireDefault(require("./selectors/comment"));
-var _id = _interopRequireDefault(require("./selectors/id"));
-var _tag = _interopRequireDefault(require("./selectors/tag"));
-var _string = _interopRequireDefault(require("./selectors/string"));
-var _pseudo = _interopRequireDefault(require("./selectors/pseudo"));
-var _attribute = _interopRequireWildcard(require("./selectors/attribute"));
-var _universal = _interopRequireDefault(require("./selectors/universal"));
-var _combinator = _interopRequireDefault(require("./selectors/combinator"));
-var _nesting = _interopRequireDefault(require("./selectors/nesting"));
-var _sortAscending = _interopRequireDefault(require("./sortAscending"));
-var _tokenize = _interopRequireWildcard(require("./tokenize"));
-var tokens = _interopRequireWildcard(require("./tokenTypes"));
-var types = _interopRequireWildcard(require("./selectors/types"));
-var _util = require("./util");
-var _WHITESPACE_TOKENS, _Object$assign;
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS);
-var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign));
-function tokenStart(token) {
-  return {
-    line: token[_tokenize.FIELDS.START_LINE],
-    column: token[_tokenize.FIELDS.START_COL]
-  };
-}
-function tokenEnd(token) {
-  return {
-    line: token[_tokenize.FIELDS.END_LINE],
-    column: token[_tokenize.FIELDS.END_COL]
-  };
-}
-function getSource(startLine, startColumn, endLine, endColumn) {
-  return {
-    start: {
-      line: startLine,
-      column: startColumn
-    },
-    end: {
-      line: endLine,
-      column: endColumn
-    }
-  };
-}
-function getTokenSource(token) {
-  return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]);
-}
-function getTokenSourceSpan(startToken, endToken) {
-  if (!startToken) {
-    return undefined;
-  }
-  return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]);
-}
-function unescapeProp(node, prop) {
-  var value = node[prop];
-  if (typeof value !== "string") {
-    return;
-  }
-  if (value.indexOf("\\") !== -1) {
-    (0, _util.ensureObject)(node, 'raws');
-    node[prop] = (0, _util.unesc)(value);
-    if (node.raws[prop] === undefined) {
-      node.raws[prop] = value;
-    }
-  }
-  return node;
-}
-function indexesOf(array, item) {
-  var i = -1;
-  var indexes = [];
-  while ((i = array.indexOf(item, i + 1)) !== -1) {
-    indexes.push(i);
-  }
-  return indexes;
-}
-function uniqs() {
-  var list = Array.prototype.concat.apply([], arguments);
-  return list.filter(function (item, i) {
-    return i === list.indexOf(item);
-  });
-}
-var Parser = /*#__PURE__*/function () {
-  function Parser(rule, options) {
-    if (options === void 0) {
-      options = {};
-    }
-    this.rule = rule;
-    this.options = Object.assign({
-      lossy: false,
-      safe: false
-    }, options);
-    this.position = 0;
-    this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector;
-    this.tokens = (0, _tokenize["default"])({
-      css: this.css,
-      error: this._errorGenerator(),
-      safe: this.options.safe
-    });
-    var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]);
-    this.root = new _root["default"]({
-      source: rootSource
-    });
-    this.root.errorGenerator = this._errorGenerator();
-    var selector = new _selector["default"]({
-      source: {
-        start: {
-          line: 1,
-          column: 1
-        }
-      }
-    });
-    this.root.append(selector);
-    this.current = selector;
-    this.loop();
-  }
-  var _proto = Parser.prototype;
-  _proto._errorGenerator = function _errorGenerator() {
-    var _this = this;
-    return function (message, errorOptions) {
-      if (typeof _this.rule === 'string') {
-        return new Error(message);
-      }
-      return _this.rule.error(message, errorOptions);
-    };
-  };
-  _proto.attribute = function attribute() {
-    var attr = [];
-    var startingToken = this.currToken;
-    this.position++;
-    while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
-      attr.push(this.currToken);
-      this.position++;
-    }
-    if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) {
-      return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
-    }
-    var len = attr.length;
-    var node = {
-      source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]),
-      sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
-    };
-    if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) {
-      return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]);
-    }
-    var pos = 0;
-    var spaceBefore = '';
-    var commentBefore = '';
-    var lastAdded = null;
-    var spaceAfterMeaningfulToken = false;
-    while (pos < len) {
-      var token = attr[pos];
-      var content = this.content(token);
-      var next = attr[pos + 1];
-      switch (token[_tokenize.FIELDS.TYPE]) {
-        case tokens.space:
-          // if (
-          //     len === 1 ||
-          //     pos === 0 && this.content(next) === '|'
-          // ) {
-          //     return this.expected('attribute', token[TOKEN.START_POS], content);
-          // }
-          spaceAfterMeaningfulToken = true;
-          if (this.options.lossy) {
-            break;
-          }
-          if (lastAdded) {
-            (0, _util.ensureObject)(node, 'spaces', lastAdded);
-            var prevContent = node.spaces[lastAdded].after || '';
-            node.spaces[lastAdded].after = prevContent + content;
-            var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null;
-            if (existingComment) {
-              node.raws.spaces[lastAdded].after = existingComment + content;
-            }
-          } else {
-            spaceBefore = spaceBefore + content;
-            commentBefore = commentBefore + content;
-          }
-          break;
-        case tokens.asterisk:
-          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
-            node.operator = content;
-            lastAdded = 'operator';
-          } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) {
-            if (spaceBefore) {
-              (0, _util.ensureObject)(node, 'spaces', 'attribute');
-              node.spaces.attribute.before = spaceBefore;
-              spaceBefore = '';
-            }
-            if (commentBefore) {
-              (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
-              node.raws.spaces.attribute.before = spaceBefore;
-              commentBefore = '';
-            }
-            node.namespace = (node.namespace || "") + content;
-            var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null;
-            if (rawValue) {
-              node.raws.namespace += content;
-            }
-            lastAdded = 'namespace';
-          }
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.dollar:
-          if (lastAdded === "value") {
-            var oldRawValue = (0, _util.getProp)(node, 'raws', 'value');
-            node.value += "$";
-            if (oldRawValue) {
-              node.raws.value = oldRawValue + "$";
-            }
-            break;
-          }
-        // Falls through
-        case tokens.caret:
-          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
-            node.operator = content;
-            lastAdded = 'operator';
-          }
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.combinator:
-          if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) {
-            node.operator = content;
-            lastAdded = 'operator';
-          }
-          if (content !== '|') {
-            spaceAfterMeaningfulToken = false;
-            break;
-          }
-          if (next[_tokenize.FIELDS.TYPE] === tokens.equals) {
-            node.operator = content;
-            lastAdded = 'operator';
-          } else if (!node.namespace && !node.attribute) {
-            node.namespace = true;
-          }
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.word:
-          if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals &&
-          // this look-ahead probably fails with comment nodes involved.
-          !node.operator && !node.namespace) {
-            node.namespace = content;
-            lastAdded = 'namespace';
-          } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) {
-            if (spaceBefore) {
-              (0, _util.ensureObject)(node, 'spaces', 'attribute');
-              node.spaces.attribute.before = spaceBefore;
-              spaceBefore = '';
-            }
-            if (commentBefore) {
-              (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute');
-              node.raws.spaces.attribute.before = commentBefore;
-              commentBefore = '';
-            }
-            node.attribute = (node.attribute || "") + content;
-            var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null;
-            if (_rawValue) {
-              node.raws.attribute += content;
-            }
-            lastAdded = 'attribute';
-          } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) {
-            var _unescaped = (0, _util.unesc)(content);
-            var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || '';
-            var oldValue = node.value || '';
-            node.value = oldValue + _unescaped;
-            node.quoteMark = null;
-            if (_unescaped !== content || _oldRawValue) {
-              (0, _util.ensureObject)(node, 'raws');
-              node.raws.value = (_oldRawValue || oldValue) + content;
-            }
-            lastAdded = 'value';
-          } else {
-            var insensitive = content === 'i' || content === "I";
-            if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) {
-              node.insensitive = insensitive;
-              if (!insensitive || content === "I") {
-                (0, _util.ensureObject)(node, 'raws');
-                node.raws.insensitiveFlag = content;
-              }
-              lastAdded = 'insensitive';
-              if (spaceBefore) {
-                (0, _util.ensureObject)(node, 'spaces', 'insensitive');
-                node.spaces.insensitive.before = spaceBefore;
-                spaceBefore = '';
-              }
-              if (commentBefore) {
-                (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive');
-                node.raws.spaces.insensitive.before = commentBefore;
-                commentBefore = '';
-              }
-            } else if (node.value || node.value === '') {
-              lastAdded = 'value';
-              node.value += content;
-              if (node.raws.value) {
-                node.raws.value += content;
-              }
-            }
-          }
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.str:
-          if (!node.attribute || !node.operator) {
-            return this.error("Expected an attribute followed by an operator preceding the string.", {
-              index: token[_tokenize.FIELDS.START_POS]
-            });
-          }
-          var _unescapeValue = (0, _attribute.unescapeValue)(content),
-            unescaped = _unescapeValue.unescaped,
-            quoteMark = _unescapeValue.quoteMark;
-          node.value = unescaped;
-          node.quoteMark = quoteMark;
-          lastAdded = 'value';
-          (0, _util.ensureObject)(node, 'raws');
-          node.raws.value = content;
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.equals:
-          if (!node.attribute) {
-            return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content);
-          }
-          if (node.value) {
-            return this.error('Unexpected "=" found; an operator was already defined.', {
-              index: token[_tokenize.FIELDS.START_POS]
-            });
-          }
-          node.operator = node.operator ? node.operator + content : content;
-          lastAdded = 'operator';
-          spaceAfterMeaningfulToken = false;
-          break;
-        case tokens.comment:
-          if (lastAdded) {
-            if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') {
-              var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || '';
-              var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment;
-              (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded);
-              node.raws.spaces[lastAdded].after = rawLastComment + content;
-            } else {
-              var lastValue = node[lastAdded] || '';
-              var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue;
-              (0, _util.ensureObject)(node, 'raws');
-              node.raws[lastAdded] = rawLastValue + content;
-            }
-          } else {
-            commentBefore = commentBefore + content;
-          }
-          break;
-        default:
-          return this.error("Unexpected \"" + content + "\" found.", {
-            index: token[_tokenize.FIELDS.START_POS]
-          });
-      }
-      pos++;
-    }
-    unescapeProp(node, "attribute");
-    unescapeProp(node, "namespace");
-    this.newNode(new _attribute["default"](node));
-    this.position++;
-  }
-
-  /**
-   * return a node containing meaningless garbage up to (but not including) the specified token position.
-   * if the token position is negative, all remaining tokens are consumed.
-   *
-   * This returns an array containing a single string node if all whitespace,
-   * otherwise an array of comment nodes with space before and after.
-   *
-   * These tokens are not added to the current selector, the caller can add them or use them to amend
-   * a previous node's space metadata.
-   *
-   * In lossy mode, this returns only comments.
-   */;
-  _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) {
-    if (stopPosition < 0) {
-      stopPosition = this.tokens.length;
-    }
-    var startPosition = this.position;
-    var nodes = [];
-    var space = "";
-    var lastComment = undefined;
-    do {
-      if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
-        if (!this.options.lossy) {
-          space += this.content();
-        }
-      } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) {
-        var spaces = {};
-        if (space) {
-          spaces.before = space;
-          space = "";
-        }
-        lastComment = new _comment["default"]({
-          value: this.content(),
-          source: getTokenSource(this.currToken),
-          sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
-          spaces: spaces
-        });
-        nodes.push(lastComment);
-      }
-    } while (++this.position < stopPosition);
-    if (space) {
-      if (lastComment) {
-        lastComment.spaces.after = space;
-      } else if (!this.options.lossy) {
-        var firstToken = this.tokens[startPosition];
-        var lastToken = this.tokens[this.position - 1];
-        nodes.push(new _string["default"]({
-          value: '',
-          source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]),
-          sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
-          spaces: {
-            before: space,
-            after: ''
-          }
-        }));
-      }
-    }
-    return nodes;
-  }
-
-  /**
-   *
-   * @param {*} nodes
-   */;
-  _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) {
-    var _this2 = this;
-    if (requiredSpace === void 0) {
-      requiredSpace = false;
-    }
-    var space = "";
-    var rawSpace = "";
-    nodes.forEach(function (n) {
-      var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace);
-      var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace);
-      space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0);
-      rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0);
-    });
-    if (rawSpace === space) {
-      rawSpace = undefined;
-    }
-    var result = {
-      space: space,
-      rawSpace: rawSpace
-    };
-    return result;
-  };
-  _proto.isNamedCombinator = function isNamedCombinator(position) {
-    if (position === void 0) {
-      position = this.position;
-    }
-    return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash;
-  };
-  _proto.namedCombinator = function namedCombinator() {
-    if (this.isNamedCombinator()) {
-      var nameRaw = this.content(this.tokens[this.position + 1]);
-      var name = (0, _util.unesc)(nameRaw).toLowerCase();
-      var raws = {};
-      if (name !== nameRaw) {
-        raws.value = "/" + nameRaw + "/";
-      }
-      var node = new _combinator["default"]({
-        value: "/" + name + "/",
-        source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]),
-        sourceIndex: this.currToken[_tokenize.FIELDS.START_POS],
-        raws: raws
-      });
-      this.position = this.position + 3;
-      return node;
-    } else {
-      this.unexpected();
-    }
-  };
-  _proto.combinator = function combinator() {
-    var _this3 = this;
-    if (this.content() === '|') {
-      return this.namespace();
-    }
-    // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector.
-    var nextSigTokenPos = this.locateNextMeaningfulToken(this.position);
-    if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) {
-      var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
-      if (nodes.length > 0) {
-        var last = this.current.last;
-        if (last) {
-          var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes),
-            space = _this$convertWhitespa.space,
-            rawSpace = _this$convertWhitespa.rawSpace;
-          if (rawSpace !== undefined) {
-            last.rawSpaceAfter += rawSpace;
-          }
-          last.spaces.after += space;
-        } else {
-          nodes.forEach(function (n) {
-            return _this3.newNode(n);
-          });
-        }
-      }
-      return;
-    }
-    var firstToken = this.currToken;
-    var spaceOrDescendantSelectorNodes = undefined;
-    if (nextSigTokenPos > this.position) {
-      spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos);
-    }
-    var node;
-    if (this.isNamedCombinator()) {
-      node = this.namedCombinator();
-    } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) {
-      node = new _combinator["default"]({
-        value: this.content(),
-        source: getTokenSource(this.currToken),
-        sourceIndex: this.currToken[_tokenize.FIELDS.START_POS]
-      });
-      this.position++;
-    } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) {
-      // pass
-    } else if (!spaceOrDescendantSelectorNodes) {
-      this.unexpected();
-    }
-    if (node) {
-      if (spaceOrDescendantSelectorNodes) {
-        var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes),
-          _space = _this$convertWhitespa2.space,
-          _rawSpace = _this$convertWhitespa2.rawSpace;
-        node.spaces.before = _space;
-        node.rawSpaceBefore = _rawSpace;
-      }
-    } else {
-      // descendant combinator
-      var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true),
-        _space2 = _this$convertWhitespa3.space,
-        _rawSpace2 = _this$convertWhitespa3.rawSpace;
-      if (!_rawSpace2) {
-        _rawSpace2 = _space2;
-      }
-      var spaces = {};
-      var raws = {
-        spaces: {}
-      };
-      if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) {
-        spaces.before = _space2.slice(0, _space2.length - 1);
-        raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1);
-      } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) {
-        spaces.after = _space2.slice(1);
-        raws.spaces.after = _rawSpace2.slice(1);
-      } else {
-        raws.value = _rawSpace2;
-      }
-      node = new _combinator["default"]({
-        value: ' ',
-        source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]),
-        sourceIndex: firstToken[_tokenize.FIELDS.START_POS],
-        spaces: spaces,
-        raws: raws
-      });
-    }
-    if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) {
-      node.spaces.after = this.optionalSpace(this.content());
-      this.position++;
-    }
-    return this.newNode(node);
-  };
-  _proto.comma = function comma() {
-    if (this.position === this.tokens.length - 1) {
-      this.root.trailingComma = true;
-      this.position++;
-      return;
-    }
-    this.current._inferEndPosition();
-    var selector = new _selector["default"]({
-      source: {
-        start: tokenStart(this.tokens[this.position + 1])
-      }
-    });
-    this.current.parent.append(selector);
-    this.current = selector;
-    this.position++;
-  };
-  _proto.comment = function comment() {
-    var current = this.currToken;
-    this.newNode(new _comment["default"]({
-      value: this.content(),
-      source: getTokenSource(current),
-      sourceIndex: current[_tokenize.FIELDS.START_POS]
-    }));
-    this.position++;
-  };
-  _proto.error = function error(message, opts) {
-    throw this.root.error(message, opts);
-  };
-  _proto.missingBackslash = function missingBackslash() {
-    return this.error('Expected a backslash preceding the semicolon.', {
-      index: this.currToken[_tokenize.FIELDS.START_POS]
-    });
-  };
-  _proto.missingParenthesis = function missingParenthesis() {
-    return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
-  };
-  _proto.missingSquareBracket = function missingSquareBracket() {
-    return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]);
-  };
-  _proto.unexpected = function unexpected() {
-    return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]);
-  };
-  _proto.unexpectedPipe = function unexpectedPipe() {
-    return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]);
-  };
-  _proto.namespace = function namespace() {
-    var before = this.prevToken && this.content(this.prevToken) || true;
-    if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) {
-      this.position++;
-      return this.word(before);
-    } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) {
-      this.position++;
-      return this.universal(before);
-    }
-    this.unexpectedPipe();
-  };
-  _proto.nesting = function nesting() {
-    if (this.nextToken) {
-      var nextContent = this.content(this.nextToken);
-      if (nextContent === "|") {
-        this.position++;
-        return;
-      }
-    }
-    var current = this.currToken;
-    this.newNode(new _nesting["default"]({
-      value: this.content(),
-      source: getTokenSource(current),
-      sourceIndex: current[_tokenize.FIELDS.START_POS]
-    }));
-    this.position++;
-  };
-  _proto.parentheses = function parentheses() {
-    var last = this.current.last;
-    var unbalanced = 1;
-    this.position++;
-    if (last && last.type === types.PSEUDO) {
-      var selector = new _selector["default"]({
-        source: {
-          start: tokenStart(this.tokens[this.position - 1])
-        }
-      });
-      var cache = this.current;
-      last.append(selector);
-      this.current = selector;
-      while (this.position < this.tokens.length && unbalanced) {
-        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
-          unbalanced++;
-        }
-        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
-          unbalanced--;
-        }
-        if (unbalanced) {
-          this.parse();
-        } else {
-          this.current.source.end = tokenEnd(this.currToken);
-          this.current.parent.source.end = tokenEnd(this.currToken);
-          this.position++;
-        }
-      }
-      this.current = cache;
-    } else {
-      // I think this case should be an error. It's used to implement a basic parse of media queries
-      // but I don't think it's a good idea.
-      var parenStart = this.currToken;
-      var parenValue = "(";
-      var parenEnd;
-      while (this.position < this.tokens.length && unbalanced) {
-        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
-          unbalanced++;
-        }
-        if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
-          unbalanced--;
-        }
-        parenEnd = this.currToken;
-        parenValue += this.parseParenthesisToken(this.currToken);
-        this.position++;
-      }
-      if (last) {
-        last.appendToPropertyAndEscape("value", parenValue, parenValue);
-      } else {
-        this.newNode(new _string["default"]({
-          value: parenValue,
-          source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]),
-          sourceIndex: parenStart[_tokenize.FIELDS.START_POS]
-        }));
-      }
-    }
-    if (unbalanced) {
-      return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]);
-    }
-  };
-  _proto.pseudo = function pseudo() {
-    var _this4 = this;
-    var pseudoStr = '';
-    var startingToken = this.currToken;
-    while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) {
-      pseudoStr += this.content();
-      this.position++;
-    }
-    if (!this.currToken) {
-      return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1);
-    }
-    if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) {
-      this.splitWord(false, function (first, length) {
-        pseudoStr += first;
-        _this4.newNode(new _pseudo["default"]({
-          value: pseudoStr,
-          source: getTokenSourceSpan(startingToken, _this4.currToken),
-          sourceIndex: startingToken[_tokenize.FIELDS.START_POS]
-        }));
-        if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) {
-          _this4.error('Misplaced parenthesis.', {
-            index: _this4.nextToken[_tokenize.FIELDS.START_POS]
-          });
-        }
-      });
-    } else {
-      return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]);
-    }
-  };
-  _proto.space = function space() {
-    var content = this.content();
-    // Handle space before and after the selector
-    if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) {
-      return node.type === 'comment';
-    })) {
-      this.spaces = this.optionalSpace(content);
-      this.position++;
-    } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) {
-      this.current.last.spaces.after = this.optionalSpace(content);
-      this.position++;
-    } else {
-      this.combinator();
-    }
-  };
-  _proto.string = function string() {
-    var current = this.currToken;
-    this.newNode(new _string["default"]({
-      value: this.content(),
-      source: getTokenSource(current),
-      sourceIndex: current[_tokenize.FIELDS.START_POS]
-    }));
-    this.position++;
-  };
-  _proto.universal = function universal(namespace) {
-    var nextToken = this.nextToken;
-    if (nextToken && this.content(nextToken) === '|') {
-      this.position++;
-      return this.namespace();
-    }
-    var current = this.currToken;
-    this.newNode(new _universal["default"]({
-      value: this.content(),
-      source: getTokenSource(current),
-      sourceIndex: current[_tokenize.FIELDS.START_POS]
-    }), namespace);
-    this.position++;
-  };
-  _proto.splitWord = function splitWord(namespace, firstCallback) {
-    var _this5 = this;
-    var nextToken = this.nextToken;
-    var word = this.content();
-    while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) {
-      this.position++;
-      var current = this.content();
-      word += current;
-      if (current.lastIndexOf('\\') === current.length - 1) {
-        var next = this.nextToken;
-        if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) {
-          word += this.requiredSpace(this.content(next));
-          this.position++;
-        }
-      }
-      nextToken = this.nextToken;
-    }
-    var hasClass = indexesOf(word, '.').filter(function (i) {
-      // Allow escaped dot within class name
-      var escapedDot = word[i - 1] === '\\';
-      // Allow decimal numbers percent in @keyframes
-      var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
-      return !escapedDot && !isKeyframesPercent;
-    });
-    var hasId = indexesOf(word, '#').filter(function (i) {
-      return word[i - 1] !== '\\';
-    });
-    // Eliminate Sass interpolations from the list of id indexes
-    var interpolations = indexesOf(word, '#{');
-    if (interpolations.length) {
-      hasId = hasId.filter(function (hashIndex) {
-        return !~interpolations.indexOf(hashIndex);
-      });
-    }
-    var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId)));
-    indices.forEach(function (ind, i) {
-      var index = indices[i + 1] || word.length;
-      var value = word.slice(ind, index);
-      if (i === 0 && firstCallback) {
-        return firstCallback.call(_this5, value, indices.length);
-      }
-      var node;
-      var current = _this5.currToken;
-      var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i];
-      var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1));
-      if (~hasClass.indexOf(ind)) {
-        var classNameOpts = {
-          value: value.slice(1),
-          source: source,
-          sourceIndex: sourceIndex
-        };
-        node = new _className["default"](unescapeProp(classNameOpts, "value"));
-      } else if (~hasId.indexOf(ind)) {
-        var idOpts = {
-          value: value.slice(1),
-          source: source,
-          sourceIndex: sourceIndex
-        };
-        node = new _id["default"](unescapeProp(idOpts, "value"));
-      } else {
-        var tagOpts = {
-          value: value,
-          source: source,
-          sourceIndex: sourceIndex
-        };
-        unescapeProp(tagOpts, "value");
-        node = new _tag["default"](tagOpts);
-      }
-      _this5.newNode(node, namespace);
-      // Ensure that the namespace is used only once
-      namespace = null;
-    });
-    this.position++;
-  };
-  _proto.word = function word(namespace) {
-    var nextToken = this.nextToken;
-    if (nextToken && this.content(nextToken) === '|') {
-      this.position++;
-      return this.namespace();
-    }
-    return this.splitWord(namespace);
-  };
-  _proto.loop = function loop() {
-    while (this.position < this.tokens.length) {
-      this.parse(true);
-    }
-    this.current._inferEndPosition();
-    return this.root;
-  };
-  _proto.parse = function parse(throwOnParenthesis) {
-    switch (this.currToken[_tokenize.FIELDS.TYPE]) {
-      case tokens.space:
-        this.space();
-        break;
-      case tokens.comment:
-        this.comment();
-        break;
-      case tokens.openParenthesis:
-        this.parentheses();
-        break;
-      case tokens.closeParenthesis:
-        if (throwOnParenthesis) {
-          this.missingParenthesis();
-        }
-        break;
-      case tokens.openSquare:
-        this.attribute();
-        break;
-      case tokens.dollar:
-      case tokens.caret:
-      case tokens.equals:
-      case tokens.word:
-        this.word();
-        break;
-      case tokens.colon:
-        this.pseudo();
-        break;
-      case tokens.comma:
-        this.comma();
-        break;
-      case tokens.asterisk:
-        this.universal();
-        break;
-      case tokens.ampersand:
-        this.nesting();
-        break;
-      case tokens.slash:
-      case tokens.combinator:
-        this.combinator();
-        break;
-      case tokens.str:
-        this.string();
-        break;
-      // These cases throw; no break needed.
-      case tokens.closeSquare:
-        this.missingSquareBracket();
-      case tokens.semicolon:
-        this.missingBackslash();
-      default:
-        this.unexpected();
-    }
-  }
-
-  /**
-   * Helpers
-   */;
-  _proto.expected = function expected(description, index, found) {
-    if (Array.isArray(description)) {
-      var last = description.pop();
-      description = description.join(', ') + " or " + last;
-    }
-    var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a';
-    if (!found) {
-      return this.error("Expected " + an + " " + description + ".", {
-        index: index
-      });
-    }
-    return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", {
-      index: index
-    });
-  };
-  _proto.requiredSpace = function requiredSpace(space) {
-    return this.options.lossy ? ' ' : space;
-  };
-  _proto.optionalSpace = function optionalSpace(space) {
-    return this.options.lossy ? '' : space;
-  };
-  _proto.lossySpace = function lossySpace(space, required) {
-    if (this.options.lossy) {
-      return required ? ' ' : '';
-    } else {
-      return space;
-    }
-  };
-  _proto.parseParenthesisToken = function parseParenthesisToken(token) {
-    var content = this.content(token);
-    if (token[_tokenize.FIELDS.TYPE] === tokens.space) {
-      return this.requiredSpace(content);
-    } else {
-      return content;
-    }
-  };
-  _proto.newNode = function newNode(node, namespace) {
-    if (namespace) {
-      if (/^ +$/.test(namespace)) {
-        if (!this.options.lossy) {
-          this.spaces = (this.spaces || '') + namespace;
-        }
-        namespace = true;
-      }
-      node.namespace = namespace;
-      unescapeProp(node, "namespace");
-    }
-    if (this.spaces) {
-      node.spaces.before = this.spaces;
-      this.spaces = '';
-    }
-    return this.current.append(node);
-  };
-  _proto.content = function content(token) {
-    if (token === void 0) {
-      token = this.currToken;
-    }
-    return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]);
-  };
-  /**
-   * returns the index of the next non-whitespace, non-comment token.
-   * returns -1 if no meaningful token is found.
-   */
-  _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) {
-    if (startPosition === void 0) {
-      startPosition = this.position + 1;
-    }
-    var searchPosition = startPosition;
-    while (searchPosition < this.tokens.length) {
-      if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) {
-        searchPosition++;
-        continue;
-      } else {
-        return searchPosition;
-      }
-    }
-    return -1;
-  };
-  _createClass(Parser, [{
-    key: "currToken",
-    get: function get() {
-      return this.tokens[this.position];
-    }
-  }, {
-    key: "nextToken",
-    get: function get() {
-      return this.tokens[this.position + 1];
-    }
-  }, {
-    key: "prevToken",
-    get: function get() {
-      return this.tokens[this.position - 1];
-    }
-  }]);
-  return Parser;
-}();
-exports["default"] = Parser;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/processor.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/processor.js
deleted file mode 100644
index dbfa091..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/processor.js
+++ /dev/null
@@ -1,170 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _parser = _interopRequireDefault(require("./parser"));
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-var Processor = /*#__PURE__*/function () {
-  function Processor(func, options) {
-    this.func = func || function noop() {};
-    this.funcRes = null;
-    this.options = options;
-  }
-  var _proto = Processor.prototype;
-  _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) {
-    if (options === void 0) {
-      options = {};
-    }
-    var merged = Object.assign({}, this.options, options);
-    if (merged.updateSelector === false) {
-      return false;
-    } else {
-      return typeof rule !== "string";
-    }
-  };
-  _proto._isLossy = function _isLossy(options) {
-    if (options === void 0) {
-      options = {};
-    }
-    var merged = Object.assign({}, this.options, options);
-    if (merged.lossless === false) {
-      return true;
-    } else {
-      return false;
-    }
-  };
-  _proto._root = function _root(rule, options) {
-    if (options === void 0) {
-      options = {};
-    }
-    var parser = new _parser["default"](rule, this._parseOptions(options));
-    return parser.root;
-  };
-  _proto._parseOptions = function _parseOptions(options) {
-    return {
-      lossy: this._isLossy(options)
-    };
-  };
-  _proto._run = function _run(rule, options) {
-    var _this = this;
-    if (options === void 0) {
-      options = {};
-    }
-    return new Promise(function (resolve, reject) {
-      try {
-        var root = _this._root(rule, options);
-        Promise.resolve(_this.func(root)).then(function (transform) {
-          var string = undefined;
-          if (_this._shouldUpdateSelector(rule, options)) {
-            string = root.toString();
-            rule.selector = string;
-          }
-          return {
-            transform: transform,
-            root: root,
-            string: string
-          };
-        }).then(resolve, reject);
-      } catch (e) {
-        reject(e);
-        return;
-      }
-    });
-  };
-  _proto._runSync = function _runSync(rule, options) {
-    if (options === void 0) {
-      options = {};
-    }
-    var root = this._root(rule, options);
-    var transform = this.func(root);
-    if (transform && typeof transform.then === "function") {
-      throw new Error("Selector processor returned a promise to a synchronous call.");
-    }
-    var string = undefined;
-    if (options.updateSelector && typeof rule !== "string") {
-      string = root.toString();
-      rule.selector = string;
-    }
-    return {
-      transform: transform,
-      root: root,
-      string: string
-    };
-  }
-
-  /**
-   * Process rule into a selector AST.
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {Promise} The AST of the selector after processing it.
-   */;
-  _proto.ast = function ast(rule, options) {
-    return this._run(rule, options).then(function (result) {
-      return result.root;
-    });
-  }
-
-  /**
-   * Process rule into a selector AST synchronously.
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {parser.Root} The AST of the selector after processing it.
-   */;
-  _proto.astSync = function astSync(rule, options) {
-    return this._runSync(rule, options).root;
-  }
-
-  /**
-   * Process a selector into a transformed value asynchronously
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {Promise} The value returned by the processor.
-   */;
-  _proto.transform = function transform(rule, options) {
-    return this._run(rule, options).then(function (result) {
-      return result.transform;
-    });
-  }
-
-  /**
-   * Process a selector into a transformed value synchronously.
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {any} The value returned by the processor.
-   */;
-  _proto.transformSync = function transformSync(rule, options) {
-    return this._runSync(rule, options).transform;
-  }
-
-  /**
-   * Process a selector into a new selector string asynchronously.
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {string} the selector after processing.
-   */;
-  _proto.process = function process(rule, options) {
-    return this._run(rule, options).then(function (result) {
-      return result.string || result.root.toString();
-    });
-  }
-
-  /**
-   * Process a selector into a new selector string synchronously.
-   *
-   * @param rule {postcss.Rule | string} The css selector to be processed
-   * @param options The options for processing
-   * @returns {string} the selector after processing.
-   */;
-  _proto.processSync = function processSync(rule, options) {
-    var result = this._runSync(rule, options);
-    return result.string || result.root.toString();
-  };
-  return Processor;
-}();
-exports["default"] = Processor;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js
deleted file mode 100644
index 0351a22..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/attribute.js
+++ /dev/null
@@ -1,448 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-exports.unescapeValue = unescapeValue;
-var _cssesc = _interopRequireDefault(require("cssesc"));
-var _unesc = _interopRequireDefault(require("../util/unesc"));
-var _namespace = _interopRequireDefault(require("./namespace"));
-var _types = require("./types");
-var _CSSESC_QUOTE_OPTIONS;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var deprecate = require("util-deprecate");
-var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/;
-var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead.");
-var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead.");
-var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");
-function unescapeValue(value) {
-  var deprecatedUsage = false;
-  var quoteMark = null;
-  var unescaped = value;
-  var m = unescaped.match(WRAPPED_IN_QUOTES);
-  if (m) {
-    quoteMark = m[1];
-    unescaped = m[2];
-  }
-  unescaped = (0, _unesc["default"])(unescaped);
-  if (unescaped !== value) {
-    deprecatedUsage = true;
-  }
-  return {
-    deprecatedUsage: deprecatedUsage,
-    unescaped: unescaped,
-    quoteMark: quoteMark
-  };
-}
-function handleDeprecatedContructorOpts(opts) {
-  if (opts.quoteMark !== undefined) {
-    return opts;
-  }
-  if (opts.value === undefined) {
-    return opts;
-  }
-  warnOfDeprecatedConstructor();
-  var _unescapeValue = unescapeValue(opts.value),
-    quoteMark = _unescapeValue.quoteMark,
-    unescaped = _unescapeValue.unescaped;
-  if (!opts.raws) {
-    opts.raws = {};
-  }
-  if (opts.raws.value === undefined) {
-    opts.raws.value = opts.value;
-  }
-  opts.value = unescaped;
-  opts.quoteMark = quoteMark;
-  return opts;
-}
-var Attribute = /*#__PURE__*/function (_Namespace) {
-  _inheritsLoose(Attribute, _Namespace);
-  function Attribute(opts) {
-    var _this;
-    if (opts === void 0) {
-      opts = {};
-    }
-    _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this;
-    _this.type = _types.ATTRIBUTE;
-    _this.raws = _this.raws || {};
-    Object.defineProperty(_this.raws, 'unquoted', {
-      get: deprecate(function () {
-        return _this.value;
-      }, "attr.raws.unquoted is deprecated. Call attr.value instead."),
-      set: deprecate(function () {
-        return _this.value;
-      }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")
-    });
-    _this._constructed = true;
-    return _this;
-  }
-
-  /**
-   * Returns the Attribute's value quoted such that it would be legal to use
-   * in the value of a css file. The original value's quotation setting
-   * used for stringification is left unchanged. See `setValue(value, options)`
-   * if you want to control the quote settings of a new value for the attribute.
-   *
-   * You can also change the quotation used for the current value by setting quoteMark.
-   *
-   * Options:
-   *   * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this
-   *     option is not set, the original value for quoteMark will be used. If
-   *     indeterminate, a double quote is used. The legal values are:
-   *     * `null` - the value will be unquoted and characters will be escaped as necessary.
-   *     * `'` - the value will be quoted with a single quote and single quotes are escaped.
-   *     * `"` - the value will be quoted with a double quote and double quotes are escaped.
-   *   * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark
-   *     over the quoteMark option value.
-   *   * smart {boolean} - if true, will select a quote mark based on the value
-   *     and the other options specified here. See the `smartQuoteMark()`
-   *     method.
-   **/
-  var _proto = Attribute.prototype;
-  _proto.getQuotedValue = function getQuotedValue(options) {
-    if (options === void 0) {
-      options = {};
-    }
-    var quoteMark = this._determineQuoteMark(options);
-    var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark];
-    var escaped = (0, _cssesc["default"])(this._value, cssescopts);
-    return escaped;
-  };
-  _proto._determineQuoteMark = function _determineQuoteMark(options) {
-    return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options);
-  }
-
-  /**
-   * Set the unescaped value with the specified quotation options. The value
-   * provided must not include any wrapping quote marks -- those quotes will
-   * be interpreted as part of the value and escaped accordingly.
-   */;
-  _proto.setValue = function setValue(value, options) {
-    if (options === void 0) {
-      options = {};
-    }
-    this._value = value;
-    this._quoteMark = this._determineQuoteMark(options);
-    this._syncRawValue();
-  }
-
-  /**
-   * Intelligently select a quoteMark value based on the value's contents. If
-   * the value is a legal CSS ident, it will not be quoted. Otherwise a quote
-   * mark will be picked that minimizes the number of escapes.
-   *
-   * If there's no clear winner, the quote mark from these options is used,
-   * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is
-   * true). If the quoteMark is unspecified, a double quote is used.
-   *
-   * @param options This takes the quoteMark and preferCurrentQuoteMark options
-   * from the quoteValue method.
-   */;
-  _proto.smartQuoteMark = function smartQuoteMark(options) {
-    var v = this.value;
-    var numSingleQuotes = v.replace(/[^']/g, '').length;
-    var numDoubleQuotes = v.replace(/[^"]/g, '').length;
-    if (numSingleQuotes + numDoubleQuotes === 0) {
-      var escaped = (0, _cssesc["default"])(v, {
-        isIdentifier: true
-      });
-      if (escaped === v) {
-        return Attribute.NO_QUOTE;
-      } else {
-        var pref = this.preferredQuoteMark(options);
-        if (pref === Attribute.NO_QUOTE) {
-          // pick a quote mark that isn't none and see if it's smaller
-          var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE;
-          var opts = CSSESC_QUOTE_OPTIONS[quote];
-          var quoteValue = (0, _cssesc["default"])(v, opts);
-          if (quoteValue.length < escaped.length) {
-            return quote;
-          }
-        }
-        return pref;
-      }
-    } else if (numDoubleQuotes === numSingleQuotes) {
-      return this.preferredQuoteMark(options);
-    } else if (numDoubleQuotes < numSingleQuotes) {
-      return Attribute.DOUBLE_QUOTE;
-    } else {
-      return Attribute.SINGLE_QUOTE;
-    }
-  }
-
-  /**
-   * Selects the preferred quote mark based on the options and the current quote mark value.
-   * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)`
-   * instead.
-   */;
-  _proto.preferredQuoteMark = function preferredQuoteMark(options) {
-    var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark;
-    if (quoteMark === undefined) {
-      quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark;
-    }
-    if (quoteMark === undefined) {
-      quoteMark = Attribute.DOUBLE_QUOTE;
-    }
-    return quoteMark;
-  };
-  _proto._syncRawValue = function _syncRawValue() {
-    var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]);
-    if (rawValue === this._value) {
-      if (this.raws) {
-        delete this.raws.value;
-      }
-    } else {
-      this.raws.value = rawValue;
-    }
-  };
-  _proto._handleEscapes = function _handleEscapes(prop, value) {
-    if (this._constructed) {
-      var escaped = (0, _cssesc["default"])(value, {
-        isIdentifier: true
-      });
-      if (escaped !== value) {
-        this.raws[prop] = escaped;
-      } else {
-        delete this.raws[prop];
-      }
-    }
-  };
-  _proto._spacesFor = function _spacesFor(name) {
-    var attrSpaces = {
-      before: '',
-      after: ''
-    };
-    var spaces = this.spaces[name] || {};
-    var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {};
-    return Object.assign(attrSpaces, spaces, rawSpaces);
-  };
-  _proto._stringFor = function _stringFor(name, spaceName, concat) {
-    if (spaceName === void 0) {
-      spaceName = name;
-    }
-    if (concat === void 0) {
-      concat = defaultAttrConcat;
-    }
-    var attrSpaces = this._spacesFor(spaceName);
-    return concat(this.stringifyProperty(name), attrSpaces);
-  }
-
-  /**
-   * returns the offset of the attribute part specified relative to the
-   * start of the node of the output string.
-   *
-   * * "ns" - alias for "namespace"
-   * * "namespace" - the namespace if it exists.
-   * * "attribute" - the attribute name
-   * * "attributeNS" - the start of the attribute or its namespace
-   * * "operator" - the match operator of the attribute
-   * * "value" - The value (string or identifier)
-   * * "insensitive" - the case insensitivity flag;
-   * @param part One of the possible values inside an attribute.
-   * @returns -1 if the name is invalid or the value doesn't exist in this attribute.
-   */;
-  _proto.offsetOf = function offsetOf(name) {
-    var count = 1;
-    var attributeSpaces = this._spacesFor("attribute");
-    count += attributeSpaces.before.length;
-    if (name === "namespace" || name === "ns") {
-      return this.namespace ? count : -1;
-    }
-    if (name === "attributeNS") {
-      return count;
-    }
-    count += this.namespaceString.length;
-    if (this.namespace) {
-      count += 1;
-    }
-    if (name === "attribute") {
-      return count;
-    }
-    count += this.stringifyProperty("attribute").length;
-    count += attributeSpaces.after.length;
-    var operatorSpaces = this._spacesFor("operator");
-    count += operatorSpaces.before.length;
-    var operator = this.stringifyProperty("operator");
-    if (name === "operator") {
-      return operator ? count : -1;
-    }
-    count += operator.length;
-    count += operatorSpaces.after.length;
-    var valueSpaces = this._spacesFor("value");
-    count += valueSpaces.before.length;
-    var value = this.stringifyProperty("value");
-    if (name === "value") {
-      return value ? count : -1;
-    }
-    count += value.length;
-    count += valueSpaces.after.length;
-    var insensitiveSpaces = this._spacesFor("insensitive");
-    count += insensitiveSpaces.before.length;
-    if (name === "insensitive") {
-      return this.insensitive ? count : -1;
-    }
-    return -1;
-  };
-  _proto.toString = function toString() {
-    var _this2 = this;
-    var selector = [this.rawSpaceBefore, '['];
-    selector.push(this._stringFor('qualifiedAttribute', 'attribute'));
-    if (this.operator && (this.value || this.value === '')) {
-      selector.push(this._stringFor('operator'));
-      selector.push(this._stringFor('value'));
-      selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) {
-        if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) {
-          attrSpaces.before = " ";
-        }
-        return defaultAttrConcat(attrValue, attrSpaces);
-      }));
-    }
-    selector.push(']');
-    selector.push(this.rawSpaceAfter);
-    return selector.join('');
-  };
-  _createClass(Attribute, [{
-    key: "quoted",
-    get: function get() {
-      var qm = this.quoteMark;
-      return qm === "'" || qm === '"';
-    },
-    set: function set(value) {
-      warnOfDeprecatedQuotedAssignment();
-    }
-
-    /**
-     * returns a single (`'`) or double (`"`) quote character if the value is quoted.
-     * returns `null` if the value is not quoted.
-     * returns `undefined` if the quotation state is unknown (this can happen when
-     * the attribute is constructed without specifying a quote mark.)
-     */
-  }, {
-    key: "quoteMark",
-    get: function get() {
-      return this._quoteMark;
-    }
-
-    /**
-     * Set the quote mark to be used by this attribute's value.
-     * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute
-     * value is updated accordingly.
-     *
-     * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted.
-     */,
-    set: function set(quoteMark) {
-      if (!this._constructed) {
-        this._quoteMark = quoteMark;
-        return;
-      }
-      if (this._quoteMark !== quoteMark) {
-        this._quoteMark = quoteMark;
-        this._syncRawValue();
-      }
-    }
-  }, {
-    key: "qualifiedAttribute",
-    get: function get() {
-      return this.qualifiedName(this.raws.attribute || this.attribute);
-    }
-  }, {
-    key: "insensitiveFlag",
-    get: function get() {
-      return this.insensitive ? 'i' : '';
-    }
-  }, {
-    key: "value",
-    get: function get() {
-      return this._value;
-    },
-    set:
-    /**
-     * Before 3.0, the value had to be set to an escaped value including any wrapped
-     * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value
-     * is unescaped during parsing and any quote marks are removed.
-     *
-     * Because the ambiguity of this semantic change, if you set `attr.value = newValue`,
-     * a deprecation warning is raised when the new value contains any characters that would
-     * require escaping (including if it contains wrapped quotes).
-     *
-     * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe
-     * how the new value is quoted.
-     */
-    function set(v) {
-      if (this._constructed) {
-        var _unescapeValue2 = unescapeValue(v),
-          deprecatedUsage = _unescapeValue2.deprecatedUsage,
-          unescaped = _unescapeValue2.unescaped,
-          quoteMark = _unescapeValue2.quoteMark;
-        if (deprecatedUsage) {
-          warnOfDeprecatedValueAssignment();
-        }
-        if (unescaped === this._value && quoteMark === this._quoteMark) {
-          return;
-        }
-        this._value = unescaped;
-        this._quoteMark = quoteMark;
-        this._syncRawValue();
-      } else {
-        this._value = v;
-      }
-    }
-  }, {
-    key: "insensitive",
-    get: function get() {
-      return this._insensitive;
-    }
-
-    /**
-     * Set the case insensitive flag.
-     * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag`
-     * of the attribute is updated accordingly.
-     *
-     * @param {true | false} insensitive true if the attribute should match case-insensitively.
-     */,
-    set: function set(insensitive) {
-      if (!insensitive) {
-        this._insensitive = false;
-
-        // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation.
-        // When setting `attr.insensitive = false` both should be erased to ensure correct serialization.
-        if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) {
-          this.raws.insensitiveFlag = undefined;
-        }
-      }
-      this._insensitive = insensitive;
-    }
-  }, {
-    key: "attribute",
-    get: function get() {
-      return this._attribute;
-    },
-    set: function set(name) {
-      this._handleEscapes("attribute", name);
-      this._attribute = name;
-    }
-  }]);
-  return Attribute;
-}(_namespace["default"]);
-exports["default"] = Attribute;
-Attribute.NO_QUOTE = null;
-Attribute.SINGLE_QUOTE = "'";
-Attribute.DOUBLE_QUOTE = '"';
-var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = {
-  "'": {
-    quotes: 'single',
-    wrap: true
-  },
-  '"': {
-    quotes: 'double',
-    wrap: true
-  }
-}, _CSSESC_QUOTE_OPTIONS[null] = {
-  isIdentifier: true
-}, _CSSESC_QUOTE_OPTIONS);
-function defaultAttrConcat(attrValue, attrSpaces) {
-  return "" + attrSpaces.before + attrValue + attrSpaces.after;
-}
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/className.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/className.js
deleted file mode 100644
index af32597..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/className.js
+++ /dev/null
@@ -1,50 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _cssesc = _interopRequireDefault(require("cssesc"));
-var _util = require("../util");
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var ClassName = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(ClassName, _Node);
-  function ClassName(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.CLASS;
-    _this._constructed = true;
-    return _this;
-  }
-  var _proto = ClassName.prototype;
-  _proto.valueToString = function valueToString() {
-    return '.' + _Node.prototype.valueToString.call(this);
-  };
-  _createClass(ClassName, [{
-    key: "value",
-    get: function get() {
-      return this._value;
-    },
-    set: function set(v) {
-      if (this._constructed) {
-        var escaped = (0, _cssesc["default"])(v, {
-          isIdentifier: true
-        });
-        if (escaped !== v) {
-          (0, _util.ensureObject)(this, "raws");
-          this.raws.value = escaped;
-        } else if (this.raws) {
-          delete this.raws.value;
-        }
-      }
-      this._value = v;
-    }
-  }]);
-  return ClassName;
-}(_node["default"]);
-exports["default"] = ClassName;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js
deleted file mode 100644
index c6449f4..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/combinator.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Combinator = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(Combinator, _Node);
-  function Combinator(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.COMBINATOR;
-    return _this;
-  }
-  return Combinator;
-}(_node["default"]);
-exports["default"] = Combinator;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js
deleted file mode 100644
index 1709d5b..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/comment.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Comment = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(Comment, _Node);
-  function Comment(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.COMMENT;
-    return _this;
-  }
-  return Comment;
-}(_node["default"]);
-exports["default"] = Comment;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js
deleted file mode 100644
index 6882593..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/constructors.js
+++ /dev/null
@@ -1,65 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
-var _attribute = _interopRequireDefault(require("./attribute"));
-var _className = _interopRequireDefault(require("./className"));
-var _combinator = _interopRequireDefault(require("./combinator"));
-var _comment = _interopRequireDefault(require("./comment"));
-var _id = _interopRequireDefault(require("./id"));
-var _nesting = _interopRequireDefault(require("./nesting"));
-var _pseudo = _interopRequireDefault(require("./pseudo"));
-var _root = _interopRequireDefault(require("./root"));
-var _selector = _interopRequireDefault(require("./selector"));
-var _string = _interopRequireDefault(require("./string"));
-var _tag = _interopRequireDefault(require("./tag"));
-var _universal = _interopRequireDefault(require("./universal"));
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-var attribute = function attribute(opts) {
-  return new _attribute["default"](opts);
-};
-exports.attribute = attribute;
-var className = function className(opts) {
-  return new _className["default"](opts);
-};
-exports.className = className;
-var combinator = function combinator(opts) {
-  return new _combinator["default"](opts);
-};
-exports.combinator = combinator;
-var comment = function comment(opts) {
-  return new _comment["default"](opts);
-};
-exports.comment = comment;
-var id = function id(opts) {
-  return new _id["default"](opts);
-};
-exports.id = id;
-var nesting = function nesting(opts) {
-  return new _nesting["default"](opts);
-};
-exports.nesting = nesting;
-var pseudo = function pseudo(opts) {
-  return new _pseudo["default"](opts);
-};
-exports.pseudo = pseudo;
-var root = function root(opts) {
-  return new _root["default"](opts);
-};
-exports.root = root;
-var selector = function selector(opts) {
-  return new _selector["default"](opts);
-};
-exports.selector = selector;
-var string = function string(opts) {
-  return new _string["default"](opts);
-};
-exports.string = string;
-var tag = function tag(opts) {
-  return new _tag["default"](opts);
-};
-exports.tag = tag;
-var universal = function universal(opts) {
-  return new _universal["default"](opts);
-};
-exports.universal = universal;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/container.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/container.js
deleted file mode 100644
index 8600c54..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/container.js
+++ /dev/null
@@ -1,308 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var types = _interopRequireWildcard(require("./types"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Container = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(Container, _Node);
-  function Container(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    if (!_this.nodes) {
-      _this.nodes = [];
-    }
-    return _this;
-  }
-  var _proto = Container.prototype;
-  _proto.append = function append(selector) {
-    selector.parent = this;
-    this.nodes.push(selector);
-    return this;
-  };
-  _proto.prepend = function prepend(selector) {
-    selector.parent = this;
-    this.nodes.unshift(selector);
-    return this;
-  };
-  _proto.at = function at(index) {
-    return this.nodes[index];
-  };
-  _proto.index = function index(child) {
-    if (typeof child === 'number') {
-      return child;
-    }
-    return this.nodes.indexOf(child);
-  };
-  _proto.removeChild = function removeChild(child) {
-    child = this.index(child);
-    this.at(child).parent = undefined;
-    this.nodes.splice(child, 1);
-    var index;
-    for (var id in this.indexes) {
-      index = this.indexes[id];
-      if (index >= child) {
-        this.indexes[id] = index - 1;
-      }
-    }
-    return this;
-  };
-  _proto.removeAll = function removeAll() {
-    for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) {
-      var node = _step.value;
-      node.parent = undefined;
-    }
-    this.nodes = [];
-    return this;
-  };
-  _proto.empty = function empty() {
-    return this.removeAll();
-  };
-  _proto.insertAfter = function insertAfter(oldNode, newNode) {
-    newNode.parent = this;
-    var oldIndex = this.index(oldNode);
-    this.nodes.splice(oldIndex + 1, 0, newNode);
-    newNode.parent = this;
-    var index;
-    for (var id in this.indexes) {
-      index = this.indexes[id];
-      if (oldIndex <= index) {
-        this.indexes[id] = index + 1;
-      }
-    }
-    return this;
-  };
-  _proto.insertBefore = function insertBefore(oldNode, newNode) {
-    newNode.parent = this;
-    var oldIndex = this.index(oldNode);
-    this.nodes.splice(oldIndex, 0, newNode);
-    newNode.parent = this;
-    var index;
-    for (var id in this.indexes) {
-      index = this.indexes[id];
-      if (index <= oldIndex) {
-        this.indexes[id] = index + 1;
-      }
-    }
-    return this;
-  };
-  _proto._findChildAtPosition = function _findChildAtPosition(line, col) {
-    var found = undefined;
-    this.each(function (node) {
-      if (node.atPosition) {
-        var foundChild = node.atPosition(line, col);
-        if (foundChild) {
-          found = foundChild;
-          return false;
-        }
-      } else if (node.isAtPosition(line, col)) {
-        found = node;
-        return false;
-      }
-    });
-    return found;
-  }
-
-  /**
-   * Return the most specific node at the line and column number given.
-   * The source location is based on the original parsed location, locations aren't
-   * updated as selector nodes are mutated.
-   * 
-   * Note that this location is relative to the location of the first character
-   * of the selector, and not the location of the selector in the overall document
-   * when used in conjunction with postcss.
-   *
-   * If not found, returns undefined.
-   * @param {number} line The line number of the node to find. (1-based index)
-   * @param {number} col  The column number of the node to find. (1-based index)
-   */;
-  _proto.atPosition = function atPosition(line, col) {
-    if (this.isAtPosition(line, col)) {
-      return this._findChildAtPosition(line, col) || this;
-    } else {
-      return undefined;
-    }
-  };
-  _proto._inferEndPosition = function _inferEndPosition() {
-    if (this.last && this.last.source && this.last.source.end) {
-      this.source = this.source || {};
-      this.source.end = this.source.end || {};
-      Object.assign(this.source.end, this.last.source.end);
-    }
-  };
-  _proto.each = function each(callback) {
-    if (!this.lastEach) {
-      this.lastEach = 0;
-    }
-    if (!this.indexes) {
-      this.indexes = {};
-    }
-    this.lastEach++;
-    var id = this.lastEach;
-    this.indexes[id] = 0;
-    if (!this.length) {
-      return undefined;
-    }
-    var index, result;
-    while (this.indexes[id] < this.length) {
-      index = this.indexes[id];
-      result = callback(this.at(index), index);
-      if (result === false) {
-        break;
-      }
-      this.indexes[id] += 1;
-    }
-    delete this.indexes[id];
-    if (result === false) {
-      return false;
-    }
-  };
-  _proto.walk = function walk(callback) {
-    return this.each(function (node, i) {
-      var result = callback(node, i);
-      if (result !== false && node.length) {
-        result = node.walk(callback);
-      }
-      if (result === false) {
-        return false;
-      }
-    });
-  };
-  _proto.walkAttributes = function walkAttributes(callback) {
-    var _this2 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.ATTRIBUTE) {
-        return callback.call(_this2, selector);
-      }
-    });
-  };
-  _proto.walkClasses = function walkClasses(callback) {
-    var _this3 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.CLASS) {
-        return callback.call(_this3, selector);
-      }
-    });
-  };
-  _proto.walkCombinators = function walkCombinators(callback) {
-    var _this4 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.COMBINATOR) {
-        return callback.call(_this4, selector);
-      }
-    });
-  };
-  _proto.walkComments = function walkComments(callback) {
-    var _this5 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.COMMENT) {
-        return callback.call(_this5, selector);
-      }
-    });
-  };
-  _proto.walkIds = function walkIds(callback) {
-    var _this6 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.ID) {
-        return callback.call(_this6, selector);
-      }
-    });
-  };
-  _proto.walkNesting = function walkNesting(callback) {
-    var _this7 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.NESTING) {
-        return callback.call(_this7, selector);
-      }
-    });
-  };
-  _proto.walkPseudos = function walkPseudos(callback) {
-    var _this8 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.PSEUDO) {
-        return callback.call(_this8, selector);
-      }
-    });
-  };
-  _proto.walkTags = function walkTags(callback) {
-    var _this9 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.TAG) {
-        return callback.call(_this9, selector);
-      }
-    });
-  };
-  _proto.walkUniversals = function walkUniversals(callback) {
-    var _this10 = this;
-    return this.walk(function (selector) {
-      if (selector.type === types.UNIVERSAL) {
-        return callback.call(_this10, selector);
-      }
-    });
-  };
-  _proto.split = function split(callback) {
-    var _this11 = this;
-    var current = [];
-    return this.reduce(function (memo, node, index) {
-      var split = callback.call(_this11, node);
-      current.push(node);
-      if (split) {
-        memo.push(current);
-        current = [];
-      } else if (index === _this11.length - 1) {
-        memo.push(current);
-      }
-      return memo;
-    }, []);
-  };
-  _proto.map = function map(callback) {
-    return this.nodes.map(callback);
-  };
-  _proto.reduce = function reduce(callback, memo) {
-    return this.nodes.reduce(callback, memo);
-  };
-  _proto.every = function every(callback) {
-    return this.nodes.every(callback);
-  };
-  _proto.some = function some(callback) {
-    return this.nodes.some(callback);
-  };
-  _proto.filter = function filter(callback) {
-    return this.nodes.filter(callback);
-  };
-  _proto.sort = function sort(callback) {
-    return this.nodes.sort(callback);
-  };
-  _proto.toString = function toString() {
-    return this.map(String).join('');
-  };
-  _createClass(Container, [{
-    key: "first",
-    get: function get() {
-      return this.at(0);
-    }
-  }, {
-    key: "last",
-    get: function get() {
-      return this.at(this.length - 1);
-    }
-  }, {
-    key: "length",
-    get: function get() {
-      return this.nodes.length;
-    }
-  }]);
-  return Container;
-}(_node["default"]);
-exports["default"] = Container;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js
deleted file mode 100644
index f06161e..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/guards.js
+++ /dev/null
@@ -1,58 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0;
-exports.isContainer = isContainer;
-exports.isIdentifier = void 0;
-exports.isNamespace = isNamespace;
-exports.isNesting = void 0;
-exports.isNode = isNode;
-exports.isPseudo = void 0;
-exports.isPseudoClass = isPseudoClass;
-exports.isPseudoElement = isPseudoElement;
-exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = void 0;
-var _types = require("./types");
-var _IS_TYPE;
-var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
-function isNode(node) {
-  return typeof node === "object" && IS_TYPE[node.type];
-}
-function isNodeType(type, node) {
-  return isNode(node) && node.type === type;
-}
-var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
-exports.isAttribute = isAttribute;
-var isClassName = isNodeType.bind(null, _types.CLASS);
-exports.isClassName = isClassName;
-var isCombinator = isNodeType.bind(null, _types.COMBINATOR);
-exports.isCombinator = isCombinator;
-var isComment = isNodeType.bind(null, _types.COMMENT);
-exports.isComment = isComment;
-var isIdentifier = isNodeType.bind(null, _types.ID);
-exports.isIdentifier = isIdentifier;
-var isNesting = isNodeType.bind(null, _types.NESTING);
-exports.isNesting = isNesting;
-var isPseudo = isNodeType.bind(null, _types.PSEUDO);
-exports.isPseudo = isPseudo;
-var isRoot = isNodeType.bind(null, _types.ROOT);
-exports.isRoot = isRoot;
-var isSelector = isNodeType.bind(null, _types.SELECTOR);
-exports.isSelector = isSelector;
-var isString = isNodeType.bind(null, _types.STRING);
-exports.isString = isString;
-var isTag = isNodeType.bind(null, _types.TAG);
-exports.isTag = isTag;
-var isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
-exports.isUniversal = isUniversal;
-function isPseudoElement(node) {
-  return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line");
-}
-function isPseudoClass(node) {
-  return isPseudo(node) && !isPseudoElement(node);
-}
-function isContainer(node) {
-  return !!(isNode(node) && node.walk);
-}
-function isNamespace(node) {
-  return isAttribute(node) || isTag(node);
-}
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/id.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/id.js
deleted file mode 100644
index 8baef72..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/id.js
+++ /dev/null
@@ -1,25 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var ID = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(ID, _Node);
-  function ID(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.ID;
-    return _this;
-  }
-  var _proto = ID.prototype;
-  _proto.valueToString = function valueToString() {
-    return '#' + _Node.prototype.valueToString.call(this);
-  };
-  return ID;
-}(_node["default"]);
-exports["default"] = ID;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/index.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/index.js
deleted file mode 100644
index f1f6b7f..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-var _types = require("./types");
-Object.keys(_types).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  if (key in exports && exports[key] === _types[key]) return;
-  exports[key] = _types[key];
-});
-var _constructors = require("./constructors");
-Object.keys(_constructors).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  if (key in exports && exports[key] === _constructors[key]) return;
-  exports[key] = _constructors[key];
-});
-var _guards = require("./guards");
-Object.keys(_guards).forEach(function (key) {
-  if (key === "default" || key === "__esModule") return;
-  if (key in exports && exports[key] === _guards[key]) return;
-  exports[key] = _guards[key];
-});
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js
deleted file mode 100644
index cc97647..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/namespace.js
+++ /dev/null
@@ -1,80 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _cssesc = _interopRequireDefault(require("cssesc"));
-var _util = require("../util");
-var _node = _interopRequireDefault(require("./node"));
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Namespace = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(Namespace, _Node);
-  function Namespace() {
-    return _Node.apply(this, arguments) || this;
-  }
-  var _proto = Namespace.prototype;
-  _proto.qualifiedName = function qualifiedName(value) {
-    if (this.namespace) {
-      return this.namespaceString + "|" + value;
-    } else {
-      return value;
-    }
-  };
-  _proto.valueToString = function valueToString() {
-    return this.qualifiedName(_Node.prototype.valueToString.call(this));
-  };
-  _createClass(Namespace, [{
-    key: "namespace",
-    get: function get() {
-      return this._namespace;
-    },
-    set: function set(namespace) {
-      if (namespace === true || namespace === "*" || namespace === "&") {
-        this._namespace = namespace;
-        if (this.raws) {
-          delete this.raws.namespace;
-        }
-        return;
-      }
-      var escaped = (0, _cssesc["default"])(namespace, {
-        isIdentifier: true
-      });
-      this._namespace = namespace;
-      if (escaped !== namespace) {
-        (0, _util.ensureObject)(this, "raws");
-        this.raws.namespace = escaped;
-      } else if (this.raws) {
-        delete this.raws.namespace;
-      }
-    }
-  }, {
-    key: "ns",
-    get: function get() {
-      return this._namespace;
-    },
-    set: function set(namespace) {
-      this.namespace = namespace;
-    }
-  }, {
-    key: "namespaceString",
-    get: function get() {
-      if (this.namespace) {
-        var ns = this.stringifyProperty("namespace");
-        if (ns === true) {
-          return '';
-        } else {
-          return ns;
-        }
-      } else {
-        return '';
-      }
-    }
-  }]);
-  return Namespace;
-}(_node["default"]);
-exports["default"] = Namespace;
-;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js
deleted file mode 100644
index 2189928..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/nesting.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Nesting = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(Nesting, _Node);
-  function Nesting(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.NESTING;
-    _this.value = '&';
-    return _this;
-  }
-  return Nesting;
-}(_node["default"]);
-exports["default"] = Nesting;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/node.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/node.js
deleted file mode 100644
index 9a82951..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/node.js
+++ /dev/null
@@ -1,192 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _util = require("../util");
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-var cloneNode = function cloneNode(obj, parent) {
-  if (typeof obj !== 'object' || obj === null) {
-    return obj;
-  }
-  var cloned = new obj.constructor();
-  for (var i in obj) {
-    if (!obj.hasOwnProperty(i)) {
-      continue;
-    }
-    var value = obj[i];
-    var type = typeof value;
-    if (i === 'parent' && type === 'object') {
-      if (parent) {
-        cloned[i] = parent;
-      }
-    } else if (value instanceof Array) {
-      cloned[i] = value.map(function (j) {
-        return cloneNode(j, cloned);
-      });
-    } else {
-      cloned[i] = cloneNode(value, cloned);
-    }
-  }
-  return cloned;
-};
-var Node = /*#__PURE__*/function () {
-  function Node(opts) {
-    if (opts === void 0) {
-      opts = {};
-    }
-    Object.assign(this, opts);
-    this.spaces = this.spaces || {};
-    this.spaces.before = this.spaces.before || '';
-    this.spaces.after = this.spaces.after || '';
-  }
-  var _proto = Node.prototype;
-  _proto.remove = function remove() {
-    if (this.parent) {
-      this.parent.removeChild(this);
-    }
-    this.parent = undefined;
-    return this;
-  };
-  _proto.replaceWith = function replaceWith() {
-    if (this.parent) {
-      for (var index in arguments) {
-        this.parent.insertBefore(this, arguments[index]);
-      }
-      this.remove();
-    }
-    return this;
-  };
-  _proto.next = function next() {
-    return this.parent.at(this.parent.index(this) + 1);
-  };
-  _proto.prev = function prev() {
-    return this.parent.at(this.parent.index(this) - 1);
-  };
-  _proto.clone = function clone(overrides) {
-    if (overrides === void 0) {
-      overrides = {};
-    }
-    var cloned = cloneNode(this);
-    for (var name in overrides) {
-      cloned[name] = overrides[name];
-    }
-    return cloned;
-  }
-
-  /**
-   * Some non-standard syntax doesn't follow normal escaping rules for css.
-   * This allows non standard syntax to be appended to an existing property
-   * by specifying the escaped value. By specifying the escaped value,
-   * illegal characters are allowed to be directly inserted into css output.
-   * @param {string} name the property to set
-   * @param {any} value the unescaped value of the property
-   * @param {string} valueEscaped optional. the escaped value of the property.
-   */;
-  _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
-    if (!this.raws) {
-      this.raws = {};
-    }
-    var originalValue = this[name];
-    var originalEscaped = this.raws[name];
-    this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first.
-    if (originalEscaped || valueEscaped !== value) {
-      this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
-    } else {
-      delete this.raws[name]; // delete any escaped value that was created by the setter.
-    }
-  }
-
-  /**
-   * Some non-standard syntax doesn't follow normal escaping rules for css.
-   * This allows the escaped value to be specified directly, allowing illegal
-   * characters to be directly inserted into css output.
-   * @param {string} name the property to set
-   * @param {any} value the unescaped value of the property
-   * @param {string} valueEscaped the escaped value of the property.
-   */;
-  _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
-    if (!this.raws) {
-      this.raws = {};
-    }
-    this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
-    this.raws[name] = valueEscaped;
-  }
-
-  /**
-   * When you want a value to passed through to CSS directly. This method
-   * deletes the corresponding raw value causing the stringifier to fallback
-   * to the unescaped value.
-   * @param {string} name the property to set.
-   * @param {any} value The value that is both escaped and unescaped.
-   */;
-  _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
-    this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
-    if (this.raws) {
-      delete this.raws[name];
-    }
-  }
-
-  /**
-   *
-   * @param {number} line The number (starting with 1)
-   * @param {number} column The column number (starting with 1)
-   */;
-  _proto.isAtPosition = function isAtPosition(line, column) {
-    if (this.source && this.source.start && this.source.end) {
-      if (this.source.start.line > line) {
-        return false;
-      }
-      if (this.source.end.line < line) {
-        return false;
-      }
-      if (this.source.start.line === line && this.source.start.column > column) {
-        return false;
-      }
-      if (this.source.end.line === line && this.source.end.column < column) {
-        return false;
-      }
-      return true;
-    }
-    return undefined;
-  };
-  _proto.stringifyProperty = function stringifyProperty(name) {
-    return this.raws && this.raws[name] || this[name];
-  };
-  _proto.valueToString = function valueToString() {
-    return String(this.stringifyProperty("value"));
-  };
-  _proto.toString = function toString() {
-    return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join('');
-  };
-  _createClass(Node, [{
-    key: "rawSpaceBefore",
-    get: function get() {
-      var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
-      if (rawSpace === undefined) {
-        rawSpace = this.spaces && this.spaces.before;
-      }
-      return rawSpace || "";
-    },
-    set: function set(raw) {
-      (0, _util.ensureObject)(this, "raws", "spaces");
-      this.raws.spaces.before = raw;
-    }
-  }, {
-    key: "rawSpaceAfter",
-    get: function get() {
-      var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
-      if (rawSpace === undefined) {
-        rawSpace = this.spaces.after;
-      }
-      return rawSpace || "";
-    },
-    set: function set(raw) {
-      (0, _util.ensureObject)(this, "raws", "spaces");
-      this.raws.spaces.after = raw;
-    }
-  }]);
-  return Node;
-}();
-exports["default"] = Node;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
deleted file mode 100644
index 4371e59..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/pseudo.js
+++ /dev/null
@@ -1,26 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _container = _interopRequireDefault(require("./container"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Pseudo = /*#__PURE__*/function (_Container) {
-  _inheritsLoose(Pseudo, _Container);
-  function Pseudo(opts) {
-    var _this;
-    _this = _Container.call(this, opts) || this;
-    _this.type = _types.PSEUDO;
-    return _this;
-  }
-  var _proto = Pseudo.prototype;
-  _proto.toString = function toString() {
-    var params = this.length ? '(' + this.map(String).join(',') + ')' : '';
-    return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join('');
-  };
-  return Pseudo;
-}(_container["default"]);
-exports["default"] = Pseudo;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/root.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/root.js
deleted file mode 100644
index 8c599d1..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/root.js
+++ /dev/null
@@ -1,44 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _container = _interopRequireDefault(require("./container"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
-function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Root = /*#__PURE__*/function (_Container) {
-  _inheritsLoose(Root, _Container);
-  function Root(opts) {
-    var _this;
-    _this = _Container.call(this, opts) || this;
-    _this.type = _types.ROOT;
-    return _this;
-  }
-  var _proto = Root.prototype;
-  _proto.toString = function toString() {
-    var str = this.reduce(function (memo, selector) {
-      memo.push(String(selector));
-      return memo;
-    }, []).join(',');
-    return this.trailingComma ? str + ',' : str;
-  };
-  _proto.error = function error(message, options) {
-    if (this._error) {
-      return this._error(message, options);
-    } else {
-      return new Error(message);
-    }
-  };
-  _createClass(Root, [{
-    key: "errorGenerator",
-    set: function set(handler) {
-      this._error = handler;
-    }
-  }]);
-  return Root;
-}(_container["default"]);
-exports["default"] = Root;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js
deleted file mode 100644
index 8cc4bc1..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/selector.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _container = _interopRequireDefault(require("./container"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Selector = /*#__PURE__*/function (_Container) {
-  _inheritsLoose(Selector, _Container);
-  function Selector(opts) {
-    var _this;
-    _this = _Container.call(this, opts) || this;
-    _this.type = _types.SELECTOR;
-    return _this;
-  }
-  return Selector;
-}(_container["default"]);
-exports["default"] = Selector;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/string.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/string.js
deleted file mode 100644
index 4749791..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/string.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _node = _interopRequireDefault(require("./node"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var String = /*#__PURE__*/function (_Node) {
-  _inheritsLoose(String, _Node);
-  function String(opts) {
-    var _this;
-    _this = _Node.call(this, opts) || this;
-    _this.type = _types.STRING;
-    return _this;
-  }
-  return String;
-}(_node["default"]);
-exports["default"] = String;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js
deleted file mode 100644
index 224e74d..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/tag.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _namespace = _interopRequireDefault(require("./namespace"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Tag = /*#__PURE__*/function (_Namespace) {
-  _inheritsLoose(Tag, _Namespace);
-  function Tag(opts) {
-    var _this;
-    _this = _Namespace.call(this, opts) || this;
-    _this.type = _types.TAG;
-    return _this;
-  }
-  return Tag;
-}(_namespace["default"]);
-exports["default"] = Tag;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/types.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/types.js
deleted file mode 100644
index 824cc0c..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/types.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.UNIVERSAL = exports.TAG = exports.STRING = exports.SELECTOR = exports.ROOT = exports.PSEUDO = exports.NESTING = exports.ID = exports.COMMENT = exports.COMBINATOR = exports.CLASS = exports.ATTRIBUTE = void 0;
-var TAG = 'tag';
-exports.TAG = TAG;
-var STRING = 'string';
-exports.STRING = STRING;
-var SELECTOR = 'selector';
-exports.SELECTOR = SELECTOR;
-var ROOT = 'root';
-exports.ROOT = ROOT;
-var PSEUDO = 'pseudo';
-exports.PSEUDO = PSEUDO;
-var NESTING = 'nesting';
-exports.NESTING = NESTING;
-var ID = 'id';
-exports.ID = ID;
-var COMMENT = 'comment';
-exports.COMMENT = COMMENT;
-var COMBINATOR = 'combinator';
-exports.COMBINATOR = COMBINATOR;
-var CLASS = 'class';
-exports.CLASS = CLASS;
-var ATTRIBUTE = 'attribute';
-exports.ATTRIBUTE = ATTRIBUTE;
-var UNIVERSAL = 'universal';
-exports.UNIVERSAL = UNIVERSAL;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js
deleted file mode 100644
index 5b58743..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/selectors/universal.js
+++ /dev/null
@@ -1,22 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = void 0;
-var _namespace = _interopRequireDefault(require("./namespace"));
-var _types = require("./types");
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
-function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
-var Universal = /*#__PURE__*/function (_Namespace) {
-  _inheritsLoose(Universal, _Namespace);
-  function Universal(opts) {
-    var _this;
-    _this = _Namespace.call(this, opts) || this;
-    _this.type = _types.UNIVERSAL;
-    _this.value = '*';
-    return _this;
-  }
-  return Universal;
-}(_namespace["default"]);
-exports["default"] = Universal;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/sortAscending.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/sortAscending.js
deleted file mode 100644
index 5666d5d..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/sortAscending.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = sortAscending;
-function sortAscending(list) {
-  return list.sort(function (a, b) {
-    return a - b;
-  });
-}
-;
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js
deleted file mode 100644
index 59d8e6c..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenTypes.js
+++ /dev/null
@@ -1,70 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.word = exports.tilde = exports.tab = exports.str = exports.space = exports.slash = exports.singleQuote = exports.semicolon = exports.plus = exports.pipe = exports.openSquare = exports.openParenthesis = exports.newline = exports.greaterThan = exports.feed = exports.equals = exports.doubleQuote = exports.dollar = exports.cr = exports.comment = exports.comma = exports.combinator = exports.colon = exports.closeSquare = exports.closeParenthesis = exports.caret = exports.bang = exports.backslash = exports.at = exports.asterisk = exports.ampersand = void 0;
-var ampersand = 38; // `&`.charCodeAt(0);
-exports.ampersand = ampersand;
-var asterisk = 42; // `*`.charCodeAt(0);
-exports.asterisk = asterisk;
-var at = 64; // `@`.charCodeAt(0);
-exports.at = at;
-var comma = 44; // `,`.charCodeAt(0);
-exports.comma = comma;
-var colon = 58; // `:`.charCodeAt(0);
-exports.colon = colon;
-var semicolon = 59; // `;`.charCodeAt(0);
-exports.semicolon = semicolon;
-var openParenthesis = 40; // `(`.charCodeAt(0);
-exports.openParenthesis = openParenthesis;
-var closeParenthesis = 41; // `)`.charCodeAt(0);
-exports.closeParenthesis = closeParenthesis;
-var openSquare = 91; // `[`.charCodeAt(0);
-exports.openSquare = openSquare;
-var closeSquare = 93; // `]`.charCodeAt(0);
-exports.closeSquare = closeSquare;
-var dollar = 36; // `$`.charCodeAt(0);
-exports.dollar = dollar;
-var tilde = 126; // `~`.charCodeAt(0);
-exports.tilde = tilde;
-var caret = 94; // `^`.charCodeAt(0);
-exports.caret = caret;
-var plus = 43; // `+`.charCodeAt(0);
-exports.plus = plus;
-var equals = 61; // `=`.charCodeAt(0);
-exports.equals = equals;
-var pipe = 124; // `|`.charCodeAt(0);
-exports.pipe = pipe;
-var greaterThan = 62; // `>`.charCodeAt(0);
-exports.greaterThan = greaterThan;
-var space = 32; // ` `.charCodeAt(0);
-exports.space = space;
-var singleQuote = 39; // `'`.charCodeAt(0);
-exports.singleQuote = singleQuote;
-var doubleQuote = 34; // `"`.charCodeAt(0);
-exports.doubleQuote = doubleQuote;
-var slash = 47; // `/`.charCodeAt(0);
-exports.slash = slash;
-var bang = 33; // `!`.charCodeAt(0);
-exports.bang = bang;
-var backslash = 92; // '\\'.charCodeAt(0);
-exports.backslash = backslash;
-var cr = 13; // '\r'.charCodeAt(0);
-exports.cr = cr;
-var feed = 12; // '\f'.charCodeAt(0);
-exports.feed = feed;
-var newline = 10; // '\n'.charCodeAt(0);
-exports.newline = newline;
-var tab = 9; // '\t'.charCodeAt(0);
-
-// Expose aliases primarily for readability.
-exports.tab = tab;
-var str = singleQuote;
-
-// No good single character representation!
-exports.str = str;
-var comment = -1;
-exports.comment = comment;
-var word = -2;
-exports.word = word;
-var combinator = -3;
-exports.combinator = combinator;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenize.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenize.js
deleted file mode 100644
index bf61d26..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/tokenize.js
+++ /dev/null
@@ -1,239 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.FIELDS = void 0;
-exports["default"] = tokenize;
-var t = _interopRequireWildcard(require("./tokenTypes"));
-var _unescapable, _wordDelimiters;
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable);
-var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters);
-var hex = {};
-var hexChars = "0123456789abcdefABCDEF";
-for (var i = 0; i < hexChars.length; i++) {
-  hex[hexChars.charCodeAt(i)] = true;
-}
-
-/**
- *  Returns the last index of the bar css word
- * @param {string} css The string in which the word begins
- * @param {number} start The index into the string where word's first letter occurs
- */
-function consumeWord(css, start) {
-  var next = start;
-  var code;
-  do {
-    code = css.charCodeAt(next);
-    if (wordDelimiters[code]) {
-      return next - 1;
-    } else if (code === t.backslash) {
-      next = consumeEscape(css, next) + 1;
-    } else {
-      // All other characters are part of the word
-      next++;
-    }
-  } while (next < css.length);
-  return next - 1;
-}
-
-/**
- *  Returns the last index of the escape sequence
- * @param {string} css The string in which the sequence begins
- * @param {number} start The index into the string where escape character (`\`) occurs.
- */
-function consumeEscape(css, start) {
-  var next = start;
-  var code = css.charCodeAt(next + 1);
-  if (unescapable[code]) {
-    // just consume the escape char
-  } else if (hex[code]) {
-    var hexDigits = 0;
-    // consume up to 6 hex chars
-    do {
-      next++;
-      hexDigits++;
-      code = css.charCodeAt(next + 1);
-    } while (hex[code] && hexDigits < 6);
-    // if fewer than 6 hex chars, a trailing space ends the escape
-    if (hexDigits < 6 && code === t.space) {
-      next++;
-    }
-  } else {
-    // the next char is part of the current word
-    next++;
-  }
-  return next;
-}
-var FIELDS = {
-  TYPE: 0,
-  START_LINE: 1,
-  START_COL: 2,
-  END_LINE: 3,
-  END_COL: 4,
-  START_POS: 5,
-  END_POS: 6
-};
-exports.FIELDS = FIELDS;
-function tokenize(input) {
-  var tokens = [];
-  var css = input.css.valueOf();
-  var _css = css,
-    length = _css.length;
-  var offset = -1;
-  var line = 1;
-  var start = 0;
-  var end = 0;
-  var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType;
-  function unclosed(what, fix) {
-    if (input.safe) {
-      // fyi: this is never set to true.
-      css += fix;
-      next = css.length - 1;
-    } else {
-      throw input.error('Unclosed ' + what, line, start - offset, start);
-    }
-  }
-  while (start < length) {
-    code = css.charCodeAt(start);
-    if (code === t.newline) {
-      offset = start;
-      line += 1;
-    }
-    switch (code) {
-      case t.space:
-      case t.tab:
-      case t.newline:
-      case t.cr:
-      case t.feed:
-        next = start;
-        do {
-          next += 1;
-          code = css.charCodeAt(next);
-          if (code === t.newline) {
-            offset = next;
-            line += 1;
-          }
-        } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed);
-        tokenType = t.space;
-        endLine = line;
-        endColumn = next - offset - 1;
-        end = next;
-        break;
-      case t.plus:
-      case t.greaterThan:
-      case t.tilde:
-      case t.pipe:
-        next = start;
-        do {
-          next += 1;
-          code = css.charCodeAt(next);
-        } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe);
-        tokenType = t.combinator;
-        endLine = line;
-        endColumn = start - offset;
-        end = next;
-        break;
-
-      // Consume these characters as single tokens.
-      case t.asterisk:
-      case t.ampersand:
-      case t.bang:
-      case t.comma:
-      case t.equals:
-      case t.dollar:
-      case t.caret:
-      case t.openSquare:
-      case t.closeSquare:
-      case t.colon:
-      case t.semicolon:
-      case t.openParenthesis:
-      case t.closeParenthesis:
-        next = start;
-        tokenType = code;
-        endLine = line;
-        endColumn = start - offset;
-        end = next + 1;
-        break;
-      case t.singleQuote:
-      case t.doubleQuote:
-        quote = code === t.singleQuote ? "'" : '"';
-        next = start;
-        do {
-          escaped = false;
-          next = css.indexOf(quote, next + 1);
-          if (next === -1) {
-            unclosed('quote', quote);
-          }
-          escapePos = next;
-          while (css.charCodeAt(escapePos - 1) === t.backslash) {
-            escapePos -= 1;
-            escaped = !escaped;
-          }
-        } while (escaped);
-        tokenType = t.str;
-        endLine = line;
-        endColumn = start - offset;
-        end = next + 1;
-        break;
-      default:
-        if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) {
-          next = css.indexOf('*/', start + 2) + 1;
-          if (next === 0) {
-            unclosed('comment', '*/');
-          }
-          content = css.slice(start, next + 1);
-          lines = content.split('\n');
-          last = lines.length - 1;
-          if (last > 0) {
-            nextLine = line + last;
-            nextOffset = next - lines[last].length;
-          } else {
-            nextLine = line;
-            nextOffset = offset;
-          }
-          tokenType = t.comment;
-          line = nextLine;
-          endLine = nextLine;
-          endColumn = next - nextOffset;
-        } else if (code === t.slash) {
-          next = start;
-          tokenType = code;
-          endLine = line;
-          endColumn = start - offset;
-          end = next + 1;
-        } else {
-          next = consumeWord(css, start);
-          tokenType = t.word;
-          endLine = line;
-          endColumn = next - offset;
-        }
-        end = next + 1;
-        break;
-    }
-
-    // Ensure that the token structure remains consistent
-    tokens.push([tokenType,
-    // [0] Token type
-    line,
-    // [1] Starting line
-    start - offset,
-    // [2] Starting column
-    endLine,
-    // [3] Ending line
-    endColumn,
-    // [4] Ending column
-    start,
-    // [5] Start position / Source index
-    end // [6] End position
-    ]);
-
-    // Reset offset for the next token
-    if (nextOffset) {
-      offset = nextOffset;
-      nextOffset = null;
-    }
-    start = end;
-  }
-  return tokens;
-}
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js
deleted file mode 100644
index 494941a..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/ensureObject.js
+++ /dev/null
@@ -1,17 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = ensureObject;
-function ensureObject(obj) {
-  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-    props[_key - 1] = arguments[_key];
-  }
-  while (props.length > 0) {
-    var prop = props.shift();
-    if (!obj[prop]) {
-      obj[prop] = {};
-    }
-    obj = obj[prop];
-  }
-}
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/getProp.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/util/getProp.js
deleted file mode 100644
index a2b7a07..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/getProp.js
+++ /dev/null
@@ -1,18 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = getProp;
-function getProp(obj) {
-  for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-    props[_key - 1] = arguments[_key];
-  }
-  while (props.length > 0) {
-    var prop = props.shift();
-    if (!obj[prop]) {
-      return undefined;
-    }
-    obj = obj[prop];
-  }
-  return obj;
-}
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/index.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/util/index.js
deleted file mode 100644
index f96ec11..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.unesc = exports.stripComments = exports.getProp = exports.ensureObject = void 0;
-var _unesc = _interopRequireDefault(require("./unesc"));
-exports.unesc = _unesc["default"];
-var _getProp = _interopRequireDefault(require("./getProp"));
-exports.getProp = _getProp["default"];
-var _ensureObject = _interopRequireDefault(require("./ensureObject"));
-exports.ensureObject = _ensureObject["default"];
-var _stripComments = _interopRequireDefault(require("./stripComments"));
-exports.stripComments = _stripComments["default"];
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js
deleted file mode 100644
index 0baa0e0..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/stripComments.js
+++ /dev/null
@@ -1,21 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = stripComments;
-function stripComments(str) {
-  var s = "";
-  var commentStart = str.indexOf("/*");
-  var lastEnd = 0;
-  while (commentStart >= 0) {
-    s = s + str.slice(lastEnd, commentStart);
-    var commentEnd = str.indexOf("*/", commentStart + 2);
-    if (commentEnd < 0) {
-      return s;
-    }
-    lastEnd = commentEnd + 2;
-    commentStart = str.indexOf("/*", lastEnd);
-  }
-  s = s + str.slice(lastEnd);
-  return s;
-}
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/unesc.js b/node_modules/npm/node_modules/postcss-selector-parser/dist/util/unesc.js
deleted file mode 100644
index 87396be..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/dist/util/unesc.js
+++ /dev/null
@@ -1,76 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports["default"] = unesc;
-// Many thanks for this post which made this migration much easier.
-// https://mathiasbynens.be/notes/css-escapes
-
-/**
- * 
- * @param {string} str 
- * @returns {[string, number]|undefined}
- */
-function gobbleHex(str) {
-  var lower = str.toLowerCase();
-  var hex = '';
-  var spaceTerminated = false;
-  for (var i = 0; i < 6 && lower[i] !== undefined; i++) {
-    var code = lower.charCodeAt(i);
-    // check to see if we are dealing with a valid hex char [a-f|0-9]
-    var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57;
-    // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point
-    spaceTerminated = code === 32;
-    if (!valid) {
-      break;
-    }
-    hex += lower[i];
-  }
-  if (hex.length === 0) {
-    return undefined;
-  }
-  var codePoint = parseInt(hex, 16);
-  var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF;
-  // Add special case for
-  // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point"
-  // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point
-  if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) {
-    return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)];
-  }
-  return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)];
-}
-var CONTAINS_ESCAPE = /\\/;
-function unesc(str) {
-  var needToProcess = CONTAINS_ESCAPE.test(str);
-  if (!needToProcess) {
-    return str;
-  }
-  var ret = "";
-  for (var i = 0; i < str.length; i++) {
-    if (str[i] === "\\") {
-      var gobbled = gobbleHex(str.slice(i + 1, i + 7));
-      if (gobbled !== undefined) {
-        ret += gobbled[0];
-        i += gobbled[1];
-        continue;
-      }
-
-      // Retain a pair of \\ if double escaped `\\\\`
-      // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e
-      if (str[i + 1] === "\\") {
-        ret += "\\";
-        i++;
-        continue;
-      }
-
-      // if \\ is at the end of the string retain it
-      // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb
-      if (str.length === i + 1) {
-        ret += str[i];
-      }
-      continue;
-    }
-    ret += str[i];
-  }
-  return ret;
-}
-module.exports = exports.default;
\ No newline at end of file
diff --git a/node_modules/npm/node_modules/postcss-selector-parser/package.json b/node_modules/npm/node_modules/postcss-selector-parser/package.json
deleted file mode 100644
index dce071c..0000000
--- a/node_modules/npm/node_modules/postcss-selector-parser/package.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
-  "name": "postcss-selector-parser",
-  "version": "6.0.13",
-  "devDependencies": {
-    "@babel/cli": "^7.11.6",
-    "@babel/core": "^7.11.6",
-    "@babel/eslint-parser": "^7.11.5",
-    "@babel/eslint-plugin": "^7.11.5",
-    "@babel/plugin-proposal-class-properties": "^7.10.4",
-    "@babel/preset-env": "^7.11.5",
-    "@babel/register": "^7.11.5",
-    "ava": "^5.1.0",
-    "babel-plugin-add-module-exports": "^1.0.4",
-    "coveralls": "^3.1.0",
-    "del-cli": "^5.0.0",
-    "eslint": "^8.28.0",
-    "eslint-plugin-import": "^2.26.0",
-    "glob": "^8.0.3",
-    "minimist": "^1.2.5",
-    "nyc": "^15.1.0",
-    "postcss": "^8.0.0",
-    "semver": "^7.3.2",
-    "typescript": "^4.0.3"
-  },
-  "main": "dist/index.js",
-  "types": "postcss-selector-parser.d.ts",
-  "files": [
-    "API.md",
-    "CHANGELOG.md",
-    "LICENSE-MIT",
-    "dist",
-    "postcss-selector-parser.d.ts",
-    "!**/__tests__"
-  ],
-  "scripts": {
-    "pretest": "eslint src && tsc --noEmit postcss-selector-parser.d.ts",
-    "prepare": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/",
-    "lintfix": "eslint --fix src",
-    "report": "nyc report --reporter=html",
-    "test": "nyc ava src/__tests__/*.mjs",
-    "testone": "ava"
-  },
-  "dependencies": {
-    "cssesc": "^3.0.0",
-    "util-deprecate": "^1.0.2"
-  },
-  "license": "MIT",
-  "engines": {
-    "node": ">=4"
-  },
-  "homepage": "https://github.com/postcss/postcss-selector-parser",
-  "contributors": [
-    {
-      "name": "Ben Briggs",
-      "email": "beneb.info@gmail.com",
-      "url": "http://beneb.info"
-    },
-    {
-      "name": "Chris Eppstein",
-      "email": "chris@eppsteins.net",
-      "url": "http://twitter.com/chriseppstein"
-    }
-  ],
-  "repository": "postcss/postcss-selector-parser",
-  "ava": {
-    "require": [
-      "@babel/register"
-    ],
-    "concurrency": 5,
-    "timeout": "25s",
-    "nodeArguments": []
-  },
-  "nyc": {
-    "exclude": [
-      "node_modules",
-      "**/__tests__"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/proc-log/LICENSE b/node_modules/npm/node_modules/proc-log/LICENSE
deleted file mode 100644
index 8383779..0000000
--- a/node_modules/npm/node_modules/proc-log/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) GitHub, Inc.
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/proc-log/lib/index.js b/node_modules/npm/node_modules/proc-log/lib/index.js
deleted file mode 100644
index 7c5dfad..0000000
--- a/node_modules/npm/node_modules/proc-log/lib/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// emits 'log' events on the process
-const LEVELS = [
-  'notice',
-  'error',
-  'warn',
-  'info',
-  'verbose',
-  'http',
-  'silly',
-  'pause',
-  'resume',
-]
-
-const log = level => (...args) => process.emit('log', level, ...args)
-
-const logger = {}
-for (const level of LEVELS) {
-  logger[level] = log(level)
-}
-
-logger.LEVELS = LEVELS
-
-module.exports = logger
diff --git a/node_modules/npm/node_modules/proc-log/package.json b/node_modules/npm/node_modules/proc-log/package.json
deleted file mode 100644
index d335fa9..0000000
--- a/node_modules/npm/node_modules/proc-log/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
-  "name": "proc-log",
-  "version": "3.0.0",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "main": "lib/index.js",
-  "description": "just emit 'log' events on the process object",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/proc-log.git"
-  },
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "posttest": "npm run lint",
-    "postsnap": "eslint index.js test/*.js --fix",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "lintfix": "npm run lint -- --fix",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^3.0.1",
-    "@npmcli/template-oss": "4.5.1",
-    "tap": "^16.0.1"
-  },
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.5.1"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/process/LICENSE b/node_modules/npm/node_modules/process/LICENSE
deleted file mode 100644
index b8c1246..0000000
--- a/node_modules/npm/node_modules/process/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2013 Roman Shtylman 
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/process/browser.js b/node_modules/npm/node_modules/process/browser.js
deleted file mode 100644
index d059362..0000000
--- a/node_modules/npm/node_modules/process/browser.js
+++ /dev/null
@@ -1,184 +0,0 @@
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things.  But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals.  It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
-    throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
-    throw new Error('clearTimeout has not been defined');
-}
-(function () {
-    try {
-        if (typeof setTimeout === 'function') {
-            cachedSetTimeout = setTimeout;
-        } else {
-            cachedSetTimeout = defaultSetTimout;
-        }
-    } catch (e) {
-        cachedSetTimeout = defaultSetTimout;
-    }
-    try {
-        if (typeof clearTimeout === 'function') {
-            cachedClearTimeout = clearTimeout;
-        } else {
-            cachedClearTimeout = defaultClearTimeout;
-        }
-    } catch (e) {
-        cachedClearTimeout = defaultClearTimeout;
-    }
-} ())
-function runTimeout(fun) {
-    if (cachedSetTimeout === setTimeout) {
-        //normal enviroments in sane situations
-        return setTimeout(fun, 0);
-    }
-    // if setTimeout wasn't available but was latter defined
-    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
-        cachedSetTimeout = setTimeout;
-        return setTimeout(fun, 0);
-    }
-    try {
-        // when when somebody has screwed with setTimeout but no I.E. maddness
-        return cachedSetTimeout(fun, 0);
-    } catch(e){
-        try {
-            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
-            return cachedSetTimeout.call(null, fun, 0);
-        } catch(e){
-            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
-            return cachedSetTimeout.call(this, fun, 0);
-        }
-    }
-
-
-}
-function runClearTimeout(marker) {
-    if (cachedClearTimeout === clearTimeout) {
-        //normal enviroments in sane situations
-        return clearTimeout(marker);
-    }
-    // if clearTimeout wasn't available but was latter defined
-    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
-        cachedClearTimeout = clearTimeout;
-        return clearTimeout(marker);
-    }
-    try {
-        // when when somebody has screwed with setTimeout but no I.E. maddness
-        return cachedClearTimeout(marker);
-    } catch (e){
-        try {
-            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
-            return cachedClearTimeout.call(null, marker);
-        } catch (e){
-            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
-            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
-            return cachedClearTimeout.call(this, marker);
-        }
-    }
-
-
-
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
-    if (!draining || !currentQueue) {
-        return;
-    }
-    draining = false;
-    if (currentQueue.length) {
-        queue = currentQueue.concat(queue);
-    } else {
-        queueIndex = -1;
-    }
-    if (queue.length) {
-        drainQueue();
-    }
-}
-
-function drainQueue() {
-    if (draining) {
-        return;
-    }
-    var timeout = runTimeout(cleanUpNextTick);
-    draining = true;
-
-    var len = queue.length;
-    while(len) {
-        currentQueue = queue;
-        queue = [];
-        while (++queueIndex < len) {
-            if (currentQueue) {
-                currentQueue[queueIndex].run();
-            }
-        }
-        queueIndex = -1;
-        len = queue.length;
-    }
-    currentQueue = null;
-    draining = false;
-    runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
-    var args = new Array(arguments.length - 1);
-    if (arguments.length > 1) {
-        for (var i = 1; i < arguments.length; i++) {
-            args[i - 1] = arguments[i];
-        }
-    }
-    queue.push(new Item(fun, args));
-    if (queue.length === 1 && !draining) {
-        runTimeout(drainQueue);
-    }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
-    this.fun = fun;
-    this.array = array;
-}
-Item.prototype.run = function () {
-    this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) { return [] }
-
-process.binding = function (name) {
-    throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
-    throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
diff --git a/node_modules/npm/node_modules/process/index.js b/node_modules/npm/node_modules/process/index.js
deleted file mode 100644
index 8d8ed7d..0000000
--- a/node_modules/npm/node_modules/process/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// for now just expose the builtin process global from node.js
-module.exports = global.process;
diff --git a/node_modules/npm/node_modules/process/package.json b/node_modules/npm/node_modules/process/package.json
deleted file mode 100644
index d2cfaad..0000000
--- a/node_modules/npm/node_modules/process/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
-  "author": "Roman Shtylman ",
-  "name": "process",
-  "description": "process information for node.js and browsers",
-  "keywords": [
-    "process"
-  ],
-  "scripts": {
-    "test": "mocha test.js",
-    "browser": "zuul --no-coverage --ui mocha-bdd --local 8080 -- test.js"
-  },
-  "version": "0.11.10",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/shtylman/node-process.git"
-  },
-  "license": "MIT",
-  "browser": "./browser.js",
-  "main": "./index.js",
-  "engines": {
-    "node": ">= 0.6.0"
-  },
-  "devDependencies": {
-    "mocha": "2.2.1",
-    "zuul": "^3.10.3"
-  }
-}
diff --git a/node_modules/npm/node_modules/process/test.js b/node_modules/npm/node_modules/process/test.js
deleted file mode 100644
index 8ba579c..0000000
--- a/node_modules/npm/node_modules/process/test.js
+++ /dev/null
@@ -1,199 +0,0 @@
-var assert = require('assert');
-var ourProcess = require('./browser');
-describe('test against our process', function () {
-    test(ourProcess);
-});
-if (!process.browser) {
-  describe('test against node', function () {
-    test(process);
-  });
-  vmtest();
-}
-function test (ourProcess) {
-    describe('test arguments', function () {
-        it ('works', function (done) {
-          var order = 0;
-
-
-          ourProcess.nextTick(function (num) {
-              assert.equal(num, order++, 'first one works');
-              ourProcess.nextTick(function (num) {
-                assert.equal(num, order++, 'recursive one is 4th');
-              }, 3);
-          }, 0);
-          ourProcess.nextTick(function (num) {
-              assert.equal(num, order++, 'second one starts');
-              ourProcess.nextTick(function (num) {
-                assert.equal(num, order++, 'this is third');
-                ourProcess.nextTick(function (num) {
-                    assert.equal(num, order++, 'this is last');
-                    done();
-                }, 5);
-            }, 4);
-          }, 1);
-          ourProcess.nextTick(function (num) {
-
-              assert.equal(num, order++, '3rd schedualed happens after the error');
-          }, 2);
-        });
-    });
-if (!process.browser) {
-    describe('test errors', function (t) {
-        it ('works', function (done) {
-        var order = 0;
-        process.removeAllListeners('uncaughtException');
-        process.once('uncaughtException', function(err) {
-            assert.equal(2, order++, 'error is third');
-            ourProcess.nextTick(function () {
-                assert.equal(5, order++, 'schedualed in error is last');
-                done();
-            });
-        });
-        ourProcess.nextTick(function () {
-            assert.equal(0, order++, 'first one works');
-            ourProcess.nextTick(function () {
-            assert.equal(4, order++, 'recursive one is 4th');
-            });
-        });
-        ourProcess.nextTick(function () {
-            assert.equal(1, order++, 'second one starts');
-            throw(new Error('an error is thrown'));
-        });
-        ourProcess.nextTick(function () {
-            assert.equal(3, order++, '3rd schedualed happens after the error');
-        });
-        });
-    });
-}
-    describe('rename globals', function (t) {
-      var oldTimeout = setTimeout;
-      var oldClear = clearTimeout;
-
-      it('clearTimeout', function (done){
-
-        var ok = true;
-        clearTimeout = function () {
-          ok = false;
-        }
-        var ran = false;
-        function cleanup() {
-          clearTimeout = oldClear;
-          var err;
-          try {
-            assert.ok(ok, 'fake clearTimeout ran');
-            assert.ok(ran, 'should have run');
-          } catch (e) {
-            err = e;
-          }
-          done(err);
-        }
-        setTimeout(cleanup, 1000);
-        ourProcess.nextTick(function () {
-          ran = true;
-        });
-      });
-      it('just setTimeout', function (done){
-
-
-        setTimeout = function () {
-          setTimeout = oldTimeout;
-          try {
-            assert.ok(false, 'fake setTimeout called')
-          } catch (e) {
-            done(e);
-          }
-
-        }
-
-        ourProcess.nextTick(function () {
-          setTimeout = oldTimeout;
-          done();
-        });
-      });
-    });
-}
-function vmtest() {
-  var vm = require('vm');
-  var fs = require('fs');
-  var process =  fs.readFileSync('./browser.js', {encoding: 'utf8'});
-
-
-  describe('should work in vm in strict mode with no globals', function () {
-    it('should parse', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'this.works = process.browser;';
-      var script = new vm.Script(str);
-      var context = {
-        works: false
-      };
-      script.runInNewContext(context);
-      assert.ok(context.works);
-      done();
-    });
-    it('setTimeout throws error', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'try {process.nextTick(function () {})} catch (e){this.works = e;}';
-      var script = new vm.Script(str);
-      var context = {
-        works: false
-      };
-      script.runInNewContext(context);
-      assert.ok(context.works);
-      done();
-    });
-    it('should generally work', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'process.nextTick(function () {assert.ok(true);done();})';
-      var script = new vm.Script(str);
-      var context = {
-        clearTimeout: clearTimeout,
-        setTimeout: setTimeout,
-        done: done,
-        assert: assert
-      };
-      script.runInNewContext(context);
-    });
-    it('late defs setTimeout', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {assert.ok(true);done();})';
-      var script = new vm.Script(str);
-      var context = {
-        clearTimeout: clearTimeout,
-        hiddenSetTimeout: setTimeout,
-        done: done,
-        assert: assert
-      };
-      script.runInNewContext(context);
-    });
-    it('late defs clearTimeout', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'var clearTimeout = hiddenClearTimeout;process.nextTick(function () {assert.ok(true);done();})';
-      var script = new vm.Script(str);
-      var context = {
-        hiddenClearTimeout: clearTimeout,
-        setTimeout: setTimeout,
-        done: done,
-        assert: assert
-      };
-      script.runInNewContext(context);
-    });
-    it('late defs setTimeout and then redefine', function (done) {
-      var str = '"use strict";var module = {exports:{}};';
-      str += process;
-      str += 'var setTimeout = hiddenSetTimeout;process.nextTick(function () {setTimeout = function (){throw new Error("foo")};hiddenSetTimeout(function(){process.nextTick(function (){assert.ok(true);done();});});});';
-      var script = new vm.Script(str);
-      var context = {
-        clearTimeout: clearTimeout,
-        hiddenSetTimeout: setTimeout,
-        done: done,
-        assert: assert
-      };
-      script.runInNewContext(context);
-    });
-  });
-}
diff --git a/node_modules/npm/node_modules/promise-all-reject-late/LICENSE b/node_modules/npm/node_modules/promise-all-reject-late/LICENSE
deleted file mode 100644
index 05eeeb8..0000000
--- a/node_modules/npm/node_modules/promise-all-reject-late/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/promise-all-reject-late/index.js b/node_modules/npm/node_modules/promise-all-reject-late/index.js
deleted file mode 100644
index 1425edc..0000000
--- a/node_modules/npm/node_modules/promise-all-reject-late/index.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const allSettled =
-  Promise.allSettled ? promises => Promise.allSettled(promises)
-  : promises => {
-    const reflections = []
-    for (let i = 0; i < promises.length; i++) {
-      reflections[i] = Promise.resolve(promises[i]).then(value => ({
-        status: 'fulfilled',
-        value,
-      }), reason => ({
-        status: 'rejected',
-        reason,
-      }))
-    }
-    return Promise.all(reflections)
-  }
-
-module.exports = promises => allSettled(promises).then(results => {
-  let er = null
-  const ret = new Array(results.length)
-  results.forEach((result, i) => {
-    if (result.status === 'rejected')
-      throw result.reason
-    else
-      ret[i] = result.value
-  })
-  return ret
-})
diff --git a/node_modules/npm/node_modules/promise-all-reject-late/package.json b/node_modules/npm/node_modules/promise-all-reject-late/package.json
deleted file mode 100644
index 5e82f6a..0000000
--- a/node_modules/npm/node_modules/promise-all-reject-late/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-  "name": "promise-all-reject-late",
-  "version": "1.0.1",
-  "description": "Like Promise.all, but save rejections until all promises are resolved",
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^14.10.5"
-  },
-  "funding": {
-    "url": "https://github.com/sponsors/isaacs"
-  }
-}
diff --git a/node_modules/npm/node_modules/promise-all-reject-late/test/index.js b/node_modules/npm/node_modules/promise-all-reject-late/test/index.js
deleted file mode 100644
index 2d70254..0000000
--- a/node_modules/npm/node_modules/promise-all-reject-late/test/index.js
+++ /dev/null
@@ -1,88 +0,0 @@
-const t = require('tap')
-
-const main = () => {
-  if (process.argv[2] === 'polyfill-all-settled') {
-    Promise.allSettled = null
-    runTests()
-  } else if (process.argv[2] === 'native-all-settled') {
-    Promise.allSettled = Promise.allSettled || (
-      promises => {
-        const reflections = []
-        for (let i = 0; i < promises.length; i++) {
-          reflections[i] = Promise.resolve(promises[i]).then(value => ({
-            status: 'fulfilled',
-            value,
-          }), reason => ({
-            status: 'rejected',
-            reason,
-          }))
-        }
-        return Promise.all(reflections)
-      }
-    )
-    runTests()
-  } else {
-    t.spawn(process.execPath, [__filename, 'polyfill-all-settled'])
-    t.spawn(process.execPath, [__filename, 'native-all-settled'])
-  }
-}
-
-const runTests = () => {
-  const lateFail = require('../')
-
-  t.test('fail only after all promises resolve', t => {
-    let resolvedSlow = false
-    const fast = () => Promise.reject('nope')
-    const slow = () => new Promise(res => setTimeout(res, 100))
-      .then(() => resolvedSlow = true)
-
-    // throw some holes and junk in the array to verify that we handle it
-    return t.rejects(lateFail([fast(),,,,slow(), null, {not: 'a promise'},,,]))
-      .then(() => t.equal(resolvedSlow, true, 'resolved slow before failure'))
-  })
-
-  t.test('works just like Promise.all() otherwise', t => {
-    const one = () => Promise.resolve(1)
-    const two = () => Promise.resolve(2)
-    const tre = () => Promise.resolve(3)
-    const fur = () => Promise.resolve(4)
-    const fiv = () => Promise.resolve(5)
-    const six = () => Promise.resolve(6)
-    const svn = () => Promise.resolve(7)
-    const eit = () => Promise.resolve(8)
-    const nin = () => Promise.resolve(9)
-    const ten = () => Promise.resolve(10)
-    const expect = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-    const all = Promise.all([
-      one(),
-      two(),
-      tre(),
-      fur(),
-      fiv(),
-      six(),
-      svn(),
-      eit(),
-      nin(),
-      ten(),
-    ])
-    const late = lateFail([
-      one(),
-      two(),
-      tre(),
-      fur(),
-      fiv(),
-      six(),
-      svn(),
-      eit(),
-      nin(),
-      ten(),
-    ])
-
-    return Promise.all([all, late]).then(([all, late]) => {
-      t.strictSame(all, expect)
-      t.strictSame(late, expect)
-    })
-  })
-}
-
-main()
diff --git a/node_modules/npm/node_modules/promise-call-limit/LICENSE b/node_modules/npm/node_modules/promise-call-limit/LICENSE
deleted file mode 100644
index 05eeeb8..0000000
--- a/node_modules/npm/node_modules/promise-call-limit/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/promise-call-limit/index.js b/node_modules/npm/node_modules/promise-call-limit/index.js
deleted file mode 100644
index 85ba319..0000000
--- a/node_modules/npm/node_modules/promise-call-limit/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-const os = require('os')
-// availableParallelism available only since node v19, for older versions use
-// cpus() cpus() can return an empty list if /proc is not mounted, use 1 in
-// this case
-
-/* istanbul ignore next - version-specific workaround */
-const defLimit = 'availableParallelism' in os
-  ? os.availableParallelism()
-  : Math.max(1, os.cpus().length)
-
-const callLimit = (queue, limit = defLimit) => new Promise((res, rej) => {
-  let active = 0
-  let current = 0
-  const results = []
-
-  let rejected = false
-  const reject = er => {
-    if (rejected)
-      return
-    rejected = true
-    rej(er)
-  }
-
-  let resolved = false
-  const resolve = () => {
-    if (resolved || active > 0)
-      return
-    resolved = true
-    res(results)
-  }
-
-  const run = () => {
-    const c = current++
-    if (c >= queue.length) {
-      return resolve()
-    }
-
-    active ++
-    results[c] = queue[c]().then(result => {
-      active --
-      results[c] = result
-      run()
-      return result
-    }, reject)
-  }
-
-  for (let i = 0; i < limit; i++) {
-    run()
-  }
-})
-
-module.exports = callLimit
diff --git a/node_modules/npm/node_modules/promise-call-limit/package.json b/node_modules/npm/node_modules/promise-call-limit/package.json
deleted file mode 100644
index 412c6db..0000000
--- a/node_modules/npm/node_modules/promise-call-limit/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "name": "promise-call-limit",
-  "version": "1.0.2",
-  "files": [
-    "index.js"
-  ],
-  "description": "Call an array of promise-returning functions, restricting concurrency to a specified limit.",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/isaacs/promise-call-limit"
-  },
-  "author": "Isaac Z. Schlueter  (https://izs.me)",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "preversion": "npm test",
-    "postversion": "npm publish",
-    "prepublishOnly": "git push origin --follow-tags"
-  },
-  "tap": {
-    "check-coverage": true
-  },
-  "devDependencies": {
-    "tap": "^16.0.0"
-  },
-  "funding": {
-    "url": "https://github.com/sponsors/isaacs"
-  }
-}
diff --git a/node_modules/npm/node_modules/promise-inflight/LICENSE b/node_modules/npm/node_modules/promise-inflight/LICENSE
deleted file mode 100644
index 83e7c4c..0000000
--- a/node_modules/npm/node_modules/promise-inflight/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2017, Rebecca Turner 
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/npm/node_modules/promise-inflight/inflight.js b/node_modules/npm/node_modules/promise-inflight/inflight.js
deleted file mode 100644
index ce054d3..0000000
--- a/node_modules/npm/node_modules/promise-inflight/inflight.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict'
-module.exports = inflight
-
-let Bluebird
-try {
-  Bluebird = require('bluebird')
-} catch (_) {
-  Bluebird = Promise
-}
-
-const active = {}
-inflight.active = active
-function inflight (unique, doFly) {
-  return Bluebird.all([unique, doFly]).then(function (args) {
-    const unique = args[0]
-    const doFly = args[1]
-    if (Array.isArray(unique)) {
-      return Bluebird.all(unique).then(function (uniqueArr) {
-        return _inflight(uniqueArr.join(''), doFly)
-      })
-    } else {
-      return _inflight(unique, doFly)
-    }
-  })
-
-  function _inflight (unique, doFly) {
-    if (!active[unique]) {
-      active[unique] = (new Bluebird(function (resolve) {
-        return resolve(doFly())
-      }))
-      active[unique].then(cleanup, cleanup)
-      function cleanup() { delete active[unique] }
-    }
-    return active[unique]
-  }
-}
diff --git a/node_modules/npm/node_modules/promise-inflight/package.json b/node_modules/npm/node_modules/promise-inflight/package.json
deleted file mode 100644
index 0d8930c..0000000
--- a/node_modules/npm/node_modules/promise-inflight/package.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-  "name": "promise-inflight",
-  "version": "1.0.1",
-  "description": "One promise for multiple requests in flight to avoid async duplication",
-  "main": "inflight.js",
-  "files": [
-    "inflight.js"
-  ],
-  "license": "ISC",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "keywords": [],
-  "author": "Rebecca Turner  (http://re-becca.org/)",
-  "devDependencies": {},
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/iarna/promise-inflight.git"
-  },
-  "bugs": {
-    "url": "https://github.com/iarna/promise-inflight/issues"
-  },
-  "homepage": "https://github.com/iarna/promise-inflight#readme"
-}
diff --git a/node_modules/npm/node_modules/promise-retry/LICENSE b/node_modules/npm/node_modules/promise-retry/LICENSE
deleted file mode 100644
index db5e914..0000000
--- a/node_modules/npm/node_modules/promise-retry/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2014 IndigoUnited
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/npm/node_modules/promise-retry/index.js b/node_modules/npm/node_modules/promise-retry/index.js
deleted file mode 100644
index 5df48ae..0000000
--- a/node_modules/npm/node_modules/promise-retry/index.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-
-var errcode = require('err-code');
-var retry = require('retry');
-
-var hasOwn = Object.prototype.hasOwnProperty;
-
-function isRetryError(err) {
-    return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');
-}
-
-function promiseRetry(fn, options) {
-    var temp;
-    var operation;
-
-    if (typeof fn === 'object' && typeof options === 'function') {
-        // Swap options and fn when using alternate signature (options, fn)
-        temp = options;
-        options = fn;
-        fn = temp;
-    }
-
-    operation = retry.operation(options);
-
-    return new Promise(function (resolve, reject) {
-        operation.attempt(function (number) {
-            Promise.resolve()
-            .then(function () {
-                return fn(function (err) {
-                    if (isRetryError(err)) {
-                        err = err.retried;
-                    }
-
-                    throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });
-                }, number);
-            })
-            .then(resolve, function (err) {
-                if (isRetryError(err)) {
-                    err = err.retried;
-
-                    if (operation.retry(err || new Error())) {
-                        return;
-                    }
-                }
-
-                reject(err);
-            });
-        });
-    });
-}
-
-module.exports = promiseRetry;
diff --git a/node_modules/npm/node_modules/promise-retry/package.json b/node_modules/npm/node_modules/promise-retry/package.json
deleted file mode 100644
index 6842de8..0000000
--- a/node_modules/npm/node_modules/promise-retry/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-  "name": "promise-retry",
-  "version": "2.0.1",
-  "description": "Retries a function that returns a promise, leveraging the power of the retry module.",
-  "main": "index.js",
-  "scripts": {
-    "test": "mocha --bail -t 10000"
-  },
-  "bugs": {
-    "url": "https://github.com/IndigoUnited/node-promise-retry/issues/"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/IndigoUnited/node-promise-retry.git"
-  },
-  "keywords": [
-    "retry",
-    "promise",
-    "backoff",
-    "repeat",
-    "replay"
-  ],
-  "author": "IndigoUnited  (http://indigounited.com)",
-  "license": "MIT",
-  "devDependencies": {
-    "expect.js": "^0.3.1",
-    "mocha": "^8.0.1",
-    "sleep-promise": "^8.0.1"
-  },
-  "dependencies": {
-    "err-code": "^2.0.2",
-    "retry": "^0.12.0"
-  },
-  "engines": {
-    "node": ">=10"
-  }
-}
diff --git a/node_modules/npm/node_modules/promise-retry/test/test.js b/node_modules/npm/node_modules/promise-retry/test/test.js
deleted file mode 100644
index 466b099..0000000
--- a/node_modules/npm/node_modules/promise-retry/test/test.js
+++ /dev/null
@@ -1,263 +0,0 @@
-'use strict';
-
-var expect = require('expect.js');
-var promiseRetry = require('../');
-var promiseDelay = require('sleep-promise');
-
-describe('promise-retry', function () {
-    it('should call fn again if retry was called', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                if (count <= 2) {
-                    retry(new Error('foo'));
-                }
-
-                return 'final';
-            });
-        }, { factor: 1 })
-        .then(function (value) {
-            expect(value).to.be('final');
-            expect(count).to.be(3);
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-
-    it('should call fn with the attempt number', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry, number) {
-            count += 1;
-            expect(count).to.equal(number);
-
-            return promiseDelay(10)
-            .then(function () {
-                if (count <= 2) {
-                    retry(new Error('foo'));
-                }
-
-                return 'final';
-            });
-        }, { factor: 1 })
-        .then(function (value) {
-            expect(value).to.be('final');
-            expect(count).to.be(3);
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-
-    it('should not retry on fulfillment if retry was not called', function () {
-        var count = 0;
-
-        return promiseRetry(function () {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                return 'final';
-            });
-        })
-        .then(function (value) {
-            expect(value).to.be('final');
-            expect(count).to.be(1);
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-
-    it('should not retry on rejection if retry was not called', function () {
-        var count = 0;
-
-        return promiseRetry(function () {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                throw new Error('foo');
-            });
-        })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-            expect(count).to.be(1);
-        });
-    });
-
-    it('should not retry on rejection if nr of retries is 0', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                throw new Error('foo');
-            })
-            .catch(retry);
-        }, { retries : 0 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-            expect(count).to.be(1);
-        });
-    });
-
-    it('should reject the promise if the retries were exceeded', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                throw new Error('foo');
-            })
-            .catch(retry);
-        }, { retries: 2, factor: 1 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-            expect(count).to.be(3);
-        });
-    });
-
-    it('should pass options to the underlying retry module', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            return promiseDelay(10)
-            .then(function () {
-                if (count < 2) {
-                    count += 1;
-                    retry(new Error('foo'));
-                }
-
-                return 'final';
-            });
-        }, { retries: 1, factor: 1 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-        });
-    });
-
-    it('should convert direct fulfillments into promises', function () {
-        return promiseRetry(function () {
-            return 'final';
-        }, { factor: 1 })
-        .then(function (value) {
-            expect(value).to.be('final');
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-
-    it('should convert direct rejections into promises', function () {
-        promiseRetry(function () {
-            throw new Error('foo');
-        }, { retries: 1, factor: 1 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-        });
-    });
-
-    it('should not crash on undefined rejections', function () {
-        return promiseRetry(function () {
-            throw undefined;
-        }, { retries: 1, factor: 1 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err).to.be(undefined);
-        })
-        .then(function () {
-            return promiseRetry(function (retry) {
-                retry();
-            }, { retries: 1, factor: 1 });
-        })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err).to.be(undefined);
-        });
-    });
-
-    it('should retry if retry() was called with undefined', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                if (count <= 2) {
-                    retry();
-                }
-
-                return 'final';
-            });
-        }, { factor: 1 })
-        .then(function (value) {
-            expect(value).to.be('final');
-            expect(count).to.be(3);
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-
-    it('should work with several retries in the same chain', function () {
-        var count = 0;
-
-        return promiseRetry(function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-            .then(function () {
-                retry(new Error('foo'));
-            })
-            .catch(function (err) {
-                retry(err);
-            });
-        }, { retries: 1, factor: 1 })
-        .then(function () {
-            throw new Error('should not succeed');
-        }, function (err) {
-            expect(err.message).to.be('foo');
-            expect(count).to.be(2);
-        });
-    });
-
-    it('should allow options to be passed first', function () {
-        var count = 0;
-
-        return promiseRetry({ factor: 1 }, function (retry) {
-            count += 1;
-
-            return promiseDelay(10)
-                .then(function () {
-                    if (count <= 2) {
-                        retry(new Error('foo'));
-                    }
-
-                    return 'final';
-                });
-        }).then(function (value) {
-            expect(value).to.be('final');
-            expect(count).to.be(3);
-        }, function () {
-            throw new Error('should not fail');
-        });
-    });
-});
diff --git a/node_modules/npm/node_modules/promzard/LICENSE b/node_modules/npm/node_modules/promzard/LICENSE
deleted file mode 100644
index 05eeeb8..0000000
--- a/node_modules/npm/node_modules/promzard/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/promzard/lib/index.js b/node_modules/npm/node_modules/promzard/lib/index.js
deleted file mode 100644
index 2244cbb..0000000
--- a/node_modules/npm/node_modules/promzard/lib/index.js
+++ /dev/null
@@ -1,175 +0,0 @@
-const fs = require('fs/promises')
-const { runInThisContext } = require('vm')
-const { promisify } = require('util')
-const { randomBytes } = require('crypto')
-const { Module } = require('module')
-const { dirname, basename } = require('path')
-const read = require('read')
-
-const files = {}
-
-class PromZard {
-  #file = null
-  #backupFile = null
-  #ctx = null
-  #unique = randomBytes(8).toString('hex')
-  #prompts = []
-
-  constructor (file, ctx = {}, options = {}) {
-    this.#file = file
-    this.#ctx = ctx
-    this.#backupFile = options.backupFile
-  }
-
-  static async promzard (file, ctx, options) {
-    const pz = new PromZard(file, ctx, options)
-    return pz.load()
-  }
-
-  static async fromBuffer (buf, ctx, options) {
-    let filename = 0
-    do {
-      filename = '\0' + Math.random()
-    } while (files[filename])
-    files[filename] = buf
-    const ret = await PromZard.promzard(filename, ctx, options)
-    delete files[filename]
-    return ret
-  }
-
-  async load () {
-    if (files[this.#file]) {
-      return this.#loaded()
-    }
-
-    try {
-      files[this.#file] = await fs.readFile(this.#file, 'utf8')
-    } catch (er) {
-      if (er && this.#backupFile) {
-        this.#file = this.#backupFile
-        this.#backupFile = null
-        return this.load()
-      }
-      throw er
-    }
-
-    return this.#loaded()
-  }
-
-  async #loaded () {
-    const mod = new Module(this.#file, module)
-    mod.loaded = true
-    mod.filename = this.#file
-    mod.id = this.#file
-    mod.paths = Module._nodeModulePaths(dirname(this.#file))
-
-    this.#ctx.prompt = this.#makePrompt()
-    this.#ctx.__filename = this.#file
-    this.#ctx.__dirname = dirname(this.#file)
-    this.#ctx.__basename = basename(this.#file)
-    this.#ctx.module = mod
-    this.#ctx.require = (p) => mod.require(p)
-    this.#ctx.require.resolve = (p) => Module._resolveFilename(p, mod)
-    this.#ctx.exports = mod.exports
-
-    const body = `(function(${Object.keys(this.#ctx).join(', ')}) { ${files[this.#file]}\n })`
-    runInThisContext(body, this.#file).apply(this.#ctx, Object.values(this.#ctx))
-    this.#ctx.res = mod.exports
-
-    return this.#walk()
-  }
-
-  #makePrompt () {
-    return (...args) => {
-      let p, d, t
-      for (let i = 0; i < args.length; i++) {
-        const a = args[i]
-        if (typeof a === 'string') {
-          if (p) {
-            d = a
-          } else {
-            p = a
-          }
-        } else if (typeof a === 'function') {
-          t = a
-        } else if (a && typeof a === 'object') {
-          p = a.prompt || p
-          d = a.default || d
-          t = a.transform || t
-        }
-      }
-      try {
-        return `${this.#unique}-${this.#prompts.length}`
-      } finally {
-        this.#prompts.push([p, d, t])
-      }
-    }
-  }
-
-  async #walk (o = this.#ctx.res) {
-    const keys = Object.keys(o)
-
-    const len = keys.length
-    let i = 0
-
-    while (i < len) {
-      const k = keys[i]
-      const v = o[k]
-      i++
-
-      if (v && typeof v === 'object') {
-        o[k] = await this.#walk(v)
-        continue
-      }
-
-      if (v && typeof v === 'string' && v.startsWith(this.#unique)) {
-        const n = +v.slice(this.#unique.length + 1)
-
-        // default to the key
-        // default to the ctx value, if there is one
-        const [prompt = k, def = this.#ctx[k], tx] = this.#prompts[n]
-
-        try {
-          o[k] = await this.#prompt(prompt, def, tx)
-        } catch (er) {
-          if (er.notValid) {
-            console.log(er.message)
-            i--
-          } else {
-            throw er
-          }
-        }
-        continue
-      }
-
-      if (typeof v === 'function') {
-        // XXX: remove v.length check to remove cb from functions
-        // would be a breaking change for `npm init`
-        // XXX: if cb is no longer an argument then this.#ctx should
-        // be passed in to allow arrow fns to be used and still access ctx
-        const fn = v.length ? promisify(v) : v
-        o[k] = await fn.call(this.#ctx)
-        // back up so that we process this one again.
-        // this is because it might return a prompt() call in the cb.
-        i--
-        continue
-      }
-    }
-
-    return o
-  }
-
-  async #prompt (prompt, def, tx) {
-    const res = await read({ prompt: prompt + ':', default: def }).then((r) => tx ? tx(r) : r)
-    // XXX: remove this to require throwing an error instead of
-    // returning it. would be a breaking change for `npm init`
-    if (res instanceof Error && res.notValid) {
-      throw res
-    }
-    return res
-  }
-}
-
-module.exports = PromZard.promzard
-module.exports.fromBuffer = PromZard.fromBuffer
-module.exports.PromZard = PromZard
diff --git a/node_modules/npm/node_modules/promzard/package.json b/node_modules/npm/node_modules/promzard/package.json
deleted file mode 100644
index a48764d..0000000
--- a/node_modules/npm/node_modules/promzard/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
-  "author": "GitHub Inc.",
-  "name": "promzard",
-  "description": "prompting wizardly",
-  "version": "1.0.0",
-  "repository": {
-    "url": "https://github.com/npm/promzard.git",
-    "type": "git"
-  },
-  "dependencies": {
-    "read": "^2.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.11.0",
-    "tap": "^16.3.0"
-  },
-  "main": "lib/index.js",
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "license": "ISC",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.11.0"
-  },
-  "tap": {
-    "jobs": 1,
-    "test-ignore": "fixtures/",
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/qrcode-terminal/.travis.yml b/node_modules/npm/node_modules/qrcode-terminal/.travis.yml
deleted file mode 100644
index 6e5919d..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
-  - "0.10"
diff --git a/node_modules/npm/node_modules/qrcode-terminal/LICENSE b/node_modules/npm/node_modules/qrcode-terminal/LICENSE
deleted file mode 100644
index 07e74fd..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/LICENSE
+++ /dev/null
@@ -1,222 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-==============================================================
-This product also include the following software:
-==============================================================
-
- QRCode for JavaScript
-
- Copyright (c) 2009 Kazuhiko Arase
-
- URL: http://www.d-project.com/
-
- Licensed under the MIT license:
-   http://www.opensource.org/licenses/mit-license.php
-
- The word "QR Code" is registered trademark of 
- DENSO WAVE INCORPORATED
-   http://www.denso-wave.com/qrcode/faqpatent-e.html
-
-Located in ./vendor/QRCode
-- project has been modified to work in Node and some refactoring was done for code cleanup
diff --git a/node_modules/npm/node_modules/qrcode-terminal/README.md b/node_modules/npm/node_modules/qrcode-terminal/README.md
deleted file mode 100644
index f5c830f..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/README.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# QRCode Terminal Edition [![Build Status][travis-ci-img]][travis-ci-url]
-
-> Going where no QRCode has gone before.
-
-![Basic Example][basic-example-img]
-
-# Node Library
-
-## Install
-
-Can be installed with:
-
-    $ npm install qrcode-terminal
-
-and used:
-
-    var qrcode = require('qrcode-terminal');
-
-## Usage
-
-To display some data to the terminal just call:
-
-    qrcode.generate('This will be a QRCode, eh!');
-
-You can even specify the error level (default is 'L'):
-    
-    qrcode.setErrorLevel('Q');
-    qrcode.generate('This will be a QRCode with error level Q!');
-
-If you don't want to display to the terminal but just want to string you can provide a callback:
-
-    qrcode.generate('http://github.com', function (qrcode) {
-        console.log(qrcode);
-    });
-
-If you want to display small output, provide `opts` with `small`:
-
-    qrcode.generate('This will be a small QRCode, eh!', {small: true});
-
-    qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) {
-        console.log(qrcode)
-    });
-
-# Command-Line
-
-## Install
-
-    $ npm install -g qrcode-terminal
-
-## Usage
-
-    $ qrcode-terminal --help
-    $ qrcode-terminal 'http://github.com'
-    $ echo 'http://github.com' | qrcode-terminal
-
-# Support
-
-- OS X
-- Linux
-- Windows
-
-# Server-side
-
-[node-qrcode][node-qrcode-url] is a popular server-side QRCode generator that
-renders to a `canvas` object.
-
-# Developing
-
-To setup the development envrionment run `npm install`
-
-To run tests run `npm test`
-
-# Contributers
-
-    Gord Tanner 
-    Micheal Brooks 
-
-[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png
-[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal
-[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png
-[node-qrcode-url]: https://github.com/soldair/node-qrcode
-
diff --git a/node_modules/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js b/node_modules/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js
deleted file mode 100755
index 6476287..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/env node
-
-/*!
- * Module dependencies.
- */
-
-var qrcode = require('../lib/main'),
-    path = require('path'),
-    fs = require('fs');
-
-/*!
- * Parse the process name
- */
-
-var name = process.argv[1].replace(/^.*[\\\/]/, '').replace('.js', '');
-
-/*!
- * Parse the input
- */
-
-if (process.stdin.isTTY) {
-    // called with input as argument, e.g.:
-    // ./qrcode-terminal.js "INPUT"
-
-    var input = process.argv[2];
-    handleInput(input);
-} else {
-    // called with piped input, e.g.:
-    // echo "INPUT" | ./qrcode-terminal.js
-
-    var readline = require('readline');
-
-    var interface = readline.createInterface({
-        input: process.stdin,
-        output: process.stdout,
-        terminal: false
-    });
-
-    interface.on('line', function(line) {
-        handleInput(line);
-    });
-}
-
-/*!
- * Process the input
- */
-
-function handleInput(input) {
-
-    /*!
-     * Display help
-     */
-
-    if (!input || input === '-h' || input === '--help') {
-        help();
-        process.exit();
-    }
-
-    /*!
-     * Display version
-     */
-
-    if (input === '-v' || input === '--version') {
-        version();
-        process.exit();
-    }
-
-    /*!
-     * Render the QR Code
-     */
-
-    qrcode.generate(input);
-}
-
-/*!
- * Helper functions
- */
-
-function help() {
-    console.log([
-        '',
-        'Usage: ' + name + ' ',
-        '',
-        'Options:',
-        '  -h, --help           output usage information',
-        '  -v, --version        output version number',
-        '',
-        'Examples:',
-        '',
-        '  $ ' + name + ' hello',
-        '  $ ' + name + ' "hello world"',
-        ''
-    ].join('\n'));
-}
-
-function version() {
-    var packagePath = path.join(__dirname, '..', 'package.json'),
-        packageJSON = JSON.parse(fs.readFileSync(packagePath), 'utf8');
-
-    console.log(packageJSON.version);
-}
diff --git a/node_modules/npm/node_modules/qrcode-terminal/example/basic.js b/node_modules/npm/node_modules/qrcode-terminal/example/basic.js
deleted file mode 100644
index e1e306d..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/example/basic.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var qrcode = require('../lib/main');
-qrcode.generate('this is the bomb');
diff --git a/node_modules/npm/node_modules/qrcode-terminal/example/basic.png b/node_modules/npm/node_modules/qrcode-terminal/example/basic.png
deleted file mode 100644
index 2ab5c22..0000000
Binary files a/node_modules/npm/node_modules/qrcode-terminal/example/basic.png and /dev/null differ
diff --git a/node_modules/npm/node_modules/qrcode-terminal/example/callback.js b/node_modules/npm/node_modules/qrcode-terminal/example/callback.js
deleted file mode 100644
index 5aa6814..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/example/callback.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var qrcode = require('../lib/main');
-qrcode.generate('someone sets it up', function (str) { 
-    console.log(str);
-});
diff --git a/node_modules/npm/node_modules/qrcode-terminal/example/small-qrcode.js b/node_modules/npm/node_modules/qrcode-terminal/example/small-qrcode.js
deleted file mode 100644
index f7d145d..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/example/small-qrcode.js
+++ /dev/null
@@ -1,6 +0,0 @@
-var qrcode = require('../lib/main'),
-    url = 'https://google.com/';
-
-qrcode.generate(url, { small: true }, function (qr) {
-    console.log(qr);
-});
diff --git a/node_modules/npm/node_modules/qrcode-terminal/lib/main.js b/node_modules/npm/node_modules/qrcode-terminal/lib/main.js
deleted file mode 100644
index 488cc1a..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/lib/main.js
+++ /dev/null
@@ -1,100 +0,0 @@
-var QRCode = require('./../vendor/QRCode'),
-    QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
-    black = "\033[40m  \033[0m",
-    white = "\033[47m  \033[0m",
-    toCell = function (isBlack) {
-        return isBlack ? black : white;
-    },
-    repeat = function (color) {
-        return {
-            times: function (count) {
-                return new Array(count).join(color);
-            }
-        };
-    },
-    fill = function(length, value) {
-        var arr = new Array(length);
-        for (var i = 0; i < length; i++) {
-            arr[i] = value;
-        }
-        return arr;
-    };
-
-module.exports = {
-
-    error: QRErrorCorrectLevel.L,
-
-    generate: function (input, opts, cb) {
-        if (typeof opts === 'function') {
-            cb = opts;
-            opts = {};
-        }
-
-        var qrcode = new QRCode(-1, this.error);
-        qrcode.addData(input);
-        qrcode.make();
-
-        var output = '';
-        if (opts && opts.small) {
-            var BLACK = true, WHITE = false;
-            var moduleCount = qrcode.getModuleCount();
-            var moduleData = qrcode.modules.slice();
-
-            var oddRow = moduleCount % 2 === 1;
-            if (oddRow) {
-                moduleData.push(fill(moduleCount, WHITE));
-            }
-
-            var platte= {
-                WHITE_ALL: '\u2588',
-                WHITE_BLACK: '\u2580',
-                BLACK_WHITE: '\u2584',
-                BLACK_ALL: ' ',
-            };
-
-            var borderTop = repeat(platte.BLACK_WHITE).times(moduleCount + 3);
-            var borderBottom = repeat(platte.WHITE_BLACK).times(moduleCount + 3);
-            output += borderTop + '\n';
-
-            for (var row = 0; row < moduleCount; row += 2) {
-                output += platte.WHITE_ALL;
-
-                for (var col = 0; col < moduleCount; col++) {
-                    if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === WHITE) {
-                        output += platte.WHITE_ALL;
-                    } else if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === BLACK) {
-                        output += platte.WHITE_BLACK;
-                    } else if (moduleData[row][col] === BLACK && moduleData[row + 1][col] === WHITE) {
-                        output += platte.BLACK_WHITE;
-                    } else {
-                        output += platte.BLACK_ALL;
-                    }
-                }
-
-                output += platte.WHITE_ALL + '\n';
-            }
-
-            if (!oddRow) {
-                output += borderBottom;
-            }
-        } else {
-            var border = repeat(white).times(qrcode.getModuleCount() + 3);
-
-            output += border + '\n';
-            qrcode.modules.forEach(function (row) {
-                output += white;
-                output += row.map(toCell).join(''); 
-                output += white + '\n';
-            });
-            output += border;
-        }
-
-        if (cb) cb(output);
-        else console.log(output);
-    },
-
-    setErrorLevel: function (error) {
-        this.error = QRErrorCorrectLevel[error] || this.error;
-    }
-
-};
diff --git a/node_modules/npm/node_modules/qrcode-terminal/package.json b/node_modules/npm/node_modules/qrcode-terminal/package.json
deleted file mode 100644
index 9a6b9e7..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-  "name": "qrcode-terminal",
-  "keywords": ["ansi", "ascii", "qrcode", "console"],
-  "version" : "0.12.0",
-  "description" : "QRCodes, in the terminal",
-  "homepage": "https://github.com/gtanner/qrcode-terminal",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/gtanner/qrcode-terminal"
-  },
-  "contributors": [{
-    "name": "Gord Tanner",
-    "email": "gtanner@gmail.com",
-    "url": "http://github.com/gtanner"
-  }, {
-    "name": "Michael Brooks",
-    "email": "mikeywbrooks@gmail.com",
-    "url": "http://github.com/mwbrooks"
-  }],
-  "licenses": [{
-    "type": "Apache 2.0"
-  }],
-  "main": "./lib/main",
-  "bin": {
-      "qrcode-terminal": "./bin/qrcode-terminal.js"
-  },
-  "preferGlobal": false,
-  "devDependencies": {
-    "sinon": "*",
-    "mocha": "*",
-    "expect.js": "*",
-    "jshint": "*"
-  },
-  "scripts": {
-    "test": "./node_modules/jshint/bin/jshint lib vendor && node example/basic.js && ./node_modules/mocha/bin/mocha -R nyan"
-  }
-}
diff --git a/node_modules/npm/node_modules/qrcode-terminal/test/main.js b/node_modules/npm/node_modules/qrcode-terminal/test/main.js
deleted file mode 100644
index 71cf3f9..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/test/main.js
+++ /dev/null
@@ -1,63 +0,0 @@
-var expect = require('expect.js'),
-    qrcode = require('./../lib/main'),
-    sinon = require('sinon');
-
-describe('in the main module', function() {
-    describe('the generate method', function () {
-        describe('when not providing a callback', function () {
-            beforeEach(function () {
-                sinon.stub(console, 'log');
-            });
-
-            afterEach(function () {
-                sinon.sandbox.restore();
-                console.log.reset();
-            });
-
-            it('logs to the console', function () {
-                qrcode.generate('test');
-                expect(console.log.called).to.be(true);
-            });
-        });
-
-        describe('when providing a callback', function () {
-            it('will call the callback', function () {
-                var cb = sinon.spy();
-                qrcode.generate('test', cb);
-                expect(cb.called).to.be(true);
-            });
-
-            it('will not call the console.log method', function () {
-                qrcode.generate('test', sinon.spy());
-                expect(console.log.called).to.be(false);
-            });
-        });
-
-        describe('the QR Code', function () {
-            it('should be a string', function (done) {
-                qrcode.generate('test', function(result) {
-                    expect(result).to.be.a('string');
-                    done();
-                });
-            });
-
-            it('should not end with a newline', function (done) {
-                qrcode.generate('test', function(result) {
-                    expect(result).not.to.match(/\n$/);
-                    done();
-                });
-            });
-        });
-
-        describe('the error level', function () {
-            it('should default to 1', function() {
-                expect(qrcode.error).to.be(1);
-            });
-
-            it('should not allow other levels', function() {
-                qrcode.setErrorLevel = 'something';
-                expect(qrcode.error).to.be(1);
-            }); 
-        });
-    });
-});
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
deleted file mode 100644
index 94bf74f..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js
+++ /dev/null
@@ -1,22 +0,0 @@
-var QRMode = require('./QRMode');
-
-function QR8bitByte(data) {
-	this.mode = QRMode.MODE_8BIT_BYTE;
-	this.data = data;
-}
-
-QR8bitByte.prototype = {
-
-	getLength : function() {
-		return this.data.length;
-	},
-	
-	write : function(buffer) {
-		for (var i = 0; i < this.data.length; i++) {
-			// not JIS ...
-			buffer.put(this.data.charCodeAt(i), 8);
-		}
-	}
-};
-
-module.exports = QR8bitByte;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
deleted file mode 100644
index e2861f6..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js
+++ /dev/null
@@ -1,38 +0,0 @@
-function QRBitBuffer() {
-	this.buffer = [];
-	this.length = 0;
-}
-
-QRBitBuffer.prototype = {
-
-	get : function(index) {
-		var bufIndex = Math.floor(index / 8);
-		return ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;
-	},
-	
-	put : function(num, length) {
-		for (var i = 0; i < length; i++) {
-			this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);
-		}
-	},
-	
-	getLengthInBits : function() {
-		return this.length;
-	},
-	
-	putBit : function(bit) {
-	
-		var bufIndex = Math.floor(this.length / 8);
-		if (this.buffer.length <= bufIndex) {
-			this.buffer.push(0);
-		}
-	
-		if (bit) {
-			this.buffer[bufIndex] |= (0x80 >>> (this.length % 8) );
-		}
-	
-		this.length++;
-	}
-};
-
-module.exports = QRBitBuffer;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
deleted file mode 100644
index 9b4b300..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
-	L : 1,
-	M : 0,
-	Q : 3,
-	H : 2
-};
-
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
deleted file mode 100644
index f6fdeb5..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports = {
-	PATTERN000 : 0,
-	PATTERN001 : 1,
-	PATTERN010 : 2,
-	PATTERN011 : 3,
-	PATTERN100 : 4,
-	PATTERN101 : 5,
-	PATTERN110 : 6,
-	PATTERN111 : 7
-};
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
deleted file mode 100644
index 8f4a037..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js
+++ /dev/null
@@ -1,44 +0,0 @@
-var QRMath = {
-
-	glog : function(n) {
-	
-		if (n < 1) {
-			throw new Error("glog(" + n + ")");
-		}
-		
-		return QRMath.LOG_TABLE[n];
-	},
-	
-	gexp : function(n) {
-	
-		while (n < 0) {
-			n += 255;
-		}
-	
-		while (n >= 256) {
-			n -= 255;
-		}
-	
-		return QRMath.EXP_TABLE[n];
-	},
-	
-	EXP_TABLE : new Array(256),
-	
-	LOG_TABLE : new Array(256)
-
-};
-	
-for (var i = 0; i < 8; i++) {
-	QRMath.EXP_TABLE[i] = 1 << i;
-}
-for (var i = 8; i < 256; i++) {
-	QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4]
-		^ QRMath.EXP_TABLE[i - 5]
-		^ QRMath.EXP_TABLE[i - 6]
-		^ QRMath.EXP_TABLE[i - 8];
-}
-for (var i = 0; i < 255; i++) {
-	QRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i;
-}
-
-module.exports = QRMath;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
deleted file mode 100644
index 050c8a3..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js
+++ /dev/null
@@ -1,6 +0,0 @@
-module.exports = {
-    MODE_NUMBER :       1 << 0,
-    MODE_ALPHA_NUM :    1 << 1,
-    MODE_8BIT_BYTE :    1 << 2,
-    MODE_KANJI :        1 << 3
-};
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
deleted file mode 100644
index 0c05f38..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js
+++ /dev/null
@@ -1,66 +0,0 @@
-var QRMath = require('./QRMath');
-
-function QRPolynomial(num, shift) {
-	if (num.length === undefined) {
-		throw new Error(num.length + "/" + shift);
-	}
-
-	var offset = 0;
-
-	while (offset < num.length && num[offset] === 0) {
-		offset++;
-	}
-
-	this.num = new Array(num.length - offset + shift);
-	for (var i = 0; i < num.length - offset; i++) {
-		this.num[i] = num[i + offset];
-	}
-}
-
-QRPolynomial.prototype = {
-
-	get : function(index) {
-		return this.num[index];
-	},
-	
-	getLength : function() {
-		return this.num.length;
-	},
-	
-	multiply : function(e) {
-	
-		var num = new Array(this.getLength() + e.getLength() - 1);
-	
-		for (var i = 0; i < this.getLength(); i++) {
-			for (var j = 0; j < e.getLength(); j++) {
-				num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i) ) + QRMath.glog(e.get(j) ) );
-			}
-		}
-	
-		return new QRPolynomial(num, 0);
-	},
-	
-	mod : function(e) {
-	
-		if (this.getLength() - e.getLength() < 0) {
-			return this;
-		}
-	
-		var ratio = QRMath.glog(this.get(0) ) - QRMath.glog(e.get(0) );
-	
-		var num = new Array(this.getLength() );
-		
-		for (var i = 0; i < this.getLength(); i++) {
-			num[i] = this.get(i);
-		}
-		
-		for (var x = 0; x < e.getLength(); x++) {
-			num[x] ^= QRMath.gexp(QRMath.glog(e.get(x) ) + ratio);
-		}
-	
-		// recursive call
-		return new QRPolynomial(num, 0).mod(e);
-	}
-};
-
-module.exports = QRPolynomial;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
deleted file mode 100644
index d150af1..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js
+++ /dev/null
@@ -1,298 +0,0 @@
-var QRErrorCorrectLevel = require('./QRErrorCorrectLevel');
-
-function QRRSBlock(totalCount, dataCount) {
-	this.totalCount = totalCount;
-	this.dataCount  = dataCount;
-}
-
-QRRSBlock.RS_BLOCK_TABLE = [
-
-	// L
-	// M
-	// Q
-	// H
-
-	// 1
-	[1, 26, 19],
-	[1, 26, 16],
-	[1, 26, 13],
-	[1, 26, 9],
-	
-	// 2
-	[1, 44, 34],
-	[1, 44, 28],
-	[1, 44, 22],
-	[1, 44, 16],
-
-	// 3
-	[1, 70, 55],
-	[1, 70, 44],
-	[2, 35, 17],
-	[2, 35, 13],
-
-	// 4		
-	[1, 100, 80],
-	[2, 50, 32],
-	[2, 50, 24],
-	[4, 25, 9],
-	
-	// 5
-	[1, 134, 108],
-	[2, 67, 43],
-	[2, 33, 15, 2, 34, 16],
-	[2, 33, 11, 2, 34, 12],
-	
-	// 6
-	[2, 86, 68],
-	[4, 43, 27],
-	[4, 43, 19],
-	[4, 43, 15],
-	
-	// 7		
-	[2, 98, 78],
-	[4, 49, 31],
-	[2, 32, 14, 4, 33, 15],
-	[4, 39, 13, 1, 40, 14],
-	
-	// 8
-	[2, 121, 97],
-	[2, 60, 38, 2, 61, 39],
-	[4, 40, 18, 2, 41, 19],
-	[4, 40, 14, 2, 41, 15],
-	
-	// 9
-	[2, 146, 116],
-	[3, 58, 36, 2, 59, 37],
-	[4, 36, 16, 4, 37, 17],
-	[4, 36, 12, 4, 37, 13],
-	
-	// 10		
-	[2, 86, 68, 2, 87, 69],
-	[4, 69, 43, 1, 70, 44],
-	[6, 43, 19, 2, 44, 20],
-	[6, 43, 15, 2, 44, 16],
-
-	// 11
-	[4, 101, 81],
-	[1, 80, 50, 4, 81, 51],
-	[4, 50, 22, 4, 51, 23],
-	[3, 36, 12, 8, 37, 13],
-
-	// 12
-	[2, 116, 92, 2, 117, 93],
-	[6, 58, 36, 2, 59, 37],
-	[4, 46, 20, 6, 47, 21],
-	[7, 42, 14, 4, 43, 15],
-
-	// 13
-	[4, 133, 107],
-	[8, 59, 37, 1, 60, 38],
-	[8, 44, 20, 4, 45, 21],
-	[12, 33, 11, 4, 34, 12],
-
-	// 14
-	[3, 145, 115, 1, 146, 116],
-	[4, 64, 40, 5, 65, 41],
-	[11, 36, 16, 5, 37, 17],
-	[11, 36, 12, 5, 37, 13],
-
-	// 15
-	[5, 109, 87, 1, 110, 88],
-	[5, 65, 41, 5, 66, 42],
-	[5, 54, 24, 7, 55, 25],
-	[11, 36, 12],
-
-	// 16
-	[5, 122, 98, 1, 123, 99],
-	[7, 73, 45, 3, 74, 46],
-	[15, 43, 19, 2, 44, 20],
-	[3, 45, 15, 13, 46, 16],
-
-	// 17
-	[1, 135, 107, 5, 136, 108],
-	[10, 74, 46, 1, 75, 47],
-	[1, 50, 22, 15, 51, 23],
-	[2, 42, 14, 17, 43, 15],
-
-	// 18
-	[5, 150, 120, 1, 151, 121],
-	[9, 69, 43, 4, 70, 44],
-	[17, 50, 22, 1, 51, 23],
-	[2, 42, 14, 19, 43, 15],
-
-	// 19
-	[3, 141, 113, 4, 142, 114],
-	[3, 70, 44, 11, 71, 45],
-	[17, 47, 21, 4, 48, 22],
-	[9, 39, 13, 16, 40, 14],
-
-	// 20
-	[3, 135, 107, 5, 136, 108],
-	[3, 67, 41, 13, 68, 42],
-	[15, 54, 24, 5, 55, 25],
-	[15, 43, 15, 10, 44, 16],
-
-	// 21
-	[4, 144, 116, 4, 145, 117],
-	[17, 68, 42],
-	[17, 50, 22, 6, 51, 23],
-	[19, 46, 16, 6, 47, 17],
-
-	// 22
-	[2, 139, 111, 7, 140, 112],
-	[17, 74, 46],
-	[7, 54, 24, 16, 55, 25],
-	[34, 37, 13],
-
-	// 23
-	[4, 151, 121, 5, 152, 122],
-	[4, 75, 47, 14, 76, 48],
-	[11, 54, 24, 14, 55, 25],
-	[16, 45, 15, 14, 46, 16],
-
-	// 24
-	[6, 147, 117, 4, 148, 118],
-	[6, 73, 45, 14, 74, 46],
-	[11, 54, 24, 16, 55, 25],
-	[30, 46, 16, 2, 47, 17],
-
-	// 25
-	[8, 132, 106, 4, 133, 107],
-	[8, 75, 47, 13, 76, 48],
-	[7, 54, 24, 22, 55, 25],
-	[22, 45, 15, 13, 46, 16],
-
-	// 26
-	[10, 142, 114, 2, 143, 115],
-	[19, 74, 46, 4, 75, 47],
-	[28, 50, 22, 6, 51, 23],
-	[33, 46, 16, 4, 47, 17],
-
-	// 27
-	[8, 152, 122, 4, 153, 123],
-	[22, 73, 45, 3, 74, 46],
-	[8, 53, 23, 26, 54, 24],
-	[12, 45, 15, 28, 46, 16],
-
-	// 28
-	[3, 147, 117, 10, 148, 118],
-	[3, 73, 45, 23, 74, 46],
-	[4, 54, 24, 31, 55, 25],
-	[11, 45, 15, 31, 46, 16],
-
-	// 29
-	[7, 146, 116, 7, 147, 117],
-	[21, 73, 45, 7, 74, 46],
-	[1, 53, 23, 37, 54, 24],
-	[19, 45, 15, 26, 46, 16],
-
-	// 30
-	[5, 145, 115, 10, 146, 116],
-	[19, 75, 47, 10, 76, 48],
-	[15, 54, 24, 25, 55, 25],
-	[23, 45, 15, 25, 46, 16],
-
-	// 31
-	[13, 145, 115, 3, 146, 116],
-	[2, 74, 46, 29, 75, 47],
-	[42, 54, 24, 1, 55, 25],
-	[23, 45, 15, 28, 46, 16],
-
-	// 32
-	[17, 145, 115],
-	[10, 74, 46, 23, 75, 47],
-	[10, 54, 24, 35, 55, 25],
-	[19, 45, 15, 35, 46, 16],
-
-	// 33
-	[17, 145, 115, 1, 146, 116],
-	[14, 74, 46, 21, 75, 47],
-	[29, 54, 24, 19, 55, 25],
-	[11, 45, 15, 46, 46, 16],
-
-	// 34
-	[13, 145, 115, 6, 146, 116],
-	[14, 74, 46, 23, 75, 47],
-	[44, 54, 24, 7, 55, 25],
-	[59, 46, 16, 1, 47, 17],
-
-	// 35
-	[12, 151, 121, 7, 152, 122],
-	[12, 75, 47, 26, 76, 48],
-	[39, 54, 24, 14, 55, 25],
-	[22, 45, 15, 41, 46, 16],
-
-	// 36
-	[6, 151, 121, 14, 152, 122],
-	[6, 75, 47, 34, 76, 48],
-	[46, 54, 24, 10, 55, 25],
-	[2, 45, 15, 64, 46, 16],
-
-	// 37
-	[17, 152, 122, 4, 153, 123],
-	[29, 74, 46, 14, 75, 47],
-	[49, 54, 24, 10, 55, 25],
-	[24, 45, 15, 46, 46, 16],
-
-	// 38
-	[4, 152, 122, 18, 153, 123],
-	[13, 74, 46, 32, 75, 47],
-	[48, 54, 24, 14, 55, 25],
-	[42, 45, 15, 32, 46, 16],
-
-	// 39
-	[20, 147, 117, 4, 148, 118],
-	[40, 75, 47, 7, 76, 48],
-	[43, 54, 24, 22, 55, 25],
-	[10, 45, 15, 67, 46, 16],
-
-	// 40
-	[19, 148, 118, 6, 149, 119],
-	[18, 75, 47, 31, 76, 48],
-	[34, 54, 24, 34, 55, 25],
-	[20, 45, 15, 61, 46, 16]
-];
-
-QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {
-	
-	var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
-	
-	if (rsBlock === undefined) {
-		throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
-	}
-
-	var length = rsBlock.length / 3;
-	
-	var list = [];
-	
-	for (var i = 0; i < length; i++) {
-
-		var count = rsBlock[i * 3 + 0];
-		var totalCount = rsBlock[i * 3 + 1];
-		var dataCount  = rsBlock[i * 3 + 2];
-
-		for (var j = 0; j < count; j++) {
-			list.push(new QRRSBlock(totalCount, dataCount) );	
-		}
-	}
-	
-	return list;
-};
-
-QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {
-
-	switch(errorCorrectLevel) {
-	case QRErrorCorrectLevel.L :
-		return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
-	case QRErrorCorrectLevel.M :
-		return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
-	case QRErrorCorrectLevel.Q :
-		return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
-	case QRErrorCorrectLevel.H :
-		return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
-	default :
-		return undefined;
-	}
-};
-
-module.exports = QRRSBlock;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
deleted file mode 100644
index e5b7d5b..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js
+++ /dev/null
@@ -1,272 +0,0 @@
-var QRMode = require('./QRMode');
-var QRPolynomial = require('./QRPolynomial');
-var QRMath = require('./QRMath');
-var QRMaskPattern = require('./QRMaskPattern');
-
-var QRUtil = {
-
-    PATTERN_POSITION_TABLE : [
-        [],
-        [6, 18],
-        [6, 22],
-        [6, 26],
-        [6, 30],
-        [6, 34],
-        [6, 22, 38],
-        [6, 24, 42],
-        [6, 26, 46],
-        [6, 28, 50],
-        [6, 30, 54],        
-        [6, 32, 58],
-        [6, 34, 62],
-        [6, 26, 46, 66],
-        [6, 26, 48, 70],
-        [6, 26, 50, 74],
-        [6, 30, 54, 78],
-        [6, 30, 56, 82],
-        [6, 30, 58, 86],
-        [6, 34, 62, 90],
-        [6, 28, 50, 72, 94],
-        [6, 26, 50, 74, 98],
-        [6, 30, 54, 78, 102],
-        [6, 28, 54, 80, 106],
-        [6, 32, 58, 84, 110],
-        [6, 30, 58, 86, 114],
-        [6, 34, 62, 90, 118],
-        [6, 26, 50, 74, 98, 122],
-        [6, 30, 54, 78, 102, 126],
-        [6, 26, 52, 78, 104, 130],
-        [6, 30, 56, 82, 108, 134],
-        [6, 34, 60, 86, 112, 138],
-        [6, 30, 58, 86, 114, 142],
-        [6, 34, 62, 90, 118, 146],
-        [6, 30, 54, 78, 102, 126, 150],
-        [6, 24, 50, 76, 102, 128, 154],
-        [6, 28, 54, 80, 106, 132, 158],
-        [6, 32, 58, 84, 110, 136, 162],
-        [6, 26, 54, 82, 110, 138, 166],
-        [6, 30, 58, 86, 114, 142, 170]
-    ],
-
-    G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
-    G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
-    G15_MASK : (1 << 14) | (1 << 12) | (1 << 10)    | (1 << 4) | (1 << 1),
-
-    getBCHTypeInfo : function(data) {
-        var d = data << 10;
-        while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
-            d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) );    
-        }
-        return ( (data << 10) | d) ^ QRUtil.G15_MASK;
-    },
-
-    getBCHTypeNumber : function(data) {
-        var d = data << 12;
-        while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
-            d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) );    
-        }
-        return (data << 12) | d;
-    },
-
-    getBCHDigit : function(data) {
-
-        var digit = 0;
-
-        while (data !== 0) {
-            digit++;
-            data >>>= 1;
-        }
-
-        return digit;
-    },
-
-    getPatternPosition : function(typeNumber) {
-        return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
-    },
-
-    getMask : function(maskPattern, i, j) {
-        
-        switch (maskPattern) {
-            
-        case QRMaskPattern.PATTERN000 : return (i + j) % 2 === 0;
-        case QRMaskPattern.PATTERN001 : return i % 2 === 0;
-        case QRMaskPattern.PATTERN010 : return j % 3 === 0;
-        case QRMaskPattern.PATTERN011 : return (i + j) % 3 === 0;
-        case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 === 0;
-        case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 === 0;
-        case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 === 0;
-        case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 === 0;
-
-        default :
-            throw new Error("bad maskPattern:" + maskPattern);
-        }
-    },
-
-    getErrorCorrectPolynomial : function(errorCorrectLength) {
-
-        var a = new QRPolynomial([1], 0);
-
-        for (var i = 0; i < errorCorrectLength; i++) {
-            a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0) );
-        }
-
-        return a;
-    },
-
-    getLengthInBits : function(mode, type) {
-
-        if (1 <= type && type < 10) {
-
-            // 1 - 9
-
-            switch(mode) {
-            case QRMode.MODE_NUMBER     : return 10;
-            case QRMode.MODE_ALPHA_NUM  : return 9;
-            case QRMode.MODE_8BIT_BYTE  : return 8;
-            case QRMode.MODE_KANJI      : return 8;
-            default :
-                throw new Error("mode:" + mode);
-            }
-
-        } else if (type < 27) {
-
-            // 10 - 26
-
-            switch(mode) {
-            case QRMode.MODE_NUMBER     : return 12;
-            case QRMode.MODE_ALPHA_NUM  : return 11;
-            case QRMode.MODE_8BIT_BYTE  : return 16;
-            case QRMode.MODE_KANJI      : return 10;
-            default :
-                throw new Error("mode:" + mode);
-            }
-
-        } else if (type < 41) {
-
-            // 27 - 40
-
-            switch(mode) {
-            case QRMode.MODE_NUMBER     : return 14;
-            case QRMode.MODE_ALPHA_NUM  : return 13;
-            case QRMode.MODE_8BIT_BYTE  : return 16;
-            case QRMode.MODE_KANJI      : return 12;
-            default :
-                throw new Error("mode:" + mode);
-            }
-
-        } else {
-            throw new Error("type:" + type);
-        }
-    },
-
-    getLostPoint : function(qrCode) {
-        
-        var moduleCount = qrCode.getModuleCount();
-        var lostPoint = 0;
-        var row = 0; 
-        var col = 0;
-
-        
-        // LEVEL1
-        
-        for (row = 0; row < moduleCount; row++) {
-
-            for (col = 0; col < moduleCount; col++) {
-
-                var sameCount = 0;
-                var dark = qrCode.isDark(row, col);
-
-                for (var r = -1; r <= 1; r++) {
-
-                    if (row + r < 0 || moduleCount <= row + r) {
-                        continue;
-                    }
-
-                    for (var c = -1; c <= 1; c++) {
-
-                        if (col + c < 0 || moduleCount <= col + c) {
-                            continue;
-                        }
-
-                        if (r === 0 && c === 0) {
-                            continue;
-                        }
-
-                        if (dark === qrCode.isDark(row + r, col + c) ) {
-                            sameCount++;
-                        }
-                    }
-                }
-
-                if (sameCount > 5) {
-                    lostPoint += (3 + sameCount - 5);
-                }
-            }
-        }
-
-        // LEVEL2
-
-        for (row = 0; row < moduleCount - 1; row++) {
-            for (col = 0; col < moduleCount - 1; col++) {
-                var count = 0;
-                if (qrCode.isDark(row,     col    ) ) count++;
-                if (qrCode.isDark(row + 1, col    ) ) count++;
-                if (qrCode.isDark(row,     col + 1) ) count++;
-                if (qrCode.isDark(row + 1, col + 1) ) count++;
-                if (count === 0 || count === 4) {
-                    lostPoint += 3;
-                }
-            }
-        }
-
-        // LEVEL3
-
-        for (row = 0; row < moduleCount; row++) {
-            for (col = 0; col < moduleCount - 6; col++) {
-                if (qrCode.isDark(row, col) && 
-                        !qrCode.isDark(row, col + 1) && 
-                         qrCode.isDark(row, col + 2) && 
-                         qrCode.isDark(row, col + 3) && 
-                         qrCode.isDark(row, col + 4) && 
-                        !qrCode.isDark(row, col + 5) && 
-                         qrCode.isDark(row, col + 6) ) {
-                    lostPoint += 40;
-                }
-            }
-        }
-
-        for (col = 0; col < moduleCount; col++) {
-            for (row = 0; row < moduleCount - 6; row++) {
-                if (qrCode.isDark(row, col) &&
-                        !qrCode.isDark(row + 1, col) &&
-                         qrCode.isDark(row + 2, col) &&
-                         qrCode.isDark(row + 3, col) &&
-                         qrCode.isDark(row + 4, col) &&
-                        !qrCode.isDark(row + 5, col) &&
-                         qrCode.isDark(row + 6, col) ) {
-                    lostPoint += 40;
-                }
-            }
-        }
-
-        // LEVEL4
-        
-        var darkCount = 0;
-
-        for (col = 0; col < moduleCount; col++) {
-            for (row = 0; row < moduleCount; row++) {
-                if (qrCode.isDark(row, col) ) {
-                    darkCount++;
-                }
-            }
-        }
-        
-        var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
-        lostPoint += ratio * 10;
-
-        return lostPoint;       
-    }
-
-};
-
-module.exports = QRUtil;
diff --git a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js b/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js
deleted file mode 100644
index 10eb8eb..0000000
--- a/node_modules/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js
+++ /dev/null
@@ -1,462 +0,0 @@
-//---------------------------------------------------------------------
-// QRCode for JavaScript
-//
-// Copyright (c) 2009 Kazuhiko Arase
-//
-// URL: http://www.d-project.com/
-//
-// Licensed under the MIT license:
-//   http://www.opensource.org/licenses/mit-license.php
-//
-// The word "QR Code" is registered trademark of 
-// DENSO WAVE INCORPORATED
-//   http://www.denso-wave.com/qrcode/faqpatent-e.html
-//
-//---------------------------------------------------------------------
-// Modified to work in node for this project (and some refactoring)
-//---------------------------------------------------------------------
-
-var QR8bitByte = require('./QR8bitByte');
-var QRUtil = require('./QRUtil');
-var QRPolynomial = require('./QRPolynomial');
-var QRRSBlock = require('./QRRSBlock');
-var QRBitBuffer = require('./QRBitBuffer');
-
-function QRCode(typeNumber, errorCorrectLevel) {
-	this.typeNumber = typeNumber;
-	this.errorCorrectLevel = errorCorrectLevel;
-	this.modules = null;
-	this.moduleCount = 0;
-	this.dataCache = null;
-	this.dataList = [];
-}
-
-QRCode.prototype = {
-	
-	addData : function(data) {
-		var newData = new QR8bitByte(data);
-		this.dataList.push(newData);
-		this.dataCache = null;
-	},
-	
-	isDark : function(row, col) {
-		if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
-			throw new Error(row + "," + col);
-		}
-		return this.modules[row][col];
-	},
-
-	getModuleCount : function() {
-		return this.moduleCount;
-	},
-	
-	make : function() {
-		// Calculate automatically typeNumber if provided is < 1
-		if (this.typeNumber < 1 ){
-			var typeNumber = 1;
-			for (typeNumber = 1; typeNumber < 40; typeNumber++) {
-				var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);
-
-				var buffer = new QRBitBuffer();
-				var totalDataCount = 0;
-				for (var i = 0; i < rsBlocks.length; i++) {
-					totalDataCount += rsBlocks[i].dataCount;
-				}
-
-				for (var x = 0; x < this.dataList.length; x++) {
-					var data = this.dataList[x];
-					buffer.put(data.mode, 4);
-					buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
-					data.write(buffer);
-				}
-				if (buffer.getLengthInBits() <= totalDataCount * 8)
-					break;
-			}
-			this.typeNumber = typeNumber;
-		}
-		this.makeImpl(false, this.getBestMaskPattern() );
-	},
-	
-	makeImpl : function(test, maskPattern) {
-		
-		this.moduleCount = this.typeNumber * 4 + 17;
-		this.modules = new Array(this.moduleCount);
-		
-		for (var row = 0; row < this.moduleCount; row++) {
-			
-			this.modules[row] = new Array(this.moduleCount);
-			
-			for (var col = 0; col < this.moduleCount; col++) {
-				this.modules[row][col] = null;//(col + row) % 3;
-			}
-		}
-	
-		this.setupPositionProbePattern(0, 0);
-		this.setupPositionProbePattern(this.moduleCount - 7, 0);
-		this.setupPositionProbePattern(0, this.moduleCount - 7);
-		this.setupPositionAdjustPattern();
-		this.setupTimingPattern();
-		this.setupTypeInfo(test, maskPattern);
-		
-		if (this.typeNumber >= 7) {
-			this.setupTypeNumber(test);
-		}
-	
-		if (this.dataCache === null) {
-			this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
-		}
-	
-		this.mapData(this.dataCache, maskPattern);
-	},
-
-	setupPositionProbePattern : function(row, col)  {
-		
-		for (var r = -1; r <= 7; r++) {
-			
-			if (row + r <= -1 || this.moduleCount <= row + r) continue;
-			
-			for (var c = -1; c <= 7; c++) {
-				
-				if (col + c <= -1 || this.moduleCount <= col + c) continue;
-				
-				if ( (0 <= r && r <= 6 && (c === 0 || c === 6) ) || 
-                     (0 <= c && c <= 6 && (r === 0 || r === 6) ) || 
-                     (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {
-					this.modules[row + r][col + c] = true;
-				} else {
-					this.modules[row + r][col + c] = false;
-				}
-			}		
-		}		
-	},
-	
-	getBestMaskPattern : function() {
-	
-		var minLostPoint = 0;
-		var pattern = 0;
-	
-		for (var i = 0; i < 8; i++) {
-			
-			this.makeImpl(true, i);
-	
-			var lostPoint = QRUtil.getLostPoint(this);
-	
-			if (i === 0 || minLostPoint >  lostPoint) {
-				minLostPoint = lostPoint;
-				pattern = i;
-			}
-		}
-	
-		return pattern;
-	},
-	
-	createMovieClip : function(target_mc, instance_name, depth) {
-	
-		var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
-		var cs = 1;
-	
-		this.make();
-
-		for (var row = 0; row < this.modules.length; row++) {
-			
-			var y = row * cs;
-			
-			for (var col = 0; col < this.modules[row].length; col++) {
-	
-				var x = col * cs;
-				var dark = this.modules[row][col];
-			
-				if (dark) {
-					qr_mc.beginFill(0, 100);
-					qr_mc.moveTo(x, y);
-					qr_mc.lineTo(x + cs, y);
-					qr_mc.lineTo(x + cs, y + cs);
-					qr_mc.lineTo(x, y + cs);
-					qr_mc.endFill();
-				}
-			}
-		}
-		
-		return qr_mc;
-	},
-
-	setupTimingPattern : function() {
-		
-		for (var r = 8; r < this.moduleCount - 8; r++) {
-			if (this.modules[r][6] !== null) {
-				continue;
-			}
-			this.modules[r][6] = (r % 2 === 0);
-		}
-	
-		for (var c = 8; c < this.moduleCount - 8; c++) {
-			if (this.modules[6][c] !== null) {
-				continue;
-			}
-			this.modules[6][c] = (c % 2 === 0);
-		}
-	},
-	
-	setupPositionAdjustPattern : function() {
-	
-		var pos = QRUtil.getPatternPosition(this.typeNumber);
-		
-		for (var i = 0; i < pos.length; i++) {
-		
-			for (var j = 0; j < pos.length; j++) {
-			
-				var row = pos[i];
-				var col = pos[j];
-				
-				if (this.modules[row][col] !== null) {
-					continue;
-				}
-				
-				for (var r = -2; r <= 2; r++) {
-				
-					for (var c = -2; c <= 2; c++) {
-					
-						if (Math.abs(r) === 2 || 
-                            Math.abs(c) === 2 ||
-                            (r === 0 && c === 0) ) {
-							this.modules[row + r][col + c] = true;
-						} else {
-							this.modules[row + r][col + c] = false;
-						}
-					}
-				}
-			}
-		}
-	},
-	
-	setupTypeNumber : function(test) {
-	
-		var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
-        var mod;
-	
-		for (var i = 0; i < 18; i++) {
-			mod = (!test && ( (bits >> i) & 1) === 1);
-			this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
-		}
-	
-		for (var x = 0; x < 18; x++) {
-			mod = (!test && ( (bits >> x) & 1) === 1);
-			this.modules[x % 3 + this.moduleCount - 8 - 3][Math.floor(x / 3)] = mod;
-		}
-	},
-	
-	setupTypeInfo : function(test, maskPattern) {
-	
-		var data = (this.errorCorrectLevel << 3) | maskPattern;
-		var bits = QRUtil.getBCHTypeInfo(data);
-        var mod;
-	
-		// vertical		
-		for (var v = 0; v < 15; v++) {
-	
-			mod = (!test && ( (bits >> v) & 1) === 1);
-	
-			if (v < 6) {
-				this.modules[v][8] = mod;
-			} else if (v < 8) {
-				this.modules[v + 1][8] = mod;
-			} else {
-				this.modules[this.moduleCount - 15 + v][8] = mod;
-			}
-		}
-	
-		// horizontal
-		for (var h = 0; h < 15; h++) {
-	
-			mod = (!test && ( (bits >> h) & 1) === 1);
-			
-			if (h < 8) {
-				this.modules[8][this.moduleCount - h - 1] = mod;
-			} else if (h < 9) {
-				this.modules[8][15 - h - 1 + 1] = mod;
-			} else {
-				this.modules[8][15 - h - 1] = mod;
-			}
-		}
-	
-		// fixed module
-		this.modules[this.moduleCount - 8][8] = (!test);
-	
-	},
-	
-	mapData : function(data, maskPattern) {
-		
-		var inc = -1;
-		var row = this.moduleCount - 1;
-		var bitIndex = 7;
-		var byteIndex = 0;
-		
-		for (var col = this.moduleCount - 1; col > 0; col -= 2) {
-	
-			if (col === 6) col--;
-	
-			while (true) {
-	
-				for (var c = 0; c < 2; c++) {
-					
-					if (this.modules[row][col - c] === null) {
-						
-						var dark = false;
-	
-						if (byteIndex < data.length) {
-							dark = ( ( (data[byteIndex] >>> bitIndex) & 1) === 1);
-						}
-	
-						var mask = QRUtil.getMask(maskPattern, row, col - c);
-	
-						if (mask) {
-							dark = !dark;
-						}
-						
-						this.modules[row][col - c] = dark;
-						bitIndex--;
-	
-						if (bitIndex === -1) {
-							byteIndex++;
-							bitIndex = 7;
-						}
-					}
-				}
-								
-				row += inc;
-	
-				if (row < 0 || this.moduleCount <= row) {
-					row -= inc;
-					inc = -inc;
-					break;
-				}
-			}
-		}
-		
-	}
-
-};
-
-QRCode.PAD0 = 0xEC;
-QRCode.PAD1 = 0x11;
-
-QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {
-	
-	var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
-	
-	var buffer = new QRBitBuffer();
-	
-	for (var i = 0; i < dataList.length; i++) {
-		var data = dataList[i];
-		buffer.put(data.mode, 4);
-		buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );
-		data.write(buffer);
-	}
-
-	// calc num max data.
-	var totalDataCount = 0;
-	for (var x = 0; x < rsBlocks.length; x++) {
-		totalDataCount += rsBlocks[x].dataCount;
-	}
-
-	if (buffer.getLengthInBits() > totalDataCount * 8) {
-		throw new Error("code length overflow. (" + 
-            buffer.getLengthInBits() + 
-            ">" +  
-            totalDataCount * 8 + 
-            ")");
-	}
-
-	// end code
-	if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
-		buffer.put(0, 4);
-	}
-
-	// padding
-	while (buffer.getLengthInBits() % 8 !== 0) {
-		buffer.putBit(false);
-	}
-
-	// padding
-	while (true) {
-		
-		if (buffer.getLengthInBits() >= totalDataCount * 8) {
-			break;
-		}
-		buffer.put(QRCode.PAD0, 8);
-		
-		if (buffer.getLengthInBits() >= totalDataCount * 8) {
-			break;
-		}
-		buffer.put(QRCode.PAD1, 8);
-	}
-
-	return QRCode.createBytes(buffer, rsBlocks);
-};
-
-QRCode.createBytes = function(buffer, rsBlocks) {
-
-	var offset = 0;
-	
-	var maxDcCount = 0;
-	var maxEcCount = 0;
-	
-	var dcdata = new Array(rsBlocks.length);
-	var ecdata = new Array(rsBlocks.length);
-	
-	for (var r = 0; r < rsBlocks.length; r++) {
-
-		var dcCount = rsBlocks[r].dataCount;
-		var ecCount = rsBlocks[r].totalCount - dcCount;
-
-		maxDcCount = Math.max(maxDcCount, dcCount);
-		maxEcCount = Math.max(maxEcCount, ecCount);
-		
-		dcdata[r] = new Array(dcCount);
-		
-		for (var i = 0; i < dcdata[r].length; i++) {
-			dcdata[r][i] = 0xff & buffer.buffer[i + offset];
-		}
-		offset += dcCount;
-		
-		var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
-		var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
-
-		var modPoly = rawPoly.mod(rsPoly);
-		ecdata[r] = new Array(rsPoly.getLength() - 1);
-		for (var x = 0; x < ecdata[r].length; x++) {
-            var modIndex = x + modPoly.getLength() - ecdata[r].length;
-			ecdata[r][x] = (modIndex >= 0)? modPoly.get(modIndex) : 0;
-		}
-
-	}
-	
-	var totalCodeCount = 0;
-	for (var y = 0; y < rsBlocks.length; y++) {
-		totalCodeCount += rsBlocks[y].totalCount;
-	}
-
-	var data = new Array(totalCodeCount);
-	var index = 0;
-
-	for (var z = 0; z < maxDcCount; z++) {
-		for (var s = 0; s < rsBlocks.length; s++) {
-			if (z < dcdata[s].length) {
-				data[index++] = dcdata[s][z];
-			}
-		}
-	}
-
-	for (var xx = 0; xx < maxEcCount; xx++) {
-		for (var t = 0; t < rsBlocks.length; t++) {
-			if (xx < ecdata[t].length) {
-				data[index++] = ecdata[t][xx];
-			}
-		}
-	}
-
-	return data;
-
-};
-
-module.exports = QRCode;
diff --git a/node_modules/npm/node_modules/read-cmd-shim/LICENSE b/node_modules/npm/node_modules/read-cmd-shim/LICENSE
deleted file mode 100644
index f4be44d..0000000
--- a/node_modules/npm/node_modules/read-cmd-shim/LICENSE
+++ /dev/null
@@ -1,14 +0,0 @@
-Copyright (c) 2015, Rebecca Turner 
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/node_modules/npm/node_modules/read-cmd-shim/lib/index.js b/node_modules/npm/node_modules/read-cmd-shim/lib/index.js
deleted file mode 100644
index dafc874..0000000
--- a/node_modules/npm/node_modules/read-cmd-shim/lib/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-const fs = require('fs')
-const { promisify } = require('util')
-const { readFileSync } = fs
-const readFile = promisify(fs.readFile)
-
-const extractPath = (path, cmdshimContents) => {
-  if (/[.]cmd$/.test(path)) {
-    return extractPathFromCmd(cmdshimContents)
-  } else if (/[.]ps1$/.test(path)) {
-    return extractPathFromPowershell(cmdshimContents)
-  } else {
-    return extractPathFromCygwin(cmdshimContents)
-  }
-}
-
-const extractPathFromPowershell = cmdshimContents => {
-  const matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+[$]args/)
-  return matches && matches[1]
-}
-
-const extractPathFromCmd = cmdshimContents => {
-  const matches = cmdshimContents.match(/"%(?:~dp0|dp0%)\\([^"]+?)"\s+%[*]/)
-  return matches && matches[1]
-}
-
-const extractPathFromCygwin = cmdshimContents => {
-  const matches = cmdshimContents.match(/"[$]basedir[/]([^"]+?)"\s+"[$]@"/)
-  return matches && matches[1]
-}
-
-const wrapError = (thrown, newError) => {
-  newError.message = thrown.message
-  newError.code = thrown.code
-  newError.path = thrown.path
-  return newError
-}
-
-const notaShim = (path, er) => {
-  if (!er) {
-    er = new Error()
-    Error.captureStackTrace(er, notaShim)
-  }
-  er.code = 'ENOTASHIM'
-  er.message = `Can't read shim path from '${path}', ` +
-    `it doesn't appear to be a cmd-shim`
-  return er
-}
-
-const readCmdShim = path => {
-  // create a new error to capture the stack trace from this point,
-  // instead of getting some opaque stack into node's internals
-  const er = new Error()
-  Error.captureStackTrace(er, readCmdShim)
-  return readFile(path).then(contents => {
-    const destination = extractPath(path, contents.toString())
-    if (destination) {
-      return destination
-    }
-    throw notaShim(path, er)
-  }, readFileEr => {
-    throw wrapError(readFileEr, er)
-  })
-}
-
-const readCmdShimSync = path => {
-  const contents = readFileSync(path)
-  const destination = extractPath(path, contents.toString())
-  if (!destination) {
-    throw notaShim(path)
-  }
-  return destination
-}
-
-readCmdShim.sync = readCmdShimSync
-module.exports = readCmdShim
diff --git a/node_modules/npm/node_modules/read-cmd-shim/package.json b/node_modules/npm/node_modules/read-cmd-shim/package.json
deleted file mode 100644
index 401ee3d..0000000
--- a/node_modules/npm/node_modules/read-cmd-shim/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
-  "name": "read-cmd-shim",
-  "version": "4.0.0",
-  "description": "Figure out what a cmd-shim is pointing at. This acts as the equivalent of fs.readlink.",
-  "main": "lib/index.js",
-  "devDependencies": {
-    "@npmcli/eslint-config": "^3.0.1",
-    "@npmcli/template-oss": "4.5.1",
-    "cmd-shim": "^5.0.0",
-    "rimraf": "^3.0.0",
-    "tap": "^16.0.1"
-  },
-  "scripts": {
-    "test": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "snap": "tap",
-    "posttest": "npm run lint"
-  },
-  "tap": {
-    "check-coverage": true,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/read-cmd-shim.git"
-  },
-  "license": "ISC",
-  "homepage": "https://github.com/npm/read-cmd-shim#readme",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "author": "GitHub Inc.",
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.5.1"
-  }
-}
diff --git a/node_modules/npm/node_modules/read-package-json-fast/LICENSE b/node_modules/npm/node_modules/read-package-json-fast/LICENSE
deleted file mode 100644
index 20a4762..0000000
--- a/node_modules/npm/node_modules/read-package-json-fast/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) npm, Inc. and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/read-package-json-fast/lib/index.js b/node_modules/npm/node_modules/read-package-json-fast/lib/index.js
deleted file mode 100644
index beb089d..0000000
--- a/node_modules/npm/node_modules/read-package-json-fast/lib/index.js
+++ /dev/null
@@ -1,141 +0,0 @@
-const { readFile, lstat, readdir } = require('fs/promises')
-const parse = require('json-parse-even-better-errors')
-const normalizePackageBin = require('npm-normalize-package-bin')
-const { resolve, dirname, join, relative } = require('path')
-
-const rpj = path => readFile(path, 'utf8')
-  .then(data => readBinDir(path, normalize(stripUnderscores(parse(data)))))
-  .catch(er => {
-    er.path = path
-    throw er
-  })
-
-// load the directories.bin folder as a 'bin' object
-const readBinDir = async (path, data) => {
-  if (data.bin) {
-    return data
-  }
-
-  const m = data.directories && data.directories.bin
-  if (!m || typeof m !== 'string') {
-    return data
-  }
-
-  // cut off any monkey business, like setting directories.bin
-  // to ../../../etc/passwd or /etc/passwd or something like that.
-  const root = dirname(path)
-  const dir = join('.', join('/', m))
-  data.bin = await walkBinDir(root, dir, {})
-  return data
-}
-
-const walkBinDir = async (root, dir, obj) => {
-  const entries = await readdir(resolve(root, dir)).catch(() => [])
-  for (const entry of entries) {
-    if (entry.charAt(0) === '.') {
-      continue
-    }
-    const f = resolve(root, dir, entry)
-    // ignore stat errors, weird file types, symlinks, etc.
-    const st = await lstat(f).catch(() => null)
-    if (!st) {
-      continue
-    } else if (st.isFile()) {
-      obj[entry] = relative(root, f)
-    } else if (st.isDirectory()) {
-      await walkBinDir(root, join(dir, entry), obj)
-    }
-  }
-  return obj
-}
-
-// do not preserve _fields set in files, they are sus
-const stripUnderscores = data => {
-  for (const key of Object.keys(data).filter(k => /^_/.test(k))) {
-    delete data[key]
-  }
-  return data
-}
-
-const normalize = data => {
-  addId(data)
-  fixBundled(data)
-  pruneRepeatedOptionals(data)
-  fixScripts(data)
-  fixFunding(data)
-  normalizePackageBin(data)
-  return data
-}
-
-rpj.normalize = normalize
-
-const addId = data => {
-  if (data.name && data.version) {
-    data._id = `${data.name}@${data.version}`
-  }
-  return data
-}
-
-// it was once common practice to list deps both in optionalDependencies
-// and in dependencies, to support npm versions that did not know abbout
-// optionalDependencies.  This is no longer a relevant need, so duplicating
-// the deps in two places is unnecessary and excessive.
-const pruneRepeatedOptionals = data => {
-  const od = data.optionalDependencies
-  const dd = data.dependencies || {}
-  if (od && typeof od === 'object') {
-    for (const name of Object.keys(od)) {
-      delete dd[name]
-    }
-  }
-  if (Object.keys(dd).length === 0) {
-    delete data.dependencies
-  }
-  return data
-}
-
-const fixBundled = data => {
-  const bdd = data.bundledDependencies
-  const bd = data.bundleDependencies === undefined ? bdd
-    : data.bundleDependencies
-
-  if (bd === false) {
-    data.bundleDependencies = []
-  } else if (bd === true) {
-    data.bundleDependencies = Object.keys(data.dependencies || {})
-  } else if (bd && typeof bd === 'object') {
-    if (!Array.isArray(bd)) {
-      data.bundleDependencies = Object.keys(bd)
-    } else {
-      data.bundleDependencies = bd
-    }
-  } else {
-    delete data.bundleDependencies
-  }
-
-  delete data.bundledDependencies
-  return data
-}
-
-const fixScripts = data => {
-  if (!data.scripts || typeof data.scripts !== 'object') {
-    delete data.scripts
-    return data
-  }
-
-  for (const [name, script] of Object.entries(data.scripts)) {
-    if (typeof script !== 'string') {
-      delete data.scripts[name]
-    }
-  }
-  return data
-}
-
-const fixFunding = data => {
-  if (data.funding && typeof data.funding === 'string') {
-    data.funding = { url: data.funding }
-  }
-  return data
-}
-
-module.exports = rpj
diff --git a/node_modules/npm/node_modules/read-package-json-fast/package.json b/node_modules/npm/node_modules/read-package-json-fast/package.json
deleted file mode 100644
index 4964bb0..0000000
--- a/node_modules/npm/node_modules/read-package-json-fast/package.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
-  "name": "read-package-json-fast",
-  "version": "3.0.2",
-  "description": "Like read-package-json, but faster",
-  "main": "lib/index.js",
-  "author": "GitHub Inc.",
-  "license": "ISC",
-  "scripts": {
-    "test": "tap",
-    "snap": "tap",
-    "lint": "eslint \"**/*.js\"",
-    "postlint": "template-oss-check",
-    "template-oss-apply": "template-oss-apply --force",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint"
-  },
-  "engines": {
-    "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.11.0",
-    "tap": "^16.3.0"
-  },
-  "dependencies": {
-    "json-parse-even-better-errors": "^3.0.0",
-    "npm-normalize-package-bin": "^3.0.0"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/read-package-json-fast.git"
-  },
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.11.0"
-  },
-  "tap": {
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/read-package-json/LICENSE b/node_modules/npm/node_modules/read-package-json/LICENSE
deleted file mode 100644
index 052085c..0000000
--- a/node_modules/npm/node_modules/read-package-json/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/read-package-json/lib/read-json.js b/node_modules/npm/node_modules/read-package-json/lib/read-json.js
deleted file mode 100644
index d35f09e..0000000
--- a/node_modules/npm/node_modules/read-package-json/lib/read-json.js
+++ /dev/null
@@ -1,589 +0,0 @@
-var fs = require('fs')
-
-var path = require('path')
-
-var { glob } = require('glob')
-var normalizeData = require('normalize-package-data')
-var safeJSON = require('json-parse-even-better-errors')
-var util = require('util')
-var normalizePackageBin = require('npm-normalize-package-bin')
-
-module.exports = readJson
-
-// put more stuff on here to customize.
-readJson.extraSet = [
-  bundleDependencies,
-  gypfile,
-  serverjs,
-  scriptpath,
-  authors,
-  readme,
-  mans,
-  bins,
-  githead,
-  fillTypes,
-]
-
-var typoWarned = {}
-var cache = {}
-
-function readJson (file, log_, strict_, cb_) {
-  var log, strict, cb
-  for (var i = 1; i < arguments.length - 1; i++) {
-    if (typeof arguments[i] === 'boolean') {
-      strict = arguments[i]
-    } else if (typeof arguments[i] === 'function') {
-      log = arguments[i]
-    }
-  }
-
-  if (!log) {
-    log = function () {}
-  }
-  cb = arguments[arguments.length - 1]
-
-  readJson_(file, log, strict, cb)
-}
-
-function readJson_ (file, log, strict, cb) {
-  fs.readFile(file, 'utf8', function (er, d) {
-    parseJson(file, er, d, log, strict, cb)
-  })
-}
-
-function stripBOM (content) {
-  // Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
-  // because the buffer-to-string conversion in `fs.readFileSync()`
-  // translates it to FEFF, the UTF-16 BOM.
-  if (content.charCodeAt(0) === 0xFEFF) {
-    content = content.slice(1)
-  }
-  return content
-}
-
-function jsonClone (obj) {
-  if (obj == null) {
-    return obj
-  } else if (Array.isArray(obj)) {
-    var newarr = new Array(obj.length)
-    for (var ii in obj) {
-      newarr[ii] = jsonClone(obj[ii])
-    }
-    return newarr
-  } else if (typeof obj === 'object') {
-    var newobj = {}
-    for (var kk in obj) {
-      newobj[kk] = jsonClone(obj[kk])
-    }
-    return newobj
-  } else {
-    return obj
-  }
-}
-
-function parseJson (file, er, d, log, strict, cb) {
-  if (er && er.code === 'ENOENT') {
-    return fs.stat(path.dirname(file), function (err, stat) {
-      if (!err && stat && !stat.isDirectory()) {
-        // ENOTDIR isn't used on Windows, but npm expects it.
-        er = Object.create(er)
-        er.code = 'ENOTDIR'
-        return cb(er)
-      } else {
-        return indexjs(file, er, log, strict, cb)
-      }
-    })
-  }
-  if (er) {
-    return cb(er)
-  }
-
-  if (cache[d]) {
-    return cb(null, jsonClone(cache[d]))
-  }
-
-  var data
-
-  try {
-    data = safeJSON(stripBOM(d))
-    for (var key in data) {
-      if (/^_/.test(key)) {
-        delete data[key]
-      }
-    }
-  } catch (jsonErr) {
-    data = parseIndex(d)
-    if (!data) {
-      return cb(parseError(jsonErr, file))
-    }
-  }
-  extrasCached(file, d, data, log, strict, cb)
-}
-
-function extrasCached (file, d, data, log, strict, cb) {
-  extras(file, data, log, strict, function (err, extrasData) {
-    if (!err) {
-      cache[d] = jsonClone(extrasData)
-    }
-    cb(err, extrasData)
-  })
-}
-
-function indexjs (file, er, log, strict, cb) {
-  if (path.basename(file) === 'index.js') {
-    return cb(er)
-  }
-
-  var index = path.resolve(path.dirname(file), 'index.js')
-  fs.readFile(index, 'utf8', function (er2, d) {
-    if (er2) {
-      return cb(er)
-    }
-
-    if (cache[d]) {
-      return cb(null, cache[d])
-    }
-
-    var data = parseIndex(d)
-    if (!data) {
-      return cb(er)
-    }
-
-    extrasCached(file, d, data, log, strict, cb)
-  })
-}
-
-readJson.extras = extras
-function extras (file, data, log_, strict_, cb_) {
-  var log, strict, cb
-  for (var i = 2; i < arguments.length - 1; i++) {
-    if (typeof arguments[i] === 'boolean') {
-      strict = arguments[i]
-    } else if (typeof arguments[i] === 'function') {
-      log = arguments[i]
-    }
-  }
-
-  if (!log) {
-    log = function () {}
-  }
-  cb = arguments[i]
-
-  var set = readJson.extraSet
-  var n = set.length
-  var errState = null
-  set.forEach(function (fn) {
-    fn(file, data, then)
-  })
-
-  function then (er) {
-    if (errState) {
-      return
-    }
-    if (er) {
-      return cb(errState = er)
-    }
-    if (--n > 0) {
-      return
-    }
-    final(file, data, log, strict, cb)
-  }
-}
-
-function scriptpath (file, data, cb) {
-  if (!data.scripts) {
-    return cb(null, data)
-  }
-  var k = Object.keys(data.scripts)
-  k.forEach(scriptpath_, data.scripts)
-  cb(null, data)
-}
-
-function scriptpath_ (key) {
-  var s = this[key]
-  // This is never allowed, and only causes problems
-  if (typeof s !== 'string') {
-    return delete this[key]
-  }
-
-  var spre = /^(\.[/\\])?node_modules[/\\].bin[\\/]/
-  if (s.match(spre)) {
-    this[key] = this[key].replace(spre, '')
-  }
-}
-
-function gypfile (file, data, cb) {
-  var dir = path.dirname(file)
-  var s = data.scripts || {}
-  if (s.install || s.preinstall) {
-    return cb(null, data)
-  }
-
-  if (data.gypfile === false) {
-    return cb(null, data)
-  }
-  glob('*.gyp', { cwd: dir })
-    .then(files => gypfile_(file, data, files, cb))
-    .catch(er => cb(er))
-}
-
-function gypfile_ (file, data, files, cb) {
-  if (!files.length) {
-    return cb(null, data)
-  }
-  var s = data.scripts || {}
-  s.install = 'node-gyp rebuild'
-  data.scripts = s
-  data.gypfile = true
-  return cb(null, data)
-}
-
-function serverjs (file, data, cb) {
-  var dir = path.dirname(file)
-  var s = data.scripts || {}
-  if (s.start) {
-    return cb(null, data)
-  }
-  fs.access(path.join(dir, 'server.js'), (err) => {
-    if (!err) {
-      s.start = 'node server.js'
-      data.scripts = s
-    }
-    return cb(null, data)
-  })
-}
-
-function authors (file, data, cb) {
-  if (data.contributors) {
-    return cb(null, data)
-  }
-  var af = path.resolve(path.dirname(file), 'AUTHORS')
-  fs.readFile(af, 'utf8', function (er, ad) {
-    // ignore error.  just checking it.
-    if (er) {
-      return cb(null, data)
-    }
-    authors_(file, data, ad, cb)
-  })
-}
-
-function authors_ (file, data, ad, cb) {
-  ad = ad.split(/\r?\n/g).map(function (line) {
-    return line.replace(/^\s*#.*$/, '').trim()
-  }).filter(function (line) {
-    return line
-  })
-  data.contributors = ad
-  return cb(null, data)
-}
-
-function readme (file, data, cb) {
-  if (data.readme) {
-    return cb(null, data)
-  }
-  var dir = path.dirname(file)
-  var globOpts = { cwd: dir, nocase: true, mark: true }
-  glob('{README,README.*}', globOpts)
-    .then(files => {
-      // don't accept directories.
-      files = files.filter(function (filtered) {
-        return !filtered.match(/\/$/)
-      })
-      if (!files.length) {
-        return cb()
-      }
-      var fn = preferMarkdownReadme(files)
-      var rm = path.resolve(dir, fn)
-      return readme_(file, data, rm, cb)
-    })
-    .catch(er => cb(er))
-}
-
-function preferMarkdownReadme (files) {
-  var fallback = 0
-  var re = /\.m?a?r?k?d?o?w?n?$/i
-  for (var i = 0; i < files.length; i++) {
-    if (files[i].match(re)) {
-      return files[i]
-    } else if (files[i].match(/README$/)) {
-      fallback = i
-    }
-  }
-  // prefer README.md, followed by README; otherwise, return
-  // the first filename (which could be README)
-  return files[fallback]
-}
-
-function readme_ (file, data, rm, cb) {
-  var rmfn = path.basename(rm)
-  fs.readFile(rm, 'utf8', function (er, rmData) {
-    // maybe not readable, or something.
-    if (er) {
-      return cb()
-    }
-    data.readme = rmData
-    data.readmeFilename = rmfn
-    return cb(er, data)
-  })
-}
-
-function mans (file, data, cb) {
-  let cwd = data.directories && data.directories.man
-  if (data.man || !cwd) {
-    return cb(null, data)
-  }
-  const dirname = path.dirname(file)
-  cwd = path.resolve(path.dirname(file), cwd)
-  glob('**/*.[0-9]', { cwd })
-    .then(mansGlob => {
-      data.man = mansGlob.map(man =>
-        path.relative(dirname, path.join(cwd, man)).split(path.sep).join('/')
-      )
-      return cb(null, data)
-    })
-    .catch(er => cb(er))
-}
-
-function bins (file, data, cb) {
-  data = normalizePackageBin(data)
-
-  var m = data.directories && data.directories.bin
-  if (data.bin || !m) {
-    return cb(null, data)
-  }
-
-  m = path.resolve(path.dirname(file), path.join('.', path.join('/', m)))
-  glob('**', { cwd: m })
-    .then(binsGlob => bins_(file, data, binsGlob, cb))
-    .catch(er => cb(er))
-}
-
-function bins_ (file, data, binsGlob, cb) {
-  var m = (data.directories && data.directories.bin) || '.'
-  data.bin = binsGlob.reduce(function (acc, mf) {
-    if (mf && mf.charAt(0) !== '.') {
-      var f = path.basename(mf)
-      acc[f] = path.join(m, mf)
-    }
-    return acc
-  }, {})
-  return cb(null, normalizePackageBin(data))
-}
-
-function bundleDependencies (file, data, cb) {
-  var bd = 'bundleDependencies'
-  var bdd = 'bundledDependencies'
-  // normalize key name
-  if (data[bdd] !== undefined) {
-    if (data[bd] === undefined) {
-      data[bd] = data[bdd]
-    }
-    delete data[bdd]
-  }
-  if (data[bd] === false) {
-    delete data[bd]
-  } else if (data[bd] === true) {
-    data[bd] = Object.keys(data.dependencies || {})
-  } else if (data[bd] !== undefined && !Array.isArray(data[bd])) {
-    delete data[bd]
-  }
-  return cb(null, data)
-}
-
-function githead (file, data, cb) {
-  if (data.gitHead) {
-    return cb(null, data)
-  }
-  var dir = path.dirname(file)
-  var head = path.resolve(dir, '.git/HEAD')
-  fs.readFile(head, 'utf8', function (er, headData) {
-    if (er) {
-      var parent = path.dirname(dir)
-      if (parent === dir) {
-        return cb(null, data)
-      }
-      return githead(dir, data, cb)
-    }
-    githead_(data, dir, headData, cb)
-  })
-}
-
-function githead_ (data, dir, head, cb) {
-  if (!head.match(/^ref: /)) {
-    data.gitHead = head.trim()
-    return cb(null, data)
-  }
-  var headRef = head.replace(/^ref: /, '').trim()
-  var headFile = path.resolve(dir, '.git', headRef)
-  fs.readFile(headFile, 'utf8', function (er, headData) {
-    if (er || !headData) {
-      var packFile = path.resolve(dir, '.git/packed-refs')
-      return fs.readFile(packFile, 'utf8', function (readFileErr, refs) {
-        if (readFileErr || !refs) {
-          return cb(null, data)
-        }
-        refs = refs.split('\n')
-        for (var i = 0; i < refs.length; i++) {
-          var match = refs[i].match(/^([0-9a-f]{40}) (.+)$/)
-          if (match && match[2].trim() === headRef) {
-            data.gitHead = match[1]
-            break
-          }
-        }
-        return cb(null, data)
-      })
-    }
-    headData = headData.replace(/^ref: /, '').trim()
-    data.gitHead = headData
-    return cb(null, data)
-  })
-}
-
-/**
- * Warn if the bin references don't point to anything.  This might be better in
- * normalize-package-data if it had access to the file path.
- */
-function checkBinReferences_ (file, data, warn, cb) {
-  if (!(data.bin instanceof Object)) {
-    return cb()
-  }
-
-  var keys = Object.keys(data.bin)
-  var keysLeft = keys.length
-  if (!keysLeft) {
-    return cb()
-  }
-
-  function handleExists (relName, result) {
-    keysLeft--
-    if (!result) {
-      warn('No bin file found at ' + relName)
-    }
-    if (!keysLeft) {
-      cb()
-    }
-  }
-
-  keys.forEach(function (key) {
-    var dirName = path.dirname(file)
-    var relName = data.bin[key]
-    /* istanbul ignore if - impossible, bins have been normalized */
-    if (typeof relName !== 'string') {
-      var msg = 'Bin filename for ' + key +
-        ' is not a string: ' + util.inspect(relName)
-      warn(msg)
-      delete data.bin[key]
-      handleExists(relName, true)
-      return
-    }
-    var binPath = path.resolve(dirName, relName)
-    fs.stat(binPath, (err) => handleExists(relName, !err))
-  })
-}
-
-function final (file, data, log, strict, cb) {
-  var pId = makePackageId(data)
-
-  function warn (msg) {
-    if (typoWarned[pId]) {
-      return
-    }
-    if (log) {
-      log('package.json', pId, msg)
-    }
-  }
-
-  try {
-    normalizeData(data, warn, strict)
-  } catch (error) {
-    return cb(error)
-  }
-
-  checkBinReferences_(file, data, warn, function () {
-    typoWarned[pId] = true
-    cb(null, data)
-  })
-}
-
-function fillTypes (file, data, cb) {
-  var index = data.main || 'index.js'
-
-  if (typeof index !== 'string') {
-    return cb(new TypeError('The "main" attribute must be of type string.'))
-  }
-
-  // TODO exports is much more complicated than this in verbose format
-  // We need to support for instance
-
-  // "exports": {
-  //   ".": [
-  //     {
-  //       "default": "./lib/npm.js"
-  //     },
-  //     "./lib/npm.js"
-  //   ],
-  //   "./package.json": "./package.json"
-  // },
-  // as well as conditional exports
-
-  // if (data.exports && typeof data.exports === 'string') {
-  //   index = data.exports
-  // }
-
-  // if (data.exports && data.exports['.']) {
-  //   index = data.exports['.']
-  //   if (typeof index !== 'string') {
-  //   }
-  // }
-
-  var extless =
-    path.join(path.dirname(index), path.basename(index, path.extname(index)))
-  var dts = `./${extless}.d.ts`
-  var dtsPath = path.join(path.dirname(file), dts)
-  var hasDTSFields = 'types' in data || 'typings' in data
-  if (!hasDTSFields && fs.existsSync(dtsPath)) {
-    data.types = dts.split(path.sep).join('/')
-  }
-
-  cb(null, data)
-}
-
-function makePackageId (data) {
-  var name = cleanString(data.name)
-  var ver = cleanString(data.version)
-  return name + '@' + ver
-}
-
-function cleanString (str) {
-  return (!str || typeof (str) !== 'string') ? '' : str.trim()
-}
-
-// /**package { "name": "foo", "version": "1.2.3", ... } **/
-function parseIndex (data) {
-  data = data.split(/^\/\*\*package(?:\s|$)/m)
-
-  if (data.length < 2) {
-    return null
-  }
-  data = data[1]
-  data = data.split(/\*\*\/$/m)
-
-  if (data.length < 2) {
-    return null
-  }
-  data = data[0]
-  data = data.replace(/^\s*\*/mg, '')
-
-  try {
-    return safeJSON(data)
-  } catch (er) {
-    return null
-  }
-}
-
-function parseError (ex, file) {
-  var e = new Error('Failed to parse json\n' + ex.message)
-  e.code = 'EJSONPARSE'
-  e.path = file
-  return e
-}
diff --git a/node_modules/npm/node_modules/read-package-json/package.json b/node_modules/npm/node_modules/read-package-json/package.json
deleted file mode 100644
index 01061f2..0000000
--- a/node_modules/npm/node_modules/read-package-json/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-  "name": "read-package-json",
-  "version": "7.0.0",
-  "author": "GitHub Inc.",
-  "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/npm/read-package-json.git"
-  },
-  "main": "lib/read-json.js",
-  "scripts": {
-    "prerelease": "npm t",
-    "postrelease": "npm publish && git push --follow-tags",
-    "release": "standard-version -s",
-    "test": "tap",
-    "npmclilint": "npmcli-lint",
-    "lint": "eslint \"**/*.js\"",
-    "lintfix": "npm run lint -- --fix",
-    "posttest": "npm run lint",
-    "postsnap": "npm run lintfix --",
-    "postlint": "template-oss-check",
-    "snap": "tap",
-    "template-oss-apply": "template-oss-apply --force"
-  },
-  "dependencies": {
-    "glob": "^10.2.2",
-    "json-parse-even-better-errors": "^3.0.0",
-    "normalize-package-data": "^6.0.0",
-    "npm-normalize-package-bin": "^3.0.0"
-  },
-  "devDependencies": {
-    "@npmcli/eslint-config": "^4.0.0",
-    "@npmcli/template-oss": "4.18.0",
-    "tap": "^16.0.1"
-  },
-  "license": "ISC",
-  "files": [
-    "bin/",
-    "lib/"
-  ],
-  "engines": {
-    "node": "^16.14.0 || >=18.0.0"
-  },
-  "tap": {
-    "branches": 73,
-    "functions": 77,
-    "lines": 77,
-    "statements": 77,
-    "nyc-arg": [
-      "--exclude",
-      "tap-snapshots/**"
-    ]
-  },
-  "templateOSS": {
-    "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
-    "version": "4.18.0",
-    "publish": "true",
-    "ciVersions": [
-      "16.14.0",
-      "16.x",
-      "18.0.0",
-      "18.x"
-    ]
-  }
-}
diff --git a/node_modules/npm/node_modules/read/LICENSE b/node_modules/npm/node_modules/read/LICENSE
deleted file mode 100644
index 19129e3..0000000
--- a/node_modules/npm/node_modules/read/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/npm/node_modules/read/lib/read.js b/node_modules/npm/node_modules/read/lib/read.js
deleted file mode 100644
index 92ed415..0000000
--- a/node_modules/npm/node_modules/read/lib/read.js
+++ /dev/null
@@ -1,82 +0,0 @@
-const readline = require('readline')
-const Mute = require('mute-stream')
-
-module.exports = async function read ({
-  default: def = '',
-  input = process.stdin,
-  output = process.stdout,
-  completer,
-  prompt = '',
-  silent,
-  timeout,
-  edit,
-  terminal,
-  replace,
-}) {
-  if (typeof def !== 'undefined' && typeof def !== 'string' && typeof def !== 'number') {
-    throw new Error('default value must be string or number')
-  }
-
-  let editDef = false
-  prompt = prompt.trim() + ' '
-  terminal = !!(terminal || output.isTTY)
-
-  if (def) {
-    if (silent) {
-      prompt += '(