diff --git a/.eslintrc.js b/.eslintrc.js index 4f3853a38..d1d6e708e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,5 +17,11 @@ module.exports = { 'no-constant-condition': ['error', { checkLoops: false }], // Make sure variables marked with _ are ignored (ex. _varName) '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + 'ts-ignore': 'allow-with-description', + }, + ], }, }; diff --git a/package.json b/package.json index bea824443..6555c09c3 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "@types/async": "^3.0.1", "@types/cli-table": "^0.3.0", "@types/form-data": "^2.2.1", + "@types/git-url-parse": "^9.0.0", "@types/jest": "^26.0.14", "@types/js-yaml": "^3.11.1", "@types/mkdirp": "^1.0.0", @@ -57,6 +58,7 @@ "esbuild": "^0.11.6", "eslint": "^7.2.0", "eslint-config-prettier": "^6.11.0", + "git-url-parse": "^11.4.4", "jest": "^26.5.3", "js-yaml": "3.12.0", "json-schema-to-typescript": "5.7.0", diff --git a/src/__tests__/config.test.ts b/src/__tests__/config.test.ts index 5adb2f4a5..84d577967 100644 --- a/src/__tests__/config.test.ts +++ b/src/__tests__/config.test.ts @@ -39,20 +39,15 @@ describe('validateConfiguration', () => { test('parses minimal configuration', () => { const data = { github: { owner: 'getsentry', repo: 'craft' } }; - const projectConfig = validateConfiguration(data); - - expect(projectConfig).toEqual(data); + expect(validateConfiguration(data)).toEqual(data); }); - test('fails with empty configuration', () => { - // this ensures that we do actually run the expect line in the catch block - expect.assertions(1); - - try { - validateConfiguration({}); - } catch (e) { - expect(e.message).toMatch(/should have required property/i); - } + test('fails with bad configuration', () => { + expect(() => validateConfiguration({ zoom: 1 })) + .toThrowErrorMatchingInlineSnapshot(` + "Cannot parse configuration file: + data should NOT have additional properties" + `); }); }); diff --git a/src/artifact_providers/github.ts b/src/artifact_providers/github.ts index deca03533..f9f190e6d 100644 --- a/src/artifact_providers/github.ts +++ b/src/artifact_providers/github.ts @@ -8,9 +8,7 @@ import { BaseArtifactProvider, RemoteArtifact, } from '../artifact_providers/base'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; -import { GithubGlobalConfig } from '../schemas/project_config'; import { getGithubClient } from '../utils/githubApi'; import { detectContentType, @@ -50,13 +48,9 @@ export class GithubArtifactProvider extends BaseArtifactProvider { /** Github client */ public readonly github: Github; - /** Github repo configuration */ - public readonly githubRepo: GithubGlobalConfig; - public constructor(config: ArtifactProviderConfig) { super(config); this.github = getGithubClient(); - this.githubRepo = getGlobalGithubConfig(); } /** diff --git a/src/commands/artifacts_cmds/download.ts b/src/commands/artifacts_cmds/download.ts index 61551a952..614def6b8 100644 --- a/src/commands/artifacts_cmds/download.ts +++ b/src/commands/artifacts_cmds/download.ts @@ -75,7 +75,7 @@ async function handlerMain(argv: ArtifactsDownloadOptions): Promise { const revision = argv.rev; - const artifactProvider = getArtifactProviderFromConfig(); + const artifactProvider = await getArtifactProviderFromConfig(); if (artifactProvider instanceof NoneArtifactProvider) { logger.warn( `Artifact provider is disabled in the configuration, nothing to do.` diff --git a/src/commands/artifacts_cmds/list.ts b/src/commands/artifacts_cmds/list.ts index ab87b6e02..e918360c4 100644 --- a/src/commands/artifacts_cmds/list.ts +++ b/src/commands/artifacts_cmds/list.ts @@ -15,7 +15,7 @@ export const description = 'List artifacts'; async function handlerMain(argv: ArtifactsOptions): Promise { const revision = argv.rev; - const artifactProvider = getArtifactProviderFromConfig(); + const artifactProvider = await getArtifactProviderFromConfig(); if (artifactProvider instanceof NoneArtifactProvider) { logger.warn( `Artifact provider is disabled in the configuration, nothing to do.` diff --git a/src/commands/prepare.ts b/src/commands/prepare.ts index ca8c5c3d3..f6b0c62b9 100644 --- a/src/commands/prepare.ts +++ b/src/commands/prepare.ts @@ -1,14 +1,15 @@ import { existsSync, promises as fsPromises } from 'fs'; -import { dirname, join, relative } from 'path'; +import { join, relative } from 'path'; import * as shellQuote from 'shell-quote'; import simpleGit, { SimpleGit } from 'simple-git'; import { Arguments, Argv, CommandBuilder } from 'yargs'; import { checkMinimalConfigVersion, - getConfigFilePath, + getConfigFileDir, getConfiguration, DEFAULT_RELEASE_BRANCH_NAME, + getGlobalGithubConfig, } from '../config'; import { logger } from '../logger'; import { ChangelogPolicy } from '../schemas/project_config'; @@ -481,12 +482,12 @@ export async function releaseMain(argv: ReleaseOptions): Promise { // Get repo configuration const config = getConfiguration(); - const githubConfig = config.github; + const githubConfig = await getGlobalGithubConfig(); // Move to the directory where the config file is located - const configFileDir = dirname(getConfigFilePath()); + const configFileDir = getConfigFileDir() || '.'; process.chdir(configFileDir); - logger.debug(`Working directory:`, configFileDir); + logger.debug(`Working directory:`, process.cwd()); const newVersion = argv.newVersion; diff --git a/src/commands/publish.ts b/src/commands/publish.ts index bf6cc2988..7ebc5868c 100644 --- a/src/commands/publish.ts +++ b/src/commands/publish.ts @@ -18,6 +18,7 @@ import { getStatusProviderFromConfig, getArtifactProviderFromConfig, DEFAULT_RELEASE_BRANCH_NAME, + getGlobalGithubConfig, } from '../config'; import { formatTable, logger } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; @@ -238,6 +239,7 @@ async function getTargetList( artifactProvider: BaseArtifactProvider ): Promise { logger.debug('Initializing targets'); + const githubRepo = await getGlobalGithubConfig(); const targetList: BaseTarget[] = []; for (const targetConfig of targetConfigList) { const targetClass = getTargetByName(targetConfig.name); @@ -247,7 +249,11 @@ async function getTargetList( continue; } try { - const target = new targetClass(targetConfig, artifactProvider); + const target = new targetClass( + targetConfig, + artifactProvider, + githubRepo + ); targetList.push(target); } catch (err) { logger.error(`Error creating target instance for ${targetDescriptor}!`); @@ -456,7 +462,7 @@ export async function publishMain(argv: PublishOptions): Promise { // Get publishing configuration const config = getConfiguration() || {}; - const githubConfig = config.github; + const githubConfig = await getGlobalGithubConfig(); const githubClient = getGithubClient(); const newVersion = argv.newVersion; @@ -492,8 +498,8 @@ export async function publishMain(argv: PublishOptions): Promise { } logger.debug('Revision to publish: ', revision); - const statusProvider = getStatusProviderFromConfig(); - const artifactProvider = getArtifactProviderFromConfig(); + const statusProvider = await getStatusProviderFromConfig(); + const artifactProvider = await getArtifactProviderFromConfig(); logger.debug(`Using "${statusProvider.constructor.name}" for status checks`); logger.debug(`Using "${artifactProvider.constructor.name}" for artifacts`); diff --git a/src/config.ts b/src/config.ts index 12be9f403..afb670de7 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,6 +3,8 @@ import { dirname, join } from 'path'; import ajv from 'ajv'; import { safeLoad } from 'js-yaml'; +import GitUrlParse from 'git-url-parse'; +import simpleGit from 'simple-git'; import { logger } from './logger'; import { @@ -144,8 +146,8 @@ export function validateConfiguration( /** * Returns the parsed configuration file contents */ -export function getConfiguration(): CraftProjectConfig { - if (_configCache) { +export function getConfiguration(clearCache = false): CraftProjectConfig { + if (!clearCache && _configCache) { return _configCache; } @@ -225,26 +227,44 @@ export function isAfterEpoch(): boolean { /** * Return the parsed global Github configuration */ -export function getGlobalGithubConfig(): GithubGlobalConfig { +let _globalGithubConfigCache: GithubGlobalConfig | null; +export async function getGlobalGithubConfig( + clearCache = false +): Promise { + if (!clearCache && _globalGithubConfigCache !== undefined) { + if (_globalGithubConfigCache === null) { + throw new ConfigurationError( + 'GitHub configuration not found in the config file and cannot be determined from Git' + ); + } + + return _globalGithubConfigCache; + } + // We extract global Github configuration (owner/repo) from top-level // configuration - const repoGithubConfig = getConfiguration().github || {}; + let repoGithubConfig = getConfiguration(clearCache).github || null; if (!repoGithubConfig) { - throw new ConfigurationError( - 'GitHub configuration not found in the config file' - ); - } - - if (!repoGithubConfig.owner) { - throw new ConfigurationError('GitHub target: owner not found'); + const configDir = getConfigFileDir(); + const remotes = await simpleGit(configDir).getRemotes(true); + const defaultRemote = + remotes.find(remote => remote.name === 'origin') || remotes[0]; + const remoteUrl = defaultRemote + ? GitUrlParse(defaultRemote.refs.push || defaultRemote.refs.fetch) + : { source: null }; + + if (remoteUrl.source === 'github.com') { + repoGithubConfig = { + owner: remoteUrl.owner, + repo: remoteUrl.name, + }; + } } - if (!repoGithubConfig.repo) { - throw new ConfigurationError('GitHub target: repo not found'); - } + _globalGithubConfigCache = Object.freeze(repoGithubConfig); - return repoGithubConfig; + return getGlobalGithubConfig(); } /** @@ -262,7 +282,7 @@ export function getGitTagPrefix(): string { * @returns An instance of artifact provider (which may be the dummy * NoneArtifactProvider if artifact storage is disabled). */ -export function getArtifactProviderFromConfig(): BaseArtifactProvider { +export async function getArtifactProviderFromConfig(): Promise { const projectConfig = getConfiguration(); let artifactProviderName = projectConfig.artifactProvider?.name; @@ -280,10 +300,11 @@ export function getArtifactProviderFromConfig(): BaseArtifactProvider { } } + const githubRepo = await getGlobalGithubConfig(); const artifactProviderConfig = { ...projectConfig.artifactProvider?.config, - repoName: projectConfig.github.repo, - repoOwner: projectConfig.github.owner, + repoName: githubRepo.repo, + repoOwner: githubRepo.owner, }; switch (artifactProviderName) { @@ -306,9 +327,9 @@ export function getArtifactProviderFromConfig(): BaseArtifactProvider { * * @returns An instance of status provider */ -export function getStatusProviderFromConfig(): BaseStatusProvider { +export async function getStatusProviderFromConfig(): Promise { const config = getConfiguration(); - const githubConfig = config.github; + const githubConfig = await getGlobalGithubConfig(); const rawStatusProvider = config.statusProvider || { config: undefined, diff --git a/src/schemas/projectConfig.schema.ts b/src/schemas/projectConfig.schema.ts index c069c9e85..6afb9a89b 100644 --- a/src/schemas/projectConfig.schema.ts +++ b/src/schemas/projectConfig.schema.ts @@ -86,7 +86,6 @@ const projectConfigJsonSchema = { }, }, additionalProperties: false, - required: ['github'], definitions: { targetConfig: { diff --git a/src/schemas/project_config.ts b/src/schemas/project_config.ts index 9a62a9e5f..b30f94300 100644 --- a/src/schemas/project_config.ts +++ b/src/schemas/project_config.ts @@ -8,7 +8,7 @@ * Craft project-specific configuration */ export interface CraftProjectConfig { - github: GithubGlobalConfig; + github?: GithubGlobalConfig; targets?: TargetConfig[]; preReleaseCommand?: string; postReleaseCommand?: string; diff --git a/src/targets/__tests__/awsLambda.test.ts b/src/targets/__tests__/awsLambda.test.ts index 01c856ea8..5cb43826a 100644 --- a/src/targets/__tests__/awsLambda.test.ts +++ b/src/targets/__tests__/awsLambda.test.ts @@ -11,7 +11,8 @@ function getAwsLambdaTarget(): AwsLambdaLayerTarget { name: 'aws-lambda-layer', ['testKey']: 'testValue', }, - new NoneArtifactProvider() + new NoneArtifactProvider(), + { owner: 'getsentry', repo: 'craft' } ); } diff --git a/src/targets/__tests__/crates.test.ts b/src/targets/__tests__/crates.test.ts index f44c9a20e..9d50e9b07 100644 --- a/src/targets/__tests__/crates.test.ts +++ b/src/targets/__tests__/crates.test.ts @@ -36,7 +36,8 @@ describe('getPublishOrder', () => { name: 'crates', noDevDeps: true, }, - new NoneArtifactProvider() + new NoneArtifactProvider(), + { owner: 'getsentry', repo: 'craft' } ); test('sorts crate packages properly', () => { diff --git a/src/targets/awsLambdaLayer.ts b/src/targets/awsLambdaLayer.ts index c9edd513d..48f5e3193 100644 --- a/src/targets/awsLambdaLayer.ts +++ b/src/targets/awsLambdaLayer.ts @@ -11,7 +11,7 @@ import { } from '../utils/githubApi'; import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { BaseTarget } from './base'; import { BaseArtifactProvider } from '../artifact_providers/base'; import { ConfigurationError, reportError } from '../utils/errors'; @@ -61,9 +61,10 @@ export class AwsLambdaLayerTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.github = getGithubClient(); this.awsLambdaConfig = this.getAwsLambdaConfig(); } diff --git a/src/targets/base.ts b/src/targets/base.ts index 672883869..923ab6581 100644 --- a/src/targets/base.ts +++ b/src/targets/base.ts @@ -1,5 +1,5 @@ import { logger } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { FilterOptions } from '../stores/zeus'; import { stringToRegexp } from '../utils/filters'; import { @@ -20,13 +20,17 @@ export class BaseTarget { public readonly config: TargetConfig; /** Artifact filtering options for the target */ public readonly filterOptions: FilterOptions; + /** Github repo configuration */ + public readonly githubRepo: GithubGlobalConfig; public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { this.artifactProvider = artifactProvider; this.config = config; + this.githubRepo = githubRepo; this.filterOptions = {}; if (this.config.includeNames) { this.filterOptions.includeNames = stringToRegexp( @@ -46,7 +50,11 @@ export class BaseTarget { * @param version New version to be released * @param revision Git commit SHA to be published */ - public async publish(_version: string, _revision: string): Promise { + public async publish( + _version: string, + + _revision: string + ): Promise { throw new Error('Not implemented'); return; } diff --git a/src/targets/brew.ts b/src/targets/brew.ts index 8165a8989..321ce324d 100644 --- a/src/targets/brew.ts +++ b/src/targets/brew.ts @@ -1,7 +1,6 @@ import { mapLimit } from 'async'; import * as Github from '@octokit/rest'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError } from '../utils/errors'; @@ -57,12 +56,13 @@ export class BrewTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.brewConfig = this.getBrewConfig(); this.github = getGithubClient(); - this.githubRepo = getGlobalGithubConfig(); + this.githubRepo = githubRepo; } /** diff --git a/src/targets/cocoapods.ts b/src/targets/cocoapods.ts index 923a046a7..b45313a16 100644 --- a/src/targets/cocoapods.ts +++ b/src/targets/cocoapods.ts @@ -3,7 +3,6 @@ import * as fs from 'fs'; import { basename, join } from 'path'; import { promisify } from 'util'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError, reportError } from '../utils/errors'; @@ -44,12 +43,13 @@ export class CocoapodsTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.cocoapodsConfig = this.getCocoapodsConfig(); this.github = getGithubClient(); - this.githubRepo = getGlobalGithubConfig(); + this.githubRepo = githubRepo; checkExecutableIsPresent(COCOAPODS_BIN); } diff --git a/src/targets/crates.ts b/src/targets/crates.ts index 64c9e14e0..76954774a 100644 --- a/src/targets/crates.ts +++ b/src/targets/crates.ts @@ -3,7 +3,6 @@ import * as path from 'path'; import simpleGit from 'simple-git'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { forEachChained } from '../utils/async'; @@ -108,9 +107,10 @@ export class CratesTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.cratesConfig = this.getCratesConfig(); checkExecutableIsPresent(CARGO_BIN); } @@ -320,10 +320,9 @@ export class CratesTarget extends BaseTarget { * @param revision Git commit SHA to be published */ public async publish(_version: string, revision: string): Promise { - const githubConfig = getGlobalGithubConfig(); await withTempDir( async directory => { - await this.cloneWithSubmodules(githubConfig, revision, directory); + await this.cloneWithSubmodules(this.githubRepo, revision, directory); await this.publishWorkspace(directory); }, true, diff --git a/src/targets/docker.ts b/src/targets/docker.ts index 4aee65351..c843e587b 100644 --- a/src/targets/docker.ts +++ b/src/targets/docker.ts @@ -1,5 +1,5 @@ import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { BaseArtifactProvider } from '../artifact_providers/base'; import { ConfigurationError } from '../utils/errors'; import { renderTemplateSafe } from '../utils/strings'; @@ -40,9 +40,10 @@ export class DockerTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.dockerConfig = this.getDockerConfig(); checkExecutableIsPresent(DOCKER_BIN); } diff --git a/src/targets/gcs.ts b/src/targets/gcs.ts index 0c2ea2bd1..c6aad94d5 100644 --- a/src/targets/gcs.ts +++ b/src/targets/gcs.ts @@ -1,5 +1,5 @@ import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { forEachChained } from '../utils/async'; import { ConfigurationError, reportError } from '../utils/errors'; import { @@ -52,9 +52,10 @@ export class GcsTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.targetConfig = this.getGCSTargetConfig(); this.gcsClient = new CraftGCSClient(this.targetConfig); } diff --git a/src/targets/gem.ts b/src/targets/gem.ts index 7ed6bcb92..070ffe3ae 100644 --- a/src/targets/gem.ts +++ b/src/targets/gem.ts @@ -6,7 +6,7 @@ import { import { reportError } from '../utils/errors'; import { checkExecutableIsPresent, spawnProcess } from '../utils/system'; import { BaseTarget } from './base'; -import { TargetConfig } from 'src/schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; const logger = loggerRaw.withScope('[gem]'); @@ -31,9 +31,10 @@ export class GemTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); checkExecutableIsPresent(GEM_BIN); } diff --git a/src/targets/ghPages.ts b/src/targets/ghPages.ts index 479f6f44d..4b4e49dd4 100644 --- a/src/targets/ghPages.ts +++ b/src/targets/ghPages.ts @@ -4,7 +4,6 @@ import * as path from 'path'; import * as Github from '@octokit/rest'; import simpleGit from 'simple-git'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError, reportError } from '../utils/errors'; @@ -54,11 +53,12 @@ export class GhPagesTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.github = getGithubClient(); - this.githubRepo = getGlobalGithubConfig(); + this.githubRepo = githubRepo; this.ghPagesConfig = this.getGhPagesConfig(); } diff --git a/src/targets/github.ts b/src/targets/github.ts index 713bd6c9f..5f20f02a7 100644 --- a/src/targets/github.ts +++ b/src/targets/github.ts @@ -2,7 +2,7 @@ import * as Github from '@octokit/rest'; import { createReadStream, statSync } from 'fs'; import { basename } from 'path'; -import { getConfiguration, getGlobalGithubConfig } from '../config'; +import { getConfiguration } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { DEFAULT_CHANGELOG_PATH, findChangeset } from '../utils/changes'; @@ -70,11 +70,12 @@ export class GithubTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.githubConfig = { - ...getGlobalGithubConfig(), + ...githubRepo, annotatedTag: this.config.annotatedTag === undefined || !!this.config.annotatedTag, changelog: getConfiguration().changelog || '', diff --git a/src/targets/index.ts b/src/targets/index.ts index 8fb44f850..89afbd9e4 100644 --- a/src/targets/index.ts +++ b/src/targets/index.ts @@ -1,4 +1,4 @@ -import { TargetConfig } from 'src/schemas/project_config'; +import { TargetConfig } from '../schemas/project_config'; import { BaseTarget } from './base'; import { BrewTarget } from './brew'; import { CocoapodsTarget } from './cocoapods'; diff --git a/src/targets/npm.ts b/src/targets/npm.ts index f082c68f0..d85c40870 100644 --- a/src/targets/npm.ts +++ b/src/targets/npm.ts @@ -2,7 +2,7 @@ import { SpawnOptions, spawnSync } from 'child_process'; import prompts from 'prompts'; import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError, reportError } from '../utils/errors'; import { isDryRun } from '../utils/helpers'; import { hasExecutable, spawnProcess } from '../utils/system'; @@ -70,9 +70,10 @@ export class NpmTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.checkRequirements(); this.npmConfig = this.getNpmConfig(); } diff --git a/src/targets/nuget.ts b/src/targets/nuget.ts index c109442f7..84555508a 100644 --- a/src/targets/nuget.ts +++ b/src/targets/nuget.ts @@ -1,5 +1,5 @@ import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError, reportError } from '../utils/errors'; import { checkExecutableIsPresent, spawnProcess } from '../utils/system'; import { BaseTarget } from './base'; @@ -38,9 +38,10 @@ export class NugetTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.nugetConfig = this.getNugetConfig(); checkExecutableIsPresent(NUGET_DOTNET_BIN); } diff --git a/src/targets/pypi.ts b/src/targets/pypi.ts index 18ee675d2..67712a4e3 100644 --- a/src/targets/pypi.ts +++ b/src/targets/pypi.ts @@ -1,5 +1,5 @@ import { logger as loggerRaw } from '../logger'; -import { TargetConfig } from '../schemas/project_config'; +import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { BaseArtifactProvider, RemoteArtifact, @@ -41,9 +41,10 @@ export class PypiTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.pypiConfig = this.getPypiConfig(); checkExecutableIsPresent(TWINE_BIN); } diff --git a/src/targets/registry.ts b/src/targets/registry.ts index 5b971f1ea..a8a2f64ac 100644 --- a/src/targets/registry.ts +++ b/src/targets/registry.ts @@ -3,7 +3,6 @@ import * as Github from '@octokit/rest'; import simpleGit from 'simple-git'; import * as path from 'path'; -import { getGlobalGithubConfig } from '../config'; import { logger as loggerRaw } from '../logger'; import { GithubGlobalConfig, TargetConfig } from '../schemas/project_config'; import { ConfigurationError, reportError } from '../utils/errors'; @@ -77,11 +76,12 @@ export class RegistryTarget extends BaseTarget { public constructor( config: TargetConfig, - artifactProvider: BaseArtifactProvider + artifactProvider: BaseArtifactProvider, + githubRepo: GithubGlobalConfig ) { - super(config, artifactProvider); + super(config, artifactProvider, githubRepo); this.github = getGithubClient(); - this.githubRepo = getGlobalGithubConfig(); + this.githubRepo = githubRepo; this.registryConfig = this.getRegistryConfig(); } diff --git a/yarn.lock b/yarn.lock index 6c710ceba..eda5a0032 100644 --- a/yarn.lock +++ b/yarn.lock @@ -501,12 +501,12 @@ "@aws-sdk/abort-controller" "3.1.0" tslib "^1.8.0" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" + integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g== dependencies: - "@babel/highlight" "^7.10.4" + "@babel/highlight" "^7.12.13" "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.12.10" @@ -529,30 +529,30 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" - integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== +"@babel/generator@^7.12.10", "@babel/generator@^7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.16.tgz#0befc287031a201d84cdfc173b46b320ae472d14" + integrity sha512-grBBR75UnKOcUWMp8WoDxNsWCFl//XCK6HWTrBQKTr5SV9f5g0pNOjdyzi/DTBv12S9GnYPInIXQBTky7OXEMg== dependencies: - "@babel/types" "^7.12.11" + "@babel/types" "^7.13.16" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-function-name@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" - integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== +"@babel/helper-function-name@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a" + integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== dependencies: - "@babel/helper-get-function-arity" "^7.12.10" - "@babel/template" "^7.12.7" - "@babel/types" "^7.12.11" + "@babel/helper-get-function-arity" "^7.12.13" + "@babel/template" "^7.12.13" + "@babel/types" "^7.12.13" -"@babel/helper-get-function-arity@^7.12.10": - version "7.12.10" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" - integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== +"@babel/helper-get-function-arity@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583" + integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== dependencies: - "@babel/types" "^7.12.10" + "@babel/types" "^7.12.13" "@babel/helper-member-expression-to-functions@^7.12.7": version "7.12.7" @@ -612,12 +612,12 @@ dependencies: "@babel/types" "^7.12.1" -"@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" - integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== +"@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.13": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05" + integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== dependencies: - "@babel/types" "^7.12.11" + "@babel/types" "^7.12.13" "@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" @@ -633,19 +633,19 @@ "@babel/traverse" "^7.12.5" "@babel/types" "^7.12.5" -"@babel/highlight@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" - integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== +"@babel/highlight@^7.12.13": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1" + integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg== dependencies: - "@babel/helper-validator-identifier" "^7.10.4" + "@babel/helper-validator-identifier" "^7.12.11" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" - integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== +"@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.13", "@babel/parser@^7.13.16": + version "7.13.16" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.16.tgz#0f18179b0448e6939b1f3f5c4c355a3a9bcdfd37" + integrity sha512-6bAg36mCwuqLO0hbR+z7PHuqWiCeP7Dzg73OpQwsAB1Eb8HnGEz5xYBzCfbu+YjoaJsJs+qheDxVAuqbt3ILEw== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -731,37 +731,35 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.3.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" - integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== +"@babel/template@^7.10.4", "@babel/template@^7.12.13", "@babel/template@^7.12.7", "@babel/template@^7.3.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" + integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA== dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" + "@babel/code-frame" "^7.12.13" + "@babel/parser" "^7.12.13" + "@babel/types" "^7.12.13" "@babel/traverse@^7.1.0", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" - integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== - dependencies: - "@babel/code-frame" "^7.12.11" - "@babel/generator" "^7.12.11" - "@babel/helper-function-name" "^7.12.11" - "@babel/helper-split-export-declaration" "^7.12.11" - "@babel/parser" "^7.12.11" - "@babel/types" "^7.12.12" + version "7.13.17" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.17.tgz#c85415e0c7d50ac053d758baec98b28b2ecfeea3" + integrity sha512-BMnZn0R+X6ayqm3C3To7o1j7Q020gWdqdyP50KEoVqaCO2c/Im7sYZSmVgvefp8TTMQ+9CtwuBp0Z1CZ8V3Pvg== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.16" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.16" + "@babel/types" "^7.13.17" debug "^4.1.0" globals "^11.1.0" - lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.12.12" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" - integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== +"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.13", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.13.16", "@babel/types@^7.13.17", "@babel/types@^7.3.0", "@babel/types@^7.3.3": + version "7.13.17" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.17.tgz#48010a115c9fba7588b4437dd68c9469012b38b4" + integrity sha512-RawydLgxbOPDlTLJNtoIypwdmAy//uQIzlKt2+iBiJaRlVuI6QLUxVAyWGNfOzp8Yu4L4lLIacoCyTNtpb4wiA== dependencies: "@babel/helper-validator-identifier" "^7.12.11" - lodash "^4.17.19" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -1308,6 +1306,11 @@ dependencies: form-data "*" +"@types/git-url-parse@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@types/git-url-parse/-/git-url-parse-9.0.0.tgz#aac1315a44fa4ed5a52c3820f6c3c2fb79cbd12d" + integrity sha512-kA2RxBT/r/ZuDDKwMl+vFWn1Z0lfm1/Ik6Qb91wnSzyzCDa/fkM8gIOq6ruB7xfr37n6Mj5dyivileUVKsidlg== + "@types/glob@*": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" @@ -2048,6 +2051,14 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2930,6 +2941,11 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" +filter-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" + integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -3079,6 +3095,15 @@ get-caller-file@^2.0.0, get-caller-file@^2.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -3120,6 +3145,21 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +git-up@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c" + integrity sha512-kbuvus1dWQB2sSW4cbfTeGpCMd8ge9jx9RKnhXhuJ7tnvT+NIrTVfYZxjtflZddQYcmdOTlkAcjmx7bor+15AQ== + dependencies: + is-ssh "^1.3.0" + parse-url "^5.0.0" + +git-url-parse@^11.4.4: + version "11.4.4" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.4.4.tgz#5d747debc2469c17bc385719f7d0427802d83d77" + integrity sha512-Y4o9o7vQngQDIU9IjyCmRJBin5iYjI5u9ZITnddRZpD7dcCFQj2sL2XuMNbLRE4b4B/4ENPsp2Q8P44fjAZ0Pw== + dependencies: + git-up "^4.0.0" + glob-parent@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" @@ -3216,6 +3256,11 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-symbols@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -3513,6 +3558,13 @@ is-promise@^2.2.2: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== +is-ssh@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b" + integrity sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ== + dependencies: + protocols "^1.1.0" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -4531,6 +4583,11 @@ normalize-path@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== +normalize-url@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + 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" @@ -4574,6 +4631,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.9.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.2.tgz#b6385a3e2b7cae0b5eafcf90cddf85d128767f30" + integrity sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA== + object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -4718,6 +4780,26 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse-path@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.3.tgz#82d81ec3e071dcc4ab49aa9f2c9c0b8966bb22bf" + integrity sha512-9Cepbp2asKnWTJ9x2kpw6Fe8y9JDbqwahGCTvklzd/cEq5C5JC59x2Xb0Kx+x0QZ8bvNquGO8/BWP0cwBHzSAA== + dependencies: + is-ssh "^1.3.0" + protocols "^1.4.0" + qs "^6.9.4" + query-string "^6.13.8" + +parse-url@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.2.tgz#856a3be1fcdf78dc93fc8b3791f169072d898b59" + integrity sha512-Czj+GIit4cdWtxo3ISZCvLiUjErSo0iI3wJ+q9Oi3QuMYTI6OZu+7cewMWZ+C1YAnKhYTk6/TLuhIgCypLthPA== + dependencies: + is-ssh "^1.3.0" + normalize-url "^3.3.0" + parse-path "^4.0.0" + protocols "^1.4.0" + parse5@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" @@ -4830,6 +4912,11 @@ prompts@2.4.1, prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +protocols@^1.1.0, protocols@^1.4.0: + version "1.4.8" + resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" + integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== + psl@^1.1.24, psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -4867,11 +4954,28 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +qs@^6.9.4: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +query-string@^6.13.8: + version "6.14.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" + integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" @@ -5227,6 +5331,15 @@ shellwords@^0.1.1: resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -5360,6 +5473,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz#e9c18a410e5ed7e12442a549fbd8afa767038d65" integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -5443,6 +5561,11 @@ stream-shift@^1.0.0: resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-length@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-3.1.0.tgz#107ef8c23456e187a8abd4a61162ff4ac6e25837"