diff --git a/docs/init.md b/docs/init.md index 5ff0cc433..4431497f2 100644 --- a/docs/init.md +++ b/docs/init.md @@ -73,6 +73,8 @@ module.exports = { // Path to script, which will be executed after initialization process, but before installing all the dependencies specified in the template. This script runs as a shell script but you can change that (e.g. to Node) by using a shebang (see example custom template). postInitScript: './script.js', + // We're also using `template.config.js` when adding new platforms to existing project in `add-platform` command. Thanks to value passed to `platformName` we know which folder we should copy to the project. + platformName: 'visionos', }; ``` @@ -91,12 +93,16 @@ new Promise((resolve) => { spinner.start(); // do something resolve(); -}).then(() => { - spinner.succeed(); -}).catch(() => { - spinner.fail(); - throw new Error('Something went wrong during the post init script execution'); -}); +}) + .then(() => { + spinner.succeed(); + }) + .catch(() => { + spinner.fail(); + throw new Error( + 'Something went wrong during the post init script execution', + ); + }); ``` You can find example custom template [here](https://github.com/Esemesek/react-native-new-template). diff --git a/packages/cli/package.json b/packages/cli/package.json index 1d039d7bb..942638697 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -39,6 +39,7 @@ "find-up": "^4.1.0", "fs-extra": "^8.1.0", "graceful-fs": "^4.1.3", + "npm-registry-fetch": "^16.1.0", "prompts": "^2.4.2", "semver": "^7.5.2" }, @@ -46,6 +47,7 @@ "@types/fs-extra": "^8.1.0", "@types/graceful-fs": "^4.1.3", "@types/hapi__joi": "^17.1.6", + "@types/npm-registry-fetch": "^8.0.7", "@types/prompts": "^2.4.4", "@types/semver": "^6.0.2", "slash": "^3.0.0", diff --git a/packages/cli/src/commands/addPlatform/addPlatform.ts b/packages/cli/src/commands/addPlatform/addPlatform.ts new file mode 100644 index 000000000..2da3a7142 --- /dev/null +++ b/packages/cli/src/commands/addPlatform/addPlatform.ts @@ -0,0 +1,208 @@ +import { + CLIError, + getLoader, + logger, + prompt, +} from '@react-native-community/cli-tools'; +import {Config} from '@react-native-community/cli-types'; +import {join} from 'path'; +import {readFileSync} from 'fs'; +import chalk from 'chalk'; +import {install, PackageManager} from './../../tools/packageManager'; +import npmFetch from 'npm-registry-fetch'; +import semver from 'semver'; +import {checkGitInstallation, isGitTreeDirty} from '../init/git'; +import { + changePlaceholderInTemplate, + getTemplateName, +} from '../init/editTemplate'; +import { + copyTemplate, + executePostInitScript, + getTemplateConfig, + installTemplatePackage, +} from '../init/template'; +import {tmpdir} from 'os'; +import {mkdtempSync} from 'graceful-fs'; + +type Options = { + packageName: string; + version: string; + pm: PackageManager; + title: string; +}; + +const NPM_REGISTRY_URL = 'http://registry.npmjs.org'; // TODO: Support local registry + +const getAppName = async (root: string) => { + logger.log(`Reading ${chalk.cyan('name')} from package.json…`); + const pkgJsonPath = join(root, 'package.json'); + + if (!pkgJsonPath) { + throw new CLIError(`Unable to find package.json inside ${root}`); + } + + let {name} = JSON.parse(readFileSync(pkgJsonPath, 'utf8')); + + if (!name) { + const appJson = join(root, 'app.json'); + if (appJson) { + logger.log(`Reading ${chalk.cyan('name')} from app.json…`); + name = JSON.parse(readFileSync(appJson, 'utf8')).name; + } + + if (!name) { + throw new CLIError('Please specify name in package.json or app.json.'); + } + } + + return name; +}; + +const getPackageMatchingVersion = async ( + packageName: string, + version: string, +) => { + const npmResponse = await npmFetch.json(packageName, { + registry: NPM_REGISTRY_URL, + }); + + if ('dist-tags' in npmResponse) { + const distTags = npmResponse['dist-tags'] as Record; + if (version in distTags) { + return distTags[version]; + } + } + + if ('versions' in npmResponse) { + const versions = Object.keys( + npmResponse.versions as Record, + ); + if (versions.length > 0) { + const candidates = versions + .filter((v) => semver.satisfies(v, version)) + .sort(semver.rcompare); + + if (candidates.length > 0) { + return candidates[0]; + } + } + } + + throw new Error( + `Cannot find matching version of ${packageName} to react-native${version}, please provide version manually with --version flag.`, + ); +}; + +async function addPlatform( + [packageName]: string[], + {root, reactNativeVersion}: Config, + {version, pm, title}: Options, +) { + if (!packageName) { + throw new CLIError('Please provide package name e.g. react-native-macos'); + } + + const isGitAvailable = await checkGitInstallation(); + + if (isGitAvailable) { + const dirty = await isGitTreeDirty(root); + + if (dirty) { + logger.warn( + 'Your git tree is dirty. We recommend committing or stashing changes first.', + ); + const {proceed} = await prompt({ + type: 'confirm', + name: 'proceed', + message: 'Would you like to proceed?', + }); + + if (!proceed) { + return; + } + + logger.info('Proceeding with the installation'); + } + } + + const projectName = await getAppName(root); + + const matchingVersion = await getPackageMatchingVersion( + packageName, + version ?? reactNativeVersion, + ); + + logger.log( + `Found matching version ${chalk.cyan(matchingVersion)} for ${chalk.cyan( + packageName, + )}`, + ); + + const loader = getLoader({ + text: `Installing ${packageName}@${matchingVersion}`, + }); + + loader.start(); + + try { + await install([`${packageName}@${matchingVersion}`], { + packageManager: pm, + silent: true, + root, + }); + loader.succeed(); + } catch (e) { + loader.fail(); + throw e; + } + + loader.start('Copying template files'); + const templateSourceDir = mkdtempSync(join(tmpdir(), 'rncli-init-template-')); + await installTemplatePackage( + `${packageName}@${matchingVersion}`, + templateSourceDir, + pm, + ); + + const templateName = getTemplateName(templateSourceDir); + const templateConfig = getTemplateConfig(templateName, templateSourceDir); + + if (!templateConfig.platformName) { + throw new CLIError( + `Template ${templateName} is missing platformName in its template.config.js`, + ); + } + + await copyTemplate( + templateName, + templateConfig.templateDir, + templateSourceDir, + templateConfig.platformName, + ); + + loader.succeed(); + loader.start('Processing template'); + + await changePlaceholderInTemplate({ + projectName, + projectTitle: title, + placeholderName: templateConfig.placeholderName, + placeholderTitle: templateConfig.titlePlaceholder, + projectPath: join(root, templateConfig.platformName), + }); + + loader.succeed(); + + const {postInitScript} = templateConfig; + if (postInitScript) { + logger.debug('Executing post init script '); + await executePostInitScript( + templateName, + postInitScript, + templateSourceDir, + ); + } +} + +export default addPlatform; diff --git a/packages/cli/src/commands/addPlatform/index.ts b/packages/cli/src/commands/addPlatform/index.ts new file mode 100644 index 000000000..c8de652f1 --- /dev/null +++ b/packages/cli/src/commands/addPlatform/index.ts @@ -0,0 +1,23 @@ +import addPlatform from './addPlatform'; + +export default { + func: addPlatform, + name: 'add-platform [packageName]', + description: 'Add new platform to your React Native project.', + options: [ + { + name: '--version ', + description: 'Pass version of the platform to be added to the project.', + }, + { + name: '--pm ', + description: + 'Use specific package manager to initialize the project. Available options: `yarn`, `npm`, `bun`. Default: `yarn`', + default: 'yarn', + }, + { + name: '--title ', + description: 'Uses a custom app title name for application', + }, + ], +}; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index c9c15cee3..ad9b0d411 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -5,6 +5,7 @@ import {commands as configCommands} from '@react-native-community/cli-config'; import profileHermes from '@react-native-community/cli-hermes'; import upgrade from './upgrade/upgrade'; import init from './init'; +import addPlatform from './addPlatform'; export const projectCommands = [ ...configCommands, @@ -12,6 +13,7 @@ export const projectCommands = [ doctorCommands.info, upgrade, profileHermes, + addPlatform, ] as Command[]; export const detachedCommands = [ diff --git a/packages/cli/src/commands/init/editTemplate.ts b/packages/cli/src/commands/init/editTemplate.ts index d3bb39f23..b16b401e6 100644 --- a/packages/cli/src/commands/init/editTemplate.ts +++ b/packages/cli/src/commands/init/editTemplate.ts @@ -13,6 +13,7 @@ interface PlaceholderConfig { placeholderTitle?: string; projectTitle?: string; packageName?: string; + projectPath?: string; } /** @@ -145,11 +146,12 @@ export async function replacePlaceholderWithPackageName({ placeholderName, placeholderTitle, packageName, + projectPath, }: Omit, 'projectTitle'>) { validatePackageName(packageName); const cleanPackageName = packageName.replace(/[^\p{L}\p{N}.]+/gu, ''); - for (const filePath of walk(process.cwd()).reverse()) { + for (const filePath of walk(projectPath).reverse()) { if (shouldIgnoreFile(filePath)) { continue; } @@ -232,6 +234,7 @@ export async function changePlaceholderInTemplate({ placeholderTitle = DEFAULT_TITLE_PLACEHOLDER, projectTitle = projectName, packageName, + projectPath = process.cwd(), }: PlaceholderConfig) { logger.debug(`Changing ${placeholderName} for ${projectName} in template`); @@ -242,12 +245,13 @@ export async function changePlaceholderInTemplate({ placeholderName, placeholderTitle, packageName, + projectPath, }); } catch (error) { throw new CLIError((error as Error).message); } } else { - for (const filePath of walk(process.cwd()).reverse()) { + for (const filePath of walk(projectPath).reverse()) { if (shouldIgnoreFile(filePath)) { continue; } @@ -269,3 +273,14 @@ export async function changePlaceholderInTemplate({ } } } + +export function getTemplateName(cwd: string) { + // We use package manager to infer the name of the template module for us. + // That's why we get it from temporary package.json, where the name is the + // first and only dependency (hence 0). + const name = Object.keys( + JSON.parse(fs.readFileSync(path.join(cwd, './package.json'), 'utf8')) + .dependencies, + )[0]; + return name; +} diff --git a/packages/cli/src/commands/init/git.ts b/packages/cli/src/commands/init/git.ts index 10eee2411..00058dde9 100644 --- a/packages/cli/src/commands/init/git.ts +++ b/packages/cli/src/commands/init/git.ts @@ -68,3 +68,14 @@ export const createGitRepository = async (folder: string) => { ); } }; + +export const isGitTreeDirty = async (folder: string) => { + try { + const {stdout} = await execa('git', ['status', '--porcelain'], { + cwd: folder, + }); + return stdout !== ''; + } catch { + return false; + } +}; diff --git a/packages/cli/src/commands/init/init.ts b/packages/cli/src/commands/init/init.ts index 0d912c6b3..e038106bb 100644 --- a/packages/cli/src/commands/init/init.ts +++ b/packages/cli/src/commands/init/init.ts @@ -19,7 +19,7 @@ import { copyTemplate, executePostInitScript, } from './template'; -import {changePlaceholderInTemplate} from './editTemplate'; +import {changePlaceholderInTemplate, getTemplateName} from './editTemplate'; import * as PackageManager from '../../tools/packageManager'; import banner from './banner'; import TemplateAndVersionError from './errors/TemplateAndVersionError'; @@ -169,17 +169,6 @@ async function setProjectDirectory( return process.cwd(); } -function getTemplateName(cwd: string) { - // We use package manager to infer the name of the template module for us. - // That's why we get it from temporary package.json, where the name is the - // first and only dependency (hence 0). - const name = Object.keys( - JSON.parse(fs.readFileSync(path.join(cwd, './package.json'), 'utf8')) - .dependencies, - )[0]; - return name; -} - //set cache to empty string to prevent installing cocoapods on freshly created project function setEmptyHashForCachedDependencies(projectName: string) { cacheManager.set( diff --git a/packages/cli/src/commands/init/template.ts b/packages/cli/src/commands/init/template.ts index ee2adb537..4253bb3c3 100644 --- a/packages/cli/src/commands/init/template.ts +++ b/packages/cli/src/commands/init/template.ts @@ -1,5 +1,5 @@ import execa from 'execa'; -import path from 'path'; +import path, {join} from 'path'; import {logger, CLIError} from '@react-native-community/cli-tools'; import * as PackageManager from '../../tools/packageManager'; import copyFiles from '../../tools/copyFiles'; @@ -14,6 +14,7 @@ export type TemplateConfig = { templateDir: string; postInitScript?: string; titlePlaceholder?: string; + platformName: string; }; export async function installTemplatePackage( @@ -91,6 +92,7 @@ export async function copyTemplate( templateName: string, templateDir: string, templateSourceDir: string, + platformName: string = '', ) { const templatePath = path.resolve( templateSourceDir, @@ -101,9 +103,13 @@ export async function copyTemplate( logger.debug(`Copying template from ${templatePath}`); let regexStr = path.resolve(templatePath, 'node_modules'); - await copyFiles(templatePath, process.cwd(), { - exclude: [new RegExp(replacePathSepForRegex(regexStr))], - }); + await copyFiles( + join(templatePath, platformName), + join(process.cwd(), platformName), + { + exclude: [new RegExp(replacePathSepForRegex(regexStr))], + }, + ); } export function executePostInitScript( diff --git a/yarn.lock b/yarn.lock index de5a89981..2ea005c42 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1753,6 +1753,17 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@npmcli/agent@^2.0.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.1.tgz#8aa677d0a4136d57524336a35d5679aedf2d56f7" + integrity sha512-H4FrOVtNyWC8MUwL3UfjOsAihHvT1Pe8POj3JvjXhSTJipsZMtgUALCT4mGyYZNxymkUfOw3PUj6dE4QPp6osQ== + 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" + "@npmcli/fs@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" @@ -2340,6 +2351,14 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6" integrity sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY= +"@types/node-fetch@*": + version "2.6.11" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.11.tgz#9b39b78665dae0e82a08f02f4967d62c66f95d24" + integrity sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + "@types/node-fetch@^2.3.7", "@types/node-fetch@^2.5.5": version "2.5.5" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.5.tgz#cd264e20a81f4600a6c52864d38e7fef72485e92" @@ -2358,6 +2377,29 @@ resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e" integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA== +"@types/npm-package-arg@*": + version "6.1.4" + resolved "https://registry.yarnpkg.com/@types/npm-package-arg/-/npm-package-arg-6.1.4.tgz#112b74a61cb8632313f600212782840156e0228e" + integrity sha512-vDgdbMy2QXHnAruzlv68pUtXCjmqUk3WrBAsRboRovsOmxbfn/WiYCjmecyKjGztnMps5dWp4Uq2prp+Ilo17Q== + +"@types/npm-registry-fetch@^8.0.7": + version "8.0.7" + resolved "https://registry.yarnpkg.com/@types/npm-registry-fetch/-/npm-registry-fetch-8.0.7.tgz#83734d6c5ae834b08f383bed2b8f8b7d1031889d" + integrity sha512-db9iBh7kDDg4lRT4k4XZ6IiecTEgFCID4qk+VDVPbtzU855q3KZLCn08ATr4H27ntRJVhulQ7GWjl24H42x96w== + dependencies: + "@types/node" "*" + "@types/node-fetch" "*" + "@types/npm-package-arg" "*" + "@types/npmlog" "*" + "@types/ssri" "*" + +"@types/npmlog@*": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@types/npmlog/-/npmlog-7.0.0.tgz#76602f187ee5f36f77c1a221b2cc9391c76f3dfd" + integrity sha512-hJWbrKFvxKyWwSUXjZMYTINsSOY6IclhvGOZ97M8ac2tmR9hMwmTnYaMdpGhvju9ctWLTPhCS+eLfQNluiEjQQ== + dependencies: + "@types/node" "*" + "@types/prettier@^1.19.0": version "1.19.1" resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" @@ -2414,6 +2456,13 @@ resolved "https://registry.yarnpkg.com/@types/shell-quote/-/shell-quote-1.7.1.tgz#2d059091214a02c29f003f591032172b2aff77e8" integrity sha512-SWZ2Nom1pkyXCDohRSrkSKvDh8QOG9RfAsrt5/NsPQC4UQJ55eG0qClA40I+Gkez4KTQ0uDUT8ELRXThf3J5jw== +"@types/ssri@*": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/ssri/-/ssri-7.1.5.tgz#7147b5ba43957cb0f639a3309a3943fc1829d5e8" + integrity sha512-odD/56S3B51liILSk5aXJlnYt99S6Rt9EFDDqGtJM26rKHApHcwyU/UoYHrzKkdkHMAIquGWCuHtQTbes+FRQw== + dependencies: + "@types/node" "*" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -2646,6 +2695,13 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.2.1: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" @@ -3507,6 +3563,24 @@ cacache@^17.0.0: tar "^6.1.11" unique-filename "^3.0.0" +cacache@^18.0.0: + version "18.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.2.tgz#fd527ea0f03a603be5c0da5805635f8eef00c60c" + integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== + 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" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -6472,6 +6546,13 @@ hosted-git-info@^6.0.0: dependencies: lru-cache "^7.5.1" +hosted-git-info@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz#9985fcb2700467fecf7f33a4d4874e30680b5322" + integrity sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA== + dependencies: + lru-cache "^10.0.1" + hsl-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hsl-regex/-/hsl-regex-1.0.0.tgz#d49330c789ed819e276a4c0d272dffa30b18fe6e" @@ -6562,6 +6643,14 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-proxy-agent@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.1.tgz#f1c7df4bd6c30ba90f2c713fd4b60d3989d4b3d9" + integrity sha512-My1KCEPs6A0hb4qCVzYp8iEvA8j8YqcvXLZZH8C9OFuTYpYjHE7N2dtG3mRl1HMD4+VGXpF3XcDVcxGBT7yDZQ== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -6584,6 +6673,14 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.3.tgz#93f115f0f106a746faf364d1301b2e561cdf70de" + integrity sha512-kCnwztfX0KZJSLOBrcL0emLeFako55NWMovvyPP2AjsghNk9RB1yjSI+jVumPHYZsNXegNoqupSW9IY3afSH8w== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -6793,6 +6890,14 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -7982,6 +8087,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -8493,6 +8603,11 @@ loose-envify@^1.0.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lru-cache@^10.0.1: + version "10.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" + integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -8567,6 +8682,23 @@ make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, socks-proxy-agent "^7.0.0" ssri "^10.0.0" +make-fetch-happen@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0" + integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== + 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" + makeerror@1.0.12, makeerror@1.0.x: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -8812,6 +8944,13 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== + dependencies: + minipass "^7.0.3" + minipass-fetch@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.3.tgz#d9df70085609864331b533c960fd4ffaa78d15ce" @@ -8874,6 +9013,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.2.tgz#58a82b7d81c7010da5bd4b2c0c85ac4b4ec5131e" integrity sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA== +minipass@^7.0.2, minipass@^7.0.3: + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== + minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -9226,6 +9370,16 @@ npm-package-arg@^10.0.0, npm-package-arg@^10.1.0: semver "^7.3.5" validate-npm-package-name "^5.0.0" +npm-package-arg@^11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.1.tgz#f208b0022c29240a1c532a449bdde3f0a4708ebc" + integrity sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ== + dependencies: + hosted-git-info "^7.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" + npm-packlist@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" @@ -9266,6 +9420,19 @@ npm-registry-fetch@^14.0.0, npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0 npm-package-arg "^10.0.0" proc-log "^3.0.0" +npm-registry-fetch@^16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz#10227b7b36c97bc1cf2902a24e4f710cfe62803c" + integrity sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw== + 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" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -11586,6 +11753,15 @@ socks-proxy-agent@^7.0.0: debug "^4.3.3" socks "^2.6.2" +socks-proxy-agent@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz#5acbd7be7baf18c46a3f293a840109a430a640ad" + integrity sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + socks "^2.7.1" + socks@^2.6.2: version "2.7.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" @@ -11594,6 +11770,14 @@ socks@^2.6.2: ip "^2.0.0" smart-buffer "^4.2.0" +socks@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.3.tgz#7d8a75d7ce845c0a96f710917174dba0d543a785" + integrity sha512-vfuYK48HXCTFD03G/1/zkIls3Ebr2YNa4qU9gHDZdblHLiqhJrJGkY3+0Nx0JpN9qBhJbVObc1CNciT1bIZJxw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + sort-keys@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128" @@ -11687,6 +11871,11 @@ split@^1.0.1: dependencies: through "2" +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"